Module: Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/paths.rb

Overview

Path helper methods for the CloudProductRegistryReadService API.

Instance Method Summary collapse

Instance Method Details

#logical_product_path(logical_product:) ⇒ ::String

Create a fully-qualified LogicalProduct resource string.

The resource will be in the following format:

logicalProducts/{logical_product}

Parameters:

  • logical_product (String)

Returns:

  • (::String)


37
38
39
# File 'lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/paths.rb', line 37

def logical_product_path logical_product:
  "logicalProducts/#{logical_product}"
end

#logical_product_variant_path(logical_product:, variant:) ⇒ ::String

Create a fully-qualified LogicalProductVariant resource string.

The resource will be in the following format:

logicalProducts/{logical_product}/variants/{variant}

Parameters:

  • logical_product (String)
  • variant (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


52
53
54
55
56
# File 'lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/paths.rb', line 52

def logical_product_variant_path logical_product:, variant:
  raise ::ArgumentError, "logical_product cannot contain /" if logical_product.to_s.include? "/"

  "logicalProducts/#{logical_product}/variants/#{variant}"
end

#product_suite_path(product_suite:) ⇒ ::String

Create a fully-qualified ProductSuite resource string.

The resource will be in the following format:

productSuites/{product_suite}

Parameters:

  • product_suite (String)

Returns:

  • (::String)


68
69
70
# File 'lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/paths.rb', line 68

def product_suite_path product_suite:
  "productSuites/#{product_suite}"
end