google-cloud-discovery_engine-v1beta 0.9.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +747 -1
  3. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +199 -0
  4. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +698 -1
  5. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +520 -0
  6. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/paths.rb +94 -0
  7. data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +48 -23
  8. data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +21 -0
  9. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +48 -23
  10. data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +296 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +275 -0
  12. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/service_stub.rb +180 -0
  13. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb +449 -0
  14. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/credentials.rb +47 -0
  15. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/paths.rb +52 -0
  16. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb +416 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/service_stub.rb +129 -0
  18. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest.rb +52 -0
  19. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service.rb +55 -0
  20. data/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb +459 -0
  21. data/lib/google/cloud/discovery_engine/v1beta/rank_service/credentials.rb +47 -0
  22. data/lib/google/cloud/discovery_engine/v1beta/rank_service/paths.rb +52 -0
  23. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb +426 -0
  24. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/service_stub.rb +129 -0
  25. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest.rb +52 -0
  26. data/lib/google/cloud/discovery_engine/v1beta/rank_service.rb +55 -0
  27. data/lib/google/cloud/discovery_engine/v1beta/rest.rb +3 -0
  28. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +14 -7
  29. data/lib/google/cloud/discovery_engine/v1beta/search_service/paths.rb +45 -0
  30. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +14 -7
  31. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/client.rb +469 -0
  32. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/credentials.rb +47 -0
  33. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb +801 -0
  34. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/paths.rb +78 -0
  35. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/client.rb +436 -0
  36. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb +1077 -0
  37. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/service_stub.rb +129 -0
  38. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest.rb +53 -0
  39. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service.rb +56 -0
  40. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +5 -4
  41. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/paths.rb +21 -0
  42. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +5 -4
  43. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest.rb +2 -1
  44. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service.rb +2 -1
  45. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  46. data/lib/google/cloud/discovery_engine/v1beta.rb +3 -0
  47. data/lib/google/cloud/discoveryengine/v1beta/answer_pb.rb +67 -0
  48. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +1 -1
  49. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +32 -1
  50. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb.rb +25 -0
  51. data/lib/google/cloud/discoveryengine/v1beta/data_store_pb.rb +5 -1
  52. data/lib/google/cloud/discoveryengine/v1beta/document_pb.rb +3 -1
  53. data/lib/google/cloud/discoveryengine/v1beta/document_processing_config_pb.rb +48 -0
  54. data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +3 -1
  55. data/lib/google/cloud/discoveryengine/v1beta/engine_service_pb.rb +6 -1
  56. data/lib/google/cloud/discoveryengine/v1beta/engine_service_services_pb.rb +12 -0
  57. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_pb.rb +52 -0
  58. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_services_pb.rb +45 -0
  59. data/lib/google/cloud/discoveryengine/v1beta/grounding_pb.rb +46 -0
  60. data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +13 -1
  61. data/lib/google/cloud/discoveryengine/v1beta/purge_config_pb.rb +1 -1
  62. data/lib/google/cloud/discoveryengine/v1beta/rank_service_pb.rb +49 -0
  63. data/lib/google/cloud/discoveryengine/v1beta/rank_service_services_pb.rb +45 -0
  64. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +8 -1
  65. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_pb.rb +57 -0
  66. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_services_pb.rb +45 -0
  67. data/lib/google/cloud/discoveryengine/v1beta/serving_config_service_pb.rb +1 -1
  68. data/lib/google/cloud/discoveryengine/v1beta/serving_config_service_services_pb.rb +2 -1
  69. data/lib/google/cloud/discoveryengine/v1beta/session_pb.rb +50 -0
  70. data/proto_docs/google/api/client.rb +4 -0
  71. data/proto_docs/google/cloud/discoveryengine/v1beta/answer.rb +354 -0
  72. data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +9 -1
  73. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +480 -0
  74. data/proto_docs/google/cloud/discoveryengine/v1beta/data_store.rb +20 -0
  75. data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +7 -0
  76. data/proto_docs/google/cloud/discoveryengine/v1beta/document_processing_config.rb +101 -0
  77. data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +4 -0
  78. data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +2 -2
  79. data/proto_docs/google/cloud/discoveryengine/v1beta/engine_service.rb +51 -0
  80. data/proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb +106 -0
  81. data/proto_docs/google/cloud/discoveryengine/v1beta/grounding.rb +76 -0
  82. data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +310 -24
  83. data/proto_docs/google/cloud/discoveryengine/v1beta/purge_config.rb +3 -0
  84. data/proto_docs/google/cloud/discoveryengine/v1beta/rank_service.rb +99 -0
  85. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +171 -26
  86. data/proto_docs/google/cloud/discoveryengine/v1beta/search_tuning_service.rb +141 -0
  87. data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config.rb +4 -3
  88. data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config_service.rb +3 -3
  89. data/proto_docs/google/cloud/discoveryengine/v1beta/session.rb +85 -0
  90. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +1 -1
  91. metadata +42 -2
