google-cloud-discovery_engine-v1 0.7.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +228 -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 +214 -3
  5. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +28 -5
  6. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/service_stub.rb +136 -0
  7. data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +875 -0
  8. data/lib/google/cloud/discovery_engine/v1/control_service/credentials.rb +47 -0
  9. data/lib/google/cloud/discovery_engine/v1/control_service/paths.rb +167 -0
  10. data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +814 -0
  11. data/lib/google/cloud/discovery_engine/v1/control_service/rest/service_stub.rb +440 -0
  12. data/lib/google/cloud/discovery_engine/v1/control_service/rest.rb +55 -0
  13. data/lib/google/cloud/discovery_engine/v1/control_service.rb +58 -0
  14. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +911 -135
  15. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +199 -0
  16. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +733 -6
  17. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +520 -0
  18. data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +15 -7
  19. data/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +13 -5
  20. data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +45 -0
  21. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +15 -7
  22. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +28 -5
  23. data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +26 -14
  24. data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +13 -5
  25. data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +26 -14
  26. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +28 -5
  27. data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +13 -5
  28. data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +13 -5
  29. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +13 -5
  30. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +28 -5
  31. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +471 -0
  32. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +47 -0
  33. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +52 -0
  34. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +438 -0
  35. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +129 -0
  36. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb +52 -0
  37. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service.rb +55 -0
  38. data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +485 -0
  39. data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +47 -0
  40. data/lib/google/cloud/discovery_engine/v1/project_service/operations.rb +809 -0
  41. data/lib/google/cloud/discovery_engine/v1/project_service/paths.rb +47 -0
  42. data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +452 -0
  43. data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +1114 -0
  44. data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +129 -0
  45. data/lib/google/cloud/discovery_engine/v1/project_service/rest.rb +54 -0
  46. data/lib/google/cloud/discovery_engine/v1/project_service.rb +57 -0
  47. data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +481 -0
  48. data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +47 -0
  49. data/lib/google/cloud/discovery_engine/v1/rank_service/paths.rb +52 -0
  50. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +448 -0
  51. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/service_stub.rb +129 -0
  52. data/lib/google/cloud/discovery_engine/v1/rank_service/rest.rb +52 -0
  53. data/lib/google/cloud/discovery_engine/v1/rank_service.rb +55 -0
  54. data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +24 -19
  55. data/lib/google/cloud/discovery_engine/v1/recommendation_service/paths.rb +66 -0
  56. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +24 -19
  57. data/lib/google/cloud/discovery_engine/v1/rest.rb +4 -0
  58. data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +18 -10
  59. data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +13 -5
  60. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +18 -10
  61. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +28 -5
  62. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +57 -9
  63. data/lib/google/cloud/discovery_engine/v1/search_service/paths.rb +68 -0
  64. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +57 -9
  65. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +27 -12
  66. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +13 -5
  67. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +27 -12
  68. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +28 -5
  69. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +23 -6
  70. data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +13 -5
  71. data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +21 -0
  72. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +23 -6
  73. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +28 -5
  74. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +15 -0
  75. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  76. data/lib/google/cloud/discovery_engine/v1.rb +4 -0
  77. data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +69 -0
  78. data/lib/google/cloud/discoveryengine/v1/chunk_pb.rb +50 -0
  79. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
  80. data/lib/google/cloud/discoveryengine/v1/completion_pb.rb +2 -1
  81. data/lib/google/cloud/discoveryengine/v1/completion_service_pb.rb +1 -1
  82. data/lib/google/cloud/discoveryengine/v1/completion_service_services_pb.rb +8 -0
  83. data/lib/google/cloud/discoveryengine/v1/control_pb.rb +55 -0
  84. data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +57 -0
  85. data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +69 -0
  86. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +32 -1
  87. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +25 -0
  88. data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +3 -1
  89. data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +51 -0
  90. data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +1 -1
  91. data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
  92. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +52 -0
  93. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +45 -0
  94. data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +46 -0
  95. data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +6 -1
  96. data/lib/google/cloud/discoveryengine/v1/project_pb.rb +49 -0
  97. data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +50 -0
  98. data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +51 -0
  99. data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +4 -1
  100. data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +49 -0
  101. data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +45 -0
  102. data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +9 -1
  103. data/lib/google/cloud/discoveryengine/v1/session_pb.rb +50 -0
  104. data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
  105. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
  106. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
  107. data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
  108. data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +375 -0
  109. data/proto_docs/google/cloud/discoveryengine/v1/chunk.rb +119 -0
  110. data/proto_docs/google/cloud/discoveryengine/v1/common.rb +16 -0
  111. data/proto_docs/google/cloud/discoveryengine/v1/completion.rb +31 -0
  112. data/proto_docs/google/cloud/discoveryengine/v1/control.rb +207 -0
  113. data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +126 -0
  114. data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -2
  115. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +529 -0
  116. data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +3 -0
  117. data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +2 -2
  118. data/proto_docs/google/cloud/discoveryengine/v1/document.rb +1 -1
  119. data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +143 -0
  120. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +5 -5
  121. data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +3 -3
  122. data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +144 -0
  123. data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +79 -0
  124. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +118 -4
  125. data/proto_docs/google/cloud/discoveryengine/v1/project.rb +106 -0
  126. data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +57 -0
  127. data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +42 -0
  128. data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +124 -0
  129. data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +20 -19
  130. data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +5 -5
  131. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +230 -20
  132. data/proto_docs/google/cloud/discoveryengine/v1/session.rb +88 -0
  133. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +3 -0
  134. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +24 -3
  135. data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +13 -1
  136. metadata +58 -2
@@ -31,6 +31,9 @@ module Google
31
31
  # Service for conversational search.
32
32
  #
33
33
  class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
34
37
  # @private
35
38
  DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
36
39
 
@@ -293,10 +296,11 @@ module Google
293
296
  # Customize the options with defaults
294
297
  metadata = @config.rpcs.converse_conversation.metadata.to_h
295
298
 
296
- # Set x-goog-api-client and x-goog-user-project headers
299
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
297
300
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
298
301
  lib_name: @config.lib_name, lib_version: @config.lib_version,
299
302
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
303
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
300
304
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
301
305
 
302
306
  header_params = {}
