Module: Google::Cloud::Vision::V1p4beta1::ProductSearch::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/vision/v1p4beta1/product_search/paths.rb
Overview
Path helper methods for the ProductSearch API.
Instance Method Summary collapse
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#product_path(project:, location:, product:) ⇒ ::String
Create a fully-qualified Product resource string.
-
#product_set_path(project:, location:, product_set:) ⇒ ::String
Create a fully-qualified ProductSet resource string.
-
#reference_image_path(project:, location:, product:, reference_image:) ⇒ ::String
Create a fully-qualified ReferenceImage resource string.
Instance Method Details
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
The resource will be in the following format:
projects/{project}/locations/{location}
38 39 40 41 42 |
# File 'lib/google/cloud/vision/v1p4beta1/product_search/paths.rb', line 38 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#product_path(project:, location:, product:) ⇒ ::String
Create a fully-qualified Product resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/products/{product}
56 57 58 59 60 61 |
# File 'lib/google/cloud/vision/v1p4beta1/product_search/paths.rb', line 56 def product_path project:, location:, product: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/products/#{product}" end |
#product_set_path(project:, location:, product_set:) ⇒ ::String
Create a fully-qualified ProductSet resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/productSets/{product_set}
75 76 77 78 79 80 |
# File 'lib/google/cloud/vision/v1p4beta1/product_search/paths.rb', line 75 def product_set_path project:, location:, product_set: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/productSets/#{product_set}" end |
#reference_image_path(project:, location:, product:, reference_image:) ⇒ ::String
Create a fully-qualified ReferenceImage resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}
95 96 97 98 99 100 101 |
# File 'lib/google/cloud/vision/v1p4beta1/product_search/paths.rb', line 95 def reference_image_path project:, location:, product:, reference_image: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/" "projects/#{project}/locations/#{location}/products/#{product}/referenceImages/#{reference_image}" end |