google-cloud-dialogflow-v2 1.17.0 → 1.18.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 (268) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -2
  3. data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +1 -1
  4. data/lib/google/cloud/dialogflow/v2/agents/client.rb +1 -1
  5. data/lib/google/cloud/dialogflow/v2/agents/credentials.rb +1 -1
  6. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +1 -1
  7. data/lib/google/cloud/dialogflow/v2/agents/paths.rb +1 -1
  8. data/lib/google/cloud/dialogflow/v2/agents/rest/client.rb +1 -1
  9. data/lib/google/cloud/dialogflow/v2/agents/rest/operations.rb +2 -2
  10. data/lib/google/cloud/dialogflow/v2/agents/rest/service_stub.rb +1 -1
  11. data/lib/google/cloud/dialogflow/v2/agents/rest.rb +1 -1
  12. data/lib/google/cloud/dialogflow/v2/agents.rb +1 -1
  13. data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +2 -1
  14. data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +1 -1
  15. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +1 -1
  16. data/lib/google/cloud/dialogflow/v2/answer_records/credentials.rb +1 -1
  17. data/lib/google/cloud/dialogflow/v2/answer_records/paths.rb +1 -1
  18. data/lib/google/cloud/dialogflow/v2/answer_records/rest/client.rb +1 -1
  19. data/lib/google/cloud/dialogflow/v2/answer_records/rest/service_stub.rb +1 -1
  20. data/lib/google/cloud/dialogflow/v2/answer_records/rest.rb +1 -1
  21. data/lib/google/cloud/dialogflow/v2/answer_records.rb +1 -1
  22. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +4 -1
  23. data/lib/google/cloud/dialogflow/v2/bindings_override.rb +1 -1
  24. data/lib/google/cloud/dialogflow/v2/ces_app_pb.rb +1 -1
  25. data/lib/google/cloud/dialogflow/v2/companion_agent_pb.rb +45 -0
  26. data/lib/google/cloud/dialogflow/v2/companion_agent_services_pb.rb +53 -0
  27. data/lib/google/cloud/dialogflow/v2/companion_agents/client.rb +891 -0
  28. data/lib/google/cloud/dialogflow/v2/companion_agents/credentials.rb +52 -0
  29. data/lib/google/cloud/dialogflow/v2/companion_agents/paths.rb +111 -0
  30. data/lib/google/cloud/dialogflow/v2/companion_agents/rest/client.rb +821 -0
  31. data/lib/google/cloud/dialogflow/v2/companion_agents/rest/service_stub.rb +388 -0
  32. data/lib/google/cloud/dialogflow/v2/companion_agents/rest.rb +53 -0
  33. data/lib/google/cloud/dialogflow/v2/companion_agents.rb +55 -0
  34. data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +1 -1
  35. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +1 -1
  36. data/lib/google/cloud/dialogflow/v2/contexts/credentials.rb +1 -1
  37. data/lib/google/cloud/dialogflow/v2/contexts/paths.rb +1 -1
  38. data/lib/google/cloud/dialogflow/v2/contexts/rest/client.rb +1 -1
  39. data/lib/google/cloud/dialogflow/v2/contexts/rest/service_stub.rb +1 -1
  40. data/lib/google/cloud/dialogflow/v2/contexts/rest.rb +1 -1
  41. data/lib/google/cloud/dialogflow/v2/contexts.rb +1 -1
  42. data/lib/google/cloud/dialogflow/v2/conversation_dataset_services_pb.rb +1 -1
  43. data/lib/google/cloud/dialogflow/v2/conversation_datasets/client.rb +1 -1
  44. data/lib/google/cloud/dialogflow/v2/conversation_datasets/credentials.rb +1 -1
  45. data/lib/google/cloud/dialogflow/v2/conversation_datasets/operations.rb +1 -1
  46. data/lib/google/cloud/dialogflow/v2/conversation_datasets/paths.rb +1 -1
  47. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/client.rb +1 -1
  48. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/operations.rb +2 -2
  49. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/service_stub.rb +1 -1
  50. data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest.rb +1 -1
  51. data/lib/google/cloud/dialogflow/v2/conversation_datasets.rb +1 -1
  52. data/lib/google/cloud/dialogflow/v2/conversation_model_services_pb.rb +1 -1
  53. data/lib/google/cloud/dialogflow/v2/conversation_models/client.rb +1 -1
  54. data/lib/google/cloud/dialogflow/v2/conversation_models/credentials.rb +1 -1
  55. data/lib/google/cloud/dialogflow/v2/conversation_models/operations.rb +1 -1
  56. data/lib/google/cloud/dialogflow/v2/conversation_models/paths.rb +1 -1
  57. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/client.rb +1 -1
  58. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/operations.rb +2 -2
  59. data/lib/google/cloud/dialogflow/v2/conversation_models/rest/service_stub.rb +1 -1
  60. data/lib/google/cloud/dialogflow/v2/conversation_models/rest.rb +1 -1
  61. data/lib/google/cloud/dialogflow/v2/conversation_models.rb +1 -1
  62. data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +1 -1
  63. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +1 -1
  64. data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +1 -1
  65. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +1 -1
  66. data/lib/google/cloud/dialogflow/v2/conversation_profiles/credentials.rb +1 -1
  67. data/lib/google/cloud/dialogflow/v2/conversation_profiles/operations.rb +1 -1
  68. data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +20 -1
  69. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/client.rb +1 -1
  70. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/operations.rb +2 -2
  71. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/service_stub.rb +1 -1
  72. data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest.rb +1 -1
  73. data/lib/google/cloud/dialogflow/v2/conversation_profiles.rb +1 -1
  74. data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +1 -1
  75. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +3 -3
  76. data/lib/google/cloud/dialogflow/v2/conversations/credentials.rb +1 -1
  77. data/lib/google/cloud/dialogflow/v2/conversations/paths.rb +61 -1
  78. data/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +3 -3
  79. data/lib/google/cloud/dialogflow/v2/conversations/rest/service_stub.rb +1 -1
  80. data/lib/google/cloud/dialogflow/v2/conversations/rest.rb +1 -1
  81. data/lib/google/cloud/dialogflow/v2/conversations.rb +1 -1
  82. data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +1 -1
  83. data/lib/google/cloud/dialogflow/v2/documents/client.rb +1 -1
  84. data/lib/google/cloud/dialogflow/v2/documents/credentials.rb +1 -1
  85. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +1 -1
  86. data/lib/google/cloud/dialogflow/v2/documents/paths.rb +1 -1
  87. data/lib/google/cloud/dialogflow/v2/documents/rest/client.rb +1 -1
  88. data/lib/google/cloud/dialogflow/v2/documents/rest/operations.rb +2 -2
  89. data/lib/google/cloud/dialogflow/v2/documents/rest/service_stub.rb +1 -1
  90. data/lib/google/cloud/dialogflow/v2/documents/rest.rb +1 -1
  91. data/lib/google/cloud/dialogflow/v2/documents.rb +1 -1
  92. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/client.rb +1 -1
  93. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/credentials.rb +1 -1
  94. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/operations.rb +1 -1
  95. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/paths.rb +1 -1
  96. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/client.rb +1 -1
  97. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/operations.rb +2 -2
  98. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/service_stub.rb +1 -1
  99. data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest.rb +1 -1
  100. data/lib/google/cloud/dialogflow/v2/encryption_spec_service.rb +1 -1
  101. data/lib/google/cloud/dialogflow/v2/encryption_spec_services_pb.rb +1 -1
  102. data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +1 -1
  103. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +1 -1
  104. data/lib/google/cloud/dialogflow/v2/entity_types/credentials.rb +1 -1
  105. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +1 -1
  106. data/lib/google/cloud/dialogflow/v2/entity_types/paths.rb +1 -1
  107. data/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb +1 -1
  108. data/lib/google/cloud/dialogflow/v2/entity_types/rest/operations.rb +2 -2
  109. data/lib/google/cloud/dialogflow/v2/entity_types/rest/service_stub.rb +1 -1
  110. data/lib/google/cloud/dialogflow/v2/entity_types/rest.rb +1 -1
  111. data/lib/google/cloud/dialogflow/v2/entity_types.rb +1 -1
  112. data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +1 -1
  113. data/lib/google/cloud/dialogflow/v2/environments/client.rb +1 -1
  114. data/lib/google/cloud/dialogflow/v2/environments/credentials.rb +1 -1
  115. data/lib/google/cloud/dialogflow/v2/environments/paths.rb +1 -1
  116. data/lib/google/cloud/dialogflow/v2/environments/rest/client.rb +1 -1
  117. data/lib/google/cloud/dialogflow/v2/environments/rest/service_stub.rb +1 -1
  118. data/lib/google/cloud/dialogflow/v2/environments/rest.rb +1 -1
  119. data/lib/google/cloud/dialogflow/v2/environments.rb +1 -1
  120. data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +1 -1
  121. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +1 -1
  122. data/lib/google/cloud/dialogflow/v2/fulfillments/credentials.rb +1 -1
  123. data/lib/google/cloud/dialogflow/v2/fulfillments/paths.rb +1 -1
  124. data/lib/google/cloud/dialogflow/v2/fulfillments/rest/client.rb +1 -1
  125. data/lib/google/cloud/dialogflow/v2/fulfillments/rest/service_stub.rb +1 -1
  126. data/lib/google/cloud/dialogflow/v2/fulfillments/rest.rb +1 -1
  127. data/lib/google/cloud/dialogflow/v2/fulfillments.rb +1 -1
  128. data/lib/google/cloud/dialogflow/v2/generator_evaluation_services_pb.rb +1 -1
  129. data/lib/google/cloud/dialogflow/v2/generator_evaluations/client.rb +1 -1
  130. data/lib/google/cloud/dialogflow/v2/generator_evaluations/credentials.rb +1 -1
  131. data/lib/google/cloud/dialogflow/v2/generator_evaluations/operations.rb +1 -1
  132. data/lib/google/cloud/dialogflow/v2/generator_evaluations/paths.rb +1 -1
  133. data/lib/google/cloud/dialogflow/v2/generator_evaluations/rest/client.rb +1 -1
  134. data/lib/google/cloud/dialogflow/v2/generator_evaluations/rest/operations.rb +2 -2
  135. data/lib/google/cloud/dialogflow/v2/generator_evaluations/rest/service_stub.rb +1 -1
  136. data/lib/google/cloud/dialogflow/v2/generator_evaluations/rest.rb +1 -1
  137. data/lib/google/cloud/dialogflow/v2/generator_evaluations.rb +1 -1
  138. data/lib/google/cloud/dialogflow/v2/generator_pb.rb +1 -1
  139. data/lib/google/cloud/dialogflow/v2/generator_services_pb.rb +1 -1
  140. data/lib/google/cloud/dialogflow/v2/generators/client.rb +1 -1
  141. data/lib/google/cloud/dialogflow/v2/generators/credentials.rb +1 -1
  142. data/lib/google/cloud/dialogflow/v2/generators/paths.rb +1 -1
  143. data/lib/google/cloud/dialogflow/v2/generators/rest/client.rb +1 -1
  144. data/lib/google/cloud/dialogflow/v2/generators/rest/service_stub.rb +1 -1
  145. data/lib/google/cloud/dialogflow/v2/generators/rest.rb +1 -1
  146. data/lib/google/cloud/dialogflow/v2/generators.rb +1 -1
  147. data/lib/google/cloud/dialogflow/v2/grounding_pb.rb +29 -0
  148. data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +1 -1
  149. data/lib/google/cloud/dialogflow/v2/intents/client.rb +1 -1
  150. data/lib/google/cloud/dialogflow/v2/intents/credentials.rb +1 -1
  151. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +1 -1
  152. data/lib/google/cloud/dialogflow/v2/intents/paths.rb +1 -1
  153. data/lib/google/cloud/dialogflow/v2/intents/rest/client.rb +1 -1
  154. data/lib/google/cloud/dialogflow/v2/intents/rest/operations.rb +2 -2
  155. data/lib/google/cloud/dialogflow/v2/intents/rest/service_stub.rb +1 -1
  156. data/lib/google/cloud/dialogflow/v2/intents/rest.rb +1 -1
  157. data/lib/google/cloud/dialogflow/v2/intents.rb +1 -1
  158. data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +1 -1
  159. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +1 -1
  160. data/lib/google/cloud/dialogflow/v2/knowledge_bases/credentials.rb +1 -1
  161. data/lib/google/cloud/dialogflow/v2/knowledge_bases/paths.rb +1 -1
  162. data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/client.rb +1 -1
  163. data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/service_stub.rb +1 -1
  164. data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest.rb +1 -1
  165. data/lib/google/cloud/dialogflow/v2/knowledge_bases.rb +1 -1
  166. data/lib/google/cloud/dialogflow/v2/participant_pb.rb +21 -1
  167. data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +6 -1
  168. data/lib/google/cloud/dialogflow/v2/participants/client.rb +176 -1
  169. data/lib/google/cloud/dialogflow/v2/participants/credentials.rb +1 -1
  170. data/lib/google/cloud/dialogflow/v2/participants/paths.rb +42 -1
  171. data/lib/google/cloud/dialogflow/v2/participants/rest/client.rb +1 -1
  172. data/lib/google/cloud/dialogflow/v2/participants/rest/service_stub.rb +1 -1
  173. data/lib/google/cloud/dialogflow/v2/participants/rest.rb +1 -1
  174. data/lib/google/cloud/dialogflow/v2/participants.rb +1 -1
  175. data/lib/google/cloud/dialogflow/v2/rest.rb +2 -1
  176. data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +1 -1
  177. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +1 -1
  178. data/lib/google/cloud/dialogflow/v2/session_entity_types/credentials.rb +1 -1
  179. data/lib/google/cloud/dialogflow/v2/session_entity_types/paths.rb +1 -1
  180. data/lib/google/cloud/dialogflow/v2/session_entity_types/rest/client.rb +1 -1
  181. data/lib/google/cloud/dialogflow/v2/session_entity_types/rest/service_stub.rb +1 -1
  182. data/lib/google/cloud/dialogflow/v2/session_entity_types/rest.rb +1 -1
  183. data/lib/google/cloud/dialogflow/v2/session_entity_types.rb +1 -1
  184. data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -1
  185. data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +1 -1
  186. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +1 -1
  187. data/lib/google/cloud/dialogflow/v2/sessions/credentials.rb +1 -1
  188. data/lib/google/cloud/dialogflow/v2/sessions/paths.rb +1 -1
  189. data/lib/google/cloud/dialogflow/v2/sessions/rest/client.rb +1 -1
  190. data/lib/google/cloud/dialogflow/v2/sessions/rest/service_stub.rb +1 -1
  191. data/lib/google/cloud/dialogflow/v2/sessions/rest.rb +1 -1
  192. data/lib/google/cloud/dialogflow/v2/sessions.rb +1 -1
  193. data/lib/google/cloud/dialogflow/v2/sip_trunk_services_pb.rb +1 -1
  194. data/lib/google/cloud/dialogflow/v2/sip_trunks/client.rb +1 -1
  195. data/lib/google/cloud/dialogflow/v2/sip_trunks/credentials.rb +1 -1
  196. data/lib/google/cloud/dialogflow/v2/sip_trunks/paths.rb +1 -1
  197. data/lib/google/cloud/dialogflow/v2/sip_trunks/rest/client.rb +1 -1
  198. data/lib/google/cloud/dialogflow/v2/sip_trunks/rest/service_stub.rb +1 -1
  199. data/lib/google/cloud/dialogflow/v2/sip_trunks/rest.rb +1 -1
  200. data/lib/google/cloud/dialogflow/v2/sip_trunks.rb +1 -1
  201. data/lib/google/cloud/dialogflow/v2/tool_call_pb.rb +1 -1
  202. data/lib/google/cloud/dialogflow/v2/tool_services_pb.rb +1 -1
  203. data/lib/google/cloud/dialogflow/v2/tools/client.rb +1 -1
  204. data/lib/google/cloud/dialogflow/v2/tools/credentials.rb +1 -1
  205. data/lib/google/cloud/dialogflow/v2/tools/paths.rb +1 -1
  206. data/lib/google/cloud/dialogflow/v2/tools/rest/client.rb +1 -1
  207. data/lib/google/cloud/dialogflow/v2/tools/rest/service_stub.rb +1 -1
  208. data/lib/google/cloud/dialogflow/v2/tools/rest.rb +1 -1
  209. data/lib/google/cloud/dialogflow/v2/tools.rb +1 -1
  210. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  211. data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +1 -1
  212. data/lib/google/cloud/dialogflow/v2/versions/client.rb +1 -1
  213. data/lib/google/cloud/dialogflow/v2/versions/credentials.rb +1 -1
  214. data/lib/google/cloud/dialogflow/v2/versions/paths.rb +1 -1
  215. data/lib/google/cloud/dialogflow/v2/versions/rest/client.rb +1 -1
  216. data/lib/google/cloud/dialogflow/v2/versions/rest/service_stub.rb +1 -1
  217. data/lib/google/cloud/dialogflow/v2/versions/rest.rb +1 -1
  218. data/lib/google/cloud/dialogflow/v2/versions.rb +1 -1
  219. data/lib/google/cloud/dialogflow/v2.rb +2 -1
  220. data/lib/google-cloud-dialogflow-v2.rb +1 -1
  221. data/proto_docs/google/api/client.rb +1 -1
  222. data/proto_docs/google/api/field_behavior.rb +1 -1
  223. data/proto_docs/google/api/launch_stage.rb +1 -1
  224. data/proto_docs/google/api/resource.rb +1 -1
  225. data/proto_docs/google/cloud/dialogflow/v2/agent.rb +2 -2
  226. data/proto_docs/google/cloud/dialogflow/v2/agent_coaching_instruction.rb +2 -2
  227. data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +24 -5
  228. data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +71 -2
  229. data/proto_docs/google/cloud/dialogflow/v2/ces_app.rb +2 -0
  230. data/proto_docs/google/cloud/dialogflow/v2/companion_agent.rb +276 -0
  231. data/proto_docs/google/cloud/dialogflow/v2/context.rb +1 -1
  232. data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +5 -6
  233. data/proto_docs/google/cloud/dialogflow/v2/conversation_dataset.rb +1 -1
  234. data/proto_docs/google/cloud/dialogflow/v2/conversation_event.rb +1 -1
  235. data/proto_docs/google/cloud/dialogflow/v2/conversation_model.rb +1 -1
  236. data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +14 -2
  237. data/proto_docs/google/cloud/dialogflow/v2/document.rb +1 -1
  238. data/proto_docs/google/cloud/dialogflow/v2/encryption_spec.rb +1 -1
  239. data/proto_docs/google/cloud/dialogflow/v2/entity_type.rb +1 -1
  240. data/proto_docs/google/cloud/dialogflow/v2/environment.rb +1 -1
  241. data/proto_docs/google/cloud/dialogflow/v2/fulfillment.rb +1 -1
  242. data/proto_docs/google/cloud/dialogflow/v2/gcs.rb +1 -1
  243. data/proto_docs/google/cloud/dialogflow/v2/generator.rb +4 -2
  244. data/proto_docs/google/cloud/dialogflow/v2/generator_evaluation.rb +1 -1
  245. data/proto_docs/google/cloud/dialogflow/v2/grounding.rb +152 -0
  246. data/proto_docs/google/cloud/dialogflow/v2/human_agent_assistant_event.rb +1 -1
  247. data/proto_docs/google/cloud/dialogflow/v2/intent.rb +1 -1
  248. data/proto_docs/google/cloud/dialogflow/v2/knowledge_base.rb +1 -1
  249. data/proto_docs/google/cloud/dialogflow/v2/operations.rb +1 -1
  250. data/proto_docs/google/cloud/dialogflow/v2/participant.rb +430 -13
  251. data/proto_docs/google/cloud/dialogflow/v2/session.rb +3 -2
  252. data/proto_docs/google/cloud/dialogflow/v2/session_entity_type.rb +1 -1
  253. data/proto_docs/google/cloud/dialogflow/v2/sip_trunk.rb +1 -1
  254. data/proto_docs/google/cloud/dialogflow/v2/tool.rb +1 -1
  255. data/proto_docs/google/cloud/dialogflow/v2/tool_call.rb +4 -1
  256. data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +1 -1
  257. data/proto_docs/google/cloud/dialogflow/v2/version.rb +1 -1
  258. data/proto_docs/google/cloud/dialogflow/v2/webhook.rb +1 -1
  259. data/proto_docs/google/longrunning/operations.rb +1 -1
  260. data/proto_docs/google/protobuf/any.rb +1 -1
  261. data/proto_docs/google/protobuf/duration.rb +1 -1
  262. data/proto_docs/google/protobuf/empty.rb +1 -1
  263. data/proto_docs/google/protobuf/field_mask.rb +1 -1
  264. data/proto_docs/google/protobuf/struct.rb +1 -1
  265. data/proto_docs/google/protobuf/timestamp.rb +8 -7
  266. data/proto_docs/google/rpc/status.rb +1 -1
  267. data/proto_docs/google/type/latlng.rb +1 -1
  268. metadata +17 -9
