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