@@ -289,6 +289,272 @@ module Google
289
289
  result
290
290
  end
291
291
 
292
+ ##
293
+ # Baseline implementation for the answer_query REST call
294
+ #
295
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest]
296
+ # A request object representing the call parameters. Required.
297
+ # @param options [::Gapic::CallOptions]
298
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
299
+ #
300
+ # @yield [result, operation] Access the result along with the TransportOperation object
301
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryResponse]
302
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
303
+ #
304
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryResponse]
305
+ # A result object deserialized from the server's reply
306
+ def answer_query request_pb, options = nil
307
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
308
+
309
+ verb, uri, query_string_params, body = ServiceStub.transcode_answer_query_request request_pb
310
+ query_string_params = if query_string_params.any?
311
+ query_string_params.to_h { |p| p.split "=", 2 }
312
+ else
313
+ {}
314
+ end
315
+
316
+ response = @client_stub.make_http_request(
317
+ verb,
318
+ uri: uri,
319
+ body: body || "",
320
+ params: query_string_params,
321
+ options: options
322
+ )
323
+ operation = ::Gapic::Rest::TransportOperation.new response
324
+ result = ::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryResponse.decode_json response.body, ignore_unknown_fields: true
325
+
326
+ yield result, operation if block_given?
327
+ result
328
+ end
329
+
330
+ ##
331
+ # Baseline implementation for the get_answer REST call
332
+ #
333
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::GetAnswerRequest]
334
+ # A request object representing the call parameters. Required.
335
+ # @param options [::Gapic::CallOptions]
336
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
337
+ #
338
+ # @yield [result, operation] Access the result along with the TransportOperation object
339
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::Answer]
340
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
341
+ #
342
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer]
343
+ # A result object deserialized from the server's reply
344
+ def get_answer request_pb, options = nil
345
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
346
+
347
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_answer_request request_pb
348
+ query_string_params = if query_string_params.any?
349
+ query_string_params.to_h { |p| p.split "=", 2 }
350
+ else
351
+ {}
352
+ end
353
+
354
+ response = @client_stub.make_http_request(
355
+ verb,
356
+ uri: uri,
357
+ body: body || "",
358
+ params: query_string_params,
359
+ options: options
360
+ )
361
+ operation = ::Gapic::Rest::TransportOperation.new response
362
+ result = ::Google::Cloud::DiscoveryEngine::V1beta::Answer.decode_json response.body, ignore_unknown_fields: true
363
+
364
+ yield result, operation if block_given?
365
+ result
366
+ end
367
+
368
+ ##
369
+ # Baseline implementation for the create_session REST call
370
+ #
371
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest]
372
+ # A request object representing the call parameters. Required.
373
+ # @param options [::Gapic::CallOptions]
374
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
375
+ #
376
+ # @yield [result, operation] Access the result along with the TransportOperation object
377
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::Session]
378
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
379
+ #
380
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Session]
381
+ # A result object deserialized from the server's reply
382
+ def create_session request_pb, options = nil
383
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
384
+
385
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_session_request request_pb
386
+ query_string_params = if query_string_params.any?
387
+ query_string_params.to_h { |p| p.split "=", 2 }
388
+ else
389
+ {}
390
+ end
391
+
392
+ response = @client_stub.make_http_request(
393
+ verb,
394
+ uri: uri,
395
+ body: body || "",
396
+ params: query_string_params,
397
+ options: options
398
+ )
399
+ operation = ::Gapic::Rest::TransportOperation.new response
400
+ result = ::Google::Cloud::DiscoveryEngine::V1beta::Session.decode_json response.body, ignore_unknown_fields: true
401
+
402
+ yield result, operation if block_given?
403
+ result
404
+ end
405
+
406
+ ##
407
+ # Baseline implementation for the delete_session REST call
408
+ #
409
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest]
410
+ # A request object representing the call parameters. Required.
411
+ # @param options [::Gapic::CallOptions]
412
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
413
+ #
414
+ # @yield [result, operation] Access the result along with the TransportOperation object
415
+ # @yieldparam result [::Google::Protobuf::Empty]
416
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
417
+ #
418
+ # @return [::Google::Protobuf::Empty]
419
+ # A result object deserialized from the server's reply
420
+ def delete_session request_pb, options = nil
421
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
422
+
423
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_session_request request_pb
424
+ query_string_params = if query_string_params.any?
425
+ query_string_params.to_h { |p| p.split "=", 2 }
426
+ else
427
+ {}
428
+ end
429
+
430
+ response = @client_stub.make_http_request(
431
+ verb,
432
+ uri: uri,
433
+ body: body || "",
434
+ params: query_string_params,
435
+ options: options
436
+ )
437
+ operation = ::Gapic::Rest::TransportOperation.new response
438
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
439
+
440
+ yield result, operation if block_given?
441
+ result
442
+ end
443
+
444
+ ##
445
+ # Baseline implementation for the update_session REST call
446
+ #
447
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest]
448
+ # A request object representing the call parameters. Required.
449
+ # @param options [::Gapic::CallOptions]
450
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
451
+ #
452
+ # @yield [result, operation] Access the result along with the TransportOperation object
453
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::Session]
454
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
455
+ #
456
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Session]
457
+ # A result object deserialized from the server's reply
458
+ def update_session request_pb, options = nil
459
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
460
+
461
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_session_request request_pb
462
+ query_string_params = if query_string_params.any?
463
+ query_string_params.to_h { |p| p.split "=", 2 }
464
+ else
465
+ {}
466
+ end
467
+
468
+ response = @client_stub.make_http_request(
469
+ verb,
470
+ uri: uri,
471
+ body: body || "",
472
+ params: query_string_params,
473
+ options: options
474
+ )
475
+ operation = ::Gapic::Rest::TransportOperation.new response
476
+ result = ::Google::Cloud::DiscoveryEngine::V1beta::Session.decode_json response.body, ignore_unknown_fields: true
477
+
478
+ yield result, operation if block_given?
479
+ result
480
+ end
481
+
482
+ ##
483
+ # Baseline implementation for the get_session REST call
484
+ #
485
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest]
486
+ # A request object representing the call parameters. Required.
487
+ # @param options [::Gapic::CallOptions]
488
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
489
+ #
490
+ # @yield [result, operation] Access the result along with the TransportOperation object
491
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::Session]
492
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
493
+ #
494
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Session]
495
+ # A result object deserialized from the server's reply
496
+ def get_session request_pb, options = nil
497
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
498
+
499
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_session_request request_pb
500
+ query_string_params = if query_string_params.any?
501
+ query_string_params.to_h { |p| p.split "=", 2 }
502
+ else
503
+ {}
504
+ end
505
+
506
+ response = @client_stub.make_http_request(
507
+ verb,
508
+ uri: uri,
509
+ body: body || "",
510
+ params: query_string_params,
511
+ options: options
512
+ )
513
+ operation = ::Gapic::Rest::TransportOperation.new response
514
+ result = ::Google::Cloud::DiscoveryEngine::V1beta::Session.decode_json response.body, ignore_unknown_fields: true
515
+
516
+ yield result, operation if block_given?
517
+ result
518
+ end
519
+
520
+ ##
521
+ # Baseline implementation for the list_sessions REST call
522
+ #
523
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest]
524
+ # A request object representing the call parameters. Required.
525
+ # @param options [::Gapic::CallOptions]
526
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
527
+ #
528
+ # @yield [result, operation] Access the result along with the TransportOperation object
529
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsResponse]
530
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
531
+ #
532
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsResponse]
533
+ # A result object deserialized from the server's reply
534
+ def list_sessions request_pb, options = nil
535
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
536
+
537
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_sessions_request request_pb
538
+ query_string_params = if query_string_params.any?
539
+ query_string_params.to_h { |p| p.split "=", 2 }
540
+ else
541
+ {}
542
+ end
543
+
544
+ response = @client_stub.make_http_request(
545
+ verb,
546
+ uri: uri,
547
+ body: body || "",
548
+ params: query_string_params,
549
+ options: options
550
+ )
551
+ operation = ::Gapic::Rest::TransportOperation.new response
552
+ result = ::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsResponse.decode_json response.body, ignore_unknown_fields: true
553
+
554
+ yield result, operation if block_given?
555
+ result
556
+ end
557
+
292
558
  ##