@@ -0,0 +1,891 @@
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/dialogflow/v2/companion_agent_pb"
21
+ require "google/cloud/location"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Dialogflow
26
+ module V2
27
+ module CompanionAgents
28
+ ##
29
+ # Client for the CompanionAgents service.
30
+ #
31
+ # Service for managing companion agents.
32
+ #
33
+ class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
37
+ # @private
38
+ DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
39
+
40
+ include Paths
41
+
42
+ # @private
43
+ attr_reader :companion_agents_stub
44
+
45
+ ##
46
+ # Configure the CompanionAgents Client class.
47
+ #
48
+ # See {::Google::Cloud::Dialogflow::V2::CompanionAgents::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all CompanionAgents clients
54
+ # ::Google::Cloud::Dialogflow::V2::CompanionAgents::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", "Dialogflow", "V2"]
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 = 60.0
75
+ default_config.retry_policy = {
76
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
77
+ }
78
+
79
+ default_config
80
+ end
81
+ yield @configure if block_given?
82
+ @configure
83
+ end
84
+
85
+ ##
86
+ # Configure the CompanionAgents Client instance.
87
+ #
88
+ # The configuration is set to the derived mode, meaning that values can be changed,
89
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
90
+ # should be made on {Client.configure}.
91
+ #
92
+ # See {::Google::Cloud::Dialogflow::V2::CompanionAgents::Client::Configuration}
93
+ # for a description of the configuration fields.
94
+ #
95
+ # @yield [config] Configure the Client client.
96
+ # @yieldparam config [Client::Configuration]
97
+ #
98
+ # @return [Client::Configuration]
99
+ #
100
+ def configure
101
+ yield @config if block_given?
102
+ @config
103
+ end
104
+
105
+ ##
106
+ # The effective universe domain
107
+ #
108
+ # @return [String]
109
+ #
110
+ def universe_domain
111
+ @companion_agents_stub.universe_domain
112
+ end
113
+
114
+ ##
115
+ # Create a new CompanionAgents client object.
116
+ #
117
+ # @example
118
+ #
119
+ # # Create a client using the default configuration
120
+ # client = ::Google::Cloud::Dialogflow::V2::CompanionAgents::Client.new
121
+ #
122
+ # # Create a client using a custom configuration
123
+ # client = ::Google::Cloud::Dialogflow::V2::CompanionAgents::Client.new do |config|
124
+ # config.timeout = 10.0
125
+ # end
126
+ #
127
+ # @yield [config] Configure the CompanionAgents client.
128
+ # @yieldparam config [Client::Configuration]
129
+ #
130
+ def initialize
131
+ # These require statements are intentionally placed here to initialize
132
+ # the gRPC module only when it's required.
133
+ # See https://github.com/googleapis/toolkit/issues/446
134
+ require "gapic/grpc"
135
+ require "google/cloud/dialogflow/v2/companion_agent_services_pb"
136
+
137
+ # Create the configuration object
138
+ @config = Configuration.new Client.configure
139
+
140
+ # Yield the configuration if needed
141
+ yield @config if block_given?
142
+
143
+ # Create credentials
144
+ credentials = @config.credentials
145
+ # Use self-signed JWT if the endpoint is unchanged from default,
146
+ # but only if the default endpoint does not have a region prefix.
147
+ enable_self_signed_jwt = @config.endpoint.nil? ||
148
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
149
+ !@config.endpoint.split(".").first.include?("-"))
150
+ credentials ||= Credentials.default scope: @config.scope,
151
+ enable_self_signed_jwt: enable_self_signed_jwt
152
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
153
+ credentials = Credentials.new credentials, scope: @config.scope
154
+ end
155
+ @quota_project_id = @config.quota_project
156
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
157
+
158
+ @companion_agents_stub = ::Gapic::ServiceStub.new(
159
+ ::Google::Cloud::Dialogflow::V2::CompanionAgents::Stub,
160
+ credentials: credentials,
161
+ endpoint: @config.endpoint,
162
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
+ universe_domain: @config.universe_domain,
164
+ channel_args: @config.channel_args,
165
+ interceptors: @config.interceptors,
166
+ channel_pool_config: @config.channel_pool,
167
+ logger: @config.logger
168
+ )
169
+
170
+ @companion_agents_stub.stub_logger&.info do |entry|
171
+ entry.set_system_name
172
+ entry.set_service
173
+ entry.message = "Created client for #{entry.service}"
174
+ entry.set_credentials_fields credentials
175
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
176
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
177
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
178
+ end
179
+
180
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
181
+ config.credentials = credentials
182
+ config.quota_project = @quota_project_id
183
+ config.endpoint = @companion_agents_stub.endpoint
184
+ config.universe_domain = @companion_agents_stub.universe_domain
185
+ config.logger = @companion_agents_stub.logger if config.respond_to? :logger=
186
+ end
187
+ end
188
+
189
+ ##
190
+ # Get the associated client for mix-in of the Locations.
191
+ #
192
+ # @return [Google::Cloud::Location::Locations::Client]
193
+ #
194
+ attr_reader :location_client
195
+
196
+ ##
197
+ # The logger used for request/response debug logging.
198
+ #
199
+ # @return [Logger]
200
+ #
201
+ def logger
202
+ @companion_agents_stub.logger
203
+ end
204
+
205
+ # Service calls
206
+
207
+ ##
208
+ # Creates a companion agent.
209
+ #
210
+ # @overload create_companion_agent(request, options = nil)
211
+ # Pass arguments to `create_companion_agent` via a request object, either of type
212
+ # {::Google::Cloud::Dialogflow::V2::CreateCompanionAgentRequest} or an equivalent Hash.
213
+ #
214
+ # @param request [::Google::Cloud::Dialogflow::V2::CreateCompanionAgentRequest, ::Hash]
215
+ # A request object representing the call parameters. Required. To specify no
216
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
217
+ # @param options [::Gapic::CallOptions, ::Hash]
218
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
219
+ #
220
+ # @overload create_companion_agent(parent: nil, companion_agent: nil, companion_agent_id: nil)
221
+ # Pass arguments to `create_companion_agent` via keyword arguments. Note that at
222
+ # least one keyword argument is required. To specify no parameters, or to keep all
223
+ # the default parameter values, pass an empty Hash as a request object (see above).
224
+ #
225
+ # @param parent [::String]
226
+ # Required. Resource identifier of the project creating the companion agent.
227
+ # Format: `projects/{project}/locations/{location}`
228
+ # @param companion_agent [::Google::Cloud::Dialogflow::V2::CompanionAgent, ::Hash]
229
+ # Required. The companion agent to create.
230
+ # @param companion_agent_id [::String]
231
+ # Optional. The resource ID of the companion agent to create. If not
232
+ # provided, the server will auto-generate a resource ID.
233
+ #
234
+ # @yield [response, operation] Access the result along with the RPC operation
235
+ # @yieldparam response [::Google::Cloud::Dialogflow::V2::CompanionAgent]
236
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
237
+ #
238
+ # @return [::Google::Cloud::Dialogflow::V2::CompanionAgent]
239
+ #
240
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
241
+ #
242
+ # @example Basic example
243
+ # require "google/cloud/dialogflow/v2"
244
+ #
245
+ # # Create a client object. The client can be reused for multiple calls.
246
+ # client = Google::Cloud::Dialogflow::V2::CompanionAgents::Client.new
247
+ #
248
+ # # Create a request. To set request fields, pass in keyword arguments.
249
+ # request = Google::Cloud::Dialogflow::V2::CreateCompanionAgentRequest.new
250
+ #
251
+ # # Call the create_companion_agent method.
252
+ # result = client.create_companion_agent request
253
+ #
254
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::CompanionAgent.
255
+ # p result
256
+ #
257
+ def create_companion_agent request, options = nil
258
+ raise ::ArgumentError, "request must be provided" if request.nil?
259
+
260
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::CreateCompanionAgentRequest
261
+
262
+ # Converts hash and nil to an options object
263
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
264
+
265
+ # Customize the options with defaults
266
+ metadata = @config.rpcs.create_companion_agent.metadata.to_h
267
+
268
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
269
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
270
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
271
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
272
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
273
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
274
+
275
+ header_params = {}
276
+ if request.parent
277
+ header_params["parent"] = request.parent
278
+ end
279
+
280
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
281
+ metadata[:"x-goog-request-params"] ||= request_params_header
282
+
283
+ options.apply_defaults timeout: @config.rpcs.create_companion_agent.timeout,
284
+ metadata: metadata,
285
+ retry_policy: @config.rpcs.create_companion_agent.retry_policy
286
+
287
+ options.apply_defaults timeout: @config.timeout,
288
+ metadata: @config.metadata,
289
+ retry_policy: @config.retry_policy
290
+
291
+ @companion_agents_stub.call_rpc :create_companion_agent, request, options: options do |response, operation|
292
+ yield response, operation if block_given?
293
+ end
294
+ rescue ::GRPC::BadStatus => e
295
+ raise ::Google::Cloud::Error.from_error(e)
296
+ end
297
+
298
+ ##
299
+ # Gets a companion agent.
300
+ #
301
+ # @overload get_companion_agent(request, options = nil)
302
+ # Pass arguments to `get_companion_agent` via a request object, either of type
303
+ # {::Google::Cloud::Dialogflow::V2::GetCompanionAgentRequest} or an equivalent Hash.
304
+ #
305
+ # @param request [::Google::Cloud::Dialogflow::V2::GetCompanionAgentRequest, ::Hash]
306
+ # A request object representing the call parameters. Required. To specify no
307
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
308
+ # @param options [::Gapic::CallOptions, ::Hash]
309
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
310
+ #
311
+ # @overload get_companion_agent(name: nil)
312
+ # Pass arguments to `get_companion_agent` via keyword arguments. Note that at
313
+ # least one keyword argument is required. To specify no parameters, or to keep all
314
+ # the default parameter values, pass an empty Hash as a request object (see above).
315
+ #
316
+ # @param name [::String]
317
+ # Required. The unique resource identifier of the CompanionAgent to get all
318
+ # information for. Format:
319
+ # `projects/{project}/locations/{location}/companionAgents/{companion_agent}`.
320
+ # Contains the information about the \\{project}, \\{location}, and
321
+ # \\{companion_agent}.
322
+ #
323
+ # @yield [response, operation] Access the result along with the RPC operation
324
+ # @yieldparam response [::Google::Cloud::Dialogflow::V2::CompanionAgent]
325
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
326
+ #
327
+ # @return [::Google::Cloud::Dialogflow::V2::CompanionAgent]
328
+ #
329
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
330
+ #
331
+ # @example Basic example
332
+ # require "google/cloud/dialogflow/v2"
333
+ #
334
+ # # Create a client object. The client can be reused for multiple calls.
335
+ # client = Google::Cloud::Dialogflow::V2::CompanionAgents::Client.new
336
+ #
337
+ # # Create a request. To set request fields, pass in keyword arguments.
338
+ # request = Google::Cloud::Dialogflow::V2::GetCompanionAgentRequest.new
339
+ #
340
+ # # Call the get_companion_agent method.
341
+ # result = client.get_companion_agent request
342
+ #
343
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::CompanionAgent.
344
+ # p result
345
+ #
346
+ def get_companion_agent request, options = nil
347
+ raise ::ArgumentError, "request must be provided" if request.nil?
348
+
349
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::GetCompanionAgentRequest
350
+
351
+ # Converts hash and nil to an options object
352
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
353
+
354
+ # Customize the options with defaults
355
+ metadata = @config.rpcs.get_companion_agent.metadata.to_h
356
+
357
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
358
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
359
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
360
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
361
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
362
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
363
+
364
+ header_params = {}
365
+ if request.name
366
+ header_params["name"] = request.name
367
+ end
368
+
369
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
370
+ metadata[:"x-goog-request-params"] ||= request_params_header
371
+
372
+ options.apply_defaults timeout: @config.rpcs.get_companion_agent.timeout,
373
+ metadata: metadata,
374
+ retry_policy: @config.rpcs.get_companion_agent.retry_policy
375
+
376
+ options.apply_defaults timeout: @config.timeout,
377
+ metadata: @config.metadata,
378
+ retry_policy: @config.retry_policy
379
+
380
+ @companion_agents_stub.call_rpc :get_companion_agent, request, options: options do |response, operation|
381
+ yield response, operation if block_given?
382
+ end
383
+ rescue ::GRPC::BadStatus => e
384
+ raise ::Google::Cloud::Error.from_error(e)
385
+ end
386
+
387
+ ##
388
+ # Updates a companion agent.
389
+ #
390
+ # @overload update_companion_agent(request, options = nil)
391
+ # Pass arguments to `update_companion_agent` via a request object, either of type
392
+ # {::Google::Cloud::Dialogflow::V2::UpdateCompanionAgentRequest} or an equivalent Hash.
393
+ #
394
+ # @param request [::Google::Cloud::Dialogflow::V2::UpdateCompanionAgentRequest, ::Hash]
395
+ # A request object representing the call parameters. Required. To specify no
396
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
397
+ # @param options [::Gapic::CallOptions, ::Hash]
398
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
399
+ #
400
+ # @overload update_companion_agent(companion_agent: nil, update_mask: nil)
401
+ # Pass arguments to `update_companion_agent` via keyword arguments. Note that at
402
+ # least one keyword argument is required. To specify no parameters, or to keep all
403
+ # the default parameter values, pass an empty Hash as a request object (see above).
404
+ #
405
+ # @param companion_agent [::Google::Cloud::Dialogflow::V2::CompanionAgent, ::Hash]
406
+ # Required. The Companion Agent to update.
407
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
408
+ # Optional. Update mask for Companion Agent.
409
+ #
410
+ # @yield [response, operation] Access the result along with the RPC operation
411
+ # @yieldparam response [::Google::Cloud::Dialogflow::V2::CompanionAgent]
412
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
413
+ #
414
+ # @return [::Google::Cloud::Dialogflow::V2::CompanionAgent]
415
+ #
416
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
417
+ #
418
+ # @example Basic example
419
+ # require "google/cloud/dialogflow/v2"
420
+ #
421
+ # # Create a client object. The client can be reused for multiple calls.
422
+ # client = Google::Cloud::Dialogflow::V2::CompanionAgents::Client.new
423
+ #
424
+ # # Create a request. To set request fields, pass in keyword arguments.
425
+ # request = Google::Cloud::Dialogflow::V2::UpdateCompanionAgentRequest.new
426
+ #
427
+ # # Call the update_companion_agent method.
428
+ # result = client.update_companion_agent request
429
+ #
430
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::CompanionAgent.
431
+ # p result
432
+ #
433
+ def update_companion_agent request, options = nil
434
+ raise ::ArgumentError, "request must be provided" if request.nil?
435
+
436
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::UpdateCompanionAgentRequest
437
+
438
+ # Converts hash and nil to an options object
439
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
440
+
441
+ # Customize the options with defaults
442
+ metadata = @config.rpcs.update_companion_agent.metadata.to_h
443
+
444
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
445
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
446
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
447
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
448
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
449
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
450
+
451
+ header_params = {}
452
+ if request.companion_agent&.name
453
+ header_params["companion_agent.name"] = request.companion_agent.name
454
+ end
455
+
456
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
457
+ metadata[:"x-goog-request-params"] ||= request_params_header
458
+
459
+ options.apply_defaults timeout: @config.rpcs.update_companion_agent.timeout,
460
+ metadata: metadata,
461
+ retry_policy: @config.rpcs.update_companion_agent.retry_policy
462
+
463
+ options.apply_defaults timeout: @config.timeout,
464
+ metadata: @config.metadata,
465
+ retry_policy: @config.retry_policy
466
+
467
+ @companion_agents_stub.call_rpc :update_companion_agent, request, options: options do |response, operation|
468
+ yield response, operation if block_given?
469
+ end
470
+ rescue ::GRPC::BadStatus => e
471
+ raise ::Google::Cloud::Error.from_error(e)
472
+ end
473
+
474
+ ##
475
+ # Deletes a companion agent.
476
+ #
477
+ # @overload delete_companion_agent(request, options = nil)
478
+ # Pass arguments to `delete_companion_agent` via a request object, either of type
479
+ # {::Google::Cloud::Dialogflow::V2::DeleteCompanionAgentRequest} or an equivalent Hash.
480
+ #
481
+ # @param request [::Google::Cloud::Dialogflow::V2::DeleteCompanionAgentRequest, ::Hash]
482
+ # A request object representing the call parameters. Required. To specify no
483
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
484
+ # @param options [::Gapic::CallOptions, ::Hash]
485
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
486
+ #
487
+ # @overload delete_companion_agent(name: nil)
488
+ # Pass arguments to `delete_companion_agent` via keyword arguments. Note that at
489
+ # least one keyword argument is required. To specify no parameters, or to keep all
490
+ # the default parameter values, pass an empty Hash as a request object (see above).
491
+ #
492
+ # @param name [::String]
493
+ # Required. The unique resource identifier of the CompanionAgent to delete.
494
+ # Format:
495
+ # `projects/{project}/locations/{location}/companionAgents/{companion_agent}`.
496
+ #
497
+ # @yield [response, operation] Access the result along with the RPC operation
498
+ # @yieldparam response [::Google::Protobuf::Empty]
499
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
500
+ #
501
+ # @return [::Google::Protobuf::Empty]
502
+ #
503
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
504
+ #
505
+ # @example Basic example
506
+ # require "google/cloud/dialogflow/v2"
507
+ #
508
+ # # Create a client object. The client can be reused for multiple calls.
509
+ # client = Google::Cloud::Dialogflow::V2::CompanionAgents::Client.new
510
+ #
511
+ # # Create a request. To set request fields, pass in keyword arguments.
512
+ # request = Google::Cloud::Dialogflow::V2::DeleteCompanionAgentRequest.new
513
+ #
514
+ # # Call the delete_companion_agent method.
515
+ # result = client.delete_companion_agent request
516
+ #
517
+ # # The returned object is of type Google::Protobuf::Empty.
518
+ # p result
519
+ #
520
+ def delete_companion_agent request, options = nil
521
+ raise ::ArgumentError, "request must be provided" if request.nil?
522
+
523
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::DeleteCompanionAgentRequest
524
+
525
+ # Converts hash and nil to an options object
526
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
527
+
528
+ # Customize the options with defaults
529
+ metadata = @config.rpcs.delete_companion_agent.metadata.to_h
530
+
531
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
532
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
533
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
534
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
535
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
536
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
537
+
538
+ header_params = {}
539
+ if request.name
540
+ header_params["name"] = request.name
541
+ end
542
+
543
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
544
+ metadata[:"x-goog-request-params"] ||= request_params_header
545
+
546
+ options.apply_defaults timeout: @config.rpcs.delete_companion_agent.timeout,
547
+ metadata: metadata,
548
+ retry_policy: @config.rpcs.delete_companion_agent.retry_policy
549
+
550
+ options.apply_defaults timeout: @config.timeout,
551
+ metadata: @config.metadata,
552
+ retry_policy: @config.retry_policy
553
+
554
+ @companion_agents_stub.call_rpc :delete_companion_agent, request, options: options do |response, operation|
555
+ yield response, operation if block_given?
556
+ end
557
+ rescue ::GRPC::BadStatus => e
558
+ raise ::Google::Cloud::Error.from_error(e)
559
+ end
560
+
561
+ ##
562
+ # Lists companion agents.
563
+ #
564
+ # @overload list_companion_agents(request, options = nil)
565
+ # Pass arguments to `list_companion_agents` via a request object, either of type
566
+ # {::Google::Cloud::Dialogflow::V2::ListCompanionAgentsRequest} or an equivalent Hash.
567
+ #
568
+ # @param request [::Google::Cloud::Dialogflow::V2::ListCompanionAgentsRequest, ::Hash]
569
+ # A request object representing the call parameters. Required. To specify no
570
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
571
+ # @param options [::Gapic::CallOptions, ::Hash]
572
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
573
+ #
574
+ # @overload list_companion_agents(parent: nil, page_size: nil, page_token: nil)
575
+ # Pass arguments to `list_companion_agents` via keyword arguments. Note that at
576
+ # least one keyword argument is required. To specify no parameters, or to keep all
577
+ # the default parameter values, pass an empty Hash as a request object (see above).
578
+ #
579
+ # @param parent [::String]
580
+ # Required. The parent resource name to list the companion agents for.
581
+ # Format: `projects/{project}/locations/{location}`
582
+ # @param page_size [::Integer]
583
+ # Optional. Maximum number of companion agents to return in a single page.
584
+ # By default 100 and at most 1000.
585
+ # @param page_token [::String]
586
+ # Optional. The page token, received from a previous call.
587
+ #
588
+ # @yield [response, operation] Access the result along with the RPC operation
589
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::CompanionAgent>]
590
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
591
+ #
592
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::V2::CompanionAgent>]
593
+ #
594
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
595
+ #
596
+ # @example Basic example
597
+ # require "google/cloud/dialogflow/v2"
598
+ #
599
+ # # Create a client object. The client can be reused for multiple calls.
600
+ # client = Google::Cloud::Dialogflow::V2::CompanionAgents::Client.new
601
+ #
602
+ # # Create a request. To set request fields, pass in keyword arguments.
603
+ # request = Google::Cloud::Dialogflow::V2::ListCompanionAgentsRequest.new
604
+ #
605
+ # # Call the list_companion_agents method.
606
+ # result = client.list_companion_agents request
607
+ #
608
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
609
+ # # over elements, and API calls will be issued to fetch pages as needed.
610
+ # result.each do |item|
611
+ # # Each element is of type ::Google::Cloud::Dialogflow::V2::CompanionAgent.
612
+ # p item
613
+ # end
614
+ #
615
+ def list_companion_agents request, options = nil
616
+ raise ::ArgumentError, "request must be provided" if request.nil?
617
+
618
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::ListCompanionAgentsRequest
619
+
620
+ # Converts hash and nil to an options object
621
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
622
+
623
+ # Customize the options with defaults
624
+ metadata = @config.rpcs.list_companion_agents.metadata.to_h
625
+
626
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
627
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
628
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
629
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
630
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
631
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
632
+
633
+ header_params = {}
634
+ if request.parent
635
+ header_params["parent"] = request.parent
636
+ end
637
+
638
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
639
+ metadata[:"x-goog-request-params"] ||= request_params_header
640
+
641
+ options.apply_defaults timeout: @config.rpcs.list_companion_agents.timeout,
642
+ metadata: metadata,
643
+ retry_policy: @config.rpcs.list_companion_agents.retry_policy
644
+
645
+ options.apply_defaults timeout: @config.timeout,
646
+ metadata: @config.metadata,
647
+ retry_policy: @config.retry_policy
648
+
649
+ @companion_agents_stub.call_rpc :list_companion_agents, request, options: options do |response, operation|
650
+ response = ::Gapic::PagedEnumerable.new @companion_agents_stub, :list_companion_agents, request, response, operation, options
651
+ yield response, operation if block_given?
652
+ throw :response, response
653
+ end
654
+ rescue ::GRPC::BadStatus => e
655
+ raise ::Google::Cloud::Error.from_error(e)
656
+ end
657
+
658
+ ##
659
+ # Configuration class for the CompanionAgents API.
660
+ #
661
+ # This class represents the configuration for CompanionAgents,
662
+ # providing control over timeouts, retry behavior, logging, transport
663
+ # parameters, and other low-level controls. Certain parameters can also be
664
+ # applied individually to specific RPCs. See
665
+ # {::Google::Cloud::Dialogflow::V2::CompanionAgents::Client::Configuration::Rpcs}
666
+ # for a list of RPCs that can be configured independently.
667
+ #
668
+ # Configuration can be applied globally to all clients, or to a single client
669
+ # on construction.
670
+ #
671
+ # @example
672
+ #
673
+ # # Modify the global config, setting the timeout for
674
+ # # create_companion_agent to 20 seconds,
675
+ # # and all remaining timeouts to 10 seconds.
676
+ # ::Google::Cloud::Dialogflow::V2::CompanionAgents::Client.configure do |config|
677
+ # config.timeout = 10.0
678
+ # config.rpcs.create_companion_agent.timeout = 20.0
679
+ # end
680
+ #
681
+ # # Apply the above configuration only to a new client.
682
+ # client = ::Google::Cloud::Dialogflow::V2::CompanionAgents::Client.new do |config|
683
+ # config.timeout = 10.0
684
+ # config.rpcs.create_companion_agent.timeout = 20.0
685
+ # end
686
+ #
687
+ # @!attribute [rw] endpoint
688
+ # A custom service endpoint, as a hostname or hostname:port. The default is
689
+ # nil, indicating to use the default endpoint in the current universe domain.
690
+ # @return [::String,nil]
691
+ # @!attribute [rw] credentials
692
+ # Credentials to send with calls. You may provide any of the following types:
693
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
694
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
695
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
696
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
697
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
698
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
699
+ # * (`nil`) indicating no credentials
700
+ #
701
+ # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
702
+ # is deprecated. Providing an unvalidated credential configuration to
703
+ # Google APIs can compromise the security of your systems and data.
704
+ #
705
+ # @example
706
+ #
707
+ # # The recommended way to provide credentials is to use the `make_creds` method
708
+ # # on the appropriate credentials class for your environment.
709
+ #
710
+ # require "googleauth"
711
+ #
712
+ # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
713
+ # json_key_io: ::File.open("/path/to/keyfile.json")
714
+ # )
715
+ #
716
+ # client = ::Google::Cloud::Dialogflow::V2::CompanionAgents::Client.new do |config|
717
+ # config.credentials = credentials
718
+ # end
719
+ #
720
+ # @note Warning: If you accept a credential configuration (JSON file or Hash) from an
721
+ # external source for authentication to Google Cloud, you must validate it before
722
+ # providing it to a Google API client library. Providing an unvalidated credential
723
+ # configuration to Google APIs can compromise the security of your systems and data.
724
+ # For more information, refer to [Validate credential configurations from external
725
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
726
+ # @return [::Object]
727
+ # @!attribute [rw] scope
728
+ # The OAuth scopes
729
+ # @return [::Array<::String>]
730
+ # @!attribute [rw] lib_name
731
+ # The library name as recorded in instrumentation and logging
732
+ # @return [::String]
733
+ # @!attribute [rw] lib_version
734
+ # The library version as recorded in instrumentation and logging
735
+ # @return [::String]
736
+ # @!attribute [rw] channel_args
737
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
738
+ # `GRPC::Core::Channel` object is provided as the credential.
739
+ # @return [::Hash]
740
+ # @!attribute [rw] interceptors
741
+ # An array of interceptors that are run before calls are executed.
742
+ # @return [::Array<::GRPC::ClientInterceptor>]
743
+ # @!attribute [rw] timeout
744
+ # The call timeout in seconds.
745
+ # @return [::Numeric]
746
+ # @!attribute [rw] metadata
747
+ # Additional gRPC headers to be sent with the call.
748
+ # @return [::Hash{::Symbol=>::String}]
749
+ # @!attribute [rw] retry_policy
750
+ # The retry policy. The value is a hash with the following keys:
751
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
752
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
753
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
754
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
755
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
756
+ # trigger a retry.
757
+ # @return [::Hash]
758
+ # @!attribute [rw] quota_project
759
+ # A separate project against which to charge quota.
760
+ # @return [::String]
761
+ # @!attribute [rw] universe_domain
762
+ # The universe domain within which to make requests. This determines the
763
+ # default endpoint URL. The default value of nil uses the environment
764
+ # universe (usually the default "googleapis.com" universe).
765
+ # @return [::String,nil]
766
+ # @!attribute [rw] logger
767
+ # A custom logger to use for request/response debug logging, or the value
768
+ # `:default` (the default) to construct a default logger, or `nil` to
769
+ # explicitly disable logging.
770
+ # @return [::Logger,:default,nil]
771
+ #
772
+ class Configuration
773
+ extend ::Gapic::Config
774
+
775
+ # @private
776
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
777
+ DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
778
+
779
+ config_attr :endpoint, nil, ::String, nil
780
+ config_attr :credentials, nil do |value|
781
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
782
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
783
+ allowed.any? { |klass| klass === value }
784
+ end
785
+ config_attr :scope, nil, ::String, ::Array, nil
786
+ config_attr :lib_name, nil, ::String, nil
787
+ config_attr :lib_version, nil, ::String, nil
788
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
789
+ config_attr :interceptors, nil, ::Array, nil
790
+ config_attr :timeout, nil, ::Numeric, nil
791
+ config_attr :metadata, nil, ::Hash, nil
792
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
793
+ config_attr :quota_project, nil, ::String, nil
794
+ config_attr :universe_domain, nil, ::String, nil
795
+ config_attr :logger, :default, ::Logger, nil, :default
796
+
797
+ # @private
798
+ def initialize parent_config = nil
799
+ @parent_config = parent_config unless parent_config.nil?
800
+
801
+ yield self if block_given?
802
+ end
803
+
804
+ ##
805
+ # Configurations for individual RPCs
806
+ # @return [Rpcs]
807
+ #
808
+ def rpcs
809
+ @rpcs ||= begin
810
+ parent_rpcs = nil
811
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
812
+ Rpcs.new parent_rpcs
813
+ end
814
+ end
815
+
816
+ ##
817
+ # Configuration for the channel pool
818
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
819
+ #
820
+ def channel_pool
821
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
822
+ end
823
+
824
+ ##
825
+ # Configuration RPC class for the CompanionAgents API.
826
+ #
827
+ # Includes fields providing the configuration for each RPC in this service.
828
+ # Each configuration object is of type `Gapic::Config::Method` and includes
829
+ # the following configuration fields:
830
+ #
831
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
832
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
833
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
834
+ # include the following keys:
835
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
836
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
837
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
838
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
839
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
840
+ # trigger a retry.
841
+ #
842
+ class Rpcs
843
+ ##
844
+ # RPC-specific configuration for `create_companion_agent`
845
+ # @return [::Gapic::Config::Method]
846
+ #
847
+ attr_reader :create_companion_agent
848
+ ##
849
+ # RPC-specific configuration for `get_companion_agent`
850
+ # @return [::Gapic::Config::Method]
851
+ #
852
+ attr_reader :get_companion_agent
853
+ ##
854
+ # RPC-specific configuration for `update_companion_agent`
855
+ # @return [::Gapic::Config::Method]
856
+ #
857
+ attr_reader :update_companion_agent
858
+ ##
859
+ # RPC-specific configuration for `delete_companion_agent`
860
+ # @return [::Gapic::Config::Method]
861
+ #
862
+ attr_reader :delete_companion_agent
863
+ ##
864
+ # RPC-specific configuration for `list_companion_agents`
865
+ # @return [::Gapic::Config::Method]
866
+ #
867
+ attr_reader :list_companion_agents
868
+
869
+ # @private
870
+ def initialize parent_rpcs = nil
871
+ create_companion_agent_config = parent_rpcs.create_companion_agent if parent_rpcs.respond_to? :create_companion_agent
872
+ @create_companion_agent = ::Gapic::Config::Method.new create_companion_agent_config
873
+ get_companion_agent_config = parent_rpcs.get_companion_agent if parent_rpcs.respond_to? :get_companion_agent
874
+ @get_companion_agent = ::Gapic::Config::Method.new get_companion_agent_config
875
+ update_companion_agent_config = parent_rpcs.update_companion_agent if parent_rpcs.respond_to? :update_companion_agent
876
+ @update_companion_agent = ::Gapic::Config::Method.new update_companion_agent_config
877
+ delete_companion_agent_config = parent_rpcs.delete_companion_agent if parent_rpcs.respond_to? :delete_companion_agent
878
+ @delete_companion_agent = ::Gapic::Config::Method.new delete_companion_agent_config
879
+ list_companion_agents_config = parent_rpcs.list_companion_agents if parent_rpcs.respond_to? :list_companion_agents
880
+ @list_companion_agents = ::Gapic::Config::Method.new list_companion_agents_config
881
+
882
+ yield self if block_given?
883
+ end
884
+ end
885
+ end
886
+ end
887
+ end
888
+ end
889
+ end
890
+ end
891
+ end