google-cloud-ces-v1beta 0.1.0 → 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 (52) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/ces/v1beta/agent_card_pb.rb +26 -0
  4. data/lib/google/cloud/ces/v1beta/agent_pb.rb +1 -1
  5. data/lib/google/cloud/ces/v1beta/agent_service/client.rb +10 -4
  6. data/lib/google/cloud/ces/v1beta/agent_service/operations.rb +2 -0
  7. data/lib/google/cloud/ces/v1beta/agent_service/rest/client.rb +10 -4
  8. data/lib/google/cloud/ces/v1beta/agent_service/rest/operations.rb +2 -0
  9. data/lib/google/cloud/ces/v1beta/agent_service_pb.rb +2 -1
  10. data/lib/google/cloud/ces/v1beta/app_pb.rb +4 -1
  11. data/lib/google/cloud/ces/v1beta/conversation_pb.rb +1 -1
  12. data/lib/google/cloud/ces/v1beta/deployment_pb.rb +5 -1
  13. data/lib/google/cloud/ces/v1beta/evaluation_metrics_config_pb.rb +31 -0
  14. data/lib/google/cloud/ces/v1beta/evaluation_pb.rb +2 -1
  15. data/lib/google/cloud/ces/v1beta/evaluation_service/client.rb +318 -0
  16. data/lib/google/cloud/ces/v1beta/evaluation_service/operations.rb +2 -0
  17. data/lib/google/cloud/ces/v1beta/evaluation_service/rest/client.rb +297 -0
  18. data/lib/google/cloud/ces/v1beta/evaluation_service/rest/operations.rb +2 -0
  19. data/lib/google/cloud/ces/v1beta/evaluation_service/rest/service_stub.rb +186 -0
  20. data/lib/google/cloud/ces/v1beta/evaluation_service_pb.rb +8 -1
  21. data/lib/google/cloud/ces/v1beta/evaluation_service_services_pb.rb +6 -0
  22. data/lib/google/cloud/ces/v1beta/mcp_tool_pb.rb +2 -1
  23. data/lib/google/cloud/ces/v1beta/mcp_toolset_pb.rb +4 -1
  24. data/lib/google/cloud/ces/v1beta/python_function_pb.rb +2 -1
  25. data/lib/google/cloud/ces/v1beta/session_service/client.rb +2 -0
  26. data/lib/google/cloud/ces/v1beta/session_service/rest/client.rb +2 -0
  27. data/lib/google/cloud/ces/v1beta/session_service_pb.rb +2 -1
  28. data/lib/google/cloud/ces/v1beta/tool_pb.rb +3 -1
  29. data/lib/google/cloud/ces/v1beta/tool_service/client.rb +7 -1
  30. data/lib/google/cloud/ces/v1beta/tool_service/rest/client.rb +7 -1
  31. data/lib/google/cloud/ces/v1beta/tool_service_pb.rb +2 -1
  32. data/lib/google/cloud/ces/v1beta/version.rb +1 -1
  33. data/lib/google/cloud/ces/v1beta/widget_service/client.rb +2 -0
  34. data/lib/google/cloud/ces/v1beta/widget_service/rest/client.rb +2 -0
  35. data/lib/google/cloud/ces/v1beta/widget_tool_pb.rb +3 -1
  36. data/proto_docs/google/cloud/ces/v1beta/agent.rb +9 -0
  37. data/proto_docs/google/cloud/ces/v1beta/agent_card.rb +122 -0
  38. data/proto_docs/google/cloud/ces/v1beta/agent_service.rb +24 -3
  39. data/proto_docs/google/cloud/ces/v1beta/app.rb +50 -3
  40. data/proto_docs/google/cloud/ces/v1beta/conversation.rb +9 -6
  41. data/proto_docs/google/cloud/ces/v1beta/deployment.rb +61 -0
  42. data/proto_docs/google/cloud/ces/v1beta/evaluation.rb +82 -13
  43. data/proto_docs/google/cloud/ces/v1beta/evaluation_metrics_config.rb +151 -0
  44. data/proto_docs/google/cloud/ces/v1beta/evaluation_service.rb +80 -2
  45. data/proto_docs/google/cloud/ces/v1beta/mcp_tool.rb +25 -0
  46. data/proto_docs/google/cloud/ces/v1beta/mcp_toolset.rb +47 -0
  47. data/proto_docs/google/cloud/ces/v1beta/python_function.rb +3 -0
  48. data/proto_docs/google/cloud/ces/v1beta/session_service.rb +3 -0
  49. data/proto_docs/google/cloud/ces/v1beta/tool.rb +21 -11
  50. data/proto_docs/google/cloud/ces/v1beta/tool_service.rb +12 -0
  51. data/proto_docs/google/cloud/ces/v1beta/widget_tool.rb +36 -0
  52. metadata +7 -3
