google-cloud-ai_platform-v1 0.60.0 → 0.62.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 +30 -20
- data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +43 -20
- data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb +43 -20
- data/lib/google/cloud/ai_platform/v1/dataset_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/dataset_service/rest/service_stub.rb +166 -116
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/client.rb +34 -7
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/client.rb +33 -7
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/service_stub.rb +62 -38
- data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +36 -10
- data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb +36 -10
- data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/service_stub.rb +86 -56
- data/lib/google/cloud/ai_platform/v1/evaluation_service/client.rb +29 -2
- data/lib/google/cloud/ai_platform/v1/evaluation_service/rest/client.rb +29 -2
- data/lib/google/cloud/ai_platform/v1/evaluation_service/rest/service_stub.rb +22 -8
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +38 -14
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/client.rb +38 -14
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/service_stub.rb +118 -80
- data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +29 -3
- data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/client.rb +29 -3
- data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/service_stub.rb +30 -14
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +38 -12
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/client.rb +38 -12
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/service_stub.rb +102 -68
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +29 -4
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/client.rb +29 -3
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/service_stub.rb +31 -14
- data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +45 -22
- data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb +45 -22
- data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/service_stub.rb +182 -128
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/client.rb +872 -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 +820 -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 +31 -6
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/client.rb +31 -6
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/service_stub.rb +54 -32
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +35 -9
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/client.rb +35 -9
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/service_stub.rb +78 -50
- data/lib/google/cloud/ai_platform/v1/index_service/client.rb +33 -8
- data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/index_service/rest/client.rb +33 -8
- data/lib/google/cloud/ai_platform/v1/index_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/index_service/rest/service_stub.rb +70 -44
- data/lib/google/cloud/ai_platform/v1/job_service/client.rb +44 -36
- data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/job_service/rest/client.rb +44 -36
- data/lib/google/cloud/ai_platform/v1/job_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/job_service/rest/service_stub.rb +294 -212
- data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +29 -3
- data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +29 -3
- data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/service_stub.rb +30 -14
- data/lib/google/cloud/ai_platform/v1/match_service/client.rb +29 -3
- data/lib/google/cloud/ai_platform/v1/match_service/rest/client.rb +29 -3
- data/lib/google/cloud/ai_platform/v1/match_service/rest/service_stub.rb +30 -14
- data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +42 -33
- data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/metadata_service/rest/client.rb +42 -33
- data/lib/google/cloud/ai_platform/v1/metadata_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/metadata_service/rest/service_stub.rb +270 -194
- data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +31 -3
- data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/migration_service/rest/client.rb +31 -3
- data/lib/google/cloud/ai_platform/v1/migration_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/migration_service/rest/service_stub.rb +30 -14
- data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +29 -2
- data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +29 -2
- data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb +22 -8
- data/lib/google/cloud/ai_platform/v1/model_service/client.rb +39 -19
- data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +39 -19
- data/lib/google/cloud/ai_platform/v1/model_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/model_service/rest/service_stub.rb +158 -110
- data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +41 -17
- data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +41 -17
- data/lib/google/cloud/ai_platform/v1/notebook_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/notebook_service/rest/service_stub.rb +142 -98
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +34 -7
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/client.rb +34 -7
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/service_stub.rb +62 -38
- data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +35 -13
- data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/client.rb +35 -13
- data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/service_stub.rb +110 -74
- data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +43 -16
- 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 +43 -9
- data/lib/google/cloud/ai_platform/v1/prediction_service/rest/service_stub.rb +65 -38
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/client.rb +593 -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 +564 -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 +914 -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 +814 -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 +862 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest/operations.rb +4293 -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 +31 -8
- data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/schedule_service/rest/client.rb +31 -8
- data/lib/google/cloud/ai_platform/v1/schedule_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/schedule_service/rest/service_stub.rb +70 -44
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +33 -6
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/client.rb +33 -6
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/service_stub.rb +54 -32
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +40 -31
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/client.rb +40 -30
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/service_stub.rb +247 -176
- data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/client.rb +36 -11
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/client.rb +36 -11
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/service_stub.rb +94 -62
- data/lib/google/cloud/ai_platform/v1/vertex_rag_service/client.rb +29 -4
- data/lib/google/cloud/ai_platform/v1/vertex_rag_service/rest/client.rb +29 -4
- data/lib/google/cloud/ai_platform/v1/vertex_rag_service/rest/service_stub.rb +38 -20
- data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +33 -16
- data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +9 -5
- data/lib/google/cloud/ai_platform/v1/vizier_service/rest/client.rb +33 -16
- data/lib/google/cloud/ai_platform/v1/vizier_service/rest/operations.rb +84 -35
- data/lib/google/cloud/ai_platform/v1/vizier_service/rest/service_stub.rb +134 -92
- data/lib/google/cloud/ai_platform/v1.rb +3 -0
- data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/cached_content_pb.rb +54 -0
- 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/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 +4 -1
- data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +3 -0
- data/proto_docs/google/cloud/aiplatform/v1/cached_content.rb +101 -0
- data/proto_docs/google/cloud/aiplatform/v1/gen_ai_cache_service.rb +108 -0
- data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb +42 -2
- data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +11 -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/tool.rb +15 -0
- data/proto_docs/google/type/latlng.rb +38 -0
- metadata +42 -8
@@ -0,0 +1,914 @@
|
|
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_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 ReasoningEngineService
|
29
|
+
##
|
30
|
+
# Client for the ReasoningEngineService service.
|
31
|
+
#
|
32
|
+
# A service for managing Vertex AI's Reasoning Engines.
|
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_service_stub
|
45
|
+
|
46
|
+
##
|
47
|
+
# Configure the ReasoningEngineService Client class.
|
48
|
+
#
|
49
|
+
# See {::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client::Configuration}
|
50
|
+
# for a description of the configuration fields.
|
51
|
+
#
|
52
|
+
# @example
|
53
|
+
#
|
54
|
+
# # Modify the configuration for all ReasoningEngineService clients
|
55
|
+
# ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::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 ReasoningEngineService 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::ReasoningEngineService::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_service_stub.universe_domain
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Create a new ReasoningEngineService client object.
|
112
|
+
#
|
113
|
+
# @example
|
114
|
+
#
|
115
|
+
# # Create a client using the default configuration
|
116
|
+
# client = ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new
|
117
|
+
#
|
118
|
+
# # Create a client using a custom configuration
|
119
|
+
# client = ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new do |config|
|
120
|
+
# config.timeout = 10.0
|
121
|
+
# end
|
122
|
+
#
|
123
|
+
# @yield [config] Configure the ReasoningEngineService 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_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
|
+
@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
|
+
|
161
|
+
@reasoning_engine_service_stub = ::Gapic::ServiceStub.new(
|
162
|
+
::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Stub,
|
163
|
+
credentials: credentials,
|
164
|
+
endpoint: @config.endpoint,
|
165
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
166
|
+
universe_domain: @config.universe_domain,
|
167
|
+
channel_args: @config.channel_args,
|
168
|
+
interceptors: @config.interceptors,
|
169
|
+
channel_pool_config: @config.channel_pool,
|
170
|
+
logger: @config.logger
|
171
|
+
)
|
172
|
+
|
173
|
+
@reasoning_engine_service_stub.stub_logger&.info do |entry|
|
174
|
+
entry.set_system_name
|
175
|
+
entry.set_service
|
176
|
+
entry.message = "Created client for #{entry.service}"
|
177
|
+
entry.set_credentials_fields credentials
|
178
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
179
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
180
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
181
|
+
end
|
182
|
+
|
183
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
184
|
+
config.credentials = credentials
|
185
|
+
config.quota_project = @quota_project_id
|
186
|
+
config.endpoint = @reasoning_engine_service_stub.endpoint
|
187
|
+
config.universe_domain = @reasoning_engine_service_stub.universe_domain
|
188
|
+
config.logger = @reasoning_engine_service_stub.logger if config.respond_to? :logger=
|
189
|
+
end
|
190
|
+
|
191
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
192
|
+
config.credentials = credentials
|
193
|
+
config.quota_project = @quota_project_id
|
194
|
+
config.endpoint = @reasoning_engine_service_stub.endpoint
|
195
|
+
config.universe_domain = @reasoning_engine_service_stub.universe_domain
|
196
|
+
config.logger = @reasoning_engine_service_stub.logger if config.respond_to? :logger=
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
##
|
201
|
+
# Get the associated client for long-running operations.
|
202
|
+
#
|
203
|
+
# @return [::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Operations]
|
204
|
+
#
|
205
|
+
attr_reader :operations_client
|
206
|
+
|
207
|
+
##
|
208
|
+
# Get the associated client for mix-in of the Locations.
|
209
|
+
#
|
210
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
211
|
+
#
|
212
|
+
attr_reader :location_client
|
213
|
+
|
214
|
+
##
|
215
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
216
|
+
#
|
217
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
218
|
+
#
|
219
|
+
attr_reader :iam_policy_client
|
220
|
+
|
221
|
+
##
|
222
|
+
# The logger used for request/response debug logging.
|
223
|
+
#
|
224
|
+
# @return [Logger]
|
225
|
+
#
|
226
|
+
def logger
|
227
|
+
@reasoning_engine_service_stub.logger
|
228
|
+
end
|
229
|
+
|
230
|
+
# Service calls
|
231
|
+
|
232
|
+
##
|
233
|
+
# Creates a reasoning engine.
|
234
|
+
#
|
235
|
+
# @overload create_reasoning_engine(request, options = nil)
|
236
|
+
# Pass arguments to `create_reasoning_engine` via a request object, either of type
|
237
|
+
# {::Google::Cloud::AIPlatform::V1::CreateReasoningEngineRequest} or an equivalent Hash.
|
238
|
+
#
|
239
|
+
# @param request [::Google::Cloud::AIPlatform::V1::CreateReasoningEngineRequest, ::Hash]
|
240
|
+
# A request object representing the call parameters. Required. To specify no
|
241
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
242
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
243
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
244
|
+
#
|
245
|
+
# @overload create_reasoning_engine(parent: nil, reasoning_engine: nil)
|
246
|
+
# Pass arguments to `create_reasoning_engine` via keyword arguments. Note that at
|
247
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
248
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
249
|
+
#
|
250
|
+
# @param parent [::String]
|
251
|
+
# Required. The resource name of the Location to create the ReasoningEngine
|
252
|
+
# in. Format: `projects/{project}/locations/{location}`
|
253
|
+
# @param reasoning_engine [::Google::Cloud::AIPlatform::V1::ReasoningEngine, ::Hash]
|
254
|
+
# Required. The ReasoningEngine to create.
|
255
|
+
#
|
256
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
257
|
+
# @yieldparam response [::Gapic::Operation]
|
258
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
259
|
+
#
|
260
|
+
# @return [::Gapic::Operation]
|
261
|
+
#
|
262
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
263
|
+
#
|
264
|
+
# @example Basic example
|
265
|
+
# require "google/cloud/ai_platform/v1"
|
266
|
+
#
|
267
|
+
# # Create a client object. The client can be reused for multiple calls.
|
268
|
+
# client = Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new
|
269
|
+
#
|
270
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
271
|
+
# request = Google::Cloud::AIPlatform::V1::CreateReasoningEngineRequest.new
|
272
|
+
#
|
273
|
+
# # Call the create_reasoning_engine method.
|
274
|
+
# result = client.create_reasoning_engine request
|
275
|
+
#
|
276
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
277
|
+
# # check the status of an operation, cancel it, or wait for results.
|
278
|
+
# # Here is how to wait for a response.
|
279
|
+
# result.wait_until_done! timeout: 60
|
280
|
+
# if result.response?
|
281
|
+
# p result.response
|
282
|
+
# else
|
283
|
+
# puts "No response received."
|
284
|
+
# end
|
285
|
+
#
|
286
|
+
def create_reasoning_engine request, options = nil
|
287
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
288
|
+
|
289
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateReasoningEngineRequest
|
290
|
+
|
291
|
+
# Converts hash and nil to an options object
|
292
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
293
|
+
|
294
|
+
# Customize the options with defaults
|
295
|
+
metadata = @config.rpcs.create_reasoning_engine.metadata.to_h
|
296
|
+
|
297
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
298
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
299
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
300
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
301
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
302
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
303
|
+
|
304
|
+
header_params = {}
|
305
|
+
if request.parent
|
306
|
+
header_params["parent"] = request.parent
|
307
|
+
end
|
308
|
+
|
309
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
310
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
311
|
+
|
312
|
+
options.apply_defaults timeout: @config.rpcs.create_reasoning_engine.timeout,
|
313
|
+
metadata: metadata,
|
314
|
+
retry_policy: @config.rpcs.create_reasoning_engine.retry_policy
|
315
|
+
|
316
|
+
options.apply_defaults timeout: @config.timeout,
|
317
|
+
metadata: @config.metadata,
|
318
|
+
retry_policy: @config.retry_policy
|
319
|
+
|
320
|
+
@reasoning_engine_service_stub.call_rpc :create_reasoning_engine, request, options: options do |response, operation|
|
321
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
322
|
+
yield response, operation if block_given?
|
323
|
+
throw :response, response
|
324
|
+
end
|
325
|
+
rescue ::GRPC::BadStatus => e
|
326
|
+
raise ::Google::Cloud::Error.from_error(e)
|
327
|
+
end
|
328
|
+
|
329
|
+
##
|
330
|
+
# Gets a reasoning engine.
|
331
|
+
#
|
332
|
+
# @overload get_reasoning_engine(request, options = nil)
|
333
|
+
# Pass arguments to `get_reasoning_engine` via a request object, either of type
|
334
|
+
# {::Google::Cloud::AIPlatform::V1::GetReasoningEngineRequest} or an equivalent Hash.
|
335
|
+
#
|
336
|
+
# @param request [::Google::Cloud::AIPlatform::V1::GetReasoningEngineRequest, ::Hash]
|
337
|
+
# A request object representing the call parameters. Required. To specify no
|
338
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
339
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
340
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
341
|
+
#
|
342
|
+
# @overload get_reasoning_engine(name: nil)
|
343
|
+
# Pass arguments to `get_reasoning_engine` via keyword arguments. Note that at
|
344
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
345
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
346
|
+
#
|
347
|
+
# @param name [::String]
|
348
|
+
# Required. The name of the ReasoningEngine resource.
|
349
|
+
# Format:
|
350
|
+
# `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
|
351
|
+
#
|
352
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
353
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::ReasoningEngine]
|
354
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
355
|
+
#
|
356
|
+
# @return [::Google::Cloud::AIPlatform::V1::ReasoningEngine]
|
357
|
+
#
|
358
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
359
|
+
#
|
360
|
+
# @example Basic example
|
361
|
+
# require "google/cloud/ai_platform/v1"
|
362
|
+
#
|
363
|
+
# # Create a client object. The client can be reused for multiple calls.
|
364
|
+
# client = Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new
|
365
|
+
#
|
366
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
367
|
+
# request = Google::Cloud::AIPlatform::V1::GetReasoningEngineRequest.new
|
368
|
+
#
|
369
|
+
# # Call the get_reasoning_engine method.
|
370
|
+
# result = client.get_reasoning_engine request
|
371
|
+
#
|
372
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::ReasoningEngine.
|
373
|
+
# p result
|
374
|
+
#
|
375
|
+
def get_reasoning_engine request, options = nil
|
376
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
377
|
+
|
378
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetReasoningEngineRequest
|
379
|
+
|
380
|
+
# Converts hash and nil to an options object
|
381
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
382
|
+
|
383
|
+
# Customize the options with defaults
|
384
|
+
metadata = @config.rpcs.get_reasoning_engine.metadata.to_h
|
385
|
+
|
386
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
387
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
388
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
389
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
390
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
391
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
392
|
+
|
393
|
+
header_params = {}
|
394
|
+
if request.name
|
395
|
+
header_params["name"] = request.name
|
396
|
+
end
|
397
|
+
|
398
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
399
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
400
|
+
|
401
|
+
options.apply_defaults timeout: @config.rpcs.get_reasoning_engine.timeout,
|
402
|
+
metadata: metadata,
|
403
|
+
retry_policy: @config.rpcs.get_reasoning_engine.retry_policy
|
404
|
+
|
405
|
+
options.apply_defaults timeout: @config.timeout,
|
406
|
+
metadata: @config.metadata,
|
407
|
+
retry_policy: @config.retry_policy
|
408
|
+
|
409
|
+
@reasoning_engine_service_stub.call_rpc :get_reasoning_engine, request, options: options do |response, operation|
|
410
|
+
yield response, operation if block_given?
|
411
|
+
end
|
412
|
+
rescue ::GRPC::BadStatus => e
|
413
|
+
raise ::Google::Cloud::Error.from_error(e)
|
414
|
+
end
|
415
|
+
|
416
|
+
##
|
417
|
+
# Lists reasoning engines in a location.
|
418
|
+
#
|
419
|
+
# @overload list_reasoning_engines(request, options = nil)
|
420
|
+
# Pass arguments to `list_reasoning_engines` via a request object, either of type
|
421
|
+
# {::Google::Cloud::AIPlatform::V1::ListReasoningEnginesRequest} or an equivalent Hash.
|
422
|
+
#
|
423
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ListReasoningEnginesRequest, ::Hash]
|
424
|
+
# A request object representing the call parameters. Required. To specify no
|
425
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
426
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
427
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
428
|
+
#
|
429
|
+
# @overload list_reasoning_engines(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
430
|
+
# Pass arguments to `list_reasoning_engines` via keyword arguments. Note that at
|
431
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
432
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
433
|
+
#
|
434
|
+
# @param parent [::String]
|
435
|
+
# Required. The resource name of the Location to list the ReasoningEngines
|
436
|
+
# from. Format: `projects/{project}/locations/{location}`
|
437
|
+
# @param filter [::String]
|
438
|
+
# Optional. The standard list filter.
|
439
|
+
# More detail in [AIP-160](https://google.aip.dev/160).
|
440
|
+
# @param page_size [::Integer]
|
441
|
+
# Optional. The standard list page size.
|
442
|
+
# @param page_token [::String]
|
443
|
+
# Optional. The standard list page token.
|
444
|
+
#
|
445
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
446
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ReasoningEngine>]
|
447
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
448
|
+
#
|
449
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ReasoningEngine>]
|
450
|
+
#
|
451
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
452
|
+
#
|
453
|
+
# @example Basic example
|
454
|
+
# require "google/cloud/ai_platform/v1"
|
455
|
+
#
|
456
|
+
# # Create a client object. The client can be reused for multiple calls.
|
457
|
+
# client = Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new
|
458
|
+
#
|
459
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
460
|
+
# request = Google::Cloud::AIPlatform::V1::ListReasoningEnginesRequest.new
|
461
|
+
#
|
462
|
+
# # Call the list_reasoning_engines method.
|
463
|
+
# result = client.list_reasoning_engines request
|
464
|
+
#
|
465
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
466
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
467
|
+
# result.each do |item|
|
468
|
+
# # Each element is of type ::Google::Cloud::AIPlatform::V1::ReasoningEngine.
|
469
|
+
# p item
|
470
|
+
# end
|
471
|
+
#
|
472
|
+
def list_reasoning_engines request, options = nil
|
473
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
474
|
+
|
475
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListReasoningEnginesRequest
|
476
|
+
|
477
|
+
# Converts hash and nil to an options object
|
478
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
479
|
+
|
480
|
+
# Customize the options with defaults
|
481
|
+
metadata = @config.rpcs.list_reasoning_engines.metadata.to_h
|
482
|
+
|
483
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
484
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
485
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
486
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
487
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
488
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
489
|
+
|
490
|
+
header_params = {}
|
491
|
+
if request.parent
|
492
|
+
header_params["parent"] = request.parent
|
493
|
+
end
|
494
|
+
|
495
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
496
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
497
|
+
|
498
|
+
options.apply_defaults timeout: @config.rpcs.list_reasoning_engines.timeout,
|
499
|
+
metadata: metadata,
|
500
|
+
retry_policy: @config.rpcs.list_reasoning_engines.retry_policy
|
501
|
+
|
502
|
+
options.apply_defaults timeout: @config.timeout,
|
503
|
+
metadata: @config.metadata,
|
504
|
+
retry_policy: @config.retry_policy
|
505
|
+
|
506
|
+
@reasoning_engine_service_stub.call_rpc :list_reasoning_engines, request, options: options do |response, operation|
|
507
|
+
response = ::Gapic::PagedEnumerable.new @reasoning_engine_service_stub, :list_reasoning_engines, request, response, operation, options
|
508
|
+
yield response, operation if block_given?
|
509
|
+
throw :response, response
|
510
|
+
end
|
511
|
+
rescue ::GRPC::BadStatus => e
|
512
|
+
raise ::Google::Cloud::Error.from_error(e)
|
513
|
+
end
|
514
|
+
|
515
|
+
##
|
516
|
+
# Updates a reasoning engine.
|
517
|
+
#
|
518
|
+
# @overload update_reasoning_engine(request, options = nil)
|
519
|
+
# Pass arguments to `update_reasoning_engine` via a request object, either of type
|
520
|
+
# {::Google::Cloud::AIPlatform::V1::UpdateReasoningEngineRequest} or an equivalent Hash.
|
521
|
+
#
|
522
|
+
# @param request [::Google::Cloud::AIPlatform::V1::UpdateReasoningEngineRequest, ::Hash]
|
523
|
+
# A request object representing the call parameters. Required. To specify no
|
524
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
525
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
526
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
527
|
+
#
|
528
|
+
# @overload update_reasoning_engine(reasoning_engine: nil, update_mask: nil)
|
529
|
+
# Pass arguments to `update_reasoning_engine` via keyword arguments. Note that at
|
530
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
531
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
532
|
+
#
|
533
|
+
# @param reasoning_engine [::Google::Cloud::AIPlatform::V1::ReasoningEngine, ::Hash]
|
534
|
+
# Required. The ReasoningEngine which replaces the resource on the server.
|
535
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
536
|
+
# Optional. Mask specifying which fields to update.
|
537
|
+
#
|
538
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
539
|
+
# @yieldparam response [::Gapic::Operation]
|
540
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
541
|
+
#
|
542
|
+
# @return [::Gapic::Operation]
|
543
|
+
#
|
544
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
545
|
+
#
|
546
|
+
# @example Basic example
|
547
|
+
# require "google/cloud/ai_platform/v1"
|
548
|
+
#
|
549
|
+
# # Create a client object. The client can be reused for multiple calls.
|
550
|
+
# client = Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new
|
551
|
+
#
|
552
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
553
|
+
# request = Google::Cloud::AIPlatform::V1::UpdateReasoningEngineRequest.new
|
554
|
+
#
|
555
|
+
# # Call the update_reasoning_engine method.
|
556
|
+
# result = client.update_reasoning_engine request
|
557
|
+
#
|
558
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
559
|
+
# # check the status of an operation, cancel it, or wait for results.
|
560
|
+
# # Here is how to wait for a response.
|
561
|
+
# result.wait_until_done! timeout: 60
|
562
|
+
# if result.response?
|
563
|
+
# p result.response
|
564
|
+
# else
|
565
|
+
# puts "No response received."
|
566
|
+
# end
|
567
|
+
#
|
568
|
+
def update_reasoning_engine request, options = nil
|
569
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
570
|
+
|
571
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateReasoningEngineRequest
|
572
|
+
|
573
|
+
# Converts hash and nil to an options object
|
574
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
575
|
+
|
576
|
+
# Customize the options with defaults
|
577
|
+
metadata = @config.rpcs.update_reasoning_engine.metadata.to_h
|
578
|
+
|
579
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
580
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
581
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
582
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
583
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
584
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
585
|
+
|
586
|
+
header_params = {}
|
587
|
+
if request.reasoning_engine&.name
|
588
|
+
header_params["reasoning_engine.name"] = request.reasoning_engine.name
|
589
|
+
end
|
590
|
+
|
591
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
592
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
593
|
+
|
594
|
+
options.apply_defaults timeout: @config.rpcs.update_reasoning_engine.timeout,
|
595
|
+
metadata: metadata,
|
596
|
+
retry_policy: @config.rpcs.update_reasoning_engine.retry_policy
|
597
|
+
|
598
|
+
options.apply_defaults timeout: @config.timeout,
|
599
|
+
metadata: @config.metadata,
|
600
|
+
retry_policy: @config.retry_policy
|
601
|
+
|
602
|
+
@reasoning_engine_service_stub.call_rpc :update_reasoning_engine, request, options: options do |response, operation|
|
603
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
604
|
+
yield response, operation if block_given?
|
605
|
+
throw :response, response
|
606
|
+
end
|
607
|
+
rescue ::GRPC::BadStatus => e
|
608
|
+
raise ::Google::Cloud::Error.from_error(e)
|
609
|
+
end
|
610
|
+
|
611
|
+
##
|
612
|
+
# Deletes a reasoning engine.
|
613
|
+
#
|
614
|
+
# @overload delete_reasoning_engine(request, options = nil)
|
615
|
+
# Pass arguments to `delete_reasoning_engine` via a request object, either of type
|
616
|
+
# {::Google::Cloud::AIPlatform::V1::DeleteReasoningEngineRequest} or an equivalent Hash.
|
617
|
+
#
|
618
|
+
# @param request [::Google::Cloud::AIPlatform::V1::DeleteReasoningEngineRequest, ::Hash]
|
619
|
+
# A request object representing the call parameters. Required. To specify no
|
620
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
621
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
622
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
623
|
+
#
|
624
|
+
# @overload delete_reasoning_engine(name: nil)
|
625
|
+
# Pass arguments to `delete_reasoning_engine` via keyword arguments. Note that at
|
626
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
627
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
628
|
+
#
|
629
|
+
# @param name [::String]
|
630
|
+
# Required. The name of the ReasoningEngine resource to be deleted.
|
631
|
+
# Format:
|
632
|
+
# `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
|
633
|
+
#
|
634
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
635
|
+
# @yieldparam response [::Gapic::Operation]
|
636
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
637
|
+
#
|
638
|
+
# @return [::Gapic::Operation]
|
639
|
+
#
|
640
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
641
|
+
#
|
642
|
+
# @example Basic example
|
643
|
+
# require "google/cloud/ai_platform/v1"
|
644
|
+
#
|
645
|
+
# # Create a client object. The client can be reused for multiple calls.
|
646
|
+
# client = Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new
|
647
|
+
#
|
648
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
649
|
+
# request = Google::Cloud::AIPlatform::V1::DeleteReasoningEngineRequest.new
|
650
|
+
#
|
651
|
+
# # Call the delete_reasoning_engine method.
|
652
|
+
# result = client.delete_reasoning_engine request
|
653
|
+
#
|
654
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
655
|
+
# # check the status of an operation, cancel it, or wait for results.
|
656
|
+
# # Here is how to wait for a response.
|
657
|
+
# result.wait_until_done! timeout: 60
|
658
|
+
# if result.response?
|
659
|
+
# p result.response
|
660
|
+
# else
|
661
|
+
# puts "No response received."
|
662
|
+
# end
|
663
|
+
#
|
664
|
+
def delete_reasoning_engine request, options = nil
|
665
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
666
|
+
|
667
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteReasoningEngineRequest
|
668
|
+
|
669
|
+
# Converts hash and nil to an options object
|
670
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
671
|
+
|
672
|
+
# Customize the options with defaults
|
673
|
+
metadata = @config.rpcs.delete_reasoning_engine.metadata.to_h
|
674
|
+
|
675
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
676
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
677
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
678
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
679
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
680
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
681
|
+
|
682
|
+
header_params = {}
|
683
|
+
if request.name
|
684
|
+
header_params["name"] = request.name
|
685
|
+
end
|
686
|
+
|
687
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
688
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
689
|
+
|
690
|
+
options.apply_defaults timeout: @config.rpcs.delete_reasoning_engine.timeout,
|
691
|
+
metadata: metadata,
|
692
|
+
retry_policy: @config.rpcs.delete_reasoning_engine.retry_policy
|
693
|
+
|
694
|
+
options.apply_defaults timeout: @config.timeout,
|
695
|
+
metadata: @config.metadata,
|
696
|
+
retry_policy: @config.retry_policy
|
697
|
+
|
698
|
+
@reasoning_engine_service_stub.call_rpc :delete_reasoning_engine, request, options: options do |response, operation|
|
699
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
700
|
+
yield response, operation if block_given?
|
701
|
+
throw :response, response
|
702
|
+
end
|
703
|
+
rescue ::GRPC::BadStatus => e
|
704
|
+
raise ::Google::Cloud::Error.from_error(e)
|
705
|
+
end
|
706
|
+
|
707
|
+
##
|
708
|
+
# Configuration class for the ReasoningEngineService API.
|
709
|
+
#
|
710
|
+
# This class represents the configuration for ReasoningEngineService,
|
711
|
+
# providing control over timeouts, retry behavior, logging, transport
|
712
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
713
|
+
# applied individually to specific RPCs. See
|
714
|
+
# {::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client::Configuration::Rpcs}
|
715
|
+
# for a list of RPCs that can be configured independently.
|
716
|
+
#
|
717
|
+
# Configuration can be applied globally to all clients, or to a single client
|
718
|
+
# on construction.
|
719
|
+
#
|
720
|
+
# @example
|
721
|
+
#
|
722
|
+
# # Modify the global config, setting the timeout for
|
723
|
+
# # create_reasoning_engine to 20 seconds,
|
724
|
+
# # and all remaining timeouts to 10 seconds.
|
725
|
+
# ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.configure do |config|
|
726
|
+
# config.timeout = 10.0
|
727
|
+
# config.rpcs.create_reasoning_engine.timeout = 20.0
|
728
|
+
# end
|
729
|
+
#
|
730
|
+
# # Apply the above configuration only to a new client.
|
731
|
+
# client = ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client.new do |config|
|
732
|
+
# config.timeout = 10.0
|
733
|
+
# config.rpcs.create_reasoning_engine.timeout = 20.0
|
734
|
+
# end
|
735
|
+
#
|
736
|
+
# @!attribute [rw] endpoint
|
737
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
738
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
739
|
+
# @return [::String,nil]
|
740
|
+
# @!attribute [rw] credentials
|
741
|
+
# Credentials to send with calls. You may provide any of the following types:
|
742
|
+
# * (`String`) The path to a service account key file in JSON format
|
743
|
+
# * (`Hash`) A service account key as a Hash
|
744
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
745
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
746
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
747
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
748
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
749
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
750
|
+
# * (`nil`) indicating no credentials
|
751
|
+
# @return [::Object]
|
752
|
+
# @!attribute [rw] scope
|
753
|
+
# The OAuth scopes
|
754
|
+
# @return [::Array<::String>]
|
755
|
+
# @!attribute [rw] lib_name
|
756
|
+
# The library name as recorded in instrumentation and logging
|
757
|
+
# @return [::String]
|
758
|
+
# @!attribute [rw] lib_version
|
759
|
+
# The library version as recorded in instrumentation and logging
|
760
|
+
# @return [::String]
|
761
|
+
# @!attribute [rw] channel_args
|
762
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
763
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
764
|
+
# @return [::Hash]
|
765
|
+
# @!attribute [rw] interceptors
|
766
|
+
# An array of interceptors that are run before calls are executed.
|
767
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
768
|
+
# @!attribute [rw] timeout
|
769
|
+
# The call timeout in seconds.
|
770
|
+
# @return [::Numeric]
|
771
|
+
# @!attribute [rw] metadata
|
772
|
+
# Additional gRPC headers to be sent with the call.
|
773
|
+
# @return [::Hash{::Symbol=>::String}]
|
774
|
+
# @!attribute [rw] retry_policy
|
775
|
+
# The retry policy. The value is a hash with the following keys:
|
776
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
777
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
778
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
779
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
780
|
+
# trigger a retry.
|
781
|
+
# @return [::Hash]
|
782
|
+
# @!attribute [rw] quota_project
|
783
|
+
# A separate project against which to charge quota.
|
784
|
+
# @return [::String]
|
785
|
+
# @!attribute [rw] universe_domain
|
786
|
+
# The universe domain within which to make requests. This determines the
|
787
|
+
# default endpoint URL. The default value of nil uses the environment
|
788
|
+
# universe (usually the default "googleapis.com" universe).
|
789
|
+
# @return [::String,nil]
|
790
|
+
# @!attribute [rw] logger
|
791
|
+
# A custom logger to use for request/response debug logging, or the value
|
792
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
793
|
+
# explicitly disable logging.
|
794
|
+
# @return [::Logger,:default,nil]
|
795
|
+
#
|
796
|
+
class Configuration
|
797
|
+
extend ::Gapic::Config
|
798
|
+
|
799
|
+
# @private
|
800
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
801
|
+
DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
|
802
|
+
|
803
|
+
config_attr :endpoint, nil, ::String, nil
|
804
|
+
config_attr :credentials, nil do |value|
|
805
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
806
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
807
|
+
allowed.any? { |klass| klass === value }
|
808
|
+
end
|
809
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
810
|
+
config_attr :lib_name, nil, ::String, nil
|
811
|
+
config_attr :lib_version, nil, ::String, nil
|
812
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
813
|
+
config_attr :interceptors, nil, ::Array, nil
|
814
|
+
config_attr :timeout, nil, ::Numeric, nil
|
815
|
+
config_attr :metadata, nil, ::Hash, nil
|
816
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
817
|
+
config_attr :quota_project, nil, ::String, nil
|
818
|
+
config_attr :universe_domain, nil, ::String, nil
|
819
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
820
|
+
|
821
|
+
# @private
|
822
|
+
def initialize parent_config = nil
|
823
|
+
@parent_config = parent_config unless parent_config.nil?
|
824
|
+
|
825
|
+
yield self if block_given?
|
826
|
+
end
|
827
|
+
|
828
|
+
##
|
829
|
+
# Configurations for individual RPCs
|
830
|
+
# @return [Rpcs]
|
831
|
+
#
|
832
|
+
def rpcs
|
833
|
+
@rpcs ||= begin
|
834
|
+
parent_rpcs = nil
|
835
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
836
|
+
Rpcs.new parent_rpcs
|
837
|
+
end
|
838
|
+
end
|
839
|
+
|
840
|
+
##
|
841
|
+
# Configuration for the channel pool
|
842
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
843
|
+
#
|
844
|
+
def channel_pool
|
845
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
846
|
+
end
|
847
|
+
|
848
|
+
##
|
849
|
+
# Configuration RPC class for the ReasoningEngineService API.
|
850
|
+
#
|
851
|
+
# Includes fields providing the configuration for each RPC in this service.
|
852
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
853
|
+
# the following configuration fields:
|
854
|
+
#
|
855
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
856
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
857
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
858
|
+
# include the following keys:
|
859
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
860
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
861
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
862
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
863
|
+
# trigger a retry.
|
864
|
+
#
|
865
|
+
class Rpcs
|
866
|
+
##
|
867
|
+
# RPC-specific configuration for `create_reasoning_engine`
|
868
|
+
# @return [::Gapic::Config::Method]
|
869
|
+
#
|
870
|
+
attr_reader :create_reasoning_engine
|
871
|
+
##
|
872
|
+
# RPC-specific configuration for `get_reasoning_engine`
|
873
|
+
# @return [::Gapic::Config::Method]
|
874
|
+
#
|
875
|
+
attr_reader :get_reasoning_engine
|
876
|
+
##
|
877
|
+
# RPC-specific configuration for `list_reasoning_engines`
|
878
|
+
# @return [::Gapic::Config::Method]
|
879
|
+
#
|
880
|
+
attr_reader :list_reasoning_engines
|
881
|
+
##
|
882
|
+
# RPC-specific configuration for `update_reasoning_engine`
|
883
|
+
# @return [::Gapic::Config::Method]
|
884
|
+
#
|
885
|
+
attr_reader :update_reasoning_engine
|
886
|
+
##
|
887
|
+
# RPC-specific configuration for `delete_reasoning_engine`
|
888
|
+
# @return [::Gapic::Config::Method]
|
889
|
+
#
|
890
|
+
attr_reader :delete_reasoning_engine
|
891
|
+
|
892
|
+
# @private
|
893
|
+
def initialize parent_rpcs = nil
|
894
|
+
create_reasoning_engine_config = parent_rpcs.create_reasoning_engine if parent_rpcs.respond_to? :create_reasoning_engine
|
895
|
+
@create_reasoning_engine = ::Gapic::Config::Method.new create_reasoning_engine_config
|
896
|
+
get_reasoning_engine_config = parent_rpcs.get_reasoning_engine if parent_rpcs.respond_to? :get_reasoning_engine
|
897
|
+
@get_reasoning_engine = ::Gapic::Config::Method.new get_reasoning_engine_config
|
898
|
+
list_reasoning_engines_config = parent_rpcs.list_reasoning_engines if parent_rpcs.respond_to? :list_reasoning_engines
|
899
|
+
@list_reasoning_engines = ::Gapic::Config::Method.new list_reasoning_engines_config
|
900
|
+
update_reasoning_engine_config = parent_rpcs.update_reasoning_engine if parent_rpcs.respond_to? :update_reasoning_engine
|
901
|
+
@update_reasoning_engine = ::Gapic::Config::Method.new update_reasoning_engine_config
|
902
|
+
delete_reasoning_engine_config = parent_rpcs.delete_reasoning_engine if parent_rpcs.respond_to? :delete_reasoning_engine
|
903
|
+
@delete_reasoning_engine = ::Gapic::Config::Method.new delete_reasoning_engine_config
|
904
|
+
|
905
|
+
yield self if block_given?
|
906
|
+
end
|
907
|
+
end
|
908
|
+
end
|
909
|
+
end
|
910
|
+
end
|
911
|
+
end
|
912
|
+
end
|
913
|
+
end
|
914
|
+
end
|