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,98 @@
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 Environments
26
+ # Path helper methods for the Environments 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 Environment resource string.
49
+ #
50
+ # The resource will be in the following format:
51
+ #
52
+ # `projects/{project}/locations/{location}/agents/{agent}/environments/{environment}`
53
+ #
54
+ # @param project [String]
55
+ # @param location [String]
56
+ # @param agent [String]
57
+ # @param environment [String]
58
+ #
59
+ # @return [::String]
60
+ def environment_path project:, location:, agent:, environment:
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}/environments/#{environment}"
66
+ end
67
+
68
+ ##
69
+ # Create a fully-qualified Version resource string.
70
+ #
71
+ # The resource will be in the following format:
72
+ #
73
+ # `projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}`
74
+ #
75
+ # @param project [String]
76
+ # @param location [String]
77
+ # @param agent [String]
78
+ # @param flow [String]
79
+ # @param version [String]
80
+ #
81
+ # @return [::String]
82
+ def version_path project:, location:, agent:, flow:, version:
83
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
84
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
85
+ raise ::ArgumentError, "agent cannot contain /" if agent.to_s.include? "/"
86
+ raise ::ArgumentError, "flow cannot contain /" if flow.to_s.include? "/"
87
+
88
+ "projects/#{project}/locations/#{location}/agents/#{agent}/flows/#{flow}/versions/#{version}"
89
+ end
90
+
91
+ extend self
92
+ end
93
+ end
94
+ end
95
+ end
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,52 @@
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/environments/credentials"
26
+ require "google/cloud/dialogflow/cx/v3/environments/paths"
27
+ require "google/cloud/dialogflow/cx/v3/environments/operations"
28
+ require "google/cloud/dialogflow/cx/v3/environments/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module Dialogflow
33
+ module CX
34
+ module V3
35
+ ##
36
+ # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Environment Environments}.
37
+ #
38
+ # To load this service and instantiate a client:
39
+ #
40
+ # require "google/cloud/dialogflow/cx/v3/environments"
41
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
42
+ #
43
+ module Environments
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+
51
+ helper_path = ::File.join __dir__, "environments", "helpers.rb"
52
+ require "google/cloud/dialogflow/cx/v3/environments/helpers" if ::File.file? helper_path
@@ -0,0 +1,177 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/dialogflow/cx/v3/experiment.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/protobuf/duration_pb'
11
+ require 'google/protobuf/empty_pb'
12
+ require 'google/protobuf/field_mask_pb'
13
+ require 'google/protobuf/timestamp_pb'
14
+ Google::Protobuf::DescriptorPool.generated_pool.build do
15
+ add_file("google/cloud/dialogflow/cx/v3/experiment.proto", :syntax => :proto3) do
16
+ add_message "google.cloud.dialogflow.cx.v3.Experiment" do
17
+ optional :name, :string, 1
18
+ optional :display_name, :string, 2
19
+ optional :description, :string, 3
20
+ optional :state, :enum, 4, "google.cloud.dialogflow.cx.v3.Experiment.State"
21
+ optional :definition, :message, 5, "google.cloud.dialogflow.cx.v3.Experiment.Definition"
22
+ optional :rollout_config, :message, 14, "google.cloud.dialogflow.cx.v3.RolloutConfig"
23
+ optional :rollout_state, :message, 15, "google.cloud.dialogflow.cx.v3.RolloutState"
24
+ optional :rollout_failure_reason, :string, 16
25
+ optional :result, :message, 6, "google.cloud.dialogflow.cx.v3.Experiment.Result"
26
+ optional :create_time, :message, 7, "google.protobuf.Timestamp"
27
+ optional :start_time, :message, 8, "google.protobuf.Timestamp"
28
+ optional :end_time, :message, 9, "google.protobuf.Timestamp"
29
+ optional :last_update_time, :message, 10, "google.protobuf.Timestamp"
30
+ optional :experiment_length, :message, 11, "google.protobuf.Duration"
31
+ repeated :variants_history, :message, 12, "google.cloud.dialogflow.cx.v3.VariantsHistory"
32
+ end
33
+ add_message "google.cloud.dialogflow.cx.v3.Experiment.Definition" do
34
+ optional :condition, :string, 1
35
+ oneof :variants do
36
+ optional :version_variants, :message, 2, "google.cloud.dialogflow.cx.v3.VersionVariants"
37
+ end
38
+ end
39
+ add_message "google.cloud.dialogflow.cx.v3.Experiment.Result" do
40
+ repeated :version_metrics, :message, 1, "google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics"
41
+ optional :last_update_time, :message, 2, "google.protobuf.Timestamp"
42
+ end
43
+ add_message "google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval" do
44
+ optional :confidence_level, :double, 1
45
+ optional :ratio, :double, 2
46
+ optional :lower_bound, :double, 3
47
+ optional :upper_bound, :double, 4
48
+ end
49
+ add_message "google.cloud.dialogflow.cx.v3.Experiment.Result.Metric" do
50
+ optional :type, :enum, 1, "google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType"
51
+ optional :count_type, :enum, 5, "google.cloud.dialogflow.cx.v3.Experiment.Result.CountType"
52
+ optional :confidence_interval, :message, 3, "google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval"
53
+ oneof :value do
54
+ optional :ratio, :double, 2
55
+ optional :count, :double, 4
56
+ end
57
+ end
58
+ add_message "google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics" do
59
+ optional :version, :string, 1
60
+ repeated :metrics, :message, 2, "google.cloud.dialogflow.cx.v3.Experiment.Result.Metric"
61
+ optional :session_count, :int32, 3
62
+ end
63
+ add_enum "google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType" do
64
+ value :METRIC_UNSPECIFIED, 0
65
+ value :CONTAINED_SESSION_NO_CALLBACK_RATE, 1
66
+ value :LIVE_AGENT_HANDOFF_RATE, 2
67
+ value :CALLBACK_SESSION_RATE, 3
68
+ value :ABANDONED_SESSION_RATE, 4
69
+ value :SESSION_END_RATE, 5
70
+ end
71
+ add_enum "google.cloud.dialogflow.cx.v3.Experiment.Result.CountType" do
72
+ value :COUNT_TYPE_UNSPECIFIED, 0
73
+ value :TOTAL_NO_MATCH_COUNT, 1
74
+ value :TOTAL_TURN_COUNT, 2
75
+ value :AVERAGE_TURN_COUNT, 3
76
+ end
77
+ add_enum "google.cloud.dialogflow.cx.v3.Experiment.State" do
78
+ value :STATE_UNSPECIFIED, 0
79
+ value :DRAFT, 1
80
+ value :RUNNING, 2
81
+ value :DONE, 3
82
+ value :ROLLOUT_FAILED, 4
83
+ end
84
+ add_message "google.cloud.dialogflow.cx.v3.VersionVariants" do
85
+ repeated :variants, :message, 1, "google.cloud.dialogflow.cx.v3.VersionVariants.Variant"
86
+ end
87
+ add_message "google.cloud.dialogflow.cx.v3.VersionVariants.Variant" do
88
+ optional :version, :string, 1
89
+ optional :traffic_allocation, :float, 2
90
+ optional :is_control_group, :bool, 3
91
+ end
92
+ add_message "google.cloud.dialogflow.cx.v3.VariantsHistory" do
93
+ optional :update_time, :message, 2, "google.protobuf.Timestamp"
94
+ oneof :variants do
95
+ optional :version_variants, :message, 1, "google.cloud.dialogflow.cx.v3.VersionVariants"
96
+ end
97
+ end
98
+ add_message "google.cloud.dialogflow.cx.v3.RolloutConfig" do
99
+ repeated :rollout_steps, :message, 1, "google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep"
100
+ optional :rollout_condition, :string, 2
101
+ optional :failure_condition, :string, 3
102
+ end
103
+ add_message "google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep" do
104
+ optional :display_name, :string, 1
105
+ optional :traffic_percent, :int32, 2
106
+ optional :min_duration, :message, 3, "google.protobuf.Duration"
107
+ end
108
+ add_message "google.cloud.dialogflow.cx.v3.RolloutState" do
109
+ optional :step, :string, 1
110
+ optional :step_index, :int32, 3
111
+ optional :start_time, :message, 2, "google.protobuf.Timestamp"
112
+ end
113
+ add_message "google.cloud.dialogflow.cx.v3.ListExperimentsRequest" do
114
+ optional :parent, :string, 1
115
+ optional :page_size, :int32, 2
116
+ optional :page_token, :string, 3
117
+ end
118
+ add_message "google.cloud.dialogflow.cx.v3.ListExperimentsResponse" do
119
+ repeated :experiments, :message, 1, "google.cloud.dialogflow.cx.v3.Experiment"
120
+ optional :next_page_token, :string, 2
121
+ end
122
+ add_message "google.cloud.dialogflow.cx.v3.GetExperimentRequest" do
123
+ optional :name, :string, 1
124
+ end
125
+ add_message "google.cloud.dialogflow.cx.v3.CreateExperimentRequest" do
126
+ optional :parent, :string, 1
127
+ optional :experiment, :message, 2, "google.cloud.dialogflow.cx.v3.Experiment"
128
+ end
129
+ add_message "google.cloud.dialogflow.cx.v3.UpdateExperimentRequest" do
130
+ optional :experiment, :message, 1, "google.cloud.dialogflow.cx.v3.Experiment"
131
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
132
+ end
133
+ add_message "google.cloud.dialogflow.cx.v3.DeleteExperimentRequest" do
134
+ optional :name, :string, 1
135
+ end
136
+ add_message "google.cloud.dialogflow.cx.v3.StartExperimentRequest" do
137
+ optional :name, :string, 1
138
+ end
139
+ add_message "google.cloud.dialogflow.cx.v3.StopExperimentRequest" do
140
+ optional :name, :string, 1
141
+ end
142
+ end
143
+ end
144
+
145
+ module Google
146
+ module Cloud
147
+ module Dialogflow
148
+ module CX
149
+ module V3
150
+ Experiment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Experiment").msgclass
151
+ Experiment::Definition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Experiment.Definition").msgclass
152
+ Experiment::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Experiment.Result").msgclass
153
+ Experiment::Result::ConfidenceInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Experiment.Result.ConfidenceInterval").msgclass
154
+ Experiment::Result::Metric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Experiment.Result.Metric").msgclass
155
+ Experiment::Result::VersionMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Experiment.Result.VersionMetrics").msgclass
156
+ Experiment::Result::MetricType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Experiment.Result.MetricType").enummodule
157
+ Experiment::Result::CountType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Experiment.Result.CountType").enummodule
158
+ Experiment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.Experiment.State").enummodule
159
+ VersionVariants = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.VersionVariants").msgclass
160
+ VersionVariants::Variant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.VersionVariants.Variant").msgclass
161
+ VariantsHistory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.VariantsHistory").msgclass
162
+ RolloutConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.RolloutConfig").msgclass
163
+ RolloutConfig::RolloutStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.RolloutConfig.RolloutStep").msgclass
164
+ RolloutState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.RolloutState").msgclass
165
+ ListExperimentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ListExperimentsRequest").msgclass
166
+ ListExperimentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.ListExperimentsResponse").msgclass
167
+ GetExperimentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.GetExperimentRequest").msgclass
168
+ CreateExperimentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.CreateExperimentRequest").msgclass
169
+ UpdateExperimentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.UpdateExperimentRequest").msgclass
170
+ DeleteExperimentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.DeleteExperimentRequest").msgclass
171
+ StartExperimentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.StartExperimentRequest").msgclass
172
+ StopExperimentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.cx.v3.StopExperimentRequest").msgclass
173
+ end
174
+ end
175
+ end
176
+ end
177
+ end
@@ -0,0 +1,61 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/dialogflow/cx/v3/experiment.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/experiment_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module Dialogflow
25
+ module CX
26
+ module V3
27
+ module Experiments
28
+ # Service for managing [Experiments][google.cloud.dialogflow.cx.v3.Experiment].
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.Experiments'
36
+
37
+ # Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
38
+ rpc :ListExperiments, ::Google::Cloud::Dialogflow::CX::V3::ListExperimentsRequest, ::Google::Cloud::Dialogflow::CX::V3::ListExperimentsResponse
39
+ # Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
40
+ rpc :GetExperiment, ::Google::Cloud::Dialogflow::CX::V3::GetExperimentRequest, ::Google::Cloud::Dialogflow::CX::V3::Experiment
41
+ # Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
42
+ rpc :CreateExperiment, ::Google::Cloud::Dialogflow::CX::V3::CreateExperimentRequest, ::Google::Cloud::Dialogflow::CX::V3::Experiment
43
+ # Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
44
+ rpc :UpdateExperiment, ::Google::Cloud::Dialogflow::CX::V3::UpdateExperimentRequest, ::Google::Cloud::Dialogflow::CX::V3::Experiment
45
+ # Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment].
46
+ rpc :DeleteExperiment, ::Google::Cloud::Dialogflow::CX::V3::DeleteExperimentRequest, ::Google::Protobuf::Empty
47
+ # Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
48
+ # experiment from PENDING to RUNNING.
49
+ rpc :StartExperiment, ::Google::Cloud::Dialogflow::CX::V3::StartExperimentRequest, ::Google::Cloud::Dialogflow::CX::V3::Experiment
50
+ # Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of
51
+ # experiment from RUNNING to DONE.
52
+ rpc :StopExperiment, ::Google::Cloud::Dialogflow::CX::V3::StopExperimentRequest, ::Google::Cloud::Dialogflow::CX::V3::Experiment
53
+ end
54
+
55
+ Stub = Service.rpc_stub_class
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,851 @@
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/experiment_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Dialogflow
25
+ module CX
26
+ module V3
27
+ module Experiments
28
+ ##
29
+ # Client for the Experiments service.
30
+ #
31
+ # Service for managing {::Google::Cloud::Dialogflow::CX::V3::Experiment Experiments}.
32
+ #
33
+ class Client
34
+ include Paths
35
+
36
+ # @private
37
+ attr_reader :experiments_stub
38
+
39
+ ##
40
+ # Configure the Experiments Client class.
41
+ #
42
+ # See {::Google::Cloud::Dialogflow::CX::V3::Experiments::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # @example
46
+ #
47
+ # # Modify the configuration for all Experiments clients
48
+ # ::Google::Cloud::Dialogflow::CX::V3::Experiments::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 Experiments 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::Experiments::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 Experiments client object.
101
+ #
102
+ # @example
103
+ #
104
+ # # Create a client using the default configuration
105
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Experiments::Client.new
106
+ #
107
+ # # Create a client using a custom configuration
108
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Experiments::Client.new do |config|
109
+ # config.timeout = 10.0
110
+ # end
111
+ #
112
+ # @yield [config] Configure the Experiments 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/experiment_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
+ @experiments_stub = ::Gapic::ServiceStub.new(
143
+ ::Google::Cloud::Dialogflow::CX::V3::Experiments::Stub,
144
+ credentials: credentials,
145
+ endpoint: @config.endpoint,
146
+ channel_args: @config.channel_args,
147
+ interceptors: @config.interceptors
148
+ )
149
+ end
150
+
151
+ # Service calls
152
+
153
+ ##
154
+ # Returns the list of all experiments in the specified {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}.
155
+ #
156
+ # @overload list_experiments(request, options = nil)
157
+ # Pass arguments to `list_experiments` via a request object, either of type
158
+ # {::Google::Cloud::Dialogflow::CX::V3::ListExperimentsRequest} or an equivalent Hash.
159
+ #
160
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::ListExperimentsRequest, ::Hash]
161
+ # A request object representing the call parameters. Required. To specify no
162
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
163
+ # @param options [::Gapic::CallOptions, ::Hash]
164
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
165
+ #
166
+ # @overload list_experiments(parent: nil, page_size: nil, page_token: nil)
167
+ # Pass arguments to `list_experiments` via keyword arguments. Note that at
168
+ # least one keyword argument is required. To specify no parameters, or to keep all
169
+ # the default parameter values, pass an empty Hash as a request object (see above).
170
+ #
171
+ # @param parent [::String]
172
+ # Required. The {::Google::Cloud::Dialogflow::CX::V3::Environment Environment} to list all environments for.
173
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
174
+ # ID>/environments/<Environment ID>`.
175
+ # @param page_size [::Integer]
176
+ # The maximum number of items to return in a single page. By default 20 and
177
+ # at most 100.
178
+ # @param page_token [::String]
179
+ # The next_page_token value returned from a previous list request.
180
+ #
181
+ # @yield [response, operation] Access the result along with the RPC operation
182
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Experiment>]
183
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
184
+ #
185
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Experiment>]
186
+ #
187
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
188
+ #
189
+ def list_experiments request, options = nil
190
+ raise ::ArgumentError, "request must be provided" if request.nil?
191
+
192
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::ListExperimentsRequest
193
+
194
+ # Converts hash and nil to an options object
195
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
196
+
197
+ # Customize the options with defaults
198
+ metadata = @config.rpcs.list_experiments.metadata.to_h
199
+
200
+ # Set x-goog-api-client and x-goog-user-project headers
201
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
202
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
203
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
204
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
205
+
206
+ header_params = {
207
+ "parent" => request.parent
208
+ }
209
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
210
+ metadata[:"x-goog-request-params"] ||= request_params_header
211
+
212
+ options.apply_defaults timeout: @config.rpcs.list_experiments.timeout,
213
+ metadata: metadata,
214
+ retry_policy: @config.rpcs.list_experiments.retry_policy
215
+
216
+ options.apply_defaults timeout: @config.timeout,
217
+ metadata: @config.metadata,
218
+ retry_policy: @config.retry_policy
219
+
220
+ @experiments_stub.call_rpc :list_experiments, request, options: options do |response, operation|
221
+ response = ::Gapic::PagedEnumerable.new @experiments_stub, :list_experiments, request, response, operation, options
222
+ yield response, operation if block_given?
223
+ return response
224
+ end
225
+ rescue ::GRPC::BadStatus => e
226
+ raise ::Google::Cloud::Error.from_error(e)
227
+ end
228
+
229
+ ##
230
+ # Retrieves the specified {::Google::Cloud::Dialogflow::CX::V3::Experiment Experiment}.
231
+ #
232
+ # @overload get_experiment(request, options = nil)
233
+ # Pass arguments to `get_experiment` via a request object, either of type
234
+ # {::Google::Cloud::Dialogflow::CX::V3::GetExperimentRequest} or an equivalent Hash.
235
+ #
236
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::GetExperimentRequest, ::Hash]
237
+ # A request object representing the call parameters. Required. To specify no
238
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
239
+ # @param options [::Gapic::CallOptions, ::Hash]
240
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
241
+ #
242
+ # @overload get_experiment(name: nil)
243
+ # Pass arguments to `get_experiment` via keyword arguments. Note that at
244
+ # least one keyword argument is required. To specify no parameters, or to keep all
245
+ # the default parameter values, pass an empty Hash as a request object (see above).
246
+ #
247
+ # @param name [::String]
248
+ # Required. The name of the {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}.
249
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
250
+ # ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
251
+ #
252
+ # @yield [response, operation] Access the result along with the RPC operation
253
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::Experiment]
254
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
255
+ #
256
+ # @return [::Google::Cloud::Dialogflow::CX::V3::Experiment]
257
+ #
258
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
259
+ #
260
+ def get_experiment request, options = nil
261
+ raise ::ArgumentError, "request must be provided" if request.nil?
262
+
263
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::GetExperimentRequest
264
+
265
+ # Converts hash and nil to an options object
266
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
267
+
268
+ # Customize the options with defaults
269
+ metadata = @config.rpcs.get_experiment.metadata.to_h
270
+
271
+ # Set x-goog-api-client and x-goog-user-project headers
272
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
273
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
274
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
275
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
276
+
277
+ header_params = {
278
+ "name" => request.name
279
+ }
280
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
281
+ metadata[:"x-goog-request-params"] ||= request_params_header
282
+
283
+ options.apply_defaults timeout: @config.rpcs.get_experiment.timeout,
284
+ metadata: metadata,
285
+ retry_policy: @config.rpcs.get_experiment.retry_policy
286
+
287
+ options.apply_defaults timeout: @config.timeout,
288
+ metadata: @config.metadata,
289
+ retry_policy: @config.retry_policy
290
+
291
+ @experiments_stub.call_rpc :get_experiment, request, options: options do |response, operation|
292
+ yield response, operation if block_given?
293
+ return response
294
+ end
295
+ rescue ::GRPC::BadStatus => e
296
+ raise ::Google::Cloud::Error.from_error(e)
297
+ end
298
+
299
+ ##
300
+ # Creates an {::Google::Cloud::Dialogflow::CX::V3::Experiment Experiment} in the specified {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}.
301
+ #
302
+ # @overload create_experiment(request, options = nil)
303
+ # Pass arguments to `create_experiment` via a request object, either of type
304
+ # {::Google::Cloud::Dialogflow::CX::V3::CreateExperimentRequest} or an equivalent Hash.
305
+ #
306
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::CreateExperimentRequest, ::Hash]
307
+ # A request object representing the call parameters. Required. To specify no
308
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
309
+ # @param options [::Gapic::CallOptions, ::Hash]
310
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
311
+ #
312
+ # @overload create_experiment(parent: nil, experiment: nil)
313
+ # Pass arguments to `create_experiment` via keyword arguments. Note that at
314
+ # least one keyword argument is required. To specify no parameters, or to keep all
315
+ # the default parameter values, pass an empty Hash as a request object (see above).
316
+ #
317
+ # @param parent [::String]
318
+ # Required. The {::Google::Cloud::Dialogflow::CX::V3::Agent Agent} to create an {::Google::Cloud::Dialogflow::CX::V3::Environment Environment} for.
319
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
320
+ # ID>/environments/<Environment ID>`.
321
+ # @param experiment [::Google::Cloud::Dialogflow::CX::V3::Experiment, ::Hash]
322
+ # Required. The experiment to create.
323
+ #
324
+ # @yield [response, operation] Access the result along with the RPC operation
325
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::Experiment]
326
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
327
+ #
328
+ # @return [::Google::Cloud::Dialogflow::CX::V3::Experiment]
329
+ #
330
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
331
+ #
332
+ def create_experiment request, options = nil
333
+ raise ::ArgumentError, "request must be provided" if request.nil?
334
+
335
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::CreateExperimentRequest
336
+
337
+ # Converts hash and nil to an options object
338
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
339
+
340
+ # Customize the options with defaults
341
+ metadata = @config.rpcs.create_experiment.metadata.to_h
342
+
343
+ # Set x-goog-api-client and x-goog-user-project headers
344
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
345
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
346
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
347
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
348
+
349
+ header_params = {
350
+ "parent" => request.parent
351
+ }
352
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
353
+ metadata[:"x-goog-request-params"] ||= request_params_header
354
+
355
+ options.apply_defaults timeout: @config.rpcs.create_experiment.timeout,
356
+ metadata: metadata,
357
+ retry_policy: @config.rpcs.create_experiment.retry_policy
358
+
359
+ options.apply_defaults timeout: @config.timeout,
360
+ metadata: @config.metadata,
361
+ retry_policy: @config.retry_policy
362
+
363
+ @experiments_stub.call_rpc :create_experiment, request, options: options do |response, operation|
364
+ yield response, operation if block_given?
365
+ return response
366
+ end
367
+ rescue ::GRPC::BadStatus => e
368
+ raise ::Google::Cloud::Error.from_error(e)
369
+ end
370
+
371
+ ##
372
+ # Updates the specified {::Google::Cloud::Dialogflow::CX::V3::Experiment Experiment}.
373
+ #
374
+ # @overload update_experiment(request, options = nil)
375
+ # Pass arguments to `update_experiment` via a request object, either of type
376
+ # {::Google::Cloud::Dialogflow::CX::V3::UpdateExperimentRequest} or an equivalent Hash.
377
+ #
378
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::UpdateExperimentRequest, ::Hash]
379
+ # A request object representing the call parameters. Required. To specify no
380
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
381
+ # @param options [::Gapic::CallOptions, ::Hash]
382
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
383
+ #
384
+ # @overload update_experiment(experiment: nil, update_mask: nil)
385
+ # Pass arguments to `update_experiment` via keyword arguments. Note that at
386
+ # least one keyword argument is required. To specify no parameters, or to keep all
387
+ # the default parameter values, pass an empty Hash as a request object (see above).
388
+ #
389
+ # @param experiment [::Google::Cloud::Dialogflow::CX::V3::Experiment, ::Hash]
390
+ # Required. The experiment to update.
391
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
392
+ # Required. The mask to control which fields get updated.
393
+ #
394
+ # @yield [response, operation] Access the result along with the RPC operation
395
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::Experiment]
396
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
397
+ #
398
+ # @return [::Google::Cloud::Dialogflow::CX::V3::Experiment]
399
+ #
400
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
401
+ #
402
+ def update_experiment request, options = nil
403
+ raise ::ArgumentError, "request must be provided" if request.nil?
404
+
405
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::UpdateExperimentRequest
406
+
407
+ # Converts hash and nil to an options object
408
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
409
+
410
+ # Customize the options with defaults
411
+ metadata = @config.rpcs.update_experiment.metadata.to_h
412
+
413
+ # Set x-goog-api-client and x-goog-user-project headers
414
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
415
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
416
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
417
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
418
+
419
+ header_params = {
420
+ "experiment.name" => request.experiment.name
421
+ }
422
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
423
+ metadata[:"x-goog-request-params"] ||= request_params_header
424
+
425
+ options.apply_defaults timeout: @config.rpcs.update_experiment.timeout,
426
+ metadata: metadata,
427
+ retry_policy: @config.rpcs.update_experiment.retry_policy
428
+
429
+ options.apply_defaults timeout: @config.timeout,
430
+ metadata: @config.metadata,
431
+ retry_policy: @config.retry_policy
432
+
433
+ @experiments_stub.call_rpc :update_experiment, request, options: options do |response, operation|
434
+ yield response, operation if block_given?
435
+ return response
436
+ end
437
+ rescue ::GRPC::BadStatus => e
438
+ raise ::Google::Cloud::Error.from_error(e)
439
+ end
440
+
441
+ ##
442
+ # Deletes the specified {::Google::Cloud::Dialogflow::CX::V3::Experiment Experiment}.
443
+ #
444
+ # @overload delete_experiment(request, options = nil)
445
+ # Pass arguments to `delete_experiment` via a request object, either of type
446
+ # {::Google::Cloud::Dialogflow::CX::V3::DeleteExperimentRequest} or an equivalent Hash.
447
+ #
448
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::DeleteExperimentRequest, ::Hash]
449
+ # A request object representing the call parameters. Required. To specify no
450
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
451
+ # @param options [::Gapic::CallOptions, ::Hash]
452
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
453
+ #
454
+ # @overload delete_experiment(name: nil)
455
+ # Pass arguments to `delete_experiment` via keyword arguments. Note that at
456
+ # least one keyword argument is required. To specify no parameters, or to keep all
457
+ # the default parameter values, pass an empty Hash as a request object (see above).
458
+ #
459
+ # @param name [::String]
460
+ # Required. The name of the {::Google::Cloud::Dialogflow::CX::V3::Environment Environment} to delete.
461
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
462
+ # ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
463
+ #
464
+ # @yield [response, operation] Access the result along with the RPC operation
465
+ # @yieldparam response [::Google::Protobuf::Empty]
466
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
467
+ #
468
+ # @return [::Google::Protobuf::Empty]
469
+ #
470
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
471
+ #
472
+ def delete_experiment request, options = nil
473
+ raise ::ArgumentError, "request must be provided" if request.nil?
474
+
475
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::DeleteExperimentRequest
476
+
477
+ # Converts hash and nil to an options object
478
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
479
+
480
+ # Customize the options with defaults
481
+ metadata = @config.rpcs.delete_experiment.metadata.to_h
482
+
483
+ # Set x-goog-api-client and x-goog-user-project headers
484
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
485
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
486
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
487
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
488
+
489
+ header_params = {
490
+ "name" => request.name
491
+ }
492
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
493
+ metadata[:"x-goog-request-params"] ||= request_params_header
494
+
495
+ options.apply_defaults timeout: @config.rpcs.delete_experiment.timeout,
496
+ metadata: metadata,
497
+ retry_policy: @config.rpcs.delete_experiment.retry_policy
498
+
499
+ options.apply_defaults timeout: @config.timeout,
500
+ metadata: @config.metadata,
501
+ retry_policy: @config.retry_policy
502
+
503
+ @experiments_stub.call_rpc :delete_experiment, request, options: options do |response, operation|
504
+ yield response, operation if block_given?
505
+ return response
506
+ end
507
+ rescue ::GRPC::BadStatus => e
508
+ raise ::Google::Cloud::Error.from_error(e)
509
+ end
510
+
511
+ ##
512
+ # Starts the specified {::Google::Cloud::Dialogflow::CX::V3::Experiment Experiment}. This rpc only changes the state of
513
+ # experiment from PENDING to RUNNING.
514
+ #
515
+ # @overload start_experiment(request, options = nil)
516
+ # Pass arguments to `start_experiment` via a request object, either of type
517
+ # {::Google::Cloud::Dialogflow::CX::V3::StartExperimentRequest} or an equivalent Hash.
518
+ #
519
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::StartExperimentRequest, ::Hash]
520
+ # A request object representing the call parameters. Required. To specify no
521
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
522
+ # @param options [::Gapic::CallOptions, ::Hash]
523
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
524
+ #
525
+ # @overload start_experiment(name: nil)
526
+ # Pass arguments to `start_experiment` via keyword arguments. Note that at
527
+ # least one keyword argument is required. To specify no parameters, or to keep all
528
+ # the default parameter values, pass an empty Hash as a request object (see above).
529
+ #
530
+ # @param name [::String]
531
+ # Required. Resource name of the experiment to start.
532
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
533
+ # ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
534
+ #
535
+ # @yield [response, operation] Access the result along with the RPC operation
536
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::Experiment]
537
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
538
+ #
539
+ # @return [::Google::Cloud::Dialogflow::CX::V3::Experiment]
540
+ #
541
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
542
+ #
543
+ def start_experiment request, options = nil
544
+ raise ::ArgumentError, "request must be provided" if request.nil?
545
+
546
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::StartExperimentRequest
547
+
548
+ # Converts hash and nil to an options object
549
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
550
+
551
+ # Customize the options with defaults
552
+ metadata = @config.rpcs.start_experiment.metadata.to_h
553
+
554
+ # Set x-goog-api-client and x-goog-user-project headers
555
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
556
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
557
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
558
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
559
+
560
+ header_params = {
561
+ "name" => request.name
562
+ }
563
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
564
+ metadata[:"x-goog-request-params"] ||= request_params_header
565
+
566
+ options.apply_defaults timeout: @config.rpcs.start_experiment.timeout,
567
+ metadata: metadata,
568
+ retry_policy: @config.rpcs.start_experiment.retry_policy
569
+
570
+ options.apply_defaults timeout: @config.timeout,
571
+ metadata: @config.metadata,
572
+ retry_policy: @config.retry_policy
573
+
574
+ @experiments_stub.call_rpc :start_experiment, request, options: options do |response, operation|
575
+ yield response, operation if block_given?
576
+ return response
577
+ end
578
+ rescue ::GRPC::BadStatus => e
579
+ raise ::Google::Cloud::Error.from_error(e)
580
+ end
581
+
582
+ ##
583
+ # Stops the specified {::Google::Cloud::Dialogflow::CX::V3::Experiment Experiment}. This rpc only changes the state of
584
+ # experiment from RUNNING to DONE.
585
+ #
586
+ # @overload stop_experiment(request, options = nil)
587
+ # Pass arguments to `stop_experiment` via a request object, either of type
588
+ # {::Google::Cloud::Dialogflow::CX::V3::StopExperimentRequest} or an equivalent Hash.
589
+ #
590
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::StopExperimentRequest, ::Hash]
591
+ # A request object representing the call parameters. Required. To specify no
592
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
593
+ # @param options [::Gapic::CallOptions, ::Hash]
594
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
595
+ #
596
+ # @overload stop_experiment(name: nil)
597
+ # Pass arguments to `stop_experiment` via keyword arguments. Note that at
598
+ # least one keyword argument is required. To specify no parameters, or to keep all
599
+ # the default parameter values, pass an empty Hash as a request object (see above).
600
+ #
601
+ # @param name [::String]
602
+ # Required. Resource name of the experiment to stop.
603
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
604
+ # ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
605
+ #
606
+ # @yield [response, operation] Access the result along with the RPC operation
607
+ # @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::Experiment]
608
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
609
+ #
610
+ # @return [::Google::Cloud::Dialogflow::CX::V3::Experiment]
611
+ #
612
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
613
+ #
614
+ def stop_experiment request, options = nil
615
+ raise ::ArgumentError, "request must be provided" if request.nil?
616
+
617
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::StopExperimentRequest
618
+
619
+ # Converts hash and nil to an options object
620
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
621
+
622
+ # Customize the options with defaults
623
+ metadata = @config.rpcs.stop_experiment.metadata.to_h
624
+
625
+ # Set x-goog-api-client and x-goog-user-project headers
626
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
627
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
628
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
629
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
630
+
631
+ header_params = {
632
+ "name" => request.name
633
+ }
634
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
635
+ metadata[:"x-goog-request-params"] ||= request_params_header
636
+
637
+ options.apply_defaults timeout: @config.rpcs.stop_experiment.timeout,
638
+ metadata: metadata,
639
+ retry_policy: @config.rpcs.stop_experiment.retry_policy
640
+
641
+ options.apply_defaults timeout: @config.timeout,
642
+ metadata: @config.metadata,
643
+ retry_policy: @config.retry_policy
644
+
645
+ @experiments_stub.call_rpc :stop_experiment, request, options: options do |response, operation|
646
+ yield response, operation if block_given?
647
+ return response
648
+ end
649
+ rescue ::GRPC::BadStatus => e
650
+ raise ::Google::Cloud::Error.from_error(e)
651
+ end
652
+
653
+ ##
654
+ # Configuration class for the Experiments API.
655
+ #
656
+ # This class represents the configuration for Experiments,
657
+ # providing control over timeouts, retry behavior, logging, transport
658
+ # parameters, and other low-level controls. Certain parameters can also be
659
+ # applied individually to specific RPCs. See
660
+ # {::Google::Cloud::Dialogflow::CX::V3::Experiments::Client::Configuration::Rpcs}
661
+ # for a list of RPCs that can be configured independently.
662
+ #
663
+ # Configuration can be applied globally to all clients, or to a single client
664
+ # on construction.
665
+ #
666
+ # @example
667
+ #
668
+ # # Modify the global config, setting the timeout for
669
+ # # list_experiments to 20 seconds,
670
+ # # and all remaining timeouts to 10 seconds.
671
+ # ::Google::Cloud::Dialogflow::CX::V3::Experiments::Client.configure do |config|
672
+ # config.timeout = 10.0
673
+ # config.rpcs.list_experiments.timeout = 20.0
674
+ # end
675
+ #
676
+ # # Apply the above configuration only to a new client.
677
+ # client = ::Google::Cloud::Dialogflow::CX::V3::Experiments::Client.new do |config|
678
+ # config.timeout = 10.0
679
+ # config.rpcs.list_experiments.timeout = 20.0
680
+ # end
681
+ #
682
+ # @!attribute [rw] endpoint
683
+ # The hostname or hostname:port of the service endpoint.
684
+ # Defaults to `"dialogflow.googleapis.com"`.
685
+ # @return [::String]
686
+ # @!attribute [rw] credentials
687
+ # Credentials to send with calls. You may provide any of the following types:
688
+ # * (`String`) The path to a service account key file in JSON format
689
+ # * (`Hash`) A service account key as a Hash
690
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
691
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
692
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
693
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
694
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
695
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
696
+ # * (`nil`) indicating no credentials
697
+ # @return [::Object]
698
+ # @!attribute [rw] scope
699
+ # The OAuth scopes
700
+ # @return [::Array<::String>]
701
+ # @!attribute [rw] lib_name
702
+ # The library name as recorded in instrumentation and logging
703
+ # @return [::String]
704
+ # @!attribute [rw] lib_version
705
+ # The library version as recorded in instrumentation and logging
706
+ # @return [::String]
707
+ # @!attribute [rw] channel_args
708
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
709
+ # `GRPC::Core::Channel` object is provided as the credential.
710
+ # @return [::Hash]
711
+ # @!attribute [rw] interceptors
712
+ # An array of interceptors that are run before calls are executed.
713
+ # @return [::Array<::GRPC::ClientInterceptor>]
714
+ # @!attribute [rw] timeout
715
+ # The call timeout in seconds.
716
+ # @return [::Numeric]
717
+ # @!attribute [rw] metadata
718
+ # Additional gRPC headers to be sent with the call.
719
+ # @return [::Hash{::Symbol=>::String}]
720
+ # @!attribute [rw] retry_policy
721
+ # The retry policy. The value is a hash with the following keys:
722
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
723
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
724
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
725
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
726
+ # trigger a retry.
727
+ # @return [::Hash]
728
+ # @!attribute [rw] quota_project
729
+ # A separate project against which to charge quota.
730
+ # @return [::String]
731
+ #
732
+ class Configuration
733
+ extend ::Gapic::Config
734
+
735
+ config_attr :endpoint, "dialogflow.googleapis.com", ::String
736
+ config_attr :credentials, nil do |value|
737
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
738
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
739
+ allowed.any? { |klass| klass === value }
740
+ end
741
+ config_attr :scope, nil, ::String, ::Array, nil
742
+ config_attr :lib_name, nil, ::String, nil
743
+ config_attr :lib_version, nil, ::String, nil
744
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
745
+ config_attr :interceptors, nil, ::Array, nil
746
+ config_attr :timeout, nil, ::Numeric, nil
747
+ config_attr :metadata, nil, ::Hash, nil
748
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
749
+ config_attr :quota_project, nil, ::String, nil
750
+
751
+ # @private
752
+ def initialize parent_config = nil
753
+ @parent_config = parent_config unless parent_config.nil?
754
+
755
+ yield self if block_given?
756
+ end
757
+
758
+ ##
759
+ # Configurations for individual RPCs
760
+ # @return [Rpcs]
761
+ #
762
+ def rpcs
763
+ @rpcs ||= begin
764
+ parent_rpcs = nil
765
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
766
+ Rpcs.new parent_rpcs
767
+ end
768
+ end
769
+
770
+ ##
771
+ # Configuration RPC class for the Experiments API.
772
+ #
773
+ # Includes fields providing the configuration for each RPC in this service.
774
+ # Each configuration object is of type `Gapic::Config::Method` and includes
775
+ # the following configuration fields:
776
+ #
777
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
778
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
779
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
780
+ # include the following keys:
781
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
782
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
783
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
784
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
785
+ # trigger a retry.
786
+ #
787
+ class Rpcs
788
+ ##
789
+ # RPC-specific configuration for `list_experiments`
790
+ # @return [::Gapic::Config::Method]
791
+ #
792
+ attr_reader :list_experiments
793
+ ##
794
+ # RPC-specific configuration for `get_experiment`
795
+ # @return [::Gapic::Config::Method]
796
+ #
797
+ attr_reader :get_experiment
798
+ ##
799
+ # RPC-specific configuration for `create_experiment`
800
+ # @return [::Gapic::Config::Method]
801
+ #
802
+ attr_reader :create_experiment
803
+ ##
804
+ # RPC-specific configuration for `update_experiment`
805
+ # @return [::Gapic::Config::Method]
806
+ #
807
+ attr_reader :update_experiment
808
+ ##
809
+ # RPC-specific configuration for `delete_experiment`
810
+ # @return [::Gapic::Config::Method]
811
+ #
812
+ attr_reader :delete_experiment
813
+ ##
814
+ # RPC-specific configuration for `start_experiment`
815
+ # @return [::Gapic::Config::Method]
816
+ #
817
+ attr_reader :start_experiment
818
+ ##
819
+ # RPC-specific configuration for `stop_experiment`
820
+ # @return [::Gapic::Config::Method]
821
+ #
822
+ attr_reader :stop_experiment
823
+
824
+ # @private
825
+ def initialize parent_rpcs = nil
826
+ list_experiments_config = parent_rpcs.list_experiments if parent_rpcs.respond_to? :list_experiments
827
+ @list_experiments = ::Gapic::Config::Method.new list_experiments_config
828
+ get_experiment_config = parent_rpcs.get_experiment if parent_rpcs.respond_to? :get_experiment
829
+ @get_experiment = ::Gapic::Config::Method.new get_experiment_config
830
+ create_experiment_config = parent_rpcs.create_experiment if parent_rpcs.respond_to? :create_experiment
831
+ @create_experiment = ::Gapic::Config::Method.new create_experiment_config
832
+ update_experiment_config = parent_rpcs.update_experiment if parent_rpcs.respond_to? :update_experiment
833
+ @update_experiment = ::Gapic::Config::Method.new update_experiment_config
834
+ delete_experiment_config = parent_rpcs.delete_experiment if parent_rpcs.respond_to? :delete_experiment
835
+ @delete_experiment = ::Gapic::Config::Method.new delete_experiment_config
836
+ start_experiment_config = parent_rpcs.start_experiment if parent_rpcs.respond_to? :start_experiment
837
+ @start_experiment = ::Gapic::Config::Method.new start_experiment_config
838
+ stop_experiment_config = parent_rpcs.stop_experiment if parent_rpcs.respond_to? :stop_experiment
839
+ @stop_experiment = ::Gapic::Config::Method.new stop_experiment_config
840
+
841
+ yield self if block_given?
842
+ end
843
+ end
844
+ end
845
+ end
846
+ end
847
+ end
848
+ end
849
+ end
850
+ end
851
+ end