@@ -3079,6 +3079,280 @@ module Google
3079
3079
  raise ::Google::Cloud::Error.from_error(e)
3080
3080
  end
3081
3081
 
3082
+ ##
3083
+ # Exports evaluations runs.
3084
+ #
3085
+ # @overload export_evaluation_runs(request, options = nil)
3086
+ # Pass arguments to `export_evaluation_runs` via a request object, either of type
3087
+ # {::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest} or an equivalent Hash.
3088
+ #
3089
+ # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest, ::Hash]
3090
+ # A request object representing the call parameters. Required. To specify no
3091
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3092
+ # @param options [::Gapic::CallOptions, ::Hash]
3093
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3094
+ #
3095
+ # @overload export_evaluation_runs(parent: nil, names: nil, export_options: nil)
3096
+ # Pass arguments to `export_evaluation_runs` via keyword arguments. Note that at
3097
+ # least one keyword argument is required. To specify no parameters, or to keep all
3098
+ # the default parameter values, pass an empty Hash as a request object (see above).
3099
+ #
3100
+ # @param parent [::String]
3101
+ # Required. The resource name of the app to export evaluation runs from.
3102
+ # Format: `projects/{project}/locations/{location}/apps/{app}`
3103
+ # @param names [::Array<::String>]
3104
+ # Required. The resource names of the evaluation runs to export.
3105
+ # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash]
3106
+ # Optional. The export options for the evaluation runs.
3107
+ # @yield [result, operation] Access the result along with the TransportOperation object
3108
+ # @yieldparam result [::Gapic::Operation]
3109
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3110
+ #
3111
+ # @return [::Gapic::Operation]
3112
+ #
3113
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3114
+ #
3115
+ # @example Basic example
3116
+ # require "google/cloud/ces/v1beta"
3117
+ #
3118
+ # # Create a client object. The client can be reused for multiple calls.
3119
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
3120
+ #
3121
+ # # Create a request. To set request fields, pass in keyword arguments.
3122
+ # request = Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest.new
3123
+ #
3124
+ # # Call the export_evaluation_runs method.
3125
+ # result = client.export_evaluation_runs request
3126
+ #
3127
+ # # The returned object is of type Gapic::Operation. You can use it to
3128
+ # # check the status of an operation, cancel it, or wait for results.
3129
+ # # Here is how to wait for a response.
3130
+ # result.wait_until_done! timeout: 60
3131
+ # if result.response?
3132
+ # p result.response
3133
+ # else
3134
+ # puts "No response received."
3135
+ # end
3136
+ #
3137
+ def export_evaluation_runs request, options = nil
3138
+ raise ::ArgumentError, "request must be provided" if request.nil?
3139
+
3140
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest
3141
+
3142
+ # Converts hash and nil to an options object
3143
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3144
+
3145
+ # Customize the options with defaults
3146
+ call_metadata = @config.rpcs.export_evaluation_runs.metadata.to_h
3147
+
3148
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3149
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3150
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3151
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
3152
+ transports_version_send: [:rest]
3153
+
3154
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3155
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3156
+
3157
+ options.apply_defaults timeout: @config.rpcs.export_evaluation_runs.timeout,
3158
+ metadata: call_metadata,
3159
+ retry_policy: @config.rpcs.export_evaluation_runs.retry_policy
3160
+
3161
+ options.apply_defaults timeout: @config.timeout,
3162
+ metadata: @config.metadata,
3163
+ retry_policy: @config.retry_policy
3164
+
3165
+ @evaluation_service_stub.export_evaluation_runs request, options do |result, operation|
3166
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3167
+ yield result, operation if block_given?
3168
+ throw :response, result
3169
+ end
3170
+ rescue ::Gapic::Rest::Error => e
3171
+ raise ::Google::Cloud::Error.from_error(e)
3172
+ end
3173
+
3174
+ ##
3175
+ # Exports evaluations results.
3176
+ #
3177
+ # @overload export_evaluation_results(request, options = nil)
3178
+ # Pass arguments to `export_evaluation_results` via a request object, either of type
3179
+ # {::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest} or an equivalent Hash.
3180
+ #
3181
+ # @param request [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest, ::Hash]
3182
+ # A request object representing the call parameters. Required. To specify no
3183
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3184
+ # @param options [::Gapic::CallOptions, ::Hash]
3185
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3186
+ #
3187
+ # @overload export_evaluation_results(parent: nil, names: nil, export_options: nil)
3188
+ # Pass arguments to `export_evaluation_results` via keyword arguments. Note that at
3189
+ # least one keyword argument is required. To specify no parameters, or to keep all
3190
+ # the default parameter values, pass an empty Hash as a request object (see above).
3191
+ #
3192
+ # @param parent [::String]
3193
+ # Required. The resource name of the evaluation to export evaluation results
3194
+ # from. Format:
3195
+ # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}`
3196
+ # @param names [::Array<::String>]
3197
+ # Required. The resource names of the evaluation results to export.
3198
+ # @param export_options [::Google::Cloud::Ces::V1beta::ExportOptions, ::Hash]
3199
+ # Optional. The export options for the evaluation results.
3200
+ # @yield [result, operation] Access the result along with the TransportOperation object
3201
+ # @yieldparam result [::Gapic::Operation]
3202
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3203
+ #
3204
+ # @return [::Gapic::Operation]
3205
+ #
3206
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3207
+ #
3208
+ # @example Basic example
3209
+ # require "google/cloud/ces/v1beta"
3210
+ #
3211
+ # # Create a client object. The client can be reused for multiple calls.
3212
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
3213
+ #
3214
+ # # Create a request. To set request fields, pass in keyword arguments.
3215
+ # request = Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest.new
3216
+ #
3217
+ # # Call the export_evaluation_results method.
3218
+ # result = client.export_evaluation_results request
3219
+ #
3220
+ # # The returned object is of type Gapic::Operation. You can use it to
3221
+ # # check the status of an operation, cancel it, or wait for results.
3222
+ # # Here is how to wait for a response.
3223
+ # result.wait_until_done! timeout: 60
3224
+ # if result.response?
3225
+ # p result.response
3226
+ # else
3227
+ # puts "No response received."
3228
+ # end
3229
+ #
3230
+ def export_evaluation_results request, options = nil
3231
+ raise ::ArgumentError, "request must be provided" if request.nil?
3232
+
3233
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest
3234
+
3235
+ # Converts hash and nil to an options object
3236
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3237
+
3238
+ # Customize the options with defaults
3239
+ call_metadata = @config.rpcs.export_evaluation_results.metadata.to_h
3240
+
3241
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3242
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3243
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3244
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
3245
+ transports_version_send: [:rest]
3246
+
3247
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3248
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3249
+
3250
+ options.apply_defaults timeout: @config.rpcs.export_evaluation_results.timeout,
3251
+ metadata: call_metadata,
3252
+ retry_policy: @config.rpcs.export_evaluation_results.retry_policy
3253
+
3254
+ options.apply_defaults timeout: @config.timeout,
3255
+ metadata: @config.metadata,
3256
+ retry_policy: @config.retry_policy
3257
+
3258
+ @evaluation_service_stub.export_evaluation_results request, options do |result, operation|
3259
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3260
+ yield result, operation if block_given?
3261
+ throw :response, result
3262
+ end
3263
+ rescue ::Gapic::Rest::Error => e
3264
+ raise ::Google::Cloud::Error.from_error(e)
3265
+ end
3266
+
3267
+ ##
3268
+ # Runs metrics on an existing evaluation result.
3269
+ #
3270
+ # @overload run_evaluation_result_metrics(request, options = nil)
3271
+ # Pass arguments to `run_evaluation_result_metrics` via a request object, either of type
3272
+ # {::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest} or an equivalent Hash.
3273
+ #
3274
+ # @param request [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest, ::Hash]
3275
+ # A request object representing the call parameters. Required. To specify no
3276
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3277
+ # @param options [::Gapic::CallOptions, ::Hash]
3278
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3279
+ #
3280
+ # @overload run_evaluation_result_metrics(evaluation_result_id: nil)
3281
+ # Pass arguments to `run_evaluation_result_metrics` via keyword arguments. Note that at
3282
+ # least one keyword argument is required. To specify no parameters, or to keep all
3283
+ # the default parameter values, pass an empty Hash as a request object (see above).
3284
+ #
3285
+ # @param evaluation_result_id [::String]
3286
+ # Required. The evaluation result to run metrics for.
3287
+ # Format:
3288
+ # `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}/results/{evaluation_result_id}`
3289
+ # @yield [result, operation] Access the result along with the TransportOperation object
3290
+ # @yieldparam result [::Gapic::Operation]
3291
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3292
+ #
3293
+ # @return [::Gapic::Operation]
3294
+ #
3295
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3296
+ #
3297
+ # @example Basic example
3298
+ # require "google/cloud/ces/v1beta"
3299
+ #
3300
+ # # Create a client object. The client can be reused for multiple calls.
3301
+ # client = Google::Cloud::Ces::V1beta::EvaluationService::Rest::Client.new
3302
+ #
3303
+ # # Create a request. To set request fields, pass in keyword arguments.
3304
+ # request = Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest.new
3305
+ #
3306
+ # # Call the run_evaluation_result_metrics method.
3307
+ # result = client.run_evaluation_result_metrics request
3308
+ #
3309
+ # # The returned object is of type Gapic::Operation. You can use it to
3310
+ # # check the status of an operation, cancel it, or wait for results.
3311
+ # # Here is how to wait for a response.
3312
+ # result.wait_until_done! timeout: 60
3313
+ # if result.response?
3314
+ # p result.response
3315
+ # else
3316
+ # puts "No response received."
3317
+ # end
3318
+ #
3319
+ def run_evaluation_result_metrics request, options = nil
3320
+ raise ::ArgumentError, "request must be provided" if request.nil?
3321
+
3322
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest
3323
+
3324
+ # Converts hash and nil to an options object
3325
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3326
+
3327
+ # Customize the options with defaults
3328
+ call_metadata = @config.rpcs.run_evaluation_result_metrics.metadata.to_h
3329
+
3330
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3331
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3332
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3333
+ gapic_version: ::Google::Cloud::Ces::V1beta::VERSION,
3334
+ transports_version_send: [:rest]
3335
+
3336
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3337
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3338
+
3339
+ options.apply_defaults timeout: @config.rpcs.run_evaluation_result_metrics.timeout,
3340
+ metadata: call_metadata,
3341
+ retry_policy: @config.rpcs.run_evaluation_result_metrics.retry_policy
3342
+
3343
+ options.apply_defaults timeout: @config.timeout,
3344
+ metadata: @config.metadata,
3345
+ retry_policy: @config.retry_policy
3346
+
3347
+ @evaluation_service_stub.run_evaluation_result_metrics request, options do |result, operation|
3348
+ result = ::Gapic::Operation.new result, @operations_client, options: options
3349
+ yield result, operation if block_given?
3350
+ throw :response, result
3351
+ end
3352
+ rescue ::Gapic::Rest::Error => e
3353
+ raise ::Google::Cloud::Error.from_error(e)
3354
+ end
3355
+
3082
3356
  ##