@@ -384,10 +388,11 @@ module Google
384
388
  # Customize the options with defaults
385
389
  metadata = @config.rpcs.create_conversation.metadata.to_h
386
390
 
387
- # Set x-goog-api-client and x-goog-user-project headers
391
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
388
392
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
389
393
  lib_name: @config.lib_name, lib_version: @config.lib_version,
390
394
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
395
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
391
396
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
392
397
 
393
398
  header_params = {}
@@ -473,10 +478,11 @@ module Google
473
478
  # Customize the options with defaults
474
479
  metadata = @config.rpcs.delete_conversation.metadata.to_h
475
480
 
476
- # Set x-goog-api-client and x-goog-user-project headers
481
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
477
482
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
478
483
  lib_name: @config.lib_name, lib_version: @config.lib_version,
479
484
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
485
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
480
486
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
481
487
 
482
488
  header_params = {}
@@ -571,10 +577,11 @@ module Google
571
577
  # Customize the options with defaults
572
578
  metadata = @config.rpcs.update_conversation.metadata.to_h
573
579
 
574
- # Set x-goog-api-client and x-goog-user-project headers
580
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
575
581
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
576
582
  lib_name: @config.lib_name, lib_version: @config.lib_version,
577
583
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
584
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
578
585
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
579
586
 
580
587
  header_params = {}
@@ -657,10 +664,11 @@ module Google
657
664
  # Customize the options with defaults
658
665
  metadata = @config.rpcs.get_conversation.metadata.to_h
659
666
 
660
- # Set x-goog-api-client and x-goog-user-project headers
667
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
661
668
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
662
669
  lib_name: @config.lib_name, lib_version: @config.lib_version,
663
670
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
671
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
664
672
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
665
673
 
666
674
  header_params = {}
@@ -771,10 +779,11 @@ module Google
771
779
  # Customize the options with defaults
772
780
  metadata = @config.rpcs.list_conversations.metadata.to_h
773
781
 
774
- # Set x-goog-api-client and x-goog-user-project headers
782
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
775
783
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
776
784
  lib_name: @config.lib_name, lib_version: @config.lib_version,
777
785
  gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
786
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
778
787
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
779
788
 
780
789
  header_params = {}
@@ -803,153 +812,871 @@ module Google
803
812
  end
804
813
 
805
814
  ##
806
- # Configuration class for the ConversationalSearchService API.
815
+ # Answer query method.
807
816
  #
808
- # This class represents the configuration for ConversationalSearchService,
809
- # providing control over timeouts, retry behavior, logging, transport
810
- # parameters, and other low-level controls. Certain parameters can also be
811
- # applied individually to specific RPCs. See
812
- # {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client::Configuration::Rpcs}
813
- # for a list of RPCs that can be configured independently.
817
+ # @overload answer_query(request, options = nil)
818
+ # Pass arguments to `answer_query` via a request object, either of type
819
+ # {::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest} or an equivalent Hash.
814
820
  #
815
- # Configuration can be applied globally to all clients, or to a single client
816
- # on construction.
821
+ # @param request [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest, ::Hash]
822
+ # A request object representing the call parameters. Required. To specify no
823
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
824
+ # @param options [::Gapic::CallOptions, ::Hash]
825
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
817
826
  #
818
- # @example
827
+ # @overload answer_query(serving_config: nil, query: nil, session: nil, safety_spec: nil, related_questions_spec: nil, answer_generation_spec: nil, search_spec: nil, query_understanding_spec: nil, asynchronous_mode: nil, user_pseudo_id: nil, user_labels: nil)
828
+ # Pass arguments to `answer_query` via keyword arguments. Note that at
829
+ # least one keyword argument is required. To specify no parameters, or to keep all
830
+ # the default parameter values, pass an empty Hash as a request object (see above).
819
831
  #
820
- # # Modify the global config, setting the timeout for
821
- # # converse_conversation to 20 seconds,
822
- # # and all remaining timeouts to 10 seconds.
823
- # ::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client.configure do |config|
824
- # config.timeout = 10.0
825
- # config.rpcs.converse_conversation.timeout = 20.0
826
- # end
832
+ # @param serving_config [::String]
833
+ # Required. The resource name of the Search serving config, such as
834
+ # `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
835
+ # or
836
+ # `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`.
837
+ # This field is used to identify the serving configuration name, set
838
+ # of models used to make the search.
839
+ # @param query [::Google::Cloud::DiscoveryEngine::V1::Query, ::Hash]
840
+ # Required. Current user query.
841
+ # @param session [::String]
842
+ # The session resource name. Not required.
843
+ #
844
+ # When session field is not set, the API is in sessionless mode.
845
+ #
846
+ # We support auto session mode: users can use the wildcard symbol `-` as
847
+ # session ID. A new ID will be automatically generated and assigned.
848
+ # @param safety_spec [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec, ::Hash]
849
+ # Model specification.
850
+ # @param related_questions_spec [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::RelatedQuestionsSpec, ::Hash]
851
+ # Related questions specification.
852
+ # @param answer_generation_spec [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec, ::Hash]
853
+ # Answer generation specification.
854
+ # @param search_spec [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec, ::Hash]
855
+ # Search specification.
856
+ # @param query_understanding_spec [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec, ::Hash]
857
+ # Query understanding specification.
858
+ # @param asynchronous_mode [::Boolean]
859
+ # Asynchronous mode control.
860
+ #
861
+ # If enabled, the response will be returned with answer/session resource
862
+ # name without final answer. The API users need to do the polling to get
863
+ # the latest status of answer/session by calling
864
+ # {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client#get_answer ConversationalSearchService.GetAnswer}
865
+ # or
866
+ # {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client#get_session ConversationalSearchService.GetSession}
867
+ # method.
868
+ # @param user_pseudo_id [::String]
869
+ # A unique identifier for tracking visitors. For example, this could be
870
+ # implemented with an HTTP cookie, which should be able to uniquely identify
871
+ # a visitor on a single device. This unique identifier should not change if
872
+ # the visitor logs in or out of the website.
873
+ #
874
+ # This field should NOT have a fixed value such as `unknown_visitor`.
875
+ #
876
+ # The field must be a UTF-8 encoded string with a length limit of 128
877
+ # characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
878
+ # @param user_labels [::Hash{::String => ::String}]
879
+ # The user labels applied to a resource must meet the following requirements:
827
880
  #
