Module: Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Paths

Extended by:
Paths
Included in:
Client, Paths
Defined in:
lib/google/cloud/data_labeling/v1beta1/data_labeling_service/paths.rb

Overview

Path helper methods for the DataLabelingService API.

Instance Method Summary collapse

Instance Method Details

#annotated_dataset_path(project:, dataset:, annotated_dataset:) ⇒ ::String

Create a fully-qualified AnnotatedDataset resource string.

The resource will be in the following format:

projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}

Parameters:

  • project (String)
  • dataset (String)
  • annotated_dataset (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
44
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/paths.rb', line 39

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

  "projects/#{project}/datasets/#{dataset}/annotatedDatasets/#{annotated_dataset}"
end

#annotation_spec_set_path(project:, annotation_spec_set:) ⇒ ::String

Create a fully-qualified AnnotationSpecSet resource string.

The resource will be in the following format:

projects/{project}/annotationSpecSets/{annotation_spec_set}

Parameters:

  • project (String)
  • annotation_spec_set (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


57
58
59
60
61
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/paths.rb', line 57

def annotation_spec_set_path project:, annotation_spec_set:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/annotationSpecSets/#{annotation_spec_set}"
end

#data_item_path(project:, dataset:, data_item:) ⇒ ::String

Create a fully-qualified DataItem resource string.

The resource will be in the following format:

projects/{project}/datasets/{dataset}/dataItems/{data_item}

Parameters:

  • project (String)
  • dataset (String)
  • data_item (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


75
76
77
78
79
80
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/paths.rb', line 75

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

  "projects/#{project}/datasets/#{dataset}/dataItems/#{data_item}"
end

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

Create a fully-qualified Dataset resource string.

The resource will be in the following format:

projects/{project}/datasets/{dataset}

Parameters:

  • project (String)
  • dataset (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


93
94
95
96
97
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/paths.rb', line 93

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

  "projects/#{project}/datasets/#{dataset}"
end

#evaluation_job_path(project:, evaluation_job:) ⇒ ::String

Create a fully-qualified EvaluationJob resource string.

The resource will be in the following format:

projects/{project}/evaluationJobs/{evaluation_job}

Parameters:

  • project (String)
  • evaluation_job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


129
130
131
132
133
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/paths.rb', line 129

def evaluation_job_path project:, evaluation_job:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/evaluationJobs/#{evaluation_job}"
end

#evaluation_path(project:, dataset:, evaluation:) ⇒ ::String

Create a fully-qualified Evaluation resource string.

The resource will be in the following format:

projects/{project}/datasets/{dataset}/evaluations/{evaluation}

Parameters:

  • project (String)
  • dataset (String)
  • evaluation (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


111
112
113
114
115
116
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/paths.rb', line 111

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

  "projects/#{project}/datasets/#{dataset}/evaluations/#{evaluation}"
end

#example_path(project:, dataset:, annotated_dataset:, example:) ⇒ ::String

Create a fully-qualified Example resource string.

The resource will be in the following format:

projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example}

Parameters:

  • project (String)
  • dataset (String)
  • annotated_dataset (String)
  • example (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


148
149
150
151
152
153
154
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/paths.rb', line 148

def example_path project:, dataset:, annotated_dataset:, example:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/"
  raise ::ArgumentError, "annotated_dataset cannot contain /" if annotated_dataset.to_s.include? "/"

  "projects/#{project}/datasets/#{dataset}/annotatedDatasets/#{annotated_dataset}/examples/#{example}"
end

#instruction_path(project:, instruction:) ⇒ ::String

Create a fully-qualified Instruction resource string.

The resource will be in the following format:

projects/{project}/instructions/{instruction}

Parameters:

  • project (String)
  • instruction (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


167
168
169
170
171
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/paths.rb', line 167

def instruction_path project:, instruction:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/instructions/#{instruction}"
end

#project_path(project:) ⇒ ::String

Create a fully-qualified Project resource string.

The resource will be in the following format:

projects/{project}

Parameters:

  • project (String)

Returns:

  • (::String)


183
184
185
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/paths.rb', line 183

def project_path project:
  "projects/#{project}"
end