From d2c4b0b6223d9f938dc1430bd704ebf4df187fc2 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Thu, 13 Feb 2025 15:12:52 +0000 Subject: [PATCH 001/186] functionality working --- google-cloud-storage/lib/google/cloud/storage.rb | 8 ++++++-- google-cloud-storage/lib/google/cloud/storage/service.rb | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/google-cloud-storage/lib/google/cloud/storage.rb b/google-cloud-storage/lib/google/cloud/storage.rb index cfc063f60be1..38fce2374552 100644 --- a/google-cloud-storage/lib/google/cloud/storage.rb +++ b/google-cloud-storage/lib/google/cloud/storage.rb @@ -94,7 +94,9 @@ def self.new project_id: nil, credentials: nil, scope: nil, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, endpoint: nil, project: nil, keyfile: nil, max_elapsed_time: nil, base_interval: nil, max_interval: nil, - multiplier: nil, upload_chunk_size: nil, universe_domain: nil + multiplier: nil, upload_chunk_size: nil, universe_domain: nil, + upload_url: nil, delete_upload: nil + scope ||= configure.scope retries ||= configure.retries timeout ||= configure.timeout @@ -109,7 +111,8 @@ def self.new project_id: nil, credentials: nil, scope: nil, retries: nil, multiplier ||= configure.multiplier upload_chunk_size ||= configure.upload_chunk_size universe_domain ||= configure.universe_domain - + upload_url ||= configure.upload_url + delete_upload ||= configure.delete_upload unless credentials.is_a? Google::Auth::Credentials credentials = Storage::Credentials.new credentials, scope: scope end @@ -125,6 +128,7 @@ def self.new project_id: nil, credentials: nil, scope: nil, retries: nil, host: endpoint, quota_project: configure.quota_project, max_elapsed_time: max_elapsed_time, base_interval: base_interval, max_interval: max_interval, multiplier: multiplier, upload_chunk_size: upload_chunk_size, + upload_url: upload_url, delete_upload: delete_upload, universe_domain: universe_domain ) ) diff --git a/google-cloud-storage/lib/google/cloud/storage/service.rb b/google-cloud-storage/lib/google/cloud/storage/service.rb index d9adf2acff65..22bc2549dd24 100644 --- a/google-cloud-storage/lib/google/cloud/storage/service.rb +++ b/google-cloud-storage/lib/google/cloud/storage/service.rb @@ -49,7 +49,9 @@ def initialize project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, max_interval: nil, - multiplier: nil, upload_chunk_size: nil, universe_domain: nil + multiplier: nil, upload_chunk_size: nil, universe_domain: nil, + upload_url: nil, delete_upload: nil + host ||= Google::Cloud::Storage.configure.endpoint @project = project @credentials = credentials @@ -72,6 +74,8 @@ def initialize project, credentials, retries: nil, @service.request_options.multiplier = multiplier if multiplier @service.request_options.add_invocation_id_header = true @service.request_options.upload_chunk_size = upload_chunk_size if upload_chunk_size + @service.request_options.upload_url = upload_url if upload_url + @service.request_options.delete_upload = delete_upload if delete_upload @service.authorization = @credentials.client if @credentials @service.root_url = host if host @service.universe_domain = universe_domain || Google::Cloud::Storage.configure.universe_domain From a846d56ad09148e10806665209f91b22e719f29a Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Thu, 27 Feb 2025 05:23:56 +0000 Subject: [PATCH 002/186] adding missing config --- google-cloud-storage/lib/google-cloud-storage.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/google-cloud-storage/lib/google-cloud-storage.rb b/google-cloud-storage/lib/google-cloud-storage.rb index 1dba01af5dcc..dd0ccb660b28 100644 --- a/google-cloud-storage/lib/google-cloud-storage.rb +++ b/google-cloud-storage/lib/google-cloud-storage.rb @@ -142,7 +142,7 @@ def storage scope: nil, retries: nil, timeout: nil, open_timeout: nil, read_time def self.storage project_id = nil, credentials = nil, scope: nil, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, max_elapsed_time: nil, base_interval: nil, max_interval: nil, multiplier: nil, - upload_chunk_size: nil + upload_chunk_size: nil, upload_url: nil, delete_upload: nil require "google/cloud/storage" Google::Cloud::Storage.new project_id: project_id, credentials: credentials, @@ -156,7 +156,9 @@ def self.storage project_id = nil, credentials = nil, scope: nil, base_interval: base_interval, max_interval: max_interval, multiplier: multiplier, - upload_chunk_size: upload_chunk_size + upload_chunk_size: upload_chunk_size, + upload_url: upload_url, + delete_upload: delete_upload end end end @@ -193,4 +195,6 @@ def self.storage project_id = nil, credentials = nil, scope: nil, config.add_field! :upload_chunk_size, nil, match: Integer config.add_field! :endpoint, nil, match: String, allow_nil: true config.add_field! :universe_domain, nil, match: String, allow_nil: true + config.add_field! :upload_url, nil, match: String, allow_nil: true + config.add_field! :delete_upload, nil, match: Integer, allow_nil: true end From 61cbea262ea2d1c9bce3ec493c4494e8894373e8 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Thu, 27 Feb 2025 19:17:39 +0000 Subject: [PATCH 003/186] fixing unit tests --- .../test/google/cloud/storage_test.rb | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/google-cloud-storage/test/google/cloud/storage_test.rb b/google-cloud-storage/test/google/cloud/storage_test.rb index 66033eb11448..a5a9b73ce214 100644 --- a/google-cloud-storage/test/google/cloud/storage_test.rb +++ b/google-cloud-storage/test/google/cloud/storage_test.rb @@ -126,7 +126,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_be :nil? @@ -223,7 +223,7 @@ def creds.is_a? target it "uses provided endpoint and universe_domain" do stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { _(project).must_equal "project-id" _(credentials).must_equal default_credentials _(retries).must_be :nil? @@ -263,7 +263,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_be :nil? @@ -305,7 +305,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_be :nil? @@ -347,7 +347,7 @@ def creds.is_a? target OpenStruct.new project_id: "project-id" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { _(project).must_equal "project-id" _(credentials).must_be_kind_of OpenStruct _(credentials.project_id).must_equal "project-id" @@ -401,7 +401,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_be :nil? @@ -449,7 +449,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_be :nil? @@ -497,7 +497,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_equal 3 @@ -553,7 +553,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_equal 3 @@ -609,7 +609,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_equal 3 @@ -667,7 +667,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_equal 3 From 0d3be36e0438533a7eb32cfdddd69c246bae563b Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Thu, 27 Feb 2025 19:22:06 +0000 Subject: [PATCH 004/186] fixing lint issues --- google-cloud-storage/lib/google/cloud/storage.rb | 1 - google-cloud-storage/lib/google/cloud/storage/service.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/google-cloud-storage/lib/google/cloud/storage.rb b/google-cloud-storage/lib/google/cloud/storage.rb index 38fce2374552..a2ead9271120 100644 --- a/google-cloud-storage/lib/google/cloud/storage.rb +++ b/google-cloud-storage/lib/google/cloud/storage.rb @@ -96,7 +96,6 @@ def self.new project_id: nil, credentials: nil, scope: nil, retries: nil, max_elapsed_time: nil, base_interval: nil, max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil - scope ||= configure.scope retries ||= configure.retries timeout ||= configure.timeout diff --git a/google-cloud-storage/lib/google/cloud/storage/service.rb b/google-cloud-storage/lib/google/cloud/storage/service.rb index 22bc2549dd24..df27bcb7be91 100644 --- a/google-cloud-storage/lib/google/cloud/storage/service.rb +++ b/google-cloud-storage/lib/google/cloud/storage/service.rb @@ -51,7 +51,6 @@ def initialize project, credentials, retries: nil, max_elapsed_time: nil, base_interval: nil, max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil - host ||= Google::Cloud::Storage.configure.endpoint @project = project @credentials = credentials From 284c28173b17b5c6f00d0196075facdab6db99d0 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Mon, 10 Mar 2025 19:38:27 +0000 Subject: [PATCH 005/186] changing storage_cleint approach --- .../lib/google-cloud-storage.rb | 8 ++---- .../lib/google/cloud/storage.rb | 6 +--- .../lib/google/cloud/storage/bucket.rb | 28 +++++++++++++++++-- .../lib/google/cloud/storage/service.rb | 13 ++++++--- .../test/google/cloud/storage_test.rb | 22 +++++++-------- google-cloud-storage/test/helper.rb | 2 ++ 6 files changed, 51 insertions(+), 28 deletions(-) diff --git a/google-cloud-storage/lib/google-cloud-storage.rb b/google-cloud-storage/lib/google-cloud-storage.rb index dd0ccb660b28..1dba01af5dcc 100644 --- a/google-cloud-storage/lib/google-cloud-storage.rb +++ b/google-cloud-storage/lib/google-cloud-storage.rb @@ -142,7 +142,7 @@ def storage scope: nil, retries: nil, timeout: nil, open_timeout: nil, read_time def self.storage project_id = nil, credentials = nil, scope: nil, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, max_elapsed_time: nil, base_interval: nil, max_interval: nil, multiplier: nil, - upload_chunk_size: nil, upload_url: nil, delete_upload: nil + upload_chunk_size: nil require "google/cloud/storage" Google::Cloud::Storage.new project_id: project_id, credentials: credentials, @@ -156,9 +156,7 @@ def self.storage project_id = nil, credentials = nil, scope: nil, base_interval: base_interval, max_interval: max_interval, multiplier: multiplier, - upload_chunk_size: upload_chunk_size, - upload_url: upload_url, - delete_upload: delete_upload + upload_chunk_size: upload_chunk_size end end end @@ -195,6 +193,4 @@ def self.storage project_id = nil, credentials = nil, scope: nil, config.add_field! :upload_chunk_size, nil, match: Integer config.add_field! :endpoint, nil, match: String, allow_nil: true config.add_field! :universe_domain, nil, match: String, allow_nil: true - config.add_field! :upload_url, nil, match: String, allow_nil: true - config.add_field! :delete_upload, nil, match: Integer, allow_nil: true end diff --git a/google-cloud-storage/lib/google/cloud/storage.rb b/google-cloud-storage/lib/google/cloud/storage.rb index a2ead9271120..ef98c3311087 100644 --- a/google-cloud-storage/lib/google/cloud/storage.rb +++ b/google-cloud-storage/lib/google/cloud/storage.rb @@ -94,8 +94,7 @@ def self.new project_id: nil, credentials: nil, scope: nil, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, endpoint: nil, project: nil, keyfile: nil, max_elapsed_time: nil, base_interval: nil, max_interval: nil, - multiplier: nil, upload_chunk_size: nil, universe_domain: nil, - upload_url: nil, delete_upload: nil + multiplier: nil, upload_chunk_size: nil, universe_domain: nil scope ||= configure.scope retries ||= configure.retries timeout ||= configure.timeout @@ -110,8 +109,6 @@ def self.new project_id: nil, credentials: nil, scope: nil, retries: nil, multiplier ||= configure.multiplier upload_chunk_size ||= configure.upload_chunk_size universe_domain ||= configure.universe_domain - upload_url ||= configure.upload_url - delete_upload ||= configure.delete_upload unless credentials.is_a? Google::Auth::Credentials credentials = Storage::Credentials.new credentials, scope: scope end @@ -127,7 +124,6 @@ def self.new project_id: nil, credentials: nil, scope: nil, retries: nil, host: endpoint, quota_project: configure.quota_project, max_elapsed_time: max_elapsed_time, base_interval: base_interval, max_interval: max_interval, multiplier: multiplier, upload_chunk_size: upload_chunk_size, - upload_url: upload_url, delete_upload: delete_upload, universe_domain: universe_domain ) ) diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket.rb b/google-cloud-storage/lib/google/cloud/storage/bucket.rb index ca8461354bb7..f7e8acfd5801 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket.rb @@ -1410,6 +1410,28 @@ def delete if_metageneration_match: nil, if_metageneration_not_match: nil user_project: user_project end + ## + # Delete ongoing resumable upload + # @param [String, ::File] file Path of the file on the filesystem to + # upload. Can be an File object, or File-like object such as StringIO. + # (If the object does not have path, a `path` argument must be also be + # provided.) + # @param [String] upload_id Unique Id of an Ongoing resumable upload + # + # @example + # require "google/cloud/storage" + # + # storage = Google::Cloud::Storage.new + # + # bucket = storage.bucket "my-bucket" + # bucket.delete_ongoing_resumable_upload file,upload_id + + + def delete_ongoing_resumable_upload file, upload_id + ensure_service! + ensure_io_or_file_exists! file + service.delete_ongoing_resumable_upload name, file, upload_id + end ## # Retrieves a list of files matching the criteria. # @@ -1799,7 +1821,8 @@ def create_file file, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, - if_metageneration_not_match: nil + if_metageneration_not_match: nil, + upload_id: nil ensure_service! ensure_io_or_file_exists! file path ||= file.path if file.respond_to? :path @@ -1830,7 +1853,8 @@ def create_file file, if_generation_not_match: if_generation_not_match, if_metageneration_match: if_metageneration_match, if_metageneration_not_match: if_metageneration_not_match, - user_project: user_project + user_project: user_project, + upload_id: upload_id File.from_gapi gapi, service, user_project: user_project end alias upload_file create_file diff --git a/google-cloud-storage/lib/google/cloud/storage/service.rb b/google-cloud-storage/lib/google/cloud/storage/service.rb index df27bcb7be91..c0578e4a8e6d 100644 --- a/google-cloud-storage/lib/google/cloud/storage/service.rb +++ b/google-cloud-storage/lib/google/cloud/storage/service.rb @@ -49,8 +49,7 @@ def initialize project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, max_interval: nil, - multiplier: nil, upload_chunk_size: nil, universe_domain: nil, - upload_url: nil, delete_upload: nil + multiplier: nil, upload_chunk_size: nil, universe_domain: nil host ||= Google::Cloud::Storage.configure.endpoint @project = project @credentials = credentials @@ -73,8 +72,6 @@ def initialize project, credentials, retries: nil, @service.request_options.multiplier = multiplier if multiplier @service.request_options.add_invocation_id_header = true @service.request_options.upload_chunk_size = upload_chunk_size if upload_chunk_size - @service.request_options.upload_url = upload_url if upload_url - @service.request_options.delete_upload = delete_upload if delete_upload @service.authorization = @credentials.client if @credentials @service.root_url = host if host @service.universe_domain = universe_domain || Google::Cloud::Storage.configure.universe_domain @@ -412,6 +409,7 @@ def insert_file bucket_name, if_metageneration_match: nil, if_metageneration_not_match: nil, user_project: nil, + upload_id: nil, options: {} params = { cache_control: cache_control, @@ -451,6 +449,7 @@ def insert_file bucket_name, if_metageneration_not_match: if_metageneration_not_match, kms_key_name: kms_key, user_project: user_project(user_project), + upload_id: upload_id, options: options end end @@ -699,6 +698,12 @@ def delete_file bucket_name, end end + def delete_ongoing_resumable_upload bucket_name, source, upload_id + execute do + service.delete_ongoing_resumable_upload bucket_name, source, upload_id + end + end + ## # Restore soft deleted bucket def restore_bucket bucket_name, diff --git a/google-cloud-storage/test/google/cloud/storage_test.rb b/google-cloud-storage/test/google/cloud/storage_test.rb index a5a9b73ce214..66033eb11448 100644 --- a/google-cloud-storage/test/google/cloud/storage_test.rb +++ b/google-cloud-storage/test/google/cloud/storage_test.rb @@ -126,7 +126,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_be :nil? @@ -223,7 +223,7 @@ def creds.is_a? target it "uses provided endpoint and universe_domain" do stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { _(project).must_equal "project-id" _(credentials).must_equal default_credentials _(retries).must_be :nil? @@ -263,7 +263,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_be :nil? @@ -305,7 +305,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_be :nil? @@ -347,7 +347,7 @@ def creds.is_a? target OpenStruct.new project_id: "project-id" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { _(project).must_equal "project-id" _(credentials).must_be_kind_of OpenStruct _(credentials.project_id).must_equal "project-id" @@ -401,7 +401,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_be :nil? @@ -449,7 +449,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_be :nil? @@ -497,7 +497,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_equal 3 @@ -553,7 +553,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_equal 3 @@ -609,7 +609,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_equal 3 @@ -667,7 +667,7 @@ def creds.is_a? target "storage-credentials" } stubbed_service = ->(project, credentials, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil, host: nil, quota_project: nil, max_elapsed_time: nil, base_interval: nil, - max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil, upload_url: nil, delete_upload: nil) { + max_interval: nil, multiplier: nil, upload_chunk_size: nil, universe_domain: nil) { _(project).must_equal "project-id" _(credentials).must_equal "storage-credentials" _(retries).must_equal 3 diff --git a/google-cloud-storage/test/helper.rb b/google-cloud-storage/test/helper.rb index 5d37f92feb26..b1528e89c0c1 100644 --- a/google-cloud-storage/test/helper.rb +++ b/google-cloud-storage/test/helper.rb @@ -374,6 +374,7 @@ def insert_object_args name: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, user_project: nil, + upload_id: nil, options: {} { name: name, @@ -387,6 +388,7 @@ def insert_object_args name: nil, if_metageneration_match: if_metageneration_match, if_metageneration_not_match: if_metageneration_not_match, user_project: user_project, + upload_id: upload_id, options: options } end From 477432f48215661b13ddfe17f92aeff32940c1b1 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Mon, 10 Mar 2025 20:22:50 +0000 Subject: [PATCH 006/186] fix linter --- google-cloud-storage/lib/google/cloud/storage/bucket.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket.rb b/google-cloud-storage/lib/google/cloud/storage/bucket.rb index f7e8acfd5801..300d2849ea50 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket.rb @@ -1487,6 +1487,7 @@ def delete_ongoing_resumable_upload file, upload_id # puts file.name # end # + def files prefix: nil, delimiter: nil, token: nil, max: nil, versions: nil, match_glob: nil, include_folders_as_prefixes: nil, soft_deleted: nil From 5e8ec6e7e08f41064a9a68fcfe551a859a140458 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Thu, 13 Mar 2025 10:02:27 +0000 Subject: [PATCH 007/186] code refactoring --- .../lib/google/cloud/storage/bucket.rb | 14 ++++--- .../lib/google/cloud/storage/service.rb | 11 ++---- .../test/google/cloud/storage/bucket_test.rb | 38 +++++++++++++++++++ google-cloud-storage/test/helper.rb | 2 - 4 files changed, 50 insertions(+), 15 deletions(-) diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket.rb b/google-cloud-storage/lib/google/cloud/storage/bucket.rb index 300d2849ea50..2b04891174b7 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket.rb @@ -1416,6 +1416,7 @@ def delete if_metageneration_match: nil, if_metageneration_not_match: nil # upload. Can be an File object, or File-like object such as StringIO. # (If the object does not have path, a `path` argument must be also be # provided.) + # @param [String] file_name Name of file specified for Ongoing resumable upload # @param [String] upload_id Unique Id of an Ongoing resumable upload # # @example @@ -1424,13 +1425,14 @@ def delete if_metageneration_match: nil, if_metageneration_not_match: nil # storage = Google::Cloud::Storage.new # # bucket = storage.bucket "my-bucket" - # bucket.delete_ongoing_resumable_upload file,upload_id + # bucket.delete_ongoing_resumable_upload file,file_name,upload_id - def delete_ongoing_resumable_upload file, upload_id + def delete_ongoing_resumable_upload file, file_name, upload_id ensure_service! ensure_io_or_file_exists! file - service.delete_ongoing_resumable_upload name, file, upload_id + raise "Upload Id missing" unless upload_id + create_file file, file_name, upload_id: upload_id, delete_upload: true end ## # Retrieves a list of files matching the criteria. @@ -1823,7 +1825,8 @@ def create_file file, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, - upload_id: nil + upload_id: nil, + delete_upload: nil ensure_service! ensure_io_or_file_exists! file path ||= file.path if file.respond_to? :path @@ -1855,7 +1858,8 @@ def create_file file, if_metageneration_match: if_metageneration_match, if_metageneration_not_match: if_metageneration_not_match, user_project: user_project, - upload_id: upload_id + upload_id: upload_id, + delete_upload: delete_upload File.from_gapi gapi, service, user_project: user_project end alias upload_file create_file diff --git a/google-cloud-storage/lib/google/cloud/storage/service.rb b/google-cloud-storage/lib/google/cloud/storage/service.rb index c0578e4a8e6d..b968693df9e2 100644 --- a/google-cloud-storage/lib/google/cloud/storage/service.rb +++ b/google-cloud-storage/lib/google/cloud/storage/service.rb @@ -410,6 +410,7 @@ def insert_file bucket_name, if_metageneration_not_match: nil, user_project: nil, upload_id: nil, + delete_upload: nil, options: {} params = { cache_control: cache_control, @@ -434,7 +435,8 @@ def insert_file bucket_name, else options = key_options(key).merge options end - + options.merge! upload_id: upload_id if upload_id + options.merge! delete_upload: delete_upload if delete_upload && upload_id execute do service.insert_object bucket_name, file_obj, @@ -449,7 +451,6 @@ def insert_file bucket_name, if_metageneration_not_match: if_metageneration_not_match, kms_key_name: kms_key, user_project: user_project(user_project), - upload_id: upload_id, options: options end end @@ -698,12 +699,6 @@ def delete_file bucket_name, end end - def delete_ongoing_resumable_upload bucket_name, source, upload_id - execute do - service.delete_ongoing_resumable_upload bucket_name, source, upload_id - end - end - ## # Restore soft deleted bucket def restore_bucket bucket_name, diff --git a/google-cloud-storage/test/google/cloud/storage/bucket_test.rb b/google-cloud-storage/test/google/cloud/storage/bucket_test.rb index 203e423467e5..b3ff87183deb 100644 --- a/google-cloud-storage/test/google/cloud/storage/bucket_test.rb +++ b/google-cloud-storage/test/google/cloud/storage/bucket_test.rb @@ -1408,6 +1408,44 @@ end end + it "resstarts a resumable upload with upload_id" do + new_file_name = random_file_path + upload_id= "TEST_ID" + + Tempfile.open ["google-cloud", ".txt"] do |tmpfile| + tmpfile.write "Hello world" + tmpfile.rewind + + mock = Minitest::Mock.new + mock.expect :insert_object, create_file_gapi(bucket.name, new_file_name), + [bucket.name, empty_file_gapi], **insert_object_args(name: new_file_name, upload_source: tmpfile, options: {retries: 0, upload_id: upload_id}) + + bucket.service.mocked_service = mock + bucket.create_file tmpfile, new_file_name, upload_id: upload_id + + mock.verify + end + end + + it "deletes a resumable upload with upload_id" do + new_file_name = random_file_path + upload_id= "TEST_ID" + + Tempfile.open ["google-cloud", ".txt"] do |tmpfile| + tmpfile.write "Hello world" + tmpfile.rewind + + mock = Minitest::Mock.new + mock.expect :insert_object, create_file_gapi(bucket.name, new_file_name), + [bucket.name, empty_file_gapi], **insert_object_args(name: new_file_name, upload_source: tmpfile, options: {retries: 0, upload_id: upload_id, delete_upload: true}) + + bucket.service.mocked_service = mock + bucket.delete_ongoing_resumable_upload tmpfile, new_file_name, upload_id + + mock.verify + end + end + def create_file_gapi bucket=nil, name = nil Google::Apis::StorageV1::Object.from_json random_file_hash(bucket, name).to_json end diff --git a/google-cloud-storage/test/helper.rb b/google-cloud-storage/test/helper.rb index b1528e89c0c1..5d37f92feb26 100644 --- a/google-cloud-storage/test/helper.rb +++ b/google-cloud-storage/test/helper.rb @@ -374,7 +374,6 @@ def insert_object_args name: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, user_project: nil, - upload_id: nil, options: {} { name: name, @@ -388,7 +387,6 @@ def insert_object_args name: nil, if_metageneration_match: if_metageneration_match, if_metageneration_not_match: if_metageneration_not_match, user_project: user_project, - upload_id: upload_id, options: options } end From 8b1e2fb6f70146f1f89a78803409bc79dfc45c8f Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Mon, 21 Apr 2025 12:43:21 +0000 Subject: [PATCH 008/186] wip - implementation 2 --- .../lib/google/cloud/storage/bucket.rb | 32 ++++++++++++++++--- .../lib/google/cloud/storage/service.rb | 6 ++++ 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket.rb b/google-cloud-storage/lib/google/cloud/storage/bucket.rb index 2b04891174b7..55587446a610 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket.rb @@ -717,6 +717,30 @@ def default_kms_key= new_default_kms_key patch_gapi! :encryption end + ## + # Restart ongoing resumable upload + # @param [String, ::File] file Path of the file on the filesystem to + # upload. Can be an File object, or File-like object such as StringIO. + # (If the object does not have path, a `path` argument must be also be + # provided.) + # @param [String] upload_id Unique Id of an Ongoing resumable upload + # + # @example + # require "google/cloud/storage" + # + # storage = Google::Cloud::Storage.new + # + # bucket = storage.bucket "my-bucket" + # bucket.restart_ongoing_resumable_upload file,upload_id + + + def restart_ongoing_resumable_upload file, upload_id + ensure_service! + ensure_io_or_file_exists! file + raise "Upload Id missing" unless upload_id + service.restart_delete_ongoing_resumable_upload name, file, upload_id + end + ## # The period of time (in seconds) that files in the bucket must be # retained, and cannot be deleted, overwritten, or archived. @@ -1416,7 +1440,6 @@ def delete if_metageneration_match: nil, if_metageneration_not_match: nil # upload. Can be an File object, or File-like object such as StringIO. # (If the object does not have path, a `path` argument must be also be # provided.) - # @param [String] file_name Name of file specified for Ongoing resumable upload # @param [String] upload_id Unique Id of an Ongoing resumable upload # # @example @@ -1425,14 +1448,13 @@ def delete if_metageneration_match: nil, if_metageneration_not_match: nil # storage = Google::Cloud::Storage.new # # bucket = storage.bucket "my-bucket" - # bucket.delete_ongoing_resumable_upload file,file_name,upload_id - + # bucket.delete_ongoing_resumable_upload file,upload_id - def delete_ongoing_resumable_upload file, file_name, upload_id + def delete_ongoing_resumable_upload file, upload_id ensure_service! ensure_io_or_file_exists! file raise "Upload Id missing" unless upload_id - create_file file, file_name, upload_id: upload_id, delete_upload: true + service.restart_delete_ongoing_resumable_upload name, file, upload_id, options: {delete_upload: true} end ## # Retrieves a list of files matching the criteria. diff --git a/google-cloud-storage/lib/google/cloud/storage/service.rb b/google-cloud-storage/lib/google/cloud/storage/service.rb index b968693df9e2..e15f537f14a8 100644 --- a/google-cloud-storage/lib/google/cloud/storage/service.rb +++ b/google-cloud-storage/lib/google/cloud/storage/service.rb @@ -699,6 +699,12 @@ def delete_file bucket_name, end end + def restart_delete_ongoing_resumable_upload bucket_name, source, upload_id, options: {} + execute do + service.restart_delete_ongoing_resumable_upload bucket_name, source, upload_id, options: options + end + end + ## # Restore soft deleted bucket def restore_bucket bucket_name, From 9d3365e9476c6f99f29a74bfef6c3ba622c731a3 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Thu, 24 Apr 2025 11:03:05 +0000 Subject: [PATCH 009/186] changes working --- .../lib/google/cloud/storage/bucket.rb | 12 ++++++------ .../lib/google/cloud/storage/service.rb | 10 ++++++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket.rb b/google-cloud-storage/lib/google/cloud/storage/bucket.rb index 55587446a610..5e407db0931f 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket.rb @@ -731,14 +731,14 @@ def default_kms_key= new_default_kms_key # storage = Google::Cloud::Storage.new # # bucket = storage.bucket "my-bucket" - # bucket.restart_ongoing_resumable_upload file,upload_id + # bucket.restart_resumable_upload file,upload_id - def restart_ongoing_resumable_upload file, upload_id + def restart_resumable_upload file, upload_id ensure_service! ensure_io_or_file_exists! file raise "Upload Id missing" unless upload_id - service.restart_delete_ongoing_resumable_upload name, file, upload_id + service.restart_resumable_upload name, file, upload_id end ## @@ -1448,13 +1448,13 @@ def delete if_metageneration_match: nil, if_metageneration_not_match: nil # storage = Google::Cloud::Storage.new # # bucket = storage.bucket "my-bucket" - # bucket.delete_ongoing_resumable_upload file,upload_id + # bucket.delete_resumable_upload file,upload_id - def delete_ongoing_resumable_upload file, upload_id + def delete_resumable_upload file, upload_id ensure_service! ensure_io_or_file_exists! file raise "Upload Id missing" unless upload_id - service.restart_delete_ongoing_resumable_upload name, file, upload_id, options: {delete_upload: true} + service.delete_resumable_upload name, file, upload_id, options: {delete_upload: true} end ## # Retrieves a list of files matching the criteria. diff --git a/google-cloud-storage/lib/google/cloud/storage/service.rb b/google-cloud-storage/lib/google/cloud/storage/service.rb index e15f537f14a8..cdbe0c88e978 100644 --- a/google-cloud-storage/lib/google/cloud/storage/service.rb +++ b/google-cloud-storage/lib/google/cloud/storage/service.rb @@ -699,9 +699,15 @@ def delete_file bucket_name, end end - def restart_delete_ongoing_resumable_upload bucket_name, source, upload_id, options: {} + def restart_resumable_upload bucket_name, source, upload_id, options: {} execute do - service.restart_delete_ongoing_resumable_upload bucket_name, source, upload_id, options: options + service.restart_resumable_upload bucket_name, source, upload_id, options: options + end + end + + def delete_resumable_upload bucket_name, source, upload_id, options: {} + execute do + service.delete_resumable_upload bucket_name, source, upload_id, options: options end end From 1ebc0e58c566e54d3b6aae6542c2c3f9d8f65af0 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Wed, 30 Apr 2025 11:05:57 +0000 Subject: [PATCH 010/186] adding test cases --- .../lib/google/cloud/storage/bucket.rb | 8 +++---- .../test/google/cloud/storage/bucket_test.rb | 22 +++++++++---------- google-cloud-storage/test/helper.rb | 12 ++++++++++ 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket.rb b/google-cloud-storage/lib/google/cloud/storage/bucket.rb index 5e407db0931f..a6bd1f401349 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket.rb @@ -718,12 +718,12 @@ def default_kms_key= new_default_kms_key end ## - # Restart ongoing resumable upload + # Restart resumable upload # @param [String, ::File] file Path of the file on the filesystem to # upload. Can be an File object, or File-like object such as StringIO. # (If the object does not have path, a `path` argument must be also be # provided.) - # @param [String] upload_id Unique Id of an Ongoing resumable upload + # @param [String] upload_id Unique Id of an resumable upload # # @example # require "google/cloud/storage" @@ -1435,12 +1435,12 @@ def delete if_metageneration_match: nil, if_metageneration_not_match: nil end ## - # Delete ongoing resumable upload + # Delete resumable upload # @param [String, ::File] file Path of the file on the filesystem to # upload. Can be an File object, or File-like object such as StringIO. # (If the object does not have path, a `path` argument must be also be # provided.) - # @param [String] upload_id Unique Id of an Ongoing resumable upload + # @param [String] upload_id Unique Id of an resumable upload # # @example # require "google/cloud/storage" diff --git a/google-cloud-storage/test/google/cloud/storage/bucket_test.rb b/google-cloud-storage/test/google/cloud/storage/bucket_test.rb index b3ff87183deb..d7b8ecac3f35 100644 --- a/google-cloud-storage/test/google/cloud/storage/bucket_test.rb +++ b/google-cloud-storage/test/google/cloud/storage/bucket_test.rb @@ -1408,27 +1408,25 @@ end end - it "resstarts a resumable upload with upload_id" do + it "restarts a resumable upload with upload_id" do new_file_name = random_file_path upload_id= "TEST_ID" Tempfile.open ["google-cloud", ".txt"] do |tmpfile| tmpfile.write "Hello world" tmpfile.rewind - mock = Minitest::Mock.new - mock.expect :insert_object, create_file_gapi(bucket.name, new_file_name), - [bucket.name, empty_file_gapi], **insert_object_args(name: new_file_name, upload_source: tmpfile, options: {retries: 0, upload_id: upload_id}) - + mock.expect :restart_resumable_upload, create_file_gapi(bucket.name, new_file_name), + [bucket.name, tmpfile, upload_id], + **restart_resumable_upload_args(options: {}) bucket.service.mocked_service = mock - bucket.create_file tmpfile, new_file_name, upload_id: upload_id + bucket.restart_resumable_upload tmpfile, upload_id mock.verify end end - it "deletes a resumable upload with upload_id" do - new_file_name = random_file_path + it "deletes a resumable upload with upload_id" do upload_id= "TEST_ID" Tempfile.open ["google-cloud", ".txt"] do |tmpfile| @@ -1436,11 +1434,11 @@ tmpfile.rewind mock = Minitest::Mock.new - mock.expect :insert_object, create_file_gapi(bucket.name, new_file_name), - [bucket.name, empty_file_gapi], **insert_object_args(name: new_file_name, upload_source: tmpfile, options: {retries: 0, upload_id: upload_id, delete_upload: true}) - + mock.expect :delete_resumable_upload, true, + [bucket.name, tmpfile, upload_id], + **delete_resumable_upload_args(options: {delete_upload: true}) bucket.service.mocked_service = mock - bucket.delete_ongoing_resumable_upload tmpfile, new_file_name, upload_id + bucket.delete_resumable_upload tmpfile, upload_id mock.verify end diff --git a/google-cloud-storage/test/helper.rb b/google-cloud-storage/test/helper.rb index 5d37f92feb26..f5518a4810fc 100644 --- a/google-cloud-storage/test/helper.rb +++ b/google-cloud-storage/test/helper.rb @@ -391,6 +391,18 @@ def insert_object_args name: nil, } end + def delete_resumable_upload_args options: {} + { + options: options + } + end + + def restart_resumable_upload_args options: {} + { + options: options + } + end + def get_object_args generation: nil, if_generation_match: nil, if_generation_not_match: nil, From 161450673b2d60cecccf0bcac2512d66c8b77fbb Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Wed, 30 Apr 2025 11:21:32 +0000 Subject: [PATCH 011/186] fix typo --- google-cloud-storage/lib/google/cloud/storage/bucket.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket.rb b/google-cloud-storage/lib/google/cloud/storage/bucket.rb index a6bd1f401349..252ae1b851a5 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket.rb @@ -1454,7 +1454,7 @@ def delete_resumable_upload file, upload_id ensure_service! ensure_io_or_file_exists! file raise "Upload Id missing" unless upload_id - service.delete_resumable_upload name, file, upload_id, options: {delete_upload: true} + service.delete_resumable_upload name, file, upload_id, options: { delete_upload: true } end ## # Retrieves a list of files matching the criteria. From a4a22e8635307700e8155ffbb12260b7d240e5ab Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Wed, 30 Apr 2025 11:32:15 +0000 Subject: [PATCH 012/186] removing unwanted change --- google-cloud-storage/lib/google/cloud/storage/bucket.rb | 8 ++------ google-cloud-storage/lib/google/cloud/storage/service.rb | 4 ---- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket.rb b/google-cloud-storage/lib/google/cloud/storage/bucket.rb index 252ae1b851a5..0c8bdf06556e 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket.rb @@ -1846,9 +1846,7 @@ def create_file file, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, - if_metageneration_not_match: nil, - upload_id: nil, - delete_upload: nil + if_metageneration_not_match: nil ensure_service! ensure_io_or_file_exists! file path ||= file.path if file.respond_to? :path @@ -1879,9 +1877,7 @@ def create_file file, if_generation_not_match: if_generation_not_match, if_metageneration_match: if_metageneration_match, if_metageneration_not_match: if_metageneration_not_match, - user_project: user_project, - upload_id: upload_id, - delete_upload: delete_upload + user_project: user_project File.from_gapi gapi, service, user_project: user_project end alias upload_file create_file diff --git a/google-cloud-storage/lib/google/cloud/storage/service.rb b/google-cloud-storage/lib/google/cloud/storage/service.rb index cdbe0c88e978..5f207b136c18 100644 --- a/google-cloud-storage/lib/google/cloud/storage/service.rb +++ b/google-cloud-storage/lib/google/cloud/storage/service.rb @@ -409,8 +409,6 @@ def insert_file bucket_name, if_metageneration_match: nil, if_metageneration_not_match: nil, user_project: nil, - upload_id: nil, - delete_upload: nil, options: {} params = { cache_control: cache_control, @@ -435,8 +433,6 @@ def insert_file bucket_name, else options = key_options(key).merge options end - options.merge! upload_id: upload_id if upload_id - options.merge! delete_upload: delete_upload if delete_upload && upload_id execute do service.insert_object bucket_name, file_obj, From f9eb45ff4861627568b98ac5b73fab8cdd5b8797 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Wed, 30 Apr 2025 11:37:00 +0000 Subject: [PATCH 013/186] removing unwanted changes --- google-cloud-storage/lib/google/cloud/storage.rb | 1 + google-cloud-storage/lib/google/cloud/storage/bucket.rb | 1 - google-cloud-storage/lib/google/cloud/storage/service.rb | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/google-cloud-storage/lib/google/cloud/storage.rb b/google-cloud-storage/lib/google/cloud/storage.rb index ef98c3311087..cfc063f60be1 100644 --- a/google-cloud-storage/lib/google/cloud/storage.rb +++ b/google-cloud-storage/lib/google/cloud/storage.rb @@ -109,6 +109,7 @@ def self.new project_id: nil, credentials: nil, scope: nil, retries: nil, multiplier ||= configure.multiplier upload_chunk_size ||= configure.upload_chunk_size universe_domain ||= configure.universe_domain + unless credentials.is_a? Google::Auth::Credentials credentials = Storage::Credentials.new credentials, scope: scope end diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket.rb b/google-cloud-storage/lib/google/cloud/storage/bucket.rb index 0c8bdf06556e..73083af12e97 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket.rb @@ -733,7 +733,6 @@ def default_kms_key= new_default_kms_key # bucket = storage.bucket "my-bucket" # bucket.restart_resumable_upload file,upload_id - def restart_resumable_upload file, upload_id ensure_service! ensure_io_or_file_exists! file diff --git a/google-cloud-storage/lib/google/cloud/storage/service.rb b/google-cloud-storage/lib/google/cloud/storage/service.rb index 5f207b136c18..b478e6699d00 100644 --- a/google-cloud-storage/lib/google/cloud/storage/service.rb +++ b/google-cloud-storage/lib/google/cloud/storage/service.rb @@ -433,6 +433,7 @@ def insert_file bucket_name, else options = key_options(key).merge options end + execute do service.insert_object bucket_name, file_obj, From 3d9ba90cf62e388d9268e12a265f1412b7d06113 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Wed, 7 May 2025 05:50:31 +0000 Subject: [PATCH 014/186] rewritting delete upload --- .../lib/google/cloud/storage/bucket.rb | 9 ++------- .../lib/google/cloud/storage/service.rb | 4 ++-- .../test/google/cloud/storage/bucket_test.rb | 20 +++++++------------ 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket.rb b/google-cloud-storage/lib/google/cloud/storage/bucket.rb index 73083af12e97..1a03d44d0258 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket.rb @@ -1435,10 +1435,6 @@ def delete if_metageneration_match: nil, if_metageneration_not_match: nil ## # Delete resumable upload - # @param [String, ::File] file Path of the file on the filesystem to - # upload. Can be an File object, or File-like object such as StringIO. - # (If the object does not have path, a `path` argument must be also be - # provided.) # @param [String] upload_id Unique Id of an resumable upload # # @example @@ -1449,11 +1445,10 @@ def delete if_metageneration_match: nil, if_metageneration_not_match: nil # bucket = storage.bucket "my-bucket" # bucket.delete_resumable_upload file,upload_id - def delete_resumable_upload file, upload_id + def delete_resumable_upload upload_id ensure_service! - ensure_io_or_file_exists! file raise "Upload Id missing" unless upload_id - service.delete_resumable_upload name, file, upload_id, options: { delete_upload: true } + service.delete_resumable_upload name, upload_id, options: { delete_upload: true } end ## # Retrieves a list of files matching the criteria. diff --git a/google-cloud-storage/lib/google/cloud/storage/service.rb b/google-cloud-storage/lib/google/cloud/storage/service.rb index b478e6699d00..4d3fcaf07c09 100644 --- a/google-cloud-storage/lib/google/cloud/storage/service.rb +++ b/google-cloud-storage/lib/google/cloud/storage/service.rb @@ -702,9 +702,9 @@ def restart_resumable_upload bucket_name, source, upload_id, options: {} end end - def delete_resumable_upload bucket_name, source, upload_id, options: {} + def delete_resumable_upload bucket_name, upload_id, options: {} execute do - service.delete_resumable_upload bucket_name, source, upload_id, options: options + service.delete_resumable_upload bucket_name, upload_id, options: options end end diff --git a/google-cloud-storage/test/google/cloud/storage/bucket_test.rb b/google-cloud-storage/test/google/cloud/storage/bucket_test.rb index d7b8ecac3f35..b4d8500e7ce0 100644 --- a/google-cloud-storage/test/google/cloud/storage/bucket_test.rb +++ b/google-cloud-storage/test/google/cloud/storage/bucket_test.rb @@ -1429,19 +1429,13 @@ it "deletes a resumable upload with upload_id" do upload_id= "TEST_ID" - Tempfile.open ["google-cloud", ".txt"] do |tmpfile| - tmpfile.write "Hello world" - tmpfile.rewind - - mock = Minitest::Mock.new - mock.expect :delete_resumable_upload, true, - [bucket.name, tmpfile, upload_id], - **delete_resumable_upload_args(options: {delete_upload: true}) - bucket.service.mocked_service = mock - bucket.delete_resumable_upload tmpfile, upload_id - - mock.verify - end + mock = Minitest::Mock.new + mock.expect :delete_resumable_upload, true, + [bucket.name, upload_id], + **delete_resumable_upload_args(options: {delete_upload: true}) + bucket.service.mocked_service = mock + bucket.delete_resumable_upload upload_id + mock.verify end def create_file_gapi bucket=nil, name = nil From 7b13e1b4348ae03f71fdfe1112a5a364fa6e37e9 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Wed, 21 May 2025 17:29:19 +0530 Subject: [PATCH 015/186] Update google-cloud-storage/lib/google/cloud/storage/bucket.rb Co-authored-by: Neha Bajaj --- google-cloud-storage/lib/google/cloud/storage/bucket.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket.rb b/google-cloud-storage/lib/google/cloud/storage/bucket.rb index 1a03d44d0258..6f51b2042df9 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket.rb @@ -723,7 +723,7 @@ def default_kms_key= new_default_kms_key # upload. Can be an File object, or File-like object such as StringIO. # (If the object does not have path, a `path` argument must be also be # provided.) - # @param [String] upload_id Unique Id of an resumable upload + # @param [String] upload_id Unique Id of a resumable upload # # @example # require "google/cloud/storage" From 69ac3d9e7f5f5e0051a1ee1c6ad94299ba24259c Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Wed, 11 Jun 2025 20:18:39 +0000 Subject: [PATCH 016/186] chnaging method params --- google-cloud-storage/lib/google/cloud/storage/bucket.rb | 2 +- google-cloud-storage/test/google/cloud/storage/bucket_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket.rb b/google-cloud-storage/lib/google/cloud/storage/bucket.rb index 6f51b2042df9..1959b249bd7a 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket.rb @@ -1448,7 +1448,7 @@ def delete if_metageneration_match: nil, if_metageneration_not_match: nil def delete_resumable_upload upload_id ensure_service! raise "Upload Id missing" unless upload_id - service.delete_resumable_upload name, upload_id, options: { delete_upload: true } + service.delete_resumable_upload name, upload_id end ## # Retrieves a list of files matching the criteria. diff --git a/google-cloud-storage/test/google/cloud/storage/bucket_test.rb b/google-cloud-storage/test/google/cloud/storage/bucket_test.rb index b4d8500e7ce0..03cf1afc64de 100644 --- a/google-cloud-storage/test/google/cloud/storage/bucket_test.rb +++ b/google-cloud-storage/test/google/cloud/storage/bucket_test.rb @@ -1432,7 +1432,7 @@ mock = Minitest::Mock.new mock.expect :delete_resumable_upload, true, [bucket.name, upload_id], - **delete_resumable_upload_args(options: {delete_upload: true}) + **delete_resumable_upload_args(options: {}) bucket.service.mocked_service = mock bucket.delete_resumable_upload upload_id mock.verify From dfa90963e8dff46cf93205ff2f049d7b68a60a5b Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Mon, 25 Aug 2025 08:31:03 +0000 Subject: [PATCH 017/186] addressing comments --- .../lib/google/cloud/storage/bucket.rb | 12 +++-- .../test/google/cloud/storage/bucket_test.rb | 51 +++++++++++++++---- google-cloud-storage/test/helper.rb | 8 +-- 3 files changed, 52 insertions(+), 19 deletions(-) diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket.rb b/google-cloud-storage/lib/google/cloud/storage/bucket.rb index 1959b249bd7a..07e8086fa9dd 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket.rb @@ -725,6 +725,9 @@ def default_kms_key= new_default_kms_key # provided.) # @param [String] upload_id Unique Id of a resumable upload # + # @return [Hash(String => String)] + # A Hash of file object returned from server. + # # @example # require "google/cloud/storage" # @@ -736,7 +739,7 @@ def default_kms_key= new_default_kms_key def restart_resumable_upload file, upload_id ensure_service! ensure_io_or_file_exists! file - raise "Upload Id missing" unless upload_id + raise ArgumentError, "Upload Id missing" unless upload_id service.restart_resumable_upload name, file, upload_id end @@ -1437,19 +1440,22 @@ def delete if_metageneration_match: nil, if_metageneration_not_match: nil # Delete resumable upload # @param [String] upload_id Unique Id of an resumable upload # + # @return [Boolean] Returns `true` if the bucket was deleted. + # # @example # require "google/cloud/storage" # # storage = Google::Cloud::Storage.new # # bucket = storage.bucket "my-bucket" - # bucket.delete_resumable_upload file,upload_id + # bucket.delete_resumable_upload upload_id def delete_resumable_upload upload_id ensure_service! - raise "Upload Id missing" unless upload_id + raise ArgumentError, "Upload Id missing" unless upload_id service.delete_resumable_upload name, upload_id end + ## # Retrieves a list of files matching the criteria. # diff --git a/google-cloud-storage/test/google/cloud/storage/bucket_test.rb b/google-cloud-storage/test/google/cloud/storage/bucket_test.rb index 03cf1afc64de..d6104a227918 100644 --- a/google-cloud-storage/test/google/cloud/storage/bucket_test.rb +++ b/google-cloud-storage/test/google/cloud/storage/bucket_test.rb @@ -1408,7 +1408,7 @@ end end - it "restarts a resumable upload with upload_id" do + it "restarts a resumable upload with upload_id" do new_file_name = random_file_path upload_id= "TEST_ID" @@ -1416,28 +1416,61 @@ tmpfile.write "Hello world" tmpfile.rewind mock = Minitest::Mock.new - mock.expect :restart_resumable_upload, create_file_gapi(bucket.name, new_file_name), + expected_return_value = create_file_gapi(bucket.name, new_file_name) + mock.expect :restart_resumable_upload, expected_return_value, [bucket.name, tmpfile, upload_id], - **restart_resumable_upload_args(options: {}) + **resumable_upload_args(options: {}) bucket.service.mocked_service = mock - bucket.restart_resumable_upload tmpfile, upload_id - + returned_value= bucket.restart_resumable_upload tmpfile, upload_id + assert_equal expected_return_value, returned_value mock.verify end end - it "deletes a resumable upload with upload_id" do + it "raises ArgumentError if upload_id is not provided to restart_resumable_upload" do + new_file_name = random_file_path upload_id= "TEST_ID" + Tempfile.open ["google-cloud", ".txt"] do |tmpfile| + tmpfile.write "Hello world" + tmpfile.rewind + mock = Minitest::Mock.new + mock.expect :restart_resumable_upload, create_file_gapi(bucket.name, new_file_name), + [bucket.name, tmpfile, upload_id], + **resumable_upload_args(options: {}) + bucket.service.mocked_service = mock + expect do + bucket.restart_resumable_upload tmpfile + end.must_raise ArgumentError + end + end + + it "deletes a resumable upload with upload_id" do + upload_id = "TEST_ID" + mock = Minitest::Mock.new - mock.expect :delete_resumable_upload, true, + expected_return_value = true + mock.expect :delete_resumable_upload, expected_return_value, [bucket.name, upload_id], - **delete_resumable_upload_args(options: {}) + **resumable_upload_args(options: {}) bucket.service.mocked_service = mock - bucket.delete_resumable_upload upload_id + returned_value = bucket.delete_resumable_upload upload_id + assert_equal expected_return_value, returned_value mock.verify end + it "Raises ArgumentError if upload_id is not provided to delete_resumable_upload" do + upload_id = "TEST_ID" + mock = Minitest::Mock.new + mock.expect :delete_resumable_upload, true, + [bucket.name, upload_id], + **resumable_upload_args(options: {}) + bucket.service.mocked_service = mock + expect do + bucket.delete_resumable_upload + end.must_raise ArgumentError + end + def create_file_gapi bucket=nil, name = nil Google::Apis::StorageV1::Object.from_json random_file_hash(bucket, name).to_json end diff --git a/google-cloud-storage/test/helper.rb b/google-cloud-storage/test/helper.rb index f5518a4810fc..09644b957b7a 100644 --- a/google-cloud-storage/test/helper.rb +++ b/google-cloud-storage/test/helper.rb @@ -391,13 +391,7 @@ def insert_object_args name: nil, } end - def delete_resumable_upload_args options: {} - { - options: options - } - end - - def restart_resumable_upload_args options: {} + def resumable_upload_args options: {} { options: options } From d437897719fe7039e73f784ff959db572ba765f9 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Mon, 25 Aug 2025 08:34:48 +0000 Subject: [PATCH 018/186] removing space --- google-cloud-storage/test/google/cloud/storage/bucket_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-storage/test/google/cloud/storage/bucket_test.rb b/google-cloud-storage/test/google/cloud/storage/bucket_test.rb index d6104a227918..8b8ed5d4a295 100644 --- a/google-cloud-storage/test/google/cloud/storage/bucket_test.rb +++ b/google-cloud-storage/test/google/cloud/storage/bucket_test.rb @@ -1454,7 +1454,7 @@ [bucket.name, upload_id], **resumable_upload_args(options: {}) bucket.service.mocked_service = mock - returned_value = bucket.delete_resumable_upload upload_id + returned_value = bucket.delete_resumable_upload upload_id assert_equal expected_return_value, returned_value mock.verify end From 7fba719046ed985bc921a009dcd97e632b7ce0f7 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Mon, 25 Aug 2025 08:40:23 +0000 Subject: [PATCH 019/186] resolving syntax --- google-cloud-storage/test/google/cloud/storage/bucket_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-storage/test/google/cloud/storage/bucket_test.rb b/google-cloud-storage/test/google/cloud/storage/bucket_test.rb index 8b8ed5d4a295..a492f1d649a2 100644 --- a/google-cloud-storage/test/google/cloud/storage/bucket_test.rb +++ b/google-cloud-storage/test/google/cloud/storage/bucket_test.rb @@ -1410,7 +1410,7 @@ it "restarts a resumable upload with upload_id" do new_file_name = random_file_path - upload_id= "TEST_ID" + upload_id = "TEST_ID" Tempfile.open ["google-cloud", ".txt"] do |tmpfile| tmpfile.write "Hello world" @@ -1429,7 +1429,7 @@ it "raises ArgumentError if upload_id is not provided to restart_resumable_upload" do new_file_name = random_file_path - upload_id= "TEST_ID" + upload_id = "TEST_ID" Tempfile.open ["google-cloud", ".txt"] do |tmpfile| tmpfile.write "Hello world" From 158f5c2ef145ea68e3802665cb6ea382102f0e51 Mon Sep 17 00:00:00 2001 From: Shubhangi Singh Date: Mon, 25 Aug 2025 16:42:33 +0530 Subject: [PATCH 020/186] Update bucket.rb --- google-cloud-storage/lib/google/cloud/storage/bucket.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/google-cloud-storage/lib/google/cloud/storage/bucket.rb b/google-cloud-storage/lib/google/cloud/storage/bucket.rb index 07e8086fa9dd..ebe3362af49b 100644 --- a/google-cloud-storage/lib/google/cloud/storage/bucket.rb +++ b/google-cloud-storage/lib/google/cloud/storage/bucket.rb @@ -1511,7 +1511,6 @@ def delete_resumable_upload upload_id # puts file.name # end # - def files prefix: nil, delimiter: nil, token: nil, max: nil, versions: nil, match_glob: nil, include_folders_as_prefixes: nil, soft_deleted: nil From dce6e853cf55e1a0e184fe6e0cefe556586d69f1 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 021/186] 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 972256f4581852a021ff21f864e95bdd6d3cb477 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 022/186] 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 ac6bebecf3b5685d57fb1f9ae33ec8c88a9d6709 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 023/186] 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 757166fced804b579046865472f82aeb32097ab0 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 024/186] 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 3dedeeee77ef4266ca53f8908892bcc210f5cd79 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 025/186] 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 d4f0a06fdc94a4a6ead937c9299143f5e30dbfde 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 026/186] 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 debd9a2b76fe0fad83671a40b01d9b2dbd398233 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 027/186] 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 0dd58460bfac2fad3657b14861ed12bf298c1ffc 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 028/186] 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 70a060a2c378d6b4b57161d414b8981f2d58a945 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 029/186] 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 c0e420852a2f89a1ad3f2385ec14b53f135288ee 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 030/186] 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 d98c570a06d6787345d4959b243807db1d098667 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 031/186] 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 cfa8600a2e6ade74bfdb00517752dd45021570f8 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 032/186] 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 171755d22eb50feb710ed5b6f0aa12c2be0bd70f 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 033/186] 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 eb5b008f5a8a93ed1aed0a49dffa899bccdf7b62 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 034/186] 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 f991a7cd75352c0ae3948b994ae39410ee47b343 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 035/186] 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 ec5883bac95893dca329e49635dc6ae48840fc6e 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 036/186] 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 b3cbc3c20b94b7ad4b1bbab359826f56bb3d8706 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 037/186] 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 63bb2084e0a7f4a0b61c90866d945c4107f39a27 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 038/186] 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 d1bd18f30344503e508a1ad5836ba79e73f24588 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 039/186] 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 8a22de487ec549dd8fc07beae90915148d6da168 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 040/186] 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 a7af257644fd01b8e0193e889d853c626017eda2 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 041/186] 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 635b0394daf1a72a7b7f5da9497a611181927e98 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 042/186] 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 5c799b8d9f9d9662d7db69a8a551446c28515145 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 043/186] 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 3e910fdcdad74a1209555b8ce345cbf76b572ba4 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 044/186] 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 dceac29c686f774496a551cd48d2058129257bc0 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 045/186] 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 0a4594ee591ef27f2415e4bc0425978bdb837352 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 046/186] 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 c9f46ba22ad26d43b7587d038bc0a50b273014d2 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 047/186] 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 02528b6eb4a39755f8f77bd69972c8ff37898d8a 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 048/186] 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 6f680699a61b10bebc1c2cf82bef1818ab05cd32 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 049/186] 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 04dceea88e08f11a412191665c9812c174ec1c23 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 050/186] 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 a61374b04916f4e4273ea602c0a839900b585f69 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 051/186] 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 bd809492ee680d5c0b9b05e2eb7ad3a65b4bdd4d 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 052/186] 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 950e5b34b0ac5ac39dbf1279ca8efa0a2d70d8cb 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 053/186] 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 b7a1315bdecbd8b965733d0eb6648f0b4601af4a 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 054/186] 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 80d3a700aefe35b0eb997ecb97fbcfec0934e413 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 055/186] 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 0042db3bb3b9512959268611025ca65dced997ef 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 056/186] 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 1c8891705ba626ffc914522634a17ca8e05ddf38 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 057/186] 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 74d6872f2f46505fdaffb21a428958efbf2a643f 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 058/186] 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 f3170ef9a2248e6f3ee33efd7856ee5fe6e8496c 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 059/186] 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 72c08e32a2934836037238733dd26955d5a76e81 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Tue, 15 Jul 2025 12:17:04 -0700 Subject: [PATCH 060/186] 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 32d295539b450e9de56e23a11f6be4dbd4861c8e Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Tue, 15 Jul 2025 12:17:04 -0700 Subject: [PATCH 061/186] 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 ed0bf2fb106c44bee0ac6552f7ce3557be9ea83a Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Tue, 15 Jul 2025 13:58:43 -0700 Subject: [PATCH 062/186] 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 a4c25f5e05529d0ba239fc0227092a2de0becd74 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Tue, 15 Jul 2025 14:09:39 -0700 Subject: [PATCH 063/186] 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 a0641c87b3df8619169620d63caa544d6276609f Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Thu, 17 Jul 2025 17:24:36 -0700 Subject: [PATCH 064/186] 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 5eb8d550f7770171dcbbc4947c88dae92433c665 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 13:07:05 -0700 Subject: [PATCH 065/186] 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 cc9e59f4f0dfc961b656ea80fde4a1ff3ef8b50a Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 13:16:04 -0700 Subject: [PATCH 066/186] 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 0ecbe1c6b0fadf0a4b971e2edc7a18692e9aa378 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 15:49:15 -0700 Subject: [PATCH 067/186] 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 f24cfbad111795ee26c7a49630c1e1c654bf5481 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 15:35:25 -0700 Subject: [PATCH 068/186] 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 d7beb0d260b43d9ab2581b82ce4f14e8a2a23092 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 16:16:27 -0700 Subject: [PATCH 069/186] 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 c5a016d892cb05f78880dd92c49c6edbaf3b196d Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 16:25:46 -0700 Subject: [PATCH 070/186] 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 a828725136512001a5a8b59252420e3a205bb43e Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 17:12:17 -0700 Subject: [PATCH 071/186] 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 8a90edca46589d42d0db8082bf713a0b94697e20 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 17:29:51 -0700 Subject: [PATCH 072/186] 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 1292972cc37cdf7e2e4ca00a7f8e976bb78f506a Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 17:50:46 -0700 Subject: [PATCH 073/186] 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 f7374579fdbc835df6e9c61bc74e09461290e94c Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 18:31:02 -0700 Subject: [PATCH 074/186] 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 fccc15a8a4ff82119d63c8fa4fc1b252a6bccdb2 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 18 Jul 2025 19:07:29 -0700 Subject: [PATCH 075/186] 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 ae13ca7bb0845cd23deb4217a4ae4e4985e191d0 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Wed, 23 Jul 2025 18:10:00 -0700 Subject: [PATCH 076/186] 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 3ca82916af6d4b0ffff607a7b95154c0ba493ec5 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Wed, 23 Jul 2025 19:11:02 -0700 Subject: [PATCH 077/186] 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 d21399fb60ec833cc8fae4cdf4051da9b1a45caa Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Wed, 23 Jul 2025 19:11:36 -0700 Subject: [PATCH 078/186] 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 06ebab31d5507ba5d74c1df49b5361fec787a33b Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Wed, 23 Jul 2025 19:12:08 -0700 Subject: [PATCH 079/186] 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 8abcdb3af18856f34c858750c7a60cab3fb0c15f Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Fri, 25 Jul 2025 12:40:30 -0700 Subject: [PATCH 080/186] 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 096f4229a0f7c9e3845d554319cba43d4e536bb9 Mon Sep 17 00:00:00 2001 From: Charlotte Yun Date: Mon, 4 Aug 2025 16:36:01 -0700 Subject: [PATCH 081/186] 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 f00f9bcac3a4888e834573276599d908f2c14816 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 6 Aug 2025 00:42:10 +0200 Subject: [PATCH 082/186] 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 5c1c71d1db223e027da9cdca8d402786ff8260e1 Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Wed, 6 Aug 2025 11:42:31 -0700 Subject: [PATCH 083/186] 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 acf99782ee154bdc4816e8bdaccca0061df77ba4 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 084/186] 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 ab0f376c03aca0c549402164853f519d281c88b5 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 085/186] 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 68a60b295cf65766e2a926c6402b57d6c240056f 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 086/186] 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 b0b59f2158c7ebe2b0f5c4fda9dfeb87c71139a8 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 087/186] 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 3740f096cc74f09cdd83ed5467f74ffed7d8902f 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 088/186] 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 8fa8a5a1b2b1016001092221721de0b071eab1c5 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 089/186] 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 0e3efecc505c53cc733c666715ac6b4d0aee27a2 Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Wed, 6 Aug 2025 16:32:25 -0700 Subject: [PATCH 090/186] 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 1655e659bc62c69af8515cffdd7eec4ca57fe8b3 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 091/186] 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 aaacf1f8a0715778c39a65485d8e9eebcaa68213 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 092/186] 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 95826dc8e02f2bb5c65610f1bb3be20620bc2e10 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 093/186] 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 39b9eb4238d13bb9896a300ad613d2807927d306 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 094/186] 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 2652635960de5acca5c30ae6a0956c0354157d09 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 095/186] 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 ad4c92b9d8369e9eee1300c9c07e4f6bbd579b6a 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 096/186] 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 e1ba5d5542dad70451bb091e4ee51e40b3b832e0 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 097/186] 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 278b530cd890523e9ddd0eeb41d3c3f0197fdd5b 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 098/186] 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 02d36d99b8b7f35cb963f7aff325c421b533840b 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 099/186] 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 197432254042476dd16aeb7b5c02fcd8ee456ea8 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 100/186] 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 173efe50cb1ddea477e122c561b7fbca01de7d72 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 101/186] 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 3eeb4f8cf223556b772ee699d0ee214c4cbc727a 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 102/186] 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 561a646f0c422db6bc4cd285f11de23e025929a2 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 103/186] 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 0b9a8eef66678e73f29f7cd4c5672c3e4366fcba 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 104/186] 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 6e049f689fbe698dd68925423c04a335045404f2 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 105/186] 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 6083a18b2eca5cdc894e9c80e8860faf77883217 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 106/186] 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 49498d4ae4719f398351cf3b46085a6611ea48df 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 107/186] 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 a11000067eba1464ae8293a9c954a277536dae8d 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 108/186] 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 41e867560f0ec985639fc4fa3418460a94773483 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 109/186] 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 c39fa766dc7c12b8bb129dc1ad9ab3473164754e 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 110/186] 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 1a81649cad6f0f314aa1f532b1c4e554563d7b54 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 111/186] 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 d8ea0ef85b75b38d0bc272f74d3fc03ceea43711 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 112/186] 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 12fde8e0a42125d05a3bf2b6666d4a9a71846440 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 113/186] 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 45c6b4d6fa31cfaf1dbdf18b5b0826585433f9fb 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 114/186] 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 578828e96e23f69bb1340023f425d5a731661dda Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Fri, 8 Aug 2025 11:30:03 -0700 Subject: [PATCH 115/186] 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 9227a94c68aff170cc485b084275123bd75e5c57 Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Fri, 8 Aug 2025 11:30:22 -0700 Subject: [PATCH 116/186] 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 41c1f45ac65fbc46226cbebef9e4d5118ec2a899 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 117/186] 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 68ee1b54828b57da7fe3e8913fa7ae0ad333862d 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 118/186] 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 8b20e527e02231ccdf90b7954b6a83b430b27c6f 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 119/186] 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 d17d91f0546ce024b7f4570eae9c51bc4c744a5b 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 120/186] 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 b950bb5157800c16aab6918ed18458b6149054a9 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 121/186] 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 608d25da94cee71d51c88e3c6c9b566ab7bed414 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 122/186] 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 9c0fce9277f1dc016adce56229c917e8918818d6 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 123/186] 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 51762abac3a1bc0946fb8329f3a34f608695c113 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 124/186] 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 b0b590ea15d2065a620c9a0b2324fea98b7292bb 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 125/186] 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 3be0594d9147cc13967953a44839b26c83d497fa 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 126/186] 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 4af7fe6eaa34b1b689e0de011370d1ed564f90f2 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 127/186] 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 1435d441a180f1ca480e279359e1db19e7393be2 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 128/186] 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 7b2af5a7347f763c7feae38a4b4d18270352db1a 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 129/186] 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 51cf5d1a58f42281f2750a9998548092d4803b07 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 130/186] 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 b5ec021232db7fb2ae44fdf5a69f8931b5254cee 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 131/186] 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 6fd408694fbaa85c0ad09506d4226e36cfa7e62f 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 132/186] 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 fe1cd717c40f89bccadfde1a7f6e7acefec5734d 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 133/186] 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 659a448eba5a03fa2152d22dd9c2dbf38231f98e 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 134/186] 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 ceba3eac0cd2c70a5e8fbf6615dff2d94cd0a37e 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 135/186] 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 6ce0f01ce6c96ad15117a3e31e038edcf4d9d71d 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 136/186] 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 66e3c13cb7689565a75ee3d90b7c6234b504b93f 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 137/186] 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 77b20fd9290fd02871cea63d2fe596a4d97f49c7 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 138/186] 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 95d5f28b1e9d6367ce9ab00d9d3896471530e16a 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 139/186] 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 3a4455ecd498004322166683e31d703dff1cf3a3 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 140/186] 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 f8ff7e9c727716fd941c4c23f4b5454066f49d58 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 141/186] 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 a617437851621de0b53966894fc2ee6f3261f817 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 142/186] 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 35d4e568b6761ed79b5914c6813e1b96c1b2b2b3 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 143/186] 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 ef63b6b4bab5fb12516f6c7eb2c143755131a6ba 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 144/186] 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 d71e2fe703f6feff82ad62f6d57e1db583169f0b 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 145/186] 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 e6c444c98e4a3c05fb272c20b5d9a44e7b7ae467 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 146/186] 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 182aa7f60b5dfb44ac538e1fabd72e179e8dbcd0 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 147/186] 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 636419c555354a4451155478fff48944c7a92cfc 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 148/186] 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 5845d708292fd351c466172fd1e8a4e1f0b1e329 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 13 Aug 2025 22:05:47 +0200 Subject: [PATCH 149/186] 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 e48732158165df0b2d66c682941cc4555a7ae669 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 150/186] 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 163e2d4fcf32ea521952b1622511cc742bbf84ca 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 151/186] 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 e66b9a043a5dbebec22df56c6b0c1f1c2438e963 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 152/186] 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 4afcca10cd8b29c71e8347a0db189749d57fc73d 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 153/186] 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 1447a7321fdb6d12223022c0f05641827624a97b 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 154/186] 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 e43d50eb2ad3110decff2f6310994fab65709277 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 155/186] 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 4b147c4c760682d9401737fb9f81135969dcb898 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 156/186] 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 5ab47cefe15fee72f8d3144ddbc9896415c99487 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 157/186] 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 dc2bf93f3c7d2dc9c14424031761cc2a9d0dbfc3 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 158/186] 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 a735b79624276bfe30f989786ac6e58afbd72069 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 159/186] 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 0d0be77bd2e878624a7ba3a1402cc6a76c1fde81 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 160/186] 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 616e53da2dddd19be8b6e40b8b0aac466fa17e5a 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 161/186] 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 46e1c6a495317cb845026d69cfcd6590ecff12d0 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 162/186] 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 6058a7508b8b2c8a9b5bb6c29d680d82354e67e9 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 163/186] 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 e4a9c728d2070627e9ea0820eaeb363c13965acc 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 164/186] 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 a14b1e85c92dfd92fda6ff936a9d2e3fb98cd070 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 165/186] 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 39400ddb197096f262833684ef11cc684e7d6942 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 166/186] 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 1750471dea2cbc42d6675dbeca8ac5955e7ac409 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 167/186] 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 c9493b3a3ef24bd7a85866e3ed1162134d9b7b65 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 168/186] 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 f9d4848a2dd58c32a2e26f3ea47b25534ae56b83 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 169/186] 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 08b39a244b55db1c853d116a7790982222053663 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 170/186] 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 1f3b687bf4ac91fbbcdb1ab71c1462fd76243e29 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 171/186] 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 69ecaeb3c54fc9ea2516daad2a043ee536647d9c 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 172/186] 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 05d7f36c1ab9cade0285149fe3ac33e9f6a57082 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 173/186] 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 815fcbcbf8dd9627ae3b9fbb7e83fd90b7d1ee13 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 174/186] 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 4669d95c61ae6ceba496d66f7ed2f77512f5bad9 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 175/186] 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 86505cc2f9fdd6599cc35b73373ba759c8f076fa 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 176/186] 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 4e7c6b69344dcee08ccd5f39c1a5ad8331863272 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 177/186] 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 ba95b5695bd9be7abdd794748ca1180304458b73 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 178/186] 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 54f846cbec5f5554fa870cd0f2b650963a295d94 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 179/186] 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 6429828eda0179eebffb0a6ef665d2ebff2822f2 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 180/186] 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 52dd6719e1eaec152489e8300c0fe928df92521b 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 181/186] 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 55288bb266e471c890ebafc997fe82a6db3153b6 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 182/186] 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 8d130546df53ae487dc47dec6cbab19799c68f83 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 183/186] 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 9339e1529830e7e2fc1156f9bf73fc7fb37f9ee1 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 184/186] 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 2eee6525f7fbfa02b0ca324c2c2659a7a65d2047 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 185/186] 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 848807860fd95bcabdde43beb562df53ad08db41 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 186/186] 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