google-cloud-ces-v1beta 0.a → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/ces/v1beta/agent_card_pb.rb +26 -0
  6. data/lib/google/cloud/ces/v1beta/agent_pb.rb +30 -0
  7. data/lib/google/cloud/ces/v1beta/agent_service/client.rb +5641 -0
  8. data/lib/google/cloud/ces/v1beta/agent_service/credentials.rb +48 -0
  9. data/lib/google/cloud/ces/v1beta/agent_service/operations.rb +843 -0
  10. data/lib/google/cloud/ces/v1beta/agent_service/paths.rb +481 -0
  11. data/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb +5249 -0
  12. data/lib/google/cloud/ces/v1beta/agent_service/rest/operations.rb +927 -0
  13. data/lib/google/cloud/ces/v1beta/agent_service/rest/service_stub.rb +3213 -0
  14. data/lib/google/cloud/ces/v1beta/agent_service/rest.rb +55 -0
  15. data/lib/google/cloud/ces/v1beta/agent_service.rb +57 -0
  16. data/lib/google/cloud/ces/v1beta/agent_service_pb.rb +132 -0
  17. data/lib/google/cloud/ces/v1beta/agent_service_services_pb.rb +148 -0
  18. data/lib/google/cloud/ces/v1beta/agent_tool_pb.rb +24 -0
  19. data/lib/google/cloud/ces/v1beta/agent_transfers_pb.rb +29 -0
  20. data/lib/google/cloud/ces/v1beta/app_pb.rb +70 -0
  21. data/lib/google/cloud/ces/v1beta/app_version_pb.rb +32 -0
  22. data/lib/google/cloud/ces/v1beta/auth_pb.rb +34 -0
  23. data/lib/google/cloud/ces/v1beta/bigquery_export_pb.rb +23 -0
  24. data/lib/google/cloud/ces/v1beta/bindings_override.rb +75 -0
  25. data/lib/google/cloud/ces/v1beta/changelog_pb.rb +26 -0
  26. data/lib/google/cloud/ces/v1beta/client_function_pb.rb +24 -0
  27. data/lib/google/cloud/ces/v1beta/common_pb.rb +46 -0
  28. data/lib/google/cloud/ces/v1beta/connector_tool_pb.rb +27 -0
  29. data/lib/google/cloud/ces/v1beta/connector_toolset_pb.rb +25 -0
  30. data/lib/google/cloud/ces/v1beta/conversation_pb.rb +31 -0
  31. data/lib/google/cloud/ces/v1beta/data_store_pb.rb +27 -0
  32. data/lib/google/cloud/ces/v1beta/data_store_tool_pb.rb +40 -0
  33. data/lib/google/cloud/ces/v1beta/deployment_pb.rb +30 -0
  34. data/lib/google/cloud/ces/v1beta/evaluation_metrics_config_pb.rb +31 -0
  35. data/lib/google/cloud/ces/v1beta/evaluation_pb.rb +99 -0
  36. data/lib/google/cloud/ces/v1beta/evaluation_service/client.rb +4050 -0
  37. data/lib/google/cloud/ces/v1beta/evaluation_service/credentials.rb +48 -0
  38. data/lib/google/cloud/ces/v1beta/evaluation_service/operations.rb +843 -0
  39. data/lib/google/cloud/ces/v1beta/evaluation_service/paths.rb +306 -0
  40. data/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb +3770 -0
  41. data/lib/google/cloud/ces/v1beta/evaluation_service/rest/operations.rb +927 -0
  42. data/lib/google/cloud/ces/v1beta/evaluation_service/rest/service_stub.rb +2233 -0
  43. data/lib/google/cloud/ces/v1beta/evaluation_service/rest.rb +54 -0
  44. data/lib/google/cloud/ces/v1beta/evaluation_service.rb +56 -0
  45. data/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb +93 -0
  46. data/lib/google/cloud/ces/v1beta/evaluation_service_services_pb.rb +116 -0
  47. data/lib/google/cloud/ces/v1beta/example_pb.rb +34 -0
  48. data/lib/google/cloud/ces/v1beta/fakes_pb.rb +25 -0
  49. data/lib/google/cloud/ces/v1beta/file_context_pb.rb +24 -0
  50. data/lib/google/cloud/ces/v1beta/file_search_tool_pb.rb +24 -0
  51. data/lib/google/cloud/ces/v1beta/golden_run_pb.rb +21 -0
  52. data/lib/google/cloud/ces/v1beta/google_search_tool_pb.rb +24 -0
  53. data/lib/google/cloud/ces/v1beta/guardrail_pb.rb +37 -0
  54. data/lib/google/cloud/ces/v1beta/mcp_tool_pb.rb +27 -0
  55. data/lib/google/cloud/ces/v1beta/mcp_toolset_pb.rb +28 -0
  56. data/lib/google/cloud/ces/v1beta/mocks_pb.rb +26 -0
  57. data/lib/google/cloud/ces/v1beta/omnichannel_pb.rb +31 -0
  58. data/lib/google/cloud/ces/v1beta/omnichannel_service_pb.rb +27 -0
  59. data/lib/google/cloud/ces/v1beta/open_api_tool_pb.rb +25 -0
  60. data/lib/google/cloud/ces/v1beta/open_api_toolset_pb.rb +25 -0
  61. data/lib/google/cloud/ces/v1beta/python_function_pb.rb +24 -0
  62. data/lib/google/cloud/ces/v1beta/rest.rb +42 -0
  63. data/lib/google/cloud/ces/v1beta/schema_pb.rb +25 -0
  64. data/lib/google/cloud/ces/v1beta/search_suggestions_pb.rb +22 -0
  65. data/lib/google/cloud/ces/v1beta/security_settings_pb.rb +27 -0
  66. data/lib/google/cloud/ces/v1beta/session_service/client.rb +762 -0
  67. data/lib/google/cloud/ces/v1beta/session_service/credentials.rb +48 -0
  68. data/lib/google/cloud/ces/v1beta/session_service/paths.rb +117 -0
  69. data/lib/google/cloud/ces/v1beta/session_service/rest/client.rb +562 -0
  70. data/lib/google/cloud/ces/v1beta/session_service/rest/service_stub.rb +199 -0
  71. data/lib/google/cloud/ces/v1beta/session_service/rest.rb +53 -0
  72. data/lib/google/cloud/ces/v1beta/session_service.rb +55 -0
  73. data/lib/google/cloud/ces/v1beta/session_service_pb.rb +54 -0
  74. data/lib/google/cloud/ces/v1beta/session_service_services_pb.rb +120 -0
  75. data/lib/google/cloud/ces/v1beta/system_tool_pb.rb +23 -0
  76. data/lib/google/cloud/ces/v1beta/tool_pb.rb +40 -0
  77. data/lib/google/cloud/ces/v1beta/tool_service/client.rb +733 -0
  78. data/lib/google/cloud/ces/v1beta/tool_service/credentials.rb +48 -0
  79. data/lib/google/cloud/ces/v1beta/tool_service/paths.rb +94 -0
  80. data/lib/google/cloud/ces/v1beta/tool_service/rest/client.rb +677 -0
  81. data/lib/google/cloud/ces/v1beta/tool_service/rest/service_stub.rb +267 -0
  82. data/lib/google/cloud/ces/v1beta/tool_service/rest.rb +53 -0
  83. data/lib/google/cloud/ces/v1beta/tool_service.rb +55 -0
  84. data/lib/google/cloud/ces/v1beta/tool_service_pb.rb +37 -0
  85. data/lib/google/cloud/ces/v1beta/tool_service_services_pb.rb +50 -0
  86. data/lib/google/cloud/ces/v1beta/toolset_pb.rb +30 -0
  87. data/lib/google/cloud/ces/v1beta/toolset_tool_pb.rb +24 -0
  88. data/lib/google/cloud/ces/v1beta/version.rb +7 -2
  89. data/lib/google/cloud/ces/v1beta/widget_service/client.rb +503 -0
  90. data/lib/google/cloud/ces/v1beta/widget_service/credentials.rb +48 -0
  91. data/lib/google/cloud/ces/v1beta/widget_service/paths.rb +75 -0
  92. data/lib/google/cloud/ces/v1beta/widget_service/rest/client.rb +461 -0
  93. data/lib/google/cloud/ces/v1beta/widget_service/rest/service_stub.rb +143 -0
  94. data/lib/google/cloud/ces/v1beta/widget_service/rest.rb +53 -0
  95. data/lib/google/cloud/ces/v1beta/widget_service.rb +55 -0
  96. data/lib/google/cloud/ces/v1beta/widget_service_pb.rb +28 -0
  97. data/lib/google/cloud/ces/v1beta/widget_service_services_pb.rb +46 -0
  98. data/lib/google/cloud/ces/v1beta/widget_tool_pb.rb +31 -0
  99. data/lib/google/cloud/ces/v1beta.rb +49 -0
  100. data/lib/google-cloud-ces-v1beta.rb +21 -0
  101. data/proto_docs/README.md +4 -0
  102. data/proto_docs/google/api/client.rb +593 -0
  103. data/proto_docs/google/api/field_behavior.rb +85 -0
  104. data/proto_docs/google/api/launch_stage.rb +71 -0
  105. data/proto_docs/google/api/resource.rb +227 -0
  106. data/proto_docs/google/cloud/ces/v1beta/agent.rb +233 -0
  107. data/proto_docs/google/cloud/ces/v1beta/agent_card.rb +122 -0
  108. data/proto_docs/google/cloud/ces/v1beta/agent_service.rb +1682 -0
  109. data/proto_docs/google/cloud/ces/v1beta/agent_tool.rb +48 -0
  110. data/proto_docs/google/cloud/ces/v1beta/agent_transfers.rb +111 -0
  111. data/proto_docs/google/cloud/ces/v1beta/app.rb +883 -0
  112. data/proto_docs/google/cloud/ces/v1beta/app_version.rb +83 -0
  113. data/proto_docs/google/cloud/ces/v1beta/auth.rb +214 -0
  114. data/proto_docs/google/cloud/ces/v1beta/bigquery_export.rb +45 -0
  115. data/proto_docs/google/cloud/ces/v1beta/changelog.rb +73 -0
  116. data/proto_docs/google/cloud/ces/v1beta/client_function.rb +48 -0
  117. data/proto_docs/google/cloud/ces/v1beta/common.rb +375 -0
  118. data/proto_docs/google/cloud/ces/v1beta/connector_tool.rb +122 -0
  119. data/proto_docs/google/cloud/ces/v1beta/connector_toolset.rb +52 -0
  120. data/proto_docs/google/cloud/ces/v1beta/conversation.rb +159 -0
  121. data/proto_docs/google/cloud/ces/v1beta/data_store.rb +102 -0
  122. data/proto_docs/google/cloud/ces/v1beta/data_store_tool.rb +328 -0
  123. data/proto_docs/google/cloud/ces/v1beta/deployment.rb +123 -0
  124. data/proto_docs/google/cloud/ces/v1beta/evaluation.rb +1687 -0
  125. data/proto_docs/google/cloud/ces/v1beta/evaluation_metrics_config.rb +151 -0
  126. data/proto_docs/google/cloud/ces/v1beta/evaluation_service.rb +1087 -0
  127. data/proto_docs/google/cloud/ces/v1beta/example.rb +245 -0
  128. data/proto_docs/google/cloud/ces/v1beta/fakes.rb +67 -0
  129. data/proto_docs/google/cloud/ces/v1beta/file_context.rb +50 -0
  130. data/proto_docs/google/cloud/ces/v1beta/file_search_tool.rb +60 -0
  131. data/proto_docs/google/cloud/ces/v1beta/golden_run.rb +40 -0
  132. data/proto_docs/google/cloud/ces/v1beta/google_search_tool.rb +76 -0
  133. data/proto_docs/google/cloud/ces/v1beta/guardrail.rb +324 -0
  134. data/proto_docs/google/cloud/ces/v1beta/mcp_tool.rb +110 -0
  135. data/proto_docs/google/cloud/ces/v1beta/mcp_toolset.rb +118 -0
  136. data/proto_docs/google/cloud/ces/v1beta/mocks.rb +60 -0
  137. data/proto_docs/google/cloud/ces/v1beta/omnichannel.rb +163 -0
  138. data/proto_docs/google/cloud/ces/v1beta/omnichannel_service.rb +45 -0
  139. data/proto_docs/google/cloud/ces/v1beta/open_api_tool.rb +66 -0
  140. data/proto_docs/google/cloud/ces/v1beta/open_api_toolset.rb +57 -0
  141. data/proto_docs/google/cloud/ces/v1beta/python_function.rb +47 -0
  142. data/proto_docs/google/cloud/ces/v1beta/schema.rb +162 -0
  143. data/proto_docs/google/cloud/ces/v1beta/search_suggestions.rb +55 -0
  144. data/proto_docs/google/cloud/ces/v1beta/security_settings.rb +80 -0
  145. data/proto_docs/google/cloud/ces/v1beta/session_service.rb +493 -0
  146. data/proto_docs/google/cloud/ces/v1beta/system_tool.rb +38 -0
  147. data/proto_docs/google/cloud/ces/v1beta/tool.rb +136 -0
  148. data/proto_docs/google/cloud/ces/v1beta/tool_service.rb +185 -0
  149. data/proto_docs/google/cloud/ces/v1beta/toolset.rb +80 -0
  150. data/proto_docs/google/cloud/ces/v1beta/toolset_tool.rb +40 -0
  151. data/proto_docs/google/cloud/ces/v1beta/widget_service.rb +62 -0
  152. data/proto_docs/google/cloud/ces/v1beta/widget_tool.rb +182 -0
  153. data/proto_docs/google/longrunning/operations.rb +191 -0
  154. data/proto_docs/google/protobuf/any.rb +145 -0
  155. data/proto_docs/google/protobuf/duration.rb +98 -0
  156. data/proto_docs/google/protobuf/empty.rb +34 -0
  157. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  158. data/proto_docs/google/protobuf/struct.rb +108 -0
  159. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  160. data/proto_docs/google/rpc/status.rb +48 -0
  161. metadata +208 -9
