google-cloud-discovery_engine-v1 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +9 -3
  3. data/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb +13 -5
  4. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +9 -3
  5. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +28 -5
  6. data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +875 -0
  7. data/lib/google/cloud/discovery_engine/v1/control_service/credentials.rb +47 -0
  8. data/lib/google/cloud/discovery_engine/v1/control_service/paths.rb +167 -0
  9. data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +814 -0
  10. data/lib/google/cloud/discovery_engine/v1/control_service/rest/service_stub.rb +440 -0
  11. data/lib/google/cloud/discovery_engine/v1/control_service/rest.rb +55 -0
  12. data/lib/google/cloud/discovery_engine/v1/control_service.rb +58 -0
  13. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +764 -6
  14. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +199 -0
  15. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +715 -6
  16. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +520 -0
  17. data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +15 -7
  18. data/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +13 -5
  19. data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +45 -0
  20. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +15 -7
  21. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +28 -5
  22. data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +23 -13
  23. data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +13 -5
  24. data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +23 -13
  25. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +28 -5
  26. data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +13 -5
  27. data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +13 -5
  28. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +13 -5
  29. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +28 -5
  30. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +471 -0
  31. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +47 -0
  32. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +52 -0
  33. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +438 -0
  34. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +129 -0
  35. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb +52 -0
  36. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service.rb +55 -0
  37. data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +485 -0
  38. data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +47 -0
  39. data/lib/google/cloud/discovery_engine/v1/project_service/operations.rb +809 -0
  40. data/lib/google/cloud/discovery_engine/v1/project_service/paths.rb +47 -0
  41. data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +452 -0
  42. data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +1114 -0
  43. data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +129 -0
  44. data/lib/google/cloud/discovery_engine/v1/project_service/rest.rb +54 -0
  45. data/lib/google/cloud/discovery_engine/v1/project_service.rb +57 -0
  46. data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +481 -0
  47. data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +47 -0
  48. data/lib/google/cloud/discovery_engine/v1/rank_service/paths.rb +52 -0
  49. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +448 -0
  50. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/service_stub.rb +129 -0
  51. data/lib/google/cloud/discovery_engine/v1/rank_service/rest.rb +52 -0
  52. data/lib/google/cloud/discovery_engine/v1/rank_service.rb +55 -0
  53. data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +24 -19
  54. data/lib/google/cloud/discovery_engine/v1/recommendation_service/paths.rb +66 -0
  55. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +24 -19
  56. data/lib/google/cloud/discovery_engine/v1/rest.rb +4 -0
  57. data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +18 -10
  58. data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +13 -5
  59. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +18 -10
  60. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +28 -5
  61. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +15 -8
  62. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +15 -8
  63. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +27 -12
  64. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +13 -5
  65. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +27 -12
  66. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +28 -5
  67. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +23 -6
  68. data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +13 -5
  69. data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +21 -0
  70. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +23 -6
  71. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +28 -5
  72. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +8 -0
  73. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  74. data/lib/google/cloud/discovery_engine/v1.rb +4 -0
  75. data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +69 -0
  76. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
  77. data/lib/google/cloud/discoveryengine/v1/control_pb.rb +55 -0
  78. data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +57 -0
  79. data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +69 -0
  80. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +32 -1
  81. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +25 -0
  82. data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +3 -1
  83. data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +48 -0
  84. data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +1 -1
  85. data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
  86. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +52 -0
  87. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +45 -0
  88. data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +46 -0
  89. data/lib/google/cloud/discoveryengine/v1/project_pb.rb +49 -0
  90. data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +50 -0
  91. data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +51 -0
  92. data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +49 -0
  93. data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +45 -0
  94. data/lib/google/cloud/discoveryengine/v1/session_pb.rb +50 -0
  95. data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
  96. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
  97. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
  98. data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
  99. data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +362 -0
  100. data/proto_docs/google/cloud/discoveryengine/v1/common.rb +16 -0
  101. data/proto_docs/google/cloud/discoveryengine/v1/control.rb +207 -0
  102. data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +126 -0
  103. data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -2
  104. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +485 -0
  105. data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +3 -0
  106. data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +2 -2
  107. data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +102 -0
  108. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +5 -5
  109. data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +3 -3
  110. data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +144 -0
  111. data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +79 -0
  112. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +4 -4
  113. data/proto_docs/google/cloud/discoveryengine/v1/project.rb +106 -0
  114. data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +57 -0
  115. data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +124 -0
  116. data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +20 -19
  117. data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +5 -5
  118. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +23 -18
  119. data/proto_docs/google/cloud/discoveryengine/v1/session.rb +88 -0
  120. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +3 -0
  121. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +24 -3
  122. data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +13 -1
  123. metadata +56 -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::V1::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::V1::AnswerQueryResponse]