3083
3357
  # Configuration class for the EvaluationService REST API.
3084
3358
  #
@@ -3149,6 +3423,7 @@ module Google
3149
3423
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3150
3424
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3151
3425
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3426
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
3152
3427
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3153
3428
  # trigger a retry.
3154
3429
  # @return [::Hash]
@@ -3228,6 +3503,7 @@ module Google
3228
3503
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3229
3504
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3230
3505
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3506
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
3231
3507
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3232
3508
  # trigger a retry.
3233
3509
  #
@@ -3392,6 +3668,21 @@ module Google
3392
3668
  # @return [::Gapic::Config::Method]
3393
3669
  #
3394
3670
  attr_reader :export_evaluations
3671
+ ##
3672
+ # RPC-specific configuration for `export_evaluation_runs`
3673
+ # @return [::Gapic::Config::Method]
3674
+ #
3675
+ attr_reader :export_evaluation_runs
3676
+ ##
3677
+ # RPC-specific configuration for `export_evaluation_results`
3678
+ # @return [::Gapic::Config::Method]
3679
+ #
3680
+ attr_reader :export_evaluation_results
3681
+ ##
3682
+ # RPC-specific configuration for `run_evaluation_result_metrics`
3683
+ # @return [::Gapic::Config::Method]
3684
+ #
3685
+ attr_reader :run_evaluation_result_metrics
3395
3686
 