828
- # # Apply the above configuration only to a new client.
829
- # client = ::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client.new do |config|
830
- # config.timeout = 10.0
831
- # config.rpcs.converse_conversation.timeout = 20.0
832
- # end
881
+ # * Each resource can have multiple labels, up to a maximum of 64.
882
+ # * Each label must be a key-value pair.
883
+ # * Keys have a minimum length of 1 character and a maximum length of 63
884
+ # characters and cannot be empty. Values can be empty and have a maximum
885
+ # length of 63 characters.
886
+ # * Keys and values can contain only lowercase letters, numeric characters,
887
+ # underscores, and dashes. All characters must use UTF-8 encoding, and
888
+ # international characters are allowed.
889
+ # * The key portion of a label must be unique. However, you can use the same
890
+ # key with multiple resources.
891
+ # * Keys must start with a lowercase letter or international character.
833
892
  #
834
- # @!attribute [rw] endpoint
835
- # A custom service endpoint, as a hostname or hostname:port. The default is
836
- # nil, indicating to use the default endpoint in the current universe domain.
837
- # @return [::String,nil]
838
- # @!attribute [rw] credentials
839
- # Credentials to send with calls. You may provide any of the following types:
840
- # * (`String`) The path to a service account key file in JSON format
841
- # * (`Hash`) A service account key as a Hash
842
- # * (`Google::Auth::Credentials`) A googleauth credentials object
843
- # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
844
- # * (`Signet::OAuth2::Client`) A signet oauth2 client object
845
- # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
846
- # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
847
- # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
848
- # * (`nil`) indicating no credentials
849
- # @return [::Object]
850
- # @!attribute [rw] scope
851
- # The OAuth scopes
852
- # @return [::Array<::String>]
853
- # @!attribute [rw] lib_name
854
- # The library name as recorded in instrumentation and logging
855
- # @return [::String]
856
- # @!attribute [rw] lib_version
857
- # The library version as recorded in instrumentation and logging
858
- # @return [::String]
859
- # @!attribute [rw] channel_args
860
- # Extra parameters passed to the gRPC channel. Note: this is ignored if a
861
- # `GRPC::Core::Channel` object is provided as the credential.
862
- # @return [::Hash]
863
- # @!attribute [rw] interceptors
864
- # An array of interceptors that are run before calls are executed.
865
- # @return [::Array<::GRPC::ClientInterceptor>]
866
- # @!attribute [rw] timeout
867
- # The call timeout in seconds.
868
- # @return [::Numeric]
869
- # @!attribute [rw] metadata
870
- # Additional gRPC headers to be sent with the call.
871
- # @return [::Hash{::Symbol=>::String}]
872
- # @!attribute [rw] retry_policy
873
- # The retry policy. The value is a hash with the following keys:
874
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
875
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
876
- # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
877
- # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
878
- # trigger a retry.
879
- # @return [::Hash]
880
- # @!attribute [rw] quota_project
881
- # A separate project against which to charge quota.
882
- # @return [::String]
883
- # @!attribute [rw] universe_domain
884
- # The universe domain within which to make requests. This determines the
885
- # default endpoint URL. The default value of nil uses the environment
886
- # universe (usually the default "googleapis.com" universe).
887
- # @return [::String,nil]
893
+ # See [Google Cloud
894
+ # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
895
+ # for more details.
888
896
  #
889
- class Configuration
890
- extend ::Gapic::Config
897
+ # @yield [response, operation] Access the result along with the RPC operation
898
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryResponse]
899
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
900
+ #
901
+ # @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryResponse]
902
+ #
903
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
904
+ #
905
+ # @example Basic example
906
+ # require "google/cloud/discovery_engine/v1"
907
+ #
908
+ # # Create a client object. The client can be reused for multiple calls.
909
+ # client = Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client.new
910
+ #
911
+ # # Create a request. To set request fields, pass in keyword arguments.
912
+ # request = Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest.new
913
+ #
914
+ # # Call the answer_query method.
915
+ # result = client.answer_query request
916
+ #
917
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::AnswerQueryResponse.
918
+ # p result
919
+ #
920
+ def answer_query request, options = nil
921
+ raise ::ArgumentError, "request must be provided" if request.nil?
891
922
 
892
- # @private
893
- # The endpoint specific to the default "googleapis.com" universe. Deprecated.
894
- DEFAULT_ENDPOINT = "discoveryengine.googleapis.com"
923
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest
895
924
 
896
- config_attr :endpoint, nil, ::String, nil
897
- config_attr :credentials, nil do |value|
898
- allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
899
- allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
900
- allowed.any? { |klass| klass === value }
925
+ # Converts hash and nil to an options object
926
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
927
+
928
+ # Customize the options with defaults
929
+ metadata = @config.rpcs.answer_query.metadata.to_h
930
+
931
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
932
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
933
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
934
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
935
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
936
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
937
+
938
+ header_params = {}
939
+ if request.serving_config
940
+ header_params["serving_config"] = request.serving_config
901
941
  end
902
- config_attr :scope, nil, ::String, ::Array, nil
903
- config_attr :lib_name, nil, ::String, nil
904
- config_attr :lib_version, nil, ::String, nil
905
- config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
906
- config_attr :interceptors, nil, ::Array, nil
907
- config_attr :timeout, nil, ::Numeric, nil
908
- config_attr :metadata, nil, ::Hash, nil
909
- config_attr :retry_policy, nil, ::Hash, ::Proc, nil
910
- config_attr :quota_project, nil, ::String, nil
911
- config_attr :universe_domain, nil, ::String, nil
912
942
 
913
- # @private
914
- def initialize parent_config = nil
915
- @parent_config = parent_config unless parent_config.nil?
943
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
944
+ metadata[:"x-goog-request-params"] ||= request_params_header
916
945
 
917
- yield self if block_given?
946
+ options.apply_defaults timeout: @config.rpcs.answer_query.timeout,
947
+ metadata: metadata,
948
+ retry_policy: @config.rpcs.answer_query.retry_policy
949
+
950
+ options.apply_defaults timeout: @config.timeout,
951
+ metadata: @config.metadata,
952
+ retry_policy: @config.retry_policy
953
+
954
+ @conversational_search_service_stub.call_rpc :answer_query, request, options: options do |response, operation|
955
+ yield response, operation if block_given?
956
+ return response
918
957
  end
958
+ rescue ::GRPC::BadStatus => e
959
+ raise ::Google::Cloud::Error.from_error(e)
960
+ end
919
961
 
920
- ##
921
- # Configurations for individual RPCs
922
- # @return [Rpcs]
923
- #
924
- def rpcs
925
- @rpcs ||= begin
926
- parent_rpcs = nil
927
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
928
- Rpcs.new parent_rpcs
929
- end
962
+ ##
963
+ # Gets a Answer.
964
+ #
965
+ # @overload get_answer(request, options = nil)
966
+ # Pass arguments to `get_answer` via a request object, either of type
967
+ # {::Google::Cloud::DiscoveryEngine::V1::GetAnswerRequest} or an equivalent Hash.
968
+ #
969
+ # @param request [::Google::Cloud::DiscoveryEngine::V1::GetAnswerRequest, ::Hash]
970
+ # A request object representing the call parameters. Required. To specify no
971
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
972
+ # @param options [::Gapic::CallOptions, ::Hash]
973
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
974
+ #
975
+ # @overload get_answer(name: nil)
976
+ # Pass arguments to `get_answer` via keyword arguments. Note that at
977
+ # least one keyword argument is required. To specify no parameters, or to keep all
978
+ # the default parameter values, pass an empty Hash as a request object (see above).
979
+ #
980
+ # @param name [::String]
981
+ # Required. The resource name of the Answer to get. Format:
982
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`
983
+ #
984
+ # @yield [response, operation] Access the result along with the RPC operation
985
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::Answer]
986
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
987
+ #
988
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Answer]
989
+ #
990
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
991
+ #
992
+ # @example Basic example
993
+ # require "google/cloud/discovery_engine/v1"
994
+ #
995
+ # # Create a client object. The client can be reused for multiple calls.
996
+ # client = Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client.new
997
+ #
998
+ # # Create a request. To set request fields, pass in keyword arguments.
999
+ # request = Google::Cloud::DiscoveryEngine::V1::GetAnswerRequest.new
1000
+ #
1001
+ # # Call the get_answer method.
1002
+ # result = client.get_answer request
1003
+ #
1004
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Answer.
1005
+ # p result
1006
+ #
1007
+ def get_answer request, options = nil
1008
+ raise ::ArgumentError, "request must be provided" if request.nil?
1009
+
1010
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::GetAnswerRequest
1011
+
1012
+ # Converts hash and nil to an options object
1013
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1014
+
1015
+ # Customize the options with defaults
1016
+ metadata = @config.rpcs.get_answer.metadata.to_h
1017
+
1018
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1019
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1020
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1021
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
1022
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1023
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1024
+
1025
+ header_params = {}
1026
+ if request.name
1027
+ header_params["name"] = request.name
930
1028
  end
931
1029
 
932
- ##
933
- # Configuration for the channel pool
934
- # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
935
- #
936
- def channel_pool
937
- @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
1030
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1031
+ metadata[:"x-goog-request-params"] ||= request_params_header
1032
+
1033
+ options.apply_defaults timeout: @config.rpcs.get_answer.timeout,
1034
+ metadata: metadata,
1035
+ retry_policy: @config.rpcs.get_answer.retry_policy
1036
+
1037
+ options.apply_defaults timeout: @config.timeout,
1038
+ metadata: @config.metadata,
1039
+ retry_policy: @config.retry_policy
1040
+
1041
+ @conversational_search_service_stub.call_rpc :get_answer, request, options: options do |response, operation|
1042
+ yield response, operation if block_given?
1043
+ return response
938
1044
  end
1045
+ rescue ::GRPC::BadStatus => e
1046
+ raise ::Google::Cloud::Error.from_error(e)
1047
+ end
939
1048
 
940
- ##
941
- # Configuration RPC class for the ConversationalSearchService API.
942
- #
943
- # Includes fields providing the configuration for each RPC in this service.
944
- # Each configuration object is of type `Gapic::Config::Method` and includes
945
- # the following configuration fields:
946
- #
947
- # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
948
- # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
949
- # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
950
- # include the following keys:
951
- # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
952
- # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1049
+ ##
1050
+ # Creates a Session.
1051
+ #
1052
+ # If the {::Google::Cloud::DiscoveryEngine::V1::Session Session} to create already
1053
+ # exists, an ALREADY_EXISTS error is returned.
1054
+ #
1055
+ # @overload create_session(request, options = nil)
1056
+ # Pass arguments to `create_session` via a request object, either of type
1057
+ # {::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest} or an equivalent Hash.
1058
+ #
1059
+ # @param request [::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest, ::Hash]
1060
+ # A request object representing the call parameters. Required. To specify no
1061
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1062
+ # @param options [::Gapic::CallOptions, ::Hash]
1063
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1064
+ #
1065
+ # @overload create_session(parent: nil, session: nil)
1066
+ # Pass arguments to `create_session` via keyword arguments. Note that at
1067
+ # least one keyword argument is required. To specify no parameters, or to keep all
1068
+ # the default parameter values, pass an empty Hash as a request object (see above).
1069
+ #
1070
+ # @param parent [::String]
1071
+ # Required. Full resource name of parent data store. Format:
1072
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
1073
+ # @param session [::Google::Cloud::DiscoveryEngine::V1::Session, ::Hash]
1074
+ # Required. The session to create.
1075
+ #
1076
+ # @yield [response, operation] Access the result along with the RPC operation
1077
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::Session]
1078
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1079
+ #
1080
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Session]
1081
+ #
1082
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1083
+ #
1084
+ # @example Basic example
1085
+ # require "google/cloud/discovery_engine/v1"
1086
+ #
1087
+ # # Create a client object. The client can be reused for multiple calls.
1088
+ # client = Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client.new
1089
+ #
1090
+ # # Create a request. To set request fields, pass in keyword arguments.
1091
+ # request = Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest.new
1092
+ #
1093
+ # # Call the create_session method.
1094
+ # result = client.create_session request
1095
+ #
1096
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Session.
1097
+ # p result
1098
+ #
1099
+ def create_session request, options = nil
1100
+ raise ::ArgumentError, "request must be provided" if request.nil?
1101
+
1102
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::CreateSessionRequest
1103
+
1104
+ # Converts hash and nil to an options object
1105
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1106
+
1107
+ # Customize the options with defaults
1108
+ metadata = @config.rpcs.create_session.metadata.to_h
1109
+
1110
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1111
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1112
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1113
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
1114
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1115
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1116
+
1117
+ header_params = {}
1118
+ if request.parent
1119
+ header_params["parent"] = request.parent
1120
+ end
1121
+
1122
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1123
+ metadata[:"x-goog-request-params"] ||= request_params_header
1124
+
1125
+ options.apply_defaults timeout: @config.rpcs.create_session.timeout,
1126
+ metadata: metadata,
1127
+ retry_policy: @config.rpcs.create_session.retry_policy
1128
+
1129
+ options.apply_defaults timeout: @config.timeout,
1130
+ metadata: @config.metadata,
1131
+ retry_policy: @config.retry_policy
1132
+
1133
+ @conversational_search_service_stub.call_rpc :create_session, request, options: options do |response, operation|
1134
+ yield response, operation if block_given?
1135
+ return response
1136
+ end
1137
+ rescue ::GRPC::BadStatus => e
1138
+ raise ::Google::Cloud::Error.from_error(e)
1139
+ end
1140
+
1141
+ ##
1142
+ # Deletes a Session.
1143
+ #
1144
+ # If the {::Google::Cloud::DiscoveryEngine::V1::Session Session} to delete does
1145
+ # not exist, a NOT_FOUND error is returned.
1146
+ #
1147
+ # @overload delete_session(request, options = nil)
1148
+ # Pass arguments to `delete_session` via a request object, either of type
1149
+ # {::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest} or an equivalent Hash.
1150
+ #
1151
+ # @param request [::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest, ::Hash]
1152
+ # A request object representing the call parameters. Required. To specify no
1153
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1154
+ # @param options [::Gapic::CallOptions, ::Hash]
1155
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1156
+ #
1157
+ # @overload delete_session(name: nil)
1158
+ # Pass arguments to `delete_session` via keyword arguments. Note that at
1159
+ # least one keyword argument is required. To specify no parameters, or to keep all
1160
+ # the default parameter values, pass an empty Hash as a request object (see above).
1161
+ #
1162
+ # @param name [::String]
1163
+ # Required. The resource name of the Session to delete. Format:
1164
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
1165
+ #
1166
+ # @yield [response, operation] Access the result along with the RPC operation
1167
+ # @yieldparam response [::Google::Protobuf::Empty]
1168
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1169
+ #
1170
+ # @return [::Google::Protobuf::Empty]
1171
+ #
1172
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1173
+ #
1174
+ # @example Basic example
1175
+ # require "google/cloud/discovery_engine/v1"
1176
+ #
1177
+ # # Create a client object. The client can be reused for multiple calls.
1178
+ # client = Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client.new
1179
+ #
1180
+ # # Create a request. To set request fields, pass in keyword arguments.
1181
+ # request = Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest.new
1182
+ #
1183
+ # # Call the delete_session method.
1184
+ # result = client.delete_session request
1185
+ #
1186
+ # # The returned object is of type Google::Protobuf::Empty.
1187
+ # p result
1188
+ #
1189
+ def delete_session request, options = nil
1190
+ raise ::ArgumentError, "request must be provided" if request.nil?
1191
+
1192
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::DeleteSessionRequest
1193
+
1194
+ # Converts hash and nil to an options object
1195
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1196
+
1197
+ # Customize the options with defaults
1198
+ metadata = @config.rpcs.delete_session.metadata.to_h
1199
+
1200
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1201
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1202
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1203
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
1204
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1205
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1206
+
1207
+ header_params = {}
1208
+ if request.name
1209
+ header_params["name"] = request.name
1210
+ end
1211
+
1212
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1213
+ metadata[:"x-goog-request-params"] ||= request_params_header
1214
+
1215
+ options.apply_defaults timeout: @config.rpcs.delete_session.timeout,
1216
+ metadata: metadata,
1217
+ retry_policy: @config.rpcs.delete_session.retry_policy
1218
+
1219
+ options.apply_defaults timeout: @config.timeout,
1220
+ metadata: @config.metadata,
1221
+ retry_policy: @config.retry_policy
1222
+
1223
+ @conversational_search_service_stub.call_rpc :delete_session, request, options: options do |response, operation|
1224
+ yield response, operation if block_given?
1225
+ return response
1226
+ end
1227
+ rescue ::GRPC::BadStatus => e
1228
+ raise ::Google::Cloud::Error.from_error(e)
1229
+ end
1230
+
1231
+ ##
1232
+ # Updates a Session.
1233
+ #
1234
+ # {::Google::Cloud::DiscoveryEngine::V1::Session Session} action type cannot be
1235
+ # changed. If the {::Google::Cloud::DiscoveryEngine::V1::Session Session} to
1236
+ # update does not exist, a NOT_FOUND error is returned.
1237
+ #
1238
+ # @overload update_session(request, options = nil)
1239
+ # Pass arguments to `update_session` via a request object, either of type
1240
+ # {::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest} or an equivalent Hash.
1241
+ #
1242
+ # @param request [::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest, ::Hash]
1243
+ # A request object representing the call parameters. Required. To specify no
1244
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1245
+ # @param options [::Gapic::CallOptions, ::Hash]
1246
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1247
+ #
1248
+ # @overload update_session(session: nil, update_mask: nil)
1249
+ # Pass arguments to `update_session` via keyword arguments. Note that at
1250
+ # least one keyword argument is required. To specify no parameters, or to keep all
1251
+ # the default parameter values, pass an empty Hash as a request object (see above).
1252
+ #
1253
+ # @param session [::Google::Cloud::DiscoveryEngine::V1::Session, ::Hash]
1254
+ # Required. The Session to update.
1255
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1256
+ # Indicates which fields in the provided
1257
+ # {::Google::Cloud::DiscoveryEngine::V1::Session Session} to update. The following
1258
+ # are NOT supported:
1259
+ #
1260
+ # * {::Google::Cloud::DiscoveryEngine::V1::Session#name Session.name}
1261
+ #
1262
+ # If not set or empty, all supported fields are updated.
1263
+ #
1264
+ # @yield [response, operation] Access the result along with the RPC operation
1265
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::Session]
1266
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1267
+ #
1268
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Session]
1269
+ #
1270
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1271
+ #
1272
+ # @example Basic example
1273
+ # require "google/cloud/discovery_engine/v1"
1274
+ #
1275
+ # # Create a client object. The client can be reused for multiple calls.
1276
+ # client = Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client.new
1277
+ #
1278
+ # # Create a request. To set request fields, pass in keyword arguments.
1279
+ # request = Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest.new
1280
+ #
1281
+ # # Call the update_session method.
1282
+ # result = client.update_session request
1283
+ #
1284
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Session.
1285
+ # p result
1286
+ #
1287
+ def update_session request, options = nil
1288
+ raise ::ArgumentError, "request must be provided" if request.nil?
1289
+
1290
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::UpdateSessionRequest
1291
+
1292
+ # Converts hash and nil to an options object
1293
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1294
+
1295
+ # Customize the options with defaults
1296
+ metadata = @config.rpcs.update_session.metadata.to_h
1297
+
1298
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1299
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1300
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1301
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
1302
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1303
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1304
+
1305
+ header_params = {}
1306
+ if request.session&.name
1307
+ header_params["session.name"] = request.session.name
1308
+ end
1309
+
1310
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1311
+ metadata[:"x-goog-request-params"] ||= request_params_header
1312
+
1313
+ options.apply_defaults timeout: @config.rpcs.update_session.timeout,
1314
+ metadata: metadata,
1315
+ retry_policy: @config.rpcs.update_session.retry_policy
1316
+
1317
+ options.apply_defaults timeout: @config.timeout,
1318
+ metadata: @config.metadata,
1319
+ retry_policy: @config.retry_policy
1320
+
1321
+ @conversational_search_service_stub.call_rpc :update_session, request, options: options do |response, operation|
1322
+ yield response, operation if block_given?
1323
+ return response
1324
+ end
1325
+ rescue ::GRPC::BadStatus => e
1326
+ raise ::Google::Cloud::Error.from_error(e)
1327
+ end
1328
+
1329
+ ##
1330
+ # Gets a Session.
1331
+ #
1332
+ # @overload get_session(request, options = nil)
1333
+ # Pass arguments to `get_session` via a request object, either of type
1334
+ # {::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest} or an equivalent Hash.
1335
+ #
1336
+ # @param request [::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest, ::Hash]
1337
+ # A request object representing the call parameters. Required. To specify no
1338
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1339
+ # @param options [::Gapic::CallOptions, ::Hash]
1340
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1341
+ #
1342
+ # @overload get_session(name: nil)
1343
+ # Pass arguments to `get_session` via keyword arguments. Note that at
1344
+ # least one keyword argument is required. To specify no parameters, or to keep all
1345
+ # the default parameter values, pass an empty Hash as a request object (see above).
1346
+ #
1347
+ # @param name [::String]
1348
+ # Required. The resource name of the Session to get. Format:
1349
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
1350
+ #
1351
+ # @yield [response, operation] Access the result along with the RPC operation
1352
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::Session]
1353
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1354
+ #
1355
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Session]
1356
+ #
1357
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1358
+ #
1359
+ # @example Basic example
1360
+ # require "google/cloud/discovery_engine/v1"
1361
+ #
1362
+ # # Create a client object. The client can be reused for multiple calls.
1363
+ # client = Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client.new
1364
+ #
1365
+ # # Create a request. To set request fields, pass in keyword arguments.
1366
+ # request = Google::Cloud::DiscoveryEngine::V1::GetSessionRequest.new
1367
+ #
1368
+ # # Call the get_session method.
1369
+ # result = client.get_session request
1370
+ #
1371
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Session.
1372
+ # p result
1373
+ #
1374
+ def get_session request, options = nil
1375
+ raise ::ArgumentError, "request must be provided" if request.nil?
1376
+
1377
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::GetSessionRequest
1378
+
1379
+ # Converts hash and nil to an options object
1380
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1381
+
1382
+ # Customize the options with defaults
1383
+ metadata = @config.rpcs.get_session.metadata.to_h
1384
+
1385
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1386
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1387
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1388
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
1389
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1390
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1391
+
1392
+ header_params = {}
1393
+ if request.name
1394
+ header_params["name"] = request.name
1395
+ end
1396
+
1397
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1398
+ metadata[:"x-goog-request-params"] ||= request_params_header
1399
+
1400
+ options.apply_defaults timeout: @config.rpcs.get_session.timeout,
1401
+ metadata: metadata,
1402
+ retry_policy: @config.rpcs.get_session.retry_policy
1403
+
1404
+ options.apply_defaults timeout: @config.timeout,
1405
+ metadata: @config.metadata,
1406
+ retry_policy: @config.retry_policy
1407
+
1408
+ @conversational_search_service_stub.call_rpc :get_session, request, options: options do |response, operation|
1409
+ yield response, operation if block_given?
1410
+ return response
1411
+ end
1412
+ rescue ::GRPC::BadStatus => e
1413
+ raise ::Google::Cloud::Error.from_error(e)
1414
+ end
1415
+
1416
+ ##
1417
+ # Lists all Sessions by their parent
1418
+ # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}.
1419
+ #
1420
+ # @overload list_sessions(request, options = nil)
1421
+ # Pass arguments to `list_sessions` via a request object, either of type
1422
+ # {::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest} or an equivalent Hash.
1423
+ #
1424
+ # @param request [::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest, ::Hash]
1425
+ # A request object representing the call parameters. Required. To specify no
1426
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1427
+ # @param options [::Gapic::CallOptions, ::Hash]
1428
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1429
+ #
1430
+ # @overload list_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1431
+ # Pass arguments to `list_sessions` via keyword arguments. Note that at
1432
+ # least one keyword argument is required. To specify no parameters, or to keep all
1433
+ # the default parameter values, pass an empty Hash as a request object (see above).
1434
+ #
1435
+ # @param parent [::String]
1436
+ # Required. The data store resource name. Format:
1437
+ # `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
1438
+ # @param page_size [::Integer]
1439
+ # Maximum number of results to return. If unspecified, defaults
1440
+ # to 50. Max allowed value is 1000.
1441
+ # @param page_token [::String]
1442
+ # A page token, received from a previous `ListSessions` call.
1443
+ # Provide this to retrieve the subsequent page.
1444
+ # @param filter [::String]
1445
+ # A filter to apply on the list results. The supported features are:
1446
+ # user_pseudo_id, state.
1447
+ #
1448
+ # Example:
1449
+ # "user_pseudo_id = some_id"
1450
+ # @param order_by [::String]
1451
+ # A comma-separated list of fields to order by, sorted in ascending order.
1452
+ # Use "desc" after a field name for descending.
1453
+ # Supported fields:
1454
+ # * `update_time`
1455
+ # * `create_time`
1456
+ # * `session_name`
1457
+ #
1458
+ # Example:
1459
+ # "update_time desc"
1460
+ # "create_time"
1461
+ #
1462
+ # @yield [response, operation] Access the result along with the RPC operation
1463
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::Session>]
1464
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1465
+ #
1466
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::Session>]
1467
+ #
1468
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1469
+ #
1470
+ # @example Basic example
1471
+ # require "google/cloud/discovery_engine/v1"
1472
+ #
1473
+ # # Create a client object. The client can be reused for multiple calls.
1474
+ # client = Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client.new
1475
+ #
1476
+ # # Create a request. To set request fields, pass in keyword arguments.
1477
+ # request = Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest.new
1478
+ #
1479
+ # # Call the list_sessions method.
1480
+ # result = client.list_sessions request
1481
+ #
1482
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1483
+ # # over elements, and API calls will be issued to fetch pages as needed.
1484
+ # result.each do |item|
1485
+ # # Each element is of type ::Google::Cloud::DiscoveryEngine::V1::Session.
1486
+ # p item
1487
+ # end
1488
+ #
1489
+ def list_sessions request, options = nil
1490
+ raise ::ArgumentError, "request must be provided" if request.nil?
1491
+
1492
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::ListSessionsRequest
1493
+
1494
+ # Converts hash and nil to an options object
1495
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1496
+
1497
+ # Customize the options with defaults
1498
+ metadata = @config.rpcs.list_sessions.metadata.to_h
1499
+
1500
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1501
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1502
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1503
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
1504
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1505
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1506
+
1507
+ header_params = {}
1508
+ if request.parent
1509
+ header_params["parent"] = request.parent
1510
+ end
1511
+
1512
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1513
+ metadata[:"x-goog-request-params"] ||= request_params_header
1514
+
1515
+ options.apply_defaults timeout: @config.rpcs.list_sessions.timeout,
1516
+ metadata: metadata,
1517
+ retry_policy: @config.rpcs.list_sessions.retry_policy
1518
+
1519
+ options.apply_defaults timeout: @config.timeout,
1520
+ metadata: @config.metadata,
1521
+ retry_policy: @config.retry_policy
1522
+
1523
+ @conversational_search_service_stub.call_rpc :list_sessions, request, options: options do |response, operation|
1524
+ response = ::Gapic::PagedEnumerable.new @conversational_search_service_stub, :list_sessions, request, response, operation, options
1525
+ yield response, operation if block_given?
1526
+ return response
1527
+ end
1528
+ rescue ::GRPC::BadStatus => e
1529
+ raise ::Google::Cloud::Error.from_error(e)
1530
+ end
1531
+
1532
+ ##
1533
+ # Configuration class for the ConversationalSearchService API.
1534
+ #
1535
+ # This class represents the configuration for ConversationalSearchService,
1536
+ # providing control over timeouts, retry behavior, logging, transport
1537
+ # parameters, and other low-level controls. Certain parameters can also be
1538
+ # applied individually to specific RPCs. See
1539
+ # {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client::Configuration::Rpcs}
1540
+ # for a list of RPCs that can be configured independently.
1541
+ #
1542
+ # Configuration can be applied globally to all clients, or to a single client
1543
+ # on construction.
1544
+ #
1545
+ # @example
1546
+ #
1547
+ # # Modify the global config, setting the timeout for
1548
+ # # converse_conversation to 20 seconds,
1549
+ # # and all remaining timeouts to 10 seconds.
1550
+ # ::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client.configure do |config|
1551
+ # config.timeout = 10.0
1552
+ # config.rpcs.converse_conversation.timeout = 20.0
1553
+ # end
1554
+ #
1555
+ # # Apply the above configuration only to a new client.
1556
+ # client = ::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client.new do |config|
1557
+ # config.timeout = 10.0
1558
+ # config.rpcs.converse_conversation.timeout = 20.0
1559
+ # end
1560
+ #
1561
+ # @!attribute [rw] endpoint
1562
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1563
+ # nil, indicating to use the default endpoint in the current universe domain.
1564
+ # @return [::String,nil]
1565
+ # @!attribute [rw] credentials
1566
+ # Credentials to send with calls. You may provide any of the following types:
1567
+ # * (`String`) The path to a service account key file in JSON format
1568
+ # * (`Hash`) A service account key as a Hash
1569
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1570
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1571
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1572
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1573
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1574
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1575
+ # * (`nil`) indicating no credentials
1576
+ # @return [::Object]
1577
+ # @!attribute [rw] scope
1578
+ # The OAuth scopes
1579
+ # @return [::Array<::String>]
1580
+ # @!attribute [rw] lib_name
1581
+ # The library name as recorded in instrumentation and logging
1582
+ # @return [::String]
1583
+ # @!attribute [rw] lib_version
1584
+ # The library version as recorded in instrumentation and logging
1585
+ # @return [::String]
1586
+ # @!attribute [rw] channel_args
1587
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1588
+ # `GRPC::Core::Channel` object is provided as the credential.
1589
+ # @return [::Hash]
1590
+ # @!attribute [rw] interceptors
1591
+ # An array of interceptors that are run before calls are executed.
1592
+ # @return [::Array<::GRPC::ClientInterceptor>]
1593
+ # @!attribute [rw] timeout
1594
+ # The call timeout in seconds.
1595
+ # @return [::Numeric]
1596
+ # @!attribute [rw] metadata
1597
+ # Additional gRPC headers to be sent with the call.
1598
+ # @return [::Hash{::Symbol=>::String}]
1599
+ # @!attribute [rw] retry_policy
1600
+ # The retry policy. The value is a hash with the following keys:
1601
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1602
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1603
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1604
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1605
+ # trigger a retry.
1606
+ # @return [::Hash]
1607
+ # @!attribute [rw] quota_project
1608
+ # A separate project against which to charge quota.
1609
+ # @return [::String]
1610
+ # @!attribute [rw] universe_domain
1611
+ # The universe domain within which to make requests. This determines the
1612
+ # default endpoint URL. The default value of nil uses the environment
1613
+ # universe (usually the default "googleapis.com" universe).
1614
+ # @return [::String,nil]
1615
+ #
1616
+ class Configuration
1617
+ extend ::Gapic::Config
1618
+
1619
+ # @private
1620
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1621
+ DEFAULT_ENDPOINT = "discoveryengine.googleapis.com"
1622
+
1623
+ config_attr :endpoint, nil, ::String, nil
1624
+ config_attr :credentials, nil do |value|
1625
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1626
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1627
+ allowed.any? { |klass| klass === value }
1628
+ end
1629
+ config_attr :scope, nil, ::String, ::Array, nil
1630
+ config_attr :lib_name, nil, ::String, nil
1631
+ config_attr :lib_version, nil, ::String, nil
1632
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1633
+ config_attr :interceptors, nil, ::Array, nil
1634
+ config_attr :timeout, nil, ::Numeric, nil
1635
+ config_attr :metadata, nil, ::Hash, nil
1636
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1637
+ config_attr :quota_project, nil, ::String, nil
1638
+ config_attr :universe_domain, nil, ::String, nil
1639
+
1640
+ # @private
1641
+ def initialize parent_config = nil
1642
+ @parent_config = parent_config unless parent_config.nil?
1643
+
1644
+ yield self if block_given?
1645
+ end
1646
+
1647
+ ##
1648
+ # Configurations for individual RPCs
1649
+ # @return [Rpcs]
1650
+ #
1651
+ def rpcs
1652
+ @rpcs ||= begin
1653
+ parent_rpcs = nil
1654
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1655
+ Rpcs.new parent_rpcs
1656
+ end
1657
+ end
1658
+
1659
+ ##
1660
+ # Configuration for the channel pool
1661
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
1662
+ #
1663
+ def channel_pool
1664
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
1665
+ end
1666
+
1667
+ ##
1668
+ # Configuration RPC class for the ConversationalSearchService API.
1669
+ #
1670
+ # Includes fields providing the configuration for each RPC in this service.
1671
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1672
+ # the following configuration fields:
1673
+ #
1674
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1675
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1676
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1677
+ # include the following keys:
1678
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1679
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
953
1680
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
954
1681
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
955
1682
  # trigger a retry.
@@ -985,6 +1712,41 @@ module Google
985
1712
  # @return [::Gapic::Config::Method]
986
1713
  #
987
1714
  attr_reader :list_conversations
1715
+ ##
1716
+ # RPC-specific configuration for `answer_query`
1717
+ # @return [::Gapic::Config::Method]
1718
+ #
1719
+ attr_reader :answer_query
1720
+ ##
1721
+ # RPC-specific configuration for `get_answer`
1722
+ # @return [::Gapic::Config::Method]
1723
+ #
1724
+ attr_reader :get_answer
1725
+ ##
1726
+ # RPC-specific configuration for `create_session`
1727
+ # @return [::Gapic::Config::Method]
1728
+ #
1729
+ attr_reader :create_session
1730
+ ##
1731
+ # RPC-specific configuration for `delete_session`
1732
+ # @return [::Gapic::Config::Method]
1733
+ #
1734
+ attr_reader :delete_session
1735
+ ##
1736
+ # RPC-specific configuration for `update_session`
1737
+ # @return [::Gapic::Config::Method]
1738
+ #
1739
+ attr_reader :update_session
1740
+ ##
1741
+ # RPC-specific configuration for `get_session`
1742
+ # @return [::Gapic::Config::Method]
1743
+ #
1744
+ attr_reader :get_session
1745
+ ##
1746
+ # RPC-specific configuration for `list_sessions`
1747
+ # @return [::Gapic::Config::Method]
1748
+ #
1749
+ attr_reader :list_sessions
988
1750
 
989
1751
  # @private
990
1752
  def initialize parent_rpcs = nil
@@ -1000,6 +1762,20 @@ module Google
1000
1762
  @get_conversation = ::Gapic::Config::Method.new get_conversation_config
1001
1763
  list_conversations_config = parent_rpcs.list_conversations if parent_rpcs.respond_to? :list_conversations
1002
1764
  @list_conversations = ::Gapic::Config::Method.new list_conversations_config
1765
+ answer_query_config = parent_rpcs.answer_query if parent_rpcs.respond_to? :answer_query
1766
+ @answer_query = ::Gapic::Config::Method.new answer_query_config
1767
+ get_answer_config = parent_rpcs.get_answer if parent_rpcs.respond_to? :get_answer
1768
+ @get_answer = ::Gapic::Config::Method.new get_answer_config
1769
+ create_session_config = parent_rpcs.create_session if parent_rpcs.respond_to? :create_session
1770
+ @create_session = ::Gapic::Config::Method.new create_session_config
1771
+ delete_session_config = parent_rpcs.delete_session if parent_rpcs.respond_to? :delete_session
1772
+ @delete_session = ::Gapic::Config::Method.new delete_session_config
1773
+ update_session_config = parent_rpcs.update_session if parent_rpcs.respond_to? :update_session
1774
+ @update_session = ::Gapic::Config::Method.new update_session_config
1775
+ get_session_config = parent_rpcs.get_session if parent_rpcs.respond_to? :get_session
1776
+ @get_session = ::Gapic::Config::Method.new get_session_config
1777
+ list_sessions_config = parent_rpcs.list_sessions if parent_rpcs.respond_to? :list_sessions
1778
+ @list_sessions = ::Gapic::Config::Method.new list_sessions_config
1003
1779
 
1004
1780
  yield self if block_given?
1005
1781
  end