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,388 @@
|
|
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/aiplatform/v1/gen_ai_cache_service_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module AIPlatform
|
24
|
+
module V1
|
25
|
+
module GenAiCacheService
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the GenAiCacheService service.
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
|
+
#
|
32
|
+
class ServiceStub
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
35
|
+
# These require statements are intentionally placed here to initialize
|
36
|
+
# the REST modules only when it's required.
|
37
|
+
require "gapic/rest"
|
38
|
+
|
39
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
40
|
+
endpoint_template: endpoint_template,
|
41
|
+
universe_domain: universe_domain,
|
42
|
+
credentials: credentials,
|
43
|
+
numeric_enums: true,
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
47
|
+
end
|
48
|
+
|
49
|
+
##
|
50
|
+
# The effective universe domain
|
51
|
+
#
|
52
|
+
# @return [String]
|
53
|
+
#
|
54
|
+
def universe_domain
|
55
|
+
@client_stub.universe_domain
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# The effective endpoint
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
#
|
63
|
+
def endpoint
|
64
|
+
@client_stub.endpoint
|
65
|
+
end
|
66
|
+
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# Baseline implementation for the create_cached_content REST call
|
78
|
+
#
|
79
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::CreateCachedContentRequest]
|
80
|
+
# A request object representing the call parameters. Required.
|
81
|
+
# @param options [::Gapic::CallOptions]
|
82
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
83
|
+
#
|
84
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
85
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::CachedContent]
|
86
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
87
|
+
#
|
88
|
+
# @return [::Google::Cloud::AIPlatform::V1::CachedContent]
|
89
|
+
# A result object deserialized from the server's reply
|
90
|
+
def create_cached_content request_pb, options = nil
|
91
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
92
|
+
|
93
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_cached_content_request request_pb
|
94
|
+
query_string_params = if query_string_params.any?
|
95
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
96
|
+
else
|
97
|
+
{}
|
98
|
+
end
|
99
|
+
|
100
|
+
response = @client_stub.make_http_request(
|
101
|
+
verb,
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "create_cached_content",
|
106
|
+
options: options
|
107
|
+
)
|
108
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
109
|
+
result = ::Google::Cloud::AIPlatform::V1::CachedContent.decode_json response.body, ignore_unknown_fields: true
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
##
|
117
|
+
# Baseline implementation for the get_cached_content REST call
|
118
|
+
#
|
119
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::GetCachedContentRequest]
|
120
|
+
# A request object representing the call parameters. Required.
|
121
|
+
# @param options [::Gapic::CallOptions]
|
122
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
123
|
+
#
|
124
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
125
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::CachedContent]
|
126
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
127
|
+
#
|
128
|
+
# @return [::Google::Cloud::AIPlatform::V1::CachedContent]
|
129
|
+
# A result object deserialized from the server's reply
|
130
|
+
def get_cached_content request_pb, options = nil
|
131
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
132
|
+
|
133
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_cached_content_request request_pb
|
134
|
+
query_string_params = if query_string_params.any?
|
135
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
136
|
+
else
|
137
|
+
{}
|
138
|
+
end
|
139
|
+
|
140
|
+
response = @client_stub.make_http_request(
|
141
|
+
verb,
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "get_cached_content",
|
146
|
+
options: options
|
147
|
+
)
|
148
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
149
|
+
result = ::Google::Cloud::AIPlatform::V1::CachedContent.decode_json response.body, ignore_unknown_fields: true
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
##
|
157
|
+
# Baseline implementation for the update_cached_content REST call
|
158
|
+
#
|
159
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::UpdateCachedContentRequest]
|
160
|
+
# A request object representing the call parameters. Required.
|
161
|
+
# @param options [::Gapic::CallOptions]
|
162
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
163
|
+
#
|
164
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
165
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::CachedContent]
|
166
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
167
|
+
#
|
168
|
+
# @return [::Google::Cloud::AIPlatform::V1::CachedContent]
|
169
|
+
# A result object deserialized from the server's reply
|
170
|
+
def update_cached_content request_pb, options = nil
|
171
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
172
|
+
|
173
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_cached_content_request request_pb
|
174
|
+
query_string_params = if query_string_params.any?
|
175
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
176
|
+
else
|
177
|
+
{}
|
178
|
+
end
|
179
|
+
|
180
|
+
response = @client_stub.make_http_request(
|
181
|
+
verb,
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "update_cached_content",
|
186
|
+
options: options
|
187
|
+
)
|
188
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
189
|
+
result = ::Google::Cloud::AIPlatform::V1::CachedContent.decode_json response.body, ignore_unknown_fields: true
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# Baseline implementation for the delete_cached_content REST call
|
198
|
+
#
|
199
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::DeleteCachedContentRequest]
|
200
|
+
# A request object representing the call parameters. Required.
|
201
|
+
# @param options [::Gapic::CallOptions]
|
202
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
203
|
+
#
|
204
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
205
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
206
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
207
|
+
#
|
208
|
+
# @return [::Google::Protobuf::Empty]
|
209
|
+
# A result object deserialized from the server's reply
|
210
|
+
def delete_cached_content request_pb, options = nil
|
211
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
212
|
+
|
213
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_cached_content_request request_pb
|
214
|
+
query_string_params = if query_string_params.any?
|
215
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
216
|
+
else
|
217
|
+
{}
|
218
|
+
end
|
219
|
+
|
220
|
+
response = @client_stub.make_http_request(
|
221
|
+
verb,
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "delete_cached_content",
|
226
|
+
options: options
|
227
|
+
)
|
228
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
229
|
+
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
##
|
237
|
+
# Baseline implementation for the list_cached_contents REST call
|
238
|
+
#
|
239
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::ListCachedContentsRequest]
|
240
|
+
# A request object representing the call parameters. Required.
|
241
|
+
# @param options [::Gapic::CallOptions]
|
242
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
243
|
+
#
|
244
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
245
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::ListCachedContentsResponse]
|
246
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
247
|
+
#
|
248
|
+
# @return [::Google::Cloud::AIPlatform::V1::ListCachedContentsResponse]
|
249
|
+
# A result object deserialized from the server's reply
|
250
|
+
def list_cached_contents request_pb, options = nil
|
251
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
252
|
+
|
253
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_cached_contents_request request_pb
|
254
|
+
query_string_params = if query_string_params.any?
|
255
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
256
|
+
else
|
257
|
+
{}
|
258
|
+
end
|
259
|
+
|
260
|
+
response = @client_stub.make_http_request(
|
261
|
+
verb,
|
262
|
+
uri: uri,
|
263
|
+
body: body || "",
|
264
|
+
params: query_string_params,
|
265
|
+
method_name: "list_cached_contents",
|
266
|
+
options: options
|
267
|
+
)
|
268
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
269
|
+
result = ::Google::Cloud::AIPlatform::V1::ListCachedContentsResponse.decode_json response.body, ignore_unknown_fields: true
|
270
|
+
catch :response do
|
271
|
+
yield result, operation if block_given?
|
272
|
+
result
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
276
|
+
##
|
277
|
+
# @private
|
278
|
+
#
|
279
|
+
# GRPC transcoding helper method for the create_cached_content REST call
|
280
|
+
#
|
281
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::CreateCachedContentRequest]
|
282
|
+
# A request object representing the call parameters. Required.
|
283
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
284
|
+
# Uri, Body, Query string parameters
|
285
|
+
def self.transcode_create_cached_content_request request_pb
|
286
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
287
|
+
.with_bindings(
|
288
|
+
uri_method: :post,
|
289
|
+
uri_template: "/v1/{parent}/cachedContents",
|
290
|
+
body: "cached_content",
|
291
|
+
matches: [
|
292
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
293
|
+
]
|
294
|
+
)
|
295
|
+
transcoder.transcode request_pb
|
296
|
+
end
|
297
|
+
|
298
|
+
##
|
299
|
+
# @private
|
300
|
+
#
|
301
|
+
# GRPC transcoding helper method for the get_cached_content REST call
|
302
|
+
#
|
303
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::GetCachedContentRequest]
|
304
|
+
# A request object representing the call parameters. Required.
|
305
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
306
|
+
# Uri, Body, Query string parameters
|
307
|
+
def self.transcode_get_cached_content_request request_pb
|
308
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
309
|
+
.with_bindings(
|
310
|
+
uri_method: :get,
|
311
|
+
uri_template: "/v1/{name}",
|
312
|
+
matches: [
|
313
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/cachedContents/[^/]+/?$}, false]
|
314
|
+
]
|
315
|
+
)
|
316
|
+
transcoder.transcode request_pb
|
317
|
+
end
|
318
|
+
|
319
|
+
##
|
320
|
+
# @private
|
321
|
+
#
|
322
|
+
# GRPC transcoding helper method for the update_cached_content REST call
|
323
|
+
#
|
324
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::UpdateCachedContentRequest]
|
325
|
+
# A request object representing the call parameters. Required.
|
326
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
327
|
+
# Uri, Body, Query string parameters
|
328
|
+
def self.transcode_update_cached_content_request request_pb
|
329
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
330
|
+
.with_bindings(
|
331
|
+
uri_method: :patch,
|
332
|
+
uri_template: "/v1/{cached_content.name}",
|
333
|
+
body: "cached_content",
|
334
|
+
matches: [
|
335
|
+
["cached_content.name", %r{^projects/[^/]+/locations/[^/]+/cachedContents/[^/]+/?$}, false]
|
336
|
+
]
|
337
|
+
)
|
338
|
+
transcoder.transcode request_pb
|
339
|
+
end
|
340
|
+
|
341
|
+
##
|
342
|
+
# @private
|
343
|
+
#
|
344
|
+
# GRPC transcoding helper method for the delete_cached_content REST call
|
345
|
+
#
|
346
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::DeleteCachedContentRequest]
|
347
|
+
# A request object representing the call parameters. Required.
|
348
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
349
|
+
# Uri, Body, Query string parameters
|
350
|
+
def self.transcode_delete_cached_content_request request_pb
|
351
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
352
|
+
.with_bindings(
|
353
|
+
uri_method: :delete,
|
354
|
+
uri_template: "/v1/{name}",
|
355
|
+
matches: [
|
356
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/cachedContents/[^/]+/?$}, false]
|
357
|
+
]
|
358
|
+
)
|
359
|
+
transcoder.transcode request_pb
|
360
|
+
end
|
361
|
+
|
362
|
+
##
|
363
|
+
# @private
|
364
|
+
#
|
365
|
+
# GRPC transcoding helper method for the list_cached_contents REST call
|
366
|
+
#
|
367
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::ListCachedContentsRequest]
|
368
|
+
# A request object representing the call parameters. Required.
|
369
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
370
|
+
# Uri, Body, Query string parameters
|
371
|
+
def self.transcode_list_cached_contents_request request_pb
|
372
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
373
|
+
.with_bindings(
|
374
|
+
uri_method: :get,
|
375
|
+
uri_template: "/v1/{parent}/cachedContents",
|
376
|
+
matches: [
|
377
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
378
|
+
]
|
379
|
+
)
|
380
|
+
transcoder.transcode request_pb
|
381
|
+
end
|
382
|
+
end
|
383
|
+
end
|
384
|
+
end
|
385
|
+
end
|
386
|
+
end
|
387
|
+
end
|
388
|
+
end
|
@@ -0,0 +1,53 @@
|
|
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 "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/ai_platform/v1/version"
|
24
|
+
require "google/cloud/ai_platform/v1/bindings_override"
|
25
|
+
|
26
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/credentials"
|
27
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/paths"
|
28
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/rest/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module AIPlatform
|
33
|
+
module V1
|
34
|
+
##
|
35
|
+
# Service for managing Vertex AI's CachedContent resource.
|
36
|
+
#
|
37
|
+
# To load this service and instantiate a REST client:
|
38
|
+
#
|
39
|
+
# require "google/cloud/ai_platform/v1/gen_ai_cache_service/rest"
|
40
|
+
# client = ::Google::Cloud::AIPlatform::V1::GenAiCacheService::Rest::Client.new
|
41
|
+
#
|
42
|
+
module GenAiCacheService
|
43
|
+
# Client for the REST transport
|
44
|
+
module Rest
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
53
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/rest/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,55 @@
|
|
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 "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/ai_platform/v1/version"
|
24
|
+
|
25
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/credentials"
|
26
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/paths"
|
27
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/client"
|
28
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/rest"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module AIPlatform
|
33
|
+
module V1
|
34
|
+
##
|
35
|
+
# Service for managing Vertex AI's CachedContent resource.
|
36
|
+
#
|
37
|
+
# @example Load this service and instantiate a gRPC client
|
38
|
+
#
|
39
|
+
# require "google/cloud/ai_platform/v1/gen_ai_cache_service"
|
40
|
+
# client = ::Google::Cloud::AIPlatform::V1::GenAiCacheService::Client.new
|
41
|
+
#
|
42
|
+
# @example Load this service and instantiate a REST client
|
43
|
+
#
|
44
|
+
# require "google/cloud/ai_platform/v1/gen_ai_cache_service/rest"
|
45
|
+
# client = ::Google::Cloud::AIPlatform::V1::GenAiCacheService::Rest::Client.new
|
46
|
+
#
|
47
|
+
module GenAiCacheService
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
helper_path = ::File.join __dir__, "gen_ai_cache_service", "helpers.rb"
|
55
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/helpers" if ::File.file? helper_path
|
@@ -166,14 +166,26 @@ module Google
|
|
166
166
|
universe_domain: @config.universe_domain,
|
167
167
|
channel_args: @config.channel_args,
|
168
168
|
interceptors: @config.interceptors,
|
169
|
-
channel_pool_config: @config.channel_pool
|
169
|
+
channel_pool_config: @config.channel_pool,
|
170
|
+
logger: @config.logger
|
170
171
|
)
|
171
172
|
|
173
|
+
@gen_ai_tuning_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
|
+
|
172
183
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
173
184
|
config.credentials = credentials
|
174
185
|
config.quota_project = @quota_project_id
|
175
186
|
config.endpoint = @gen_ai_tuning_service_stub.endpoint
|
176
187
|
config.universe_domain = @gen_ai_tuning_service_stub.universe_domain
|
188
|
+
config.logger = @gen_ai_tuning_service_stub.logger if config.respond_to? :logger=
|
177
189
|
end
|
178
190
|
|
179
191
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -181,6 +193,7 @@ module Google
|
|
181
193
|
config.quota_project = @quota_project_id
|
182
194
|
config.endpoint = @gen_ai_tuning_service_stub.endpoint
|
183
195
|
config.universe_domain = @gen_ai_tuning_service_stub.universe_domain
|
196
|
+
config.logger = @gen_ai_tuning_service_stub.logger if config.respond_to? :logger=
|
184
197
|
end
|
185
198
|
end
|
186
199
|
|
@@ -205,6 +218,15 @@ module Google
|
|
205
218
|
#
|
206
219
|
attr_reader :iam_policy_client
|
207
220
|
|
221
|
+
##
|
222
|
+
# The logger used for request/response debug logging.
|
223
|
+
#
|
224
|
+
# @return [Logger]
|
225
|
+
#
|
226
|
+
def logger
|
227
|
+
@gen_ai_tuning_service_stub.logger
|
228
|
+
end
|
229
|
+
|
208
230
|
# Service calls
|
209
231
|
|
210
232
|
##
|
@@ -291,7 +313,6 @@ module Google
|
|
291
313
|
|
292
314
|
@gen_ai_tuning_service_stub.call_rpc :create_tuning_job, request, options: options do |response, operation|
|
293
315
|
yield response, operation if block_given?
|
294
|
-
return response
|
295
316
|
end
|
296
317
|
rescue ::GRPC::BadStatus => e
|
297
318
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -378,7 +399,6 @@ module Google
|
|
378
399
|
|
379
400
|
@gen_ai_tuning_service_stub.call_rpc :get_tuning_job, request, options: options do |response, operation|
|
380
401
|
yield response, operation if block_given?
|
381
|
-
return response
|
382
402
|
end
|
383
403
|
rescue ::GRPC::BadStatus => e
|
384
404
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -479,7 +499,7 @@ module Google
|
|
479
499
|
@gen_ai_tuning_service_stub.call_rpc :list_tuning_jobs, request, options: options do |response, operation|
|
480
500
|
response = ::Gapic::PagedEnumerable.new @gen_ai_tuning_service_stub, :list_tuning_jobs, request, response, operation, options
|
481
501
|
yield response, operation if block_given?
|
482
|
-
|
502
|
+
throw :response, response
|
483
503
|
end
|
484
504
|
rescue ::GRPC::BadStatus => e
|
485
505
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -577,7 +597,6 @@ module Google
|
|
577
597
|
|
578
598
|
@gen_ai_tuning_service_stub.call_rpc :cancel_tuning_job, request, options: options do |response, operation|
|
579
599
|
yield response, operation if block_given?
|
580
|
-
return response
|
581
600
|
end
|
582
601
|
rescue ::GRPC::BadStatus => e
|
583
602
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -683,7 +702,7 @@ module Google
|
|
683
702
|
@gen_ai_tuning_service_stub.call_rpc :rebase_tuned_model, request, options: options do |response, operation|
|
684
703
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
685
704
|
yield response, operation if block_given?
|
686
|
-
|
705
|
+
throw :response, response
|
687
706
|
end
|
688
707
|
rescue ::GRPC::BadStatus => e
|
689
708
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -772,6 +791,11 @@ module Google
|
|
772
791
|
# default endpoint URL. The default value of nil uses the environment
|
773
792
|
# universe (usually the default "googleapis.com" universe).
|
774
793
|
# @return [::String,nil]
|
794
|
+
# @!attribute [rw] logger
|
795
|
+
# A custom logger to use for request/response debug logging, or the value
|
796
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
797
|
+
# explicitly disable logging.
|
798
|
+
# @return [::Logger,:default,nil]
|
775
799
|
#
|
776
800
|
class Configuration
|
777
801
|
extend ::Gapic::Config
|
@@ -796,6 +820,7 @@ module Google
|
|
796
820
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
797
821
|
config_attr :quota_project, nil, ::String, nil
|
798
822
|
config_attr :universe_domain, nil, ::String, nil
|
823
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
799
824
|
|
800
825
|
# @private
|
801
826
|
def initialize parent_config = nil
|
@@ -213,7 +213,7 @@ module Google
|
|
213
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
214
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
215
215
|
yield response, operation if block_given?
|
216
|
-
|
216
|
+
throw :response, response
|
217
217
|
end
|
218
218
|
rescue ::GRPC::BadStatus => e
|
219
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -309,7 +309,7 @@ module Google
|
|
309
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
310
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
311
311
|
yield response, operation if block_given?
|
312
|
-
|
312
|
+
throw :response, response
|
313
313
|
end
|
314
314
|
rescue ::GRPC::BadStatus => e
|
315
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -398,7 +398,6 @@ module Google
|
|
398
398
|
|
399
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
400
400
|
yield response, operation if block_given?
|
401
|
-
return response
|
402
401
|
end
|
403
402
|
rescue ::GRPC::BadStatus => e
|
404
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -494,7 +493,6 @@ module Google
|
|
494
493
|
|
495
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
496
495
|
yield response, operation if block_given?
|
497
|
-
return response
|
498
496
|
end
|
499
497
|
rescue ::GRPC::BadStatus => e
|
500
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -600,7 +598,7 @@ module Google
|
|
600
598
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
601
599
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
602
600
|
yield response, operation if block_given?
|
603
|
-
|
601
|
+
throw :response, response
|
604
602
|
end
|
605
603
|
rescue ::GRPC::BadStatus => e
|
606
604
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -689,6 +687,11 @@ module Google
|
|
689
687
|
# default endpoint URL. The default value of nil uses the environment
|
690
688
|
# universe (usually the default "googleapis.com" universe).
|
691
689
|
# @return [::String,nil]
|
690
|
+
# @!attribute [rw] logger
|
691
|
+
# A custom logger to use for request/response debug logging, or the value
|
692
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
693
|
+
# explicitly disable logging.
|
694
|
+
# @return [::Logger,:default,nil]
|
692
695
|
#
|
693
696
|
class Configuration
|
694
697
|
extend ::Gapic::Config
|
@@ -713,6 +716,7 @@ module Google
|
|
713
716
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
714
717
|
config_attr :quota_project, nil, ::String, nil
|
715
718
|
config_attr :universe_domain, nil, ::String, nil
|
719
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
716
720
|
|
717
721
|
# @private
|
718
722
|
def initialize parent_config = nil
|