3396
3687
  # @private
3397
3688
  def initialize parent_rpcs = nil
@@ -3459,6 +3750,12 @@ module Google
3459
3750
  @test_persona_voice = ::Gapic::Config::Method.new test_persona_voice_config
3460
3751
  export_evaluations_config = parent_rpcs.export_evaluations if parent_rpcs.respond_to? :export_evaluations
3461
3752
  @export_evaluations = ::Gapic::Config::Method.new export_evaluations_config
3753
+ export_evaluation_runs_config = parent_rpcs.export_evaluation_runs if parent_rpcs.respond_to? :export_evaluation_runs
3754
+ @export_evaluation_runs = ::Gapic::Config::Method.new export_evaluation_runs_config
3755
+ export_evaluation_results_config = parent_rpcs.export_evaluation_results if parent_rpcs.respond_to? :export_evaluation_results
3756
+ @export_evaluation_results = ::Gapic::Config::Method.new export_evaluation_results_config
3757
+ run_evaluation_result_metrics_config = parent_rpcs.run_evaluation_result_metrics if parent_rpcs.respond_to? :run_evaluation_result_metrics
3758
+ @run_evaluation_result_metrics = ::Gapic::Config::Method.new run_evaluation_result_metrics_config
3462
3759
 
3463
3760
  yield self if block_given?
