module Google::Cloud::Vision::V1p4beta1::ProductSearch::Paths

Path helper methods for the ProductSearch API.

Public Instance Methods

location_path(project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

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]

# 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: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

Create a fully-qualified Product resource string.

The resource will be in the following format:

‘projects/{project}/locations/{location}/products/{product}`

@param project [String] @param location [String] @param product [String]

@return [::String]

# 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: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

Create a fully-qualified ProductSet resource string.

The resource will be in the following format:

‘projects/{project}/locations/{location}/productSets/{product_set}`

@param project [String] @param location [String] @param product_set [String]

@return [::String]

# 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: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

Create a fully-qualified ReferenceImage resource string.

The resource will be in the following format:

‘projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}`

@param project [String] @param location [String] @param product [String] @param reference_image [String]

@return [::String]

# 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