293
559
  # @private
294
560
  #
@@ -507,6 +773,260 @@ module Google
507
773
  )
508
774
  transcoder.transcode request_pb
509
775
  end
776
+
777
+ ##
778
+ # @private
779
+ #
780
+ # GRPC transcoding helper method for the answer_query REST call
781
+ #
782
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest]
783
+ # A request object representing the call parameters. Required.
784
+ # @return [Array(String, [String, nil], Hash{String => String})]
785
+ # Uri, Body, Query string parameters
786
+ def self.transcode_answer_query_request request_pb
787
+ transcoder = Gapic::Rest::GrpcTranscoder.new
788
+ .with_bindings(
789
+ uri_method: :post,
790
+ uri_template: "/v1beta/{serving_config}:answer",
791
+ body: "*",
792
+ matches: [
793
+ ["serving_config", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+/?$}, false]
794
+ ]
795
+ )
796
+ .with_bindings(
797
+ uri_method: :post,
798
+ uri_template: "/v1beta/{serving_config}:answer",
799
+ body: "*",
800
+ matches: [
801
+ ["serving_config", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+/?$}, false]
802
+ ]
803
+ )
804
+ .with_bindings(
805
+ uri_method: :post,
806
+ uri_template: "/v1beta/{serving_config}:answer",
807
+ body: "*",
808
+ matches: [
809
+ ["serving_config", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+/?$}, false]
810
+ ]
811
+ )
812
+ transcoder.transcode request_pb
813
+ end
814
+
815
+ ##
816
+ # @private
817
+ #
818
+ # GRPC transcoding helper method for the get_answer REST call
819
+ #
820
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::GetAnswerRequest]
821
+ # A request object representing the call parameters. Required.
822
+ # @return [Array(String, [String, nil], Hash{String => String})]
823
+ # Uri, Body, Query string parameters
824
+ def self.transcode_get_answer_request request_pb
825
+ transcoder = Gapic::Rest::GrpcTranscoder.new
826
+ .with_bindings(
827
+ uri_method: :get,
828
+ uri_template: "/v1beta/{name}",
829
+ matches: [
830
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+/?$}, false]
831
+ ]
832
+ )
833
+ .with_bindings(
834
+ uri_method: :get,
835
+ uri_template: "/v1beta/{name}",
836
+ matches: [
837
+ ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+/?$}, false]
838
+ ]
839
+ )
840
+ .with_bindings(
841
+ uri_method: :get,
842
+ uri_template: "/v1beta/{name}",
843
+ matches: [
844
+ ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/answers/[^/]+/?$}, false]
845
+ ]
846
+ )
847
+ transcoder.transcode request_pb
848
+ end
849
+
850
+ ##
851
+ # @private
852
+ #
853
+ # GRPC transcoding helper method for the create_session REST call
854
+ #
855
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::CreateSessionRequest]
856
+ # A request object representing the call parameters. Required.
857
+ # @return [Array(String, [String, nil], Hash{String => String})]
858
+ # Uri, Body, Query string parameters
859
+ def self.transcode_create_session_request request_pb
860
+ transcoder = Gapic::Rest::GrpcTranscoder.new
861
+ .with_bindings(
862
+ uri_method: :post,
863
+ uri_template: "/v1beta/{parent}/sessions",
864
+ body: "session",
865
+ matches: [
866
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false]
867
+ ]
868
+ )
869
+ .with_bindings(
870
+ uri_method: :post,
871
+ uri_template: "/v1beta/{parent}/sessions",
872
+ body: "session",
873
+ matches: [
874
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false]
875
+ ]
876
+ )
877
+ .with_bindings(
878
+ uri_method: :post,
879
+ uri_template: "/v1beta/{parent}/sessions",
880
+ body: "session",
881
+ matches: [
882
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/?$}, false]
883
+ ]
884
+ )
885
+ transcoder.transcode request_pb
886
+ end
887
+
888
+ ##
889
+ # @private
890
+ #
891
+ # GRPC transcoding helper method for the delete_session REST call
892
+ #
893
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::DeleteSessionRequest]
894
+ # A request object representing the call parameters. Required.
895
+ # @return [Array(String, [String, nil], Hash{String => String})]
896
+ # Uri, Body, Query string parameters
897
+ def self.transcode_delete_session_request request_pb
898
+ transcoder = Gapic::Rest::GrpcTranscoder.new
899
+ .with_bindings(
900
+ uri_method: :delete,
901
+ uri_template: "/v1beta/{name}",
902
+ matches: [
903
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false]
904
+ ]
905
+ )
906
+ .with_bindings(
907
+ uri_method: :delete,
908
+ uri_template: "/v1beta/{name}",
909
+ matches: [
910
+ ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false]
911
+ ]
912
+ )
913
+ .with_bindings(
914
+ uri_method: :delete,
915
+ uri_template: "/v1beta/{name}",
916
+ matches: [
917
+ ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/?$}, false]
918
+ ]
919
+ )
920
+ transcoder.transcode request_pb
921
+ end
922
+
923
+ ##
924
+ # @private
925
+ #
926
+ # GRPC transcoding helper method for the update_session REST call
927
+ #
928
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::UpdateSessionRequest]
929
+ # A request object representing the call parameters. Required.
930
+ # @return [Array(String, [String, nil], Hash{String => String})]
931
+ # Uri, Body, Query string parameters
932
+ def self.transcode_update_session_request request_pb
933
+ transcoder = Gapic::Rest::GrpcTranscoder.new
934
+ .with_bindings(
935
+ uri_method: :patch,
936
+ uri_template: "/v1beta/{session.name}",
937
+ body: "session",
938
+ matches: [
939
+ ["session.name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false]
940
+ ]
941
+ )
942
+ .with_bindings(
943
+ uri_method: :patch,
944
+ uri_template: "/v1beta/{session.name}",
945
+ body: "session",
946
+ matches: [
947
+ ["session.name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false]
948
+ ]
949
+ )
950
+ .with_bindings(
951
+ uri_method: :patch,
952
+ uri_template: "/v1beta/{session.name}",
953
+ body: "session",
954
+ matches: [
955
+ ["session.name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/?$}, false]
956
+ ]
957
+ )
958
+ transcoder.transcode request_pb
959
+ end
960
+
961
+ ##
962
+ # @private
963
+ #
964
+ # GRPC transcoding helper method for the get_session REST call
965
+ #
966
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::GetSessionRequest]
967
+ # A request object representing the call parameters. Required.
968
+ # @return [Array(String, [String, nil], Hash{String => String})]
969
+ # Uri, Body, Query string parameters
970
+ def self.transcode_get_session_request request_pb
971
+ transcoder = Gapic::Rest::GrpcTranscoder.new
972
+ .with_bindings(
973
+ uri_method: :get,
974
+ uri_template: "/v1beta/{name}",
975
+ matches: [
976
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false]
977
+ ]
978
+ )
979
+ .with_bindings(
980
+ uri_method: :get,
981
+ uri_template: "/v1beta/{name}",
982
+ matches: [
983
+ ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false]
984
+ ]
985
+ )
986
+ .with_bindings(
987
+ uri_method: :get,
988
+ uri_template: "/v1beta/{name}",
989
+ matches: [
990
+ ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/?$}, false]
991
+ ]
992
+ )
993
+ transcoder.transcode request_pb
994
+ end
995
+
996
+ ##
997
+ # @private
998
+ #
999
+ # GRPC transcoding helper method for the list_sessions REST call
1000
+ #
1001
+ # @param request_pb [::Google::Cloud::DiscoveryEngine::V1beta::ListSessionsRequest]
1002
+ # A request object representing the call parameters. Required.
1003
+ # @return [Array(String, [String, nil], Hash{String => String})]
1004
+ # Uri, Body, Query string parameters
1005
+ def self.transcode_list_sessions_request request_pb
1006
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1007
+ .with_bindings(
1008
+ uri_method: :get,
1009
+ uri_template: "/v1beta/{parent}/sessions",
1010
+ matches: [
1011
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false]
1012
+ ]
1013
+ )
1014
+ .with_bindings(
1015
+ uri_method: :get,
1016
+ uri_template: "/v1beta/{parent}/sessions",
1017
+ matches: [
1018
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false]
1019
+ ]
1020
+ )
1021
+ .with_bindings(
1022
+ uri_method: :get,
1023
+ uri_template: "/v1beta/{parent}/sessions",
1024
+ matches: [
1025
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/?$}, false]
1026
+ ]
1027
+ )
1028
+ transcoder.transcode request_pb
1029
+ end
510
1030
  end
