google-cloud-dialogflow-cx-v3 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +139 -0
  6. data/lib/google/cloud/dialogflow/cx/v3/advanced_settings_pb.rb +32 -0
  7. data/lib/google/cloud/dialogflow/cx/v3/agent_pb.rb +122 -0
  8. data/lib/google/cloud/dialogflow/cx/v3/agent_services_pb.rb +82 -0
  9. data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +1051 -0
  10. data/lib/google/cloud/dialogflow/cx/v3/agents/credentials.rb +54 -0
  11. data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +666 -0
  12. data/lib/google/cloud/dialogflow/cx/v3/agents/paths.rb +151 -0
  13. data/lib/google/cloud/dialogflow/cx/v3/agents.rb +52 -0
  14. data/lib/google/cloud/dialogflow/cx/v3/audio_config_pb.rb +94 -0
  15. data/lib/google/cloud/dialogflow/cx/v3/entity_type_pb.rb +92 -0
  16. data/lib/google/cloud/dialogflow/cx/v3/entity_type_services_pb.rb +67 -0
  17. data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +766 -0
  18. data/lib/google/cloud/dialogflow/cx/v3/entity_types/credentials.rb +54 -0
  19. data/lib/google/cloud/dialogflow/cx/v3/entity_types/paths.rb +75 -0
  20. data/lib/google/cloud/dialogflow/cx/v3/entity_types.rb +51 -0
  21. data/lib/google/cloud/dialogflow/cx/v3/environment_pb.rb +117 -0
  22. data/lib/google/cloud/dialogflow/cx/v3/environment_services_pb.rb +61 -0
  23. data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +950 -0
  24. data/lib/google/cloud/dialogflow/cx/v3/environments/credentials.rb +54 -0
  25. data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +666 -0
  26. data/lib/google/cloud/dialogflow/cx/v3/environments/paths.rb +98 -0
  27. data/lib/google/cloud/dialogflow/cx/v3/environments.rb +52 -0
  28. data/lib/google/cloud/dialogflow/cx/v3/experiment_pb.rb +177 -0
  29. data/lib/google/cloud/dialogflow/cx/v3/experiment_services_pb.rb +61 -0
  30. data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +851 -0
  31. data/lib/google/cloud/dialogflow/cx/v3/experiments/credentials.rb +54 -0
  32. data/lib/google/cloud/dialogflow/cx/v3/experiments/paths.rb +102 -0
  33. data/lib/google/cloud/dialogflow/cx/v3/experiments.rb +51 -0
  34. data/lib/google/cloud/dialogflow/cx/v3/flow_pb.rb +145 -0
  35. data/lib/google/cloud/dialogflow/cx/v3/flow_services_pb.rb +88 -0
  36. data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +1200 -0
  37. data/lib/google/cloud/dialogflow/cx/v3/flows/credentials.rb +54 -0
  38. data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +666 -0
  39. data/lib/google/cloud/dialogflow/cx/v3/flows/paths.rb +184 -0
  40. data/lib/google/cloud/dialogflow/cx/v3/flows.rb +52 -0
  41. data/lib/google/cloud/dialogflow/cx/v3/fulfillment_pb.rb +55 -0
  42. data/lib/google/cloud/dialogflow/cx/v3/intent_pb.rb +97 -0
  43. data/lib/google/cloud/dialogflow/cx/v3/intent_services_pb.rb +67 -0
  44. data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +750 -0
  45. data/lib/google/cloud/dialogflow/cx/v3/intents/credentials.rb +54 -0
  46. data/lib/google/cloud/dialogflow/cx/v3/intents/paths.rb +96 -0
  47. data/lib/google/cloud/dialogflow/cx/v3/intents.rb +51 -0
  48. data/lib/google/cloud/dialogflow/cx/v3/page_pb.rb +113 -0
  49. data/lib/google/cloud/dialogflow/cx/v3/page_services_pb.rb +67 -0
  50. data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +805 -0
  51. data/lib/google/cloud/dialogflow/cx/v3/pages/credentials.rb +54 -0
  52. data/lib/google/cloud/dialogflow/cx/v3/pages/paths.rb +165 -0
  53. data/lib/google/cloud/dialogflow/cx/v3/pages.rb +51 -0
  54. data/lib/google/cloud/dialogflow/cx/v3/response_message_pb.rb +77 -0
  55. data/lib/google/cloud/dialogflow/cx/v3/security_settings_pb.rb +89 -0
  56. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +696 -0
  57. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/credentials.rb +54 -0
  58. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/paths.rb +157 -0
  59. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service.rb +51 -0
  60. data/lib/google/cloud/dialogflow/cx/v3/security_settings_services_pb.rb +56 -0
  61. data/lib/google/cloud/dialogflow/cx/v3/session_entity_type_pb.rb +68 -0
  62. data/lib/google/cloud/dialogflow/cx/v3/session_entity_type_services_pb.rb +55 -0
  63. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +715 -0
  64. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/credentials.rb +54 -0
  65. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/paths.rb +137 -0
  66. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types.rb +51 -0
  67. data/lib/google/cloud/dialogflow/cx/v3/session_pb.rb +209 -0
  68. data/lib/google/cloud/dialogflow/cx/v3/session_services_pb.rb +71 -0
  69. data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +654 -0
  70. data/lib/google/cloud/dialogflow/cx/v3/sessions/credentials.rb +54 -0
  71. data/lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb +225 -0
  72. data/lib/google/cloud/dialogflow/cx/v3/sessions.rb +53 -0
  73. data/lib/google/cloud/dialogflow/cx/v3/test_case_pb.rb +302 -0
  74. data/lib/google/cloud/dialogflow/cx/v3/test_case_services_pb.rb +73 -0
  75. data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +1324 -0
  76. data/lib/google/cloud/dialogflow/cx/v3/test_cases/credentials.rb +54 -0
  77. data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +666 -0
  78. data/lib/google/cloud/dialogflow/cx/v3/test_cases/paths.rb +249 -0
  79. data/lib/google/cloud/dialogflow/cx/v3/test_cases.rb +53 -0
  80. data/lib/google/cloud/dialogflow/cx/v3/transition_route_group_pb.rb +67 -0
  81. data/lib/google/cloud/dialogflow/cx/v3/transition_route_group_services_pb.rb +67 -0
  82. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +766 -0
  83. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/credentials.rb +54 -0
  84. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/paths.rb +144 -0
  85. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups.rb +51 -0
  86. data/lib/google/cloud/dialogflow/cx/v3/validation_message_pb.rb +59 -0
  87. data/lib/google/cloud/dialogflow/cx/v3/version.rb +30 -0
  88. data/lib/google/cloud/dialogflow/cx/v3/version_pb.rb +88 -0
  89. data/lib/google/cloud/dialogflow/cx/v3/version_services_pb.rb +57 -0
  90. data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +792 -0
  91. data/lib/google/cloud/dialogflow/cx/v3/versions/credentials.rb +54 -0
  92. data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +666 -0
  93. data/lib/google/cloud/dialogflow/cx/v3/versions/paths.rb +79 -0
  94. data/lib/google/cloud/dialogflow/cx/v3/versions.rb +52 -0
  95. data/lib/google/cloud/dialogflow/cx/v3/webhook_pb.rb +172 -0
  96. data/lib/google/cloud/dialogflow/cx/v3/webhook_services_pb.rb +55 -0
  97. data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +704 -0
  98. data/lib/google/cloud/dialogflow/cx/v3/webhooks/credentials.rb +54 -0
  99. data/lib/google/cloud/dialogflow/cx/v3/webhooks/paths.rb +96 -0
  100. data/lib/google/cloud/dialogflow/cx/v3/webhooks.rb +51 -0
  101. data/lib/google/cloud/dialogflow/cx/v3.rb +53 -0
  102. data/lib/google-cloud-dialogflow-cx-v3.rb +21 -0
  103. data/proto_docs/README.md +4 -0
  104. data/proto_docs/google/api/field_behavior.rb +71 -0
  105. data/proto_docs/google/api/resource.rb +283 -0
  106. data/proto_docs/google/cloud/dialogflow/cx/v3/advanced_settings.rb +57 -0
  107. data/proto_docs/google/cloud/dialogflow/cx/v3/agent.rb +301 -0
  108. data/proto_docs/google/cloud/dialogflow/cx/v3/audio_config.rb +322 -0
  109. data/proto_docs/google/cloud/dialogflow/cx/v3/entity_type.rb +306 -0
  110. data/proto_docs/google/cloud/dialogflow/cx/v3/environment.rb +279 -0
  111. data/proto_docs/google/cloud/dialogflow/cx/v3/experiment.rb +438 -0
  112. data/proto_docs/google/cloud/dialogflow/cx/v3/flow.rb +438 -0
  113. data/proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb +126 -0
  114. data/proto_docs/google/cloud/dialogflow/cx/v3/intent.rb +318 -0
  115. data/proto_docs/google/cloud/dialogflow/cx/v3/page.rb +478 -0
  116. data/proto_docs/google/cloud/dialogflow/cx/v3/response_message.rb +220 -0
  117. data/proto_docs/google/cloud/dialogflow/cx/v3/security_settings.rb +222 -0
  118. data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +798 -0
  119. data/proto_docs/google/cloud/dialogflow/cx/v3/session_entity_type.rb +184 -0
  120. data/proto_docs/google/cloud/dialogflow/cx/v3/test_case.rb +757 -0
  121. data/proto_docs/google/cloud/dialogflow/cx/v3/transition_route_group.rb +195 -0
  122. data/proto_docs/google/cloud/dialogflow/cx/v3/validation_message.rb +121 -0
  123. data/proto_docs/google/cloud/dialogflow/cx/v3/version.rb +182 -0
  124. data/proto_docs/google/cloud/dialogflow/cx/v3/webhook.rb +496 -0
  125. data/proto_docs/google/longrunning/operations.rb +164 -0
  126. data/proto_docs/google/protobuf/any.rb +141 -0
  127. data/proto_docs/google/protobuf/duration.rb +98 -0
  128. data/proto_docs/google/protobuf/empty.rb +36 -0
  129. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  130. data/proto_docs/google/protobuf/struct.rb +96 -0
  131. data/proto_docs/google/protobuf/timestamp.rb +129 -0
  132. data/proto_docs/google/rpc/status.rb +46 -0
  133. data/proto_docs/google/type/latlng.rb +38 -0
  134. metadata +326 -0
