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,54 @@
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 "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Dialogflow
24
+ module CX
25
+ module V3
26
+ module EntityTypes
27
+ # Credentials for the EntityTypes API.
28
+ class Credentials < ::Google::Auth::Credentials
29
+ self.scope = [
30
+ "https://www.googleapis.com/auth/cloud-platform",
31
+ "https://www.googleapis.com/auth/dialogflow"
32
+ ]
33
+ self.env_vars = [
34
+ "DIALOGFLOW_CREDENTIALS",
35
+ "DIALOGFLOW_KEYFILE",
36
+ "GOOGLE_CLOUD_CREDENTIALS",
37
+ "GOOGLE_CLOUD_KEYFILE",
38
+ "GCLOUD_KEYFILE",
39
+ "DIALOGFLOW_CREDENTIALS_JSON",
40
+ "DIALOGFLOW_KEYFILE_JSON",
41
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
42
+ "GOOGLE_CLOUD_KEYFILE_JSON",
43
+ "GCLOUD_KEYFILE_JSON"
44
+ ]
45
+ self.paths = [
46
+ "~/.config/google_cloud/application_default_credentials.json"
47
+ ]
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,75 @@
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
+
20
+ module Google
21
+ module Cloud
22
+ module Dialogflow
23
+ module CX
24
+ module V3
25
+ module EntityTypes
26
+ # Path helper methods for the EntityTypes API.
27
+ module Paths
28
+ ##
29
+ # Create a fully-qualified Agent resource string.
30
+ #
31
+ # The resource will be in the following format:
32
+ #
33
+ # `projects/{project}/locations/{location}/agents/{agent}`
34
+ #
35
+ # @param project [String]
36
+ # @param location [String]
37
+ # @param agent [String]
38
+ #
39
+ # @return [::String]
40
+ def agent_path project:, location:, agent:
41
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
42
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
43
+
44
+ "projects/#{project}/locations/#{location}/agents/#{agent}"
45
+ end
46
+
47
+ ##
48
+ # Create a fully-qualified EntityType resource string.
49
+ #
50
+ # The resource will be in the following format:
51
+ #
52
+ # `projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}`
53
+ #
54
+ # @param project [String]
55
+ # @param location [String]
56
+ # @param agent [String]
57
+ # @param entity_type [String]
58
+ #
59
+ # @return [::String]
60
+ def entity_type_path project:, location:, agent:, entity_type:
61
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
62
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
63
+ raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/"
64
+
65
+ "projects/#{project}/locations/#{location}/agents/#{agent}/entityTypes/#{entity_type}"
66
+ end
67
+
68
+ extend self
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,51 @@
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 "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/dialogflow/cx/v3/version"
24
+
25
+ require "google/cloud/dialogflow/cx/v3/entity_types/credentials"
26
+ require "google/cloud/dialogflow/cx/v3/entity_types/paths"
27
+ require "google/cloud/dialogflow/cx/v3/entity_types/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Dialogflow
32
+ module CX
33
+ module V3
34
+ ##
35
+ # Service for managing {::Google::Cloud::Dialogflow::CX::V3::EntityType EntityTypes}.
36
+ #
37
+ # To load this service and instantiate a client:
38
+ #
39
+ # require "google/cloud/dialogflow/cx/v3/entity_types"
40
+ # client = ::Google::Cloud::Dialogflow::CX::V3::EntityTypes::Client.new
41
+ #
42
+ module EntityTypes
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ helper_path = ::File.join __dir__, "entity_types", "helpers.rb"
51
+ require "google/cloud/dialogflow/cx/v3/entity_types/helpers" if ::File.file? helper_path
@@ -0,0 +1,117 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/dialogflow/cx/v3/environment.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/test_case_pb'
11
+ require 'google/longrunning/operations_pb'
12
+ require 'google/protobuf/empty_pb'
13
+ require 'google/protobuf/field_mask_pb'
14
+ require 'google/protobuf/timestamp_pb'
15
+ Google::Protobuf::DescriptorPool.generated_pool.build do
16
+ add_file("google/cloud/dialogflow/cx/v3/environment.proto", :syntax => :proto3) do
17
+ add_message "google.cloud.dialogflow.cx.v3.Environment" do
18
+ optional :name, :string, 1
19
+ optional :display_name, :string, 2
20
+ optional :description, :string, 3
21
+ repeated :version_configs, :message, 6, "google.cloud.dialogflow.cx.v3.Environment.VersionConfig"
22
+ optional :update_time, :message, 5, "google.protobuf.Timestamp"
23
+ end
24
+ add_message "google.cloud.dialogflow.cx.v3.Environment.VersionConfig" do
25
+ optional :version, :string, 1
26
+ end
27
+ add_message "google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest" do
28
+ optional :parent, :string, 1
29
+ optional :page_size, :int32, 2
30
+ optional :page_token, :string, 3
31
+ end
32
+ add_message "google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse" do
33
+ repeated :environments, :message, 1, "google.cloud.dialogflow.cx.v3.Environment"
34
+ optional :next_page_token, :string, 2
35
+ end
36
+ add_message "google.cloud.dialogflow.cx.v3.GetEnvironmentRequest" do
37
+ optional :name, :string, 1
38
+ end
39
+ add_message "google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest" do
40
+ optional :parent, :string, 1
41
+ optional :environment, :message, 2, "google.cloud.dialogflow.cx.v3.Environment"
42
+ end
43
+ add_message "google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest" do
44
+ optional :environment, :message, 1, "google.cloud.dialogflow.cx.v3.Environment"
45
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
46
+ end
47
+ add_message "google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest" do
48
+ optional :name, :string, 1
49
+ end
50
+ add_message "google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest" do
51
+ optional :name, :string, 1
52
+ optional :page_size, :int32, 2
53
+ optional :page_token, :string, 3
54
+ end
55
+ add_message "google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse" do
56
+ repeated :environments, :message, 1, "google.cloud.dialogflow.cx.v3.Environment"
57
+ optional :next_page_token, :string, 2
58
+ end
59
+ add_message "google.cloud.dialogflow.cx.v3.ContinuousTestResult" do
60
+ optional :name, :string, 1
61
+ optional :result, :enum, 2, "google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult"
62
+ repeated :test_case_results, :string, 3
63
+ optional :run_time, :message, 4, "google.protobuf.Timestamp"
64
+ end
65
+ add_enum "google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult" do
66
+ value :AGGREGATED_TEST_RESULT_UNSPECIFIED, 0
67
+ value :PASSED, 1
68
+ value :FAILED, 2
69
+ end
70
+ add_message "google.cloud.dialogflow.cx.v3.RunContinuousTestRequest" do
71
+ optional :environment, :string, 1
72
+ end
73
+ add_message "google.cloud.dialogflow.cx.v3.RunContinuousTestResponse" do
74
+ optional :continuous_test_result, :message, 1, "google.cloud.dialogflow.cx.v3.ContinuousTestResult"
75
+ end
76
+ add_message "google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata" do
77
+ repeated :errors, :message, 1, "google.cloud.dialogflow.cx.v3.TestError"
78
+ end
79
+ add_message "google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest" do
80
+ optional :parent, :string, 1
81
+ optional :page_size, :int32, 2
82
+ optional :page_token, :string, 3
83
+ end
84
+ add_message "google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse" do
85
+ repeated :continuous_test_results, :message, 1, "google.cloud.dialogflow.cx.v3.ContinuousTestResult"
86
+ optional :next_page_token, :string, 2
87
+ end
88
+ end
89
+ end
90
+
91
+ module Google
92
+ module Cloud
93
+ module Dialogflow
94
+ module CX
95
+ module V3
96
+ Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Environment").msgclass
97
+ Environment::VersionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Environment.VersionConfig").msgclass
98
+ ListEnvironmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ListEnvironmentsRequest").msgclass
99
+ ListEnvironmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ListEnvironmentsResponse").msgclass
100
+ GetEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.GetEnvironmentRequest").msgclass
101
+ CreateEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.CreateEnvironmentRequest").msgclass
102
+ UpdateEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.UpdateEnvironmentRequest").msgclass
103
+ DeleteEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.DeleteEnvironmentRequest").msgclass
104
+ LookupEnvironmentHistoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryRequest").msgclass
105
+ LookupEnvironmentHistoryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.LookupEnvironmentHistoryResponse").msgclass
106
+ ContinuousTestResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ContinuousTestResult").msgclass
107
+ ContinuousTestResult::AggregatedTestResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ContinuousTestResult.AggregatedTestResult").enummodule
108
+ RunContinuousTestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.RunContinuousTestRequest").msgclass
109
+ RunContinuousTestResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.RunContinuousTestResponse").msgclass
110
+ RunContinuousTestMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata").msgclass
111
+ ListContinuousTestResultsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ListContinuousTestResultsRequest").msgclass
112
+ ListContinuousTestResultsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ListContinuousTestResultsResponse").msgclass
113
+ end
114
+ end
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,61 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/dialogflow/cx/v3/environment.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/environment_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module Dialogflow
25
+ module CX
26
+ module V3
27
+ module Environments
28
+ # Service for managing [Environments][google.cloud.dialogflow.cx.v3.Environment].
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.Environments'
36
+
37
+ # Returns the list of all environments in the specified [Agent][google.cloud.dialogflow.cx.v3.Agent].
38
+ rpc :ListEnvironments, ::Google::Cloud::Dialogflow::CX::V3::ListEnvironmentsRequest, ::Google::Cloud::Dialogflow::CX::V3::ListEnvironmentsResponse
39
+ # Retrieves the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
40
+ rpc :GetEnvironment, ::Google::Cloud::Dialogflow::CX::V3::GetEnvironmentRequest, ::Google::Cloud::Dialogflow::CX::V3::Environment
41
+ # Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3.Agent].
42
+ rpc :CreateEnvironment, ::Google::Cloud::Dialogflow::CX::V3::CreateEnvironmentRequest, ::Google::Longrunning::Operation
43
+ # Updates the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
44
+ rpc :UpdateEnvironment, ::Google::Cloud::Dialogflow::CX::V3::UpdateEnvironmentRequest, ::Google::Longrunning::Operation
45
+ # Deletes the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
46
+ rpc :DeleteEnvironment, ::Google::Cloud::Dialogflow::CX::V3::DeleteEnvironmentRequest, ::Google::Protobuf::Empty
47
+ # Looks up the history of the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
48
+ rpc :LookupEnvironmentHistory, ::Google::Cloud::Dialogflow::CX::V3::LookupEnvironmentHistoryRequest, ::Google::Cloud::Dialogflow::CX::V3::LookupEnvironmentHistoryResponse
49
+ # Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
50
+ rpc :RunContinuousTest, ::Google::Cloud::Dialogflow::CX::V3::RunContinuousTestRequest, ::Google::Longrunning::Operation
51
+ # Fetches a list of continuous test results for a given environment.
52
+ rpc :ListContinuousTestResults, ::Google::Cloud::Dialogflow::CX::V3::ListContinuousTestResultsRequest, ::Google::Cloud::Dialogflow::CX::V3::ListContinuousTestResultsResponse
53
+ end
54
+
55
+ Stub = Service.rpc_stub_class
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,950 @@
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/environment_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Dialogflow
25
+ module CX
26
+ module V3
27
+ module Environments
28
+ ##
29
+ # Client for the Environments service.
30
+ #
31
+ # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Environment Environments}.
32
+ #
33
+ class Client
34
+ include Paths
35
+
36
+ # @private
37
+ attr_reader :environments_stub
38
+
39
+ ##
40
+ # Configure the Environments Client class.
41
+ #
42
+ # See {::Google::Cloud::Dialogflow::CX::V3::Environments::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # @example
46
+ #
47
+ # # Modify the configuration for all Environments clients
48
+ # ::Google::Cloud::Dialogflow::CX::V3::Environments::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 Environments 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::Environments::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 Environments client object.
101
+ #
102
+ # @example
103
+ #
104
+ # # Create a client using the default configuration
105
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
106
+ #
107
+ # # Create a client using a custom configuration
108
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Environments::Client.new do |config|
109
+ # config.timeout = 10.0
110
+ # end
111
+ #
112
+ # @yield [config] Configure the Environments 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/environment_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
+ @environments_stub = ::Gapic::ServiceStub.new(
148
+ ::Google::Cloud::Dialogflow::CX::V3::Environments::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::Environments::Operations]
160
+ #
161
+ attr_reader :operations_client
162
+
163
+ # Service calls
164
+
165
+ ##
166
+ # Returns the list of all environments in the specified {::Google::Cloud::Dialogflow::CX::V3::Agent Agent}.
167
+ #
168
+ # @overload list_environments(request, options = nil)
169
+ # Pass arguments to `list_environments` via a request object, either of type
170
+ # {::Google::Cloud::Dialogflow::CX::V3::ListEnvironmentsRequest} or an equivalent Hash.
171
+ #
172
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::ListEnvironmentsRequest, ::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_environments(parent: nil, page_size: nil, page_token: nil)
179
+ # Pass arguments to `list_environments` 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 {::Google::Cloud::Dialogflow::CX::V3::Agent Agent} to list all environments for.
185
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
186
+ # @param page_size [::Integer]
187
+ # The maximum number of items to return in a single page. By default 20 and
188
+ # at most 100.
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::Environment>]
194
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
195
+ #
196
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Environment>]
197
+ #
198
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
199
+ #
200
+ def list_environments 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::ListEnvironmentsRequest
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_environments.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_environments.timeout,
224
+ metadata: metadata,
225
+ retry_policy: @config.rpcs.list_environments.retry_policy
226
+
227
+ options.apply_defaults timeout: @config.timeout,
228
+ metadata: @config.metadata,
229
+ retry_policy: @config.retry_policy
230
+
231
+ @environments_stub.call_rpc :list_environments, request, options: options do |response, operation|
232
+ response = ::Gapic::PagedEnumerable.new @environments_stub, :list_environments, 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 {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}.
242
+ #
243
+ # @overload get_environment(request, options = nil)
244
+ # Pass arguments to `get_environment` via a request object, either of type
245
+ # {::Google::Cloud::Dialogflow::CX::V3::GetEnvironmentRequest} or an equivalent Hash.
246
+ #
247
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::GetEnvironmentRequest, ::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_environment(name: nil)
254
+ # Pass arguments to `get_environment` 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 {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}.
260
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
261
+ # ID>/environments/<Environment ID>`.
262
+ #
263
+ # @yield [response, operation] Access the result along with the RPC operation
264
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::Environment]
265
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
266
+ #
267
+ # @return [::Google::Cloud::Dialogflow::CX::V3::Environment]
268
+ #
269
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
270
+ #
271
+ def get_environment request, options = nil
272
+ raise ::ArgumentError, "request must be provided" if request.nil?
273
+
274
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::GetEnvironmentRequest
275
+
276
+ # Converts hash and nil to an options object
277
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
278
+
279
+ # Customize the options with defaults
280
+ metadata = @config.rpcs.get_environment.metadata.to_h
281
+
282
+ # Set x-goog-api-client and x-goog-user-project headers
283
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
284
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
285
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
286
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
287
+
288
+ header_params = {
289
+ "name" => request.name
290
+ }
291
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
292
+ metadata[:"x-goog-request-params"] ||= request_params_header
293
+
294
+ options.apply_defaults timeout: @config.rpcs.get_environment.timeout,
295
+ metadata: metadata,
296
+ retry_policy: @config.rpcs.get_environment.retry_policy
297
+
298
+ options.apply_defaults timeout: @config.timeout,
299
+ metadata: @config.metadata,
300
+ retry_policy: @config.retry_policy
301
+
302
+ @environments_stub.call_rpc :get_environment, request, options: options do |response, operation|
303
+ yield response, operation if block_given?
304
+ return response
305
+ end
306
+ rescue ::GRPC::BadStatus => e
307
+ raise ::Google::Cloud::Error.from_error(e)
308
+ end
309
+
310
+ ##
311
+ # Creates an {::Google::Cloud::Dialogflow::CX::V3::Environment Environment} in the specified {::Google::Cloud::Dialogflow::CX::V3::Agent Agent}.
312
+ #
313
+ # @overload create_environment(request, options = nil)
314
+ # Pass arguments to `create_environment` via a request object, either of type
315
+ # {::Google::Cloud::Dialogflow::CX::V3::CreateEnvironmentRequest} or an equivalent Hash.
316
+ #
317
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::CreateEnvironmentRequest, ::Hash]
318
+ # A request object representing the call parameters. Required. To specify no
319
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
320
+ # @param options [::Gapic::CallOptions, ::Hash]
321
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
322
+ #
323
+ # @overload create_environment(parent: nil, environment: nil)
324
+ # Pass arguments to `create_environment` via keyword arguments. Note that at
325
+ # least one keyword argument is required. To specify no parameters, or to keep all
326
+ # the default parameter values, pass an empty Hash as a request object (see above).
327
+ #
328
+ # @param parent [::String]
329
+ # Required. The {::Google::Cloud::Dialogflow::CX::V3::Agent Agent} to create an {::Google::Cloud::Dialogflow::CX::V3::Environment Environment} for.
330
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
331
+ # @param environment [::Google::Cloud::Dialogflow::CX::V3::Environment, ::Hash]
332
+ # Required. The environment to create.
333
+ #
334
+ # @yield [response, operation] Access the result along with the RPC operation
335
+ # @yieldparam response [::Gapic::Operation]
336
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
337
+ #
338
+ # @return [::Gapic::Operation]
339
+ #
340
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
341
+ #
342
+ def create_environment request, options = nil
343
+ raise ::ArgumentError, "request must be provided" if request.nil?
344
+
345
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::CreateEnvironmentRequest
346
+
347
+ # Converts hash and nil to an options object
348
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
349
+
350
+ # Customize the options with defaults
351
+ metadata = @config.rpcs.create_environment.metadata.to_h
352
+
353
+ # Set x-goog-api-client and x-goog-user-project headers
354
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
355
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
356
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
357
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
358
+
359
+ header_params = {
360
+ "parent" => request.parent
361
+ }
362
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
363
+ metadata[:"x-goog-request-params"] ||= request_params_header
364
+
365
+ options.apply_defaults timeout: @config.rpcs.create_environment.timeout,
366
+ metadata: metadata,
367
+ retry_policy: @config.rpcs.create_environment.retry_policy
368
+
369
+ options.apply_defaults timeout: @config.timeout,
370
+ metadata: @config.metadata,
371
+ retry_policy: @config.retry_policy
372
+
373
+ @environments_stub.call_rpc :create_environment, request, options: options do |response, operation|
374
+ response = ::Gapic::Operation.new response, @operations_client, options: options
375
+ yield response, operation if block_given?
376
+ return response
377
+ end
378
+ rescue ::GRPC::BadStatus => e
379
+ raise ::Google::Cloud::Error.from_error(e)
380
+ end
381
+
382
+ ##
383
+ # Updates the specified {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}.
384
+ #
385
+ # @overload update_environment(request, options = nil)
386
+ # Pass arguments to `update_environment` via a request object, either of type
387
+ # {::Google::Cloud::Dialogflow::CX::V3::UpdateEnvironmentRequest} or an equivalent Hash.
388
+ #
389
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::UpdateEnvironmentRequest, ::Hash]
390
+ # A request object representing the call parameters. Required. To specify no
391
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
392
+ # @param options [::Gapic::CallOptions, ::Hash]
393
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
394
+ #
395
+ # @overload update_environment(environment: nil, update_mask: nil)
396
+ # Pass arguments to `update_environment` via keyword arguments. Note that at
397
+ # least one keyword argument is required. To specify no parameters, or to keep all
398
+ # the default parameter values, pass an empty Hash as a request object (see above).
399
+ #
400
+ # @param environment [::Google::Cloud::Dialogflow::CX::V3::Environment, ::Hash]
401
+ # Required. The environment to update.
402
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
403
+ # Required. The mask to control which fields get updated.
404
+ #
405
+ # @yield [response, operation] Access the result along with the RPC operation
406
+ # @yieldparam response [::Gapic::Operation]
407
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
408
+ #
409
+ # @return [::Gapic::Operation]
410
+ #
411
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
412
+ #
413
+ def update_environment request, options = nil
414
+ raise ::ArgumentError, "request must be provided" if request.nil?
415
+
416
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::UpdateEnvironmentRequest
417
+
418
+ # Converts hash and nil to an options object
419
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
420
+
421
+ # Customize the options with defaults
422
+ metadata = @config.rpcs.update_environment.metadata.to_h
423
+
424
+ # Set x-goog-api-client and x-goog-user-project headers
425
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
426
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
427
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
428
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
429
+
430
+ header_params = {
431
+ "environment.name" => request.environment.name
432
+ }
433
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
434
+ metadata[:"x-goog-request-params"] ||= request_params_header
435
+
436
+ options.apply_defaults timeout: @config.rpcs.update_environment.timeout,
437
+ metadata: metadata,
438
+ retry_policy: @config.rpcs.update_environment.retry_policy
439
+
440
+ options.apply_defaults timeout: @config.timeout,
441
+ metadata: @config.metadata,
442
+ retry_policy: @config.retry_policy
443
+
444
+ @environments_stub.call_rpc :update_environment, request, options: options do |response, operation|
445
+ response = ::Gapic::Operation.new response, @operations_client, options: options
446
+ yield response, operation if block_given?
447
+ return response
448
+ end
449
+ rescue ::GRPC::BadStatus => e
450
+ raise ::Google::Cloud::Error.from_error(e)
451
+ end
452
+
453
+ ##
454
+ # Deletes the specified {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}.
455
+ #
456
+ # @overload delete_environment(request, options = nil)
457
+ # Pass arguments to `delete_environment` via a request object, either of type
458
+ # {::Google::Cloud::Dialogflow::CX::V3::DeleteEnvironmentRequest} or an equivalent Hash.
459
+ #
460
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::DeleteEnvironmentRequest, ::Hash]
461
+ # A request object representing the call parameters. Required. To specify no
462
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
463
+ # @param options [::Gapic::CallOptions, ::Hash]
464
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
465
+ #
466
+ # @overload delete_environment(name: nil)
467
+ # Pass arguments to `delete_environment` via keyword arguments. Note that at
468
+ # least one keyword argument is required. To specify no parameters, or to keep all
469
+ # the default parameter values, pass an empty Hash as a request object (see above).
470
+ #
471
+ # @param name [::String]
472
+ # Required. The name of the {::Google::Cloud::Dialogflow::CX::V3::Environment Environment} to delete.
473
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
474
+ # ID>/environments/<Environment ID>`.
475
+ #
476
+ # @yield [response, operation] Access the result along with the RPC operation
477
+ # @yieldparam response [::Google::Protobuf::Empty]
478
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
479
+ #
480
+ # @return [::Google::Protobuf::Empty]
481
+ #
482
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
483
+ #
484
+ def delete_environment request, options = nil
485
+ raise ::ArgumentError, "request must be provided" if request.nil?
486
+
487
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::DeleteEnvironmentRequest
488
+
489
+ # Converts hash and nil to an options object
490
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
491
+
492
+ # Customize the options with defaults
493
+ metadata = @config.rpcs.delete_environment.metadata.to_h
494
+
495
+ # Set x-goog-api-client and x-goog-user-project headers
496
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
497
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
498
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
499
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
500
+
501
+ header_params = {
502
+ "name" => request.name
503
+ }
504
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
505
+ metadata[:"x-goog-request-params"] ||= request_params_header
506
+
507
+ options.apply_defaults timeout: @config.rpcs.delete_environment.timeout,
508
+ metadata: metadata,
509
+ retry_policy: @config.rpcs.delete_environment.retry_policy
510
+
511
+ options.apply_defaults timeout: @config.timeout,
512
+ metadata: @config.metadata,
513
+ retry_policy: @config.retry_policy
514
+
515
+ @environments_stub.call_rpc :delete_environment, request, options: options do |response, operation|
516
+ yield response, operation if block_given?
517
+ return response
518
+ end
519
+ rescue ::GRPC::BadStatus => e
520
+ raise ::Google::Cloud::Error.from_error(e)
521
+ end
522
+
523
+ ##
524
+ # Looks up the history of the specified {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}.
525
+ #
526
+ # @overload lookup_environment_history(request, options = nil)
527
+ # Pass arguments to `lookup_environment_history` via a request object, either of type
528
+ # {::Google::Cloud::Dialogflow::CX::V3::LookupEnvironmentHistoryRequest} or an equivalent Hash.
529
+ #
530
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::LookupEnvironmentHistoryRequest, ::Hash]
531
+ # A request object representing the call parameters. Required. To specify no
532
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
533
+ # @param options [::Gapic::CallOptions, ::Hash]
534
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
535
+ #
536
+ # @overload lookup_environment_history(name: nil, page_size: nil, page_token: nil)
537
+ # Pass arguments to `lookup_environment_history` via keyword arguments. Note that at
538
+ # least one keyword argument is required. To specify no parameters, or to keep all
539
+ # the default parameter values, pass an empty Hash as a request object (see above).
540
+ #
541
+ # @param name [::String]
542
+ # Required. Resource name of the environment to look up the history for.
543
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
544
+ # ID>/environments/<Environment ID>`.
545
+ # @param page_size [::Integer]
546
+ # The maximum number of items to return in a single page. By default 100 and
547
+ # at most 1000.
548
+ # @param page_token [::String]
549
+ # The next_page_token value returned from a previous list request.
550
+ #
551
+ # @yield [response, operation] Access the result along with the RPC operation
552
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Environment>]
553
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
554
+ #
555
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Environment>]
556
+ #
557
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
558
+ #
559
+ def lookup_environment_history request, options = nil
560
+ raise ::ArgumentError, "request must be provided" if request.nil?
561
+
562
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::LookupEnvironmentHistoryRequest
563
+
564
+ # Converts hash and nil to an options object
565
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
566
+
567
+ # Customize the options with defaults
568
+ metadata = @config.rpcs.lookup_environment_history.metadata.to_h
569
+
570
+ # Set x-goog-api-client and x-goog-user-project headers
571
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
572
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
573
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
574
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
575
+
576
+ header_params = {
577
+ "name" => request.name
578
+ }
579
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
580
+ metadata[:"x-goog-request-params"] ||= request_params_header
581
+
582
+ options.apply_defaults timeout: @config.rpcs.lookup_environment_history.timeout,
583
+ metadata: metadata,
584
+ retry_policy: @config.rpcs.lookup_environment_history.retry_policy
585
+
586
+ options.apply_defaults timeout: @config.timeout,
587
+ metadata: @config.metadata,
588
+ retry_policy: @config.retry_policy
589
+
590
+ @environments_stub.call_rpc :lookup_environment_history, request, options: options do |response, operation|
591
+ response = ::Gapic::PagedEnumerable.new @environments_stub, :lookup_environment_history, request, response, operation, options
592
+ yield response, operation if block_given?
593
+ return response
594
+ end
595
+ rescue ::GRPC::BadStatus => e
596
+ raise ::Google::Cloud::Error.from_error(e)
597
+ end
598
+
599
+ ##
600
+ # Kicks off a continuous test under the specified {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}.
601
+ #
602
+ # @overload run_continuous_test(request, options = nil)
603
+ # Pass arguments to `run_continuous_test` via a request object, either of type
604
+ # {::Google::Cloud::Dialogflow::CX::V3::RunContinuousTestRequest} or an equivalent Hash.
605
+ #
606
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::RunContinuousTestRequest, ::Hash]
607
+ # A request object representing the call parameters. Required. To specify no
608
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
609
+ # @param options [::Gapic::CallOptions, ::Hash]
610
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
611
+ #
612
+ # @overload run_continuous_test(environment: nil)
613
+ # Pass arguments to `run_continuous_test` via keyword arguments. Note that at
614
+ # least one keyword argument is required. To specify no parameters, or to keep all
615
+ # the default parameter values, pass an empty Hash as a request object (see above).
616
+ #
617
+ # @param environment [::String]
618
+ # Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
619
+ # ID>/environments/<Environment ID>`.
620
+ #
621
+ # @yield [response, operation] Access the result along with the RPC operation
622
+ # @yieldparam response [::Gapic::Operation]
623
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
624
+ #
625
+ # @return [::Gapic::Operation]
626
+ #
627
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
628
+ #
629
+ def run_continuous_test request, options = nil
630
+ raise ::ArgumentError, "request must be provided" if request.nil?
631
+
632
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::RunContinuousTestRequest
633
+
634
+ # Converts hash and nil to an options object
635
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
636
+
637
+ # Customize the options with defaults
638
+ metadata = @config.rpcs.run_continuous_test.metadata.to_h
639
+
640
+ # Set x-goog-api-client and x-goog-user-project headers
641
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
642
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
643
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
644
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
645
+
646
+ header_params = {
647
+ "environment" => request.environment
648
+ }
649
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
650
+ metadata[:"x-goog-request-params"] ||= request_params_header
651
+
652
+ options.apply_defaults timeout: @config.rpcs.run_continuous_test.timeout,
653
+ metadata: metadata,
654
+ retry_policy: @config.rpcs.run_continuous_test.retry_policy
655
+
656
+ options.apply_defaults timeout: @config.timeout,
657
+ metadata: @config.metadata,
658
+ retry_policy: @config.retry_policy
659
+
660
+ @environments_stub.call_rpc :run_continuous_test, request, options: options do |response, operation|
661
+ response = ::Gapic::Operation.new response, @operations_client, options: options
662
+ yield response, operation if block_given?
663
+ return response
664
+ end
665
+ rescue ::GRPC::BadStatus => e
666
+ raise ::Google::Cloud::Error.from_error(e)
667
+ end
668
+
669
+ ##
670
+ # Fetches a list of continuous test results for a given environment.
671
+ #
672
+ # @overload list_continuous_test_results(request, options = nil)
673
+ # Pass arguments to `list_continuous_test_results` via a request object, either of type
674
+ # {::Google::Cloud::Dialogflow::CX::V3::ListContinuousTestResultsRequest} or an equivalent Hash.
675
+ #
676
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::ListContinuousTestResultsRequest, ::Hash]
677
+ # A request object representing the call parameters. Required. To specify no
678
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
679
+ # @param options [::Gapic::CallOptions, ::Hash]
680
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
681
+ #
682
+ # @overload list_continuous_test_results(parent: nil, page_size: nil, page_token: nil)
683
+ # Pass arguments to `list_continuous_test_results` via keyword arguments. Note that at
684
+ # least one keyword argument is required. To specify no parameters, or to keep all
685
+ # the default parameter values, pass an empty Hash as a request object (see above).
686
+ #
687
+ # @param parent [::String]
688
+ # Required. The environment to list results for.
689
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
690
+ # environments/<Environment ID>`.
691
+ # @param page_size [::Integer]
692
+ # The maximum number of items to return in a single page. By default 100 and
693
+ # at most 1000.
694
+ # @param page_token [::String]
695
+ # The next_page_token value returned from a previous list request.
696
+ #
697
+ # @yield [response, operation] Access the result along with the RPC operation
698
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::ContinuousTestResult>]
699
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
700
+ #
701
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::ContinuousTestResult>]
702
+ #
703
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
704
+ #
705
+ def list_continuous_test_results request, options = nil
706
+ raise ::ArgumentError, "request must be provided" if request.nil?
707
+
708
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::ListContinuousTestResultsRequest
709
+
710
+ # Converts hash and nil to an options object
711
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
712
+
713
+ # Customize the options with defaults
714
+ metadata = @config.rpcs.list_continuous_test_results.metadata.to_h
715
+
716
+ # Set x-goog-api-client and x-goog-user-project headers
717
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
718
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
719
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
720
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
721
+
722
+ header_params = {
723
+ "parent" => request.parent
724
+ }
725
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
726
+ metadata[:"x-goog-request-params"] ||= request_params_header
727
+
728
+ options.apply_defaults timeout: @config.rpcs.list_continuous_test_results.timeout,
729
+ metadata: metadata,
730
+ retry_policy: @config.rpcs.list_continuous_test_results.retry_policy
731
+
732
+ options.apply_defaults timeout: @config.timeout,
733
+ metadata: @config.metadata,
734
+ retry_policy: @config.retry_policy
735
+
736
+ @environments_stub.call_rpc :list_continuous_test_results, request, options: options do |response, operation|
737
+ response = ::Gapic::PagedEnumerable.new @environments_stub, :list_continuous_test_results, request, response, operation, options
738
+ yield response, operation if block_given?
739
+ return response
740
+ end
741
+ rescue ::GRPC::BadStatus => e
742
+ raise ::Google::Cloud::Error.from_error(e)
743
+ end
744
+
745
+ ##
746
+ # Configuration class for the Environments API.
747
+ #
748
+ # This class represents the configuration for Environments,
749
+ # providing control over timeouts, retry behavior, logging, transport
750
+ # parameters, and other low-level controls. Certain parameters can also be
751
+ # applied individually to specific RPCs. See
752
+ # {::Google::Cloud::Dialogflow::CX::V3::Environments::Client::Configuration::Rpcs}
753
+ # for a list of RPCs that can be configured independently.
754
+ #
755
+ # Configuration can be applied globally to all clients, or to a single client
756
+ # on construction.
757
+ #
758
+ # @example
759
+ #
760
+ # # Modify the global config, setting the timeout for
761
+ # # list_environments to 20 seconds,
762
+ # # and all remaining timeouts to 10 seconds.
763
+ # ::Google::Cloud::Dialogflow::CX::V3::Environments::Client.configure do |config|
764
+ # config.timeout = 10.0
765
+ # config.rpcs.list_environments.timeout = 20.0
766
+ # end
767
+ #
768
+ # # Apply the above configuration only to a new client.
769
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Environments::Client.new do |config|
770
+ # config.timeout = 10.0
771
+ # config.rpcs.list_environments.timeout = 20.0
772
+ # end
773
+ #
774
+ # @!attribute [rw] endpoint
775
+ # The hostname or hostname:port of the service endpoint.
776
+ # Defaults to `"dialogflow.googleapis.com"`.
777
+ # @return [::String]
778
+ # @!attribute [rw] credentials
779
+ # Credentials to send with calls. You may provide any of the following types:
780
+ # * (`String`) The path to a service account key file in JSON format
781
+ # * (`Hash`) A service account key as a Hash
782
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
783
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
784
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
785
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
786
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
787
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
788
+ # * (`nil`) indicating no credentials
789
+ # @return [::Object]
790
+ # @!attribute [rw] scope
791
+ # The OAuth scopes
792
+ # @return [::Array<::String>]
793
+ # @!attribute [rw] lib_name
794
+ # The library name as recorded in instrumentation and logging
795
+ # @return [::String]
796
+ # @!attribute [rw] lib_version
797
+ # The library version as recorded in instrumentation and logging
798
+ # @return [::String]
799
+ # @!attribute [rw] channel_args
800
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
801
+ # `GRPC::Core::Channel` object is provided as the credential.
802
+ # @return [::Hash]
803
+ # @!attribute [rw] interceptors
804
+ # An array of interceptors that are run before calls are executed.
805
+ # @return [::Array<::GRPC::ClientInterceptor>]
806
+ # @!attribute [rw] timeout
807
+ # The call timeout in seconds.
808
+ # @return [::Numeric]
809
+ # @!attribute [rw] metadata
810
+ # Additional gRPC headers to be sent with the call.
811
+ # @return [::Hash{::Symbol=>::String}]
812
+ # @!attribute [rw] retry_policy
813
+ # The retry policy. The value is a hash with the following keys:
814
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
815
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
816
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
817
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
818
+ # trigger a retry.
819
+ # @return [::Hash]
820
+ # @!attribute [rw] quota_project
821
+ # A separate project against which to charge quota.
822
+ # @return [::String]
823
+ #
824
+ class Configuration
825
+ extend ::Gapic::Config
826
+
827
+ config_attr :endpoint, "dialogflow.googleapis.com", ::String
828
+ config_attr :credentials, nil do |value|
829
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
830
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
831
+ allowed.any? { |klass| klass === value }
832
+ end
833
+ config_attr :scope, nil, ::String, ::Array, nil
834
+ config_attr :lib_name, nil, ::String, nil
835
+ config_attr :lib_version, nil, ::String, nil
836
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
837
+ config_attr :interceptors, nil, ::Array, nil
838
+ config_attr :timeout, nil, ::Numeric, nil
839
+ config_attr :metadata, nil, ::Hash, nil
840
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
841
+ config_attr :quota_project, nil, ::String, nil
842
+
843
+ # @private
844
+ def initialize parent_config = nil
845
+ @parent_config = parent_config unless parent_config.nil?
846
+
847
+ yield self if block_given?
848
+ end
849
+
850
+ ##
851
+ # Configurations for individual RPCs
852
+ # @return [Rpcs]
853
+ #
854
+ def rpcs
855
+ @rpcs ||= begin
856
+ parent_rpcs = nil
857
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
858
+ Rpcs.new parent_rpcs
859
+ end
860
+ end
861
+
862
+ ##
863
+ # Configuration RPC class for the Environments API.
864
+ #
865
+ # Includes fields providing the configuration for each RPC in this service.
866
+ # Each configuration object is of type `Gapic::Config::Method` and includes
867
+ # the following configuration fields:
868
+ #
869
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
870
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
871
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
872
+ # include the following keys:
873
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
874
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
875
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
876
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
877
+ # trigger a retry.
878
+ #
879
+ class Rpcs
880
+ ##
881
+ # RPC-specific configuration for `list_environments`
882
+ # @return [::Gapic::Config::Method]
883
+ #
884
+ attr_reader :list_environments
885
+ ##
886
+ # RPC-specific configuration for `get_environment`
887
+ # @return [::Gapic::Config::Method]
888
+ #
889
+ attr_reader :get_environment
890
+ ##
891
+ # RPC-specific configuration for `create_environment`
892
+ # @return [::Gapic::Config::Method]
893
+ #
894
+ attr_reader :create_environment
895
+ ##
896
+ # RPC-specific configuration for `update_environment`
897
+ # @return [::Gapic::Config::Method]
898
+ #
899
+ attr_reader :update_environment
900
+ ##
901
+ # RPC-specific configuration for `delete_environment`
902
+ # @return [::Gapic::Config::Method]
903
+ #
904
+ attr_reader :delete_environment
905
+ ##
906
+ # RPC-specific configuration for `lookup_environment_history`
907
+ # @return [::Gapic::Config::Method]
908
+ #
909
+ attr_reader :lookup_environment_history
910
+ ##
911
+ # RPC-specific configuration for `run_continuous_test`
912
+ # @return [::Gapic::Config::Method]
913
+ #
914
+ attr_reader :run_continuous_test
915
+ ##
916
+ # RPC-specific configuration for `list_continuous_test_results`
917
+ # @return [::Gapic::Config::Method]
918
+ #
919
+ attr_reader :list_continuous_test_results
920
+
921
+ # @private
922
+ def initialize parent_rpcs = nil
923
+ list_environments_config = parent_rpcs.list_environments if parent_rpcs.respond_to? :list_environments
924
+ @list_environments = ::Gapic::Config::Method.new list_environments_config
925
+ get_environment_config = parent_rpcs.get_environment if parent_rpcs.respond_to? :get_environment
926
+ @get_environment = ::Gapic::Config::Method.new get_environment_config
927
+ create_environment_config = parent_rpcs.create_environment if parent_rpcs.respond_to? :create_environment
928
+ @create_environment = ::Gapic::Config::Method.new create_environment_config
929
+ update_environment_config = parent_rpcs.update_environment if parent_rpcs.respond_to? :update_environment
930
+ @update_environment = ::Gapic::Config::Method.new update_environment_config
931
+ delete_environment_config = parent_rpcs.delete_environment if parent_rpcs.respond_to? :delete_environment
932
+ @delete_environment = ::Gapic::Config::Method.new delete_environment_config
933
+ lookup_environment_history_config = parent_rpcs.lookup_environment_history if parent_rpcs.respond_to? :lookup_environment_history
934
+ @lookup_environment_history = ::Gapic::Config::Method.new lookup_environment_history_config
935
+ run_continuous_test_config = parent_rpcs.run_continuous_test if parent_rpcs.respond_to? :run_continuous_test
936
+ @run_continuous_test = ::Gapic::Config::Method.new run_continuous_test_config
937
+ list_continuous_test_results_config = parent_rpcs.list_continuous_test_results if parent_rpcs.respond_to? :list_continuous_test_results
938
+ @list_continuous_test_results = ::Gapic::Config::Method.new list_continuous_test_results_config
939
+
940
+ yield self if block_given?
941
+ end
942
+ end
943
+ end
944
+ end
945
+ end
946
+ end
947
+ end
948
+ end
949
+ end
950
+ end