@@ -0,0 +1,3770 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/ces/v1beta/evaluation_service_pb"
21
+ require "google/cloud/ces/v1beta/evaluation_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Ces
27
+ module V1beta
28
+ module EvaluationService
29
+ module Rest
30
+ ##
31
+ # REST client for the EvaluationService service.
32
+ #
33
+ # EvaluationService exposes methods to perform evaluation for the CES app.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "ces.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :evaluation_service_stub
46
+
47
+ ##
48
+ # Configure the EvaluationService Client class.
49
+ #
50
+ # See {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all EvaluationService clients
56
+ # ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Cloud", "Ces", "V1beta"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.timeout = 60.0
77
+ default_config.retry_policy = {
78
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
79
+ }
80
+
81
+ default_config
82
+ end
83
+ yield @configure if block_given?
84
+ @configure
85
+ end
86
+
87
+ ##
88
+ # Configure the EvaluationService Client instance.
89
+ #
90
+ # The configuration is set to the derived mode, meaning that values can be changed,
91
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
92
+ # should be made on {Client.configure}.
93
+ #
94
+ # See {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client::Configuration}
95
+ # for a description of the configuration fields.
96
+ #
97
+ # @yield [config] Configure the Client client.
98
+ # @yieldparam config [Client::Configuration]
99
+ #
100
+ # @return [Client::Configuration]
101
+ #
102
+ def configure
103
+ yield @config if block_given?
104
+ @config
105
+ end
106
+
107
+ ##
108
+ # The effective universe domain
109
+ #
110
+ # @return [String]
111
+ #
112
+ def universe_domain
113
+ @evaluation_service_stub.universe_domain
114
+ end
115
+
116
+ ##
117
+ # Create a new EvaluationService REST client object.
118
+ #
119
+ # @example
120
+ #
121
+ # # Create a client using the default configuration
122
+ # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
123
+ #
124
+ # # Create a client using a custom configuration
125
+ # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config|
126
+ # config.timeout = 10.0
127
+ # end
128
+ #
129
+ # @yield [config] Configure the EvaluationService client.
130
+ # @yieldparam config [Client::Configuration]
131
+ #
132
+ def initialize
133
+ # Create the configuration object
134
+ @config = Configuration.new Client.configure
135
+
136
+ # Yield the configuration if needed
137
+ yield @config if block_given?
138
+
139
+ # Create credentials
140
+ credentials = @config.credentials
141
+ # Use self-signed JWT if the endpoint is unchanged from default,
142
+ # but only if the default endpoint does not have a region prefix.
143
+ enable_self_signed_jwt = @config.endpoint.nil? ||
144
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
145
+ !@config.endpoint.split(".").first.include?("-"))
146
+ credentials ||= Credentials.default scope: @config.scope,
147
+ enable_self_signed_jwt: enable_self_signed_jwt
148
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
149
+ credentials = Credentials.new credentials, scope: @config.scope
150
+ end
151
+
152
+ @quota_project_id = @config.quota_project
153
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
154
+
155
+ @operations_client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Operations.new do |config|
156
+ config.credentials = credentials
157
+ config.quota_project = @quota_project_id
158
+ config.endpoint = @config.endpoint
159
+ config.universe_domain = @config.universe_domain
160
+ end
161
+
162
+ @evaluation_service_stub = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::ServiceStub.new(
163
+ endpoint: @config.endpoint,
164
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
165
+ universe_domain: @config.universe_domain,
166
+ credentials: credentials,
167
+ logger: @config.logger
168
+ )
169
+
170
+ @evaluation_service_stub.logger(stub: true)&.info do |entry|
171
+ entry.set_system_name
172
+ entry.set_service
173
+ entry.message = "Created client for #{entry.service}"
174
+ entry.set_credentials_fields credentials
175
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
176
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
177
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
178
+ end
179
+
180
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
181
+ config.credentials = credentials
182
+ config.quota_project = @quota_project_id
183
+ config.endpoint = @evaluation_service_stub.endpoint
184
+ config.universe_domain = @evaluation_service_stub.universe_domain
185
+ config.bindings_override = @config.bindings_override
186
+ config.logger = @evaluation_service_stub.logger if config.respond_to? :logger=
187
+ end
188
+ end
189
+
190
+ ##
191
+ # Get the associated client for long-running operations.
192
+ #
193
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Operations]
194
+ #
195
+ attr_reader :operations_client
196
+
197
+ ##
198
+ # Get the associated client for mix-in of the Locations.
199
+ #
200
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
201
+ #
202
+ attr_reader :location_client
203
+
204
+ ##
205
+ # The logger used for request/response debug logging.
206
+ #
207
+ # @return [Logger]
208
+ #
209
+ def logger
210
+ @evaluation_service_stub.logger
211
+ end
212
+
213
+ # Service calls
214
+
215
+ ##
216
+ # Runs an evaluation of the app.
217
+ #
218
+ # @overload run_evaluation(request, options = nil)
219
+ # Pass arguments to `run_evaluation` via a request object, either of type
220
+ # {::Google::Cloud::Ces::V1beta::RunEvaluationRequest} or an equivalent Hash.
221
+ #
222
+ # @param request [::Google::Cloud::Ces::V1beta::RunEvaluationRequest, ::Hash]
223
+ # A request object representing the call parameters. Required. To specify no
224
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
225
+ # @param options [::Gapic::CallOptions, ::Hash]
226
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
227
+ #
228
+ # @overload run_evaluation(app: nil, evaluations: nil, evaluation_dataset: nil, display_name: nil, app_version: nil, config: nil, run_count: nil, persona_run_configs: nil, optimization_config: nil, scheduled_evaluation_run: nil, golden_run_method: nil, generate_latency_report: nil)
229
+ # Pass arguments to `run_evaluation` via keyword arguments. Note that at
230
+ # least one keyword argument is required. To specify no parameters, or to keep all
231
+ # the default parameter values, pass an empty Hash as a request object (see above).
232
+ #
233
+ # @param app [::String]
234
+ # Required. The app to evaluate.
235
+ # Format:
236
+ # `projects/{project}/locations/{location}/apps/{app}`
237
+ # @param evaluations [::Array<::String>]
238
+ # Optional. List of evaluations to run.
239
+ # Format:
240
+ # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}`
241
+ # @param evaluation_dataset [::String]
242
+ # Optional. An evaluation dataset to run.
243
+ # Format:
244
+ # `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}`
245
+ # @param display_name [::String]
246
+ # Optional. The display name of the evaluation run.
247
+ # @param app_version [::String]
248
+ # Optional. The app version to evaluate.
249
+ # Format:
250
+ # `projects/{project}/locations/{location}/apps/{app}/versions/{version}`
251
+ # @param config [::Google::Cloud::Ces::V1beta::EvaluationConfig, ::Hash]
252
+ # Optional. The configuration to use for the run.
253
+ # @param run_count [::Integer]
254
+ # Optional. The number of times to run the evaluation. If not set, the
255
+ # default value is 1 per golden, and 5 per scenario.
256
+ # @param persona_run_configs [::Array<::Google::Cloud::Ces::V1beta::PersonaRunConfig, ::Hash>]
257
+ # Optional. The configuration to use for the run per persona.
258
+ # @param optimization_config [::Google::Cloud::Ces::V1beta::OptimizationConfig, ::Hash]
259
+ # Optional. Configuration for running the optimization step after the
260
+ # evaluation run. If not set, the optimization step will not be run.
261
+ # @param scheduled_evaluation_run [::String]
262
+ # Optional. The resource name of the `ScheduledEvaluationRun` that is
263
+ # triggering this evaluation run.
264
+ #
265
+ # If this field is set, the `scheduled_evaluation_run` field on the created
266
+ # `EvaluationRun` resource will be populated from this value.
267
+ # Format:
268
+ # `projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduled_evaluation_run}`
269
+ # @param golden_run_method [::Google::Cloud::Ces::V1beta::GoldenRunMethod]
270
+ # Optional. The method to run the evaluation if it is a golden evaluation. If
271
+ # not set, default to STABLE.
272
+ # @param generate_latency_report [::Boolean]
273
+ # Optional. Whether to generate a latency report for the evaluation run.
274
+ # @yield [result, operation] Access the result along with the TransportOperation object
275
+ # @yieldparam result [::Gapic::Operation]
276
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
277
+ #
278
+ # @return [::Gapic::Operation]
279
+ #
280
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
281
+ #
282
+ # @example Basic example
283
+ # require "google/cloud/ces/v1beta"
284
+ #
285
+ # # Create a client object. The client can be reused for multiple calls.
286
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
287
+ #
288
+ # # Create a request. To set request fields, pass in keyword arguments.
289
+ # request = Google::Cloud::Ces::V1beta::RunEvaluationRequest.new
290
+ #
291
+ # # Call the run_evaluation method.
292
+ # result = client.run_evaluation request
293
+ #
294
+ # # The returned object is of type Gapic::Operation. You can use it to
295
+ # # check the status of an operation, cancel it, or wait for results.
296
+ # # Here is how to wait for a response.
297
+ # result.wait_until_done! timeout: 60
298
+ # if result.response?
299
+ # p result.response
300
+ # else
301
+ # puts "No response received."
302
+ # end
303
+ #
304
+ def run_evaluation request, options = nil
305
+ raise ::ArgumentError, "request must be provided" if request.nil?
306
+
307
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunEvaluationRequest
308
+
309
+ # Converts hash and nil to an options object
310
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
311
+
312
+ # Customize the options with defaults
313
+ call_metadata = @config.rpcs.run_evaluation.metadata.to_h
314
+
315
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
316
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
317
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
318
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
319
+ transports_version_send: [:rest]
320
+
321
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
322
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
323
+
324
+ options.apply_defaults timeout: @config.rpcs.run_evaluation.timeout,
325
+ metadata: call_metadata,
326
+ retry_policy: @config.rpcs.run_evaluation.retry_policy
327
+
328
+ options.apply_defaults timeout: @config.timeout,
329
+ metadata: @config.metadata,
330
+ retry_policy: @config.retry_policy
331
+
332
+ @evaluation_service_stub.run_evaluation request, options do |result, operation|
333
+ result = ::Gapic::Operation.new result, @operations_client, options: options
334
+ yield result, operation if block_given?
335
+ throw :response, result
336
+ end
337
+ rescue ::Gapic::Rest::Error => e
338
+ raise ::Google::Cloud::Error.from_error(e)
339
+ end
340
+
341
+ ##
342
+ # Uploads audio for use in Golden Evaluations. Stores the audio in the Cloud
343
+ # Storage bucket defined in
344
+ # 'App.logging_settings.evaluation_audio_recording_config.gcs_bucket' and
345
+ # returns a transcript.
346
+ #
347
+ # @overload upload_evaluation_audio(request, options = nil)
348
+ # Pass arguments to `upload_evaluation_audio` via a request object, either of type
349
+ # {::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest} or an equivalent Hash.
350
+ #
351
+ # @param request [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest, ::Hash]
352
+ # A request object representing the call parameters. Required. To specify no
353
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
354
+ # @param options [::Gapic::CallOptions, ::Hash]
355
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
356
+ #
357
+ # @overload upload_evaluation_audio(name: nil, audio_content: nil, previous_audio_gcs_uri: nil)
358
+ # Pass arguments to `upload_evaluation_audio` via keyword arguments. Note that at
359
+ # least one keyword argument is required. To specify no parameters, or to keep all
360
+ # the default parameter values, pass an empty Hash as a request object (see above).
361
+ #
362
+ # @param name [::String]
363
+ # Required. The resource name of the Evaluation for which to upload the
364
+ # evaluation audio. Format:
365
+ # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}`
366
+ # @param audio_content [::String]
367
+ # Required. The raw audio bytes.
368
+ # The format of the audio must be single-channel LINEAR16 with a sample
369
+ # rate of 16kHz (default InputAudioConfig).
370
+ # @param previous_audio_gcs_uri [::String]
371
+ # Optional. The Google Cloud Storage URI of the previously uploaded audio
372
+ # file to be deleted. Format: `gs://<bucket-name>/<object-name>`
373
+ # @yield [result, operation] Access the result along with the TransportOperation object
374
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse]
375
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
376
+ #
377
+ # @return [::Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse]
378
+ #
379
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
380
+ #
381
+ # @example Basic example
382
+ # require "google/cloud/ces/v1beta"
383
+ #
384
+ # # Create a client object. The client can be reused for multiple calls.
385
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
386
+ #
387
+ # # Create a request. To set request fields, pass in keyword arguments.
388
+ # request = Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest.new
389
+ #
390
+ # # Call the upload_evaluation_audio method.
391
+ # result = client.upload_evaluation_audio request
392
+ #
393
+ # # The returned object is of type Google::Cloud::Ces::V1beta::UploadEvaluationAudioResponse.
394
+ # p result
395
+ #
396
+ def upload_evaluation_audio request, options = nil
397
+ raise ::ArgumentError, "request must be provided" if request.nil?
398
+
399
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UploadEvaluationAudioRequest
400
+
401
+ # Converts hash and nil to an options object
402
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
403
+
404
+ # Customize the options with defaults
405
+ call_metadata = @config.rpcs.upload_evaluation_audio.metadata.to_h
406
+
407
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
408
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
409
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
410
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
411
+ transports_version_send: [:rest]
412
+
413
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
414
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
415
+
416
+ options.apply_defaults timeout: @config.rpcs.upload_evaluation_audio.timeout,
417
+ metadata: call_metadata,
418
+ retry_policy: @config.rpcs.upload_evaluation_audio.retry_policy
419
+
420
+ options.apply_defaults timeout: @config.timeout,
421
+ metadata: @config.metadata,
422
+ retry_policy: @config.retry_policy
423
+
424
+ @evaluation_service_stub.upload_evaluation_audio request, options do |result, operation|
425
+ yield result, operation if block_given?
426
+ end
427
+ rescue ::Gapic::Rest::Error => e
428
+ raise ::Google::Cloud::Error.from_error(e)
429
+ end
430
+
431
+ ##
432
+ # Creates an evaluation.
433
+ #
434
+ # @overload create_evaluation(request, options = nil)
435
+ # Pass arguments to `create_evaluation` via a request object, either of type
436
+ # {::Google::Cloud::Ces::V1beta::CreateEvaluationRequest} or an equivalent Hash.
437
+ #
438
+ # @param request [::Google::Cloud::Ces::V1beta::CreateEvaluationRequest, ::Hash]
439
+ # A request object representing the call parameters. Required. To specify no
440
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
441
+ # @param options [::Gapic::CallOptions, ::Hash]
442
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
443
+ #
444
+ # @overload create_evaluation(parent: nil, evaluation_id: nil, evaluation: nil)
445
+ # Pass arguments to `create_evaluation` via keyword arguments. Note that at
446
+ # least one keyword argument is required. To specify no parameters, or to keep all
447
+ # the default parameter values, pass an empty Hash as a request object (see above).
448
+ #
449
+ # @param parent [::String]
450
+ # Required. The app to create the evaluation for.
451
+ # Format:
452
+ # `projects/{project}/locations/{location}/apps/{app}`
453
+ # @param evaluation_id [::String]
454
+ # Optional. The ID to use for the evaluation, which will become the final
455
+ # component of the evaluation's resource name. If not provided, a unique ID
456
+ # will be automatically assigned for the evaluation.
457
+ # @param evaluation [::Google::Cloud::Ces::V1beta::Evaluation, ::Hash]
458
+ # Required. The evaluation to create.
459
+ # @yield [result, operation] Access the result along with the TransportOperation object
460
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::Evaluation]
461
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
462
+ #
463
+ # @return [::Google::Cloud::Ces::V1beta::Evaluation]
464
+ #
465
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
466
+ #
467
+ # @example Basic example
468
+ # require "google/cloud/ces/v1beta"
469
+ #
470
+ # # Create a client object. The client can be reused for multiple calls.
471
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
472
+ #
473
+ # # Create a request. To set request fields, pass in keyword arguments.
474
+ # request = Google::Cloud::Ces::V1beta::CreateEvaluationRequest.new
475
+ #
476
+ # # Call the create_evaluation method.
477
+ # result = client.create_evaluation request
478
+ #
479
+ # # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation.
480
+ # p result
481
+ #
482
+ def create_evaluation request, options = nil
483
+ raise ::ArgumentError, "request must be provided" if request.nil?
484
+
485
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationRequest
486
+
487
+ # Converts hash and nil to an options object
488
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
489
+
490
+ # Customize the options with defaults
491
+ call_metadata = @config.rpcs.create_evaluation.metadata.to_h
492
+
493
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
494
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
495
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
496
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
497
+ transports_version_send: [:rest]
498
+
499
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
500
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
501
+
502
+ options.apply_defaults timeout: @config.rpcs.create_evaluation.timeout,
503
+ metadata: call_metadata,
504
+ retry_policy: @config.rpcs.create_evaluation.retry_policy
505
+
506
+ options.apply_defaults timeout: @config.timeout,
507
+ metadata: @config.metadata,
508
+ retry_policy: @config.retry_policy
509
+
510
+ @evaluation_service_stub.create_evaluation request, options do |result, operation|
511
+ yield result, operation if block_given?
512
+ end
513
+ rescue ::Gapic::Rest::Error => e
514
+ raise ::Google::Cloud::Error.from_error(e)
515
+ end
516
+
517
+ ##
518
+ # Creates a golden evaluation from a conversation.
519
+ #
520
+ # @overload generate_evaluation(request, options = nil)
521
+ # Pass arguments to `generate_evaluation` via a request object, either of type
522
+ # {::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest} or an equivalent Hash.
523
+ #
524
+ # @param request [::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest, ::Hash]
525
+ # A request object representing the call parameters. Required. To specify no
526
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
527
+ # @param options [::Gapic::CallOptions, ::Hash]
528
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
529
+ #
530
+ # @overload generate_evaluation(conversation: nil, source: nil)
531
+ # Pass arguments to `generate_evaluation` via keyword arguments. Note that at
532
+ # least one keyword argument is required. To specify no parameters, or to keep all
533
+ # the default parameter values, pass an empty Hash as a request object (see above).
534
+ #
535
+ # @param conversation [::String]
536
+ # Required. The conversation to create the golden evaluation for.
537
+ # Format:
538
+ # `projects/{project}/locations/{location}/apps/{app}/conversations/{conversation}`
539
+ # @param source [::Google::Cloud::Ces::V1beta::Conversation::Source]
540
+ # Optional. Indicate the source of the conversation. If not set, all sources
541
+ # will be searched.
542
+ # @yield [result, operation] Access the result along with the TransportOperation object
543
+ # @yieldparam result [::Gapic::Operation]
544
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
545
+ #
546
+ # @return [::Gapic::Operation]
547
+ #
548
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
549
+ #
550
+ # @example Basic example
551
+ # require "google/cloud/ces/v1beta"
552
+ #
553
+ # # Create a client object. The client can be reused for multiple calls.
554
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
555
+ #
556
+ # # Create a request. To set request fields, pass in keyword arguments.
557
+ # request = Google::Cloud::Ces::V1beta::GenerateEvaluationRequest.new
558
+ #
559
+ # # Call the generate_evaluation method.
560
+ # result = client.generate_evaluation request
561
+ #
562
+ # # The returned object is of type Gapic::Operation. You can use it to
563
+ # # check the status of an operation, cancel it, or wait for results.
564
+ # # Here is how to wait for a response.
565
+ # result.wait_until_done! timeout: 60
566
+ # if result.response?
567
+ # p result.response
568
+ # else
569
+ # puts "No response received."
570
+ # end
571
+ #
572
+ def generate_evaluation request, options = nil
573
+ raise ::ArgumentError, "request must be provided" if request.nil?
574
+
575
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GenerateEvaluationRequest
576
+
577
+ # Converts hash and nil to an options object
578
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
579
+
580
+ # Customize the options with defaults
581
+ call_metadata = @config.rpcs.generate_evaluation.metadata.to_h
582
+
583
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
584
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
585
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
586
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
587
+ transports_version_send: [:rest]
588
+
589
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
590
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
591
+
592
+ options.apply_defaults timeout: @config.rpcs.generate_evaluation.timeout,
593
+ metadata: call_metadata,
594
+ retry_policy: @config.rpcs.generate_evaluation.retry_policy
595
+
596
+ options.apply_defaults timeout: @config.timeout,
597
+ metadata: @config.metadata,
598
+ retry_policy: @config.retry_policy
599
+
600
+ @evaluation_service_stub.generate_evaluation request, options do |result, operation|
601
+ result = ::Gapic::Operation.new result, @operations_client, options: options
602
+ yield result, operation if block_given?
603
+ throw :response, result
604
+ end
605
+ rescue ::Gapic::Rest::Error => e
606
+ raise ::Google::Cloud::Error.from_error(e)
607
+ end
608
+
609
+ ##
610
+ # Imports evaluations into the app.
611
+ #
612
+ # @overload import_evaluations(request, options = nil)
613
+ # Pass arguments to `import_evaluations` via a request object, either of type
614
+ # {::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest} or an equivalent Hash.
615
+ #
616
+ # @param request [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest, ::Hash]
617
+ # A request object representing the call parameters. Required. To specify no
618
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
619
+ # @param options [::Gapic::CallOptions, ::Hash]
620
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
621
+ #
622
+ # @overload import_evaluations(conversation_list: nil, gcs_uri: nil, csv_content: nil, parent: nil, import_options: nil)
623
+ # Pass arguments to `import_evaluations` via keyword arguments. Note that at
624
+ # least one keyword argument is required. To specify no parameters, or to keep all
625
+ # the default parameter values, pass an empty Hash as a request object (see above).
626
+ #
627
+ # @param conversation_list [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ConversationList, ::Hash]
628
+ # The conversations to import the evaluations from.
629
+ #
630
+ # Note: The following parameters are mutually exclusive: `conversation_list`, `gcs_uri`, `csv_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
631
+ # @param gcs_uri [::String]
632
+ # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
633
+ # from which to import evaluations. The format of this URI must be
634
+ # `gs://<bucket-name>/<object-name>`.
635
+ #
636
+ # Note: The following parameters are mutually exclusive: `gcs_uri`, `conversation_list`, `csv_content`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
637
+ # @param csv_content [::String]
638
+ # Raw bytes representing the csv file with the evaluations structure.
639
+ #
640
+ # Note: The following parameters are mutually exclusive: `csv_content`, `conversation_list`, `gcs_uri`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.
641
+ # @param parent [::String]
642
+ # Required. The app to import the evaluations into.
643
+ # Format:
644
+ # `projects/{project}/locations/{location}/apps/{app}`
645
+ # @param import_options [::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest::ImportOptions, ::Hash]
646
+ # Optional. Options governing the import process for the evaluations.
647
+ # @yield [result, operation] Access the result along with the TransportOperation object
648
+ # @yieldparam result [::Gapic::Operation]
649
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
650
+ #
651
+ # @return [::Gapic::Operation]
652
+ #
653
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
654
+ #
655
+ # @example Basic example
656
+ # require "google/cloud/ces/v1beta"
657
+ #
658
+ # # Create a client object. The client can be reused for multiple calls.
659
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
660
+ #
661
+ # # Create a request. To set request fields, pass in keyword arguments.
662
+ # request = Google::Cloud::Ces::V1beta::ImportEvaluationsRequest.new
663
+ #
664
+ # # Call the import_evaluations method.
665
+ # result = client.import_evaluations request
666
+ #
667
+ # # The returned object is of type Gapic::Operation. You can use it to
668
+ # # check the status of an operation, cancel it, or wait for results.
669
+ # # Here is how to wait for a response.
670
+ # result.wait_until_done! timeout: 60
671
+ # if result.response?
672
+ # p result.response
673
+ # else
674
+ # puts "No response received."
675
+ # end
676
+ #
677
+ def import_evaluations request, options = nil
678
+ raise ::ArgumentError, "request must be provided" if request.nil?
679
+
680
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ImportEvaluationsRequest
681
+
682
+ # Converts hash and nil to an options object
683
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
684
+
685
+ # Customize the options with defaults
686
+ call_metadata = @config.rpcs.import_evaluations.metadata.to_h
687
+
688
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
689
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
690
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
691
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
692
+ transports_version_send: [:rest]
693
+
694
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
695
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
696
+
697
+ options.apply_defaults timeout: @config.rpcs.import_evaluations.timeout,
698
+ metadata: call_metadata,
699
+ retry_policy: @config.rpcs.import_evaluations.retry_policy
700
+
701
+ options.apply_defaults timeout: @config.timeout,
702
+ metadata: @config.metadata,
703
+ retry_policy: @config.retry_policy
704
+
705
+ @evaluation_service_stub.import_evaluations request, options do |result, operation|
706
+ result = ::Gapic::Operation.new result, @operations_client, options: options
707
+ yield result, operation if block_given?
708
+ throw :response, result
709
+ end
710
+ rescue ::Gapic::Rest::Error => e
711
+ raise ::Google::Cloud::Error.from_error(e)
712
+ end
713
+
714
+ ##
715
+ # Creates an evaluation dataset.
716
+ #
717
+ # @overload create_evaluation_dataset(request, options = nil)
718
+ # Pass arguments to `create_evaluation_dataset` via a request object, either of type
719
+ # {::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest} or an equivalent Hash.
720
+ #
721
+ # @param request [::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest, ::Hash]
722
+ # A request object representing the call parameters. Required. To specify no
723
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
724
+ # @param options [::Gapic::CallOptions, ::Hash]
725
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
726
+ #
727
+ # @overload create_evaluation_dataset(parent: nil, evaluation_dataset_id: nil, evaluation_dataset: nil)
728
+ # Pass arguments to `create_evaluation_dataset` via keyword arguments. Note that at
729
+ # least one keyword argument is required. To specify no parameters, or to keep all
730
+ # the default parameter values, pass an empty Hash as a request object (see above).
731
+ #
732
+ # @param parent [::String]
733
+ # Required. The app to create the evaluation for.
734
+ # Format:
735
+ # `projects/{project}/locations/{location}/apps/{app}`
736
+ # @param evaluation_dataset_id [::String]
737
+ # Optional. The ID to use for the evaluation dataset, which will become the
738
+ # final component of the evaluation dataset's resource name. If not provided,
739
+ # a unique ID will be automatically assigned for the evaluation.
740
+ # @param evaluation_dataset [::Google::Cloud::Ces::V1beta::EvaluationDataset, ::Hash]
741
+ # Required. The evaluation dataset to create.
742
+ # @yield [result, operation] Access the result along with the TransportOperation object
743
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationDataset]
744
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
745
+ #
746
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset]
747
+ #
748
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
749
+ #
750
+ # @example Basic example
751
+ # require "google/cloud/ces/v1beta"
752
+ #
753
+ # # Create a client object. The client can be reused for multiple calls.
754
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
755
+ #
756
+ # # Create a request. To set request fields, pass in keyword arguments.
757
+ # request = Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest.new
758
+ #
759
+ # # Call the create_evaluation_dataset method.
760
+ # result = client.create_evaluation_dataset request
761
+ #
762
+ # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset.
763
+ # p result
764
+ #
765
+ def create_evaluation_dataset request, options = nil
766
+ raise ::ArgumentError, "request must be provided" if request.nil?
767
+
768
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationDatasetRequest
769
+
770
+ # Converts hash and nil to an options object
771
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
772
+
773
+ # Customize the options with defaults
774
+ call_metadata = @config.rpcs.create_evaluation_dataset.metadata.to_h
775
+
776
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
777
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
778
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
779
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
780
+ transports_version_send: [:rest]
781
+
782
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
783
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
784
+
785
+ options.apply_defaults timeout: @config.rpcs.create_evaluation_dataset.timeout,
786
+ metadata: call_metadata,
787
+ retry_policy: @config.rpcs.create_evaluation_dataset.retry_policy
788
+
789
+ options.apply_defaults timeout: @config.timeout,
790
+ metadata: @config.metadata,
791
+ retry_policy: @config.retry_policy
792
+
793
+ @evaluation_service_stub.create_evaluation_dataset request, options do |result, operation|
794
+ yield result, operation if block_given?
795
+ end
796
+ rescue ::Gapic::Rest::Error => e
797
+ raise ::Google::Cloud::Error.from_error(e)
798
+ end
799
+
800
+ ##
801
+ # Updates an evaluation.
802
+ #
803
+ # @overload update_evaluation(request, options = nil)
804
+ # Pass arguments to `update_evaluation` via a request object, either of type
805
+ # {::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest} or an equivalent Hash.
806
+ #
807
+ # @param request [::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest, ::Hash]
808
+ # A request object representing the call parameters. Required. To specify no
809
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
810
+ # @param options [::Gapic::CallOptions, ::Hash]
811
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
812
+ #
813
+ # @overload update_evaluation(evaluation: nil, update_mask: nil)
814
+ # Pass arguments to `update_evaluation` via keyword arguments. Note that at
815
+ # least one keyword argument is required. To specify no parameters, or to keep all
816
+ # the default parameter values, pass an empty Hash as a request object (see above).
817
+ #
818
+ # @param evaluation [::Google::Cloud::Ces::V1beta::Evaluation, ::Hash]
819
+ # Required. The evaluation to update.
820
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
821
+ # Optional. Field mask is used to control which fields get updated. If the
822
+ # mask is not present, all fields will be updated.
823
+ # @yield [result, operation] Access the result along with the TransportOperation object
824
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::Evaluation]
825
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
826
+ #
827
+ # @return [::Google::Cloud::Ces::V1beta::Evaluation]
828
+ #
829
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
830
+ #
831
+ # @example Basic example
832
+ # require "google/cloud/ces/v1beta"
833
+ #
834
+ # # Create a client object. The client can be reused for multiple calls.
835
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
836
+ #
837
+ # # Create a request. To set request fields, pass in keyword arguments.
838
+ # request = Google::Cloud::Ces::V1beta::UpdateEvaluationRequest.new
839
+ #
840
+ # # Call the update_evaluation method.
841
+ # result = client.update_evaluation request
842
+ #
843
+ # # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation.
844
+ # p result
845
+ #
846
+ def update_evaluation request, options = nil
847
+ raise ::ArgumentError, "request must be provided" if request.nil?
848
+
849
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationRequest
850
+
851
+ # Converts hash and nil to an options object
852
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
853
+
854
+ # Customize the options with defaults
855
+ call_metadata = @config.rpcs.update_evaluation.metadata.to_h
856
+
857
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
858
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
859
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
860
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
861
+ transports_version_send: [:rest]
862
+
863
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
864
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
865
+
866
+ options.apply_defaults timeout: @config.rpcs.update_evaluation.timeout,
867
+ metadata: call_metadata,
868
+ retry_policy: @config.rpcs.update_evaluation.retry_policy
869
+
870
+ options.apply_defaults timeout: @config.timeout,
871
+ metadata: @config.metadata,
872
+ retry_policy: @config.retry_policy
873
+
874
+ @evaluation_service_stub.update_evaluation request, options do |result, operation|
875
+ yield result, operation if block_given?
876
+ end
877
+ rescue ::Gapic::Rest::Error => e
878
+ raise ::Google::Cloud::Error.from_error(e)
879
+ end
880
+
881
+ ##
882
+ # Updates an evaluation dataset.
883
+ #
884
+ # @overload update_evaluation_dataset(request, options = nil)
885
+ # Pass arguments to `update_evaluation_dataset` via a request object, either of type
886
+ # {::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest} or an equivalent Hash.
887
+ #
888
+ # @param request [::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest, ::Hash]
889
+ # A request object representing the call parameters. Required. To specify no
890
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
891
+ # @param options [::Gapic::CallOptions, ::Hash]
892
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
893
+ #
894
+ # @overload update_evaluation_dataset(evaluation_dataset: nil, update_mask: nil)
895
+ # Pass arguments to `update_evaluation_dataset` via keyword arguments. Note that at
896
+ # least one keyword argument is required. To specify no parameters, or to keep all
897
+ # the default parameter values, pass an empty Hash as a request object (see above).
898
+ #
899
+ # @param evaluation_dataset [::Google::Cloud::Ces::V1beta::EvaluationDataset, ::Hash]
900
+ # Required. The evaluation dataset to update.
901
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
902
+ # Optional. Field mask is used to control which fields get updated. If the
903
+ # mask is not present, all fields will be updated.
904
+ # @yield [result, operation] Access the result along with the TransportOperation object
905
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationDataset]
906
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
907
+ #
908
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset]
909
+ #
910
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
911
+ #
912
+ # @example Basic example
913
+ # require "google/cloud/ces/v1beta"
914
+ #
915
+ # # Create a client object. The client can be reused for multiple calls.
916
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
917
+ #
918
+ # # Create a request. To set request fields, pass in keyword arguments.
919
+ # request = Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest.new
920
+ #
921
+ # # Call the update_evaluation_dataset method.
922
+ # result = client.update_evaluation_dataset request
923
+ #
924
+ # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset.
925
+ # p result
926
+ #
927
+ def update_evaluation_dataset request, options = nil
928
+ raise ::ArgumentError, "request must be provided" if request.nil?
929
+
930
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationDatasetRequest
931
+
932
+ # Converts hash and nil to an options object
933
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
934
+
935
+ # Customize the options with defaults
936
+ call_metadata = @config.rpcs.update_evaluation_dataset.metadata.to_h
937
+
938
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
939
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
940
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
941
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
942
+ transports_version_send: [:rest]
943
+
944
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
945
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
946
+
947
+ options.apply_defaults timeout: @config.rpcs.update_evaluation_dataset.timeout,
948
+ metadata: call_metadata,
949
+ retry_policy: @config.rpcs.update_evaluation_dataset.retry_policy
950
+
951
+ options.apply_defaults timeout: @config.timeout,
952
+ metadata: @config.metadata,
953
+ retry_policy: @config.retry_policy
954
+
955
+ @evaluation_service_stub.update_evaluation_dataset request, options do |result, operation|
956
+ yield result, operation if block_given?
957
+ end
958
+ rescue ::Gapic::Rest::Error => e
959
+ raise ::Google::Cloud::Error.from_error(e)
960
+ end
961
+
962
+ ##
963
+ # Deletes an evaluation.
964
+ #
965
+ # @overload delete_evaluation(request, options = nil)
966
+ # Pass arguments to `delete_evaluation` via a request object, either of type
967
+ # {::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest} or an equivalent Hash.
968
+ #
969
+ # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest, ::Hash]
970
+ # A request object representing the call parameters. Required. To specify no
971
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
972
+ # @param options [::Gapic::CallOptions, ::Hash]
973
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
974
+ #
975
+ # @overload delete_evaluation(name: nil, force: nil, etag: nil)
976
+ # Pass arguments to `delete_evaluation` via keyword arguments. Note that at
977
+ # least one keyword argument is required. To specify no parameters, or to keep all
978
+ # the default parameter values, pass an empty Hash as a request object (see above).
979
+ #
980
+ # @param name [::String]
981
+ # Required. The resource name of the evaluation to delete.
982
+ # @param force [::Boolean]
983
+ # Optional. Indicates whether to forcefully delete the evaluation, even if it
984
+ # is still referenced by evaluation datasets.
985
+ #
986
+ # * If `force = false`, the deletion will fail if any datasets still
987
+ # reference the evaluation.
988
+ # * If `force = true`, all existing references from datasets will be removed
989
+ # and the evaluation will be deleted.
990
+ # @param etag [::String]
991
+ # Optional. The current etag of the evaluation. If an etag is not provided,
992
+ # the deletion will overwrite any concurrent changes. If an etag is provided
993
+ # and does not match the current etag of the evaluation, deletion will be
994
+ # blocked and an ABORTED error will be returned.
995
+ # @yield [result, operation] Access the result along with the TransportOperation object
996
+ # @yieldparam result [::Google::Protobuf::Empty]
997
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
998
+ #
999
+ # @return [::Google::Protobuf::Empty]
1000
+ #
1001
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1002
+ #
1003
+ # @example Basic example
1004
+ # require "google/cloud/ces/v1beta"
1005
+ #
1006
+ # # Create a client object. The client can be reused for multiple calls.
1007
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
1008
+ #
1009
+ # # Create a request. To set request fields, pass in keyword arguments.
1010
+ # request = Google::Cloud::Ces::V1beta::DeleteEvaluationRequest.new
1011
+ #
1012
+ # # Call the delete_evaluation method.
1013
+ # result = client.delete_evaluation request
1014
+ #
1015
+ # # The returned object is of type Google::Protobuf::Empty.
1016
+ # p result
1017
+ #
1018
+ def delete_evaluation request, options = nil
1019
+ raise ::ArgumentError, "request must be provided" if request.nil?
1020
+
1021
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationRequest
1022
+
1023
+ # Converts hash and nil to an options object
1024
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1025
+
1026
+ # Customize the options with defaults
1027
+ call_metadata = @config.rpcs.delete_evaluation.metadata.to_h
1028
+
1029
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1030
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1031
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1032
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
1033
+ transports_version_send: [:rest]
1034
+
1035
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1036
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1037
+
1038
+ options.apply_defaults timeout: @config.rpcs.delete_evaluation.timeout,
1039
+ metadata: call_metadata,
1040
+ retry_policy: @config.rpcs.delete_evaluation.retry_policy
1041
+
1042
+ options.apply_defaults timeout: @config.timeout,
1043
+ metadata: @config.metadata,
1044
+ retry_policy: @config.retry_policy
1045
+
1046
+ @evaluation_service_stub.delete_evaluation request, options do |result, operation|
1047
+ yield result, operation if block_given?
1048
+ end
1049
+ rescue ::Gapic::Rest::Error => e
1050
+ raise ::Google::Cloud::Error.from_error(e)
1051
+ end
1052
+
1053
+ ##
1054
+ # Deletes an evaluation result.
1055
+ #
1056
+ # @overload delete_evaluation_result(request, options = nil)
1057
+ # Pass arguments to `delete_evaluation_result` via a request object, either of type
1058
+ # {::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest} or an equivalent Hash.
1059
+ #
1060
+ # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest, ::Hash]
1061
+ # A request object representing the call parameters. Required. To specify no
1062
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1063
+ # @param options [::Gapic::CallOptions, ::Hash]
1064
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1065
+ #
1066
+ # @overload delete_evaluation_result(name: nil)
1067
+ # Pass arguments to `delete_evaluation_result` via keyword arguments. Note that at
1068
+ # least one keyword argument is required. To specify no parameters, or to keep all
1069
+ # the default parameter values, pass an empty Hash as a request object (see above).
1070
+ #
1071
+ # @param name [::String]
1072
+ # Required. The resource name of the evaluation result to delete.
1073
+ # @yield [result, operation] Access the result along with the TransportOperation object
1074
+ # @yieldparam result [::Google::Protobuf::Empty]
1075
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1076
+ #
1077
+ # @return [::Google::Protobuf::Empty]
1078
+ #
1079
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1080
+ #
1081
+ # @example Basic example
1082
+ # require "google/cloud/ces/v1beta"
1083
+ #
1084
+ # # Create a client object. The client can be reused for multiple calls.
1085
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
1086
+ #
1087
+ # # Create a request. To set request fields, pass in keyword arguments.
1088
+ # request = Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest.new
1089
+ #
1090
+ # # Call the delete_evaluation_result method.
1091
+ # result = client.delete_evaluation_result request
1092
+ #
1093
+ # # The returned object is of type Google::Protobuf::Empty.
1094
+ # p result
1095
+ #
1096
+ def delete_evaluation_result request, options = nil
1097
+ raise ::ArgumentError, "request must be provided" if request.nil?
1098
+
1099
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationResultRequest
1100
+
1101
+ # Converts hash and nil to an options object
1102
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1103
+
1104
+ # Customize the options with defaults
1105
+ call_metadata = @config.rpcs.delete_evaluation_result.metadata.to_h
1106
+
1107
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1108
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1109
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1110
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
1111
+ transports_version_send: [:rest]
1112
+
1113
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1114
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1115
+
1116
+ options.apply_defaults timeout: @config.rpcs.delete_evaluation_result.timeout,
1117
+ metadata: call_metadata,
1118
+ retry_policy: @config.rpcs.delete_evaluation_result.retry_policy
1119
+
1120
+ options.apply_defaults timeout: @config.timeout,
1121
+ metadata: @config.metadata,
1122
+ retry_policy: @config.retry_policy
1123
+
1124
+ @evaluation_service_stub.delete_evaluation_result request, options do |result, operation|
1125
+ yield result, operation if block_given?
1126
+ end
1127
+ rescue ::Gapic::Rest::Error => e
1128
+ raise ::Google::Cloud::Error.from_error(e)
1129
+ end
1130
+
1131
+ ##
1132
+ # Deletes an evaluation dataset.
1133
+ #
1134
+ # @overload delete_evaluation_dataset(request, options = nil)
1135
+ # Pass arguments to `delete_evaluation_dataset` via a request object, either of type
1136
+ # {::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest} or an equivalent Hash.
1137
+ #
1138
+ # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest, ::Hash]
1139
+ # A request object representing the call parameters. Required. To specify no
1140
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1141
+ # @param options [::Gapic::CallOptions, ::Hash]
1142
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1143
+ #
1144
+ # @overload delete_evaluation_dataset(name: nil, etag: nil)
1145
+ # Pass arguments to `delete_evaluation_dataset` via keyword arguments. Note that at
1146
+ # least one keyword argument is required. To specify no parameters, or to keep all
1147
+ # the default parameter values, pass an empty Hash as a request object (see above).
1148
+ #
1149
+ # @param name [::String]
1150
+ # Required. The resource name of the evaluation dataset to delete.
1151
+ # @param etag [::String]
1152
+ # Optional. The current etag of the evaluation dataset. If an etag is not
1153
+ # provided, the deletion will overwrite any concurrent changes. If an etag is
1154
+ # provided and does not match the current etag of the evaluation dataset,
1155
+ # deletion will be blocked and an ABORTED error will be returned.
1156
+ # @yield [result, operation] Access the result along with the TransportOperation object
1157
+ # @yieldparam result [::Google::Protobuf::Empty]
1158
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1159
+ #
1160
+ # @return [::Google::Protobuf::Empty]
1161
+ #
1162
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1163
+ #
1164
+ # @example Basic example
1165
+ # require "google/cloud/ces/v1beta"
1166
+ #
1167
+ # # Create a client object. The client can be reused for multiple calls.
1168
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
1169
+ #
1170
+ # # Create a request. To set request fields, pass in keyword arguments.
1171
+ # request = Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest.new
1172
+ #
1173
+ # # Call the delete_evaluation_dataset method.
1174
+ # result = client.delete_evaluation_dataset request
1175
+ #
1176
+ # # The returned object is of type Google::Protobuf::Empty.
1177
+ # p result
1178
+ #
1179
+ def delete_evaluation_dataset request, options = nil
1180
+ raise ::ArgumentError, "request must be provided" if request.nil?
1181
+
1182
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationDatasetRequest
1183
+
1184
+ # Converts hash and nil to an options object
1185
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1186
+
1187
+ # Customize the options with defaults
1188
+ call_metadata = @config.rpcs.delete_evaluation_dataset.metadata.to_h
1189
+
1190
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1191
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1192
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1193
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
1194
+ transports_version_send: [:rest]
1195
+
1196
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1197
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1198
+
1199
+ options.apply_defaults timeout: @config.rpcs.delete_evaluation_dataset.timeout,
1200
+ metadata: call_metadata,
1201
+ retry_policy: @config.rpcs.delete_evaluation_dataset.retry_policy
1202
+
1203
+ options.apply_defaults timeout: @config.timeout,
1204
+ metadata: @config.metadata,
1205
+ retry_policy: @config.retry_policy
1206
+
1207
+ @evaluation_service_stub.delete_evaluation_dataset request, options do |result, operation|
1208
+ yield result, operation if block_given?
1209
+ end
1210
+ rescue ::Gapic::Rest::Error => e
1211
+ raise ::Google::Cloud::Error.from_error(e)
1212
+ end
1213
+
1214
+ ##
1215
+ # Deletes an evaluation run.
1216
+ #
1217
+ # @overload delete_evaluation_run(request, options = nil)
1218
+ # Pass arguments to `delete_evaluation_run` via a request object, either of type
1219
+ # {::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest} or an equivalent Hash.
1220
+ #
1221
+ # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest, ::Hash]
1222
+ # A request object representing the call parameters. Required. To specify no
1223
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1224
+ # @param options [::Gapic::CallOptions, ::Hash]
1225
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1226
+ #
1227
+ # @overload delete_evaluation_run(name: nil)
1228
+ # Pass arguments to `delete_evaluation_run` via keyword arguments. Note that at
1229
+ # least one keyword argument is required. To specify no parameters, or to keep all
1230
+ # the default parameter values, pass an empty Hash as a request object (see above).
1231
+ #
1232
+ # @param name [::String]
1233
+ # Required. The resource name of the evaluation run to delete.
1234
+ # @yield [result, operation] Access the result along with the TransportOperation object
1235
+ # @yieldparam result [::Gapic::Operation]
1236
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1237
+ #
1238
+ # @return [::Gapic::Operation]
1239
+ #
1240
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1241
+ #
1242
+ # @example Basic example
1243
+ # require "google/cloud/ces/v1beta"
1244
+ #
1245
+ # # Create a client object. The client can be reused for multiple calls.
1246
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
1247
+ #
1248
+ # # Create a request. To set request fields, pass in keyword arguments.
1249
+ # request = Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest.new
1250
+ #
1251
+ # # Call the delete_evaluation_run method.
1252
+ # result = client.delete_evaluation_run request
1253
+ #
1254
+ # # The returned object is of type Gapic::Operation. You can use it to
1255
+ # # check the status of an operation, cancel it, or wait for results.
1256
+ # # Here is how to wait for a response.
1257
+ # result.wait_until_done! timeout: 60
1258
+ # if result.response?
1259
+ # p result.response
1260
+ # else
1261
+ # puts "No response received."
1262
+ # end
1263
+ #
1264
+ def delete_evaluation_run request, options = nil
1265
+ raise ::ArgumentError, "request must be provided" if request.nil?
1266
+
1267
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationRunRequest
1268
+
1269
+ # Converts hash and nil to an options object
1270
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1271
+
1272
+ # Customize the options with defaults
1273
+ call_metadata = @config.rpcs.delete_evaluation_run.metadata.to_h
1274
+
1275
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1276
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1277
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1278
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
1279
+ transports_version_send: [:rest]
1280
+
1281
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1282
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1283
+
1284
+ options.apply_defaults timeout: @config.rpcs.delete_evaluation_run.timeout,
1285
+ metadata: call_metadata,
1286
+ retry_policy: @config.rpcs.delete_evaluation_run.retry_policy
1287
+
1288
+ options.apply_defaults timeout: @config.timeout,
1289
+ metadata: @config.metadata,
1290
+ retry_policy: @config.retry_policy
1291
+
1292
+ @evaluation_service_stub.delete_evaluation_run request, options do |result, operation|
1293
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1294
+ yield result, operation if block_given?
1295
+ throw :response, result
1296
+ end
1297
+ rescue ::Gapic::Rest::Error => e
1298
+ raise ::Google::Cloud::Error.from_error(e)
1299
+ end
1300
+
1301
+ ##
1302
+ # Gets details of the specified evaluation.
1303
+ #
1304
+ # @overload get_evaluation(request, options = nil)
1305
+ # Pass arguments to `get_evaluation` via a request object, either of type
1306
+ # {::Google::Cloud::Ces::V1beta::GetEvaluationRequest} or an equivalent Hash.
1307
+ #
1308
+ # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationRequest, ::Hash]
1309
+ # A request object representing the call parameters. Required. To specify no
1310
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1311
+ # @param options [::Gapic::CallOptions, ::Hash]
1312
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1313
+ #
1314
+ # @overload get_evaluation(name: nil)
1315
+ # Pass arguments to `get_evaluation` via keyword arguments. Note that at
1316
+ # least one keyword argument is required. To specify no parameters, or to keep all
1317
+ # the default parameter values, pass an empty Hash as a request object (see above).
1318
+ #
1319
+ # @param name [::String]
1320
+ # Required. The resource name of the evaluation to retrieve.
1321
+ # @yield [result, operation] Access the result along with the TransportOperation object
1322
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::Evaluation]
1323
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1324
+ #
1325
+ # @return [::Google::Cloud::Ces::V1beta::Evaluation]
1326
+ #
1327
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1328
+ #
1329
+ # @example Basic example
1330
+ # require "google/cloud/ces/v1beta"
1331
+ #
1332
+ # # Create a client object. The client can be reused for multiple calls.
1333
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
1334
+ #
1335
+ # # Create a request. To set request fields, pass in keyword arguments.
1336
+ # request = Google::Cloud::Ces::V1beta::GetEvaluationRequest.new
1337
+ #
1338
+ # # Call the get_evaluation method.
1339
+ # result = client.get_evaluation request
1340
+ #
1341
+ # # The returned object is of type Google::Cloud::Ces::V1beta::Evaluation.
1342
+ # p result
1343
+ #
1344
+ def get_evaluation request, options = nil
1345
+ raise ::ArgumentError, "request must be provided" if request.nil?
1346
+
1347
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationRequest
1348
+
1349
+ # Converts hash and nil to an options object
1350
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1351
+
1352
+ # Customize the options with defaults
1353
+ call_metadata = @config.rpcs.get_evaluation.metadata.to_h
1354
+
1355
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1356
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1357
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1358
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
1359
+ transports_version_send: [:rest]
1360
+
1361
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1362
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1363
+
1364
+ options.apply_defaults timeout: @config.rpcs.get_evaluation.timeout,
1365
+ metadata: call_metadata,
1366
+ retry_policy: @config.rpcs.get_evaluation.retry_policy
1367
+
1368
+ options.apply_defaults timeout: @config.timeout,
1369
+ metadata: @config.metadata,
1370
+ retry_policy: @config.retry_policy
1371
+
1372
+ @evaluation_service_stub.get_evaluation request, options do |result, operation|
1373
+ yield result, operation if block_given?
1374
+ end
1375
+ rescue ::Gapic::Rest::Error => e
1376
+ raise ::Google::Cloud::Error.from_error(e)
1377
+ end
1378
+
1379
+ ##
1380
+ # Gets details of the specified evaluation result.
1381
+ #
1382
+ # @overload get_evaluation_result(request, options = nil)
1383
+ # Pass arguments to `get_evaluation_result` via a request object, either of type
1384
+ # {::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest} or an equivalent Hash.
1385
+ #
1386
+ # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest, ::Hash]
1387
+ # A request object representing the call parameters. Required. To specify no
1388
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1389
+ # @param options [::Gapic::CallOptions, ::Hash]
1390
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1391
+ #
1392
+ # @overload get_evaluation_result(name: nil)
1393
+ # Pass arguments to `get_evaluation_result` via keyword arguments. Note that at
1394
+ # least one keyword argument is required. To specify no parameters, or to keep all
1395
+ # the default parameter values, pass an empty Hash as a request object (see above).
1396
+ #
1397
+ # @param name [::String]
1398
+ # Required. The resource name of the evaluation result to retrieve.
1399
+ # @yield [result, operation] Access the result along with the TransportOperation object
1400
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationResult]
1401
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1402
+ #
1403
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationResult]
1404
+ #
1405
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1406
+ #
1407
+ # @example Basic example
1408
+ # require "google/cloud/ces/v1beta"
1409
+ #
1410
+ # # Create a client object. The client can be reused for multiple calls.
1411
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
1412
+ #
1413
+ # # Create a request. To set request fields, pass in keyword arguments.
1414
+ # request = Google::Cloud::Ces::V1beta::GetEvaluationResultRequest.new
1415
+ #
1416
+ # # Call the get_evaluation_result method.
1417
+ # result = client.get_evaluation_result request
1418
+ #
1419
+ # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationResult.
1420
+ # p result
1421
+ #
1422
+ def get_evaluation_result request, options = nil
1423
+ raise ::ArgumentError, "request must be provided" if request.nil?
1424
+
1425
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationResultRequest
1426
+
1427
+ # Converts hash and nil to an options object
1428
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1429
+
1430
+ # Customize the options with defaults
1431
+ call_metadata = @config.rpcs.get_evaluation_result.metadata.to_h
1432
+
1433
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1434
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1435
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1436
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
1437
+ transports_version_send: [:rest]
1438
+
1439
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1440
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1441
+
1442
+ options.apply_defaults timeout: @config.rpcs.get_evaluation_result.timeout,
1443
+ metadata: call_metadata,
1444
+ retry_policy: @config.rpcs.get_evaluation_result.retry_policy
1445
+
1446
+ options.apply_defaults timeout: @config.timeout,
1447
+ metadata: @config.metadata,
1448
+ retry_policy: @config.retry_policy
1449
+
1450
+ @evaluation_service_stub.get_evaluation_result request, options do |result, operation|
1451
+ yield result, operation if block_given?
1452
+ end
1453
+ rescue ::Gapic::Rest::Error => e
1454
+ raise ::Google::Cloud::Error.from_error(e)
1455
+ end
1456
+
1457
+ ##
1458
+ # Gets details of the specified evaluation dataset.
1459
+ #
1460
+ # @overload get_evaluation_dataset(request, options = nil)
1461
+ # Pass arguments to `get_evaluation_dataset` via a request object, either of type
1462
+ # {::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest} or an equivalent Hash.
1463
+ #
1464
+ # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest, ::Hash]
1465
+ # A request object representing the call parameters. Required. To specify no
1466
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1467
+ # @param options [::Gapic::CallOptions, ::Hash]
1468
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1469
+ #
1470
+ # @overload get_evaluation_dataset(name: nil)
1471
+ # Pass arguments to `get_evaluation_dataset` via keyword arguments. Note that at
1472
+ # least one keyword argument is required. To specify no parameters, or to keep all
1473
+ # the default parameter values, pass an empty Hash as a request object (see above).
1474
+ #
1475
+ # @param name [::String]
1476
+ # Required. The resource name of the evaluation dataset to retrieve.
1477
+ # @yield [result, operation] Access the result along with the TransportOperation object
1478
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationDataset]
1479
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1480
+ #
1481
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationDataset]
1482
+ #
1483
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1484
+ #
1485
+ # @example Basic example
1486
+ # require "google/cloud/ces/v1beta"
1487
+ #
1488
+ # # Create a client object. The client can be reused for multiple calls.
1489
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
1490
+ #
1491
+ # # Create a request. To set request fields, pass in keyword arguments.
1492
+ # request = Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest.new
1493
+ #
1494
+ # # Call the get_evaluation_dataset method.
1495
+ # result = client.get_evaluation_dataset request
1496
+ #
1497
+ # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationDataset.
1498
+ # p result
1499
+ #
1500
+ def get_evaluation_dataset request, options = nil
1501
+ raise ::ArgumentError, "request must be provided" if request.nil?
1502
+
1503
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationDatasetRequest
1504
+
1505
+ # Converts hash and nil to an options object
1506
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1507
+
1508
+ # Customize the options with defaults
1509
+ call_metadata = @config.rpcs.get_evaluation_dataset.metadata.to_h
1510
+
1511
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1512
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1513
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1514
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
1515
+ transports_version_send: [:rest]
1516
+
1517
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1518
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1519
+
1520
+ options.apply_defaults timeout: @config.rpcs.get_evaluation_dataset.timeout,
1521
+ metadata: call_metadata,
1522
+ retry_policy: @config.rpcs.get_evaluation_dataset.retry_policy
1523
+
1524
+ options.apply_defaults timeout: @config.timeout,
1525
+ metadata: @config.metadata,
1526
+ retry_policy: @config.retry_policy
1527
+
1528
+ @evaluation_service_stub.get_evaluation_dataset request, options do |result, operation|
1529
+ yield result, operation if block_given?
1530
+ end
1531
+ rescue ::Gapic::Rest::Error => e
1532
+ raise ::Google::Cloud::Error.from_error(e)
1533
+ end
1534
+
1535
+ ##
1536
+ # Gets details of the specified evaluation run.
1537
+ #
1538
+ # @overload get_evaluation_run(request, options = nil)
1539
+ # Pass arguments to `get_evaluation_run` via a request object, either of type
1540
+ # {::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest} or an equivalent Hash.
1541
+ #
1542
+ # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest, ::Hash]
1543
+ # A request object representing the call parameters. Required. To specify no
1544
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1545
+ # @param options [::Gapic::CallOptions, ::Hash]
1546
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1547
+ #
1548
+ # @overload get_evaluation_run(name: nil)
1549
+ # Pass arguments to `get_evaluation_run` via keyword arguments. Note that at
1550
+ # least one keyword argument is required. To specify no parameters, or to keep all
1551
+ # the default parameter values, pass an empty Hash as a request object (see above).
1552
+ #
1553
+ # @param name [::String]
1554
+ # Required. The resource name of the evaluation run to retrieve.
1555
+ # @yield [result, operation] Access the result along with the TransportOperation object
1556
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationRun]
1557
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1558
+ #
1559
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationRun]
1560
+ #
1561
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1562
+ #
1563
+ # @example Basic example
1564
+ # require "google/cloud/ces/v1beta"
1565
+ #
1566
+ # # Create a client object. The client can be reused for multiple calls.
1567
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
1568
+ #
1569
+ # # Create a request. To set request fields, pass in keyword arguments.
1570
+ # request = Google::Cloud::Ces::V1beta::GetEvaluationRunRequest.new
1571
+ #
1572
+ # # Call the get_evaluation_run method.
1573
+ # result = client.get_evaluation_run request
1574
+ #
1575
+ # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationRun.
1576
+ # p result
1577
+ #
1578
+ def get_evaluation_run request, options = nil
1579
+ raise ::ArgumentError, "request must be provided" if request.nil?
1580
+
1581
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationRunRequest
1582
+
1583
+ # Converts hash and nil to an options object
1584
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1585
+
1586
+ # Customize the options with defaults
1587
+ call_metadata = @config.rpcs.get_evaluation_run.metadata.to_h
1588
+
1589
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1590
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1591
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1592
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
1593
+ transports_version_send: [:rest]
1594
+
1595
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1596
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1597
+
1598
+ options.apply_defaults timeout: @config.rpcs.get_evaluation_run.timeout,
1599
+ metadata: call_metadata,
1600
+ retry_policy: @config.rpcs.get_evaluation_run.retry_policy
1601
+
1602
+ options.apply_defaults timeout: @config.timeout,
1603
+ metadata: @config.metadata,
1604
+ retry_policy: @config.retry_policy
1605
+
1606
+ @evaluation_service_stub.get_evaluation_run request, options do |result, operation|
1607
+ yield result, operation if block_given?
1608
+ end
1609
+ rescue ::Gapic::Rest::Error => e
1610
+ raise ::Google::Cloud::Error.from_error(e)
1611
+ end
1612
+
1613
+ ##
1614
+ # Lists all evaluations in the given app.
1615
+ #
1616
+ # @overload list_evaluations(request, options = nil)
1617
+ # Pass arguments to `list_evaluations` via a request object, either of type
1618
+ # {::Google::Cloud::Ces::V1beta::ListEvaluationsRequest} or an equivalent Hash.
1619
+ #
1620
+ # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationsRequest, ::Hash]
1621
+ # A request object representing the call parameters. Required. To specify no
1622
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1623
+ # @param options [::Gapic::CallOptions, ::Hash]
1624
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1625
+ #
1626
+ # @overload list_evaluations(parent: nil, page_size: nil, page_token: nil, filter: nil, evaluation_filter: nil, evaluation_run_filter: nil, order_by: nil, last_ten_results: nil)
1627
+ # Pass arguments to `list_evaluations` via keyword arguments. Note that at
1628
+ # least one keyword argument is required. To specify no parameters, or to keep all
1629
+ # the default parameter values, pass an empty Hash as a request object (see above).
1630
+ #
1631
+ # @param parent [::String]
1632
+ # Required. The resource name of the app to list evaluations from.
1633
+ # @param page_size [::Integer]
1634
+ # Optional. Requested page size. Server may return fewer items than
1635
+ # requested. If unspecified, server will pick an appropriate default.
1636
+ # @param page_token [::String]
1637
+ # Optional. The
1638
+ # {::Google::Cloud::Ces::V1beta::ListEvaluationsResponse#next_page_token next_page_token}
1639
+ # value returned from a previous list
1640
+ # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_evaluations EvaluationService.ListEvaluations}
1641
+ # call.
1642
+ # @param filter [::String]
1643
+ # Optional. Deprecated: Use evaluation_filter and evaluation_run_filter
1644
+ # instead.
1645
+ # @param evaluation_filter [::String]
1646
+ # Optional. Filter to be applied on the evaluation when listing the
1647
+ # evaluations. See https://google.aip.dev/160 for more details. Supported
1648
+ # fields: evaluation_datasets
1649
+ # @param evaluation_run_filter [::String]
1650
+ # Optional. Filter string for fields on the associated EvaluationRun
1651
+ # resources. See https://google.aip.dev/160 for more details. Supported
1652
+ # fields: create_time, initiated_by, app_version_display_name
1653
+ # @param order_by [::String]
1654
+ # Optional. Field to sort by. Only "name" and "create_time", and
1655
+ # "update_time" are supported. Time fields are ordered in descending order,
1656
+ # and the name field is ordered in ascending order. If not included,
1657
+ # "update_time" will be the default. See https://google.aip.dev/132#ordering
1658
+ # for more details.
1659
+ # @param last_ten_results [::Boolean]
1660
+ # Optional. Whether to include the last 10 evaluation results for each
1661
+ # evaluation in the response.
1662
+ # @yield [result, operation] Access the result along with the TransportOperation object
1663
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Evaluation>]
1664
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1665
+ #
1666
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::Evaluation>]
1667
+ #
1668
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1669
+ #
1670
+ # @example Basic example
1671
+ # require "google/cloud/ces/v1beta"
1672
+ #
1673
+ # # Create a client object. The client can be reused for multiple calls.
1674
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
1675
+ #
1676
+ # # Create a request. To set request fields, pass in keyword arguments.
1677
+ # request = Google::Cloud::Ces::V1beta::ListEvaluationsRequest.new
1678
+ #
1679
+ # # Call the list_evaluations method.
1680
+ # result = client.list_evaluations request
1681
+ #
1682
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1683
+ # # over elements, and API calls will be issued to fetch pages as needed.
1684
+ # result.each do |item|
1685
+ # # Each element is of type ::Google::Cloud::Ces::V1beta::Evaluation.
1686
+ # p item
1687
+ # end
1688
+ #
1689
+ def list_evaluations request, options = nil
1690
+ raise ::ArgumentError, "request must be provided" if request.nil?
1691
+
1692
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationsRequest
1693
+
1694
+ # Converts hash and nil to an options object
1695
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1696
+
1697
+ # Customize the options with defaults
1698
+ call_metadata = @config.rpcs.list_evaluations.metadata.to_h
1699
+
1700
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1701
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1702
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1703
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
1704
+ transports_version_send: [:rest]
1705
+
1706
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1707
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1708
+
1709
+ options.apply_defaults timeout: @config.rpcs.list_evaluations.timeout,
1710
+ metadata: call_metadata,
1711
+ retry_policy: @config.rpcs.list_evaluations.retry_policy
1712
+
1713
+ options.apply_defaults timeout: @config.timeout,
1714
+ metadata: @config.metadata,
1715
+ retry_policy: @config.retry_policy
1716
+
1717
+ @evaluation_service_stub.list_evaluations request, options do |result, operation|
1718
+ result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_evaluations, "evaluations", request, result, options
1719
+ yield result, operation if block_given?
1720
+ throw :response, result
1721
+ end
1722
+ rescue ::Gapic::Rest::Error => e
1723
+ raise ::Google::Cloud::Error.from_error(e)
1724
+ end
1725
+
1726
+ ##
1727
+ # Lists all evaluation results for a given evaluation.
1728
+ #
1729
+ # @overload list_evaluation_results(request, options = nil)
1730
+ # Pass arguments to `list_evaluation_results` via a request object, either of type
1731
+ # {::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest} or an equivalent Hash.
1732
+ #
1733
+ # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest, ::Hash]
1734
+ # A request object representing the call parameters. Required. To specify no
1735
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1736
+ # @param options [::Gapic::CallOptions, ::Hash]
1737
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1738
+ #
1739
+ # @overload list_evaluation_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1740
+ # Pass arguments to `list_evaluation_results` via keyword arguments. Note that at
1741
+ # least one keyword argument is required. To specify no parameters, or to keep all
1742
+ # the default parameter values, pass an empty Hash as a request object (see above).
1743
+ #
1744
+ # @param parent [::String]
1745
+ # Required. The resource name of the evaluation to list evaluation results
1746
+ # from. To filter by evaluation run, use `-` as the evaluation ID and specify
1747
+ # the evaluation run ID in the filter. For example:
1748
+ # `projects/{project}/locations/{location}/apps/{app}/evaluations/-`
1749
+ # @param page_size [::Integer]
1750
+ # Optional. Requested page size. Server may return fewer items than
1751
+ # requested. If unspecified, server will pick an appropriate default.
1752
+ # @param page_token [::String]
1753
+ # Optional. The
1754
+ # {::Google::Cloud::Ces::V1beta::ListEvaluationResultsResponse#next_page_token next_page_token}
1755
+ # value returned from a previous list
1756
+ # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_evaluation_results EvaluationService.ListEvaluationResults}
1757
+ # call.
1758
+ # @param filter [::String]
1759
+ # Optional. Filter to be applied when listing the evaluation results.
1760
+ # See https://google.aip.dev/160 for more details.
1761
+ # @param order_by [::String]
1762
+ # Optional. Field to sort by. Only "name" and "create_time", and
1763
+ # "update_time" are supported. Time fields are ordered in descending order,
1764
+ # and the name field is ordered in ascending order. If not included,
1765
+ # "update_time" will be the default. See https://google.aip.dev/132#ordering
1766
+ # for more details.
1767
+ # @yield [result, operation] Access the result along with the TransportOperation object
1768
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationResult>]
1769
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1770
+ #
1771
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationResult>]
1772
+ #
1773
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1774
+ #
1775
+ # @example Basic example
1776
+ # require "google/cloud/ces/v1beta"
1777
+ #
1778
+ # # Create a client object. The client can be reused for multiple calls.
1779
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
1780
+ #
1781
+ # # Create a request. To set request fields, pass in keyword arguments.
1782
+ # request = Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest.new
1783
+ #
1784
+ # # Call the list_evaluation_results method.
1785
+ # result = client.list_evaluation_results request
1786
+ #
1787
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1788
+ # # over elements, and API calls will be issued to fetch pages as needed.
1789
+ # result.each do |item|
1790
+ # # Each element is of type ::Google::Cloud::Ces::V1beta::EvaluationResult.
1791
+ # p item
1792
+ # end
1793
+ #
1794
+ def list_evaluation_results request, options = nil
1795
+ raise ::ArgumentError, "request must be provided" if request.nil?
1796
+
1797
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationResultsRequest
1798
+
1799
+ # Converts hash and nil to an options object
1800
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1801
+
1802
+ # Customize the options with defaults
1803
+ call_metadata = @config.rpcs.list_evaluation_results.metadata.to_h
1804
+
1805
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1806
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1807
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1808
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
1809
+ transports_version_send: [:rest]
1810
+
1811
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1812
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1813
+
1814
+ options.apply_defaults timeout: @config.rpcs.list_evaluation_results.timeout,
1815
+ metadata: call_metadata,
1816
+ retry_policy: @config.rpcs.list_evaluation_results.retry_policy
1817
+
1818
+ options.apply_defaults timeout: @config.timeout,
1819
+ metadata: @config.metadata,
1820
+ retry_policy: @config.retry_policy
1821
+
1822
+ @evaluation_service_stub.list_evaluation_results request, options do |result, operation|
1823
+ result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_results, "evaluation_results", request, result, options
1824
+ yield result, operation if block_given?
1825
+ throw :response, result
1826
+ end
1827
+ rescue ::Gapic::Rest::Error => e
1828
+ raise ::Google::Cloud::Error.from_error(e)
1829
+ end
1830
+
1831
+ ##
1832
+ # Lists all evaluation datasets in the given app.
1833
+ #
1834
+ # @overload list_evaluation_datasets(request, options = nil)
1835
+ # Pass arguments to `list_evaluation_datasets` via a request object, either of type
1836
+ # {::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest} or an equivalent Hash.
1837
+ #
1838
+ # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest, ::Hash]
1839
+ # A request object representing the call parameters. Required. To specify no
1840
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1841
+ # @param options [::Gapic::CallOptions, ::Hash]
1842
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1843
+ #
1844
+ # @overload list_evaluation_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1845
+ # Pass arguments to `list_evaluation_datasets` via keyword arguments. Note that at
1846
+ # least one keyword argument is required. To specify no parameters, or to keep all
1847
+ # the default parameter values, pass an empty Hash as a request object (see above).
1848
+ #
1849
+ # @param parent [::String]
1850
+ # Required. The resource name of the app to list evaluation datasets from.
1851
+ # @param page_size [::Integer]
1852
+ # Optional. Requested page size. Server may return fewer items than
1853
+ # requested. If unspecified, server will pick an appropriate default.
1854
+ # @param page_token [::String]
1855
+ # Optional. The
1856
+ # {::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsResponse#next_page_token next_page_token}
1857
+ # value returned from a previous list
1858
+ # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_evaluation_datasets EvaluationService.ListEvaluationDatasets}
1859
+ # call.
1860
+ # @param filter [::String]
1861
+ # Optional. Filter to be applied when listing the evaluation datasets.
1862
+ # See https://google.aip.dev/160 for more details.
1863
+ # @param order_by [::String]
1864
+ # Optional. Field to sort by. Only "name" and "create_time", and
1865
+ # "update_time" are supported. Time fields are ordered in descending order,
1866
+ # and the name field is ordered in ascending order. If not included,
1867
+ # "update_time" will be the default. See https://google.aip.dev/132#ordering
1868
+ # for more details.
1869
+ # @yield [result, operation] Access the result along with the TransportOperation object
1870
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationDataset>]
1871
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1872
+ #
1873
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationDataset>]
1874
+ #
1875
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1876
+ #
1877
+ # @example Basic example
1878
+ # require "google/cloud/ces/v1beta"
1879
+ #
1880
+ # # Create a client object. The client can be reused for multiple calls.
1881
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
1882
+ #
1883
+ # # Create a request. To set request fields, pass in keyword arguments.
1884
+ # request = Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest.new
1885
+ #
1886
+ # # Call the list_evaluation_datasets method.
1887
+ # result = client.list_evaluation_datasets request
1888
+ #
1889
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1890
+ # # over elements, and API calls will be issued to fetch pages as needed.
1891
+ # result.each do |item|
1892
+ # # Each element is of type ::Google::Cloud::Ces::V1beta::EvaluationDataset.
1893
+ # p item
1894
+ # end
1895
+ #
1896
+ def list_evaluation_datasets request, options = nil
1897
+ raise ::ArgumentError, "request must be provided" if request.nil?
1898
+
1899
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationDatasetsRequest
1900
+
1901
+ # Converts hash and nil to an options object
1902
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1903
+
1904
+ # Customize the options with defaults
1905
+ call_metadata = @config.rpcs.list_evaluation_datasets.metadata.to_h
1906
+
1907
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1908
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1909
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1910
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
1911
+ transports_version_send: [:rest]
1912
+
1913
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1914
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1915
+
1916
+ options.apply_defaults timeout: @config.rpcs.list_evaluation_datasets.timeout,
1917
+ metadata: call_metadata,
1918
+ retry_policy: @config.rpcs.list_evaluation_datasets.retry_policy
1919
+
1920
+ options.apply_defaults timeout: @config.timeout,
1921
+ metadata: @config.metadata,
1922
+ retry_policy: @config.retry_policy
1923
+
1924
+ @evaluation_service_stub.list_evaluation_datasets request, options do |result, operation|
1925
+ result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_datasets, "evaluation_datasets", request, result, options
1926
+ yield result, operation if block_given?
1927
+ throw :response, result
1928
+ end
1929
+ rescue ::Gapic::Rest::Error => e
1930
+ raise ::Google::Cloud::Error.from_error(e)
1931
+ end
1932
+
1933
+ ##
1934
+ # Lists all evaluation runs in the given app.
1935
+ #
1936
+ # @overload list_evaluation_runs(request, options = nil)
1937
+ # Pass arguments to `list_evaluation_runs` via a request object, either of type
1938
+ # {::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest} or an equivalent Hash.
1939
+ #
1940
+ # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest, ::Hash]
1941
+ # A request object representing the call parameters. Required. To specify no
1942
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1943
+ # @param options [::Gapic::CallOptions, ::Hash]
1944
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1945
+ #
1946
+ # @overload list_evaluation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1947
+ # Pass arguments to `list_evaluation_runs` via keyword arguments. Note that at
1948
+ # least one keyword argument is required. To specify no parameters, or to keep all
1949
+ # the default parameter values, pass an empty Hash as a request object (see above).
1950
+ #
1951
+ # @param parent [::String]
1952
+ # Required. The resource name of the app to list evaluation runs from.
1953
+ # @param page_size [::Integer]
1954
+ # Optional. Requested page size. Server may return fewer items than
1955
+ # requested. If unspecified, server will pick an appropriate default.
1956
+ # @param page_token [::String]
1957
+ # Optional. The
1958
+ # {::Google::Cloud::Ces::V1beta::ListEvaluationRunsResponse#next_page_token next_page_token}
1959
+ # value returned from a previous list
1960
+ # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_evaluation_runs EvaluationService.ListEvaluationRuns}
1961
+ # call.
1962
+ # @param filter [::String]
1963
+ # Optional. Filter to be applied when listing the evaluation runs.
1964
+ # See https://google.aip.dev/160 for more details.
1965
+ # @param order_by [::String]
1966
+ # Optional. Field to sort by. Only "name" and "create_time", and
1967
+ # "update_time" are supported. Time fields are ordered in descending order,
1968
+ # and the name field is ordered in ascending order. If not included,
1969
+ # "update_time" will be the default. See https://google.aip.dev/132#ordering
1970
+ # for more details.
1971
+ # @yield [result, operation] Access the result along with the TransportOperation object
1972
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationRun>]
1973
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1974
+ #
1975
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationRun>]
1976
+ #
1977
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1978
+ #
1979
+ # @example Basic example
1980
+ # require "google/cloud/ces/v1beta"
1981
+ #
1982
+ # # Create a client object. The client can be reused for multiple calls.
1983
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
1984
+ #
1985
+ # # Create a request. To set request fields, pass in keyword arguments.
1986
+ # request = Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest.new
1987
+ #
1988
+ # # Call the list_evaluation_runs method.
1989
+ # result = client.list_evaluation_runs request
1990
+ #
1991
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1992
+ # # over elements, and API calls will be issued to fetch pages as needed.
1993
+ # result.each do |item|
1994
+ # # Each element is of type ::Google::Cloud::Ces::V1beta::EvaluationRun.
1995
+ # p item
1996
+ # end
1997
+ #
1998
+ def list_evaluation_runs request, options = nil
1999
+ raise ::ArgumentError, "request must be provided" if request.nil?
2000
+
2001
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationRunsRequest
2002
+
2003
+ # Converts hash and nil to an options object
2004
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2005
+
2006
+ # Customize the options with defaults
2007
+ call_metadata = @config.rpcs.list_evaluation_runs.metadata.to_h
2008
+
2009
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2010
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2011
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2012
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
2013
+ transports_version_send: [:rest]
2014
+
2015
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2016
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2017
+
2018
+ options.apply_defaults timeout: @config.rpcs.list_evaluation_runs.timeout,
2019
+ metadata: call_metadata,
2020
+ retry_policy: @config.rpcs.list_evaluation_runs.retry_policy
2021
+
2022
+ options.apply_defaults timeout: @config.timeout,
2023
+ metadata: @config.metadata,
2024
+ retry_policy: @config.retry_policy
2025
+
2026
+ @evaluation_service_stub.list_evaluation_runs request, options do |result, operation|
2027
+ result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_runs, "evaluation_runs", request, result, options
2028
+ yield result, operation if block_given?
2029
+ throw :response, result
2030
+ end
2031
+ rescue ::Gapic::Rest::Error => e
2032
+ raise ::Google::Cloud::Error.from_error(e)
2033
+ end
2034
+
2035
+ ##
2036
+ # Lists all evaluation expectations in the given app.
2037
+ #
2038
+ # @overload list_evaluation_expectations(request, options = nil)
2039
+ # Pass arguments to `list_evaluation_expectations` via a request object, either of type
2040
+ # {::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest} or an equivalent Hash.
2041
+ #
2042
+ # @param request [::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest, ::Hash]
2043
+ # A request object representing the call parameters. Required. To specify no
2044
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2045
+ # @param options [::Gapic::CallOptions, ::Hash]
2046
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2047
+ #
2048
+ # @overload list_evaluation_expectations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2049
+ # Pass arguments to `list_evaluation_expectations` via keyword arguments. Note that at
2050
+ # least one keyword argument is required. To specify no parameters, or to keep all
2051
+ # the default parameter values, pass an empty Hash as a request object (see above).
2052
+ #
2053
+ # @param parent [::String]
2054
+ # Required. The resource name of the app to list evaluation expectations
2055
+ # from.
2056
+ # @param page_size [::Integer]
2057
+ # Optional. Requested page size. Server may return fewer items than
2058
+ # requested. If unspecified, server will pick an appropriate default.
2059
+ # @param page_token [::String]
2060
+ # Optional. The
2061
+ # {::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsResponse#next_page_token next_page_token}
2062
+ # value returned from a previous list
2063
+ # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_evaluation_expectations EvaluationService.ListEvaluationExpectations}
2064
+ # call.
2065
+ # @param filter [::String]
2066
+ # Optional. Filter to be applied when listing the evaluation expectations.
2067
+ # See https://google.aip.dev/160 for more details.
2068
+ # @param order_by [::String]
2069
+ # Optional. Field to sort by. Only "name" and "create_time", and
2070
+ # "update_time" are supported. Time fields are ordered in descending order,
2071
+ # and the name field is ordered in ascending order. If not included,
2072
+ # "update_time" will be the default. See https://google.aip.dev/132#ordering
2073
+ # for more details.
2074
+ # @yield [result, operation] Access the result along with the TransportOperation object
2075
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationExpectation>]
2076
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2077
+ #
2078
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::EvaluationExpectation>]
2079
+ #
2080
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2081
+ #
2082
+ # @example Basic example
2083
+ # require "google/cloud/ces/v1beta"
2084
+ #
2085
+ # # Create a client object. The client can be reused for multiple calls.
2086
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
2087
+ #
2088
+ # # Create a request. To set request fields, pass in keyword arguments.
2089
+ # request = Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest.new
2090
+ #
2091
+ # # Call the list_evaluation_expectations method.
2092
+ # result = client.list_evaluation_expectations request
2093
+ #
2094
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2095
+ # # over elements, and API calls will be issued to fetch pages as needed.
2096
+ # result.each do |item|
2097
+ # # Each element is of type ::Google::Cloud::Ces::V1beta::EvaluationExpectation.
2098
+ # p item
2099
+ # end
2100
+ #
2101
+ def list_evaluation_expectations request, options = nil
2102
+ raise ::ArgumentError, "request must be provided" if request.nil?
2103
+
2104
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListEvaluationExpectationsRequest
2105
+
2106
+ # Converts hash and nil to an options object
2107
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2108
+
2109
+ # Customize the options with defaults
2110
+ call_metadata = @config.rpcs.list_evaluation_expectations.metadata.to_h
2111
+
2112
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2113
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2114
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2115
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
2116
+ transports_version_send: [:rest]
2117
+
2118
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2119
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2120
+
2121
+ options.apply_defaults timeout: @config.rpcs.list_evaluation_expectations.timeout,
2122
+ metadata: call_metadata,
2123
+ retry_policy: @config.rpcs.list_evaluation_expectations.retry_policy
2124
+
2125
+ options.apply_defaults timeout: @config.timeout,
2126
+ metadata: @config.metadata,
2127
+ retry_policy: @config.retry_policy
2128
+
2129
+ @evaluation_service_stub.list_evaluation_expectations request, options do |result, operation|
2130
+ result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_evaluation_expectations, "evaluation_expectations", request, result, options
2131
+ yield result, operation if block_given?
2132
+ throw :response, result
2133
+ end
2134
+ rescue ::Gapic::Rest::Error => e
2135
+ raise ::Google::Cloud::Error.from_error(e)
2136
+ end
2137
+
2138
+ ##
2139
+ # Gets details of the specified evaluation expectation.
2140
+ #
2141
+ # @overload get_evaluation_expectation(request, options = nil)
2142
+ # Pass arguments to `get_evaluation_expectation` via a request object, either of type
2143
+ # {::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest} or an equivalent Hash.
2144
+ #
2145
+ # @param request [::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest, ::Hash]
2146
+ # A request object representing the call parameters. Required. To specify no
2147
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2148
+ # @param options [::Gapic::CallOptions, ::Hash]
2149
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2150
+ #
2151
+ # @overload get_evaluation_expectation(name: nil)
2152
+ # Pass arguments to `get_evaluation_expectation` via keyword arguments. Note that at
2153
+ # least one keyword argument is required. To specify no parameters, or to keep all
2154
+ # the default parameter values, pass an empty Hash as a request object (see above).
2155
+ #
2156
+ # @param name [::String]
2157
+ # Required. The resource name of the evaluation expectation to retrieve.
2158
+ # @yield [result, operation] Access the result along with the TransportOperation object
2159
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationExpectation]
2160
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2161
+ #
2162
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation]
2163
+ #
2164
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2165
+ #
2166
+ # @example Basic example
2167
+ # require "google/cloud/ces/v1beta"
2168
+ #
2169
+ # # Create a client object. The client can be reused for multiple calls.
2170
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
2171
+ #
2172
+ # # Create a request. To set request fields, pass in keyword arguments.
2173
+ # request = Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest.new
2174
+ #
2175
+ # # Call the get_evaluation_expectation method.
2176
+ # result = client.get_evaluation_expectation request
2177
+ #
2178
+ # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation.
2179
+ # p result
2180
+ #
2181
+ def get_evaluation_expectation request, options = nil
2182
+ raise ::ArgumentError, "request must be provided" if request.nil?
2183
+
2184
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetEvaluationExpectationRequest
2185
+
2186
+ # Converts hash and nil to an options object
2187
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2188
+
2189
+ # Customize the options with defaults
2190
+ call_metadata = @config.rpcs.get_evaluation_expectation.metadata.to_h
2191
+
2192
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2193
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2194
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2195
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
2196
+ transports_version_send: [:rest]
2197
+
2198
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2199
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2200
+
2201
+ options.apply_defaults timeout: @config.rpcs.get_evaluation_expectation.timeout,
2202
+ metadata: call_metadata,
2203
+ retry_policy: @config.rpcs.get_evaluation_expectation.retry_policy
2204
+
2205
+ options.apply_defaults timeout: @config.timeout,
2206
+ metadata: @config.metadata,
2207
+ retry_policy: @config.retry_policy
2208
+
2209
+ @evaluation_service_stub.get_evaluation_expectation request, options do |result, operation|
2210
+ yield result, operation if block_given?
2211
+ end
2212
+ rescue ::Gapic::Rest::Error => e
2213
+ raise ::Google::Cloud::Error.from_error(e)
2214
+ end
2215
+
2216
+ ##
2217
+ # Creates an evaluation expectation.
2218
+ #
2219
+ # @overload create_evaluation_expectation(request, options = nil)
2220
+ # Pass arguments to `create_evaluation_expectation` via a request object, either of type
2221
+ # {::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest} or an equivalent Hash.
2222
+ #
2223
+ # @param request [::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest, ::Hash]
2224
+ # A request object representing the call parameters. Required. To specify no
2225
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2226
+ # @param options [::Gapic::CallOptions, ::Hash]
2227
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2228
+ #
2229
+ # @overload create_evaluation_expectation(parent: nil, evaluation_expectation_id: nil, evaluation_expectation: nil)
2230
+ # Pass arguments to `create_evaluation_expectation` via keyword arguments. Note that at
2231
+ # least one keyword argument is required. To specify no parameters, or to keep all
2232
+ # the default parameter values, pass an empty Hash as a request object (see above).
2233
+ #
2234
+ # @param parent [::String]
2235
+ # Required. The app to create the evaluation expectation for.
2236
+ # Format:
2237
+ # `projects/{project}/locations/{location}/apps/{app}`
2238
+ # @param evaluation_expectation_id [::String]
2239
+ # Optional. The ID to use for the evaluation expectation, which will become
2240
+ # the final component of the evaluation expectation's resource name. If not
2241
+ # provided, a unique ID will be automatically assigned for the evaluation
2242
+ # expectation.
2243
+ # @param evaluation_expectation [::Google::Cloud::Ces::V1beta::EvaluationExpectation, ::Hash]
2244
+ # Required. The evaluation expectation to create.
2245
+ # @yield [result, operation] Access the result along with the TransportOperation object
2246
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationExpectation]
2247
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2248
+ #
2249
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation]
2250
+ #
2251
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2252
+ #
2253
+ # @example Basic example
2254
+ # require "google/cloud/ces/v1beta"
2255
+ #
2256
+ # # Create a client object. The client can be reused for multiple calls.
2257
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
2258
+ #
2259
+ # # Create a request. To set request fields, pass in keyword arguments.
2260
+ # request = Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest.new
2261
+ #
2262
+ # # Call the create_evaluation_expectation method.
2263
+ # result = client.create_evaluation_expectation request
2264
+ #
2265
+ # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation.
2266
+ # p result
2267
+ #
2268
+ def create_evaluation_expectation request, options = nil
2269
+ raise ::ArgumentError, "request must be provided" if request.nil?
2270
+
2271
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateEvaluationExpectationRequest
2272
+
2273
+ # Converts hash and nil to an options object
2274
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2275
+
2276
+ # Customize the options with defaults
2277
+ call_metadata = @config.rpcs.create_evaluation_expectation.metadata.to_h
2278
+
2279
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2280
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2281
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2282
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
2283
+ transports_version_send: [:rest]
2284
+
2285
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2286
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2287
+
2288
+ options.apply_defaults timeout: @config.rpcs.create_evaluation_expectation.timeout,
2289
+ metadata: call_metadata,
2290
+ retry_policy: @config.rpcs.create_evaluation_expectation.retry_policy
2291
+
2292
+ options.apply_defaults timeout: @config.timeout,
2293
+ metadata: @config.metadata,
2294
+ retry_policy: @config.retry_policy
2295
+
2296
+ @evaluation_service_stub.create_evaluation_expectation request, options do |result, operation|
2297
+ yield result, operation if block_given?
2298
+ end
2299
+ rescue ::Gapic::Rest::Error => e
2300
+ raise ::Google::Cloud::Error.from_error(e)
2301
+ end
2302
+
2303
+ ##
2304
+ # Updates an evaluation expectation.
2305
+ #
2306
+ # @overload update_evaluation_expectation(request, options = nil)
2307
+ # Pass arguments to `update_evaluation_expectation` via a request object, either of type
2308
+ # {::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest} or an equivalent Hash.
2309
+ #
2310
+ # @param request [::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest, ::Hash]
2311
+ # A request object representing the call parameters. Required. To specify no
2312
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2313
+ # @param options [::Gapic::CallOptions, ::Hash]
2314
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2315
+ #
2316
+ # @overload update_evaluation_expectation(evaluation_expectation: nil, update_mask: nil)
2317
+ # Pass arguments to `update_evaluation_expectation` via keyword arguments. Note that at
2318
+ # least one keyword argument is required. To specify no parameters, or to keep all
2319
+ # the default parameter values, pass an empty Hash as a request object (see above).
2320
+ #
2321
+ # @param evaluation_expectation [::Google::Cloud::Ces::V1beta::EvaluationExpectation, ::Hash]
2322
+ # Required. The evaluation expectation to update.
2323
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2324
+ # Optional. Field mask is used to control which fields get updated. If the
2325
+ # mask is not present, all fields will be updated.
2326
+ # @yield [result, operation] Access the result along with the TransportOperation object
2327
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::EvaluationExpectation]
2328
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2329
+ #
2330
+ # @return [::Google::Cloud::Ces::V1beta::EvaluationExpectation]
2331
+ #
2332
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2333
+ #
2334
+ # @example Basic example
2335
+ # require "google/cloud/ces/v1beta"
2336
+ #
2337
+ # # Create a client object. The client can be reused for multiple calls.
2338
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
2339
+ #
2340
+ # # Create a request. To set request fields, pass in keyword arguments.
2341
+ # request = Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest.new
2342
+ #
2343
+ # # Call the update_evaluation_expectation method.
2344
+ # result = client.update_evaluation_expectation request
2345
+ #
2346
+ # # The returned object is of type Google::Cloud::Ces::V1beta::EvaluationExpectation.
2347
+ # p result
2348
+ #
2349
+ def update_evaluation_expectation request, options = nil
2350
+ raise ::ArgumentError, "request must be provided" if request.nil?
2351
+
2352
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateEvaluationExpectationRequest
2353
+
2354
+ # Converts hash and nil to an options object
2355
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2356
+
2357
+ # Customize the options with defaults
2358
+ call_metadata = @config.rpcs.update_evaluation_expectation.metadata.to_h
2359
+
2360
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2361
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2362
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2363
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
2364
+ transports_version_send: [:rest]
2365
+
2366
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2367
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2368
+
2369
+ options.apply_defaults timeout: @config.rpcs.update_evaluation_expectation.timeout,
2370
+ metadata: call_metadata,
2371
+ retry_policy: @config.rpcs.update_evaluation_expectation.retry_policy
2372
+
2373
+ options.apply_defaults timeout: @config.timeout,
2374
+ metadata: @config.metadata,
2375
+ retry_policy: @config.retry_policy
2376
+
2377
+ @evaluation_service_stub.update_evaluation_expectation request, options do |result, operation|
2378
+ yield result, operation if block_given?
2379
+ end
2380
+ rescue ::Gapic::Rest::Error => e
2381
+ raise ::Google::Cloud::Error.from_error(e)
2382
+ end
2383
+
2384
+ ##
2385
+ # Deletes an evaluation expectation.
2386
+ #
2387
+ # @overload delete_evaluation_expectation(request, options = nil)
2388
+ # Pass arguments to `delete_evaluation_expectation` via a request object, either of type
2389
+ # {::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest} or an equivalent Hash.
2390
+ #
2391
+ # @param request [::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest, ::Hash]
2392
+ # A request object representing the call parameters. Required. To specify no
2393
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2394
+ # @param options [::Gapic::CallOptions, ::Hash]
2395
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2396
+ #
2397
+ # @overload delete_evaluation_expectation(name: nil, etag: nil)
2398
+ # Pass arguments to `delete_evaluation_expectation` via keyword arguments. Note that at
2399
+ # least one keyword argument is required. To specify no parameters, or to keep all
2400
+ # the default parameter values, pass an empty Hash as a request object (see above).
2401
+ #
2402
+ # @param name [::String]
2403
+ # Required. The resource name of the evaluation expectation to delete.
2404
+ # @param etag [::String]
2405
+ # Optional. The current etag of the evaluation expectation. If an etag is not
2406
+ # provided, the deletion will overwrite any concurrent changes. If an etag is
2407
+ # provided and does not match the current etag of the evaluation expectation,
2408
+ # deletion will be blocked and an ABORTED error will be returned.
2409
+ # @yield [result, operation] Access the result along with the TransportOperation object
2410
+ # @yieldparam result [::Google::Protobuf::Empty]
2411
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2412
+ #
2413
+ # @return [::Google::Protobuf::Empty]
2414
+ #
2415
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2416
+ #
2417
+ # @example Basic example
2418
+ # require "google/cloud/ces/v1beta"
2419
+ #
2420
+ # # Create a client object. The client can be reused for multiple calls.
2421
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
2422
+ #
2423
+ # # Create a request. To set request fields, pass in keyword arguments.
2424
+ # request = Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest.new
2425
+ #
2426
+ # # Call the delete_evaluation_expectation method.
2427
+ # result = client.delete_evaluation_expectation request
2428
+ #
2429
+ # # The returned object is of type Google::Protobuf::Empty.
2430
+ # p result
2431
+ #
2432
+ def delete_evaluation_expectation request, options = nil
2433
+ raise ::ArgumentError, "request must be provided" if request.nil?
2434
+
2435
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteEvaluationExpectationRequest
2436
+
2437
+ # Converts hash and nil to an options object
2438
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2439
+
2440
+ # Customize the options with defaults
2441
+ call_metadata = @config.rpcs.delete_evaluation_expectation.metadata.to_h
2442
+
2443
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2444
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2445
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2446
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
2447
+ transports_version_send: [:rest]
2448
+
2449
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2450
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2451
+
2452
+ options.apply_defaults timeout: @config.rpcs.delete_evaluation_expectation.timeout,
2453
+ metadata: call_metadata,
2454
+ retry_policy: @config.rpcs.delete_evaluation_expectation.retry_policy
2455
+
2456
+ options.apply_defaults timeout: @config.timeout,
2457
+ metadata: @config.metadata,
2458
+ retry_policy: @config.retry_policy
2459
+
2460
+ @evaluation_service_stub.delete_evaluation_expectation request, options do |result, operation|
2461
+ yield result, operation if block_given?
2462
+ end
2463
+ rescue ::Gapic::Rest::Error => e
2464
+ raise ::Google::Cloud::Error.from_error(e)
2465
+ end
2466
+
2467
+ ##
2468
+ # Creates a scheduled evaluation run.
2469
+ #
2470
+ # @overload create_scheduled_evaluation_run(request, options = nil)
2471
+ # Pass arguments to `create_scheduled_evaluation_run` via a request object, either of type
2472
+ # {::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest} or an equivalent Hash.
2473
+ #
2474
+ # @param request [::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest, ::Hash]
2475
+ # A request object representing the call parameters. Required. To specify no
2476
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2477
+ # @param options [::Gapic::CallOptions, ::Hash]
2478
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2479
+ #
2480
+ # @overload create_scheduled_evaluation_run(parent: nil, scheduled_evaluation_run_id: nil, scheduled_evaluation_run: nil)
2481
+ # Pass arguments to `create_scheduled_evaluation_run` via keyword arguments. Note that at
2482
+ # least one keyword argument is required. To specify no parameters, or to keep all
2483
+ # the default parameter values, pass an empty Hash as a request object (see above).
2484
+ #
2485
+ # @param parent [::String]
2486
+ # Required. The app to create the scheduled evaluation run for.
2487
+ # Format:
2488
+ # `projects/{project}/locations/{location}/apps/{app}`
2489
+ # @param scheduled_evaluation_run_id [::String]
2490
+ # Optional. The ID to use for the scheduled evaluation run, which will become
2491
+ # the final component of the scheduled evaluation run's resource name. If not
2492
+ # provided, a unique ID will be automatically assigned.
2493
+ # @param scheduled_evaluation_run [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun, ::Hash]
2494
+ # Required. The scheduled evaluation run to create.
2495
+ # @yield [result, operation] Access the result along with the TransportOperation object
2496
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun]
2497
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2498
+ #
2499
+ # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun]
2500
+ #
2501
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2502
+ #
2503
+ # @example Basic example
2504
+ # require "google/cloud/ces/v1beta"
2505
+ #
2506
+ # # Create a client object. The client can be reused for multiple calls.
2507
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
2508
+ #
2509
+ # # Create a request. To set request fields, pass in keyword arguments.
2510
+ # request = Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest.new
2511
+ #
2512
+ # # Call the create_scheduled_evaluation_run method.
2513
+ # result = client.create_scheduled_evaluation_run request
2514
+ #
2515
+ # # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.
2516
+ # p result
2517
+ #
2518
+ def create_scheduled_evaluation_run request, options = nil
2519
+ raise ::ArgumentError, "request must be provided" if request.nil?
2520
+
2521
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::CreateScheduledEvaluationRunRequest
2522
+
2523
+ # Converts hash and nil to an options object
2524
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2525
+
2526
+ # Customize the options with defaults
2527
+ call_metadata = @config.rpcs.create_scheduled_evaluation_run.metadata.to_h
2528
+
2529
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2530
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2531
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2532
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
2533
+ transports_version_send: [:rest]
2534
+
2535
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2536
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2537
+
2538
+ options.apply_defaults timeout: @config.rpcs.create_scheduled_evaluation_run.timeout,
2539
+ metadata: call_metadata,
2540
+ retry_policy: @config.rpcs.create_scheduled_evaluation_run.retry_policy
2541
+
2542
+ options.apply_defaults timeout: @config.timeout,
2543
+ metadata: @config.metadata,
2544
+ retry_policy: @config.retry_policy
2545
+
2546
+ @evaluation_service_stub.create_scheduled_evaluation_run request, options do |result, operation|
2547
+ yield result, operation if block_given?
2548
+ end
2549
+ rescue ::Gapic::Rest::Error => e
2550
+ raise ::Google::Cloud::Error.from_error(e)
2551
+ end
2552
+
2553
+ ##
2554
+ # Gets details of the specified scheduled evaluation run.
2555
+ #
2556
+ # @overload get_scheduled_evaluation_run(request, options = nil)
2557
+ # Pass arguments to `get_scheduled_evaluation_run` via a request object, either of type
2558
+ # {::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest} or an equivalent Hash.
2559
+ #
2560
+ # @param request [::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest, ::Hash]
2561
+ # A request object representing the call parameters. Required. To specify no
2562
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2563
+ # @param options [::Gapic::CallOptions, ::Hash]
2564
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2565
+ #
2566
+ # @overload get_scheduled_evaluation_run(name: nil)
2567
+ # Pass arguments to `get_scheduled_evaluation_run` via keyword arguments. Note that at
2568
+ # least one keyword argument is required. To specify no parameters, or to keep all
2569
+ # the default parameter values, pass an empty Hash as a request object (see above).
2570
+ #
2571
+ # @param name [::String]
2572
+ # Required. The resource name of the scheduled evaluation run to retrieve.
2573
+ # @yield [result, operation] Access the result along with the TransportOperation object
2574
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun]
2575
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2576
+ #
2577
+ # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun]
2578
+ #
2579
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2580
+ #
2581
+ # @example Basic example
2582
+ # require "google/cloud/ces/v1beta"
2583
+ #
2584
+ # # Create a client object. The client can be reused for multiple calls.
2585
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
2586
+ #
2587
+ # # Create a request. To set request fields, pass in keyword arguments.
2588
+ # request = Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest.new
2589
+ #
2590
+ # # Call the get_scheduled_evaluation_run method.
2591
+ # result = client.get_scheduled_evaluation_run request
2592
+ #
2593
+ # # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.
2594
+ # p result
2595
+ #
2596
+ def get_scheduled_evaluation_run request, options = nil
2597
+ raise ::ArgumentError, "request must be provided" if request.nil?
2598
+
2599
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::GetScheduledEvaluationRunRequest
2600
+
2601
+ # Converts hash and nil to an options object
2602
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2603
+
2604
+ # Customize the options with defaults
2605
+ call_metadata = @config.rpcs.get_scheduled_evaluation_run.metadata.to_h
2606
+
2607
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2608
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2609
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2610
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
2611
+ transports_version_send: [:rest]
2612
+
2613
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2614
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2615
+
2616
+ options.apply_defaults timeout: @config.rpcs.get_scheduled_evaluation_run.timeout,
2617
+ metadata: call_metadata,
2618
+ retry_policy: @config.rpcs.get_scheduled_evaluation_run.retry_policy
2619
+
2620
+ options.apply_defaults timeout: @config.timeout,
2621
+ metadata: @config.metadata,
2622
+ retry_policy: @config.retry_policy
2623
+
2624
+ @evaluation_service_stub.get_scheduled_evaluation_run request, options do |result, operation|
2625
+ yield result, operation if block_given?
2626
+ end
2627
+ rescue ::Gapic::Rest::Error => e
2628
+ raise ::Google::Cloud::Error.from_error(e)
2629
+ end
2630
+
2631
+ ##
2632
+ # Lists all scheduled evaluation runs in the given app.
2633
+ #
2634
+ # @overload list_scheduled_evaluation_runs(request, options = nil)
2635
+ # Pass arguments to `list_scheduled_evaluation_runs` via a request object, either of type
2636
+ # {::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest} or an equivalent Hash.
2637
+ #
2638
+ # @param request [::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest, ::Hash]
2639
+ # A request object representing the call parameters. Required. To specify no
2640
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2641
+ # @param options [::Gapic::CallOptions, ::Hash]
2642
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2643
+ #
2644
+ # @overload list_scheduled_evaluation_runs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2645
+ # Pass arguments to `list_scheduled_evaluation_runs` via keyword arguments. Note that at
2646
+ # least one keyword argument is required. To specify no parameters, or to keep all
2647
+ # the default parameter values, pass an empty Hash as a request object (see above).
2648
+ #
2649
+ # @param parent [::String]
2650
+ # Required. The resource name of the app to list scheduled evaluation runs
2651
+ # from.
2652
+ # @param page_size [::Integer]
2653
+ # Optional. Requested page size. Server may return fewer items than
2654
+ # requested. If unspecified, server will pick an appropriate default.
2655
+ # @param page_token [::String]
2656
+ # Optional. The
2657
+ # {::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsResponse#next_page_token next_page_token}
2658
+ # value returned from a previous list
2659
+ # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client#list_scheduled_evaluation_runs EvaluationService.ListScheduledEvaluationRuns}
2660
+ # call.
2661
+ # @param filter [::String]
2662
+ # Optional. Filter to be applied when listing the scheduled evaluation runs.
2663
+ # See https://google.aip.dev/160 for more details.
2664
+ # Currently supports filtering by:
2665
+ # * request.evaluations:evaluation_id
2666
+ # * request.evaluation_dataset:evaluation_dataset_id
2667
+ # @param order_by [::String]
2668
+ # Optional. Field to sort by. Supported fields are:
2669
+ # "name" (ascending), "create_time" (descending), "update_time" (descending),
2670
+ # "next_scheduled_execution" (ascending), and
2671
+ # "last_completed_run.create_time" (descending).
2672
+ # If not included, "update_time" will be the default.
2673
+ # See https://google.aip.dev/132#ordering for more details.
2674
+ # @yield [result, operation] Access the result along with the TransportOperation object
2675
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun>]
2676
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2677
+ #
2678
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun>]
2679
+ #
2680
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2681
+ #
2682
+ # @example Basic example
2683
+ # require "google/cloud/ces/v1beta"
2684
+ #
2685
+ # # Create a client object. The client can be reused for multiple calls.
2686
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
2687
+ #
2688
+ # # Create a request. To set request fields, pass in keyword arguments.
2689
+ # request = Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest.new
2690
+ #
2691
+ # # Call the list_scheduled_evaluation_runs method.
2692
+ # result = client.list_scheduled_evaluation_runs request
2693
+ #
2694
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2695
+ # # over elements, and API calls will be issued to fetch pages as needed.
2696
+ # result.each do |item|
2697
+ # # Each element is of type ::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.
2698
+ # p item
2699
+ # end
2700
+ #
2701
+ def list_scheduled_evaluation_runs request, options = nil
2702
+ raise ::ArgumentError, "request must be provided" if request.nil?
2703
+
2704
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ListScheduledEvaluationRunsRequest
2705
+
2706
+ # Converts hash and nil to an options object
2707
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2708
+
2709
+ # Customize the options with defaults
2710
+ call_metadata = @config.rpcs.list_scheduled_evaluation_runs.metadata.to_h
2711
+
2712
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2713
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2714
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2715
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
2716
+ transports_version_send: [:rest]
2717
+
2718
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2719
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2720
+
2721
+ options.apply_defaults timeout: @config.rpcs.list_scheduled_evaluation_runs.timeout,
2722
+ metadata: call_metadata,
2723
+ retry_policy: @config.rpcs.list_scheduled_evaluation_runs.retry_policy
2724
+
2725
+ options.apply_defaults timeout: @config.timeout,
2726
+ metadata: @config.metadata,
2727
+ retry_policy: @config.retry_policy
2728
+
2729
+ @evaluation_service_stub.list_scheduled_evaluation_runs request, options do |result, operation|
2730
+ result = ::Gapic::Rest::PagedEnumerable.new @evaluation_service_stub, :list_scheduled_evaluation_runs, "scheduled_evaluation_runs", request, result, options
2731
+ yield result, operation if block_given?
2732
+ throw :response, result
2733
+ end
2734
+ rescue ::Gapic::Rest::Error => e
2735
+ raise ::Google::Cloud::Error.from_error(e)
2736
+ end
2737
+
2738
+ ##
2739
+ # Updates a scheduled evaluation run.
2740
+ #
2741
+ # @overload update_scheduled_evaluation_run(request, options = nil)
2742
+ # Pass arguments to `update_scheduled_evaluation_run` via a request object, either of type
2743
+ # {::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest} or an equivalent Hash.
2744
+ #
2745
+ # @param request [::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest, ::Hash]
2746
+ # A request object representing the call parameters. Required. To specify no
2747
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2748
+ # @param options [::Gapic::CallOptions, ::Hash]
2749
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2750
+ #
2751
+ # @overload update_scheduled_evaluation_run(scheduled_evaluation_run: nil, update_mask: nil)
2752
+ # Pass arguments to `update_scheduled_evaluation_run` via keyword arguments. Note that at
2753
+ # least one keyword argument is required. To specify no parameters, or to keep all
2754
+ # the default parameter values, pass an empty Hash as a request object (see above).
2755
+ #
2756
+ # @param scheduled_evaluation_run [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun, ::Hash]
2757
+ # Required. The scheduled evaluation run to update.
2758
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2759
+ # Optional. Field mask is used to control which fields get updated. If the
2760
+ # mask is not present, all fields will be updated.
2761
+ # @yield [result, operation] Access the result along with the TransportOperation object
2762
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun]
2763
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2764
+ #
2765
+ # @return [::Google::Cloud::Ces::V1beta::ScheduledEvaluationRun]
2766
+ #
2767
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2768
+ #
2769
+ # @example Basic example
2770
+ # require "google/cloud/ces/v1beta"
2771
+ #
2772
+ # # Create a client object. The client can be reused for multiple calls.
2773
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
2774
+ #
2775
+ # # Create a request. To set request fields, pass in keyword arguments.
2776
+ # request = Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest.new
2777
+ #
2778
+ # # Call the update_scheduled_evaluation_run method.
2779
+ # result = client.update_scheduled_evaluation_run request
2780
+ #
2781
+ # # The returned object is of type Google::Cloud::Ces::V1beta::ScheduledEvaluationRun.
2782
+ # p result
2783
+ #
2784
+ def update_scheduled_evaluation_run request, options = nil
2785
+ raise ::ArgumentError, "request must be provided" if request.nil?
2786
+
2787
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::UpdateScheduledEvaluationRunRequest
2788
+
2789
+ # Converts hash and nil to an options object
2790
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2791
+
2792
+ # Customize the options with defaults
2793
+ call_metadata = @config.rpcs.update_scheduled_evaluation_run.metadata.to_h
2794
+
2795
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2796
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2797
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2798
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
2799
+ transports_version_send: [:rest]
2800
+
2801
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2802
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2803
+
2804
+ options.apply_defaults timeout: @config.rpcs.update_scheduled_evaluation_run.timeout,
2805
+ metadata: call_metadata,
2806
+ retry_policy: @config.rpcs.update_scheduled_evaluation_run.retry_policy
2807
+
2808
+ options.apply_defaults timeout: @config.timeout,
2809
+ metadata: @config.metadata,
2810
+ retry_policy: @config.retry_policy
2811
+
2812
+ @evaluation_service_stub.update_scheduled_evaluation_run request, options do |result, operation|
2813
+ yield result, operation if block_given?
2814
+ end
2815
+ rescue ::Gapic::Rest::Error => e
2816
+ raise ::Google::Cloud::Error.from_error(e)
2817
+ end
2818
+
2819
+ ##
2820
+ # Deletes a scheduled evaluation run.
2821
+ #
2822
+ # @overload delete_scheduled_evaluation_run(request, options = nil)
2823
+ # Pass arguments to `delete_scheduled_evaluation_run` via a request object, either of type
2824
+ # {::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest} or an equivalent Hash.
2825
+ #
2826
+ # @param request [::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest, ::Hash]
2827
+ # A request object representing the call parameters. Required. To specify no
2828
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2829
+ # @param options [::Gapic::CallOptions, ::Hash]
2830
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2831
+ #
2832
+ # @overload delete_scheduled_evaluation_run(name: nil, etag: nil)
2833
+ # Pass arguments to `delete_scheduled_evaluation_run` via keyword arguments. Note that at
2834
+ # least one keyword argument is required. To specify no parameters, or to keep all
2835
+ # the default parameter values, pass an empty Hash as a request object (see above).
2836
+ #
2837
+ # @param name [::String]
2838
+ # Required. The resource name of the scheduled evaluation run to delete.
2839
+ # @param etag [::String]
2840
+ # Optional. The etag of the ScheduledEvaluationRun.
2841
+ # If provided, it must match the server's etag.
2842
+ # @yield [result, operation] Access the result along with the TransportOperation object
2843
+ # @yieldparam result [::Google::Protobuf::Empty]
2844
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2845
+ #
2846
+ # @return [::Google::Protobuf::Empty]
2847
+ #
2848
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2849
+ #
2850
+ # @example Basic example
2851
+ # require "google/cloud/ces/v1beta"
2852
+ #
2853
+ # # Create a client object. The client can be reused for multiple calls.
2854
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
2855
+ #
2856
+ # # Create a request. To set request fields, pass in keyword arguments.
2857
+ # request = Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest.new
2858
+ #
2859
+ # # Call the delete_scheduled_evaluation_run method.
2860
+ # result = client.delete_scheduled_evaluation_run request
2861
+ #
2862
+ # # The returned object is of type Google::Protobuf::Empty.
2863
+ # p result
2864
+ #
2865
+ def delete_scheduled_evaluation_run request, options = nil
2866
+ raise ::ArgumentError, "request must be provided" if request.nil?
2867
+
2868
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::DeleteScheduledEvaluationRunRequest
2869
+
2870
+ # Converts hash and nil to an options object
2871
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2872
+
2873
+ # Customize the options with defaults
2874
+ call_metadata = @config.rpcs.delete_scheduled_evaluation_run.metadata.to_h
2875
+
2876
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2877
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2878
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2879
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
2880
+ transports_version_send: [:rest]
2881
+
2882
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2883
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2884
+
2885
+ options.apply_defaults timeout: @config.rpcs.delete_scheduled_evaluation_run.timeout,
2886
+ metadata: call_metadata,
2887
+ retry_policy: @config.rpcs.delete_scheduled_evaluation_run.retry_policy
2888
+
2889
+ options.apply_defaults timeout: @config.timeout,
2890
+ metadata: @config.metadata,
2891
+ retry_policy: @config.retry_policy
2892
+
2893
+ @evaluation_service_stub.delete_scheduled_evaluation_run request, options do |result, operation|
2894
+ yield result, operation if block_given?
2895
+ end
2896
+ rescue ::Gapic::Rest::Error => e
2897
+ raise ::Google::Cloud::Error.from_error(e)
2898
+ end
2899
+
2900
+ ##
2901
+ # Tests the voice of a persona. Also accepts a default persona.
2902
+ #
2903
+ # @overload test_persona_voice(request, options = nil)
2904
+ # Pass arguments to `test_persona_voice` via a request object, either of type
2905
+ # {::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest} or an equivalent Hash.
2906
+ #
2907
+ # @param request [::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest, ::Hash]
2908
+ # A request object representing the call parameters. Required. To specify no
2909
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2910
+ # @param options [::Gapic::CallOptions, ::Hash]
2911
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2912
+ #
2913
+ # @overload test_persona_voice(app: nil, persona_id: nil, text: nil)
2914
+ # Pass arguments to `test_persona_voice` via keyword arguments. Note that at
2915
+ # least one keyword argument is required. To specify no parameters, or to keep all
2916
+ # the default parameter values, pass an empty Hash as a request object (see above).
2917
+ #
2918
+ # @param app [::String]
2919
+ # Required. the resource name of the app to test the persona voice for.
2920
+ # Format:
2921
+ # `projects/{project}/locations/{location}/apps/{app}`
2922
+ # @param persona_id [::String]
2923
+ # Required. The persona ID to test the voice for. Also accepts "default".
2924
+ # @param text [::String]
2925
+ # Required. The text to test the voice for.
2926
+ # @yield [result, operation] Access the result along with the TransportOperation object
2927
+ # @yieldparam result [::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse]
2928
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2929
+ #
2930
+ # @return [::Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse]
2931
+ #
2932
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2933
+ #
2934
+ # @example Basic example
2935
+ # require "google/cloud/ces/v1beta"
2936
+ #
2937
+ # # Create a client object. The client can be reused for multiple calls.
2938
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
2939
+ #
2940
+ # # Create a request. To set request fields, pass in keyword arguments.
2941
+ # request = Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest.new
2942
+ #
2943
+ # # Call the test_persona_voice method.
2944
+ # result = client.test_persona_voice request
2945
+ #
2946
+ # # The returned object is of type Google::Cloud::Ces::V1beta::TestPersonaVoiceResponse.
2947
+ # p result
2948
+ #
2949
+ def test_persona_voice request, options = nil
2950
+ raise ::ArgumentError, "request must be provided" if request.nil?
2951
+
2952
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::TestPersonaVoiceRequest
2953
+
2954
+ # Converts hash and nil to an options object
2955
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2956
+
2957
+ # Customize the options with defaults
2958
+ call_metadata = @config.rpcs.test_persona_voice.metadata.to_h
2959
+
2960
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2961
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2962
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2963
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
2964
+ transports_version_send: [:rest]
2965
+
2966
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2967
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2968
+
2969
+ options.apply_defaults timeout: @config.rpcs.test_persona_voice.timeout,
2970
+ metadata: call_metadata,
2971
+ retry_policy: @config.rpcs.test_persona_voice.retry_policy
2972
+
2973
+ options.apply_defaults timeout: @config.timeout,
2974
+ metadata: @config.metadata,
2975
+ retry_policy: @config.retry_policy
2976
+
2977
+ @evaluation_service_stub.test_persona_voice request, options do |result, operation|
2978
+ yield result, operation if block_given?
2979
+ end
2980
+ rescue ::Gapic::Rest::Error => e
2981
+ raise ::Google::Cloud::Error.from_error(e)
2982
+ end
2983
+
2984
+ ##
2985
+ # Exports evaluations.
2986
+ #
2987
+ # @overload export_evaluations(request, options = nil)
2988
+ # Pass arguments to `export_evaluations` via a request object, either of type
2989
+ # {::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest} or an equivalent Hash.
2990
+ #
2991
+ # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest, ::Hash]
2992
+ # A request object representing the call parameters. Required. To specify no
2993
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2994
+ # @param options [::Gapic::CallOptions, ::Hash]
2995
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2996
+ #
2997
+ # @overload export_evaluations(parent: nil, names: nil, export_options: nil, include_evaluation_results: nil, include_evaluations: nil)
2998
+ # Pass arguments to `export_evaluations` via keyword arguments. Note that at
2999
+ # least one keyword argument is required. To specify no parameters, or to keep all
3000
+ # the default parameter values, pass an empty Hash as a request object (see above).
3001
+ #
3002
+ # @param parent [::String]
3003
+ # Required. The resource name of the app to export evaluations from.
3004
+ # Format: `projects/{project}/locations/{location}/apps/{app}`
3005
+ # @param names [::Array<::String>]
3006
+ # Required. The resource names of the evaluations to export.
3007
+ # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash]
3008
+ # Optional. The export options for the evaluations.
3009
+ # @param include_evaluation_results [::Boolean]
3010
+ # Optional. Includes evaluation results in the export. At least one of
3011
+ # include_evaluation_results or include_evaluations must be set.
3012
+ # @param include_evaluations [::Boolean]
3013
+ # Optional. Includes evaluations in the export. At least one of
3014
+ # include_evaluation_results or include_evaluations must be set.
3015
+ # @yield [result, operation] Access the result along with the TransportOperation object
3016
+ # @yieldparam result [::Gapic::Operation]
3017
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3018
+ #
3019
+ # @return [::Gapic::Operation]
3020
+ #
3021
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3022
+ #
3023
+ # @example Basic example
3024
+ # require "google/cloud/ces/v1beta"
3025
+ #
3026
+ # # Create a client object. The client can be reused for multiple calls.
3027
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
3028
+ #
3029
+ # # Create a request. To set request fields, pass in keyword arguments.
3030
+ # request = Google::Cloud::Ces::V1beta::ExportEvaluationsRequest.new
3031
+ #
3032
+ # # Call the export_evaluations method.
3033
+ # result = client.export_evaluations request
3034
+ #
3035
+ # # The returned object is of type Gapic::Operation. You can use it to
3036
+ # # check the status of an operation, cancel it, or wait for results.
3037
+ # # Here is how to wait for a response.
3038
+ # result.wait_until_done! timeout: 60
3039
+ # if result.response?
3040
+ # p result.response
3041
+ # else
3042
+ # puts "No response received."
3043
+ # end
3044
+ #
3045
+ def export_evaluations request, options = nil
3046
+ raise ::ArgumentError, "request must be provided" if request.nil?
3047
+
3048
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationsRequest
3049
+
3050
+ # Converts hash and nil to an options object
3051
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3052
+
3053
+ # Customize the options with defaults
3054
+ call_metadata = @config.rpcs.export_evaluations.metadata.to_h
3055
+
3056
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3057
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3058
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3059
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
3060
+ transports_version_send: [:rest]
3061
+
3062
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3063
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3064
+
3065
+ options.apply_defaults timeout: @config.rpcs.export_evaluations.timeout,
3066
+ metadata: call_metadata,
3067
+ retry_policy: @config.rpcs.export_evaluations.retry_policy
3068
+
3069
+ options.apply_defaults timeout: @config.timeout,
3070
+ metadata: @config.metadata,
3071
+ retry_policy: @config.retry_policy
3072
+
3073
+ @evaluation_service_stub.export_evaluations request, options do |result, operation|
3074
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3075
+ yield result, operation if block_given?
3076
+ throw :response, result
3077
+ end
3078
+ rescue ::Gapic::Rest::Error => e
3079
+ raise ::Google::Cloud::Error.from_error(e)
3080
+ end
3081
+
3082
+ ##
3083
+ # Exports evaluations runs.
3084
+ #
3085
+ # @overload export_evaluation_runs(request, options = nil)
3086
+ # Pass arguments to `export_evaluation_runs` via a request object, either of type
3087
+ # {::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest} or an equivalent Hash.
3088
+ #
3089
+ # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest, ::Hash]
3090
+ # A request object representing the call parameters. Required. To specify no
3091
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3092
+ # @param options [::Gapic::CallOptions, ::Hash]
3093
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3094
+ #
3095
+ # @overload export_evaluation_runs(parent: nil, names: nil, export_options: nil)
3096
+ # Pass arguments to `export_evaluation_runs` via keyword arguments. Note that at
3097
+ # least one keyword argument is required. To specify no parameters, or to keep all
3098
+ # the default parameter values, pass an empty Hash as a request object (see above).
3099
+ #
3100
+ # @param parent [::String]
3101
+ # Required. The resource name of the app to export evaluation runs from.
3102
+ # Format: `projects/{project}/locations/{location}/apps/{app}`
3103
+ # @param names [::Array<::String>]
3104
+ # Required. The resource names of the evaluation runs to export.
3105
+ # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash]
3106
+ # Optional. The export options for the evaluation runs.
3107
+ # @yield [result, operation] Access the result along with the TransportOperation object
3108
+ # @yieldparam result [::Gapic::Operation]
3109
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3110
+ #
3111
+ # @return [::Gapic::Operation]
3112
+ #
3113
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3114
+ #
3115
+ # @example Basic example
3116
+ # require "google/cloud/ces/v1beta"
3117
+ #
3118
+ # # Create a client object. The client can be reused for multiple calls.
3119
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
3120
+ #
3121
+ # # Create a request. To set request fields, pass in keyword arguments.
3122
+ # request = Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new
3123
+ #
3124
+ # # Call the export_evaluation_runs method.
3125
+ # result = client.export_evaluation_runs request
3126
+ #
3127
+ # # The returned object is of type Gapic::Operation. You can use it to
3128
+ # # check the status of an operation, cancel it, or wait for results.
3129
+ # # Here is how to wait for a response.
3130
+ # result.wait_until_done! timeout: 60
3131
+ # if result.response?
3132
+ # p result.response
3133
+ # else
3134
+ # puts "No response received."
3135
+ # end
3136
+ #
3137
+ def export_evaluation_runs request, options = nil
3138
+ raise ::ArgumentError, "request must be provided" if request.nil?
3139
+
3140
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest
3141
+
3142
+ # Converts hash and nil to an options object
3143
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3144
+
3145
+ # Customize the options with defaults
3146
+ call_metadata = @config.rpcs.export_evaluation_runs.metadata.to_h
3147
+
3148
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3149
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3150
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3151
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
3152
+ transports_version_send: [:rest]
3153
+
3154
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3155
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3156
+
3157
+ options.apply_defaults timeout: @config.rpcs.export_evaluation_runs.timeout,
3158
+ metadata: call_metadata,
3159
+ retry_policy: @config.rpcs.export_evaluation_runs.retry_policy
3160
+
3161
+ options.apply_defaults timeout: @config.timeout,
3162
+ metadata: @config.metadata,
3163
+ retry_policy: @config.retry_policy
3164
+
3165
+ @evaluation_service_stub.export_evaluation_runs request, options do |result, operation|
3166
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3167
+ yield result, operation if block_given?
3168
+ throw :response, result
3169
+ end
3170
+ rescue ::Gapic::Rest::Error => e
3171
+ raise ::Google::Cloud::Error.from_error(e)
3172
+ end
3173
+
3174
+ ##
3175
+ # Exports evaluations results.
3176
+ #
3177
+ # @overload export_evaluation_results(request, options = nil)
3178
+ # Pass arguments to `export_evaluation_results` via a request object, either of type
3179
+ # {::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest} or an equivalent Hash.
3180
+ #
3181
+ # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest, ::Hash]
3182
+ # A request object representing the call parameters. Required. To specify no
3183
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3184
+ # @param options [::Gapic::CallOptions, ::Hash]
3185
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3186
+ #
3187
+ # @overload export_evaluation_results(parent: nil, names: nil, export_options: nil)
3188
+ # Pass arguments to `export_evaluation_results` via keyword arguments. Note that at
3189
+ # least one keyword argument is required. To specify no parameters, or to keep all
3190
+ # the default parameter values, pass an empty Hash as a request object (see above).
3191
+ #
3192
+ # @param parent [::String]
3193
+ # Required. The resource name of the evaluation to export evaluation results
3194
+ # from. Format:
3195
+ # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}`
3196
+ # @param names [::Array<::String>]
3197
+ # Required. The resource names of the evaluation results to export.
3198
+ # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash]
3199
+ # Optional. The export options for the evaluation results.
3200
+ # @yield [result, operation] Access the result along with the TransportOperation object
3201
+ # @yieldparam result [::Gapic::Operation]
3202
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3203
+ #
3204
+ # @return [::Gapic::Operation]
3205
+ #
3206
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3207
+ #
3208
+ # @example Basic example
3209
+ # require "google/cloud/ces/v1beta"
3210
+ #
3211
+ # # Create a client object. The client can be reused for multiple calls.
3212
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
3213
+ #
3214
+ # # Create a request. To set request fields, pass in keyword arguments.
3215
+ # request = Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new
3216
+ #
3217
+ # # Call the export_evaluation_results method.
3218
+ # result = client.export_evaluation_results request
3219
+ #
3220
+ # # The returned object is of type Gapic::Operation. You can use it to
3221
+ # # check the status of an operation, cancel it, or wait for results.
3222
+ # # Here is how to wait for a response.
3223
+ # result.wait_until_done! timeout: 60
3224
+ # if result.response?
3225
+ # p result.response
3226
+ # else
3227
+ # puts "No response received."
3228
+ # end
3229
+ #
3230
+ def export_evaluation_results request, options = nil
3231
+ raise ::ArgumentError, "request must be provided" if request.nil?
3232
+
3233
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest
3234
+
3235
+ # Converts hash and nil to an options object
3236
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3237
+
3238
+ # Customize the options with defaults
3239
+ call_metadata = @config.rpcs.export_evaluation_results.metadata.to_h
3240
+
3241
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3242
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3243
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3244
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
3245
+ transports_version_send: [:rest]
3246
+
3247
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3248
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3249
+
3250
+ options.apply_defaults timeout: @config.rpcs.export_evaluation_results.timeout,
3251
+ metadata: call_metadata,
3252
+ retry_policy: @config.rpcs.export_evaluation_results.retry_policy
3253
+
3254
+ options.apply_defaults timeout: @config.timeout,
3255
+ metadata: @config.metadata,
3256
+ retry_policy: @config.retry_policy
3257
+
3258
+ @evaluation_service_stub.export_evaluation_results request, options do |result, operation|
3259
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3260
+ yield result, operation if block_given?
3261
+ throw :response, result
3262
+ end
3263
+ rescue ::Gapic::Rest::Error => e
3264
+ raise ::Google::Cloud::Error.from_error(e)
3265
+ end
3266
+
3267
+ ##
3268
+ # Runs metrics on an existing evaluation result.
3269
+ #
3270
+ # @overload run_evaluation_result_metrics(request, options = nil)
3271
+ # Pass arguments to `run_evaluation_result_metrics` via a request object, either of type
3272
+ # {::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest} or an equivalent Hash.
3273
+ #
3274
+ # @param request [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest, ::Hash]
3275
+ # A request object representing the call parameters. Required. To specify no
3276
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3277
+ # @param options [::Gapic::CallOptions, ::Hash]
3278
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3279
+ #
3280
+ # @overload run_evaluation_result_metrics(evaluation_result_id: nil)
3281
+ # Pass arguments to `run_evaluation_result_metrics` via keyword arguments. Note that at
3282
+ # least one keyword argument is required. To specify no parameters, or to keep all
3283
+ # the default parameter values, pass an empty Hash as a request object (see above).
3284
+ #
3285
+ # @param evaluation_result_id [::String]
3286
+ # Required. The evaluation result to run metrics for.
3287
+ # Format:
3288
+ # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result_id}`
3289
+ # @yield [result, operation] Access the result along with the TransportOperation object
3290
+ # @yieldparam result [::Gapic::Operation]
3291
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3292
+ #
3293
+ # @return [::Gapic::Operation]
3294
+ #
3295
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3296
+ #
3297
+ # @example Basic example
3298
+ # require "google/cloud/ces/v1beta"
3299
+ #
3300
+ # # Create a client object. The client can be reused for multiple calls.
3301
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
3302
+ #
3303
+ # # Create a request. To set request fields, pass in keyword arguments.
3304
+ # request = Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new
3305
+ #
3306
+ # # Call the run_evaluation_result_metrics method.
3307
+ # result = client.run_evaluation_result_metrics request
3308
+ #
3309
+ # # The returned object is of type Gapic::Operation. You can use it to
3310
+ # # check the status of an operation, cancel it, or wait for results.
3311
+ # # Here is how to wait for a response.
3312
+ # result.wait_until_done! timeout: 60
3313
+ # if result.response?
3314
+ # p result.response
3315
+ # else
3316
+ # puts "No response received."
3317
+ # end
3318
+ #
3319
+ def run_evaluation_result_metrics request, options = nil
3320
+ raise ::ArgumentError, "request must be provided" if request.nil?
3321
+
3322
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest
3323
+
3324
+ # Converts hash and nil to an options object
3325
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3326
+
3327
+ # Customize the options with defaults
3328
+ call_metadata = @config.rpcs.run_evaluation_result_metrics.metadata.to_h
3329
+
3330
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3331
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3332
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3333
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
3334
+ transports_version_send: [:rest]
3335
+
3336
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3337
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3338
+
3339
+ options.apply_defaults timeout: @config.rpcs.run_evaluation_result_metrics.timeout,
3340
+ metadata: call_metadata,
3341
+ retry_policy: @config.rpcs.run_evaluation_result_metrics.retry_policy
3342
+
3343
+ options.apply_defaults timeout: @config.timeout,
3344
+ metadata: @config.metadata,
3345
+ retry_policy: @config.retry_policy
3346
+
3347
+ @evaluation_service_stub.run_evaluation_result_metrics request, options do |result, operation|
3348
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3349
+ yield result, operation if block_given?
3350
+ throw :response, result
3351
+ end
3352
+ rescue ::Gapic::Rest::Error => e
3353
+ raise ::Google::Cloud::Error.from_error(e)
3354
+ end
3355
+
3356
+ ##
3357
+ # Configuration class for the EvaluationService REST API.
3358
+ #
3359
+ # This class represents the configuration for EvaluationService REST,
3360
+ # providing control over timeouts, retry behavior, logging, transport
3361
+ # parameters, and other low-level controls. Certain parameters can also be
3362
+ # applied individually to specific RPCs. See
3363
+ # {::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client::Configuration::Rpcs}
3364
+ # for a list of RPCs that can be configured independently.
3365
+ #
3366
+ # Configuration can be applied globally to all clients, or to a single client
3367
+ # on construction.
3368
+ #
3369
+ # @example
3370
+ #
3371
+ # # Modify the global config, setting the timeout for
3372
+ # # run_evaluation to 20 seconds,
3373
+ # # and all remaining timeouts to 10 seconds.
3374
+ # ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.configure do |config|
3375
+ # config.timeout = 10.0
3376
+ # config.rpcs.run_evaluation.timeout = 20.0
3377
+ # end
3378
+ #
3379
+ # # Apply the above configuration only to a new client.
3380
+ # client = ::Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new do |config|
3381
+ # config.timeout = 10.0
3382
+ # config.rpcs.run_evaluation.timeout = 20.0
3383
+ # end
3384
+ #
3385
+ # @!attribute [rw] endpoint
3386
+ # A custom service endpoint, as a hostname or hostname:port. The default is
3387
+ # nil, indicating to use the default endpoint in the current universe domain.
3388
+ # @return [::String,nil]
3389
+ # @!attribute [rw] credentials
3390
+ # Credentials to send with calls. You may provide any of the following types:
3391
+ # * (`String`) The path to a service account key file in JSON format
3392
+ # * (`Hash`) A service account key as a Hash
3393
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
3394
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
3395
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3396
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3397
+ # * (`nil`) indicating no credentials
3398
+ #
3399
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
3400
+ # external source for authentication to Google Cloud, you must validate it before
3401
+ # providing it to a Google API client library. Providing an unvalidated credential
3402
+ # configuration to Google APIs can compromise the security of your systems and data.
3403
+ # For more information, refer to [Validate credential configurations from external
3404
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
3405
+ # @return [::Object]
3406
+ # @!attribute [rw] scope
3407
+ # The OAuth scopes
3408
+ # @return [::Array<::String>]
3409
+ # @!attribute [rw] lib_name
3410
+ # The library name as recorded in instrumentation and logging
3411
+ # @return [::String]
3412
+ # @!attribute [rw] lib_version
3413
+ # The library version as recorded in instrumentation and logging
3414
+ # @return [::String]
3415
+ # @!attribute [rw] timeout
3416
+ # The call timeout in seconds.
3417
+ # @return [::Numeric]
3418
+ # @!attribute [rw] metadata
3419
+ # Additional headers to be sent with the call.
3420
+ # @return [::Hash{::Symbol=>::String}]
3421
+ # @!attribute [rw] retry_policy
3422
+ # The retry policy. The value is a hash with the following keys:
3423
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3424
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3425
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3426
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
3427
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3428
+ # trigger a retry.
3429
+ # @return [::Hash]
3430
+ # @!attribute [rw] quota_project
3431
+ # A separate project against which to charge quota.
3432
+ # @return [::String]
3433
+ # @!attribute [rw] universe_domain
3434
+ # The universe domain within which to make requests. This determines the
3435
+ # default endpoint URL. The default value of nil uses the environment
3436
+ # universe (usually the default "googleapis.com" universe).
3437
+ # @return [::String,nil]
3438
+ # @!attribute [rw] logger
3439
+ # A custom logger to use for request/response debug logging, or the value
3440
+ # `:default` (the default) to construct a default logger, or `nil` to
3441
+ # explicitly disable logging.
3442
+ # @return [::Logger,:default,nil]
3443
+ #
3444
+ class Configuration
3445
+ extend ::Gapic::Config
3446
+
3447
+ # @private
3448
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
3449
+ DEFAULT_ENDPOINT = "ces.googleapis.com"
3450
+
3451
+ config_attr :endpoint, nil, ::String, nil
3452
+ config_attr :credentials, nil do |value|
3453
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
3454
+ allowed.any? { |klass| klass === value }
3455
+ end
3456
+ config_attr :scope, nil, ::String, ::Array, nil
3457
+ config_attr :lib_name, nil, ::String, nil
3458
+ config_attr :lib_version, nil, ::String, nil
3459
+ config_attr :timeout, nil, ::Numeric, nil
3460
+ config_attr :metadata, nil, ::Hash, nil
3461
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3462
+ config_attr :quota_project, nil, ::String, nil
3463
+ config_attr :universe_domain, nil, ::String, nil
3464
+
3465
+ # @private
3466
+ # Overrides for http bindings for the RPCs of this service
3467
+ # are only used when this service is used as mixin, and only
3468
+ # by the host service.
3469
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
3470
+ config_attr :bindings_override, {}, ::Hash, nil
3471
+ config_attr :logger, :default, ::Logger, nil, :default
3472
+
3473
+ # @private
3474
+ def initialize parent_config = nil
3475
+ @parent_config = parent_config unless parent_config.nil?
3476
+
3477
+ yield self if block_given?
3478
+ end
3479
+
3480
+ ##
3481
+ # Configurations for individual RPCs
3482
+ # @return [Rpcs]
3483
+ #
3484
+ def rpcs
3485
+ @rpcs ||= begin
3486
+ parent_rpcs = nil
3487
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
3488
+ Rpcs.new parent_rpcs
3489
+ end
3490
+ end
3491
+
3492
+ ##
3493
+ # Configuration RPC class for the EvaluationService API.
3494
+ #
3495
+ # Includes fields providing the configuration for each RPC in this service.
3496
+ # Each configuration object is of type `Gapic::Config::Method` and includes
3497
+ # the following configuration fields:
3498
+ #
3499
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
3500
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
3501
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
3502
+ # include the following keys:
3503
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3504
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3505
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3506
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
3507
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3508
+ # trigger a retry.
3509
+ #
3510
+ class Rpcs
3511
+ ##
3512
+ # RPC-specific configuration for `run_evaluation`
3513
+ # @return [::Gapic::Config::Method]
3514
+ #
3515
+ attr_reader :run_evaluation
3516
+ ##
3517
+ # RPC-specific configuration for `upload_evaluation_audio`
3518
+ # @return [::Gapic::Config::Method]
3519
+ #
3520
+ attr_reader :upload_evaluation_audio
3521
+ ##
3522
+ # RPC-specific configuration for `create_evaluation`
3523
+ # @return [::Gapic::Config::Method]
3524
+ #
3525
+ attr_reader :create_evaluation
3526
+ ##
3527
+ # RPC-specific configuration for `generate_evaluation`
3528
+ # @return [::Gapic::Config::Method]
3529
+ #
3530
+ attr_reader :generate_evaluation
3531
+ ##
3532
+ # RPC-specific configuration for `import_evaluations`
3533
+ # @return [::Gapic::Config::Method]
3534
+ #
3535
+ attr_reader :import_evaluations
3536
+ ##
3537
+ # RPC-specific configuration for `create_evaluation_dataset`
3538
+ # @return [::Gapic::Config::Method]
3539
+ #
3540
+ attr_reader :create_evaluation_dataset
3541
+ ##
3542
+ # RPC-specific configuration for `update_evaluation`
3543
+ # @return [::Gapic::Config::Method]
3544
+ #
3545
+ attr_reader :update_evaluation
3546
+ ##
3547
+ # RPC-specific configuration for `update_evaluation_dataset`
3548
+ # @return [::Gapic::Config::Method]
3549
+ #
3550
+ attr_reader :update_evaluation_dataset
3551
+ ##
3552
+ # RPC-specific configuration for `delete_evaluation`
3553
+ # @return [::Gapic::Config::Method]
3554
+ #
3555
+ attr_reader :delete_evaluation
3556
+ ##
3557
+ # RPC-specific configuration for `delete_evaluation_result`
3558
+ # @return [::Gapic::Config::Method]
3559
+ #
3560
+ attr_reader :delete_evaluation_result
3561
+ ##
3562
+ # RPC-specific configuration for `delete_evaluation_dataset`
3563
+ # @return [::Gapic::Config::Method]
3564
+ #
3565
+ attr_reader :delete_evaluation_dataset
3566
+ ##
3567
+ # RPC-specific configuration for `delete_evaluation_run`
3568
+ # @return [::Gapic::Config::Method]
3569
+ #
3570
+ attr_reader :delete_evaluation_run
3571
+ ##
3572
+ # RPC-specific configuration for `get_evaluation`
3573
+ # @return [::Gapic::Config::Method]
3574
+ #
3575
+ attr_reader :get_evaluation
3576
+ ##
3577
+ # RPC-specific configuration for `get_evaluation_result`
3578
+ # @return [::Gapic::Config::Method]
3579
+ #
3580
+ attr_reader :get_evaluation_result
3581
+ ##
3582
+ # RPC-specific configuration for `get_evaluation_dataset`
3583
+ # @return [::Gapic::Config::Method]
3584
+ #
3585
+ attr_reader :get_evaluation_dataset
3586
+ ##
3587
+ # RPC-specific configuration for `get_evaluation_run`
3588
+ # @return [::Gapic::Config::Method]
3589
+ #
3590
+ attr_reader :get_evaluation_run
3591
+ ##
3592
+ # RPC-specific configuration for `list_evaluations`
3593
+ # @return [::Gapic::Config::Method]
3594
+ #
3595
+ attr_reader :list_evaluations
3596
+ ##
3597
+ # RPC-specific configuration for `list_evaluation_results`
3598
+ # @return [::Gapic::Config::Method]
3599
+ #
3600
+ attr_reader :list_evaluation_results
3601
+ ##
3602
+ # RPC-specific configuration for `list_evaluation_datasets`
3603
+ # @return [::Gapic::Config::Method]
3604
+ #
3605
+ attr_reader :list_evaluation_datasets
3606
+ ##
3607
+ # RPC-specific configuration for `list_evaluation_runs`
3608
+ # @return [::Gapic::Config::Method]
3609
+ #
3610
+ attr_reader :list_evaluation_runs
3611
+ ##
3612
+ # RPC-specific configuration for `list_evaluation_expectations`
3613
+ # @return [::Gapic::Config::Method]
3614
+ #
3615
+ attr_reader :list_evaluation_expectations
3616
+ ##
3617
+ # RPC-specific configuration for `get_evaluation_expectation`
3618
+ # @return [::Gapic::Config::Method]
3619
+ #
3620
+ attr_reader :get_evaluation_expectation
3621
+ ##
3622
+ # RPC-specific configuration for `create_evaluation_expectation`
3623
+ # @return [::Gapic::Config::Method]
3624
+ #
3625
+ attr_reader :create_evaluation_expectation
3626
+ ##
3627
+ # RPC-specific configuration for `update_evaluation_expectation`
3628
+ # @return [::Gapic::Config::Method]
3629
+ #
3630
+ attr_reader :update_evaluation_expectation
3631
+ ##
3632
+ # RPC-specific configuration for `delete_evaluation_expectation`
3633
+ # @return [::Gapic::Config::Method]
3634
+ #
3635
+ attr_reader :delete_evaluation_expectation
3636
+ ##
3637
+ # RPC-specific configuration for `create_scheduled_evaluation_run`
3638
+ # @return [::Gapic::Config::Method]
3639
+ #
3640
+ attr_reader :create_scheduled_evaluation_run
3641
+ ##
3642
+ # RPC-specific configuration for `get_scheduled_evaluation_run`
3643
+ # @return [::Gapic::Config::Method]
3644
+ #
3645
+ attr_reader :get_scheduled_evaluation_run
3646
+ ##
3647
+ # RPC-specific configuration for `list_scheduled_evaluation_runs`
3648
+ # @return [::Gapic::Config::Method]
3649
+ #
3650
+ attr_reader :list_scheduled_evaluation_runs
3651
+ ##
3652
+ # RPC-specific configuration for `update_scheduled_evaluation_run`
3653
+ # @return [::Gapic::Config::Method]
3654
+ #
3655
+ attr_reader :update_scheduled_evaluation_run
3656
+ ##
3657
+ # RPC-specific configuration for `delete_scheduled_evaluation_run`
3658
+ # @return [::Gapic::Config::Method]
3659
+ #
3660
+ attr_reader :delete_scheduled_evaluation_run
3661
+ ##
3662
+ # RPC-specific configuration for `test_persona_voice`
3663
+ # @return [::Gapic::Config::Method]
3664
+ #
3665
+ attr_reader :test_persona_voice
3666
+ ##
3667
+ # RPC-specific configuration for `export_evaluations`
3668
+ # @return [::Gapic::Config::Method]
3669
+ #
3670
+ attr_reader :export_evaluations
3671
+ ##
3672
+ # RPC-specific configuration for `export_evaluation_runs`
3673
+ # @return [::Gapic::Config::Method]
3674
+ #
3675
+ attr_reader :export_evaluation_runs
3676
+ ##
3677
+ # RPC-specific configuration for `export_evaluation_results`
3678
+ # @return [::Gapic::Config::Method]
3679
+ #
3680
+ attr_reader :export_evaluation_results
3681
+ ##
3682
+ # RPC-specific configuration for `run_evaluation_result_metrics`
3683
+ # @return [::Gapic::Config::Method]
3684
+ #
3685
+ attr_reader :run_evaluation_result_metrics
3686
+
3687
+ # @private
3688
+ def initialize parent_rpcs = nil
3689
+ run_evaluation_config = parent_rpcs.run_evaluation if parent_rpcs.respond_to? :run_evaluation
3690
+ @run_evaluation = ::Gapic::Config::Method.new run_evaluation_config
3691
+ upload_evaluation_audio_config = parent_rpcs.upload_evaluation_audio if parent_rpcs.respond_to? :upload_evaluation_audio
3692
+ @upload_evaluation_audio = ::Gapic::Config::Method.new upload_evaluation_audio_config
3693
+ create_evaluation_config = parent_rpcs.create_evaluation if parent_rpcs.respond_to? :create_evaluation
3694
+ @create_evaluation = ::Gapic::Config::Method.new create_evaluation_config
3695
+ generate_evaluation_config = parent_rpcs.generate_evaluation if parent_rpcs.respond_to? :generate_evaluation
3696
+ @generate_evaluation = ::Gapic::Config::Method.new generate_evaluation_config
3697
+ import_evaluations_config = parent_rpcs.import_evaluations if parent_rpcs.respond_to? :import_evaluations
3698
+ @import_evaluations = ::Gapic::Config::Method.new import_evaluations_config
3699
+ create_evaluation_dataset_config = parent_rpcs.create_evaluation_dataset if parent_rpcs.respond_to? :create_evaluation_dataset
3700
+ @create_evaluation_dataset = ::Gapic::Config::Method.new create_evaluation_dataset_config
3701
+ update_evaluation_config = parent_rpcs.update_evaluation if parent_rpcs.respond_to? :update_evaluation
3702
+ @update_evaluation = ::Gapic::Config::Method.new update_evaluation_config
3703
+ update_evaluation_dataset_config = parent_rpcs.update_evaluation_dataset if parent_rpcs.respond_to? :update_evaluation_dataset
3704
+ @update_evaluation_dataset = ::Gapic::Config::Method.new update_evaluation_dataset_config
3705
+ delete_evaluation_config = parent_rpcs.delete_evaluation if parent_rpcs.respond_to? :delete_evaluation
3706
+ @delete_evaluation = ::Gapic::Config::Method.new delete_evaluation_config
3707
+ delete_evaluation_result_config = parent_rpcs.delete_evaluation_result if parent_rpcs.respond_to? :delete_evaluation_result
3708
+ @delete_evaluation_result = ::Gapic::Config::Method.new delete_evaluation_result_config
3709
+ delete_evaluation_dataset_config = parent_rpcs.delete_evaluation_dataset if parent_rpcs.respond_to? :delete_evaluation_dataset
3710
+ @delete_evaluation_dataset = ::Gapic::Config::Method.new delete_evaluation_dataset_config
3711
+ delete_evaluation_run_config = parent_rpcs.delete_evaluation_run if parent_rpcs.respond_to? :delete_evaluation_run
3712
+ @delete_evaluation_run = ::Gapic::Config::Method.new delete_evaluation_run_config
3713
+ get_evaluation_config = parent_rpcs.get_evaluation if parent_rpcs.respond_to? :get_evaluation
3714
+ @get_evaluation = ::Gapic::Config::Method.new get_evaluation_config
3715
+ get_evaluation_result_config = parent_rpcs.get_evaluation_result if parent_rpcs.respond_to? :get_evaluation_result
3716
+ @get_evaluation_result = ::Gapic::Config::Method.new get_evaluation_result_config
3717
+ get_evaluation_dataset_config = parent_rpcs.get_evaluation_dataset if parent_rpcs.respond_to? :get_evaluation_dataset
3718
+ @get_evaluation_dataset = ::Gapic::Config::Method.new get_evaluation_dataset_config
3719
+ get_evaluation_run_config = parent_rpcs.get_evaluation_run if parent_rpcs.respond_to? :get_evaluation_run
3720
+ @get_evaluation_run = ::Gapic::Config::Method.new get_evaluation_run_config
3721
+ list_evaluations_config = parent_rpcs.list_evaluations if parent_rpcs.respond_to? :list_evaluations
3722
+ @list_evaluations = ::Gapic::Config::Method.new list_evaluations_config
3723
+ list_evaluation_results_config = parent_rpcs.list_evaluation_results if parent_rpcs.respond_to? :list_evaluation_results
3724
+ @list_evaluation_results = ::Gapic::Config::Method.new list_evaluation_results_config
3725
+ list_evaluation_datasets_config = parent_rpcs.list_evaluation_datasets if parent_rpcs.respond_to? :list_evaluation_datasets
3726
+ @list_evaluation_datasets = ::Gapic::Config::Method.new list_evaluation_datasets_config
3727
+ list_evaluation_runs_config = parent_rpcs.list_evaluation_runs if parent_rpcs.respond_to? :list_evaluation_runs
3728
+ @list_evaluation_runs = ::Gapic::Config::Method.new list_evaluation_runs_config
3729
+ list_evaluation_expectations_config = parent_rpcs.list_evaluation_expectations if parent_rpcs.respond_to? :list_evaluation_expectations
3730
+ @list_evaluation_expectations = ::Gapic::Config::Method.new list_evaluation_expectations_config
3731
+ get_evaluation_expectation_config = parent_rpcs.get_evaluation_expectation if parent_rpcs.respond_to? :get_evaluation_expectation
3732
+ @get_evaluation_expectation = ::Gapic::Config::Method.new get_evaluation_expectation_config
3733
+ create_evaluation_expectation_config = parent_rpcs.create_evaluation_expectation if parent_rpcs.respond_to? :create_evaluation_expectation
3734
+ @create_evaluation_expectation = ::Gapic::Config::Method.new create_evaluation_expectation_config
3735
+ update_evaluation_expectation_config = parent_rpcs.update_evaluation_expectation if parent_rpcs.respond_to? :update_evaluation_expectation
3736
+ @update_evaluation_expectation = ::Gapic::Config::Method.new update_evaluation_expectation_config
3737
+ delete_evaluation_expectation_config = parent_rpcs.delete_evaluation_expectation if parent_rpcs.respond_to? :delete_evaluation_expectation
3738
+ @delete_evaluation_expectation = ::Gapic::Config::Method.new delete_evaluation_expectation_config
3739
+ create_scheduled_evaluation_run_config = parent_rpcs.create_scheduled_evaluation_run if parent_rpcs.respond_to? :create_scheduled_evaluation_run
3740
+ @create_scheduled_evaluation_run = ::Gapic::Config::Method.new create_scheduled_evaluation_run_config
3741
+ get_scheduled_evaluation_run_config = parent_rpcs.get_scheduled_evaluation_run if parent_rpcs.respond_to? :get_scheduled_evaluation_run
3742
+ @get_scheduled_evaluation_run = ::Gapic::Config::Method.new get_scheduled_evaluation_run_config
3743
+ list_scheduled_evaluation_runs_config = parent_rpcs.list_scheduled_evaluation_runs if parent_rpcs.respond_to? :list_scheduled_evaluation_runs
3744
+ @list_scheduled_evaluation_runs = ::Gapic::Config::Method.new list_scheduled_evaluation_runs_config
3745
+ update_scheduled_evaluation_run_config = parent_rpcs.update_scheduled_evaluation_run if parent_rpcs.respond_to? :update_scheduled_evaluation_run
3746
+ @update_scheduled_evaluation_run = ::Gapic::Config::Method.new update_scheduled_evaluation_run_config
3747
+ delete_scheduled_evaluation_run_config = parent_rpcs.delete_scheduled_evaluation_run if parent_rpcs.respond_to? :delete_scheduled_evaluation_run
3748
+ @delete_scheduled_evaluation_run = ::Gapic::Config::Method.new delete_scheduled_evaluation_run_config
3749
+ test_persona_voice_config = parent_rpcs.test_persona_voice if parent_rpcs.respond_to? :test_persona_voice
3750
+ @test_persona_voice = ::Gapic::Config::Method.new test_persona_voice_config
3751
+ export_evaluations_config = parent_rpcs.export_evaluations if parent_rpcs.respond_to? :export_evaluations
3752
+ @export_evaluations = ::Gapic::Config::Method.new export_evaluations_config
3753
+ export_evaluation_runs_config = parent_rpcs.export_evaluation_runs if parent_rpcs.respond_to? :export_evaluation_runs
3754
+ @export_evaluation_runs = ::Gapic::Config::Method.new export_evaluation_runs_config
3755
+ export_evaluation_results_config = parent_rpcs.export_evaluation_results if parent_rpcs.respond_to? :export_evaluation_results
3756
+ @export_evaluation_results = ::Gapic::Config::Method.new export_evaluation_results_config
3757
+ run_evaluation_result_metrics_config = parent_rpcs.run_evaluation_result_metrics if parent_rpcs.respond_to? :run_evaluation_result_metrics
3758
+ @run_evaluation_result_metrics = ::Gapic::Config::Method.new run_evaluation_result_metrics_config
3759
+
3760
+ yield self if block_given?
3761
+ end
3762
+ end
3763
+ end
3764
+ end
3765
+ end
3766
+ end
3767
+ end
3768
+ end
3769
+ end
3770
+ end