3464
3761
  end
@@ -541,6 +541,7 @@ module Google
541
541
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
542
542
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
543
543
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
544
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
544
545
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
545
546
  # trigger a retry.
546
547
  # @return [::Hash]
@@ -613,6 +614,7 @@ module Google
613
614
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
614
615
  # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
615
616
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
617
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
616
618
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
617
619
  # trigger a retry.
618
620
  #
@@ -1353,6 +1353,126 @@ module Google
1353
1353
  end
1354
1354
  end
1355
1355
 
1356
+ ##
1357
+ # Baseline implementation for the export_evaluation_runs REST call
1358
+ #
1359
+ # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest]
1360
+ # A request object representing the call parameters. Required.
1361
+ # @param options [::Gapic::CallOptions]
1362
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1363
+ #
1364
+ # @yield [result, operation] Access the result along with the TransportOperation object
1365
+ # @yieldparam result [::Google::Longrunning::Operation]
1366
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1367
+ #
1368
+ # @return [::Google::Longrunning::Operation]
1369
+ # A result object deserialized from the server's reply
1370
+ def export_evaluation_runs request_pb, options = nil
1371
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1372
+
1373
+ verb, uri, query_string_params, body = ServiceStub.transcode_export_evaluation_runs_request request_pb
1374
+ query_string_params = if query_string_params.any?
1375
+ query_string_params.to_h { |p| p.split "=", 2 }
1376
+ else
1377
+ {}
1378
+ end
1379
+
1380
+ response = @client_stub.make_http_request(
1381
+ verb,
1382
+ uri: uri,
1383
+ body: body || "",
1384
+ params: query_string_params,
1385
+ method_name: "export_evaluation_runs",
1386
+ options: options
1387
+ )
1388
+ operation = ::Gapic::Rest::TransportOperation.new response
1389
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1390
+ catch :response do
1391
+ yield result, operation if block_given?
1392
+ result
1393
+ end
1394
+ end
1395
+
1396
+ ##
1397
+ # Baseline implementation for the export_evaluation_results REST call
1398
+ #
1399
+ # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest]
1400
+ # A request object representing the call parameters. Required.
1401
+ # @param options [::Gapic::CallOptions]
1402
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1403
+ #
1404
+ # @yield [result, operation] Access the result along with the TransportOperation object
1405
+ # @yieldparam result [::Google::Longrunning::Operation]
1406
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1407
+ #
1408
+ # @return [::Google::Longrunning::Operation]
1409
+ # A result object deserialized from the server's reply
1410
+ def export_evaluation_results request_pb, options = nil
1411
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1412
+
1413
+ verb, uri, query_string_params, body = ServiceStub.transcode_export_evaluation_results_request request_pb
1414
+ query_string_params = if query_string_params.any?
1415
+ query_string_params.to_h { |p| p.split "=", 2 }
1416
+ else
1417
+ {}
1418
+ end
1419
+
1420
+ response = @client_stub.make_http_request(
1421
+ verb,
1422
+ uri: uri,
1423
+ body: body || "",
1424
+ params: query_string_params,
1425
+ method_name: "export_evaluation_results",
1426
+ options: options
1427
+ )
1428
+ operation = ::Gapic::Rest::TransportOperation.new response
1429
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1430
+ catch :response do
1431
+ yield result, operation if block_given?
1432
+ result
1433
+ end
1434
+ end
1435
+
1436
+ ##
1437
+ # Baseline implementation for the run_evaluation_result_metrics REST call
1438
+ #
1439
+ # @param request_pb [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest]
1440
+ # A request object representing the call parameters. Required.
1441
+ # @param options [::Gapic::CallOptions]
1442
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1443
+ #
1444
+ # @yield [result, operation] Access the result along with the TransportOperation object
1445
+ # @yieldparam result [::Google::Longrunning::Operation]
1446
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1447
+ #
1448
+ # @return [::Google::Longrunning::Operation]
1449
+ # A result object deserialized from the server's reply
1450
+ def run_evaluation_result_metrics request_pb, options = nil
1451
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1452
+
1453
+ verb, uri, query_string_params, body = ServiceStub.transcode_run_evaluation_result_metrics_request request_pb
1454
+ query_string_params = if query_string_params.any?
1455
+ query_string_params.to_h { |p| p.split "=", 2 }
1456
+ else
1457
+ {}
1458
+ end
1459
+
1460
+ response = @client_stub.make_http_request(
1461
+ verb,
1462
+ uri: uri,
1463
+ body: body || "",
1464
+ params: query_string_params,
1465
+ method_name: "run_evaluation_result_metrics",
1466
+ options: options
1467
+ )
1468
+ operation = ::Gapic::Rest::TransportOperation.new response
1469
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
1470
+ catch :response do
1471
+ yield result, operation if block_given?
1472
+ result
1473
+ end
1474
+ end
1475
+
1356
1476
  ##
