Module: Google::Cloud::Retail::V2::CatalogService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/retail/v2/catalog_service/paths.rb

Overview

Path helper methods for the CatalogService API.

Instance Method Summary collapse

Instance Method Details

#attributes_config_path(project:, location:, catalog:) ⇒ ::String

Create a fully-qualified AttributesConfig resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/catalogs/{catalog}/attributesConfig

Parameters:

  • project (String)
  • location (String)
  • catalog (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
44
# File 'lib/google/cloud/retail/v2/catalog_service/paths.rb', line 39

def attributes_config_path project:, location:, catalog:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/catalogs/#{catalog}/attributesConfig"
end

#branch_path(project:, location:, catalog:, branch:) ⇒ ::String

Create a fully-qualified Branch resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/catalogs/{catalog}/branches/{branch}

Parameters:

  • project (String)
  • location (String)
  • catalog (String)
  • branch (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


59
60
61
62
63
64
65
# File 'lib/google/cloud/retail/v2/catalog_service/paths.rb', line 59

def branch_path project:, location:, catalog:, branch:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "catalog cannot contain /" if catalog.to_s.include? "/"

  "projects/#{project}/locations/#{location}/catalogs/#{catalog}/branches/#{branch}"
end

#catalog_path(project:, location:, catalog:) ⇒ ::String

Create a fully-qualified Catalog resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/catalogs/{catalog}

Parameters:

  • project (String)
  • location (String)
  • catalog (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


79
80
81
82
83
84
# File 'lib/google/cloud/retail/v2/catalog_service/paths.rb', line 79

def catalog_path project:, location:, catalog:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/catalogs/#{catalog}"
end

#completion_config_path(project:, location:, catalog:) ⇒ ::String

Create a fully-qualified CompletionConfig resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/catalogs/{catalog}/completionConfig

Parameters:

  • project (String)
  • location (String)
  • catalog (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


98
99
100
101
102
103
# File 'lib/google/cloud/retail/v2/catalog_service/paths.rb', line 98

def completion_config_path project:, location:, catalog:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/catalogs/#{catalog}/completionConfig"
end

#location_path(project:, location:) ⇒ ::String

Create a fully-qualified Location resource string.

The resource will be in the following format:

projects/{project}/locations/{location}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


116
117
118
119
120
# File 'lib/google/cloud/retail/v2/catalog_service/paths.rb', line 116

def location_path project:, location:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/locations/#{location}"
end