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