511
1031
  end
512
1032
  end
@@ -88,6 +88,100 @@ module Google
88
88
  resource.call(**args)
89
89
  end
90
90
 
91
+ ##
92
+ # Create a fully-qualified DocumentProcessingConfig resource string.
93
+ #
94
+ # @overload document_processing_config_path(project:, location:, data_store:)
95
+ # The resource will be in the following format:
96
+ #
97
+ # `projects/{project}/locations/{location}/dataStores/{data_store}/documentProcessingConfig`
98
+ #
99
+ # @param project [String]
100
+ # @param location [String]
101
+ # @param data_store [String]
102
+ #
103
+ # @overload document_processing_config_path(project:, location:, collection:, data_store:)
104
+ # The resource will be in the following format:
105
+ #
106
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/documentProcessingConfig`
107
+ #
108
+ # @param project [String]
109
+ # @param location [String]
110
+ # @param collection [String]
111
+ # @param data_store [String]
112
+ #
113
+ # @return [::String]
114
+ def document_processing_config_path **args
115
+ resources = {
116
+ "data_store:location:project" => (proc do |project:, location:, data_store:|
117
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
118
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
119
+
120
+ "projects/#{project}/locations/#{location}/dataStores/#{data_store}/documentProcessingConfig"
121
+ end),
122
+ "collection:data_store:location:project" => (proc do |project:, location:, collection:, data_store:|
123
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
124
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
125
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
126
+
127
+ "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/documentProcessingConfig"
128
+ end)
129
+ }
130
+
131
+ resource = resources[args.keys.sort.join(":")]
132
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
133
+ resource.call(**args)
134
+ end
135
+
136
+ ##
137
+ # Create a fully-qualified Schema resource string.
138
+ #
139
+ # @overload schema_path(project:, location:, data_store:, schema:)
140
+ # The resource will be in the following format:
141
+ #
142
+ # `projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}`
143
+ #
144
+ # @param project [String]
145
+ # @param location [String]
146
+ # @param data_store [String]
147
+ # @param schema [String]
148
+ #
149
+ # @overload schema_path(project:, location:, collection:, data_store:, schema:)
150
+ # The resource will be in the following format:
151
+ #
152
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`
153
+ #
154
+ # @param project [String]
155
+ # @param location [String]
156
+ # @param collection [String]
157
+ # @param data_store [String]
158
+ # @param schema [String]
159
+ #
160
+ # @return [::String]
161
+ def schema_path **args
162
+ resources = {
163
+ "data_store:location:project:schema" => (proc do |project:, location:, data_store:, schema:|
164
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
165
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
166
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
167
+
168
+ "projects/#{project}/locations/#{location}/dataStores/#{data_store}/schemas/#{schema}"
169
+ end),
170
+ "collection:data_store:location:project:schema" => (proc do |project:, location:, collection:, data_store:, schema:|
171
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
172
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
173
+ raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
174
+ raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
175
+
176
+ "projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/schemas/#{schema}"
177
+ end)
178
+ }
179
+
180
+ resource = resources[args.keys.sort.join(":")]
181
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
182
+ resource.call(**args)
183
+ end
184
+
91
185
  extend self
92
186
  end
93
187
  end