google-cloud-ai_platform-v1 0.61.0 → 0.63.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/ai_platform/v1/bindings_override.rb +24 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +11 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb +11 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/evaluation_service/client.rb +57 -0
- data/lib/google/cloud/ai_platform/v1/evaluation_service/rest/client.rb +57 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +26 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb +26 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/client.rb +879 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/paths.rb +88 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/rest/client.rb +827 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/rest/service_stub.rb +388 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/rest.rb +53 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service.rb +55 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/index_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/index_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/index_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/job_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/job_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/job_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/match_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/match_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/model_service/client.rb +124 -0
- data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +117 -0
- data/lib/google/cloud/ai_platform/v1/model_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/model_service/rest/service_stub.rb +61 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +21 -2
- data/lib/google/cloud/ai_platform/v1/prediction_service/paths.rb +19 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +21 -2
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/client.rb +600 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/paths.rb +52 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest/client.rb +571 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest/service_stub.rb +199 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest.rb +53 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service.rb +55 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/client.rb +921 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/operations.rb +821 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/paths.rb +69 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest/client.rb +869 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest/operations.rb +4328 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest/service_stub.rb +388 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service.rb +56 -0
- data/lib/google/cloud/ai_platform/v1/rest.rb +3 -0
- data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/schedule_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/schedule_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/vertex_rag_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vertex_rag_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1.rb +3 -0
- data/lib/google/cloud/aiplatform/v1/cached_content_pb.rb +54 -0
- data/lib/google/cloud/aiplatform/v1/content_pb.rb +3 -1
- data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +5 -2
- data/lib/google/cloud/aiplatform/v1/feature_view_pb.rb +2 -1
- data/lib/google/cloud/aiplatform/v1/gen_ai_cache_service_pb.rb +57 -0
- data/lib/google/cloud/aiplatform/v1/gen_ai_cache_service_services_pb.rb +54 -0
- data/lib/google/cloud/aiplatform/v1/model_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/model_service_pb.rb +4 -1
- data/lib/google/cloud/aiplatform/v1/model_service_services_pb.rb +2 -0
- data/lib/google/cloud/aiplatform/v1/notebook_runtime_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/reasoning_engine_execution_service_pb.rb +52 -0
- data/lib/google/cloud/aiplatform/v1/reasoning_engine_execution_service_services_pb.rb +47 -0
- data/lib/google/cloud/aiplatform/v1/reasoning_engine_pb.rb +51 -0
- data/lib/google/cloud/aiplatform/v1/reasoning_engine_service_pb.rb +62 -0
- data/lib/google/cloud/aiplatform/v1/reasoning_engine_service_services_pb.rb +53 -0
- data/lib/google/cloud/aiplatform/v1/tool_pb.rb +9 -1
- data/proto_docs/google/cloud/aiplatform/v1/batch_prediction_job.rb +12 -0
- data/proto_docs/google/cloud/aiplatform/v1/cached_content.rb +105 -0
- data/proto_docs/google/cloud/aiplatform/v1/content.rb +61 -0
- data/proto_docs/google/cloud/aiplatform/v1/custom_job.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/data_labeling_job.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/dataset.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/dataset_service.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +57 -5
- data/proto_docs/google/cloud/aiplatform/v1/evaluation_service.rb +100 -0
- data/proto_docs/google/cloud/aiplatform/v1/explanation.rb +16 -0
- data/proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/feature_online_store.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb +18 -0
- data/proto_docs/google/cloud/aiplatform/v1/feature_view.rb +39 -0
- data/proto_docs/google/cloud/aiplatform/v1/featurestore_online_service.rb +24 -0
- data/proto_docs/google/cloud/aiplatform/v1/featurestore_service.rb +29 -0
- data/proto_docs/google/cloud/aiplatform/v1/gen_ai_cache_service.rb +108 -0
- data/proto_docs/google/cloud/aiplatform/v1/index.rb +6 -0
- data/proto_docs/google/cloud/aiplatform/v1/io.rb +8 -0
- data/proto_docs/google/cloud/aiplatform/v1/migratable_resource.rb +8 -0
- data/proto_docs/google/cloud/aiplatform/v1/migration_service.rb +18 -0
- data/proto_docs/google/cloud/aiplatform/v1/model.rb +7 -0
- data/proto_docs/google/cloud/aiplatform/v1/model_evaluation_slice.rb +10 -0
- data/proto_docs/google/cloud/aiplatform/v1/model_monitoring.rb +10 -0
- data/proto_docs/google/cloud/aiplatform/v1/model_service.rb +63 -0
- data/proto_docs/google/cloud/aiplatform/v1/notebook_execution_job.rb +14 -0
- data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb +42 -2
- data/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +24 -0
- data/proto_docs/google/cloud/aiplatform/v1/publisher_model.rb +14 -0
- data/proto_docs/google/cloud/aiplatform/v1/reasoning_engine.rb +87 -0
- data/proto_docs/google/cloud/aiplatform/v1/reasoning_engine_execution_service.rb +73 -0
- data/proto_docs/google/cloud/aiplatform/v1/reasoning_engine_service.rb +136 -0
- data/proto_docs/google/cloud/aiplatform/v1/schedule.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_tables.rb +12 -0
- data/proto_docs/google/cloud/aiplatform/v1/study.rb +24 -0
- data/proto_docs/google/cloud/aiplatform/v1/tensorboard_data.rb +6 -0
- data/proto_docs/google/cloud/aiplatform/v1/tool.rb +95 -0
- data/proto_docs/google/cloud/aiplatform/v1/training_pipeline.rb +14 -0
- data/proto_docs/google/cloud/aiplatform/v1/tuning_job.rb +6 -0
- data/proto_docs/google/cloud/aiplatform/v1/user_action_reference.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/value.rb +6 -0
- data/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data.rb +32 -0
- data/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data_service.rb +8 -0
- data/proto_docs/google/longrunning/operations.rb +4 -0
- data/proto_docs/google/protobuf/struct.rb +12 -0
- data/proto_docs/google/type/latlng.rb +38 -0
- metadata +43 -9
@@ -897,7 +897,7 @@ module Google
|
|
897
897
|
# @param options [::Gapic::CallOptions, ::Hash]
|
898
898
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
899
899
|
#
|
900
|
-
# @overload generate_content(model: nil, contents: nil, system_instruction: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, generation_config: nil)
|
900
|
+
# @overload generate_content(model: nil, contents: nil, system_instruction: nil, cached_content: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, generation_config: nil)
|
901
901
|
# Pass arguments to `generate_content` via keyword arguments. Note that at
|
902
902
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
903
903
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -921,6 +921,12 @@ module Google
|
|
921
921
|
# Optional. The user provided system instructions for the model.
|
922
922
|
# Note: only text should be used in parts and content in each part will be in
|
923
923
|
# a separate paragraph.
|
924
|
+
# @param cached_content [::String]
|
925
|
+
# Optional. The name of the cached content used as context to serve the
|
926
|
+
# prediction. Note: only used in explicit caching, where users can have
|
927
|
+
# control over caching (e.g. what content to cache) and enjoy guaranteed cost
|
928
|
+
# savings. Format:
|
929
|
+
# `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
|
924
930
|
# @param tools [::Array<::Google::Cloud::AIPlatform::V1::Tool, ::Hash>]
|
925
931
|
# Optional. A list of `Tools` the model may use to generate the next
|
926
932
|
# response.
|
@@ -1015,7 +1021,7 @@ module Google
|
|
1015
1021
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1016
1022
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1017
1023
|
#
|
1018
|
-
# @overload stream_generate_content(model: nil, contents: nil, system_instruction: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, generation_config: nil)
|
1024
|
+
# @overload stream_generate_content(model: nil, contents: nil, system_instruction: nil, cached_content: nil, tools: nil, tool_config: nil, labels: nil, safety_settings: nil, generation_config: nil)
|
1019
1025
|
# Pass arguments to `stream_generate_content` via keyword arguments. Note that at
|
1020
1026
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1021
1027
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1039,6 +1045,12 @@ module Google
|
|
1039
1045
|
# Optional. The user provided system instructions for the model.
|
1040
1046
|
# Note: only text should be used in parts and content in each part will be in
|
1041
1047
|
# a separate paragraph.
|
1048
|
+
# @param cached_content [::String]
|
1049
|
+
# Optional. The name of the cached content used as context to serve the
|
1050
|
+
# prediction. Note: only used in explicit caching, where users can have
|
1051
|
+
# control over caching (e.g. what content to cache) and enjoy guaranteed cost
|
1052
|
+
# savings. Format:
|
1053
|
+
# `projects/{project}/locations/{location}/cachedContents/{cachedContent}`
|
1042
1054
|
# @param tools [::Array<::Google::Cloud::AIPlatform::V1::Tool, ::Hash>]
|
1043
1055
|
# Optional. A list of `Tools` the model may use to generate the next
|
1044
1056
|
# response.
|
@@ -1167,6 +1179,13 @@ module Google
|
|
1167
1179
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1168
1180
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1169
1181
|
# * (`nil`) indicating no credentials
|
1182
|
+
#
|
1183
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
1184
|
+
# external source for authentication to Google Cloud, you must validate it before
|
1185
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
1186
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
1187
|
+
# For more information, refer to [Validate credential configurations from external
|
1188
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
1170
1189
|
# @return [::Object]
|
1171
1190
|
# @!attribute [rw] scope
|
1172
1191
|
# The OAuth scopes
|
@@ -0,0 +1,600 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 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/aiplatform/v1/reasoning_engine_execution_service_pb"
|
21
|
+
require "google/cloud/location"
|
22
|
+
require "google/iam/v1"
|
23
|
+
|
24
|
+
module Google
|
25
|
+
module Cloud
|
26
|
+
module AIPlatform
|
27
|
+
module V1
|
28
|
+
module ReasoningEngineExecutionService
|
29
|
+
##
|
30
|
+
# Client for the ReasoningEngineExecutionService service.
|
31
|
+
#
|
32
|
+
# A service for executing queries on Reasoning Engine.
|
33
|
+
#
|
34
|
+
class Client
|
35
|
+
# @private
|
36
|
+
API_VERSION = ""
|
37
|
+
|
38
|
+
# @private
|
39
|
+
DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
|
40
|
+
|
41
|
+
include Paths
|
42
|
+
|
43
|
+
# @private
|
44
|
+
attr_reader :reasoning_engine_execution_service_stub
|
45
|
+
|
46
|
+
##
|
47
|
+
# Configure the ReasoningEngineExecutionService Client class.
|
48
|
+
#
|
49
|
+
# See {::Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Client::Configuration}
|
50
|
+
# for a description of the configuration fields.
|
51
|
+
#
|
52
|
+
# @example
|
53
|
+
#
|
54
|
+
# # Modify the configuration for all ReasoningEngineExecutionService clients
|
55
|
+
# ::Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Client.configure do |config|
|
56
|
+
# config.timeout = 10.0
|
57
|
+
# end
|
58
|
+
#
|
59
|
+
# @yield [config] Configure the Client client.
|
60
|
+
# @yieldparam config [Client::Configuration]
|
61
|
+
#
|
62
|
+
# @return [Client::Configuration]
|
63
|
+
#
|
64
|
+
def self.configure
|
65
|
+
@configure ||= begin
|
66
|
+
namespace = ["Google", "Cloud", "AIPlatform", "V1"]
|
67
|
+
parent_config = while namespace.any?
|
68
|
+
parent_name = namespace.join "::"
|
69
|
+
parent_const = const_get parent_name
|
70
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
71
|
+
namespace.pop
|
72
|
+
end
|
73
|
+
default_config = Client::Configuration.new parent_config
|
74
|
+
|
75
|
+
default_config
|
76
|
+
end
|
77
|
+
yield @configure if block_given?
|
78
|
+
@configure
|
79
|
+
end
|
80
|
+
|
81
|
+
##
|
82
|
+
# Configure the ReasoningEngineExecutionService Client instance.
|
83
|
+
#
|
84
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
85
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
86
|
+
# should be made on {Client.configure}.
|
87
|
+
#
|
88
|
+
# See {::Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Client::Configuration}
|
89
|
+
# for a description of the configuration fields.
|
90
|
+
#
|
91
|
+
# @yield [config] Configure the Client client.
|
92
|
+
# @yieldparam config [Client::Configuration]
|
93
|
+
#
|
94
|
+
# @return [Client::Configuration]
|
95
|
+
#
|
96
|
+
def configure
|
97
|
+
yield @config if block_given?
|
98
|
+
@config
|
99
|
+
end
|
100
|
+
|
101
|
+
##
|
102
|
+
# The effective universe domain
|
103
|
+
#
|
104
|
+
# @return [String]
|
105
|
+
#
|
106
|
+
def universe_domain
|
107
|
+
@reasoning_engine_execution_service_stub.universe_domain
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Create a new ReasoningEngineExecutionService client object.
|
112
|
+
#
|
113
|
+
# @example
|
114
|
+
#
|
115
|
+
# # Create a client using the default configuration
|
116
|
+
# client = ::Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Client.new
|
117
|
+
#
|
118
|
+
# # Create a client using a custom configuration
|
119
|
+
# client = ::Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Client.new do |config|
|
120
|
+
# config.timeout = 10.0
|
121
|
+
# end
|
122
|
+
#
|
123
|
+
# @yield [config] Configure the ReasoningEngineExecutionService client.
|
124
|
+
# @yieldparam config [Client::Configuration]
|
125
|
+
#
|
126
|
+
def initialize
|
127
|
+
# These require statements are intentionally placed here to initialize
|
128
|
+
# the gRPC module only when it's required.
|
129
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
130
|
+
require "gapic/grpc"
|
131
|
+
require "google/cloud/aiplatform/v1/reasoning_engine_execution_service_services_pb"
|
132
|
+
|
133
|
+
# Create the configuration object
|
134
|
+
@config = Configuration.new Client.configure
|
135
|
+
|
136
|
+
# Yield the configuration if needed
|
137
|
+
yield @config if block_given?
|
138
|
+
|
139
|
+
# Create credentials
|
140
|
+
credentials = @config.credentials
|
141
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
142
|
+
# but only if the default endpoint does not have a region prefix.
|
143
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
144
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
145
|
+
!@config.endpoint.split(".").first.include?("-"))
|
146
|
+
credentials ||= Credentials.default scope: @config.scope,
|
147
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
148
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
149
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
150
|
+
end
|
151
|
+
@quota_project_id = @config.quota_project
|
152
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
153
|
+
|
154
|
+
@reasoning_engine_execution_service_stub = ::Gapic::ServiceStub.new(
|
155
|
+
::Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Stub,
|
156
|
+
credentials: credentials,
|
157
|
+
endpoint: @config.endpoint,
|
158
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
159
|
+
universe_domain: @config.universe_domain,
|
160
|
+
channel_args: @config.channel_args,
|
161
|
+
interceptors: @config.interceptors,
|
162
|
+
channel_pool_config: @config.channel_pool,
|
163
|
+
logger: @config.logger
|
164
|
+
)
|
165
|
+
|
166
|
+
@reasoning_engine_execution_service_stub.stub_logger&.info do |entry|
|
167
|
+
entry.set_system_name
|
168
|
+
entry.set_service
|
169
|
+
entry.message = "Created client for #{entry.service}"
|
170
|
+
entry.set_credentials_fields credentials
|
171
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
172
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
173
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
174
|
+
end
|
175
|
+
|
176
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
177
|
+
config.credentials = credentials
|
178
|
+
config.quota_project = @quota_project_id
|
179
|
+
config.endpoint = @reasoning_engine_execution_service_stub.endpoint
|
180
|
+
config.universe_domain = @reasoning_engine_execution_service_stub.universe_domain
|
181
|
+
config.logger = @reasoning_engine_execution_service_stub.logger if config.respond_to? :logger=
|
182
|
+
end
|
183
|
+
|
184
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
185
|
+
config.credentials = credentials
|
186
|
+
config.quota_project = @quota_project_id
|
187
|
+
config.endpoint = @reasoning_engine_execution_service_stub.endpoint
|
188
|
+
config.universe_domain = @reasoning_engine_execution_service_stub.universe_domain
|
189
|
+
config.logger = @reasoning_engine_execution_service_stub.logger if config.respond_to? :logger=
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
##
|
194
|
+
# Get the associated client for mix-in of the Locations.
|
195
|
+
#
|
196
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
197
|
+
#
|
198
|
+
attr_reader :location_client
|
199
|
+
|
200
|
+
##
|
201
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
202
|
+
#
|
203
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
204
|
+
#
|
205
|
+
attr_reader :iam_policy_client
|
206
|
+
|
207
|
+
##
|
208
|
+
# The logger used for request/response debug logging.
|
209
|
+
#
|
210
|
+
# @return [Logger]
|
211
|
+
#
|
212
|
+
def logger
|
213
|
+
@reasoning_engine_execution_service_stub.logger
|
214
|
+
end
|
215
|
+
|
216
|
+
# Service calls
|
217
|
+
|
218
|
+
##
|
219
|
+
# Queries using a reasoning engine.
|
220
|
+
#
|
221
|
+
# @overload query_reasoning_engine(request, options = nil)
|
222
|
+
# Pass arguments to `query_reasoning_engine` via a request object, either of type
|
223
|
+
# {::Google::Cloud::AIPlatform::V1::QueryReasoningEngineRequest} or an equivalent Hash.
|
224
|
+
#
|
225
|
+
# @param request [::Google::Cloud::AIPlatform::V1::QueryReasoningEngineRequest, ::Hash]
|
226
|
+
# A request object representing the call parameters. Required. To specify no
|
227
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
228
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
229
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
230
|
+
#
|
231
|
+
# @overload query_reasoning_engine(name: nil, input: nil, class_method: nil)
|
232
|
+
# Pass arguments to `query_reasoning_engine` via keyword arguments. Note that at
|
233
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
234
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
235
|
+
#
|
236
|
+
# @param name [::String]
|
237
|
+
# Required. The name of the ReasoningEngine resource to use.
|
238
|
+
# Format:
|
239
|
+
# `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
|
240
|
+
# @param input [::Google::Protobuf::Struct, ::Hash]
|
241
|
+
# Optional. Input content provided by users in JSON object format. Examples
|
242
|
+
# include text query, function calling parameters, media bytes, etc.
|
243
|
+
# @param class_method [::String]
|
244
|
+
# Optional. Class method to be used for the query.
|
245
|
+
# It is optional and defaults to "query" if unspecified.
|
246
|
+
#
|
247
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
248
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::QueryReasoningEngineResponse]
|
249
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
250
|
+
#
|
251
|
+
# @return [::Google::Cloud::AIPlatform::V1::QueryReasoningEngineResponse]
|
252
|
+
#
|
253
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
254
|
+
#
|
255
|
+
# @example Basic example
|
256
|
+
# require "google/cloud/ai_platform/v1"
|
257
|
+
#
|
258
|
+
# # Create a client object. The client can be reused for multiple calls.
|
259
|
+
# client = Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Client.new
|
260
|
+
#
|
261
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
262
|
+
# request = Google::Cloud::AIPlatform::V1::QueryReasoningEngineRequest.new
|
263
|
+
#
|
264
|
+
# # Call the query_reasoning_engine method.
|
265
|
+
# result = client.query_reasoning_engine request
|
266
|
+
#
|
267
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::QueryReasoningEngineResponse.
|
268
|
+
# p result
|
269
|
+
#
|
270
|
+
def query_reasoning_engine request, options = nil
|
271
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
272
|
+
|
273
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::QueryReasoningEngineRequest
|
274
|
+
|
275
|
+
# Converts hash and nil to an options object
|
276
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
277
|
+
|
278
|
+
# Customize the options with defaults
|
279
|
+
metadata = @config.rpcs.query_reasoning_engine.metadata.to_h
|
280
|
+
|
281
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
282
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
283
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
284
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
285
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
286
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
287
|
+
|
288
|
+
header_params = {}
|
289
|
+
if request.name
|
290
|
+
header_params["name"] = request.name
|
291
|
+
end
|
292
|
+
|
293
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
294
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
295
|
+
|
296
|
+
options.apply_defaults timeout: @config.rpcs.query_reasoning_engine.timeout,
|
297
|
+
metadata: metadata,
|
298
|
+
retry_policy: @config.rpcs.query_reasoning_engine.retry_policy
|
299
|
+
|
300
|
+
options.apply_defaults timeout: @config.timeout,
|
301
|
+
metadata: @config.metadata,
|
302
|
+
retry_policy: @config.retry_policy
|
303
|
+
|
304
|
+
@reasoning_engine_execution_service_stub.call_rpc :query_reasoning_engine, request, options: options do |response, operation|
|
305
|
+
yield response, operation if block_given?
|
306
|
+
end
|
307
|
+
rescue ::GRPC::BadStatus => e
|
308
|
+
raise ::Google::Cloud::Error.from_error(e)
|
309
|
+
end
|
310
|
+
|
311
|
+
##
|
312
|
+
# Streams queries using a reasoning engine.
|
313
|
+
#
|
314
|
+
# @overload stream_query_reasoning_engine(request, options = nil)
|
315
|
+
# Pass arguments to `stream_query_reasoning_engine` via a request object, either of type
|
316
|
+
# {::Google::Cloud::AIPlatform::V1::StreamQueryReasoningEngineRequest} or an equivalent Hash.
|
317
|
+
#
|
318
|
+
# @param request [::Google::Cloud::AIPlatform::V1::StreamQueryReasoningEngineRequest, ::Hash]
|
319
|
+
# A request object representing the call parameters. Required. To specify no
|
320
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
321
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
322
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
323
|
+
#
|
324
|
+
# @overload stream_query_reasoning_engine(name: nil, input: nil, class_method: nil)
|
325
|
+
# Pass arguments to `stream_query_reasoning_engine` via keyword arguments. Note that at
|
326
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
327
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
328
|
+
#
|
329
|
+
# @param name [::String]
|
330
|
+
# Required. The name of the ReasoningEngine resource to use.
|
331
|
+
# Format:
|
332
|
+
# `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
|
333
|
+
# @param input [::Google::Protobuf::Struct, ::Hash]
|
334
|
+
# Optional. Input content provided by users in JSON object format. Examples
|
335
|
+
# include text query, function calling parameters, media bytes, etc.
|
336
|
+
# @param class_method [::String]
|
337
|
+
# Optional. Class method to be used for the stream query.
|
338
|
+
# It is optional and defaults to "stream_query" if unspecified.
|
339
|
+
#
|
340
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
341
|
+
# @yieldparam response [::Enumerable<::Google::Api::HttpBody>]
|
342
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
343
|
+
#
|
344
|
+
# @return [::Enumerable<::Google::Api::HttpBody>]
|
345
|
+
#
|
346
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
347
|
+
#
|
348
|
+
# @example Basic example
|
349
|
+
# require "google/cloud/ai_platform/v1"
|
350
|
+
#
|
351
|
+
# # Create a client object. The client can be reused for multiple calls.
|
352
|
+
# client = Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Client.new
|
353
|
+
#
|
354
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
355
|
+
# request = Google::Cloud::AIPlatform::V1::StreamQueryReasoningEngineRequest.new
|
356
|
+
#
|
357
|
+
# # Call the stream_query_reasoning_engine method to start streaming.
|
358
|
+
# output = client.stream_query_reasoning_engine request
|
359
|
+
#
|
360
|
+
# # The returned object is a streamed enumerable yielding elements of type
|
361
|
+
# # ::Google::Api::HttpBody
|
362
|
+
# output.each do |current_response|
|
363
|
+
# p current_response
|
364
|
+
# end
|
365
|
+
#
|
366
|
+
def stream_query_reasoning_engine request, options = nil
|
367
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
368
|
+
|
369
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::StreamQueryReasoningEngineRequest
|
370
|
+
|
371
|
+
# Converts hash and nil to an options object
|
372
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
373
|
+
|
374
|
+
# Customize the options with defaults
|
375
|
+
metadata = @config.rpcs.stream_query_reasoning_engine.metadata.to_h
|
376
|
+
|
377
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
378
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
379
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
380
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
381
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
382
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
383
|
+
|
384
|
+
header_params = {}
|
385
|
+
if request.name
|
386
|
+
header_params["name"] = request.name
|
387
|
+
end
|
388
|
+
|
389
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
390
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
391
|
+
|
392
|
+
options.apply_defaults timeout: @config.rpcs.stream_query_reasoning_engine.timeout,
|
393
|
+
metadata: metadata,
|
394
|
+
retry_policy: @config.rpcs.stream_query_reasoning_engine.retry_policy
|
395
|
+
|
396
|
+
options.apply_defaults timeout: @config.timeout,
|
397
|
+
metadata: @config.metadata,
|
398
|
+
retry_policy: @config.retry_policy
|
399
|
+
|
400
|
+
@reasoning_engine_execution_service_stub.call_rpc :stream_query_reasoning_engine, request, options: options do |response, operation|
|
401
|
+
yield response, operation if block_given?
|
402
|
+
end
|
403
|
+
rescue ::GRPC::BadStatus => e
|
404
|
+
raise ::Google::Cloud::Error.from_error(e)
|
405
|
+
end
|
406
|
+
|
407
|
+
##
|
408
|
+
# Configuration class for the ReasoningEngineExecutionService API.
|
409
|
+
#
|
410
|
+
# This class represents the configuration for ReasoningEngineExecutionService,
|
411
|
+
# providing control over timeouts, retry behavior, logging, transport
|
412
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
413
|
+
# applied individually to specific RPCs. See
|
414
|
+
# {::Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Client::Configuration::Rpcs}
|
415
|
+
# for a list of RPCs that can be configured independently.
|
416
|
+
#
|
417
|
+
# Configuration can be applied globally to all clients, or to a single client
|
418
|
+
# on construction.
|
419
|
+
#
|
420
|
+
# @example
|
421
|
+
#
|
422
|
+
# # Modify the global config, setting the timeout for
|
423
|
+
# # query_reasoning_engine to 20 seconds,
|
424
|
+
# # and all remaining timeouts to 10 seconds.
|
425
|
+
# ::Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Client.configure do |config|
|
426
|
+
# config.timeout = 10.0
|
427
|
+
# config.rpcs.query_reasoning_engine.timeout = 20.0
|
428
|
+
# end
|
429
|
+
#
|
430
|
+
# # Apply the above configuration only to a new client.
|
431
|
+
# client = ::Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Client.new do |config|
|
432
|
+
# config.timeout = 10.0
|
433
|
+
# config.rpcs.query_reasoning_engine.timeout = 20.0
|
434
|
+
# end
|
435
|
+
#
|
436
|
+
# @!attribute [rw] endpoint
|
437
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
438
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
439
|
+
# @return [::String,nil]
|
440
|
+
# @!attribute [rw] credentials
|
441
|
+
# Credentials to send with calls. You may provide any of the following types:
|
442
|
+
# * (`String`) The path to a service account key file in JSON format
|
443
|
+
# * (`Hash`) A service account key as a Hash
|
444
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
445
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
446
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
447
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
448
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
449
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
450
|
+
# * (`nil`) indicating no credentials
|
451
|
+
#
|
452
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
453
|
+
# external source for authentication to Google Cloud, you must validate it before
|
454
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
455
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
456
|
+
# For more information, refer to [Validate credential configurations from external
|
457
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
458
|
+
# @return [::Object]
|
459
|
+
# @!attribute [rw] scope
|
460
|
+
# The OAuth scopes
|
461
|
+
# @return [::Array<::String>]
|
462
|
+
# @!attribute [rw] lib_name
|
463
|
+
# The library name as recorded in instrumentation and logging
|
464
|
+
# @return [::String]
|
465
|
+
# @!attribute [rw] lib_version
|
466
|
+
# The library version as recorded in instrumentation and logging
|
467
|
+
# @return [::String]
|
468
|
+
# @!attribute [rw] channel_args
|
469
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
470
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
471
|
+
# @return [::Hash]
|
472
|
+
# @!attribute [rw] interceptors
|
473
|
+
# An array of interceptors that are run before calls are executed.
|
474
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
475
|
+
# @!attribute [rw] timeout
|
476
|
+
# The call timeout in seconds.
|
477
|
+
# @return [::Numeric]
|
478
|
+
# @!attribute [rw] metadata
|
479
|
+
# Additional gRPC headers to be sent with the call.
|
480
|
+
# @return [::Hash{::Symbol=>::String}]
|
481
|
+
# @!attribute [rw] retry_policy
|
482
|
+
# The retry policy. The value is a hash with the following keys:
|
483
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
484
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
485
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
486
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
487
|
+
# trigger a retry.
|
488
|
+
# @return [::Hash]
|
489
|
+
# @!attribute [rw] quota_project
|
490
|
+
# A separate project against which to charge quota.
|
491
|
+
# @return [::String]
|
492
|
+
# @!attribute [rw] universe_domain
|
493
|
+
# The universe domain within which to make requests. This determines the
|
494
|
+
# default endpoint URL. The default value of nil uses the environment
|
495
|
+
# universe (usually the default "googleapis.com" universe).
|
496
|
+
# @return [::String,nil]
|
497
|
+
# @!attribute [rw] logger
|
498
|
+
# A custom logger to use for request/response debug logging, or the value
|
499
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
500
|
+
# explicitly disable logging.
|
501
|
+
# @return [::Logger,:default,nil]
|
502
|
+
#
|
503
|
+
class Configuration
|
504
|
+
extend ::Gapic::Config
|
505
|
+
|
506
|
+
# @private
|
507
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
508
|
+
DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
|
509
|
+
|
510
|
+
config_attr :endpoint, nil, ::String, nil
|
511
|
+
config_attr :credentials, nil do |value|
|
512
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
513
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
514
|
+
allowed.any? { |klass| klass === value }
|
515
|
+
end
|
516
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
517
|
+
config_attr :lib_name, nil, ::String, nil
|
518
|
+
config_attr :lib_version, nil, ::String, nil
|
519
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
520
|
+
config_attr :interceptors, nil, ::Array, nil
|
521
|
+
config_attr :timeout, nil, ::Numeric, nil
|
522
|
+
config_attr :metadata, nil, ::Hash, nil
|
523
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
524
|
+
config_attr :quota_project, nil, ::String, nil
|
525
|
+
config_attr :universe_domain, nil, ::String, nil
|
526
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
527
|
+
|
528
|
+
# @private
|
529
|
+
def initialize parent_config = nil
|
530
|
+
@parent_config = parent_config unless parent_config.nil?
|
531
|
+
|
532
|
+
yield self if block_given?
|
533
|
+
end
|
534
|
+
|
535
|
+
##
|
536
|
+
# Configurations for individual RPCs
|
537
|
+
# @return [Rpcs]
|
538
|
+
#
|
539
|
+
def rpcs
|
540
|
+
@rpcs ||= begin
|
541
|
+
parent_rpcs = nil
|
542
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
543
|
+
Rpcs.new parent_rpcs
|
544
|
+
end
|
545
|
+
end
|
546
|
+
|
547
|
+
##
|
548
|
+
# Configuration for the channel pool
|
549
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
550
|
+
#
|
551
|
+
def channel_pool
|
552
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
553
|
+
end
|
554
|
+
|
555
|
+
##
|
556
|
+
# Configuration RPC class for the ReasoningEngineExecutionService API.
|
557
|
+
#
|
558
|
+
# Includes fields providing the configuration for each RPC in this service.
|
559
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
560
|
+
# the following configuration fields:
|
561
|
+
#
|
562
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
563
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
564
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
565
|
+
# include the following keys:
|
566
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
567
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
568
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
569
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
570
|
+
# trigger a retry.
|
571
|
+
#
|
572
|
+
class Rpcs
|
573
|
+
##
|
574
|
+
# RPC-specific configuration for `query_reasoning_engine`
|
575
|
+
# @return [::Gapic::Config::Method]
|
576
|
+
#
|
577
|
+
attr_reader :query_reasoning_engine
|
578
|
+
##
|
579
|
+
# RPC-specific configuration for `stream_query_reasoning_engine`
|
580
|
+
# @return [::Gapic::Config::Method]
|
581
|
+
#
|
582
|
+
attr_reader :stream_query_reasoning_engine
|
583
|
+
|
584
|
+
# @private
|
585
|
+
def initialize parent_rpcs = nil
|
586
|
+
query_reasoning_engine_config = parent_rpcs.query_reasoning_engine if parent_rpcs.respond_to? :query_reasoning_engine
|
587
|
+
@query_reasoning_engine = ::Gapic::Config::Method.new query_reasoning_engine_config
|
588
|
+
stream_query_reasoning_engine_config = parent_rpcs.stream_query_reasoning_engine if parent_rpcs.respond_to? :stream_query_reasoning_engine
|
589
|
+
@stream_query_reasoning_engine = ::Gapic::Config::Method.new stream_query_reasoning_engine_config
|
590
|
+
|
591
|
+
yield self if block_given?
|
592
|
+
end
|
593
|
+
end
|
594
|
+
end
|
595
|
+
end
|
596
|
+
end
|
597
|
+
end
|
598
|
+
end
|
599
|
+
end
|
600
|
+
end
|