Module: Google::Cloud::DiscoveryEngine::V1beta::EvaluationService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/discovery_engine/v1beta/evaluation_service/paths.rb
Overview
Path helper methods for the EvaluationService API.
Instance Method Summary collapse
-
#branch_path(**args) ⇒ ::String
Create a fully-qualified Branch resource string.
-
#data_store_path(**args) ⇒ ::String
Create a fully-qualified DataStore resource string.
-
#evaluation_path(project:, location:, evaluation:) ⇒ ::String
Create a fully-qualified Evaluation resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#sample_query_set_path(project:, location:, sample_query_set:) ⇒ ::String
Create a fully-qualified SampleQuerySet resource string.
-
#serving_config_path(**args) ⇒ ::String
Create a fully-qualified ServingConfig resource string.
-
#session_path(**args) ⇒ ::String
Create a fully-qualified Session resource string.
Instance Method Details
#branch_path(project: , location: , data_store: , branch: ) ⇒ ::String #branch_path(project: , location: , collection: , data_store: , branch: ) ⇒ ::String
Create a fully-qualified Branch resource string.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/google/cloud/discovery_engine/v1beta/evaluation_service/paths.rb', line 52 def branch_path **args resources = { "branch:data_store:location:project" => (proc do |project:, location:, data_store:, branch:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" "projects/#{project}/locations/#{location}/dataStores/#{data_store}/branches/#{branch}" end), "branch:collection:data_store:location:project" => (proc do |project:, location:, collection:, data_store:, branch:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/branches/#{branch}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#data_store_path(project: , location: , data_store: ) ⇒ ::String #data_store_path(project: , location: , collection: , data_store: ) ⇒ ::String
Create a fully-qualified DataStore resource string.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/google/cloud/discovery_engine/v1beta/evaluation_service/paths.rb', line 99 def data_store_path **args resources = { "data_store:location:project" => (proc do |project:, location:, data_store:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/dataStores/#{data_store}" end), "collection:data_store:location:project" => (proc do |project:, location:, collection:, data_store:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#evaluation_path(project:, location:, evaluation:) ⇒ ::String
Create a fully-qualified Evaluation resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/evaluations/{evaluation}
133 134 135 136 137 138 |
# File 'lib/google/cloud/discovery_engine/v1beta/evaluation_service/paths.rb', line 133 def evaluation_path project:, location:, evaluation: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/evaluations/#{evaluation}" 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}
151 152 153 154 155 |
# File 'lib/google/cloud/discovery_engine/v1beta/evaluation_service/paths.rb', line 151 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#sample_query_set_path(project:, location:, sample_query_set:) ⇒ ::String
Create a fully-qualified SampleQuerySet resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}
169 170 171 172 173 174 |
# File 'lib/google/cloud/discovery_engine/v1beta/evaluation_service/paths.rb', line 169 def sample_query_set_path project:, location:, sample_query_set: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/sampleQuerySets/#{sample_query_set}" end |
#serving_config_path(project: , location: , data_store: , serving_config: ) ⇒ ::String #serving_config_path(project: , location: , collection: , data_store: , serving_config: ) ⇒ ::String #serving_config_path(project: , location: , collection: , engine: , serving_config: ) ⇒ ::String
Create a fully-qualified ServingConfig resource string.
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/google/cloud/discovery_engine/v1beta/evaluation_service/paths.rb', line 212 def serving_config_path **args resources = { "data_store:location:project:serving_config" => (proc do |project:, location:, data_store:, serving_config:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" "projects/#{project}/locations/#{location}/dataStores/#{data_store}/servingConfigs/#{serving_config}" end), "collection:data_store:location:project:serving_config" => (proc do |project:, location:, collection:, data_store:, serving_config:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/servingConfigs/#{serving_config}" end), "collection:engine:location:project:serving_config" => (proc do |project:, location:, collection:, engine:, serving_config:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" raise ::ArgumentError, "engine cannot contain /" if engine.to_s.include? "/" "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/servingConfigs/#{serving_config}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#session_path(project: , location: , data_store: , session: ) ⇒ ::String #session_path(project: , location: , collection: , data_store: , session: ) ⇒ ::String #session_path(project: , location: , collection: , engine: , session: ) ⇒ ::String
Create a fully-qualified Session resource string.
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/google/cloud/discovery_engine/v1beta/evaluation_service/paths.rb', line 280 def session_path **args resources = { "data_store:location:project:session" => (proc do |project:, location:, data_store:, session:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" "projects/#{project}/locations/#{location}/dataStores/#{data_store}/sessions/#{session}" end), "collection:data_store:location:project:session" => (proc do |project:, location:, collection:, data_store:, session:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/" "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/sessions/#{session}" end), "collection:engine:location:project:session" => (proc do |project:, location:, collection:, engine:, session:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" raise ::ArgumentError, "engine cannot contain /" if engine.to_s.include? "/" "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/sessions/#{session}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |