google-cloud-discovery_engine-v1beta 0.27.0 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +4 -4
  3. data/README.md +4 -4
  4. data/lib/google/cloud/discovery_engine/v1beta/acl_config_service/client.rb +591 -0
  5. data/lib/google/cloud/discovery_engine/v1beta/acl_config_service/credentials.rb +49 -0
  6. data/lib/google/cloud/discovery_engine/v1beta/acl_config_service/paths.rb +50 -0
  7. data/lib/google/cloud/discovery_engine/v1beta/acl_config_service/rest/client.rb +534 -0
  8. data/lib/google/cloud/discovery_engine/v1beta/acl_config_service/rest/service_stub.rb +204 -0
  9. data/lib/google/cloud/discovery_engine/v1beta/acl_config_service/rest.rb +52 -0
  10. data/lib/google/cloud/discovery_engine/v1beta/acl_config_service.rb +55 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/assistant_service/client.rb +1058 -0
  12. data/lib/google/cloud/discovery_engine/v1beta/assistant_service/credentials.rb +50 -0
  13. data/lib/google/cloud/discovery_engine/v1beta/assistant_service/paths.rb +230 -0
  14. data/lib/google/cloud/discovery_engine/v1beta/assistant_service/rest/client.rb +975 -0
  15. data/lib/google/cloud/discovery_engine/v1beta/assistant_service/rest/service_stub.rb +444 -0
  16. data/lib/google/cloud/discovery_engine/v1beta/assistant_service/rest.rb +52 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/assistant_service.rb +55 -0
  18. data/lib/google/cloud/discovery_engine/v1beta/cmek_config_service/client.rb +823 -0
  19. data/lib/google/cloud/discovery_engine/v1beta/cmek_config_service/credentials.rb +49 -0
  20. data/lib/google/cloud/discovery_engine/v1beta/cmek_config_service/operations.rb +843 -0
  21. data/lib/google/cloud/discovery_engine/v1beta/cmek_config_service/paths.rb +135 -0
  22. data/lib/google/cloud/discovery_engine/v1beta/cmek_config_service/rest/client.rb +752 -0
  23. data/lib/google/cloud/discovery_engine/v1beta/cmek_config_service/rest/operations.rb +1152 -0
  24. data/lib/google/cloud/discovery_engine/v1beta/cmek_config_service/rest/service_stub.rb +341 -0
  25. data/lib/google/cloud/discovery_engine/v1beta/cmek_config_service/rest.rb +53 -0
  26. data/lib/google/cloud/discovery_engine/v1beta/cmek_config_service.rb +56 -0
  27. data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +146 -12
  28. data/lib/google/cloud/discovery_engine/v1beta/completion_service/credentials.rb +5 -1
  29. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +139 -12
  30. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb +21 -0
  31. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/service_stub.rb +62 -0
  32. data/lib/google/cloud/discovery_engine/v1beta/control_service/credentials.rb +3 -1
  33. data/lib/google/cloud/discovery_engine/v1beta/control_service/paths.rb +53 -0
  34. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +210 -10
  35. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/credentials.rb +3 -1
  36. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +46 -0
  37. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +205 -10
  38. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +72 -0
  39. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb +11 -1
  40. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/credentials.rb +3 -1
  41. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/paths.rb +104 -0
  42. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/client.rb +11 -1
  43. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb +21 -0
  44. data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +8 -3
  45. data/lib/google/cloud/discovery_engine/v1beta/document_service/credentials.rb +3 -1
  46. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +8 -3
  47. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +21 -0
  48. data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +224 -6
  49. data/lib/google/cloud/discovery_engine/v1beta/engine_service/credentials.rb +3 -1
  50. data/lib/google/cloud/discovery_engine/v1beta/engine_service/paths.rb +104 -0
  51. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +210 -6
  52. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb +21 -0
  53. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/service_stub.rb +123 -0
  54. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/client.rb +11 -9
  55. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/credentials.rb +4 -1
  56. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/paths.rb +21 -0
  57. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/rest/client.rb +11 -9
  58. data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/rest/operations.rb +21 -0
  59. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/credentials.rb +3 -1
  60. data/lib/google/cloud/discovery_engine/v1beta/identity_mapping_store_service/client.rb +1180 -0
  61. data/lib/google/cloud/discovery_engine/v1beta/identity_mapping_store_service/credentials.rb +49 -0
  62. data/lib/google/cloud/discovery_engine/v1beta/identity_mapping_store_service/operations.rb +843 -0
  63. data/lib/google/cloud/discovery_engine/v1beta/identity_mapping_store_service/paths.rb +154 -0
  64. data/lib/google/cloud/discovery_engine/v1beta/identity_mapping_store_service/rest/client.rb +1088 -0
  65. data/lib/google/cloud/discovery_engine/v1beta/identity_mapping_store_service/rest/operations.rb +1152 -0
  66. data/lib/google/cloud/discovery_engine/v1beta/identity_mapping_store_service/rest/service_stub.rb +511 -0
  67. data/lib/google/cloud/discovery_engine/v1beta/identity_mapping_store_service/rest.rb +53 -0
  68. data/lib/google/cloud/discovery_engine/v1beta/identity_mapping_store_service.rb +56 -0
  69. data/lib/google/cloud/discovery_engine/v1beta/license_config_service/client.rb +1050 -0
  70. data/lib/google/cloud/discovery_engine/v1beta/license_config_service/credentials.rb +49 -0
  71. data/lib/google/cloud/discovery_engine/v1beta/license_config_service/paths.rb +86 -0
  72. data/lib/google/cloud/discovery_engine/v1beta/license_config_service/rest/client.rb +965 -0
  73. data/lib/google/cloud/discovery_engine/v1beta/license_config_service/rest/service_stub.rb +451 -0
  74. data/lib/google/cloud/discovery_engine/v1beta/license_config_service/rest.rb +52 -0
  75. data/lib/google/cloud/discovery_engine/v1beta/license_config_service.rb +55 -0
  76. data/lib/google/cloud/discovery_engine/v1beta/project_service/client.rb +3 -1
  77. data/lib/google/cloud/discovery_engine/v1beta/project_service/credentials.rb +3 -1
  78. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/client.rb +3 -1
  79. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/operations.rb +21 -0
  80. data/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb +2 -2
  81. data/lib/google/cloud/discovery_engine/v1beta/rank_service/credentials.rb +3 -1
  82. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb +2 -2
  83. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +2 -2
  84. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/credentials.rb +3 -1
  85. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +2 -2
  86. data/lib/google/cloud/discovery_engine/v1beta/rest.rb +10 -3
  87. data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/credentials.rb +3 -1
  88. data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/rest/operations.rb +21 -0
  89. data/lib/google/cloud/discovery_engine/v1beta/sample_query_set_service/credentials.rb +3 -1
  90. data/lib/google/cloud/discovery_engine/v1beta/schema_service/credentials.rb +3 -1
  91. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +21 -0
  92. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +194 -38
  93. data/lib/google/cloud/discovery_engine/v1beta/search_service/credentials.rb +4 -1
  94. data/lib/google/cloud/discovery_engine/v1beta/search_service/paths.rb +21 -0
  95. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +194 -38
  96. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/credentials.rb +3 -1
  97. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb +21 -0
  98. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +207 -3
  99. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/credentials.rb +3 -1
  100. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +193 -3
  101. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/service_stub.rb +153 -0
  102. data/lib/google/cloud/discovery_engine/v1beta/session_service/client.rb +25 -9
  103. data/lib/google/cloud/discovery_engine/v1beta/session_service/credentials.rb +4 -1
  104. data/lib/google/cloud/discovery_engine/v1beta/session_service/paths.rb +46 -0
  105. data/lib/google/cloud/discovery_engine/v1beta/session_service/rest/client.rb +25 -9
  106. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb +1 -3
  107. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/credentials.rb +3 -1
  108. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb +1 -3
  109. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb +21 -0
  110. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/service_stub.rb +7 -0
  111. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +23 -11
  112. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/credentials.rb +4 -1
  113. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +23 -11
  114. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +21 -0
  115. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/service_stub.rb +8 -0
  116. data/lib/google/cloud/discovery_engine/v1beta/user_license_service/client.rb +768 -0
  117. data/lib/google/cloud/discovery_engine/v1beta/user_license_service/credentials.rb +49 -0
  118. data/lib/google/cloud/discovery_engine/v1beta/user_license_service/operations.rb +843 -0
  119. data/lib/google/cloud/discovery_engine/v1beta/user_license_service/paths.rb +71 -0
  120. data/lib/google/cloud/discovery_engine/v1beta/user_license_service/rest/client.rb +704 -0
  121. data/lib/google/cloud/discovery_engine/v1beta/user_license_service/rest/operations.rb +1152 -0
  122. data/lib/google/cloud/discovery_engine/v1beta/user_license_service/rest/service_stub.rb +265 -0
  123. data/lib/google/cloud/discovery_engine/v1beta/user_license_service/rest.rb +53 -0
  124. data/lib/google/cloud/discovery_engine/v1beta/user_license_service.rb +56 -0
  125. data/lib/google/cloud/discovery_engine/v1beta/user_store_service/client.rb +590 -0
  126. data/lib/google/cloud/discovery_engine/v1beta/user_store_service/credentials.rb +49 -0
  127. data/lib/google/cloud/discovery_engine/v1beta/user_store_service/paths.rb +71 -0
  128. data/lib/google/cloud/discovery_engine/v1beta/user_store_service/rest/client.rb +533 -0
  129. data/lib/google/cloud/discovery_engine/v1beta/user_store_service/rest/service_stub.rb +204 -0
  130. data/lib/google/cloud/discovery_engine/v1beta/user_store_service/rest.rb +52 -0
  131. data/lib/google/cloud/discovery_engine/v1beta/user_store_service.rb +55 -0
  132. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  133. data/lib/google/cloud/discovery_engine/v1beta.rb +11 -4
  134. data/lib/google/cloud/discoveryengine/v1beta/acl_config_pb.rb +25 -0
  135. data/lib/google/cloud/discoveryengine/v1beta/acl_config_service_pb.rb +28 -0
  136. data/lib/google/cloud/discoveryengine/v1beta/acl_config_service_services_pb.rb +49 -0
  137. data/lib/google/cloud/discoveryengine/v1beta/agent_gateway_setting_pb.rb +25 -0
  138. data/lib/google/cloud/discoveryengine/v1beta/answer_pb.rb +6 -1
  139. data/lib/google/cloud/discoveryengine/v1beta/assist_answer_pb.rb +48 -0
  140. data/lib/google/cloud/discoveryengine/v1beta/assistant_pb.rb +35 -0
  141. data/lib/google/cloud/discoveryengine/v1beta/assistant_service_pb.rb +48 -0
  142. data/lib/google/cloud/discoveryengine/v1beta/assistant_service_services_pb.rb +56 -0
  143. data/lib/google/cloud/discoveryengine/v1beta/chunk_pb.rb +4 -1
  144. data/lib/google/cloud/discoveryengine/v1beta/cmek_config_service_pb.rb +39 -0
  145. data/lib/google/cloud/discoveryengine/v1beta/cmek_config_service_services_pb.rb +55 -0
  146. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +12 -1
  147. data/lib/google/cloud/discoveryengine/v1beta/completion_service_pb.rb +4 -1
  148. data/lib/google/cloud/discoveryengine/v1beta/completion_service_services_pb.rb +6 -0
  149. data/lib/google/cloud/discoveryengine/v1beta/control_pb.rb +6 -1
  150. data/lib/google/cloud/discoveryengine/v1beta/control_service_pb.rb +1 -1
  151. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +12 -1
  152. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb.rb +8 -0
  153. data/lib/google/cloud/discoveryengine/v1beta/data_store_pb.rb +11 -1
  154. data/lib/google/cloud/discoveryengine/v1beta/data_store_service_pb.rb +1 -1
  155. data/lib/google/cloud/discoveryengine/v1beta/document_pb.rb +4 -1
  156. data/lib/google/cloud/discoveryengine/v1beta/document_processing_config_pb.rb +1 -1
  157. data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +1 -1
  158. data/lib/google/cloud/discoveryengine/v1beta/engine_pb.rb +17 -1
  159. data/lib/google/cloud/discoveryengine/v1beta/engine_service_pb.rb +3 -1
  160. data/lib/google/cloud/discoveryengine/v1beta/engine_service_services_pb.rb +28 -6
  161. data/lib/google/cloud/discoveryengine/v1beta/evaluation_pb.rb +1 -1
  162. data/lib/google/cloud/discoveryengine/v1beta/evaluation_service_pb.rb +1 -1
  163. data/lib/google/cloud/discoveryengine/v1beta/feedback_pb.rb +28 -0
  164. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_pb.rb +11 -1
  165. data/lib/google/cloud/discoveryengine/v1beta/grounding_pb.rb +1 -1
  166. data/lib/google/cloud/discoveryengine/v1beta/identity_mapping_store_pb.rb +26 -0
  167. data/lib/google/cloud/discoveryengine/v1beta/identity_mapping_store_service_pb.rb +44 -0
  168. data/lib/google/cloud/discoveryengine/v1beta/identity_mapping_store_service_services_pb.rb +58 -0
  169. data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +1 -1
  170. data/lib/google/cloud/discoveryengine/v1beta/license_config_pb.rb +27 -0
  171. data/lib/google/cloud/discoveryengine/v1beta/license_config_service_pb.rb +36 -0
  172. data/lib/google/cloud/discoveryengine/v1beta/license_config_service_services_pb.rb +65 -0
  173. data/lib/google/cloud/discoveryengine/v1beta/logging_pb.rb +24 -0
  174. data/lib/google/cloud/discoveryengine/v1beta/project_pb.rb +10 -1
  175. data/lib/google/cloud/discoveryengine/v1beta/project_service_pb.rb +2 -1
  176. data/lib/google/cloud/discoveryengine/v1beta/rank_service_pb.rb +1 -1
  177. data/lib/google/cloud/discoveryengine/v1beta/recommendation_service_pb.rb +1 -1
  178. data/lib/google/cloud/discoveryengine/v1beta/safety_pb.rb +26 -0
  179. data/lib/google/cloud/discoveryengine/v1beta/sample_query_service_pb.rb +1 -1
  180. data/lib/google/cloud/discoveryengine/v1beta/sample_query_set_service_pb.rb +1 -1
  181. data/lib/google/cloud/discoveryengine/v1beta/schema_service_pb.rb +1 -1
  182. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +18 -2
  183. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_pb.rb +1 -1
  184. data/lib/google/cloud/discoveryengine/v1beta/serving_config_pb.rb +3 -1
  185. data/lib/google/cloud/discoveryengine/v1beta/serving_config_service_pb.rb +4 -1
  186. data/lib/google/cloud/discoveryengine/v1beta/serving_config_service_services_pb.rb +14 -0
  187. data/lib/google/cloud/discoveryengine/v1beta/session_pb.rb +2 -1
  188. data/lib/google/cloud/discoveryengine/v1beta/session_service_pb.rb +1 -1
  189. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_pb.rb +1 -1
  190. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_service_pb.rb +1 -1
  191. data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +2 -1
  192. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +1 -1
  193. data/lib/google/cloud/discoveryengine/v1beta/user_license_pb.rb +27 -0
  194. data/lib/google/cloud/discoveryengine/v1beta/user_license_service_pb.rb +38 -0
  195. data/lib/google/cloud/discoveryengine/v1beta/user_license_service_services_pb.rb +52 -0
  196. data/lib/google/cloud/discoveryengine/v1beta/user_store_pb.rb +24 -0
  197. data/lib/google/cloud/discoveryengine/v1beta/user_store_service_pb.rb +29 -0
  198. data/lib/google/cloud/discoveryengine/v1beta/user_store_service_services_pb.rb +47 -0
  199. data/proto_docs/google/cloud/discoveryengine/v1beta/acl_config.rb +43 -0
  200. data/proto_docs/google/cloud/discoveryengine/v1beta/acl_config_service.rb +49 -0
  201. data/proto_docs/google/cloud/discoveryengine/v1beta/agent_gateway_setting.rb +53 -0
  202. data/proto_docs/google/cloud/discoveryengine/v1beta/answer.rb +117 -2
  203. data/proto_docs/google/cloud/discoveryengine/v1beta/assist_answer.rb +401 -0
  204. data/proto_docs/google/cloud/discoveryengine/v1beta/assistant.rb +253 -0
  205. data/proto_docs/google/cloud/discoveryengine/v1beta/assistant_service.rb +368 -0
  206. data/proto_docs/google/cloud/discoveryengine/v1beta/chunk.rb +60 -1
  207. data/proto_docs/google/cloud/discoveryengine/v1beta/cmek_config_service.rb +228 -0
  208. data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +223 -0
  209. data/proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb +115 -13
  210. data/proto_docs/google/cloud/discoveryengine/v1beta/control.rb +119 -6
  211. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +178 -8
  212. data/proto_docs/google/cloud/discoveryengine/v1beta/data_store.rb +218 -9
  213. data/proto_docs/google/cloud/discoveryengine/v1beta/data_store_service.rb +12 -0
  214. data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +115 -10
  215. data/proto_docs/google/cloud/discoveryengine/v1beta/document_processing_config.rb +30 -0
  216. data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +1 -1
  217. data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +388 -8
  218. data/proto_docs/google/cloud/discoveryengine/v1beta/evaluation.rb +2 -2
  219. data/proto_docs/google/cloud/discoveryengine/v1beta/evaluation_service.rb +13 -11
  220. data/proto_docs/google/cloud/discoveryengine/v1beta/feedback.rb +147 -0
  221. data/proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb +190 -9
  222. data/proto_docs/google/cloud/discoveryengine/v1beta/grounding.rb +9 -0
  223. data/proto_docs/google/cloud/discoveryengine/v1beta/identity_mapping_store.rb +84 -0
  224. data/proto_docs/google/cloud/discoveryengine/v1beta/identity_mapping_store_service.rb +280 -0
  225. data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +25 -5
  226. data/proto_docs/google/cloud/discoveryengine/v1beta/license_config.rb +101 -0
  227. data/proto_docs/google/cloud/discoveryengine/v1beta/license_config_service.rb +224 -0
  228. data/proto_docs/google/cloud/discoveryengine/v1beta/logging.rb +40 -0
  229. data/proto_docs/google/cloud/discoveryengine/v1beta/project.rb +214 -0
  230. data/proto_docs/google/cloud/discoveryengine/v1beta/project_service.rb +18 -0
  231. data/proto_docs/google/cloud/discoveryengine/v1beta/purge_config.rb +9 -5
  232. data/proto_docs/google/cloud/discoveryengine/v1beta/rank_service.rb +4 -2
  233. data/proto_docs/google/cloud/discoveryengine/v1beta/recommendation_service.rb +2 -2
  234. data/proto_docs/google/cloud/discoveryengine/v1beta/safety.rb +108 -0
  235. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +461 -69
  236. data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config.rb +50 -3
  237. data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config_service.rb +30 -0
  238. data/proto_docs/google/cloud/discoveryengine/v1beta/session.rb +21 -0
  239. data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine.rb +8 -2
  240. data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine_service.rb +7 -3
  241. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +39 -3
  242. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event_service.rb +14 -6
  243. data/proto_docs/google/cloud/discoveryengine/v1beta/user_license.rb +100 -0
  244. data/proto_docs/google/cloud/discoveryengine/v1beta/user_license_service.rb +202 -0
  245. data/proto_docs/google/cloud/discoveryengine/v1beta/user_store.rb +67 -0
  246. data/proto_docs/google/cloud/discoveryengine/v1beta/user_store_service.rb +54 -0
  247. data/proto_docs/google/iam/v1/iam_policy.rb +87 -0
  248. data/proto_docs/google/iam/v1/options.rb +50 -0
  249. data/proto_docs/google/iam/v1/policy.rb +426 -0
  250. data/proto_docs/google/type/expr.rb +75 -0
  251. data/proto_docs/google/type/latlng.rb +38 -0
  252. metadata +118 -1
@@ -0,0 +1,1058 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/discoveryengine/v1beta/assistant_service_pb"
21
+ require "google/cloud/location"
22
+
23
+ module Google
24
+ module Cloud
25
+ module DiscoveryEngine
26
+ module V1beta
27
+ module AssistantService
28
+ ##
29
+ # Client for the AssistantService service.
30
+ #
31
+ # Service for managing Assistant configuration and assisting users.
32
+ #
33
+ class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
37
+ # @private
38
+ DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
39
+
40
+ include Paths
41
+
42
+ # @private
43
+ attr_reader :assistant_service_stub
44
+
45
+ ##
46
+ # Configure the AssistantService Client class.
47
+ #
48
+ # See {::Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all AssistantService clients
54
+ # ::Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
57
+ #
58
+ # @yield [config] Configure the Client client.
59
+ # @yieldparam config [Client::Configuration]
60
+ #
61
+ # @return [Client::Configuration]
62
+ #
63
+ def self.configure
64
+ @configure ||= begin
65
+ namespace = ["Google", "Cloud", "DiscoveryEngine", "V1beta"]
66
+ parent_config = while namespace.any?
67
+ parent_name = namespace.join "::"
68
+ parent_const = const_get parent_name
69
+ break parent_const.configure if parent_const.respond_to? :configure
70
+ namespace.pop
71
+ end
72
+ default_config = Client::Configuration.new parent_config
73
+
74
+ default_config.timeout = 30.0
75
+ default_config.retry_policy = {
76
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
77
+ }
78
+
79
+ default_config.rpcs.stream_assist.timeout = 300.0
80
+ default_config.rpcs.stream_assist.retry_policy = {
81
+ initial_delay: 1.0, max_delay: 30.0, multiplier: 1.3, retry_codes: [14]
82
+ }
83
+
84
+ default_config.rpcs.create_assistant.timeout = 30.0
85
+
86
+ default_config.rpcs.delete_assistant.timeout = 30.0
87
+
88
+ default_config.rpcs.update_assistant.timeout = 30.0
89
+
90
+ default_config
91
+ end
92
+ yield @configure if block_given?
93
+ @configure
94
+ end
95
+
96
+ ##
97
+ # Configure the AssistantService Client instance.
98
+ #
99
+ # The configuration is set to the derived mode, meaning that values can be changed,
100
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
101
+ # should be made on {Client.configure}.
102
+ #
103
+ # See {::Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client::Configuration}
104
+ # for a description of the configuration fields.
105
+ #
106
+ # @yield [config] Configure the Client client.
107
+ # @yieldparam config [Client::Configuration]
108
+ #
109
+ # @return [Client::Configuration]
110
+ #
111
+ def configure
112
+ yield @config if block_given?
113
+ @config
114
+ end
115
+
116
+ ##
117
+ # The effective universe domain
118
+ #
119
+ # @return [String]
120
+ #
121
+ def universe_domain
122
+ @assistant_service_stub.universe_domain
123
+ end
124
+
125
+ ##
126
+ # Create a new AssistantService client object.
127
+ #
128
+ # @example
129
+ #
130
+ # # Create a client using the default configuration
131
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client.new
132
+ #
133
+ # # Create a client using a custom configuration
134
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client.new do |config|
135
+ # config.timeout = 10.0
136
+ # end
137
+ #
138
+ # @yield [config] Configure the AssistantService client.
139
+ # @yieldparam config [Client::Configuration]
140
+ #
141
+ def initialize
142
+ # These require statements are intentionally placed here to initialize
143
+ # the gRPC module only when it's required.
144
+ # See https://github.com/googleapis/toolkit/issues/446
145
+ require "gapic/grpc"
146
+ require "google/cloud/discoveryengine/v1beta/assistant_service_services_pb"
147
+
148
+ # Create the configuration object
149
+ @config = Configuration.new Client.configure
150
+
151
+ # Yield the configuration if needed
152
+ yield @config if block_given?
153
+
154
+ # Create credentials
155
+ credentials = @config.credentials
156
+ # Use self-signed JWT if the endpoint is unchanged from default,
157
+ # but only if the default endpoint does not have a region prefix.
158
+ enable_self_signed_jwt = @config.endpoint.nil? ||
159
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
160
+ !@config.endpoint.split(".").first.include?("-"))
161
+ credentials ||= Credentials.default scope: @config.scope,
162
+ enable_self_signed_jwt: enable_self_signed_jwt
163
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
164
+ credentials = Credentials.new credentials, scope: @config.scope
165
+ end
166
+ @quota_project_id = @config.quota_project
167
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
168
+
169
+ @assistant_service_stub = ::Gapic::ServiceStub.new(
170
+ ::Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Stub,
171
+ credentials: credentials,
172
+ endpoint: @config.endpoint,
173
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
174
+ universe_domain: @config.universe_domain,
175
+ channel_args: @config.channel_args,
176
+ interceptors: @config.interceptors,
177
+ channel_pool_config: @config.channel_pool,
178
+ logger: @config.logger
179
+ )
180
+
181
+ @assistant_service_stub.stub_logger&.info do |entry|
182
+ entry.set_system_name
183
+ entry.set_service
184
+ entry.message = "Created client for #{entry.service}"
185
+ entry.set_credentials_fields credentials
186
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
187
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
188
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
189
+ end
190
+
191
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
192
+ config.credentials = credentials
193
+ config.quota_project = @quota_project_id
194
+ config.endpoint = @assistant_service_stub.endpoint
195
+ config.universe_domain = @assistant_service_stub.universe_domain
196
+ config.logger = @assistant_service_stub.logger if config.respond_to? :logger=
197
+ end
198
+ end
199
+
200
+ ##
201
+ # Get the associated client for mix-in of the Locations.
202
+ #
203
+ # @return [Google::Cloud::Location::Locations::Client]
204
+ #
205
+ attr_reader :location_client
206
+
207
+ ##
208
+ # The logger used for request/response debug logging.
209
+ #
210
+ # @return [Logger]
211
+ #
212
+ def logger
213
+ @assistant_service_stub.logger
214
+ end
215
+
216
+ # Service calls
217
+
218
+ ##
219
+ # Assists the user with a query in a streaming fashion.
220
+ #
221
+ # @overload stream_assist(request, options = nil)
222
+ # Pass arguments to `stream_assist` via a request object, either of type
223
+ # {::Google::Cloud::DiscoveryEngine::V1beta::StreamAssistRequest} or an equivalent Hash.
224
+ #
225
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::StreamAssistRequest, ::Hash]
226
+ # A request object representing the call parameters. Required. To specify no
227
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
228
+ # @param options [::Gapic::CallOptions, ::Hash]
229
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
230
+ #
231
+ # @overload stream_assist(name: nil, query: nil, session: nil, user_metadata: nil, tools_spec: nil, generation_spec: nil)
232
+ # Pass arguments to `stream_assist` via keyword arguments. Note that at
233
+ # least one keyword argument is required. To specify no parameters, or to keep all
234
+ # the default parameter values, pass an empty Hash as a request object (see above).
235
+ #
236
+ # @param name [::String]
237
+ # Required. The resource name of the
238
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant}. Format:
239
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
240
+ # @param query [::Google::Cloud::DiscoveryEngine::V1beta::Query, ::Hash]
241
+ # Optional. Current user query.
242
+ #
243
+ # Empty query is only supported if `file_ids` are provided. In this case, the
244
+ # answer will be generated based on those context files.
245
+ # @param session [::String]
246
+ # Optional. The session to use for the request. If specified, the assistant
247
+ # has access to the session history, and the query and the answer are stored
248
+ # there.
249
+ #
250
+ # If `-` is specified as the session ID, or it is left empty, then a new
251
+ # session is created with an automatically generated ID.
252
+ #
253
+ # Format:
254
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
255
+ # @param user_metadata [::Google::Cloud::DiscoveryEngine::V1beta::AssistUserMetadata, ::Hash]
256
+ # Optional. Information about the user initiating the query.
257
+ # @param tools_spec [::Google::Cloud::DiscoveryEngine::V1beta::StreamAssistRequest::ToolsSpec, ::Hash]
258
+ # Optional. Specification of tools that are used to serve the request.
259
+ # @param generation_spec [::Google::Cloud::DiscoveryEngine::V1beta::StreamAssistRequest::GenerationSpec, ::Hash]
260
+ # Optional. Specification of the generation configuration for the request.
261
+ #
262
+ # @yield [response, operation] Access the result along with the RPC operation
263
+ # @yieldparam response [::Enumerable<::Google::Cloud::DiscoveryEngine::V1beta::StreamAssistResponse>]
264
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
265
+ #
266
+ # @return [::Enumerable<::Google::Cloud::DiscoveryEngine::V1beta::StreamAssistResponse>]
267
+ #
268
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
269
+ #
270
+ # @example Basic example
271
+ # require "google/cloud/discovery_engine/v1beta"
272
+ #
273
+ # # Create a client object. The client can be reused for multiple calls.
274
+ # client = Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client.new
275
+ #
276
+ # # Create a request. To set request fields, pass in keyword arguments.
277
+ # request = Google::Cloud::DiscoveryEngine::V1beta::StreamAssistRequest.new
278
+ #
279
+ # # Call the stream_assist method to start streaming.
280
+ # output = client.stream_assist request
281
+ #
282
+ # # The returned object is a streamed enumerable yielding elements of type
283
+ # # ::Google::Cloud::DiscoveryEngine::V1beta::StreamAssistResponse
284
+ # output.each do |current_response|
285
+ # p current_response
286
+ # end
287
+ #
288
+ def stream_assist request, options = nil
289
+ raise ::ArgumentError, "request must be provided" if request.nil?
290
+
291
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::StreamAssistRequest
292
+
293
+ # Converts hash and nil to an options object
294
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
295
+
296
+ # Customize the options with defaults
297
+ metadata = @config.rpcs.stream_assist.metadata.to_h
298
+
299
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
300
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
301
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
302
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
303
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
304
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
305
+
306
+ header_params = {}
307
+ if request.name
308
+ header_params["name"] = request.name
309
+ end
310
+
311
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
312
+ metadata[:"x-goog-request-params"] ||= request_params_header
313
+
314
+ options.apply_defaults timeout: @config.rpcs.stream_assist.timeout,
315
+ metadata: metadata,
316
+ retry_policy: @config.rpcs.stream_assist.retry_policy
317
+
318
+ options.apply_defaults timeout: @config.timeout,
319
+ metadata: @config.metadata,
320
+ retry_policy: @config.retry_policy
321
+
322
+ @assistant_service_stub.call_rpc :stream_assist, request, options: options do |response, operation|
323
+ yield response, operation if block_given?
324
+ end
325
+ rescue ::GRPC::BadStatus => e
326
+ raise ::Google::Cloud::Error.from_error(e)
327
+ end
328
+
329
+ ##
330
+ # Creates an {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant}.
331
+ #
332
+ # @overload create_assistant(request, options = nil)
333
+ # Pass arguments to `create_assistant` via a request object, either of type
334
+ # {::Google::Cloud::DiscoveryEngine::V1beta::CreateAssistantRequest} or an equivalent Hash.
335
+ #
336
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::CreateAssistantRequest, ::Hash]
337
+ # A request object representing the call parameters. Required. To specify no
338
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
339
+ # @param options [::Gapic::CallOptions, ::Hash]
340
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
341
+ #
342
+ # @overload create_assistant(parent: nil, assistant: nil, assistant_id: nil)
343
+ # Pass arguments to `create_assistant` via keyword arguments. Note that at
344
+ # least one keyword argument is required. To specify no parameters, or to keep all
345
+ # the default parameter values, pass an empty Hash as a request object (see above).
346
+ #
347
+ # @param parent [::String]
348
+ # Required. The parent resource name.
349
+ # Format:
350
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
351
+ # @param assistant [::Google::Cloud::DiscoveryEngine::V1beta::Assistant, ::Hash]
352
+ # Required. The {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant} to
353
+ # create.
354
+ # @param assistant_id [::String]
355
+ # Required. The ID to use for the
356
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant}, which will
357
+ # become the final component of the
358
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant}'s resource name.
359
+ #
360
+ # This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
361
+ # with a length limit of 63 characters.
362
+ #
363
+ # @yield [response, operation] Access the result along with the RPC operation
364
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::Assistant]
365
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
366
+ #
367
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Assistant]
368
+ #
369
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
370
+ #
371
+ # @example Basic example
372
+ # require "google/cloud/discovery_engine/v1beta"
373
+ #
374
+ # # Create a client object. The client can be reused for multiple calls.
375
+ # client = Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client.new
376
+ #
377
+ # # Create a request. To set request fields, pass in keyword arguments.
378
+ # request = Google::Cloud::DiscoveryEngine::V1beta::CreateAssistantRequest.new
379
+ #
380
+ # # Call the create_assistant method.
381
+ # result = client.create_assistant request
382
+ #
383
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Assistant.
384
+ # p result
385
+ #
386
+ def create_assistant request, options = nil
387
+ raise ::ArgumentError, "request must be provided" if request.nil?
388
+
389
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::CreateAssistantRequest
390
+
391
+ # Converts hash and nil to an options object
392
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
393
+
394
+ # Customize the options with defaults
395
+ metadata = @config.rpcs.create_assistant.metadata.to_h
396
+
397
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
398
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
399
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
400
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
401
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
402
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
403
+
404
+ header_params = {}
405
+ if request.parent
406
+ header_params["parent"] = request.parent
407
+ end
408
+
409
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
410
+ metadata[:"x-goog-request-params"] ||= request_params_header
411
+
412
+ options.apply_defaults timeout: @config.rpcs.create_assistant.timeout,
413
+ metadata: metadata,
414
+ retry_policy: @config.rpcs.create_assistant.retry_policy
415
+
416
+ options.apply_defaults timeout: @config.timeout,
417
+ metadata: @config.metadata,
418
+ retry_policy: @config.retry_policy
419
+
420
+ @assistant_service_stub.call_rpc :create_assistant, request, options: options do |response, operation|
421
+ yield response, operation if block_given?
422
+ end
423
+ rescue ::GRPC::BadStatus => e
424
+ raise ::Google::Cloud::Error.from_error(e)
425
+ end
426
+
427
+ ##
428
+ # Deletes an {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant}.
429
+ #
430
+ # @overload delete_assistant(request, options = nil)
431
+ # Pass arguments to `delete_assistant` via a request object, either of type
432
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DeleteAssistantRequest} or an equivalent Hash.
433
+ #
434
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::DeleteAssistantRequest, ::Hash]
435
+ # A request object representing the call parameters. Required. To specify no
436
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
437
+ # @param options [::Gapic::CallOptions, ::Hash]
438
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
439
+ #
440
+ # @overload delete_assistant(name: nil)
441
+ # Pass arguments to `delete_assistant` via keyword arguments. Note that at
442
+ # least one keyword argument is required. To specify no parameters, or to keep all
443
+ # the default parameter values, pass an empty Hash as a request object (see above).
444
+ #
445
+ # @param name [::String]
446
+ # Required. Resource name of
447
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant}. Format:
448
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
449
+ #
450
+ # If the caller does not have permission to delete the
451
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant}, regardless of
452
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
453
+ #
454
+ # If the {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant} to delete
455
+ # does not exist, a NOT_FOUND error is returned.
456
+ #
457
+ # @yield [response, operation] Access the result along with the RPC operation
458
+ # @yieldparam response [::Google::Protobuf::Empty]
459
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
460
+ #
461
+ # @return [::Google::Protobuf::Empty]
462
+ #
463
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
464
+ #
465
+ # @example Basic example
466
+ # require "google/cloud/discovery_engine/v1beta"
467
+ #
468
+ # # Create a client object. The client can be reused for multiple calls.
469
+ # client = Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client.new
470
+ #
471
+ # # Create a request. To set request fields, pass in keyword arguments.
472
+ # request = Google::Cloud::DiscoveryEngine::V1beta::DeleteAssistantRequest.new
473
+ #
474
+ # # Call the delete_assistant method.
475
+ # result = client.delete_assistant request
476
+ #
477
+ # # The returned object is of type Google::Protobuf::Empty.
478
+ # p result
479
+ #
480
+ def delete_assistant request, options = nil
481
+ raise ::ArgumentError, "request must be provided" if request.nil?
482
+
483
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::DeleteAssistantRequest
484
+
485
+ # Converts hash and nil to an options object
486
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
487
+
488
+ # Customize the options with defaults
489
+ metadata = @config.rpcs.delete_assistant.metadata.to_h
490
+
491
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
492
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
493
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
494
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
495
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
496
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
497
+
498
+ header_params = {}
499
+ if request.name
500
+ header_params["name"] = request.name
501
+ end
502
+
503
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
504
+ metadata[:"x-goog-request-params"] ||= request_params_header
505
+
506
+ options.apply_defaults timeout: @config.rpcs.delete_assistant.timeout,
507
+ metadata: metadata,
508
+ retry_policy: @config.rpcs.delete_assistant.retry_policy
509
+
510
+ options.apply_defaults timeout: @config.timeout,
511
+ metadata: @config.metadata,
512
+ retry_policy: @config.retry_policy
513
+
514
+ @assistant_service_stub.call_rpc :delete_assistant, request, options: options do |response, operation|
515
+ yield response, operation if block_given?
516
+ end
517
+ rescue ::GRPC::BadStatus => e
518
+ raise ::Google::Cloud::Error.from_error(e)
519
+ end
520
+
521
+ ##
522
+ # Updates an {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant}
523
+ #
524
+ # @overload update_assistant(request, options = nil)
525
+ # Pass arguments to `update_assistant` via a request object, either of type
526
+ # {::Google::Cloud::DiscoveryEngine::V1beta::UpdateAssistantRequest} or an equivalent Hash.
527
+ #
528
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::UpdateAssistantRequest, ::Hash]
529
+ # A request object representing the call parameters. Required. To specify no
530
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
531
+ # @param options [::Gapic::CallOptions, ::Hash]
532
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
533
+ #
534
+ # @overload update_assistant(assistant: nil, update_mask: nil)
535
+ # Pass arguments to `update_assistant` via keyword arguments. Note that at
536
+ # least one keyword argument is required. To specify no parameters, or to keep all
537
+ # the default parameter values, pass an empty Hash as a request object (see above).
538
+ #
539
+ # @param assistant [::Google::Cloud::DiscoveryEngine::V1beta::Assistant, ::Hash]
540
+ # Required. The {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant} to
541
+ # update.
542
+ #
543
+ # The {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant}'s `name`
544
+ # field is used to identify the
545
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant} to update.
546
+ # Format:
547
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
548
+ #
549
+ # If the caller does not have permission to update the
550
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant}, regardless of
551
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
552
+ #
553
+ # If the {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant} to update
554
+ # does not exist, a NOT_FOUND error is returned.
555
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
556
+ # The list of fields to update.
557
+ #
558
+ # @yield [response, operation] Access the result along with the RPC operation
559
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::Assistant]
560
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
561
+ #
562
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Assistant]
563
+ #
564
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
565
+ #
566
+ # @example Basic example
567
+ # require "google/cloud/discovery_engine/v1beta"
568
+ #
569
+ # # Create a client object. The client can be reused for multiple calls.
570
+ # client = Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client.new
571
+ #
572
+ # # Create a request. To set request fields, pass in keyword arguments.
573
+ # request = Google::Cloud::DiscoveryEngine::V1beta::UpdateAssistantRequest.new
574
+ #
575
+ # # Call the update_assistant method.
576
+ # result = client.update_assistant request
577
+ #
578
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Assistant.
579
+ # p result
580
+ #
581
+ def update_assistant request, options = nil
582
+ raise ::ArgumentError, "request must be provided" if request.nil?
583
+
584
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::UpdateAssistantRequest
585
+
586
+ # Converts hash and nil to an options object
587
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
588
+
589
+ # Customize the options with defaults
590
+ metadata = @config.rpcs.update_assistant.metadata.to_h
591
+
592
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
593
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
594
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
595
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
596
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
597
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
598
+
599
+ header_params = {}
600
+ if request.assistant&.name
601
+ header_params["assistant.name"] = request.assistant.name
602
+ end
603
+
604
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
605
+ metadata[:"x-goog-request-params"] ||= request_params_header
606
+
607
+ options.apply_defaults timeout: @config.rpcs.update_assistant.timeout,
608
+ metadata: metadata,
609
+ retry_policy: @config.rpcs.update_assistant.retry_policy
610
+
611
+ options.apply_defaults timeout: @config.timeout,
612
+ metadata: @config.metadata,
613
+ retry_policy: @config.retry_policy
614
+
615
+ @assistant_service_stub.call_rpc :update_assistant, request, options: options do |response, operation|
616
+ yield response, operation if block_given?
617
+ end
618
+ rescue ::GRPC::BadStatus => e
619
+ raise ::Google::Cloud::Error.from_error(e)
620
+ end
621
+
622
+ ##
623
+ # Gets an {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant}.
624
+ #
625
+ # @overload get_assistant(request, options = nil)
626
+ # Pass arguments to `get_assistant` via a request object, either of type
627
+ # {::Google::Cloud::DiscoveryEngine::V1beta::GetAssistantRequest} or an equivalent Hash.
628
+ #
629
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::GetAssistantRequest, ::Hash]
630
+ # A request object representing the call parameters. Required. To specify no
631
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
632
+ # @param options [::Gapic::CallOptions, ::Hash]
633
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
634
+ #
635
+ # @overload get_assistant(name: nil)
636
+ # Pass arguments to `get_assistant` via keyword arguments. Note that at
637
+ # least one keyword argument is required. To specify no parameters, or to keep all
638
+ # the default parameter values, pass an empty Hash as a request object (see above).
639
+ #
640
+ # @param name [::String]
641
+ # Required. Resource name of
642
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant}. Format:
643
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
644
+ #
645
+ # @yield [response, operation] Access the result along with the RPC operation
646
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::Assistant]
647
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
648
+ #
649
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Assistant]
650
+ #
651
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
652
+ #
653
+ # @example Basic example
654
+ # require "google/cloud/discovery_engine/v1beta"
655
+ #
656
+ # # Create a client object. The client can be reused for multiple calls.
657
+ # client = Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client.new
658
+ #
659
+ # # Create a request. To set request fields, pass in keyword arguments.
660
+ # request = Google::Cloud::DiscoveryEngine::V1beta::GetAssistantRequest.new
661
+ #
662
+ # # Call the get_assistant method.
663
+ # result = client.get_assistant request
664
+ #
665
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Assistant.
666
+ # p result
667
+ #
668
+ def get_assistant request, options = nil
669
+ raise ::ArgumentError, "request must be provided" if request.nil?
670
+
671
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::GetAssistantRequest
672
+
673
+ # Converts hash and nil to an options object
674
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
675
+
676
+ # Customize the options with defaults
677
+ metadata = @config.rpcs.get_assistant.metadata.to_h
678
+
679
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
680
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
681
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
682
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
683
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
684
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
685
+
686
+ header_params = {}
687
+ if request.name
688
+ header_params["name"] = request.name
689
+ end
690
+
691
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
692
+ metadata[:"x-goog-request-params"] ||= request_params_header
693
+
694
+ options.apply_defaults timeout: @config.rpcs.get_assistant.timeout,
695
+ metadata: metadata,
696
+ retry_policy: @config.rpcs.get_assistant.retry_policy
697
+
698
+ options.apply_defaults timeout: @config.timeout,
699
+ metadata: @config.metadata,
700
+ retry_policy: @config.retry_policy
701
+
702
+ @assistant_service_stub.call_rpc :get_assistant, request, options: options do |response, operation|
703
+ yield response, operation if block_given?
704
+ end
705
+ rescue ::GRPC::BadStatus => e
706
+ raise ::Google::Cloud::Error.from_error(e)
707
+ end
708
+
709
+ ##
710
+ # Lists all {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant}s under
711
+ # an {::Google::Cloud::DiscoveryEngine::V1beta::Engine Engine}.
712
+ #
713
+ # @overload list_assistants(request, options = nil)
714
+ # Pass arguments to `list_assistants` via a request object, either of type
715
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ListAssistantsRequest} or an equivalent Hash.
716
+ #
717
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::ListAssistantsRequest, ::Hash]
718
+ # A request object representing the call parameters. Required. To specify no
719
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
720
+ # @param options [::Gapic::CallOptions, ::Hash]
721
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
722
+ #
723
+ # @overload list_assistants(parent: nil, page_size: nil, page_token: nil)
724
+ # Pass arguments to `list_assistants` via keyword arguments. Note that at
725
+ # least one keyword argument is required. To specify no parameters, or to keep all
726
+ # the default parameter values, pass an empty Hash as a request object (see above).
727
+ #
728
+ # @param parent [::String]
729
+ # Required. The parent resource name.
730
+ # Format:
731
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
732
+ # @param page_size [::Integer]
733
+ # Maximum number of
734
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Assistant Assistant}s to return. If
735
+ # unspecified, defaults to 100. The maximum allowed value is 1000; anything
736
+ # above that will be coerced down to 1000.
737
+ # @param page_token [::String]
738
+ # A page token
739
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ListAssistantsResponse#next_page_token ListAssistantsResponse.next_page_token},
740
+ # received from a previous
741
+ # {::Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client#list_assistants AssistantService.ListAssistants}
742
+ # call. Provide this to retrieve the subsequent page.
743
+ #
744
+ # When paginating, all other parameters provided to
745
+ # {::Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client#list_assistants ListAssistants}
746
+ # must match the call that provided the page token.
747
+ #
748
+ # @yield [response, operation] Access the result along with the RPC operation
749
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Assistant>]
750
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
751
+ #
752
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Assistant>]
753
+ #
754
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
755
+ #
756
+ # @example Basic example
757
+ # require "google/cloud/discovery_engine/v1beta"
758
+ #
759
+ # # Create a client object. The client can be reused for multiple calls.
760
+ # client = Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client.new
761
+ #
762
+ # # Create a request. To set request fields, pass in keyword arguments.
763
+ # request = Google::Cloud::DiscoveryEngine::V1beta::ListAssistantsRequest.new
764
+ #
765
+ # # Call the list_assistants method.
766
+ # result = client.list_assistants request
767
+ #
768
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
769
+ # # over elements, and API calls will be issued to fetch pages as needed.
770
+ # result.each do |item|
771
+ # # Each element is of type ::Google::Cloud::DiscoveryEngine::V1beta::Assistant.
772
+ # p item
773
+ # end
774
+ #
775
+ def list_assistants request, options = nil
776
+ raise ::ArgumentError, "request must be provided" if request.nil?
777
+
778
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::ListAssistantsRequest
779
+
780
+ # Converts hash and nil to an options object
781
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
782
+
783
+ # Customize the options with defaults
784
+ metadata = @config.rpcs.list_assistants.metadata.to_h
785
+
786
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
787
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
788
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
789
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
790
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
791
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
792
+
793
+ header_params = {}
794
+ if request.parent
795
+ header_params["parent"] = request.parent
796
+ end
797
+
798
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
799
+ metadata[:"x-goog-request-params"] ||= request_params_header
800
+
801
+ options.apply_defaults timeout: @config.rpcs.list_assistants.timeout,
802
+ metadata: metadata,
803
+ retry_policy: @config.rpcs.list_assistants.retry_policy
804
+
805
+ options.apply_defaults timeout: @config.timeout,
806
+ metadata: @config.metadata,
807
+ retry_policy: @config.retry_policy
808
+
809
+ @assistant_service_stub.call_rpc :list_assistants, request, options: options do |response, operation|
810
+ response = ::Gapic::PagedEnumerable.new @assistant_service_stub, :list_assistants, request, response, operation, options
811
+ yield response, operation if block_given?
812
+ throw :response, response
813
+ end
814
+ rescue ::GRPC::BadStatus => e
815
+ raise ::Google::Cloud::Error.from_error(e)
816
+ end
817
+
818
+ ##
819
+ # Configuration class for the AssistantService API.
820
+ #
821
+ # This class represents the configuration for AssistantService,
822
+ # providing control over timeouts, retry behavior, logging, transport
823
+ # parameters, and other low-level controls. Certain parameters can also be
824
+ # applied individually to specific RPCs. See
825
+ # {::Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client::Configuration::Rpcs}
826
+ # for a list of RPCs that can be configured independently.
827
+ #
828
+ # Configuration can be applied globally to all clients, or to a single client
829
+ # on construction.
830
+ #
831
+ # @example
832
+ #
833
+ # # Modify the global config, setting the timeout for
834
+ # # stream_assist to 20 seconds,
835
+ # # and all remaining timeouts to 10 seconds.
836
+ # ::Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client.configure do |config|
837
+ # config.timeout = 10.0
838
+ # config.rpcs.stream_assist.timeout = 20.0
839
+ # end
840
+ #
841
+ # # Apply the above configuration only to a new client.
842
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client.new do |config|
843
+ # config.timeout = 10.0
844
+ # config.rpcs.stream_assist.timeout = 20.0
845
+ # end
846
+ #
847
+ # @!attribute [rw] endpoint
848
+ # A custom service endpoint, as a hostname or hostname:port. The default is
849
+ # nil, indicating to use the default endpoint in the current universe domain.
850
+ # @return [::String,nil]
851
+ # @!attribute [rw] credentials
852
+ # Credentials to send with calls. You may provide any of the following types:
853
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
854
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
855
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
856
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
857
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
858
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
859
+ # * (`nil`) indicating no credentials
860
+ #
861
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
862
+ # is deprecated. Providing an unvalidated credential configuration to
863
+ # Google APIs can compromise the security of your systems and data.
864
+ #
865
+ # @example
866
+ #
867
+ # # The recommended way to provide credentials is to use the `make_creds` method
868
+ # # on the appropriate credentials class for your environment.
869
+ #
870
+ # require "googleauth"
871
+ #
872
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
873
+ # json_key_io: ::File.open("/path/to/keyfile.json")
874
+ # )
875
+ #
876
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::AssistantService::Client.new do |config|
877
+ # config.credentials = credentials
878
+ # end
879
+ #
880
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
881
+ # external source for authentication to Google Cloud, you must validate it before
882
+ # providing it to a Google API client library. Providing an unvalidated credential
883
+ # configuration to Google APIs can compromise the security of your systems and data.
884
+ # For more information, refer to [Validate credential configurations from external
885
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
886
+ # @return [::Object]
887
+ # @!attribute [rw] scope
888
+ # The OAuth scopes
889
+ # @return [::Array<::String>]
890
+ # @!attribute [rw] lib_name
891
+ # The library name as recorded in instrumentation and logging
892
+ # @return [::String]
893
+ # @!attribute [rw] lib_version
894
+ # The library version as recorded in instrumentation and logging
895
+ # @return [::String]
896
+ # @!attribute [rw] channel_args
897
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
898
+ # `GRPC::Core::Channel` object is provided as the credential.
899
+ # @return [::Hash]
900
+ # @!attribute [rw] interceptors
901
+ # An array of interceptors that are run before calls are executed.
902
+ # @return [::Array<::GRPC::ClientInterceptor>]
903
+ # @!attribute [rw] timeout
904
+ # The call timeout in seconds.
905
+ # @return [::Numeric]
906
+ # @!attribute [rw] metadata
907
+ # Additional gRPC headers to be sent with the call.
908
+ # @return [::Hash{::Symbol=>::String}]
909
+ # @!attribute [rw] retry_policy
910
+ # The retry policy. The value is a hash with the following keys:
911
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
912
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
913
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
914
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
915
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
916
+ # trigger a retry.
917
+ # @return [::Hash]
918
+ # @!attribute [rw] quota_project
919
+ # A separate project against which to charge quota.
920
+ # @return [::String]
921
+ # @!attribute [rw] universe_domain
922
+ # The universe domain within which to make requests. This determines the
923
+ # default endpoint URL. The default value of nil uses the environment
924
+ # universe (usually the default "googleapis.com" universe).
925
+ # @return [::String,nil]
926
+ # @!attribute [rw] logger
927
+ # A custom logger to use for request/response debug logging, or the value
928
+ # `:default` (the default) to construct a default logger, or `nil` to
929
+ # explicitly disable logging.
930
+ # @return [::Logger,:default,nil]
931
+ #
932
+ class Configuration
933
+ extend ::Gapic::Config
934
+
935
+ # @private
936
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
937
+ DEFAULT_ENDPOINT = "discoveryengine.googleapis.com"
938
+
939
+ config_attr :endpoint, nil, ::String, nil
940
+ config_attr :credentials, nil do |value|
941
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
942
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
943
+ allowed.any? { |klass| klass === value }
944
+ end
945
+ config_attr :scope, nil, ::String, ::Array, nil
946
+ config_attr :lib_name, nil, ::String, nil
947
+ config_attr :lib_version, nil, ::String, nil
948
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
949
+ config_attr :interceptors, nil, ::Array, nil
950
+ config_attr :timeout, nil, ::Numeric, nil
951
+ config_attr :metadata, nil, ::Hash, nil
952
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
953
+ config_attr :quota_project, nil, ::String, nil
954
+ config_attr :universe_domain, nil, ::String, nil
955
+ config_attr :logger, :default, ::Logger, nil, :default
956
+
957
+ # @private
958
+ def initialize parent_config = nil
959
+ @parent_config = parent_config unless parent_config.nil?
960
+
961
+ yield self if block_given?
962
+ end
963
+
964
+ ##
965
+ # Configurations for individual RPCs
966
+ # @return [Rpcs]
967
+ #
968
+ def rpcs
969
+ @rpcs ||= begin
970
+ parent_rpcs = nil
971
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
972
+ Rpcs.new parent_rpcs
973
+ end
974
+ end
975
+
976
+ ##
977
+ # Configuration for the channel pool
978
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
979
+ #
980
+ def channel_pool
981
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
982
+ end
983
+
984
+ ##
985
+ # Configuration RPC class for the AssistantService API.
986
+ #
987
+ # Includes fields providing the configuration for each RPC in this service.
988
+ # Each configuration object is of type `Gapic::Config::Method` and includes
989
+ # the following configuration fields:
990
+ #
991
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
992
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
993
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
994
+ # include the following keys:
995
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
996
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
997
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
998
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
999
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1000
+ # trigger a retry.
1001
+ #
1002
+ class Rpcs
1003
+ ##
1004
+ # RPC-specific configuration for `stream_assist`
1005
+ # @return [::Gapic::Config::Method]
1006
+ #
1007
+ attr_reader :stream_assist
1008
+ ##
1009
+ # RPC-specific configuration for `create_assistant`
1010
+ # @return [::Gapic::Config::Method]
1011
+ #
1012
+ attr_reader :create_assistant
1013
+ ##
1014
+ # RPC-specific configuration for `delete_assistant`
1015
+ # @return [::Gapic::Config::Method]
1016
+ #
1017
+ attr_reader :delete_assistant
1018
+ ##
1019
+ # RPC-specific configuration for `update_assistant`
1020
+ # @return [::Gapic::Config::Method]
1021
+ #
1022
+ attr_reader :update_assistant
1023
+ ##
1024
+ # RPC-specific configuration for `get_assistant`
1025
+ # @return [::Gapic::Config::Method]
1026
+ #
1027
+ attr_reader :get_assistant
1028
+ ##
1029
+ # RPC-specific configuration for `list_assistants`
1030
+ # @return [::Gapic::Config::Method]
1031
+ #
1032
+ attr_reader :list_assistants
1033
+
1034
+ # @private
1035
+ def initialize parent_rpcs = nil
1036
+ stream_assist_config = parent_rpcs.stream_assist if parent_rpcs.respond_to? :stream_assist
1037
+ @stream_assist = ::Gapic::Config::Method.new stream_assist_config
1038
+ create_assistant_config = parent_rpcs.create_assistant if parent_rpcs.respond_to? :create_assistant
1039
+ @create_assistant = ::Gapic::Config::Method.new create_assistant_config
1040
+ delete_assistant_config = parent_rpcs.delete_assistant if parent_rpcs.respond_to? :delete_assistant
1041
+ @delete_assistant = ::Gapic::Config::Method.new delete_assistant_config
1042
+ update_assistant_config = parent_rpcs.update_assistant if parent_rpcs.respond_to? :update_assistant
1043
+ @update_assistant = ::Gapic::Config::Method.new update_assistant_config
1044
+ get_assistant_config = parent_rpcs.get_assistant if parent_rpcs.respond_to? :get_assistant
1045
+ @get_assistant = ::Gapic::Config::Method.new get_assistant_config
1046
+ list_assistants_config = parent_rpcs.list_assistants if parent_rpcs.respond_to? :list_assistants
1047
+ @list_assistants = ::Gapic::Config::Method.new list_assistants_config
1048
+
1049
+ yield self if block_given?
1050
+ end
1051
+ end
1052
+ end
1053
+ end
1054
+ end
1055
+ end
1056
+ end
1057
+ end
1058
+ end