302
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
303
+ #
304
+ # @return [::Google::Cloud::DiscoveryEngine::V1::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::V1::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::V1::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::V1::Answer]
340
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
341
+ #
342
+ # @return [::Google::Cloud::DiscoveryEngine::V1::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::V1::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::V1::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::V1::Session]
378
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
379
+ #
380
+ # @return [::Google::Cloud::DiscoveryEngine::V1::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::V1::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::V1::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::V1::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::V1::Session]
454
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
455
+ #
456
+ # @return [::Google::Cloud::DiscoveryEngine::V1::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::V1::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::V1::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::V1::Session]
492
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
493
+ #
494
+ # @return [::Google::Cloud::DiscoveryEngine::V1::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::V1::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::V1::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::V1::ListSessionsResponse]
530
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
531
+ #
532
+ # @return [::Google::Cloud::DiscoveryEngine::V1::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::V1::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::V1::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: "/v1/{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: "/v1/{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: "/v1/{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::V1::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: "/v1/{name}",
829
+ matches: [
830
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+/?$}, false]
831
+ ]
832
+ )
833
+ .with_bindings(
834
+ uri_method: :get,
835
+ uri_template: "/v1/{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: "/v1/{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::V1::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: "/v1/{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: "/v1/{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: "/v1/{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::V1::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: "/v1/{name}",
902
+ matches: [
903
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false]
904
+ ]
905
+ )
906
+ .with_bindings(
907
+ uri_method: :delete,
908
+ uri_template: "/v1/{name}",
909
+ matches: [
910
+ ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false]
911
+ ]
912
+ )
913
+ .with_bindings(
914
+ uri_method: :delete,
915
+ uri_template: "/v1/{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::V1::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: "/v1/{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: "/v1/{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: "/v1/{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::V1::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: "/v1/{name}",
975
+ matches: [
976
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false]
977
+ ]
978
+ )
979
+ .with_bindings(
980
+ uri_method: :get,
981
+ uri_template: "/v1/{name}",
982
+ matches: [
983
+ ["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/?$}, false]
984
+ ]
985
+ )
986
+ .with_bindings(
987
+ uri_method: :get,
988
+ uri_template: "/v1/{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::V1::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: "/v1/{parent}/sessions",
1010
+ matches: [
1011
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/?$}, false]
1012
+ ]
1013
+ )
1014
+ .with_bindings(
1015
+ uri_method: :get,
1016
+ uri_template: "/v1/{parent}/sessions",
1017
+ matches: [
1018
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false]
1019
+ ]
1020
+ )
1021
+ .with_bindings(
1022
+ uri_method: :get,
1023
+ uri_template: "/v1/{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
@@ -32,6 +32,9 @@ module Google
32
32
  # configuration.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
35
38
  # @private
36
39
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
37
40
 
@@ -277,10 +280,11 @@ module Google
277
280
  # Customize the options with defaults
278
281
  metadata = @config.rpcs.create_data_store.metadata.to_h
279
282
 
280
- # Set x-goog-api-client and x-goog-user-project headers
283
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
281
284
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
282
285
  lib_name: @config.lib_name, lib_version: @config.lib_version,
283
286
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
287
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
284
288
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
285
289
 
286
290
  header_params = {}
@@ -372,10 +376,11 @@ module Google
372
376
  # Customize the options with defaults
373
377
  metadata = @config.rpcs.get_data_store.metadata.to_h
374
378
 
375
- # Set x-goog-api-client and x-goog-user-project headers
379
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
376
380
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
377
381
  lib_name: @config.lib_name, lib_version: @config.lib_version,
378
382
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
383
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
379
384
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
380
385
 
381
386
  header_params = {}
@@ -447,8 +452,8 @@ module Google
447
452
  # must match the call that provided the page token. Otherwise, an
448
453
  # INVALID_ARGUMENT error is returned.
449
454
  # @param filter [::String]
450
- # Filter by solution type. For example: filter =
451
- # 'solution_type:SOLUTION_TYPE_SEARCH'
455
+ # Filter by solution type .
456
+ # For example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'`
452
457
  #
453
458
  # @yield [response, operation] Access the result along with the RPC operation
454
459
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::DataStore>]
@@ -488,10 +493,11 @@ module Google
488
493
  # Customize the options with defaults
489
494
  metadata = @config.rpcs.list_data_stores.metadata.to_h
490
495
 
491
- # Set x-goog-api-client and x-goog-user-project headers
496
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
492
497
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
493
498
  lib_name: @config.lib_name, lib_version: @config.lib_version,
494
499
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
500
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
495
501
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
496
502
 
497
503
  header_params = {}
@@ -590,10 +596,11 @@ module Google
590
596
  # Customize the options with defaults
591
597
  metadata = @config.rpcs.delete_data_store.metadata.to_h
592
598
 
593
- # Set x-goog-api-client and x-goog-user-project headers
599
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
594
600
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
595
601
  lib_name: @config.lib_name, lib_version: @config.lib_version,
596
602
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
603
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
597
604
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
598
605
 
599
606
  header_params = {}
@@ -690,10 +697,11 @@ module Google
690
697
  # Customize the options with defaults
691
698
  metadata = @config.rpcs.update_data_store.metadata.to_h
692
699
 
693
- # Set x-goog-api-client and x-goog-user-project headers
700
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
694
701
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
695
702
  lib_name: @config.lib_name, lib_version: @config.lib_version,
696
703
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
704
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
697
705
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
698
706
 
699
707
  header_params = {}