Module: Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb
Overview
Path helper methods for the ConversationalSearchService API.
Instance Method Summary collapse
-
#answer_path(**args) ⇒ ::String
Create a fully-qualified Answer resource string.
-
#assist_answer_path(project:, location:, collection:, engine:, session:, assist_answer:) ⇒ ::String
Create a fully-qualified AssistAnswer resource string.
-
#chunk_path(**args) ⇒ ::String
Create a fully-qualified Chunk resource string.
-
#conversation_path(**args) ⇒ ::String
Create a fully-qualified Conversation resource string.
-
#data_store_path(**args) ⇒ ::String
Create a fully-qualified DataStore resource string.
-
#document_path(**args) ⇒ ::String
Create a fully-qualified Document 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
#answer_path(project:, location:, data_store:, session:, answer:) ⇒ ::String #answer_path(project:, location:, collection:, data_store:, session:, answer:) ⇒ ::String #answer_path(project:, location:, collection:, engine:, session:, answer:) ⇒ ::String
Create a fully-qualified Answer resource string.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb', line 66 def answer_path **args resources = { "answer:data_store:location:project:session" => (proc do |project:, location:, data_store:, session:, answer:| 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? "/" raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" "projects/#{project}/locations/#{location}/dataStores/#{data_store}/sessions/#{session}/answers/#{answer}" end), "answer:collection:data_store:location:project:session" => (proc do |project:, location:, collection:, data_store:, session:, answer:| 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? "/" raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/sessions/#{session}/answers/#{answer}" end), "answer:collection:engine:location:project:session" => (proc do |project:, location:, collection:, engine:, session:, answer:| 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? "/" raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/sessions/#{session}/answers/#{answer}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#assist_answer_path(project:, location:, collection:, engine:, session:, assist_answer:) ⇒ ::String
Create a fully-qualified AssistAnswer resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}
116 117 118 119 120 121 122 123 124 |
# File 'lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb', line 116 def assist_answer_path project:, location:, collection:, engine:, session:, assist_answer: 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? "/" raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" "projects/#{project}/locations/#{location}/collections/#{collection}/engines/#{engine}/sessions/#{session}/assistAnswers/#{assist_answer}" end |
#chunk_path(project:, location:, data_store:, branch:, document:, chunk:) ⇒ ::String #chunk_path(project:, location:, collection:, data_store:, branch:, document:, chunk:) ⇒ ::String
Create a fully-qualified Chunk resource string.
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb', line 155 def chunk_path **args resources = { "branch:chunk:data_store:document:location:project" => (proc do |project:, location:, data_store:, branch:, document:, chunk:| 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? "/" raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/" raise ::ArgumentError, "document cannot contain /" if document.to_s.include? "/" "projects/#{project}/locations/#{location}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}/chunks/#{chunk}" end), "branch:chunk:collection:data_store:document:location:project" => (proc do |project:, location:, collection:, data_store:, branch:, document:, chunk:| 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? "/" raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/" raise ::ArgumentError, "document cannot contain /" if document.to_s.include? "/" "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}/chunks/#{chunk}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#conversation_path(project:, location:, data_store:, conversation:) ⇒ ::String #conversation_path(project:, location:, collection:, data_store:, conversation:) ⇒ ::String #conversation_path(project:, location:, collection:, engine:, conversation:) ⇒ ::String
Create a fully-qualified Conversation resource string.
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb', line 219 def conversation_path **args resources = { "conversation:data_store:location:project" => (proc do |project:, location:, data_store:, conversation:| 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}/conversations/#{conversation}" end), "collection:conversation:data_store:location:project" => (proc do |project:, location:, collection:, data_store:, conversation:| 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}/conversations/#{conversation}" end), "collection:conversation:engine:location:project" => (proc do |project:, location:, collection:, engine:, conversation:| 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}/conversations/#{conversation}" 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.
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb', line 274 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 |
#document_path(project:, location:, data_store:, branch:, document:) ⇒ ::String #document_path(project:, location:, collection:, data_store:, branch:, document:) ⇒ ::String
Create a fully-qualified Document resource string.
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 |
# File 'lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb', line 323 def document_path **args resources = { "branch:data_store:document:location:project" => (proc do |project:, location:, data_store:, branch:, document:| 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? "/" raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/" "projects/#{project}/locations/#{location}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}" end), "branch:collection:data_store:document:location:project" => (proc do |project:, location:, collection:, data_store:, branch:, document:| 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? "/" raise ::ArgumentError, "branch cannot contain /" if branch.to_s.include? "/" "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/branches/#{branch}/documents/#{document}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) 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.
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 |
# File 'lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb', line 385 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.
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 |
# File 'lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb', line 453 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 |