Module: Google::Cloud::VisionAI::V1::Warehouse::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/vision_ai/v1/warehouse/paths.rb
Overview
Path helper methods for the Warehouse API.
Instance Method Summary collapse
-
#annotation_path(project_number:, location:, corpus:, asset:, annotation:) ⇒ ::String
Create a fully-qualified Annotation resource string.
-
#asset_path(project_number:, location:, corpus:, asset:) ⇒ ::String
Create a fully-qualified Asset resource string.
-
#collection_path(project_number:, location:, corpus:, collection:) ⇒ ::String
Create a fully-qualified Collection resource string.
-
#corpus_path(project_number:, location:, corpus:) ⇒ ::String
Create a fully-qualified Corpus resource string.
-
#data_schema_path(project_number:, location:, corpus:, data_schema:) ⇒ ::String
Create a fully-qualified DataSchema resource string.
-
#index_endpoint_path(project:, location:, index_endpoint:) ⇒ ::String
Create a fully-qualified IndexEndpoint resource string.
-
#index_path(project_number:, location:, corpus:, index:) ⇒ ::String
Create a fully-qualified Index resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#search_config_path(project_number:, location:, corpus:, search_config:) ⇒ ::String
Create a fully-qualified SearchConfig resource string.
-
#search_hypernym_path(project_number:, location:, corpus:, search_hypernym:) ⇒ ::String
Create a fully-qualified SearchHypernym resource string.
Instance Method Details
#annotation_path(project_number:, location:, corpus:, asset:, annotation:) ⇒ ::String
Create a fully-qualified Annotation resource string.
The resource will be in the following format:
projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}
41 42 43 44 45 46 47 48 |
# File 'lib/google/cloud/vision_ai/v1/warehouse/paths.rb', line 41 def annotation_path project_number:, location:, corpus:, asset:, annotation: raise ::ArgumentError, "project_number cannot contain /" if project_number.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "corpus cannot contain /" if corpus.to_s.include? "/" raise ::ArgumentError, "asset cannot contain /" if asset.to_s.include? "/" "projects/#{project_number}/locations/#{location}/corpora/#{corpus}/assets/#{asset}/annotations/#{annotation}" end |
#asset_path(project_number:, location:, corpus:, asset:) ⇒ ::String
Create a fully-qualified Asset resource string.
The resource will be in the following format:
projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}
63 64 65 66 67 68 69 |
# File 'lib/google/cloud/vision_ai/v1/warehouse/paths.rb', line 63 def asset_path project_number:, location:, corpus:, asset: raise ::ArgumentError, "project_number cannot contain /" if project_number.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "corpus cannot contain /" if corpus.to_s.include? "/" "projects/#{project_number}/locations/#{location}/corpora/#{corpus}/assets/#{asset}" end |
#collection_path(project_number:, location:, corpus:, collection:) ⇒ ::String
Create a fully-qualified Collection resource string.
The resource will be in the following format:
projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}
84 85 86 87 88 89 90 |
# File 'lib/google/cloud/vision_ai/v1/warehouse/paths.rb', line 84 def collection_path project_number:, location:, corpus:, collection: raise ::ArgumentError, "project_number cannot contain /" if project_number.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "corpus cannot contain /" if corpus.to_s.include? "/" "projects/#{project_number}/locations/#{location}/corpora/#{corpus}/collections/#{collection}" end |
#corpus_path(project_number:, location:, corpus:) ⇒ ::String
Create a fully-qualified Corpus resource string.
The resource will be in the following format:
projects/{project_number}/locations/{location}/corpora/{corpus}
104 105 106 107 108 109 |
# File 'lib/google/cloud/vision_ai/v1/warehouse/paths.rb', line 104 def corpus_path project_number:, location:, corpus: raise ::ArgumentError, "project_number cannot contain /" if project_number.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project_number}/locations/#{location}/corpora/#{corpus}" end |
#data_schema_path(project_number:, location:, corpus:, data_schema:) ⇒ ::String
Create a fully-qualified DataSchema resource string.
The resource will be in the following format:
projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}
124 125 126 127 128 129 130 |
# File 'lib/google/cloud/vision_ai/v1/warehouse/paths.rb', line 124 def data_schema_path project_number:, location:, corpus:, data_schema: raise ::ArgumentError, "project_number cannot contain /" if project_number.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "corpus cannot contain /" if corpus.to_s.include? "/" "projects/#{project_number}/locations/#{location}/corpora/#{corpus}/dataSchemas/#{data_schema}" end |
#index_endpoint_path(project:, location:, index_endpoint:) ⇒ ::String
Create a fully-qualified IndexEndpoint resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}
165 166 167 168 169 170 |
# File 'lib/google/cloud/vision_ai/v1/warehouse/paths.rb', line 165 def index_endpoint_path project:, location:, index_endpoint: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/indexEndpoints/#{index_endpoint}" end |
#index_path(project_number:, location:, corpus:, index:) ⇒ ::String
Create a fully-qualified Index resource string.
The resource will be in the following format:
projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}
145 146 147 148 149 150 151 |
# File 'lib/google/cloud/vision_ai/v1/warehouse/paths.rb', line 145 def index_path project_number:, location:, corpus:, index: raise ::ArgumentError, "project_number cannot contain /" if project_number.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "corpus cannot contain /" if corpus.to_s.include? "/" "projects/#{project_number}/locations/#{location}/corpora/#{corpus}/indexes/#{index}" 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}
183 184 185 186 187 |
# File 'lib/google/cloud/vision_ai/v1/warehouse/paths.rb', line 183 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#search_config_path(project_number:, location:, corpus:, search_config:) ⇒ ::String
Create a fully-qualified SearchConfig resource string.
The resource will be in the following format:
projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}
202 203 204 205 206 207 208 |
# File 'lib/google/cloud/vision_ai/v1/warehouse/paths.rb', line 202 def search_config_path project_number:, location:, corpus:, search_config: raise ::ArgumentError, "project_number cannot contain /" if project_number.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "corpus cannot contain /" if corpus.to_s.include? "/" "projects/#{project_number}/locations/#{location}/corpora/#{corpus}/searchConfigs/#{search_config}" end |
#search_hypernym_path(project_number:, location:, corpus:, search_hypernym:) ⇒ ::String
Create a fully-qualified SearchHypernym resource string.
The resource will be in the following format:
projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}
223 224 225 226 227 228 229 |
# File 'lib/google/cloud/vision_ai/v1/warehouse/paths.rb', line 223 def search_hypernym_path project_number:, location:, corpus:, search_hypernym: raise ::ArgumentError, "project_number cannot contain /" if project_number.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "corpus cannot contain /" if corpus.to_s.include? "/" "projects/#{project_number}/locations/#{location}/corpora/#{corpus}/searchHypernyms/#{search_hypernym}" end |