Module: Google::Cloud::AutoML::V1::AutoML::Paths

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

Overview

Path helper methods for the AutoMl API.

Instance Method Summary collapse

Instance Method Details

#annotation_spec_path(project:, location:, dataset:, annotation_spec:) ⇒ ::String

Create a fully-qualified AnnotationSpec resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}

Parameters:

  • project (String)
  • location (String)
  • dataset (String)
  • annotation_spec (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "projects/#{project}/locations/#{location}/datasets/#{dataset}/annotationSpecs/#{annotation_spec}"
end

#dataset_path(project:, location:, dataset:) ⇒ ::String

Create a fully-qualified Dataset resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/datasets/{dataset}

Parameters:

  • project (String)
  • location (String)
  • dataset (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


60
61
62
63
64
65
# File 'lib/google/cloud/automl/v1/automl/paths.rb', line 60

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

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


78
79
80
81
82
# File 'lib/google/cloud/automl/v1/automl/paths.rb', line 78

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

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

#model_evaluation_path(project:, location:, model:, model_evaluation:) ⇒ ::String

Create a fully-qualified ModelEvaluation resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}

Parameters:

  • project (String)
  • location (String)
  • model (String)
  • model_evaluation (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


116
117
118
119
120
121
122
# File 'lib/google/cloud/automl/v1/automl/paths.rb', line 116

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

  "projects/#{project}/locations/#{location}/models/#{model}/modelEvaluations/#{model_evaluation}"
end

#model_path(project:, location:, model:) ⇒ ::String

Create a fully-qualified Model resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/models/{model}

Parameters:

  • project (String)
  • location (String)
  • model (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


96
97
98
99
100
101
# File 'lib/google/cloud/automl/v1/automl/paths.rb', line 96

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

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