google-cloud-ai_platform-v1 1.41.0 → 1.43.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.
- checksums.yaml +4 -4
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/client.rb +220 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/operations.rb +849 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest/client.rb +206 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest/operations.rb +4479 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest/service_stub.rb +140 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest.rb +1 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service.rb +1 -0
- data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/reasoning_engine_execution_service_pb.rb +8 -1
- data/lib/google/cloud/aiplatform/v1/reasoning_engine_execution_service_services_pb.rb +4 -0
- data/lib/google/cloud/aiplatform/v1/tool_pb.rb +2 -1
- data/proto_docs/google/cloud/aiplatform/v1/reasoning_engine_execution_service.rb +63 -0
- data/proto_docs/google/cloud/aiplatform/v1/tool.rb +38 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5ef7b57b0db627d65dd8361a39ebb6f62a61ba8ef8ad0a815d2c8ec2c3e4ac36
|
|
4
|
+
data.tar.gz: 1fdf372a40258ad9529888ffab4df00c992b90380d72d4c01d0c178fe182e4a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96c7248f54bb63a4217644ae920d1355b77e87b90eb791407960cc282771592e8a49d5b0cf8ac9b9716b3311e672a30d92059684a916a068b917e648645189e5
|
|
7
|
+
data.tar.gz: 7f0569ebdb4498f4195ad613818bf8580c42724515a129458395c8dd671488b6e369c7eaf4e8f04d35584063db517d69943b0854b6a475d41ec0a2c588abc847
|
|
@@ -151,6 +151,13 @@ module Google
|
|
|
151
151
|
@quota_project_id = @config.quota_project
|
|
152
152
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
153
153
|
|
|
154
|
+
@operations_client = Operations.new do |config|
|
|
155
|
+
config.credentials = credentials
|
|
156
|
+
config.quota_project = @quota_project_id
|
|
157
|
+
config.endpoint = @config.endpoint
|
|
158
|
+
config.universe_domain = @config.universe_domain
|
|
159
|
+
end
|
|
160
|
+
|
|
154
161
|
@reasoning_engine_execution_service_stub = ::Gapic::ServiceStub.new(
|
|
155
162
|
::Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Stub,
|
|
156
163
|
credentials: credentials,
|
|
@@ -190,6 +197,13 @@ module Google
|
|
|
190
197
|
end
|
|
191
198
|
end
|
|
192
199
|
|
|
200
|
+
##
|
|
201
|
+
# Get the associated client for long-running operations.
|
|
202
|
+
#
|
|
203
|
+
# @return [::Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Operations]
|
|
204
|
+
#
|
|
205
|
+
attr_reader :operations_client
|
|
206
|
+
|
|
193
207
|
##
|
|
194
208
|
# Get the associated client for mix-in of the Locations.
|
|
195
209
|
#
|
|
@@ -404,6 +418,198 @@ module Google
|
|
|
404
418
|
raise ::Google::Cloud::Error.from_error(e)
|
|
405
419
|
end
|
|
406
420
|
|
|
421
|
+
##
|
|
422
|
+
# Async query using a reasoning engine.
|
|
423
|
+
#
|
|
424
|
+
# @overload async_query_reasoning_engine(request, options = nil)
|
|
425
|
+
# Pass arguments to `async_query_reasoning_engine` via a request object, either of type
|
|
426
|
+
# {::Google::Cloud::AIPlatform::V1::AsyncQueryReasoningEngineRequest} or an equivalent Hash.
|
|
427
|
+
#
|
|
428
|
+
# @param request [::Google::Cloud::AIPlatform::V1::AsyncQueryReasoningEngineRequest, ::Hash]
|
|
429
|
+
# A request object representing the call parameters. Required. To specify no
|
|
430
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
431
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
432
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
433
|
+
#
|
|
434
|
+
# @overload async_query_reasoning_engine(name: nil, input_gcs_uri: nil, output_gcs_uri: nil)
|
|
435
|
+
# Pass arguments to `async_query_reasoning_engine` via keyword arguments. Note that at
|
|
436
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
437
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
438
|
+
#
|
|
439
|
+
# @param name [::String]
|
|
440
|
+
# Required. The name of the ReasoningEngine resource to use.
|
|
441
|
+
# Format:
|
|
442
|
+
# `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
|
|
443
|
+
# @param input_gcs_uri [::String]
|
|
444
|
+
# Optional. Input Cloud Storage URI for the Async query.
|
|
445
|
+
# @param output_gcs_uri [::String]
|
|
446
|
+
# Optional. Output Cloud Storage URI for the Async query.
|
|
447
|
+
#
|
|
448
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
449
|
+
# @yieldparam response [::Gapic::Operation]
|
|
450
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
451
|
+
#
|
|
452
|
+
# @return [::Gapic::Operation]
|
|
453
|
+
#
|
|
454
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
455
|
+
#
|
|
456
|
+
# @example Basic example
|
|
457
|
+
# require "google/cloud/ai_platform/v1"
|
|
458
|
+
#
|
|
459
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
460
|
+
# client = Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Client.new
|
|
461
|
+
#
|
|
462
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
463
|
+
# request = Google::Cloud::AIPlatform::V1::AsyncQueryReasoningEngineRequest.new
|
|
464
|
+
#
|
|
465
|
+
# # Call the async_query_reasoning_engine method.
|
|
466
|
+
# result = client.async_query_reasoning_engine request
|
|
467
|
+
#
|
|
468
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
469
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
470
|
+
# # Here is how to wait for a response.
|
|
471
|
+
# result.wait_until_done! timeout: 60
|
|
472
|
+
# if result.response?
|
|
473
|
+
# p result.response
|
|
474
|
+
# else
|
|
475
|
+
# puts "No response received."
|
|
476
|
+
# end
|
|
477
|
+
#
|
|
478
|
+
def async_query_reasoning_engine request, options = nil
|
|
479
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
480
|
+
|
|
481
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::AsyncQueryReasoningEngineRequest
|
|
482
|
+
|
|
483
|
+
# Converts hash and nil to an options object
|
|
484
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
485
|
+
|
|
486
|
+
# Customize the options with defaults
|
|
487
|
+
metadata = @config.rpcs.async_query_reasoning_engine.metadata.to_h
|
|
488
|
+
|
|
489
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
490
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
491
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
492
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
493
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
494
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
495
|
+
|
|
496
|
+
header_params = {}
|
|
497
|
+
if request.name
|
|
498
|
+
header_params["name"] = request.name
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
502
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
503
|
+
|
|
504
|
+
options.apply_defaults timeout: @config.rpcs.async_query_reasoning_engine.timeout,
|
|
505
|
+
metadata: metadata,
|
|
506
|
+
retry_policy: @config.rpcs.async_query_reasoning_engine.retry_policy
|
|
507
|
+
|
|
508
|
+
options.apply_defaults timeout: @config.timeout,
|
|
509
|
+
metadata: @config.metadata,
|
|
510
|
+
retry_policy: @config.retry_policy
|
|
511
|
+
|
|
512
|
+
@reasoning_engine_execution_service_stub.call_rpc :async_query_reasoning_engine, request, options: options do |response, operation|
|
|
513
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
514
|
+
yield response, operation if block_given?
|
|
515
|
+
throw :response, response
|
|
516
|
+
end
|
|
517
|
+
rescue ::GRPC::BadStatus => e
|
|
518
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
##
|
|
522
|
+
# Cancels an AsyncQueryReasoningEngine operation.
|
|
523
|
+
#
|
|
524
|
+
# @overload cancel_async_query_reasoning_engine(request, options = nil)
|
|
525
|
+
# Pass arguments to `cancel_async_query_reasoning_engine` via a request object, either of type
|
|
526
|
+
# {::Google::Cloud::AIPlatform::V1::CancelAsyncQueryReasoningEngineRequest} or an equivalent Hash.
|
|
527
|
+
#
|
|
528
|
+
# @param request [::Google::Cloud::AIPlatform::V1::CancelAsyncQueryReasoningEngineRequest, ::Hash]
|
|
529
|
+
# A request object representing the call parameters. Required. To specify no
|
|
530
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
531
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
532
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
533
|
+
#
|
|
534
|
+
# @overload cancel_async_query_reasoning_engine(name: nil, operation_name: nil)
|
|
535
|
+
# Pass arguments to `cancel_async_query_reasoning_engine` via keyword arguments. Note that at
|
|
536
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
537
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
538
|
+
#
|
|
539
|
+
# @param name [::String]
|
|
540
|
+
# Required. The name of the ReasoningEngine resource to use.
|
|
541
|
+
# Format:
|
|
542
|
+
# `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
|
|
543
|
+
# @param operation_name [::String]
|
|
544
|
+
# Required. The name of the longrunning operation returned from
|
|
545
|
+
# AsyncQueryReasoningEngine.
|
|
546
|
+
# Format:
|
|
547
|
+
# `projects/{project}/locations/{location}/operations/{operation}`
|
|
548
|
+
#
|
|
549
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
550
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::CancelAsyncQueryReasoningEngineResponse]
|
|
551
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
552
|
+
#
|
|
553
|
+
# @return [::Google::Cloud::AIPlatform::V1::CancelAsyncQueryReasoningEngineResponse]
|
|
554
|
+
#
|
|
555
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
556
|
+
#
|
|
557
|
+
# @example Basic example
|
|
558
|
+
# require "google/cloud/ai_platform/v1"
|
|
559
|
+
#
|
|
560
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
561
|
+
# client = Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Client.new
|
|
562
|
+
#
|
|
563
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
564
|
+
# request = Google::Cloud::AIPlatform::V1::CancelAsyncQueryReasoningEngineRequest.new
|
|
565
|
+
#
|
|
566
|
+
# # Call the cancel_async_query_reasoning_engine method.
|
|
567
|
+
# result = client.cancel_async_query_reasoning_engine request
|
|
568
|
+
#
|
|
569
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::CancelAsyncQueryReasoningEngineResponse.
|
|
570
|
+
# p result
|
|
571
|
+
#
|
|
572
|
+
def cancel_async_query_reasoning_engine request, options = nil
|
|
573
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
574
|
+
|
|
575
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CancelAsyncQueryReasoningEngineRequest
|
|
576
|
+
|
|
577
|
+
# Converts hash and nil to an options object
|
|
578
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
579
|
+
|
|
580
|
+
# Customize the options with defaults
|
|
581
|
+
metadata = @config.rpcs.cancel_async_query_reasoning_engine.metadata.to_h
|
|
582
|
+
|
|
583
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
584
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
585
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
586
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
587
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
588
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
589
|
+
|
|
590
|
+
header_params = {}
|
|
591
|
+
if request.name
|
|
592
|
+
header_params["name"] = request.name
|
|
593
|
+
end
|
|
594
|
+
|
|
595
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
596
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
597
|
+
|
|
598
|
+
options.apply_defaults timeout: @config.rpcs.cancel_async_query_reasoning_engine.timeout,
|
|
599
|
+
metadata: metadata,
|
|
600
|
+
retry_policy: @config.rpcs.cancel_async_query_reasoning_engine.retry_policy
|
|
601
|
+
|
|
602
|
+
options.apply_defaults timeout: @config.timeout,
|
|
603
|
+
metadata: @config.metadata,
|
|
604
|
+
retry_policy: @config.retry_policy
|
|
605
|
+
|
|
606
|
+
@reasoning_engine_execution_service_stub.call_rpc :cancel_async_query_reasoning_engine, request, options: options do |response, operation|
|
|
607
|
+
yield response, operation if block_given?
|
|
608
|
+
end
|
|
609
|
+
rescue ::GRPC::BadStatus => e
|
|
610
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
611
|
+
end
|
|
612
|
+
|
|
407
613
|
##
|
|
408
614
|
# Configuration class for the ReasoningEngineExecutionService API.
|
|
409
615
|
#
|
|
@@ -597,6 +803,16 @@ module Google
|
|
|
597
803
|
# @return [::Gapic::Config::Method]
|
|
598
804
|
#
|
|
599
805
|
attr_reader :stream_query_reasoning_engine
|
|
806
|
+
##
|
|
807
|
+
# RPC-specific configuration for `async_query_reasoning_engine`
|
|
808
|
+
# @return [::Gapic::Config::Method]
|
|
809
|
+
#
|
|
810
|
+
attr_reader :async_query_reasoning_engine
|
|
811
|
+
##
|
|
812
|
+
# RPC-specific configuration for `cancel_async_query_reasoning_engine`
|
|
813
|
+
# @return [::Gapic::Config::Method]
|
|
814
|
+
#
|
|
815
|
+
attr_reader :cancel_async_query_reasoning_engine
|
|
600
816
|
|
|
601
817
|
# @private
|
|
602
818
|
def initialize parent_rpcs = nil
|
|
@@ -604,6 +820,10 @@ module Google
|
|
|
604
820
|
@query_reasoning_engine = ::Gapic::Config::Method.new query_reasoning_engine_config
|
|
605
821
|
stream_query_reasoning_engine_config = parent_rpcs.stream_query_reasoning_engine if parent_rpcs.respond_to? :stream_query_reasoning_engine
|
|
606
822
|
@stream_query_reasoning_engine = ::Gapic::Config::Method.new stream_query_reasoning_engine_config
|
|
823
|
+
async_query_reasoning_engine_config = parent_rpcs.async_query_reasoning_engine if parent_rpcs.respond_to? :async_query_reasoning_engine
|
|
824
|
+
@async_query_reasoning_engine = ::Gapic::Config::Method.new async_query_reasoning_engine_config
|
|
825
|
+
cancel_async_query_reasoning_engine_config = parent_rpcs.cancel_async_query_reasoning_engine if parent_rpcs.respond_to? :cancel_async_query_reasoning_engine
|
|
826
|
+
@cancel_async_query_reasoning_engine = ::Gapic::Config::Method.new cancel_async_query_reasoning_engine_config
|
|
607
827
|
|
|
608
828
|
yield self if block_given?
|
|
609
829
|
end
|