From 3ed378e4f0e6a24e471da1ea8918978fbf4d316c Mon Sep 17 00:00:00 2001 From: Daniel Azuma Date: Mon, 19 Jul 2021 23:45:13 +0000 Subject: [PATCH] feat: Generate inline snippets in yardoc --- gapic-generator-cloud/Rakefile | 5 - .../generators/cloud_generator_parameters.rb | 10 +- .../default_generator_parameters.rb | 4 +- .../lib/gapic/presenters/method_presenter.rb | 4 + .../lib/gapic/presenters/snippet_presenter.rb | 2 +- gapic-generator/lib/gapic/schema/api.rb | 5 + .../default/service/client/method/_def.erb | 1 + .../service/client/method/docs/_snippets.erb | 6 + shared/Rakefile | 5 - shared/config/document_ai_v1beta3.yml | 9 - shared/config/vision_v1.yml | 1 + .../cloud/vision/v1/image_annotator/client.rb | 74 ++++ .../vision/v1/image_annotator/operations.rb | 73 ++++ .../cloud/vision/v1/product_search/client.rb | 323 ++++++++++++++++++ .../vision/v1/product_search/operations.rb | 73 ++++ .../async_batch_annotate_files.rb | 2 +- .../async_batch_annotate_images.rb | 2 +- .../image_annotator/batch_annotate_files.rb | 2 +- .../image_annotator/batch_annotate_images.rb | 2 +- .../add_product_to_product_set.rb | 2 +- .../snippets/product_search/create_product.rb | 2 +- .../product_search/create_product_set.rb | 2 +- .../product_search/create_reference_image.rb | 2 +- .../snippets/product_search/delete_product.rb | 2 +- .../product_search/delete_product_set.rb | 2 +- .../product_search/delete_reference_image.rb | 2 +- .../snippets/product_search/get_product.rb | 2 +- .../product_search/get_product_set.rb | 2 +- .../product_search/get_reference_image.rb | 2 +- .../product_search/import_product_sets.rb | 2 +- .../product_search/list_product_sets.rb | 2 +- .../snippets/product_search/list_products.rb | 2 +- .../list_products_in_product_set.rb | 2 +- .../product_search/list_reference_images.rb | 2 +- .../snippets/product_search/purge_products.rb | 2 +- .../remove_product_from_product_set.rb | 2 +- .../snippets/product_search/update_product.rb | 2 +- .../product_search/update_product_set.rb | 2 +- .../templates/showcase/snippets/echo/block.rb | 2 +- .../templates/showcase/snippets/echo/chat.rb | 2 +- .../showcase/snippets/echo/collect.rb | 2 +- .../templates/showcase/snippets/echo/echo.rb | 2 +- .../showcase/snippets/echo/expand.rb | 2 +- .../showcase/snippets/echo/paged_expand.rb | 2 +- .../templates/showcase/snippets/echo/wait.rb | 2 +- .../showcase/snippets/identity/create_user.rb | 2 +- .../showcase/snippets/identity/delete_user.rb | 2 +- .../showcase/snippets/identity/get_user.rb | 2 +- .../showcase/snippets/identity/list_users.rb | 2 +- .../showcase/snippets/identity/update_user.rb | 2 +- .../showcase/snippets/messaging/connect.rb | 2 +- .../snippets/messaging/create_blurb.rb | 2 +- .../snippets/messaging/create_room.rb | 2 +- .../snippets/messaging/delete_blurb.rb | 2 +- .../snippets/messaging/delete_room.rb | 2 +- .../showcase/snippets/messaging/get_blurb.rb | 2 +- .../showcase/snippets/messaging/get_room.rb | 2 +- .../snippets/messaging/list_blurbs.rb | 2 +- .../showcase/snippets/messaging/list_rooms.rb | 2 +- .../snippets/messaging/search_blurbs.rb | 2 +- .../snippets/messaging/send_blurbs.rb | 2 +- .../snippets/messaging/stream_blurbs.rb | 2 +- .../snippets/messaging/update_blurb.rb | 2 +- .../snippets/messaging/update_room.rb | 2 +- .../snippets/testing/create_session.rb | 2 +- .../snippets/testing/delete_session.rb | 2 +- .../showcase/snippets/testing/delete_test.rb | 2 +- .../showcase/snippets/testing/get_session.rb | 2 +- .../snippets/testing/list_sessions.rb | 2 +- .../showcase/snippets/testing/list_tests.rb | 2 +- .../snippets/testing/report_session.rb | 2 +- .../showcase/snippets/testing/verify_test.rb | 2 +- 72 files changed, 627 insertions(+), 82 deletions(-) create mode 100644 gapic-generator/templates/default/service/client/method/docs/_snippets.erb delete mode 100644 shared/config/document_ai_v1beta3.yml diff --git a/gapic-generator-cloud/Rakefile b/gapic-generator-cloud/Rakefile index e8b8d0b73..3018e57a0 100644 --- a/gapic-generator-cloud/Rakefile +++ b/gapic-generator-cloud/Rakefile @@ -85,11 +85,6 @@ namespace :gen do |gen_namespace| generate_cloud_templates :vision_v1 end - desc "Generate the expected output for document_ai_v1beta3" - task :document_ai_v1beta3 do - generate_cloud_templates :document_ai_v1beta3 - end - desc "Generate the expected output for noservice" task :noservice do generate_cloud_templates :noservice diff --git a/gapic-generator-cloud/lib/gapic/generators/cloud_generator_parameters.rb b/gapic-generator-cloud/lib/gapic/generators/cloud_generator_parameters.rb index 8cda76292..4e01bd960 100644 --- a/gapic-generator-cloud/lib/gapic/generators/cloud_generator_parameters.rb +++ b/gapic-generator-cloud/lib/gapic/generators/cloud_generator_parameters.rb @@ -21,10 +21,12 @@ module Generators # Contains the cloud generator's parameters module CloudGeneratorParameters BOOL_PARAMETERS_ALIASES = { - "ruby-cloud-free-tier" => ":gem.:free_tier", - "ruby-cloud-yard-strict" => ":gem.:yard_strict", - "ruby-cloud-generic-endpoint" => ":gem.:generic_endpoint", - "ruby-cloud-generate-metadata" => ":generate_metadata" + "ruby-cloud-free-tier" => ":gem.:free_tier", + "ruby-cloud-yard-strict" => ":gem.:yard_strict", + "ruby-cloud-generic-endpoint" => ":gem.:generic_endpoint", + "ruby-cloud-generate-metadata" => ":generate_metadata", + "ruby-cloud-generate-standalone-snippets" => ":generate_standalone_snippets", + "ruby-cloud-generate-yardoc-snippets" => ":generate_yardoc_snippets" }.freeze STRING_PARAMETERS_ALIASES = { diff --git a/gapic-generator/lib/gapic/generators/default_generator_parameters.rb b/gapic-generator/lib/gapic/generators/default_generator_parameters.rb index 4126ec01b..27eb52bba 100644 --- a/gapic-generator/lib/gapic/generators/default_generator_parameters.rb +++ b/gapic-generator/lib/gapic/generators/default_generator_parameters.rb @@ -24,7 +24,9 @@ module DefaultGeneratorParameters ":gem.:free_tier", ":gem.:yard_strict", ":gem.:generic_endpoint", - ":generate_metadata" + ":generate_metadata", + ":generate_standalone_snippets", + ":generate_yardoc_snippets" ].freeze STRING_PARAMETERS = [ diff --git a/gapic-generator/lib/gapic/presenters/method_presenter.rb b/gapic-generator/lib/gapic/presenters/method_presenter.rb index 244b792ec..85cf80c37 100644 --- a/gapic-generator/lib/gapic/presenters/method_presenter.rb +++ b/gapic-generator/lib/gapic/presenters/method_presenter.rb @@ -54,6 +54,10 @@ def snippet SnippetPresenter.new self, @api end + def generate_yardoc_snippets? + @api.generate_yardoc_snippets? + end + def name @name ||= begin candidate = ActiveSupport::Inflector.underscore @method.name diff --git a/gapic-generator/lib/gapic/presenters/snippet_presenter.rb b/gapic-generator/lib/gapic/presenters/snippet_presenter.rb index c57ff4110..0a8148bd8 100644 --- a/gapic-generator/lib/gapic/presenters/snippet_presenter.rb +++ b/gapic-generator/lib/gapic/presenters/snippet_presenter.rb @@ -52,7 +52,7 @@ def snippet_file_path end def require_path - @method_presenter.service.service_require + @method_presenter.service.package.package_require end def client_type diff --git a/gapic-generator/lib/gapic/schema/api.rb b/gapic-generator/lib/gapic/schema/api.rb index 580e20704..3a82e7e27 100644 --- a/gapic-generator/lib/gapic/schema/api.rb +++ b/gapic-generator/lib/gapic/schema/api.rb @@ -250,6 +250,11 @@ def generate_standalone_snippets? configuration[:generate_standalone_snippets] ||= false end + # Whether to generate inline documentation snippets + def generate_yardoc_snippets? + configuration[:generate_yardoc_snippets] ||= false + end + # Whether to generate gapic metadata (drift manifest) file # @return [Boolean] def generate_metadata diff --git a/gapic-generator/templates/default/service/client/method/_def.erb b/gapic-generator/templates/default/service/client/method/_def.erb index d6a30bef1..412149243 100644 --- a/gapic-generator/templates/default/service/client/method/_def.erb +++ b/gapic-generator/templates/default/service/client/method/_def.erb @@ -10,6 +10,7 @@ # <%= render partial: "service/client/method/docs/error", locals: { method: method } -%> # +<%= render partial: "service/client/method/docs/snippets", locals: { method: method } -%> <%= render partial: "service/client/method/docs/samples", locals: { method: method } -%> def <%= method.name %> request, options = nil <%= indent render(partial: "service/client/method/def/request", locals: { method: method }), 2 %> diff --git a/gapic-generator/templates/default/service/client/method/docs/_snippets.erb b/gapic-generator/templates/default/service/client/method/docs/_snippets.erb new file mode 100644 index 000000000..8d1f1a238 --- /dev/null +++ b/gapic-generator/templates/default/service/client/method/docs/_snippets.erb @@ -0,0 +1,6 @@ +<%- assert_locals method -%> +<%- if method.generate_yardoc_snippets? -%> +# @example Basic example +<%= indent render(partial: "snippets/snippet/structure", locals: { snippet: method.snippet }), "# " %> +# +<%- end -%> diff --git a/shared/Rakefile b/shared/Rakefile index daaaa1bdd..4e0f9fb86 100644 --- a/shared/Rakefile +++ b/shared/Rakefile @@ -59,11 +59,6 @@ namespace :gen do |gen_namespace| generate_input_file :vision_v1 end - desc "Generate the binary input files for document_ai v1beta3" - task :document_ai_v1beta3 do - generate_input_file :document_ai_v1beta3 - end - desc "Generate the binary input files for showcase" task :showcase do generate_input_file :showcase diff --git a/shared/config/document_ai_v1beta3.yml b/shared/config/document_ai_v1beta3.yml deleted file mode 100644 index 3854220f7..000000000 --- a/shared/config/document_ai_v1beta3.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -:gem: - :name: "google-cloud-document_ai-v1beta3" -:defaults: - :service: - :default_host: "documentai.googleapis.com" - :oauth_scopes: - - https://www.googleapis.com/auth/cloud-platform -:generate_metadata: false diff --git a/shared/config/vision_v1.yml b/shared/config/vision_v1.yml index cf7d43c5f..281c02dbe 100644 --- a/shared/config/vision_v1.yml +++ b/shared/config/vision_v1.yml @@ -12,3 +12,4 @@ - https://www.googleapis.com/auth/cloud-vision :generate_metadata: false :generate_standalone_snippets: true +:generate_yardoc_snippets: true diff --git a/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/image_annotator/client.rb b/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/image_annotator/client.rb index fd8e3face..577a53bb5 100644 --- a/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/image_annotator/client.rb +++ b/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/image_annotator/client.rb @@ -206,6 +206,21 @@ def initialize # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::BatchAnnotateImagesRequest.new + # + # # Call the batch_annotate_images method. + # result = client.batch_annotate_images request + # + # # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateImagesResponse. + # p result + # def batch_annotate_images request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -286,6 +301,21 @@ def batch_annotate_images request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::BatchAnnotateFilesRequest.new + # + # # Call the batch_annotate_files method. + # result = client.batch_annotate_files request + # + # # The returned object is of type Google::Cloud::Vision::V1::BatchAnnotateFilesResponse. + # p result + # def batch_annotate_files request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -369,6 +399,28 @@ def batch_annotate_files request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::AsyncBatchAnnotateImagesRequest.new + # + # # Call the async_batch_annotate_images method. + # result = client.async_batch_annotate_images request + # + # # The returned object is of type Gapic::Operation. You can use this + # # object to check the status of an operation, cancel it, or wait + # # for results. Here is how to block until completion: + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "Error!" + # end + # def async_batch_annotate_images request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -448,6 +500,28 @@ def async_batch_annotate_images request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::AsyncBatchAnnotateFilesRequest.new + # + # # Call the async_batch_annotate_files method. + # result = client.async_batch_annotate_files request + # + # # The returned object is of type Gapic::Operation. You can use this + # # object to check the status of an operation, cancel it, or wait + # # for results. Here is how to block until completion: + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "Error!" + # end + # def async_batch_annotate_files request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? diff --git a/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/image_annotator/operations.rb b/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/image_annotator/operations.rb index 5eceec9fa..56d1025d3 100644 --- a/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/image_annotator/operations.rb +++ b/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/image_annotator/operations.rb @@ -138,6 +138,27 @@ def initialize # # @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 all elements by calling #each, and the enumerable + # # will lazily make API calls to fetch subsequent pages. Other + # # methods are also available for managing paging directly. + # result.each do |response| + # # Each element is of type ::Google::Longrunning::Operation. + # p response + # end + # def list_operations request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -208,6 +229,28 @@ def list_operations request, options = nil # # @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 this + # # object to check the status of an operation, cancel it, or wait + # # for results. Here is how to block until completion: + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "Error!" + # end + # def get_operation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -278,6 +321,21 @@ def get_operation request, options = nil # # @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? @@ -353,6 +411,21 @@ def delete_operation request, options = nil # # @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? diff --git a/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/product_search/client.rb b/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/product_search/client.rb index c3375f4f4..2db0ed0e6 100644 --- a/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/product_search/client.rb +++ b/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/product_search/client.rb @@ -218,6 +218,21 @@ def initialize # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::CreateProductSetRequest.new + # + # # Call the create_product_set method. + # result = client.create_product_set request + # + # # The returned object is of type Google::Cloud::Vision::V1::ProductSet. + # p result + # def create_product_set request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -295,6 +310,27 @@ def create_product_set request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::ListProductSetsRequest.new + # + # # Call the list_product_sets method. + # result = client.list_product_sets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can + # # iterate over all elements by calling #each, and the enumerable + # # will lazily make API calls to fetch subsequent pages. Other + # # methods are also available for managing paging directly. + # result.each do |response| + # # Each element is of type ::Google::Cloud::Vision::V1::ProductSet. + # p response + # end + # def list_product_sets request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -369,6 +405,21 @@ def list_product_sets request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::GetProductSetRequest.new + # + # # Call the get_product_set method. + # result = client.get_product_set request + # + # # The returned object is of type Google::Cloud::Vision::V1::ProductSet. + # p result + # def get_product_set request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -447,6 +498,21 @@ def get_product_set request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::UpdateProductSetRequest.new + # + # # Call the update_product_set method. + # result = client.update_product_set request + # + # # The returned object is of type Google::Cloud::Vision::V1::ProductSet. + # p result + # def update_product_set request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -519,6 +585,21 @@ def update_product_set request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::DeleteProductSetRequest.new + # + # # Call the delete_product_set method. + # result = client.delete_product_set request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # def delete_product_set request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -602,6 +683,21 @@ def delete_product_set request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::CreateProductRequest.new + # + # # Call the create_product method. + # result = client.create_product request + # + # # The returned object is of type Google::Cloud::Vision::V1::Product. + # p result + # def create_product request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -679,6 +775,27 @@ def create_product request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::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 all elements by calling #each, and the enumerable + # # will lazily make API calls to fetch subsequent pages. Other + # # methods are also available for managing paging directly. + # result.each do |response| + # # Each element is of type ::Google::Cloud::Vision::V1::Product. + # p response + # end + # def list_products request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -753,6 +870,21 @@ def list_products request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::GetProductRequest.new + # + # # Call the get_product method. + # result = client.get_product request + # + # # The returned object is of type Google::Cloud::Vision::V1::Product. + # p result + # def get_product request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -840,6 +972,21 @@ def get_product request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::UpdateProductRequest.new + # + # # Call the update_product method. + # result = client.update_product request + # + # # The returned object is of type Google::Cloud::Vision::V1::Product. + # p result + # def update_product request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -913,6 +1060,21 @@ def update_product request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::DeleteProductRequest.new + # + # # Call the delete_product method. + # result = client.delete_product request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # def delete_product request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1008,6 +1170,21 @@ def delete_product request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::CreateReferenceImageRequest.new + # + # # Call the create_reference_image method. + # result = client.create_reference_image request + # + # # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage. + # p result + # def create_reference_image request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1084,6 +1261,21 @@ def create_reference_image request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new + # + # # Call the delete_reference_image method. + # result = client.delete_reference_image request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # def delete_reference_image request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1166,6 +1358,27 @@ def delete_reference_image request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::ListReferenceImagesRequest.new + # + # # Call the list_reference_images method. + # result = client.list_reference_images request + # + # # The returned object is of type Gapic::PagedEnumerable. You can + # # iterate over all elements by calling #each, and the enumerable + # # will lazily make API calls to fetch subsequent pages. Other + # # methods are also available for managing paging directly. + # result.each do |response| + # # Each element is of type ::Google::Cloud::Vision::V1::ReferenceImage. + # p response + # end + # def list_reference_images request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1241,6 +1454,21 @@ def list_reference_images request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::GetReferenceImageRequest.new + # + # # Call the get_reference_image method. + # result = client.get_reference_image request + # + # # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage. + # p result + # def get_reference_image request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1322,6 +1550,21 @@ def get_reference_image request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::AddProductToProductSetRequest.new + # + # # Call the add_product_to_product_set method. + # result = client.add_product_to_product_set request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # def add_product_to_product_set request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1396,6 +1639,21 @@ def add_product_to_product_set request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new + # + # # Call the remove_product_from_product_set method. + # result = client.remove_product_from_product_set request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # def remove_product_from_product_set request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1475,6 +1733,27 @@ def remove_product_from_product_set request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new + # + # # Call the list_products_in_product_set method. + # result = client.list_products_in_product_set request + # + # # The returned object is of type Gapic::PagedEnumerable. You can + # # iterate over all elements by calling #each, and the enumerable + # # will lazily make API calls to fetch subsequent pages. Other + # # methods are also available for managing paging directly. + # result.each do |response| + # # Each element is of type ::Google::Cloud::Vision::V1::Product. + # p response + # end + # def list_products_in_product_set request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1556,6 +1835,28 @@ def list_products_in_product_set request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::ImportProductSetsRequest.new + # + # # Call the import_product_sets method. + # result = client.import_product_sets request + # + # # The returned object is of type Gapic::Operation. You can use this + # # object to check the status of an operation, cancel it, or wait + # # for results. Here is how to block until completion: + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "Error!" + # end + # def import_product_sets request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1656,6 +1957,28 @@ def import_product_sets request, options = nil # # @raise [::Google::Cloud::Error] if the RPC is aborted. # + # @example Basic example + # require "google/cloud/vision/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Vision::V1::ProductSearch::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Vision::V1::PurgeProductsRequest.new + # + # # Call the purge_products method. + # result = client.purge_products request + # + # # The returned object is of type Gapic::Operation. You can use this + # # object to check the status of an operation, cancel it, or wait + # # for results. Here is how to block until completion: + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "Error!" + # end + # def purge_products request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? diff --git a/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/product_search/operations.rb b/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/product_search/operations.rb index 4203ec388..e9f8dc919 100644 --- a/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/product_search/operations.rb +++ b/shared/output/cloud/vision_v1/lib/google/cloud/vision/v1/product_search/operations.rb @@ -138,6 +138,27 @@ def initialize # # @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 all elements by calling #each, and the enumerable + # # will lazily make API calls to fetch subsequent pages. Other + # # methods are also available for managing paging directly. + # result.each do |response| + # # Each element is of type ::Google::Longrunning::Operation. + # p response + # end + # def list_operations request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -208,6 +229,28 @@ def list_operations request, options = nil # # @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 this + # # object to check the status of an operation, cancel it, or wait + # # for results. Here is how to block until completion: + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "Error!" + # end + # def get_operation request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -278,6 +321,21 @@ def get_operation request, options = nil # # @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? @@ -353,6 +411,21 @@ def delete_operation request, options = nil # # @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? diff --git a/shared/output/cloud/vision_v1/snippets/image_annotator/async_batch_annotate_files.rb b/shared/output/cloud/vision_v1/snippets/image_annotator/async_batch_annotate_files.rb index 811963704..e10e0da7f 100644 --- a/shared/output/cloud/vision_v1/snippets/image_annotator/async_batch_annotate_files.rb +++ b/shared/output/cloud/vision_v1/snippets/image_annotator/async_batch_annotate_files.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] -require "google/cloud/vision/v1/image_annotator" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/image_annotator/async_batch_annotate_images.rb b/shared/output/cloud/vision_v1/snippets/image_annotator/async_batch_annotate_images.rb index bd66188b3..d9dc63537 100644 --- a/shared/output/cloud/vision_v1/snippets/image_annotator/async_batch_annotate_images.rb +++ b/shared/output/cloud/vision_v1/snippets/image_annotator/async_batch_annotate_images.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync] -require "google/cloud/vision/v1/image_annotator" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/image_annotator/batch_annotate_files.rb b/shared/output/cloud/vision_v1/snippets/image_annotator/batch_annotate_files.rb index 0f3ada8a2..9f01f63cd 100644 --- a/shared/output/cloud/vision_v1/snippets/image_annotator/batch_annotate_files.rb +++ b/shared/output/cloud/vision_v1/snippets/image_annotator/batch_annotate_files.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync] -require "google/cloud/vision/v1/image_annotator" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/image_annotator/batch_annotate_images.rb b/shared/output/cloud/vision_v1/snippets/image_annotator/batch_annotate_images.rb index f8fe49a14..c882169bd 100644 --- a/shared/output/cloud/vision_v1/snippets/image_annotator/batch_annotate_images.rb +++ b/shared/output/cloud/vision_v1/snippets/image_annotator/batch_annotate_images.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync] -require "google/cloud/vision/v1/image_annotator" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ImageAnnotator::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/add_product_to_product_set.rb b/shared/output/cloud/vision_v1/snippets/product_search/add_product_to_product_set.rb index fb2ac3548..edc36b4ef 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/add_product_to_product_set.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/add_product_to_product_set.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_AddProductToProductSet_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/create_product.rb b/shared/output/cloud/vision_v1/snippets/product_search/create_product.rb index cbfb51a82..bea86ba35 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/create_product.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/create_product.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_CreateProduct_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/create_product_set.rb b/shared/output/cloud/vision_v1/snippets/product_search/create_product_set.rb index 88b4251b8..146060192 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/create_product_set.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/create_product_set.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_CreateProductSet_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/create_reference_image.rb b/shared/output/cloud/vision_v1/snippets/product_search/create_reference_image.rb index f8db0431c..3cf3e25af 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/create_reference_image.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/create_reference_image.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_CreateReferenceImage_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/delete_product.rb b/shared/output/cloud/vision_v1/snippets/product_search/delete_product.rb index 473f42740..9b568b3cb 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/delete_product.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/delete_product.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_DeleteProduct_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/delete_product_set.rb b/shared/output/cloud/vision_v1/snippets/product_search/delete_product_set.rb index 1aad565dc..8f41a82f9 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/delete_product_set.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/delete_product_set.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_DeleteProductSet_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/delete_reference_image.rb b/shared/output/cloud/vision_v1/snippets/product_search/delete_reference_image.rb index 328d29453..4d5a03874 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/delete_reference_image.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/delete_reference_image.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_DeleteReferenceImage_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/get_product.rb b/shared/output/cloud/vision_v1/snippets/product_search/get_product.rb index 96cf2dfe2..677e970d0 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/get_product.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/get_product.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_GetProduct_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/get_product_set.rb b/shared/output/cloud/vision_v1/snippets/product_search/get_product_set.rb index 19c94faf1..1073b1949 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/get_product_set.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/get_product_set.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_GetProductSet_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/get_reference_image.rb b/shared/output/cloud/vision_v1/snippets/product_search/get_reference_image.rb index d8e5b710f..e959b83c1 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/get_reference_image.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/get_reference_image.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_GetReferenceImage_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/import_product_sets.rb b/shared/output/cloud/vision_v1/snippets/product_search/import_product_sets.rb index 397c9323a..5d03c19bd 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/import_product_sets.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/import_product_sets.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_ImportProductSets_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/list_product_sets.rb b/shared/output/cloud/vision_v1/snippets/product_search/list_product_sets.rb index 72db389ab..0ac4b0224 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/list_product_sets.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/list_product_sets.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_ListProductSets_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/list_products.rb b/shared/output/cloud/vision_v1/snippets/product_search/list_products.rb index af21ff102..d967fe63e 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/list_products.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/list_products.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_ListProducts_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/list_products_in_product_set.rb b/shared/output/cloud/vision_v1/snippets/product_search/list_products_in_product_set.rb index e0d0b9918..460e431a5 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/list_products_in_product_set.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/list_products_in_product_set.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_ListProductsInProductSet_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/list_reference_images.rb b/shared/output/cloud/vision_v1/snippets/product_search/list_reference_images.rb index 09fe934ed..d2fcfaed8 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/list_reference_images.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/list_reference_images.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_ListReferenceImages_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/purge_products.rb b/shared/output/cloud/vision_v1/snippets/product_search/purge_products.rb index cc11a26e0..434839b71 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/purge_products.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/purge_products.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_PurgeProducts_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/remove_product_from_product_set.rb b/shared/output/cloud/vision_v1/snippets/product_search/remove_product_from_product_set.rb index c5c83b61b..17151496b 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/remove_product_from_product_set.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/remove_product_from_product_set.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/update_product.rb b/shared/output/cloud/vision_v1/snippets/product_search/update_product.rb index 6522cadce..de7bf26bc 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/update_product.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/update_product.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_UpdateProduct_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/cloud/vision_v1/snippets/product_search/update_product_set.rb b/shared/output/cloud/vision_v1/snippets/product_search/update_product_set.rb index 4bed826ac..b37e14acd 100644 --- a/shared/output/cloud/vision_v1/snippets/product_search/update_product_set.rb +++ b/shared/output/cloud/vision_v1/snippets/product_search/update_product_set.rb @@ -17,7 +17,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START vision_v1_generated_ProductSearch_UpdateProductSet_sync] -require "google/cloud/vision/v1/product_search" +require "google/cloud/vision/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Vision::V1::ProductSearch::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/echo/block.rb b/shared/output/gapic/templates/showcase/snippets/echo/block.rb index befa8f5e5..7333ed4d0 100644 --- a/shared/output/gapic/templates/showcase/snippets/echo/block.rb +++ b/shared/output/gapic/templates/showcase/snippets/echo/block.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Echo_Block_sync] -require "google/showcase/v1beta1/echo" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Echo::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/echo/chat.rb b/shared/output/gapic/templates/showcase/snippets/echo/chat.rb index 12477a4d4..97a376cc3 100644 --- a/shared/output/gapic/templates/showcase/snippets/echo/chat.rb +++ b/shared/output/gapic/templates/showcase/snippets/echo/chat.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Echo_Chat_sync] -require "google/showcase/v1beta1/echo" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Echo::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/echo/collect.rb b/shared/output/gapic/templates/showcase/snippets/echo/collect.rb index 289c001b7..49f43acb6 100644 --- a/shared/output/gapic/templates/showcase/snippets/echo/collect.rb +++ b/shared/output/gapic/templates/showcase/snippets/echo/collect.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Echo_Collect_sync] -require "google/showcase/v1beta1/echo" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Echo::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/echo/echo.rb b/shared/output/gapic/templates/showcase/snippets/echo/echo.rb index 8cd4b9f7e..1571ca2be 100644 --- a/shared/output/gapic/templates/showcase/snippets/echo/echo.rb +++ b/shared/output/gapic/templates/showcase/snippets/echo/echo.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Echo_Echo_sync] -require "google/showcase/v1beta1/echo" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Echo::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/echo/expand.rb b/shared/output/gapic/templates/showcase/snippets/echo/expand.rb index 33a9d9fcf..3982a433f 100644 --- a/shared/output/gapic/templates/showcase/snippets/echo/expand.rb +++ b/shared/output/gapic/templates/showcase/snippets/echo/expand.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Echo_Expand_sync] -require "google/showcase/v1beta1/echo" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Echo::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/echo/paged_expand.rb b/shared/output/gapic/templates/showcase/snippets/echo/paged_expand.rb index 01d994051..e77fd5430 100644 --- a/shared/output/gapic/templates/showcase/snippets/echo/paged_expand.rb +++ b/shared/output/gapic/templates/showcase/snippets/echo/paged_expand.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Echo_PagedExpand_sync] -require "google/showcase/v1beta1/echo" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Echo::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/echo/wait.rb b/shared/output/gapic/templates/showcase/snippets/echo/wait.rb index 8bb0a59ca..1d45dcab7 100644 --- a/shared/output/gapic/templates/showcase/snippets/echo/wait.rb +++ b/shared/output/gapic/templates/showcase/snippets/echo/wait.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Echo_Wait_sync] -require "google/showcase/v1beta1/echo" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Echo::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/identity/create_user.rb b/shared/output/gapic/templates/showcase/snippets/identity/create_user.rb index a2fd0f347..135c1a904 100644 --- a/shared/output/gapic/templates/showcase/snippets/identity/create_user.rb +++ b/shared/output/gapic/templates/showcase/snippets/identity/create_user.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Identity_CreateUser_sync] -require "google/showcase/v1beta1/identity" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Identity::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/identity/delete_user.rb b/shared/output/gapic/templates/showcase/snippets/identity/delete_user.rb index becb9254d..35d70f0d1 100644 --- a/shared/output/gapic/templates/showcase/snippets/identity/delete_user.rb +++ b/shared/output/gapic/templates/showcase/snippets/identity/delete_user.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Identity_DeleteUser_sync] -require "google/showcase/v1beta1/identity" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Identity::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/identity/get_user.rb b/shared/output/gapic/templates/showcase/snippets/identity/get_user.rb index ab5b7b642..ebe200769 100644 --- a/shared/output/gapic/templates/showcase/snippets/identity/get_user.rb +++ b/shared/output/gapic/templates/showcase/snippets/identity/get_user.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Identity_GetUser_sync] -require "google/showcase/v1beta1/identity" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Identity::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/identity/list_users.rb b/shared/output/gapic/templates/showcase/snippets/identity/list_users.rb index b678fbefc..bc61ffb65 100644 --- a/shared/output/gapic/templates/showcase/snippets/identity/list_users.rb +++ b/shared/output/gapic/templates/showcase/snippets/identity/list_users.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Identity_ListUsers_sync] -require "google/showcase/v1beta1/identity" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Identity::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/identity/update_user.rb b/shared/output/gapic/templates/showcase/snippets/identity/update_user.rb index 50182d20d..f75515c14 100644 --- a/shared/output/gapic/templates/showcase/snippets/identity/update_user.rb +++ b/shared/output/gapic/templates/showcase/snippets/identity/update_user.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Identity_UpdateUser_sync] -require "google/showcase/v1beta1/identity" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Identity::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/messaging/connect.rb b/shared/output/gapic/templates/showcase/snippets/messaging/connect.rb index 0e977ce76..9e0b37df9 100644 --- a/shared/output/gapic/templates/showcase/snippets/messaging/connect.rb +++ b/shared/output/gapic/templates/showcase/snippets/messaging/connect.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Messaging_Connect_sync] -require "google/showcase/v1beta1/messaging" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Messaging::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/messaging/create_blurb.rb b/shared/output/gapic/templates/showcase/snippets/messaging/create_blurb.rb index 741c1a537..771adaec0 100644 --- a/shared/output/gapic/templates/showcase/snippets/messaging/create_blurb.rb +++ b/shared/output/gapic/templates/showcase/snippets/messaging/create_blurb.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Messaging_CreateBlurb_sync] -require "google/showcase/v1beta1/messaging" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Messaging::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/messaging/create_room.rb b/shared/output/gapic/templates/showcase/snippets/messaging/create_room.rb index d1bb2f59d..b47652ec7 100644 --- a/shared/output/gapic/templates/showcase/snippets/messaging/create_room.rb +++ b/shared/output/gapic/templates/showcase/snippets/messaging/create_room.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Messaging_CreateRoom_sync] -require "google/showcase/v1beta1/messaging" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Messaging::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/messaging/delete_blurb.rb b/shared/output/gapic/templates/showcase/snippets/messaging/delete_blurb.rb index 03d539704..c6684dc5f 100644 --- a/shared/output/gapic/templates/showcase/snippets/messaging/delete_blurb.rb +++ b/shared/output/gapic/templates/showcase/snippets/messaging/delete_blurb.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Messaging_DeleteBlurb_sync] -require "google/showcase/v1beta1/messaging" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Messaging::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/messaging/delete_room.rb b/shared/output/gapic/templates/showcase/snippets/messaging/delete_room.rb index 2f19dd7a4..cf0585da2 100644 --- a/shared/output/gapic/templates/showcase/snippets/messaging/delete_room.rb +++ b/shared/output/gapic/templates/showcase/snippets/messaging/delete_room.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Messaging_DeleteRoom_sync] -require "google/showcase/v1beta1/messaging" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Messaging::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/messaging/get_blurb.rb b/shared/output/gapic/templates/showcase/snippets/messaging/get_blurb.rb index 82fce736e..3435d66ee 100644 --- a/shared/output/gapic/templates/showcase/snippets/messaging/get_blurb.rb +++ b/shared/output/gapic/templates/showcase/snippets/messaging/get_blurb.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Messaging_GetBlurb_sync] -require "google/showcase/v1beta1/messaging" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Messaging::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/messaging/get_room.rb b/shared/output/gapic/templates/showcase/snippets/messaging/get_room.rb index a850eb079..5d89a13f9 100644 --- a/shared/output/gapic/templates/showcase/snippets/messaging/get_room.rb +++ b/shared/output/gapic/templates/showcase/snippets/messaging/get_room.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Messaging_GetRoom_sync] -require "google/showcase/v1beta1/messaging" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Messaging::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/messaging/list_blurbs.rb b/shared/output/gapic/templates/showcase/snippets/messaging/list_blurbs.rb index 251bba574..c5f089800 100644 --- a/shared/output/gapic/templates/showcase/snippets/messaging/list_blurbs.rb +++ b/shared/output/gapic/templates/showcase/snippets/messaging/list_blurbs.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Messaging_ListBlurbs_sync] -require "google/showcase/v1beta1/messaging" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Messaging::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/messaging/list_rooms.rb b/shared/output/gapic/templates/showcase/snippets/messaging/list_rooms.rb index 77ccb622f..387b3e1ab 100644 --- a/shared/output/gapic/templates/showcase/snippets/messaging/list_rooms.rb +++ b/shared/output/gapic/templates/showcase/snippets/messaging/list_rooms.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Messaging_ListRooms_sync] -require "google/showcase/v1beta1/messaging" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Messaging::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/messaging/search_blurbs.rb b/shared/output/gapic/templates/showcase/snippets/messaging/search_blurbs.rb index 91cd200c1..cffc9e597 100644 --- a/shared/output/gapic/templates/showcase/snippets/messaging/search_blurbs.rb +++ b/shared/output/gapic/templates/showcase/snippets/messaging/search_blurbs.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Messaging_SearchBlurbs_sync] -require "google/showcase/v1beta1/messaging" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Messaging::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/messaging/send_blurbs.rb b/shared/output/gapic/templates/showcase/snippets/messaging/send_blurbs.rb index d4c2ce8fb..42dd87296 100644 --- a/shared/output/gapic/templates/showcase/snippets/messaging/send_blurbs.rb +++ b/shared/output/gapic/templates/showcase/snippets/messaging/send_blurbs.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Messaging_SendBlurbs_sync] -require "google/showcase/v1beta1/messaging" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Messaging::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/messaging/stream_blurbs.rb b/shared/output/gapic/templates/showcase/snippets/messaging/stream_blurbs.rb index 487b22f2a..2a3b956bf 100644 --- a/shared/output/gapic/templates/showcase/snippets/messaging/stream_blurbs.rb +++ b/shared/output/gapic/templates/showcase/snippets/messaging/stream_blurbs.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Messaging_StreamBlurbs_sync] -require "google/showcase/v1beta1/messaging" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Messaging::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/messaging/update_blurb.rb b/shared/output/gapic/templates/showcase/snippets/messaging/update_blurb.rb index 878ec4af9..b3e1c25b3 100644 --- a/shared/output/gapic/templates/showcase/snippets/messaging/update_blurb.rb +++ b/shared/output/gapic/templates/showcase/snippets/messaging/update_blurb.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Messaging_UpdateBlurb_sync] -require "google/showcase/v1beta1/messaging" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Messaging::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/messaging/update_room.rb b/shared/output/gapic/templates/showcase/snippets/messaging/update_room.rb index 191b3acc0..55663027e 100644 --- a/shared/output/gapic/templates/showcase/snippets/messaging/update_room.rb +++ b/shared/output/gapic/templates/showcase/snippets/messaging/update_room.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Messaging_UpdateRoom_sync] -require "google/showcase/v1beta1/messaging" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Messaging::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/testing/create_session.rb b/shared/output/gapic/templates/showcase/snippets/testing/create_session.rb index 87856c967..703afd4b4 100644 --- a/shared/output/gapic/templates/showcase/snippets/testing/create_session.rb +++ b/shared/output/gapic/templates/showcase/snippets/testing/create_session.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Testing_CreateSession_sync] -require "google/showcase/v1beta1/testing" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Testing::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/testing/delete_session.rb b/shared/output/gapic/templates/showcase/snippets/testing/delete_session.rb index 0165e897d..790e27eed 100644 --- a/shared/output/gapic/templates/showcase/snippets/testing/delete_session.rb +++ b/shared/output/gapic/templates/showcase/snippets/testing/delete_session.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Testing_DeleteSession_sync] -require "google/showcase/v1beta1/testing" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Testing::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/testing/delete_test.rb b/shared/output/gapic/templates/showcase/snippets/testing/delete_test.rb index 487b67bbd..db7e72308 100644 --- a/shared/output/gapic/templates/showcase/snippets/testing/delete_test.rb +++ b/shared/output/gapic/templates/showcase/snippets/testing/delete_test.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Testing_DeleteTest_sync] -require "google/showcase/v1beta1/testing" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Testing::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/testing/get_session.rb b/shared/output/gapic/templates/showcase/snippets/testing/get_session.rb index 4137e3015..3e6ac7183 100644 --- a/shared/output/gapic/templates/showcase/snippets/testing/get_session.rb +++ b/shared/output/gapic/templates/showcase/snippets/testing/get_session.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Testing_GetSession_sync] -require "google/showcase/v1beta1/testing" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Testing::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/testing/list_sessions.rb b/shared/output/gapic/templates/showcase/snippets/testing/list_sessions.rb index 2cb35b29e..45dbfc6f4 100644 --- a/shared/output/gapic/templates/showcase/snippets/testing/list_sessions.rb +++ b/shared/output/gapic/templates/showcase/snippets/testing/list_sessions.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Testing_ListSessions_sync] -require "google/showcase/v1beta1/testing" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Testing::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/testing/list_tests.rb b/shared/output/gapic/templates/showcase/snippets/testing/list_tests.rb index 56a4d477f..92d23265d 100644 --- a/shared/output/gapic/templates/showcase/snippets/testing/list_tests.rb +++ b/shared/output/gapic/templates/showcase/snippets/testing/list_tests.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Testing_ListTests_sync] -require "google/showcase/v1beta1/testing" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Testing::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/testing/report_session.rb b/shared/output/gapic/templates/showcase/snippets/testing/report_session.rb index 4adc05d12..e7388fde8 100644 --- a/shared/output/gapic/templates/showcase/snippets/testing/report_session.rb +++ b/shared/output/gapic/templates/showcase/snippets/testing/report_session.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Testing_ReportSession_sync] -require "google/showcase/v1beta1/testing" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Testing::Client.new diff --git a/shared/output/gapic/templates/showcase/snippets/testing/verify_test.rb b/shared/output/gapic/templates/showcase/snippets/testing/verify_test.rb index 8443dbbf8..369515d07 100644 --- a/shared/output/gapic/templates/showcase/snippets/testing/verify_test.rb +++ b/shared/output/gapic/templates/showcase/snippets/testing/verify_test.rb @@ -25,7 +25,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! # [START showcase_v0_generated_Testing_VerifyTest_sync] -require "google/showcase/v1beta1/testing" +require "google/showcase/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Showcase::V1beta1::Testing::Client.new