google-cloud-ai_platform-v1 1.41.0 → 1.42.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 +121 -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 +114 -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 +70 -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 +6 -1
- data/lib/google/cloud/aiplatform/v1/reasoning_engine_execution_service_services_pb.rb +2 -0
- data/lib/google/cloud/aiplatform/v1/tool_pb.rb +2 -1
- data/proto_docs/google/cloud/aiplatform/v1/reasoning_engine_execution_service.rb +38 -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: c68982335b67c8bf97ccc1631e919610773fc84011d02645e7059baaf07e685c
|
|
4
|
+
data.tar.gz: 1169e983668bfa777586e138faa197e066575b42a23820f16f4674b19fd9c471
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 13718e06ccd56d1a535db03636c51bc10ad1dd33c19f19f152f118b81d2e0fb5aa4b75132ca9e56acb551899ea794de0b223806aeaf8abb829f994c1a7f82ab0
|
|
7
|
+
data.tar.gz: 76e39adf28178e27dc89b67b0ca4fa9999bcf521d4a16c2ab8539286ceb063c83fa9af0edb541cdd51db6974294c1c4cc31c38b8f817c75f0f1c7e07dbe23a7f
|
|
@@ -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,106 @@ 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
|
+
|
|
407
521
|
##
|
|
408
522
|
# Configuration class for the ReasoningEngineExecutionService API.
|
|
409
523
|
#
|
|
@@ -597,6 +711,11 @@ module Google
|
|
|
597
711
|
# @return [::Gapic::Config::Method]
|
|
598
712
|
#
|
|
599
713
|
attr_reader :stream_query_reasoning_engine
|
|
714
|
+
##
|
|
715
|
+
# RPC-specific configuration for `async_query_reasoning_engine`
|
|
716
|
+
# @return [::Gapic::Config::Method]
|
|
717
|
+
#
|
|
718
|
+
attr_reader :async_query_reasoning_engine
|
|
600
719
|
|
|
601
720
|
# @private
|
|
602
721
|
def initialize parent_rpcs = nil
|
|
@@ -604,6 +723,8 @@ module Google
|
|
|
604
723
|
@query_reasoning_engine = ::Gapic::Config::Method.new query_reasoning_engine_config
|
|
605
724
|
stream_query_reasoning_engine_config = parent_rpcs.stream_query_reasoning_engine if parent_rpcs.respond_to? :stream_query_reasoning_engine
|
|
606
725
|
@stream_query_reasoning_engine = ::Gapic::Config::Method.new stream_query_reasoning_engine_config
|
|
726
|
+
async_query_reasoning_engine_config = parent_rpcs.async_query_reasoning_engine if parent_rpcs.respond_to? :async_query_reasoning_engine
|
|
727
|
+
@async_query_reasoning_engine = ::Gapic::Config::Method.new async_query_reasoning_engine_config
|
|
607
728
|
|
|
608
729
|
yield self if block_given?
|
|
609
730
|
end
|