1357
1477
  # @private
1358
1478
  #
@@ -2038,6 +2158,72 @@ module Google
2038
2158
  )
2039
2159
  transcoder.transcode request_pb
2040
2160
  end
2161
+
2162
+ ##
2163
+ # @private
2164
+ #
2165
+ # GRPC transcoding helper method for the export_evaluation_runs REST call
2166
+ #
2167
+ # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationRunsRequest]
2168
+ # A request object representing the call parameters. Required.
2169
+ # @return [Array(String, [String, nil], Hash{String => String})]
2170
+ # Uri, Body, Query string parameters
2171
+ def self.transcode_export_evaluation_runs_request request_pb
2172
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2173
+ .with_bindings(
2174
+ uri_method: :post,
2175
+ uri_template: "/v1beta/{parent}/evaluationRuns:export",
2176
+ body: "*",
2177
+ matches: [
2178
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/?$}, false]
2179
+ ]
2180
+ )
2181
+ transcoder.transcode request_pb
2182
+ end
2183
+
2184
+ ##
2185
+ # @private
2186
+ #
2187
+ # GRPC transcoding helper method for the export_evaluation_results REST call
2188
+ #
2189
+ # @param request_pb [::Google::Cloud::Ces::V1beta::ExportEvaluationResultsRequest]
2190
+ # A request object representing the call parameters. Required.
2191
+ # @return [Array(String, [String, nil], Hash{String => String})]
2192
+ # Uri, Body, Query string parameters
2193
+ def self.transcode_export_evaluation_results_request request_pb
2194
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2195
+ .with_bindings(
2196
+ uri_method: :post,
2197
+ uri_template: "/v1beta/{parent}/results:export",
2198
+ body: "*",
2199
+ matches: [
2200
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/?$}, false]
2201
+ ]
2202
+ )
2203
+ transcoder.transcode request_pb
2204
+ end
2205
+
2206
+ ##
2207
+ # @private
2208
+ #
2209
+ # GRPC transcoding helper method for the run_evaluation_result_metrics REST call
2210
+ #
2211
+ # @param request_pb [::Google::Cloud::Ces::V1beta::RunEvaluationResultMetricsRequest]
2212
+ # A request object representing the call parameters. Required.
2213
+ # @return [Array(String, [String, nil], Hash{String => String})]
2214
+ # Uri, Body, Query string parameters
2215
+ def self.transcode_run_evaluation_result_metrics_request request_pb
2216
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2217
+ .with_bindings(
2218
+ uri_method: :post,
2219
+ uri_template: "/v1beta/{evaluation_result_id}:runEvaluationResultMetrics",
2220
+ body: "*",
2221
+ matches: [
2222
+ ["evaluation_result_id", %r{^projects/[^/]+/locations/[^/]+/apps/[^/]+/evaluations/[^/]+/results/[^/]+/?$}, false]
2223
+ ]
2224
+ )
2225
+ transcoder.transcode request_pb
2226
+ end
2041
2227
  end
2042
2228
  end
2043
2229
  end