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,862 @@
|
|
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/ai_platform/v1/reasoning_engine_service/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
23
|
+
require "google/iam/v1/rest"
|
24
|
+
|
25
|
+
module Google
|
26
|
+
module Cloud
|
27
|
+
module AIPlatform
|
28
|
+
module V1
|
29
|
+
module ReasoningEngineService
|
30
|
+
module Rest
|
31
|
+
##
|
32
|
+
# REST client for the ReasoningEngineService service.
|
33
|
+
#
|
34
|
+
# A service for managing Vertex AI's Reasoning Engines.
|
35
|
+
#
|
36
|
+
class Client
|
37
|
+
# @private
|
38
|
+
API_VERSION = ""
|
39
|
+
|
40
|
+
# @private
|
41
|
+
DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
|
42
|
+
|
43
|
+
include Paths
|
44
|
+
|
45
|
+
# @private
|
46
|
+
attr_reader :reasoning_engine_service_stub
|
47
|
+
|
48
|
+
##
|
49
|
+
# Configure the ReasoningEngineService Client class.
|
50
|
+
#
|
51
|
+
# See {::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::Client::Configuration}
|
52
|
+
# for a description of the configuration fields.
|
53
|
+
#
|
54
|
+
# @example
|
55
|
+
#
|
56
|
+
# # Modify the configuration for all ReasoningEngineService clients
|
57
|
+
# ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::Client.configure do |config|
|
58
|
+
# config.timeout = 10.0
|
59
|
+
# end
|
60
|
+
#
|
61
|
+
# @yield [config] Configure the Client client.
|
62
|
+
# @yieldparam config [Client::Configuration]
|
63
|
+
#
|
64
|
+
# @return [Client::Configuration]
|
65
|
+
#
|
66
|
+
def self.configure
|
67
|
+
@configure ||= begin
|
68
|
+
namespace = ["Google", "Cloud", "AIPlatform", "V1"]
|
69
|
+
parent_config = while namespace.any?
|
70
|
+
parent_name = namespace.join "::"
|
71
|
+
parent_const = const_get parent_name
|
72
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
73
|
+
namespace.pop
|
74
|
+
end
|
75
|
+
default_config = Client::Configuration.new parent_config
|
76
|
+
|
77
|
+
default_config
|
78
|
+
end
|
79
|
+
yield @configure if block_given?
|
80
|
+
@configure
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# Configure the ReasoningEngineService Client instance.
|
85
|
+
#
|
86
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
87
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
88
|
+
# should be made on {Client.configure}.
|
89
|
+
#
|
90
|
+
# See {::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::Client::Configuration}
|
91
|
+
# for a description of the configuration fields.
|
92
|
+
#
|
93
|
+
# @yield [config] Configure the Client client.
|
94
|
+
# @yieldparam config [Client::Configuration]
|
95
|
+
#
|
96
|
+
# @return [Client::Configuration]
|
97
|
+
#
|
98
|
+
def configure
|
99
|
+
yield @config if block_given?
|
100
|
+
@config
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# The effective universe domain
|
105
|
+
#
|
106
|
+
# @return [String]
|
107
|
+
#
|
108
|
+
def universe_domain
|
109
|
+
@reasoning_engine_service_stub.universe_domain
|
110
|
+
end
|
111
|
+
|
112
|
+
##
|
113
|
+
# Create a new ReasoningEngineService REST client object.
|
114
|
+
#
|
115
|
+
# @example
|
116
|
+
#
|
117
|
+
# # Create a client using the default configuration
|
118
|
+
# client = ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::Client.new
|
119
|
+
#
|
120
|
+
# # Create a client using a custom configuration
|
121
|
+
# client = ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::Client.new do |config|
|
122
|
+
# config.timeout = 10.0
|
123
|
+
# end
|
124
|
+
#
|
125
|
+
# @yield [config] Configure the ReasoningEngineService client.
|
126
|
+
# @yieldparam config [Client::Configuration]
|
127
|
+
#
|
128
|
+
def initialize
|
129
|
+
# Create the configuration object
|
130
|
+
@config = Configuration.new Client.configure
|
131
|
+
|
132
|
+
# Yield the configuration if needed
|
133
|
+
yield @config if block_given?
|
134
|
+
|
135
|
+
# Create credentials
|
136
|
+
credentials = @config.credentials
|
137
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
138
|
+
# but only if the default endpoint does not have a region prefix.
|
139
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
140
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
141
|
+
!@config.endpoint.split(".").first.include?("-"))
|
142
|
+
credentials ||= Credentials.default scope: @config.scope,
|
143
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
144
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
145
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
146
|
+
end
|
147
|
+
|
148
|
+
@quota_project_id = @config.quota_project
|
149
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
150
|
+
|
151
|
+
@operations_client = ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::Operations.new do |config|
|
152
|
+
config.credentials = credentials
|
153
|
+
config.quota_project = @quota_project_id
|
154
|
+
config.endpoint = @config.endpoint
|
155
|
+
config.universe_domain = @config.universe_domain
|
156
|
+
end
|
157
|
+
|
158
|
+
@reasoning_engine_service_stub = ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::ServiceStub.new(
|
159
|
+
endpoint: @config.endpoint,
|
160
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
161
|
+
universe_domain: @config.universe_domain,
|
162
|
+
credentials: credentials,
|
163
|
+
logger: @config.logger
|
164
|
+
)
|
165
|
+
|
166
|
+
@reasoning_engine_service_stub.logger(stub: true)&.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::Rest::Client.new do |config|
|
177
|
+
config.credentials = credentials
|
178
|
+
config.quota_project = @quota_project_id
|
179
|
+
config.endpoint = @reasoning_engine_service_stub.endpoint
|
180
|
+
config.universe_domain = @reasoning_engine_service_stub.universe_domain
|
181
|
+
config.bindings_override = @config.bindings_override
|
182
|
+
config.logger = @reasoning_engine_service_stub.logger if config.respond_to? :logger=
|
183
|
+
end
|
184
|
+
|
185
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
186
|
+
config.credentials = credentials
|
187
|
+
config.quota_project = @quota_project_id
|
188
|
+
config.endpoint = @reasoning_engine_service_stub.endpoint
|
189
|
+
config.universe_domain = @reasoning_engine_service_stub.universe_domain
|
190
|
+
config.bindings_override = @config.bindings_override
|
191
|
+
config.logger = @reasoning_engine_service_stub.logger if config.respond_to? :logger=
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
##
|
196
|
+
# Get the associated client for long-running operations.
|
197
|
+
#
|
198
|
+
# @return [::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::Operations]
|
199
|
+
#
|
200
|
+
attr_reader :operations_client
|
201
|
+
|
202
|
+
##
|
203
|
+
# Get the associated client for mix-in of the Locations.
|
204
|
+
#
|
205
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
206
|
+
#
|
207
|
+
attr_reader :location_client
|
208
|
+
|
209
|
+
##
|
210
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
211
|
+
#
|
212
|
+
# @return [Google::Iam::V1::IAMPolicy::Rest::Client]
|
213
|
+
#
|
214
|
+
attr_reader :iam_policy_client
|
215
|
+
|
216
|
+
##
|
217
|
+
# The logger used for request/response debug logging.
|
218
|
+
#
|
219
|
+
# @return [Logger]
|
220
|
+
#
|
221
|
+
def logger
|
222
|
+
@reasoning_engine_service_stub.logger
|
223
|
+
end
|
224
|
+
|
225
|
+
# Service calls
|
226
|
+
|
227
|
+
##
|
228
|
+
# Creates a reasoning engine.
|
229
|
+
#
|
230
|
+
# @overload create_reasoning_engine(request, options = nil)
|
231
|
+
# Pass arguments to `create_reasoning_engine` via a request object, either of type
|
232
|
+
# {::Google::Cloud::AIPlatform::V1::CreateReasoningEngineRequest} or an equivalent Hash.
|
233
|
+
#
|
234
|
+
# @param request [::Google::Cloud::AIPlatform::V1::CreateReasoningEngineRequest, ::Hash]
|
235
|
+
# A request object representing the call parameters. Required. To specify no
|
236
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
237
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
238
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
239
|
+
#
|
240
|
+
# @overload create_reasoning_engine(parent: nil, reasoning_engine: nil)
|
241
|
+
# Pass arguments to `create_reasoning_engine` via keyword arguments. Note that at
|
242
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
243
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
244
|
+
#
|
245
|
+
# @param parent [::String]
|
246
|
+
# Required. The resource name of the Location to create the ReasoningEngine
|
247
|
+
# in. Format: `projects/{project}/locations/{location}`
|
248
|
+
# @param reasoning_engine [::Google::Cloud::AIPlatform::V1::ReasoningEngine, ::Hash]
|
249
|
+
# Required. The ReasoningEngine to create.
|
250
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
251
|
+
# @yieldparam result [::Gapic::Operation]
|
252
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
253
|
+
#
|
254
|
+
# @return [::Gapic::Operation]
|
255
|
+
#
|
256
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
257
|
+
#
|
258
|
+
# @example Basic example
|
259
|
+
# require "google/cloud/ai_platform/v1"
|
260
|
+
#
|
261
|
+
# # Create a client object. The client can be reused for multiple calls.
|
262
|
+
# client = Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::Client.new
|
263
|
+
#
|
264
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
265
|
+
# request = Google::Cloud::AIPlatform::V1::CreateReasoningEngineRequest.new
|
266
|
+
#
|
267
|
+
# # Call the create_reasoning_engine method.
|
268
|
+
# result = client.create_reasoning_engine request
|
269
|
+
#
|
270
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
271
|
+
# # check the status of an operation, cancel it, or wait for results.
|
272
|
+
# # Here is how to wait for a response.
|
273
|
+
# result.wait_until_done! timeout: 60
|
274
|
+
# if result.response?
|
275
|
+
# p result.response
|
276
|
+
# else
|
277
|
+
# puts "No response received."
|
278
|
+
# end
|
279
|
+
#
|
280
|
+
def create_reasoning_engine request, options = nil
|
281
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
282
|
+
|
283
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateReasoningEngineRequest
|
284
|
+
|
285
|
+
# Converts hash and nil to an options object
|
286
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
287
|
+
|
288
|
+
# Customize the options with defaults
|
289
|
+
call_metadata = @config.rpcs.create_reasoning_engine.metadata.to_h
|
290
|
+
|
291
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
292
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
293
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
294
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
295
|
+
transports_version_send: [:rest]
|
296
|
+
|
297
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
298
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
299
|
+
|
300
|
+
options.apply_defaults timeout: @config.rpcs.create_reasoning_engine.timeout,
|
301
|
+
metadata: call_metadata,
|
302
|
+
retry_policy: @config.rpcs.create_reasoning_engine.retry_policy
|
303
|
+
|
304
|
+
options.apply_defaults timeout: @config.timeout,
|
305
|
+
metadata: @config.metadata,
|
306
|
+
retry_policy: @config.retry_policy
|
307
|
+
|
308
|
+
@reasoning_engine_service_stub.create_reasoning_engine request, options do |result, operation|
|
309
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
310
|
+
yield result, operation if block_given?
|
311
|
+
throw :response, result
|
312
|
+
end
|
313
|
+
rescue ::Gapic::Rest::Error => e
|
314
|
+
raise ::Google::Cloud::Error.from_error(e)
|
315
|
+
end
|
316
|
+
|
317
|
+
##
|
318
|
+
# Gets a reasoning engine.
|
319
|
+
#
|
320
|
+
# @overload get_reasoning_engine(request, options = nil)
|
321
|
+
# Pass arguments to `get_reasoning_engine` via a request object, either of type
|
322
|
+
# {::Google::Cloud::AIPlatform::V1::GetReasoningEngineRequest} or an equivalent Hash.
|
323
|
+
#
|
324
|
+
# @param request [::Google::Cloud::AIPlatform::V1::GetReasoningEngineRequest, ::Hash]
|
325
|
+
# A request object representing the call parameters. Required. To specify no
|
326
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
327
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
328
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
329
|
+
#
|
330
|
+
# @overload get_reasoning_engine(name: nil)
|
331
|
+
# Pass arguments to `get_reasoning_engine` via keyword arguments. Note that at
|
332
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
333
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
334
|
+
#
|
335
|
+
# @param name [::String]
|
336
|
+
# Required. The name of the ReasoningEngine resource.
|
337
|
+
# Format:
|
338
|
+
# `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
|
339
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
340
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::ReasoningEngine]
|
341
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
342
|
+
#
|
343
|
+
# @return [::Google::Cloud::AIPlatform::V1::ReasoningEngine]
|
344
|
+
#
|
345
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
346
|
+
#
|
347
|
+
# @example Basic example
|
348
|
+
# require "google/cloud/ai_platform/v1"
|
349
|
+
#
|
350
|
+
# # Create a client object. The client can be reused for multiple calls.
|
351
|
+
# client = Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::Client.new
|
352
|
+
#
|
353
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
354
|
+
# request = Google::Cloud::AIPlatform::V1::GetReasoningEngineRequest.new
|
355
|
+
#
|
356
|
+
# # Call the get_reasoning_engine method.
|
357
|
+
# result = client.get_reasoning_engine request
|
358
|
+
#
|
359
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::ReasoningEngine.
|
360
|
+
# p result
|
361
|
+
#
|
362
|
+
def get_reasoning_engine request, options = nil
|
363
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
364
|
+
|
365
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetReasoningEngineRequest
|
366
|
+
|
367
|
+
# Converts hash and nil to an options object
|
368
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
369
|
+
|
370
|
+
# Customize the options with defaults
|
371
|
+
call_metadata = @config.rpcs.get_reasoning_engine.metadata.to_h
|
372
|
+
|
373
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
374
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
375
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
376
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
377
|
+
transports_version_send: [:rest]
|
378
|
+
|
379
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
380
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
381
|
+
|
382
|
+
options.apply_defaults timeout: @config.rpcs.get_reasoning_engine.timeout,
|
383
|
+
metadata: call_metadata,
|
384
|
+
retry_policy: @config.rpcs.get_reasoning_engine.retry_policy
|
385
|
+
|
386
|
+
options.apply_defaults timeout: @config.timeout,
|
387
|
+
metadata: @config.metadata,
|
388
|
+
retry_policy: @config.retry_policy
|
389
|
+
|
390
|
+
@reasoning_engine_service_stub.get_reasoning_engine request, options do |result, operation|
|
391
|
+
yield result, operation if block_given?
|
392
|
+
end
|
393
|
+
rescue ::Gapic::Rest::Error => e
|
394
|
+
raise ::Google::Cloud::Error.from_error(e)
|
395
|
+
end
|
396
|
+
|
397
|
+
##
|
398
|
+
# Lists reasoning engines in a location.
|
399
|
+
#
|
400
|
+
# @overload list_reasoning_engines(request, options = nil)
|
401
|
+
# Pass arguments to `list_reasoning_engines` via a request object, either of type
|
402
|
+
# {::Google::Cloud::AIPlatform::V1::ListReasoningEnginesRequest} or an equivalent Hash.
|
403
|
+
#
|
404
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ListReasoningEnginesRequest, ::Hash]
|
405
|
+
# A request object representing the call parameters. Required. To specify no
|
406
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
407
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
408
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
409
|
+
#
|
410
|
+
# @overload list_reasoning_engines(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
411
|
+
# Pass arguments to `list_reasoning_engines` via keyword arguments. Note that at
|
412
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
413
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
414
|
+
#
|
415
|
+
# @param parent [::String]
|
416
|
+
# Required. The resource name of the Location to list the ReasoningEngines
|
417
|
+
# from. Format: `projects/{project}/locations/{location}`
|
418
|
+
# @param filter [::String]
|
419
|
+
# Optional. The standard list filter.
|
420
|
+
# More detail in [AIP-160](https://google.aip.dev/160).
|
421
|
+
# @param page_size [::Integer]
|
422
|
+
# Optional. The standard list page size.
|
423
|
+
# @param page_token [::String]
|
424
|
+
# Optional. The standard list page token.
|
425
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
426
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ReasoningEngine>]
|
427
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
428
|
+
#
|
429
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ReasoningEngine>]
|
430
|
+
#
|
431
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
432
|
+
#
|
433
|
+
# @example Basic example
|
434
|
+
# require "google/cloud/ai_platform/v1"
|
435
|
+
#
|
436
|
+
# # Create a client object. The client can be reused for multiple calls.
|
437
|
+
# client = Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::Client.new
|
438
|
+
#
|
439
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
440
|
+
# request = Google::Cloud::AIPlatform::V1::ListReasoningEnginesRequest.new
|
441
|
+
#
|
442
|
+
# # Call the list_reasoning_engines method.
|
443
|
+
# result = client.list_reasoning_engines request
|
444
|
+
#
|
445
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
446
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
447
|
+
# result.each do |item|
|
448
|
+
# # Each element is of type ::Google::Cloud::AIPlatform::V1::ReasoningEngine.
|
449
|
+
# p item
|
450
|
+
# end
|
451
|
+
#
|
452
|
+
def list_reasoning_engines request, options = nil
|
453
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
454
|
+
|
455
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListReasoningEnginesRequest
|
456
|
+
|
457
|
+
# Converts hash and nil to an options object
|
458
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
459
|
+
|
460
|
+
# Customize the options with defaults
|
461
|
+
call_metadata = @config.rpcs.list_reasoning_engines.metadata.to_h
|
462
|
+
|
463
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
464
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
465
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
466
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
467
|
+
transports_version_send: [:rest]
|
468
|
+
|
469
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
470
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
471
|
+
|
472
|
+
options.apply_defaults timeout: @config.rpcs.list_reasoning_engines.timeout,
|
473
|
+
metadata: call_metadata,
|
474
|
+
retry_policy: @config.rpcs.list_reasoning_engines.retry_policy
|
475
|
+
|
476
|
+
options.apply_defaults timeout: @config.timeout,
|
477
|
+
metadata: @config.metadata,
|
478
|
+
retry_policy: @config.retry_policy
|
479
|
+
|
480
|
+
@reasoning_engine_service_stub.list_reasoning_engines request, options do |result, operation|
|
481
|
+
result = ::Gapic::Rest::PagedEnumerable.new @reasoning_engine_service_stub, :list_reasoning_engines, "reasoning_engines", request, result, options
|
482
|
+
yield result, operation if block_given?
|
483
|
+
throw :response, result
|
484
|
+
end
|
485
|
+
rescue ::Gapic::Rest::Error => e
|
486
|
+
raise ::Google::Cloud::Error.from_error(e)
|
487
|
+
end
|
488
|
+
|
489
|
+
##
|
490
|
+
# Updates a reasoning engine.
|
491
|
+
#
|
492
|
+
# @overload update_reasoning_engine(request, options = nil)
|
493
|
+
# Pass arguments to `update_reasoning_engine` via a request object, either of type
|
494
|
+
# {::Google::Cloud::AIPlatform::V1::UpdateReasoningEngineRequest} or an equivalent Hash.
|
495
|
+
#
|
496
|
+
# @param request [::Google::Cloud::AIPlatform::V1::UpdateReasoningEngineRequest, ::Hash]
|
497
|
+
# A request object representing the call parameters. Required. To specify no
|
498
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
499
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
500
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
501
|
+
#
|
502
|
+
# @overload update_reasoning_engine(reasoning_engine: nil, update_mask: nil)
|
503
|
+
# Pass arguments to `update_reasoning_engine` via keyword arguments. Note that at
|
504
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
505
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
506
|
+
#
|
507
|
+
# @param reasoning_engine [::Google::Cloud::AIPlatform::V1::ReasoningEngine, ::Hash]
|
508
|
+
# Required. The ReasoningEngine which replaces the resource on the server.
|
509
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
510
|
+
# Optional. Mask specifying which fields to update.
|
511
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
512
|
+
# @yieldparam result [::Gapic::Operation]
|
513
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
514
|
+
#
|
515
|
+
# @return [::Gapic::Operation]
|
516
|
+
#
|
517
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
518
|
+
#
|
519
|
+
# @example Basic example
|
520
|
+
# require "google/cloud/ai_platform/v1"
|
521
|
+
#
|
522
|
+
# # Create a client object. The client can be reused for multiple calls.
|
523
|
+
# client = Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::Client.new
|
524
|
+
#
|
525
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
526
|
+
# request = Google::Cloud::AIPlatform::V1::UpdateReasoningEngineRequest.new
|
527
|
+
#
|
528
|
+
# # Call the update_reasoning_engine method.
|
529
|
+
# result = client.update_reasoning_engine request
|
530
|
+
#
|
531
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
532
|
+
# # check the status of an operation, cancel it, or wait for results.
|
533
|
+
# # Here is how to wait for a response.
|
534
|
+
# result.wait_until_done! timeout: 60
|
535
|
+
# if result.response?
|
536
|
+
# p result.response
|
537
|
+
# else
|
538
|
+
# puts "No response received."
|
539
|
+
# end
|
540
|
+
#
|
541
|
+
def update_reasoning_engine request, options = nil
|
542
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
543
|
+
|
544
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateReasoningEngineRequest
|
545
|
+
|
546
|
+
# Converts hash and nil to an options object
|
547
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
548
|
+
|
549
|
+
# Customize the options with defaults
|
550
|
+
call_metadata = @config.rpcs.update_reasoning_engine.metadata.to_h
|
551
|
+
|
552
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
553
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
554
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
555
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
556
|
+
transports_version_send: [:rest]
|
557
|
+
|
558
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
559
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
560
|
+
|
561
|
+
options.apply_defaults timeout: @config.rpcs.update_reasoning_engine.timeout,
|
562
|
+
metadata: call_metadata,
|
563
|
+
retry_policy: @config.rpcs.update_reasoning_engine.retry_policy
|
564
|
+
|
565
|
+
options.apply_defaults timeout: @config.timeout,
|
566
|
+
metadata: @config.metadata,
|
567
|
+
retry_policy: @config.retry_policy
|
568
|
+
|
569
|
+
@reasoning_engine_service_stub.update_reasoning_engine request, options do |result, operation|
|
570
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
571
|
+
yield result, operation if block_given?
|
572
|
+
throw :response, result
|
573
|
+
end
|
574
|
+
rescue ::Gapic::Rest::Error => e
|
575
|
+
raise ::Google::Cloud::Error.from_error(e)
|
576
|
+
end
|
577
|
+
|
578
|
+
##
|
579
|
+
# Deletes a reasoning engine.
|
580
|
+
#
|
581
|
+
# @overload delete_reasoning_engine(request, options = nil)
|
582
|
+
# Pass arguments to `delete_reasoning_engine` via a request object, either of type
|
583
|
+
# {::Google::Cloud::AIPlatform::V1::DeleteReasoningEngineRequest} or an equivalent Hash.
|
584
|
+
#
|
585
|
+
# @param request [::Google::Cloud::AIPlatform::V1::DeleteReasoningEngineRequest, ::Hash]
|
586
|
+
# A request object representing the call parameters. Required. To specify no
|
587
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
588
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
589
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
590
|
+
#
|
591
|
+
# @overload delete_reasoning_engine(name: nil)
|
592
|
+
# Pass arguments to `delete_reasoning_engine` via keyword arguments. Note that at
|
593
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
594
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
595
|
+
#
|
596
|
+
# @param name [::String]
|
597
|
+
# Required. The name of the ReasoningEngine resource to be deleted.
|
598
|
+
# Format:
|
599
|
+
# `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
|
600
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
601
|
+
# @yieldparam result [::Gapic::Operation]
|
602
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
603
|
+
#
|
604
|
+
# @return [::Gapic::Operation]
|
605
|
+
#
|
606
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
607
|
+
#
|
608
|
+
# @example Basic example
|
609
|
+
# require "google/cloud/ai_platform/v1"
|
610
|
+
#
|
611
|
+
# # Create a client object. The client can be reused for multiple calls.
|
612
|
+
# client = Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::Client.new
|
613
|
+
#
|
614
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
615
|
+
# request = Google::Cloud::AIPlatform::V1::DeleteReasoningEngineRequest.new
|
616
|
+
#
|
617
|
+
# # Call the delete_reasoning_engine method.
|
618
|
+
# result = client.delete_reasoning_engine request
|
619
|
+
#
|
620
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
621
|
+
# # check the status of an operation, cancel it, or wait for results.
|
622
|
+
# # Here is how to wait for a response.
|
623
|
+
# result.wait_until_done! timeout: 60
|
624
|
+
# if result.response?
|
625
|
+
# p result.response
|
626
|
+
# else
|
627
|
+
# puts "No response received."
|
628
|
+
# end
|
629
|
+
#
|
630
|
+
def delete_reasoning_engine request, options = nil
|
631
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
632
|
+
|
633
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteReasoningEngineRequest
|
634
|
+
|
635
|
+
# Converts hash and nil to an options object
|
636
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
637
|
+
|
638
|
+
# Customize the options with defaults
|
639
|
+
call_metadata = @config.rpcs.delete_reasoning_engine.metadata.to_h
|
640
|
+
|
641
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
642
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
643
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
644
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
645
|
+
transports_version_send: [:rest]
|
646
|
+
|
647
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
648
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
649
|
+
|
650
|
+
options.apply_defaults timeout: @config.rpcs.delete_reasoning_engine.timeout,
|
651
|
+
metadata: call_metadata,
|
652
|
+
retry_policy: @config.rpcs.delete_reasoning_engine.retry_policy
|
653
|
+
|
654
|
+
options.apply_defaults timeout: @config.timeout,
|
655
|
+
metadata: @config.metadata,
|
656
|
+
retry_policy: @config.retry_policy
|
657
|
+
|
658
|
+
@reasoning_engine_service_stub.delete_reasoning_engine request, options do |result, operation|
|
659
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
660
|
+
yield result, operation if block_given?
|
661
|
+
throw :response, result
|
662
|
+
end
|
663
|
+
rescue ::Gapic::Rest::Error => e
|
664
|
+
raise ::Google::Cloud::Error.from_error(e)
|
665
|
+
end
|
666
|
+
|
667
|
+
##
|
668
|
+
# Configuration class for the ReasoningEngineService REST API.
|
669
|
+
#
|
670
|
+
# This class represents the configuration for ReasoningEngineService REST,
|
671
|
+
# providing control over timeouts, retry behavior, logging, transport
|
672
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
673
|
+
# applied individually to specific RPCs. See
|
674
|
+
# {::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::Client::Configuration::Rpcs}
|
675
|
+
# for a list of RPCs that can be configured independently.
|
676
|
+
#
|
677
|
+
# Configuration can be applied globally to all clients, or to a single client
|
678
|
+
# on construction.
|
679
|
+
#
|
680
|
+
# @example
|
681
|
+
#
|
682
|
+
# # Modify the global config, setting the timeout for
|
683
|
+
# # create_reasoning_engine to 20 seconds,
|
684
|
+
# # and all remaining timeouts to 10 seconds.
|
685
|
+
# ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::Client.configure do |config|
|
686
|
+
# config.timeout = 10.0
|
687
|
+
# config.rpcs.create_reasoning_engine.timeout = 20.0
|
688
|
+
# end
|
689
|
+
#
|
690
|
+
# # Apply the above configuration only to a new client.
|
691
|
+
# client = ::Google::Cloud::AIPlatform::V1::ReasoningEngineService::Rest::Client.new do |config|
|
692
|
+
# config.timeout = 10.0
|
693
|
+
# config.rpcs.create_reasoning_engine.timeout = 20.0
|
694
|
+
# end
|
695
|
+
#
|
696
|
+
# @!attribute [rw] endpoint
|
697
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
698
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
699
|
+
# @return [::String,nil]
|
700
|
+
# @!attribute [rw] credentials
|
701
|
+
# Credentials to send with calls. You may provide any of the following types:
|
702
|
+
# * (`String`) The path to a service account key file in JSON format
|
703
|
+
# * (`Hash`) A service account key as a Hash
|
704
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
705
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
706
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
707
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
708
|
+
# * (`nil`) indicating no credentials
|
709
|
+
# @return [::Object]
|
710
|
+
# @!attribute [rw] scope
|
711
|
+
# The OAuth scopes
|
712
|
+
# @return [::Array<::String>]
|
713
|
+
# @!attribute [rw] lib_name
|
714
|
+
# The library name as recorded in instrumentation and logging
|
715
|
+
# @return [::String]
|
716
|
+
# @!attribute [rw] lib_version
|
717
|
+
# The library version as recorded in instrumentation and logging
|
718
|
+
# @return [::String]
|
719
|
+
# @!attribute [rw] timeout
|
720
|
+
# The call timeout in seconds.
|
721
|
+
# @return [::Numeric]
|
722
|
+
# @!attribute [rw] metadata
|
723
|
+
# Additional headers to be sent with the call.
|
724
|
+
# @return [::Hash{::Symbol=>::String}]
|
725
|
+
# @!attribute [rw] retry_policy
|
726
|
+
# The retry policy. The value is a hash with the following keys:
|
727
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
728
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
729
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
730
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
731
|
+
# trigger a retry.
|
732
|
+
# @return [::Hash]
|
733
|
+
# @!attribute [rw] quota_project
|
734
|
+
# A separate project against which to charge quota.
|
735
|
+
# @return [::String]
|
736
|
+
# @!attribute [rw] universe_domain
|
737
|
+
# The universe domain within which to make requests. This determines the
|
738
|
+
# default endpoint URL. The default value of nil uses the environment
|
739
|
+
# universe (usually the default "googleapis.com" universe).
|
740
|
+
# @return [::String,nil]
|
741
|
+
# @!attribute [rw] logger
|
742
|
+
# A custom logger to use for request/response debug logging, or the value
|
743
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
744
|
+
# explicitly disable logging.
|
745
|
+
# @return [::Logger,:default,nil]
|
746
|
+
#
|
747
|
+
class Configuration
|
748
|
+
extend ::Gapic::Config
|
749
|
+
|
750
|
+
# @private
|
751
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
752
|
+
DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
|
753
|
+
|
754
|
+
config_attr :endpoint, nil, ::String, nil
|
755
|
+
config_attr :credentials, nil do |value|
|
756
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
757
|
+
allowed.any? { |klass| klass === value }
|
758
|
+
end
|
759
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
760
|
+
config_attr :lib_name, nil, ::String, nil
|
761
|
+
config_attr :lib_version, nil, ::String, nil
|
762
|
+
config_attr :timeout, nil, ::Numeric, nil
|
763
|
+
config_attr :metadata, nil, ::Hash, nil
|
764
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
765
|
+
config_attr :quota_project, nil, ::String, nil
|
766
|
+
config_attr :universe_domain, nil, ::String, nil
|
767
|
+
|
768
|
+
# @private
|
769
|
+
# Overrides for http bindings for the RPCs of this service
|
770
|
+
# are only used when this service is used as mixin, and only
|
771
|
+
# by the host service.
|
772
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
773
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
774
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
775
|
+
|
776
|
+
# @private
|
777
|
+
def initialize parent_config = nil
|
778
|
+
@parent_config = parent_config unless parent_config.nil?
|
779
|
+
|
780
|
+
yield self if block_given?
|
781
|
+
end
|
782
|
+
|
783
|
+
##
|
784
|
+
# Configurations for individual RPCs
|
785
|
+
# @return [Rpcs]
|
786
|
+
#
|
787
|
+
def rpcs
|
788
|
+
@rpcs ||= begin
|
789
|
+
parent_rpcs = nil
|
790
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
791
|
+
Rpcs.new parent_rpcs
|
792
|
+
end
|
793
|
+
end
|
794
|
+
|
795
|
+
##
|
796
|
+
# Configuration RPC class for the ReasoningEngineService API.
|
797
|
+
#
|
798
|
+
# Includes fields providing the configuration for each RPC in this service.
|
799
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
800
|
+
# the following configuration fields:
|
801
|
+
#
|
802
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
803
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
804
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
805
|
+
# include the following keys:
|
806
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
807
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
808
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
809
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
810
|
+
# trigger a retry.
|
811
|
+
#
|
812
|
+
class Rpcs
|
813
|
+
##
|
814
|
+
# RPC-specific configuration for `create_reasoning_engine`
|
815
|
+
# @return [::Gapic::Config::Method]
|
816
|
+
#
|
817
|
+
attr_reader :create_reasoning_engine
|
818
|
+
##
|
819
|
+
# RPC-specific configuration for `get_reasoning_engine`
|
820
|
+
# @return [::Gapic::Config::Method]
|
821
|
+
#
|
822
|
+
attr_reader :get_reasoning_engine
|
823
|
+
##
|
824
|
+
# RPC-specific configuration for `list_reasoning_engines`
|
825
|
+
# @return [::Gapic::Config::Method]
|
826
|
+
#
|
827
|
+
attr_reader :list_reasoning_engines
|
828
|
+
##
|
829
|
+
# RPC-specific configuration for `update_reasoning_engine`
|
830
|
+
# @return [::Gapic::Config::Method]
|
831
|
+
#
|
832
|
+
attr_reader :update_reasoning_engine
|
833
|
+
##
|
834
|
+
# RPC-specific configuration for `delete_reasoning_engine`
|
835
|
+
# @return [::Gapic::Config::Method]
|
836
|
+
#
|
837
|
+
attr_reader :delete_reasoning_engine
|
838
|
+
|
839
|
+
# @private
|
840
|
+
def initialize parent_rpcs = nil
|
841
|
+
create_reasoning_engine_config = parent_rpcs.create_reasoning_engine if parent_rpcs.respond_to? :create_reasoning_engine
|
842
|
+
@create_reasoning_engine = ::Gapic::Config::Method.new create_reasoning_engine_config
|
843
|
+
get_reasoning_engine_config = parent_rpcs.get_reasoning_engine if parent_rpcs.respond_to? :get_reasoning_engine
|
844
|
+
@get_reasoning_engine = ::Gapic::Config::Method.new get_reasoning_engine_config
|
845
|
+
list_reasoning_engines_config = parent_rpcs.list_reasoning_engines if parent_rpcs.respond_to? :list_reasoning_engines
|
846
|
+
@list_reasoning_engines = ::Gapic::Config::Method.new list_reasoning_engines_config
|
847
|
+
update_reasoning_engine_config = parent_rpcs.update_reasoning_engine if parent_rpcs.respond_to? :update_reasoning_engine
|
848
|
+
@update_reasoning_engine = ::Gapic::Config::Method.new update_reasoning_engine_config
|
849
|
+
delete_reasoning_engine_config = parent_rpcs.delete_reasoning_engine if parent_rpcs.respond_to? :delete_reasoning_engine
|
850
|
+
@delete_reasoning_engine = ::Gapic::Config::Method.new delete_reasoning_engine_config
|
851
|
+
|
852
|
+
yield self if block_given?
|
853
|
+
end
|
854
|
+
end
|
855
|
+
end
|
856
|
+
end
|
857
|
+
end
|
858
|
+
end
|
859
|
+
end
|
860
|
+
end
|
861
|
+
end
|
862
|
+
end
|