Module: Google::Cloud::AutoML::V1beta1::AutoML::Paths

Extended by:
Paths
Included in:
Client, Paths
Defined in:
lib/google/cloud/automl/v1beta1/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/v1beta1/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

#column_spec_path(project:, location:, dataset:, table_spec:, column_spec:) ⇒ ::String

Create a fully-qualified ColumnSpec resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}

Parameters:

  • project (String)
  • location (String)
  • dataset (String)
  • table_spec (String)
  • column_spec (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def column_spec_path project:, location:, dataset:, table_spec:, column_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? "/"
  raise ::ArgumentError, "table_spec cannot contain /" if table_spec.to_s.include? "/"

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


83
84
85
86
87
88
# File 'lib/google/cloud/automl/v1beta1/automl/paths.rb', line 83

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)


101
102
103
104
105
# File 'lib/google/cloud/automl/v1beta1/automl/paths.rb', line 101

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)


139
140
141
142
143
144
145
# File 'lib/google/cloud/automl/v1beta1/automl/paths.rb', line 139

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)


119
120
121
122
123
124
# File 'lib/google/cloud/automl/v1beta1/automl/paths.rb', line 119

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

#table_spec_path(project:, location:, dataset:, table_spec:) ⇒ ::String

Create a fully-qualified TableSpec resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


160
161
162
163
164
165
166
# File 'lib/google/cloud/automl/v1beta1/automl/paths.rb', line 160

def table_spec_path project:, location:, dataset:, table_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}/tableSpecs/#{table_spec}"
end