Module: Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Paths
- Extended by:
- 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
-
#annotated_dataset_path(project:, dataset:, annotated_dataset:) ⇒ ::String
Create a fully-qualified AnnotatedDataset resource string.
-
#annotation_spec_set_path(project:, annotation_spec_set:) ⇒ ::String
Create a fully-qualified AnnotationSpecSet resource string.
-
#data_item_path(project:, dataset:, data_item:) ⇒ ::String
Create a fully-qualified DataItem resource string.
-
#dataset_path(project:, dataset:) ⇒ ::String
Create a fully-qualified Dataset resource string.
-
#evaluation_job_path(project:, evaluation_job:) ⇒ ::String
Create a fully-qualified EvaluationJob resource string.
-
#evaluation_path(project:, dataset:, evaluation:) ⇒ ::String
Create a fully-qualified Evaluation resource string.
-
#example_path(project:, dataset:, annotated_dataset:, example:) ⇒ ::String
Create a fully-qualified Example resource string.
-
#instruction_path(project:, instruction:) ⇒ ::String
Create a fully-qualified Instruction resource string.
-
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
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}
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}
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}
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}
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}
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}
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}
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}
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}
183 184 185 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/paths.rb', line 183 def project_path project: "projects/#{project}" end |