@@ -0,0 +1,32 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/dialogflow/cx/v3/advanced_settings.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/field_behavior_pb'
7
+ require 'google/protobuf/duration_pb'
8
+ require 'google/api/annotations_pb'
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_file("google/cloud/dialogflow/cx/v3/advanced_settings.proto", :syntax => :proto3) do
11
+ add_message "google.cloud.dialogflow.cx.v3.AdvancedSettings" do
12
+ optional :logging_settings, :message, 6, "google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings"
13
+ end
14
+ add_message "google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings" do
15
+ optional :enable_stackdriver_logging, :bool, 2
16
+ optional :enable_interaction_logging, :bool, 3
17
+ end
18
+ end
19
+ end
20
+
21
+ module Google
22
+ module Cloud
23
+ module Dialogflow
24
+ module CX
25
+ module V3
26
+ AdvancedSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.AdvancedSettings").msgclass
27
+ AdvancedSettings::LoggingSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings").msgclass
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,122 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/dialogflow/cx/v3/agent.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/api/client_pb'
8
+ require 'google/api/field_behavior_pb'
9
+ require 'google/api/resource_pb'
10
+ require 'google/cloud/dialogflow/cx/v3/advanced_settings_pb'
11
+ require 'google/cloud/dialogflow/cx/v3/flow_pb'
12
+ require 'google/cloud/dialogflow/cx/v3/security_settings_pb'
13
+ require 'google/longrunning/operations_pb'
14
+ require 'google/protobuf/empty_pb'
15
+ require 'google/protobuf/field_mask_pb'
16
+ Google::Protobuf::DescriptorPool.generated_pool.build do
17
+ add_file("google/cloud/dialogflow/cx/v3/agent.proto", :syntax => :proto3) do
18
+ add_message "google.cloud.dialogflow.cx.v3.SpeechToTextSettings" do
19
+ optional :enable_speech_adaptation, :bool, 1
20
+ end
21
+ add_message "google.cloud.dialogflow.cx.v3.Agent" do
22
+ optional :name, :string, 1
23
+ optional :display_name, :string, 2
24
+ optional :default_language_code, :string, 3
25
+ repeated :supported_language_codes, :string, 4
26
+ optional :time_zone, :string, 5
27
+ optional :description, :string, 6
28
+ optional :avatar_uri, :string, 7
29
+ optional :speech_to_text_settings, :message, 13, "google.cloud.dialogflow.cx.v3.SpeechToTextSettings"
30
+ optional :start_flow, :string, 16
31
+ optional :security_settings, :string, 17
32
+ optional :enable_stackdriver_logging, :bool, 18
33
+ optional :enable_spell_correction, :bool, 20
34
+ optional :advanced_settings, :message, 22, "google.cloud.dialogflow.cx.v3.AdvancedSettings"
35
+ end
36
+ add_message "google.cloud.dialogflow.cx.v3.ListAgentsRequest" do
37
+ optional :parent, :string, 1
38
+ optional :page_size, :int32, 2
39
+ optional :page_token, :string, 3
40
+ end
41
+ add_message "google.cloud.dialogflow.cx.v3.ListAgentsResponse" do
42
+ repeated :agents, :message, 1, "google.cloud.dialogflow.cx.v3.Agent"
43
+ optional :next_page_token, :string, 2
44
+ end
45
+ add_message "google.cloud.dialogflow.cx.v3.GetAgentRequest" do
46
+ optional :name, :string, 1
47
+ end
48
+ add_message "google.cloud.dialogflow.cx.v3.CreateAgentRequest" do
49
+ optional :parent, :string, 1
50
+ optional :agent, :message, 2, "google.cloud.dialogflow.cx.v3.Agent"
51
+ end
52
+ add_message "google.cloud.dialogflow.cx.v3.UpdateAgentRequest" do
53
+ optional :agent, :message, 1, "google.cloud.dialogflow.cx.v3.Agent"
54
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
55
+ end
56
+ add_message "google.cloud.dialogflow.cx.v3.DeleteAgentRequest" do
57
+ optional :name, :string, 1
58
+ end
59
+ add_message "google.cloud.dialogflow.cx.v3.ExportAgentRequest" do
60
+ optional :name, :string, 1
61
+ optional :agent_uri, :string, 2
62
+ optional :environment, :string, 5
63
+ end
64
+ add_message "google.cloud.dialogflow.cx.v3.ExportAgentResponse" do
65
+ oneof :agent do
66
+ optional :agent_uri, :string, 1
67
+ optional :agent_content, :bytes, 2
68
+ end
69
+ end
70
+ add_message "google.cloud.dialogflow.cx.v3.RestoreAgentRequest" do
71
+ optional :name, :string, 1
72
+ optional :restore_option, :enum, 5, "google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption"
73
+ oneof :agent do
74
+ optional :agent_uri, :string, 2
75
+ optional :agent_content, :bytes, 3
76
+ end
77
+ end
78
+ add_enum "google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption" do
79
+ value :RESTORE_OPTION_UNSPECIFIED, 0
80
+ value :KEEP, 1
81
+ value :FALLBACK, 2
82
+ end
83
+ add_message "google.cloud.dialogflow.cx.v3.ValidateAgentRequest" do
84
+ optional :name, :string, 1
85
+ optional :language_code, :string, 2
86
+ end
87
+ add_message "google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest" do
88
+ optional :name, :string, 1
89
+ optional :language_code, :string, 2
90
+ end
91
+ add_message "google.cloud.dialogflow.cx.v3.AgentValidationResult" do
92
+ optional :name, :string, 1
93
+ repeated :flow_validation_results, :message, 2, "google.cloud.dialogflow.cx.v3.FlowValidationResult"
94
+ end
95
+ end
96
+ end
97
+
98
+ module Google
99
+ module Cloud
100
+ module Dialogflow
101
+ module CX
102
+ module V3
103
+ SpeechToTextSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.SpeechToTextSettings").msgclass
104
+ Agent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Agent").msgclass
105
+ ListAgentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ListAgentsRequest").msgclass
106
+ ListAgentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ListAgentsResponse").msgclass
107
+ GetAgentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.GetAgentRequest").msgclass
108
+ CreateAgentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.CreateAgentRequest").msgclass
109
+ UpdateAgentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.UpdateAgentRequest").msgclass
110
+ DeleteAgentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.DeleteAgentRequest").msgclass
111
+ ExportAgentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ExportAgentRequest").msgclass
112
+ ExportAgentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ExportAgentResponse").msgclass
113
+ RestoreAgentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.RestoreAgentRequest").msgclass
114
+ RestoreAgentRequest::RestoreOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.RestoreAgentRequest.RestoreOption").enummodule
115
+ ValidateAgentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ValidateAgentRequest").msgclass
116
+ GetAgentValidationResultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.GetAgentValidationResultRequest").msgclass
117
+ AgentValidationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.AgentValidationResult").msgclass
118
+ end
119
+ end
120
+ end
121
+ end
122
+ end
@@ -0,0 +1,82 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/dialogflow/cx/v3/agent.proto for package 'Google.Cloud.Dialogflow.CX.V3'
3
+ # Original file comments:
4
+ # Copyright 2021 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/cloud/dialogflow/cx/v3/agent_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module Dialogflow
25
+ module CX
26
+ module V3
27
+ module Agents
28
+ # Service for managing [Agents][google.cloud.dialogflow.cx.v3.Agent].
29
+ class Service
30
+
31
+ include GRPC::GenericService
32
+
33
+ self.marshal_class_method = :encode
34
+ self.unmarshal_class_method = :decode
35
+ self.service_name = 'google.cloud.dialogflow.cx.v3.Agents'
36
+
37
+ # Returns the list of all agents in the specified location.
38
+ rpc :ListAgents, ::Google::Cloud::Dialogflow::CX::V3::ListAgentsRequest, ::Google::Cloud::Dialogflow::CX::V3::ListAgentsResponse
39
+ # Retrieves the specified agent.
40
+ rpc :GetAgent, ::Google::Cloud::Dialogflow::CX::V3::GetAgentRequest, ::Google::Cloud::Dialogflow::CX::V3::Agent
41
+ # Creates an agent in the specified location.
42
+ #
43
+ # Note: You should always train flows prior to sending them queries. See the
44
+ # [training
45
+ # documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
46
+ rpc :CreateAgent, ::Google::Cloud::Dialogflow::CX::V3::CreateAgentRequest, ::Google::Cloud::Dialogflow::CX::V3::Agent
47
+ # Updates the specified agent.
48
+ #
49
+ # Note: You should always train flows prior to sending them queries. See the
50
+ # [training
51
+ # documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
52
+ rpc :UpdateAgent, ::Google::Cloud::Dialogflow::CX::V3::UpdateAgentRequest, ::Google::Cloud::Dialogflow::CX::V3::Agent
53
+ # Deletes the specified agent.
54
+ rpc :DeleteAgent, ::Google::Cloud::Dialogflow::CX::V3::DeleteAgentRequest, ::Google::Protobuf::Empty
55
+ # Exports the specified agent to a binary file.
56
+ rpc :ExportAgent, ::Google::Cloud::Dialogflow::CX::V3::ExportAgentRequest, ::Google::Longrunning::Operation
57
+ # Restores the specified agent from a binary file.
58
+ #
59
+ # Replaces the current agent with a new one. Note that all existing resources
60
+ # in agent (e.g. intents, entity types, flows) will be removed.
61
+ #
62
+ #
63
+ # Note: You should always train flows prior to sending them queries. See the
64
+ # [training
65
+ # documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
66
+ rpc :RestoreAgent, ::Google::Cloud::Dialogflow::CX::V3::RestoreAgentRequest, ::Google::Longrunning::Operation
67
+ # Validates the specified agent and creates or updates validation results.
68
+ # The agent in draft version is validated. Please call this API after the
69
+ # training is completed to get the complete validation results.
70
+ rpc :ValidateAgent, ::Google::Cloud::Dialogflow::CX::V3::ValidateAgentRequest, ::Google::Cloud::Dialogflow::CX::V3::AgentValidationResult
71
+ # Gets the latest agent validation result. Agent validation is performed
72
+ # when ValidateAgent is called.
73
+ rpc :GetAgentValidationResult, ::Google::Cloud::Dialogflow::CX::V3::GetAgentValidationResultRequest, ::Google::Cloud::Dialogflow::CX::V3::AgentValidationResult
74
+ end
75
+
76
+ Stub = Service.rpc_stub_class
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,1051 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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/cx/v3/agent_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Dialogflow
25
+ module CX
26
+ module V3
27
+ module Agents
28
+ ##
29
+ # Client for the Agents service.
30
+ #
31
+ # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Agent Agents}.
32
+ #
33
+ class Client
34
+ include Paths
35
+
36
+ # @private
37
+ attr_reader :agents_stub
38
+
39
+ ##
40
+ # Configure the Agents Client class.
41
+ #
42
+ # See {::Google::Cloud::Dialogflow::CX::V3::Agents::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # @example
46
+ #
47
+ # # Modify the configuration for all Agents clients
48
+ # ::Google::Cloud::Dialogflow::CX::V3::Agents::Client.configure do |config|
49
+ # config.timeout = 10.0
50
+ # end
51
+ #
52
+ # @yield [config] Configure the Client client.
53
+ # @yieldparam config [Client::Configuration]
54
+ #
55
+ # @return [Client::Configuration]
56
+ #
57
+ def self.configure
58
+ @configure ||= begin
59
+ namespace = ["Google", "Cloud", "Dialogflow", "CX", "V3"]
60
+ parent_config = while namespace.any?
61
+ parent_name = namespace.join "::"
62
+ parent_const = const_get parent_name
63
+ break parent_const.configure if parent_const.respond_to? :configure
64
+ namespace.pop
65
+ end
66
+ default_config = Client::Configuration.new parent_config
67
+
68
+ default_config.timeout = 60.0
69
+ default_config.retry_policy = {
70
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
71
+ }
72
+
73
+ default_config
74
+ end
75
+ yield @configure if block_given?
76
+ @configure
77
+ end
78
+
79
+ ##
80
+ # Configure the Agents Client instance.
81
+ #
82
+ # The configuration is set to the derived mode, meaning that values can be changed,
83
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
84
+ # should be made on {Client.configure}.
85
+ #
86
+ # See {::Google::Cloud::Dialogflow::CX::V3::Agents::Client::Configuration}
87
+ # for a description of the configuration fields.
88
+ #
89
+ # @yield [config] Configure the Client client.
90
+ # @yieldparam config [Client::Configuration]
91
+ #
92
+ # @return [Client::Configuration]
93
+ #
94
+ def configure
95
+ yield @config if block_given?
96
+ @config
97
+ end
98
+
99
+ ##
100
+ # Create a new Agents client object.
101
+ #
102
+ # @example
103
+ #
104
+ # # Create a client using the default configuration
105
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Agents::Client.new
106
+ #
107
+ # # Create a client using a custom configuration
108
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Agents::Client.new do |config|
109
+ # config.timeout = 10.0
110
+ # end
111
+ #
112
+ # @yield [config] Configure the Agents client.
113
+ # @yieldparam config [Client::Configuration]
114
+ #
115
+ def initialize
116
+ # These require statements are intentionally placed here to initialize
117
+ # the gRPC module only when it's required.
118
+ # See https://github.com/googleapis/toolkit/issues/446
119
+ require "gapic/grpc"
120
+ require "google/cloud/dialogflow/cx/v3/agent_services_pb"
121
+
122
+ # Create the configuration object
123
+ @config = Configuration.new Client.configure
124
+
125
+ # Yield the configuration if needed
126
+ yield @config if block_given?
127
+
128
+ # Create credentials
129
+ credentials = @config.credentials
130
+ # Use self-signed JWT if the endpoint is unchanged from default,
131
+ # but only if the default endpoint does not have a region prefix.
132
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
133
+ !@config.endpoint.split(".").first.include?("-")
134
+ credentials ||= Credentials.default scope: @config.scope,
135
+ enable_self_signed_jwt: enable_self_signed_jwt
136
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
137
+ credentials = Credentials.new credentials, scope: @config.scope
138
+ end
139
+ @quota_project_id = @config.quota_project
140
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
141
+
142
+ @operations_client = Operations.new do |config|
143
+ config.credentials = credentials
144
+ config.endpoint = @config.endpoint
145
+ end
146
+
147
+ @agents_stub = ::Gapic::ServiceStub.new(
148
+ ::Google::Cloud::Dialogflow::CX::V3::Agents::Stub,
149
+ credentials: credentials,
150
+ endpoint: @config.endpoint,
151
+ channel_args: @config.channel_args,
152
+ interceptors: @config.interceptors
153
+ )
154
+ end
155
+
156
+ ##
157
+ # Get the associated client for long-running operations.
158
+ #
159
+ # @return [::Google::Cloud::Dialogflow::CX::V3::Agents::Operations]
160
+ #
161
+ attr_reader :operations_client
162
+
163
+ # Service calls
164
+
165
+ ##
166
+ # Returns the list of all agents in the specified location.
167
+ #
168
+ # @overload list_agents(request, options = nil)
169
+ # Pass arguments to `list_agents` via a request object, either of type
170
+ # {::Google::Cloud::Dialogflow::CX::V3::ListAgentsRequest} or an equivalent Hash.
171
+ #
172
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::ListAgentsRequest, ::Hash]
173
+ # A request object representing the call parameters. Required. To specify no
174
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
175
+ # @param options [::Gapic::CallOptions, ::Hash]
176
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
177
+ #
178
+ # @overload list_agents(parent: nil, page_size: nil, page_token: nil)
179
+ # Pass arguments to `list_agents` via keyword arguments. Note that at
180
+ # least one keyword argument is required. To specify no parameters, or to keep all
181
+ # the default parameter values, pass an empty Hash as a request object (see above).
182
+ #
183
+ # @param parent [::String]
184
+ # Required. The location to list all agents for.
185
+ # Format: `projects/<Project ID>/locations/<Location ID>`.
186
+ # @param page_size [::Integer]
187
+ # The maximum number of items to return in a single page. By default 100 and
188
+ # at most 1000.
189
+ # @param page_token [::String]
190
+ # The next_page_token value returned from a previous list request.
191
+ #
192
+ # @yield [response, operation] Access the result along with the RPC operation
193
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Agent>]
194
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
195
+ #
196
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Agent>]
197
+ #
198
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
199
+ #
200
+ def list_agents request, options = nil
201
+ raise ::ArgumentError, "request must be provided" if request.nil?
202
+
203
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::ListAgentsRequest
204
+
205
+ # Converts hash and nil to an options object
206
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
207
+
208
+ # Customize the options with defaults
209
+ metadata = @config.rpcs.list_agents.metadata.to_h
210
+
211
+ # Set x-goog-api-client and x-goog-user-project headers
212
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
213
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
214
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
215
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
216
+
217
+ header_params = {
218
+ "parent" => request.parent
219
+ }
220
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
221
+ metadata[:"x-goog-request-params"] ||= request_params_header
222
+
223
+ options.apply_defaults timeout: @config.rpcs.list_agents.timeout,
224
+ metadata: metadata,
225
+ retry_policy: @config.rpcs.list_agents.retry_policy
226
+
227
+ options.apply_defaults timeout: @config.timeout,
228
+ metadata: @config.metadata,
229
+ retry_policy: @config.retry_policy
230
+
231
+ @agents_stub.call_rpc :list_agents, request, options: options do |response, operation|
232
+ response = ::Gapic::PagedEnumerable.new @agents_stub, :list_agents, request, response, operation, options
233
+ yield response, operation if block_given?
234
+ return response
235
+ end
236
+ rescue ::GRPC::BadStatus => e
237
+ raise ::Google::Cloud::Error.from_error(e)
238
+ end
239
+
240
+ ##
241
+ # Retrieves the specified agent.
242
+ #
243
+ # @overload get_agent(request, options = nil)
244
+ # Pass arguments to `get_agent` via a request object, either of type
245
+ # {::Google::Cloud::Dialogflow::CX::V3::GetAgentRequest} or an equivalent Hash.
246
+ #
247
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::GetAgentRequest, ::Hash]
248
+ # A request object representing the call parameters. Required. To specify no
249
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
250
+ # @param options [::Gapic::CallOptions, ::Hash]
251
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
252
+ #
253
+ # @overload get_agent(name: nil)
254
+ # Pass arguments to `get_agent` via keyword arguments. Note that at
255
+ # least one keyword argument is required. To specify no parameters, or to keep all
256
+ # the default parameter values, pass an empty Hash as a request object (see above).
257
+ #
258
+ # @param name [::String]
259
+ # Required. The name of the agent.
260
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
261
+ #
262
+ # @yield [response, operation] Access the result along with the RPC operation
263
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::Agent]
264
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
265
+ #
266
+ # @return [::Google::Cloud::Dialogflow::CX::V3::Agent]
267
+ #
268
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
269
+ #
270
+ def get_agent request, options = nil
271
+ raise ::ArgumentError, "request must be provided" if request.nil?
272
+
273
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::GetAgentRequest
274
+
275
+ # Converts hash and nil to an options object
276
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
277
+
278
+ # Customize the options with defaults
279
+ metadata = @config.rpcs.get_agent.metadata.to_h
280
+
281
+ # Set x-goog-api-client and x-goog-user-project headers
282
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
283
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
284
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
285
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
286
+
287
+ header_params = {
288
+ "name" => request.name
289
+ }
290
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
291
+ metadata[:"x-goog-request-params"] ||= request_params_header
292
+
293
+ options.apply_defaults timeout: @config.rpcs.get_agent.timeout,
294
+ metadata: metadata,
295
+ retry_policy: @config.rpcs.get_agent.retry_policy
296
+
297
+ options.apply_defaults timeout: @config.timeout,
298
+ metadata: @config.metadata,
299
+ retry_policy: @config.retry_policy
300
+
301
+ @agents_stub.call_rpc :get_agent, request, options: options do |response, operation|
302
+ yield response, operation if block_given?
303
+ return response
304
+ end
305
+ rescue ::GRPC::BadStatus => e
306
+ raise ::Google::Cloud::Error.from_error(e)
307
+ end
308
+
309
+ ##
310
+ # Creates an agent in the specified location.
311
+ #
312
+ # Note: You should always train flows prior to sending them queries. See the
313
+ # [training
314
+ # documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
315
+ #
316
+ # @overload create_agent(request, options = nil)
317
+ # Pass arguments to `create_agent` via a request object, either of type
318
+ # {::Google::Cloud::Dialogflow::CX::V3::CreateAgentRequest} or an equivalent Hash.
319
+ #
320
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::CreateAgentRequest, ::Hash]
321
+ # A request object representing the call parameters. Required. To specify no
322
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
323
+ # @param options [::Gapic::CallOptions, ::Hash]
324
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
325
+ #
326
+ # @overload create_agent(parent: nil, agent: nil)
327
+ # Pass arguments to `create_agent` via keyword arguments. Note that at
328
+ # least one keyword argument is required. To specify no parameters, or to keep all
329
+ # the default parameter values, pass an empty Hash as a request object (see above).
330
+ #
331
+ # @param parent [::String]
332
+ # Required. The location to create a agent for.
333
+ # Format: `projects/<Project ID>/locations/<Location ID>`.
334
+ # @param agent [::Google::Cloud::Dialogflow::CX::V3::Agent, ::Hash]
335
+ # Required. The agent to create.
336
+ #
337
+ # @yield [response, operation] Access the result along with the RPC operation
338
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::Agent]
339
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
340
+ #
341
+ # @return [::Google::Cloud::Dialogflow::CX::V3::Agent]
342
+ #
343
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
344
+ #
345
+ def create_agent request, options = nil
346
+ raise ::ArgumentError, "request must be provided" if request.nil?
347
+
348
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::CreateAgentRequest
349
+
350
+ # Converts hash and nil to an options object
351
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
352
+
353
+ # Customize the options with defaults
354
+ metadata = @config.rpcs.create_agent.metadata.to_h
355
+
356
+ # Set x-goog-api-client and x-goog-user-project headers
357
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
358
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
359
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
360
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
361
+
362
+ header_params = {
363
+ "parent" => request.parent
364
+ }
365
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
366
+ metadata[:"x-goog-request-params"] ||= request_params_header
367
+
368
+ options.apply_defaults timeout: @config.rpcs.create_agent.timeout,
369
+ metadata: metadata,
370
+ retry_policy: @config.rpcs.create_agent.retry_policy
371
+
372
+ options.apply_defaults timeout: @config.timeout,
373
+ metadata: @config.metadata,
374
+ retry_policy: @config.retry_policy
375
+
376
+ @agents_stub.call_rpc :create_agent, request, options: options do |response, operation|
377
+ yield response, operation if block_given?
378
+ return response
379
+ end
380
+ rescue ::GRPC::BadStatus => e
381
+ raise ::Google::Cloud::Error.from_error(e)
382
+ end
383
+
384
+ ##
385
+ # Updates the specified agent.
386
+ #
387
+ # Note: You should always train flows prior to sending them queries. See the
388
+ # [training
389
+ # documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
390
+ #
391
+ # @overload update_agent(request, options = nil)
392
+ # Pass arguments to `update_agent` via a request object, either of type
393
+ # {::Google::Cloud::Dialogflow::CX::V3::UpdateAgentRequest} or an equivalent Hash.
394
+ #
395
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::UpdateAgentRequest, ::Hash]
396
+ # A request object representing the call parameters. Required. To specify no
397
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
398
+ # @param options [::Gapic::CallOptions, ::Hash]
399
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
400
+ #
401
+ # @overload update_agent(agent: nil, update_mask: nil)
402
+ # Pass arguments to `update_agent` via keyword arguments. Note that at
403
+ # least one keyword argument is required. To specify no parameters, or to keep all
404
+ # the default parameter values, pass an empty Hash as a request object (see above).
405
+ #
406
+ # @param agent [::Google::Cloud::Dialogflow::CX::V3::Agent, ::Hash]
407
+ # Required. The agent to update.
408
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
409
+ # The mask to control which fields get updated. If the mask is not present,
410
+ # all fields will be updated.
411
+ #
412
+ # @yield [response, operation] Access the result along with the RPC operation
413
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::Agent]
414
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
415
+ #
416
+ # @return [::Google::Cloud::Dialogflow::CX::V3::Agent]
417
+ #
418
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
419
+ #
420
+ def update_agent request, options = nil
421
+ raise ::ArgumentError, "request must be provided" if request.nil?
422
+
423
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::UpdateAgentRequest
424
+
425
+ # Converts hash and nil to an options object
426
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
427
+
428
+ # Customize the options with defaults
429
+ metadata = @config.rpcs.update_agent.metadata.to_h
430
+
431
+ # Set x-goog-api-client and x-goog-user-project headers
432
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
433
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
434
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
435
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
436
+
437
+ header_params = {
438
+ "agent.name" => request.agent.name
439
+ }
440
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
441
+ metadata[:"x-goog-request-params"] ||= request_params_header
442
+
443
+ options.apply_defaults timeout: @config.rpcs.update_agent.timeout,
444
+ metadata: metadata,
445
+ retry_policy: @config.rpcs.update_agent.retry_policy
446
+
447
+ options.apply_defaults timeout: @config.timeout,
448
+ metadata: @config.metadata,
449
+ retry_policy: @config.retry_policy
450
+
451
+ @agents_stub.call_rpc :update_agent, request, options: options do |response, operation|
452
+ yield response, operation if block_given?
453
+ return response
454
+ end
455
+ rescue ::GRPC::BadStatus => e
456
+ raise ::Google::Cloud::Error.from_error(e)
457
+ end
458
+
459
+ ##
460
+ # Deletes the specified agent.
461
+ #
462
+ # @overload delete_agent(request, options = nil)
463
+ # Pass arguments to `delete_agent` via a request object, either of type
464
+ # {::Google::Cloud::Dialogflow::CX::V3::DeleteAgentRequest} or an equivalent Hash.
465
+ #
466
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::DeleteAgentRequest, ::Hash]
467
+ # A request object representing the call parameters. Required. To specify no
468
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
469
+ # @param options [::Gapic::CallOptions, ::Hash]
470
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
471
+ #
472
+ # @overload delete_agent(name: nil)
473
+ # Pass arguments to `delete_agent` via keyword arguments. Note that at
474
+ # least one keyword argument is required. To specify no parameters, or to keep all
475
+ # the default parameter values, pass an empty Hash as a request object (see above).
476
+ #
477
+ # @param name [::String]
478
+ # Required. The name of the agent to delete.
479
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
480
+ #
481
+ # @yield [response, operation] Access the result along with the RPC operation
482
+ # @yieldparam response [::Google::Protobuf::Empty]
483
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
484
+ #
485
+ # @return [::Google::Protobuf::Empty]
486
+ #
487
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
488
+ #
489
+ def delete_agent request, options = nil
490
+ raise ::ArgumentError, "request must be provided" if request.nil?
491
+
492
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::DeleteAgentRequest
493
+
494
+ # Converts hash and nil to an options object
495
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
496
+
497
+ # Customize the options with defaults
498
+ metadata = @config.rpcs.delete_agent.metadata.to_h
499
+
500
+ # Set x-goog-api-client and x-goog-user-project headers
501
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
502
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
503
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
504
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
505
+
506
+ header_params = {
507
+ "name" => request.name
508
+ }
509
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
510
+ metadata[:"x-goog-request-params"] ||= request_params_header
511
+
512
+ options.apply_defaults timeout: @config.rpcs.delete_agent.timeout,
513
+ metadata: metadata,
514
+ retry_policy: @config.rpcs.delete_agent.retry_policy
515
+
516
+ options.apply_defaults timeout: @config.timeout,
517
+ metadata: @config.metadata,
518
+ retry_policy: @config.retry_policy
519
+
520
+ @agents_stub.call_rpc :delete_agent, request, options: options do |response, operation|
521
+ yield response, operation if block_given?
522
+ return response
523
+ end
524
+ rescue ::GRPC::BadStatus => e
525
+ raise ::Google::Cloud::Error.from_error(e)
526
+ end
527
+
528
+ ##
529
+ # Exports the specified agent to a binary file.
530
+ #
531
+ # @overload export_agent(request, options = nil)
532
+ # Pass arguments to `export_agent` via a request object, either of type
533
+ # {::Google::Cloud::Dialogflow::CX::V3::ExportAgentRequest} or an equivalent Hash.
534
+ #
535
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::ExportAgentRequest, ::Hash]
536
+ # A request object representing the call parameters. Required. To specify no
537
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
538
+ # @param options [::Gapic::CallOptions, ::Hash]
539
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
540
+ #
541
+ # @overload export_agent(name: nil, agent_uri: nil, environment: nil)
542
+ # Pass arguments to `export_agent` via keyword arguments. Note that at
543
+ # least one keyword argument is required. To specify no parameters, or to keep all
544
+ # the default parameter values, pass an empty Hash as a request object (see above).
545
+ #
546
+ # @param name [::String]
547
+ # Required. The name of the agent to export.
548
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
549
+ # @param agent_uri [::String]
550
+ # Optional. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to
551
+ # export the agent to. The format of this URI must be
552
+ # `gs://<bucket-name>/<object-name>`.
553
+ # If left unspecified, the serialized agent is returned inline.
554
+ # @param environment [::String]
555
+ # Optional. Environment name. If not set, draft environment is assumed.
556
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
557
+ # ID>/environments/<Environment ID>`.
558
+ #
559
+ # @yield [response, operation] Access the result along with the RPC operation
560
+ # @yieldparam response [::Gapic::Operation]
561
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
562
+ #
563
+ # @return [::Gapic::Operation]
564
+ #
565
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
566
+ #
567
+ def export_agent request, options = nil
568
+ raise ::ArgumentError, "request must be provided" if request.nil?
569
+
570
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::ExportAgentRequest
571
+
572
+ # Converts hash and nil to an options object
573
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
574
+
575
+ # Customize the options with defaults
576
+ metadata = @config.rpcs.export_agent.metadata.to_h
577
+
578
+ # Set x-goog-api-client and x-goog-user-project headers
579
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
580
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
581
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
582
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
583
+
584
+ header_params = {
585
+ "name" => request.name
586
+ }
587
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
588
+ metadata[:"x-goog-request-params"] ||= request_params_header
589
+
590
+ options.apply_defaults timeout: @config.rpcs.export_agent.timeout,
591
+ metadata: metadata,
592
+ retry_policy: @config.rpcs.export_agent.retry_policy
593
+
594
+ options.apply_defaults timeout: @config.timeout,
595
+ metadata: @config.metadata,
596
+ retry_policy: @config.retry_policy
597
+
598
+ @agents_stub.call_rpc :export_agent, request, options: options do |response, operation|
599
+ response = ::Gapic::Operation.new response, @operations_client, options: options
600
+ yield response, operation if block_given?
601
+ return response
602
+ end
603
+ rescue ::GRPC::BadStatus => e
604
+ raise ::Google::Cloud::Error.from_error(e)
605
+ end
606
+
607
+ ##
608
+ # Restores the specified agent from a binary file.
609
+ #
610
+ # Replaces the current agent with a new one. Note that all existing resources
611
+ # in agent (e.g. intents, entity types, flows) will be removed.
612
+ #
613
+ #
614
+ # Note: You should always train flows prior to sending them queries. See the
615
+ # [training
616
+ # documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
617
+ #
618
+ # @overload restore_agent(request, options = nil)
619
+ # Pass arguments to `restore_agent` via a request object, either of type
620
+ # {::Google::Cloud::Dialogflow::CX::V3::RestoreAgentRequest} or an equivalent Hash.
621
+ #
622
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::RestoreAgentRequest, ::Hash]
623
+ # A request object representing the call parameters. Required. To specify no
624
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
625
+ # @param options [::Gapic::CallOptions, ::Hash]
626
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
627
+ #
628
+ # @overload restore_agent(name: nil, agent_uri: nil, agent_content: nil, restore_option: nil)
629
+ # Pass arguments to `restore_agent` via keyword arguments. Note that at
630
+ # least one keyword argument is required. To specify no parameters, or to keep all
631
+ # the default parameter values, pass an empty Hash as a request object (see above).
632
+ #
633
+ # @param name [::String]
634
+ # Required. The name of the agent to restore into.
635
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
636
+ # @param agent_uri [::String]
637
+ # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
638
+ # to restore agent from. The format of this URI must be
639
+ # `gs://<bucket-name>/<object-name>`.
640
+ # @param agent_content [::String]
641
+ # Uncompressed raw byte content for agent.
642
+ # @param restore_option [::Google::Cloud::Dialogflow::CX::V3::RestoreAgentRequest::RestoreOption]
643
+ # Agent restore mode. If not specified, `KEEP` is assumed.
644
+ #
645
+ # @yield [response, operation] Access the result along with the RPC operation
646
+ # @yieldparam response [::Gapic::Operation]
647
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
648
+ #
649
+ # @return [::Gapic::Operation]
650
+ #
651
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
652
+ #
653
+ def restore_agent request, options = nil
654
+ raise ::ArgumentError, "request must be provided" if request.nil?
655
+
656
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::RestoreAgentRequest
657
+
658
+ # Converts hash and nil to an options object
659
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
660
+
661
+ # Customize the options with defaults
662
+ metadata = @config.rpcs.restore_agent.metadata.to_h
663
+
664
+ # Set x-goog-api-client and x-goog-user-project headers
665
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
666
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
667
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
668
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
669
+
670
+ header_params = {
671
+ "name" => request.name
672
+ }
673
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
674
+ metadata[:"x-goog-request-params"] ||= request_params_header
675
+
676
+ options.apply_defaults timeout: @config.rpcs.restore_agent.timeout,
677
+ metadata: metadata,
678
+ retry_policy: @config.rpcs.restore_agent.retry_policy
679
+
680
+ options.apply_defaults timeout: @config.timeout,
681
+ metadata: @config.metadata,
682
+ retry_policy: @config.retry_policy
683
+
684
+ @agents_stub.call_rpc :restore_agent, request, options: options do |response, operation|
685
+ response = ::Gapic::Operation.new response, @operations_client, options: options
686
+ yield response, operation if block_given?
687
+ return response
688
+ end
689
+ rescue ::GRPC::BadStatus => e
690
+ raise ::Google::Cloud::Error.from_error(e)
691
+ end
692
+
693
+ ##
694
+ # Validates the specified agent and creates or updates validation results.
695
+ # The agent in draft version is validated. Please call this API after the
696
+ # training is completed to get the complete validation results.
697
+ #
698
+ # @overload validate_agent(request, options = nil)
699
+ # Pass arguments to `validate_agent` via a request object, either of type
700
+ # {::Google::Cloud::Dialogflow::CX::V3::ValidateAgentRequest} or an equivalent Hash.
701
+ #
702
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::ValidateAgentRequest, ::Hash]
703
+ # A request object representing the call parameters. Required. To specify no
704
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
705
+ # @param options [::Gapic::CallOptions, ::Hash]
706
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
707
+ #
708
+ # @overload validate_agent(name: nil, language_code: nil)
709
+ # Pass arguments to `validate_agent` via keyword arguments. Note that at
710
+ # least one keyword argument is required. To specify no parameters, or to keep all
711
+ # the default parameter values, pass an empty Hash as a request object (see above).
712
+ #
713
+ # @param name [::String]
714
+ # Required. The agent to validate.
715
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
716
+ # @param language_code [::String]
717
+ # If not specified, the agent's default language is used.
718
+ #
719
+ # @yield [response, operation] Access the result along with the RPC operation
720
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::AgentValidationResult]
721
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
722
+ #
723
+ # @return [::Google::Cloud::Dialogflow::CX::V3::AgentValidationResult]
724
+ #
725
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
726
+ #
727
+ def validate_agent request, options = nil
728
+ raise ::ArgumentError, "request must be provided" if request.nil?
729
+
730
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::ValidateAgentRequest
731
+
732
+ # Converts hash and nil to an options object
733
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
734
+
735
+ # Customize the options with defaults
736
+ metadata = @config.rpcs.validate_agent.metadata.to_h
737
+
738
+ # Set x-goog-api-client and x-goog-user-project headers
739
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
740
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
741
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
742
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
743
+
744
+ header_params = {
745
+ "name" => request.name
746
+ }
747
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
748
+ metadata[:"x-goog-request-params"] ||= request_params_header
749
+
750
+ options.apply_defaults timeout: @config.rpcs.validate_agent.timeout,
751
+ metadata: metadata,
752
+ retry_policy: @config.rpcs.validate_agent.retry_policy
753
+
754
+ options.apply_defaults timeout: @config.timeout,
755
+ metadata: @config.metadata,
756
+ retry_policy: @config.retry_policy
757
+
758
+ @agents_stub.call_rpc :validate_agent, request, options: options do |response, operation|
759
+ yield response, operation if block_given?
760
+ return response
761
+ end
762
+ rescue ::GRPC::BadStatus => e
763
+ raise ::Google::Cloud::Error.from_error(e)
764
+ end
765
+
766
+ ##
767
+ # Gets the latest agent validation result. Agent validation is performed
768
+ # when ValidateAgent is called.
769
+ #
770
+ # @overload get_agent_validation_result(request, options = nil)
771
+ # Pass arguments to `get_agent_validation_result` via a request object, either of type
772
+ # {::Google::Cloud::Dialogflow::CX::V3::GetAgentValidationResultRequest} or an equivalent Hash.
773
+ #
774
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::GetAgentValidationResultRequest, ::Hash]
775
+ # A request object representing the call parameters. Required. To specify no
776
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
777
+ # @param options [::Gapic::CallOptions, ::Hash]
778
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
779
+ #
780
+ # @overload get_agent_validation_result(name: nil, language_code: nil)
781
+ # Pass arguments to `get_agent_validation_result` via keyword arguments. Note that at
782
+ # least one keyword argument is required. To specify no parameters, or to keep all
783
+ # the default parameter values, pass an empty Hash as a request object (see above).
784
+ #
785
+ # @param name [::String]
786
+ # Required. The agent name.
787
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
788
+ # ID>/validationResult`.
789
+ # @param language_code [::String]
790
+ # If not specified, the agent's default language is used.
791
+ #
792
+ # @yield [response, operation] Access the result along with the RPC operation
793
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::AgentValidationResult]
794
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
795
+ #
796
+ # @return [::Google::Cloud::Dialogflow::CX::V3::AgentValidationResult]
797
+ #
798
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
799
+ #
800
+ def get_agent_validation_result request, options = nil
801
+ raise ::ArgumentError, "request must be provided" if request.nil?
802
+
803
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::GetAgentValidationResultRequest
804
+
805
+ # Converts hash and nil to an options object
806
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
807
+
808
+ # Customize the options with defaults
809
+ metadata = @config.rpcs.get_agent_validation_result.metadata.to_h
810
+
811
+ # Set x-goog-api-client and x-goog-user-project headers
812
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
813
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
814
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
815
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
816
+
817
+ header_params = {
818
+ "name" => request.name
819
+ }
820
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
821
+ metadata[:"x-goog-request-params"] ||= request_params_header
822
+
823
+ options.apply_defaults timeout: @config.rpcs.get_agent_validation_result.timeout,
824
+ metadata: metadata,
825
+ retry_policy: @config.rpcs.get_agent_validation_result.retry_policy
826
+
827
+ options.apply_defaults timeout: @config.timeout,
828
+ metadata: @config.metadata,
829
+ retry_policy: @config.retry_policy
830
+
831
+ @agents_stub.call_rpc :get_agent_validation_result, request, options: options do |response, operation|
832
+ yield response, operation if block_given?
833
+ return response
834
+ end
835
+ rescue ::GRPC::BadStatus => e
836
+ raise ::Google::Cloud::Error.from_error(e)
837
+ end
838
+
839
+ ##
840
+ # Configuration class for the Agents API.
841
+ #
842
+ # This class represents the configuration for Agents,
843
+ # providing control over timeouts, retry behavior, logging, transport
844
+ # parameters, and other low-level controls. Certain parameters can also be
845
+ # applied individually to specific RPCs. See
846
+ # {::Google::Cloud::Dialogflow::CX::V3::Agents::Client::Configuration::Rpcs}
847
+ # for a list of RPCs that can be configured independently.
848
+ #
849
+ # Configuration can be applied globally to all clients, or to a single client
850
+ # on construction.
851
+ #
852
+ # @example
853
+ #
854
+ # # Modify the global config, setting the timeout for
855
+ # # list_agents to 20 seconds,
856
+ # # and all remaining timeouts to 10 seconds.
857
+ # ::Google::Cloud::Dialogflow::CX::V3::Agents::Client.configure do |config|
858
+ # config.timeout = 10.0
859
+ # config.rpcs.list_agents.timeout = 20.0
860
+ # end
861
+ #
862
+ # # Apply the above configuration only to a new client.
863
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Agents::Client.new do |config|
864
+ # config.timeout = 10.0
865
+ # config.rpcs.list_agents.timeout = 20.0
866
+ # end
867
+ #
868
+ # @!attribute [rw] endpoint
869
+ # The hostname or hostname:port of the service endpoint.
870
+ # Defaults to `"dialogflow.googleapis.com"`.
871
+ # @return [::String]
872
+ # @!attribute [rw] credentials
873
+ # Credentials to send with calls. You may provide any of the following types:
874
+ # * (`String`) The path to a service account key file in JSON format
875
+ # * (`Hash`) A service account key as a Hash
876
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
877
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
878
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
879
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
880
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
881
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
882
+ # * (`nil`) indicating no credentials
883
+ # @return [::Object]
884
+ # @!attribute [rw] scope
885
+ # The OAuth scopes
886
+ # @return [::Array<::String>]
887
+ # @!attribute [rw] lib_name
888
+ # The library name as recorded in instrumentation and logging
889
+ # @return [::String]
890
+ # @!attribute [rw] lib_version
891
+ # The library version as recorded in instrumentation and logging
892
+ # @return [::String]
893
+ # @!attribute [rw] channel_args
894
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
895
+ # `GRPC::Core::Channel` object is provided as the credential.
896
+ # @return [::Hash]
897
+ # @!attribute [rw] interceptors
898
+ # An array of interceptors that are run before calls are executed.
899
+ # @return [::Array<::GRPC::ClientInterceptor>]
900
+ # @!attribute [rw] timeout
901
+ # The call timeout in seconds.
902
+ # @return [::Numeric]
903
+ # @!attribute [rw] metadata
904
+ # Additional gRPC headers to be sent with the call.
905
+ # @return [::Hash{::Symbol=>::String}]
906
+ # @!attribute [rw] retry_policy
907
+ # The retry policy. The value is a hash with the following keys:
908
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
909
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
910
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
911
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
912
+ # trigger a retry.
913
+ # @return [::Hash]
914
+ # @!attribute [rw] quota_project
915
+ # A separate project against which to charge quota.
916
+ # @return [::String]
917
+ #
918
+ class Configuration
919
+ extend ::Gapic::Config
920
+
921
+ config_attr :endpoint, "dialogflow.googleapis.com", ::String
922
+ config_attr :credentials, nil do |value|
923
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
924
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
925
+ allowed.any? { |klass| klass === value }
926
+ end
927
+ config_attr :scope, nil, ::String, ::Array, nil
928
+ config_attr :lib_name, nil, ::String, nil
929
+ config_attr :lib_version, nil, ::String, nil
930
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
931
+ config_attr :interceptors, nil, ::Array, nil
932
+ config_attr :timeout, nil, ::Numeric, nil
933
+ config_attr :metadata, nil, ::Hash, nil
934
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
935
+ config_attr :quota_project, nil, ::String, nil
936
+
937
+ # @private
938
+ def initialize parent_config = nil
939
+ @parent_config = parent_config unless parent_config.nil?
940
+
941
+ yield self if block_given?
942
+ end
943
+
944
+ ##
945
+ # Configurations for individual RPCs
946
+ # @return [Rpcs]
947
+ #
948
+ def rpcs
949
+ @rpcs ||= begin
950
+ parent_rpcs = nil
951
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
952
+ Rpcs.new parent_rpcs
953
+ end
954
+ end
955
+
956
+ ##
957
+ # Configuration RPC class for the Agents API.
958
+ #
959
+ # Includes fields providing the configuration for each RPC in this service.
960
+ # Each configuration object is of type `Gapic::Config::Method` and includes
961
+ # the following configuration fields:
962
+ #
963
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
964
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
965
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
966
+ # include the following keys:
967
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
968
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
969
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
970
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
971
+ # trigger a retry.
972
+ #
973
+ class Rpcs
974
+ ##
975
+ # RPC-specific configuration for `list_agents`
976
+ # @return [::Gapic::Config::Method]
977
+ #
978
+ attr_reader :list_agents
979
+ ##
980
+ # RPC-specific configuration for `get_agent`
981
+ # @return [::Gapic::Config::Method]
982
+ #
983
+ attr_reader :get_agent
984
+ ##
985
+ # RPC-specific configuration for `create_agent`
986
+ # @return [::Gapic::Config::Method]
987
+ #
988
+ attr_reader :create_agent
989
+ ##
990
+ # RPC-specific configuration for `update_agent`
991
+ # @return [::Gapic::Config::Method]
992
+ #
993
+ attr_reader :update_agent
994
+ ##
995
+ # RPC-specific configuration for `delete_agent`
996
+ # @return [::Gapic::Config::Method]
997
+ #
998
+ attr_reader :delete_agent
999
+ ##
1000
+ # RPC-specific configuration for `export_agent`
1001
+ # @return [::Gapic::Config::Method]
1002
+ #
1003
+ attr_reader :export_agent
1004
+ ##
1005
+ # RPC-specific configuration for `restore_agent`
1006
+ # @return [::Gapic::Config::Method]
1007
+ #
1008
+ attr_reader :restore_agent
1009
+ ##
1010
+ # RPC-specific configuration for `validate_agent`
1011
+ # @return [::Gapic::Config::Method]
1012
+ #
1013
+ attr_reader :validate_agent
1014
+ ##
1015
+ # RPC-specific configuration for `get_agent_validation_result`
1016
+ # @return [::Gapic::Config::Method]
1017
+ #
1018
+ attr_reader :get_agent_validation_result
1019
+
1020
+ # @private
1021
+ def initialize parent_rpcs = nil
1022
+ list_agents_config = parent_rpcs.list_agents if parent_rpcs.respond_to? :list_agents
1023
+ @list_agents = ::Gapic::Config::Method.new list_agents_config
1024
+ get_agent_config = parent_rpcs.get_agent if parent_rpcs.respond_to? :get_agent
1025
+ @get_agent = ::Gapic::Config::Method.new get_agent_config
1026
+ create_agent_config = parent_rpcs.create_agent if parent_rpcs.respond_to? :create_agent
1027
+ @create_agent = ::Gapic::Config::Method.new create_agent_config
1028
+ update_agent_config = parent_rpcs.update_agent if parent_rpcs.respond_to? :update_agent
1029
+ @update_agent = ::Gapic::Config::Method.new update_agent_config
1030
+ delete_agent_config = parent_rpcs.delete_agent if parent_rpcs.respond_to? :delete_agent
1031
+ @delete_agent = ::Gapic::Config::Method.new delete_agent_config
1032
+ export_agent_config = parent_rpcs.export_agent if parent_rpcs.respond_to? :export_agent
1033
+ @export_agent = ::Gapic::Config::Method.new export_agent_config
1034
+ restore_agent_config = parent_rpcs.restore_agent if parent_rpcs.respond_to? :restore_agent
1035
+ @restore_agent = ::Gapic::Config::Method.new restore_agent_config
1036
+ validate_agent_config = parent_rpcs.validate_agent if parent_rpcs.respond_to? :validate_agent
1037
+ @validate_agent = ::Gapic::Config::Method.new validate_agent_config
1038
+ get_agent_validation_result_config = parent_rpcs.get_agent_validation_result if parent_rpcs.respond_to? :get_agent_validation_result
1039
+ @get_agent_validation_result = ::Gapic::Config::Method.new get_agent_validation_result_config
1040
+
1041
+ yield self if block_given?
1042
+ end
1043
+ end
1044
+ end
1045
+ end
1046
+ end
1047
+ end
1048
+ end
1049
+ end
1050
+ end
1051
+ end