Module: Google::Cloud::AIPlatform::V1::FeaturestoreService::Paths

Extended by:
Paths
Included in:
Client, Paths
Defined in:
lib/google/cloud/ai_platform/v1/featurestore_service/paths.rb

Overview

Path helper methods for the FeaturestoreService API.

Instance Method Summary collapse

Instance Method Details

#entity_type_path(project:, location:, featurestore:, entity_type:) ⇒ ::String

Create a fully-qualified EntityType resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}

Parameters:

  • project (String)
  • location (String)
  • featurestore (String)
  • entity_type (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


40
41
42
43
44
45
46
# File 'lib/google/cloud/ai_platform/v1/featurestore_service/paths.rb', line 40

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

  "projects/#{project}/locations/#{location}/featurestores/#{featurestore}/entityTypes/#{entity_type}"
end

#feature_path(project:, location:, featurestore:, entity_type:, feature:) ⇒ ::String

Create a fully-qualified Feature resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}

Parameters:

  • project (String)
  • location (String)
  • featurestore (String)
  • entity_type (String)
  • feature (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


62
63
64
65
66
67
68
69
# File 'lib/google/cloud/ai_platform/v1/featurestore_service/paths.rb', line 62

def feature_path project:, location:, featurestore:, entity_type:, feature:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "featurestore cannot contain /" if featurestore.to_s.include? "/"
  raise ::ArgumentError, "entity_type cannot contain /" if entity_type.to_s.include? "/"

  "projects/#{project}/locations/#{location}/featurestores/#{featurestore}/entityTypes/#{entity_type}/features/#{feature}"
end

#featurestore_path(project:, location:, featurestore:) ⇒ ::String

Create a fully-qualified Featurestore resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/featurestores/{featurestore}

Parameters:

  • project (String)
  • location (String)
  • featurestore (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


83
84
85
86
87
88
# File 'lib/google/cloud/ai_platform/v1/featurestore_service/paths.rb', line 83

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

  "projects/#{project}/locations/#{location}/featurestores/#{featurestore}"
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)


101
102
103
104
105
# File 'lib/google/cloud/ai_platform/v1/featurestore_service/paths.rb', line 101

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

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