google-cloud-ai_platform-v1 0.60.0 → 0.61.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 +49 -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 +49 -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 +49 -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 +49 -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 +49 -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 +49 -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_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 +49 -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 +49 -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 +49 -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 +49 -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 +49 -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 +49 -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 +49 -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 +49 -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 +49 -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 +49 -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 +29 -14
- data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +29 -7
- data/lib/google/cloud/ai_platform/v1/prediction_service/rest/service_stub.rb +65 -38
- 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 +49 -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 +49 -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 +49 -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 +49 -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 +49 -35
- data/lib/google/cloud/ai_platform/v1/vizier_service/rest/service_stub.rb +134 -92
- data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +1 -1
- data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +3 -0
- metadata +4 -4
@@ -159,15 +159,27 @@ module Google
|
|
159
159
|
endpoint: @config.endpoint,
|
160
160
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
161
161
|
universe_domain: @config.universe_domain,
|
162
|
-
credentials: credentials
|
162
|
+
credentials: credentials,
|
163
|
+
logger: @config.logger
|
163
164
|
)
|
164
165
|
|
166
|
+
@persistent_resource_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
|
+
|
165
176
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
166
177
|
config.credentials = credentials
|
167
178
|
config.quota_project = @quota_project_id
|
168
179
|
config.endpoint = @persistent_resource_service_stub.endpoint
|
169
180
|
config.universe_domain = @persistent_resource_service_stub.universe_domain
|
170
181
|
config.bindings_override = @config.bindings_override
|
182
|
+
config.logger = @persistent_resource_service_stub.logger if config.respond_to? :logger=
|
171
183
|
end
|
172
184
|
|
173
185
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
@@ -176,6 +188,7 @@ module Google
|
|
176
188
|
config.endpoint = @persistent_resource_service_stub.endpoint
|
177
189
|
config.universe_domain = @persistent_resource_service_stub.universe_domain
|
178
190
|
config.bindings_override = @config.bindings_override
|
191
|
+
config.logger = @persistent_resource_service_stub.logger if config.respond_to? :logger=
|
179
192
|
end
|
180
193
|
end
|
181
194
|
|
@@ -200,6 +213,15 @@ module Google
|
|
200
213
|
#
|
201
214
|
attr_reader :iam_policy_client
|
202
215
|
|
216
|
+
##
|
217
|
+
# The logger used for request/response debug logging.
|
218
|
+
#
|
219
|
+
# @return [Logger]
|
220
|
+
#
|
221
|
+
def logger
|
222
|
+
@persistent_resource_service_stub.logger
|
223
|
+
end
|
224
|
+
|
203
225
|
# Service calls
|
204
226
|
|
205
227
|
##
|
@@ -292,7 +314,7 @@ module Google
|
|
292
314
|
@persistent_resource_service_stub.create_persistent_resource request, options do |result, operation|
|
293
315
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
294
316
|
yield result, operation if block_given?
|
295
|
-
|
317
|
+
throw :response, result
|
296
318
|
end
|
297
319
|
rescue ::Gapic::Rest::Error => e
|
298
320
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -373,7 +395,6 @@ module Google
|
|
373
395
|
|
374
396
|
@persistent_resource_service_stub.get_persistent_resource request, options do |result, operation|
|
375
397
|
yield result, operation if block_given?
|
376
|
-
return result
|
377
398
|
end
|
378
399
|
rescue ::Gapic::Rest::Error => e
|
379
400
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -465,7 +486,7 @@ module Google
|
|
465
486
|
@persistent_resource_service_stub.list_persistent_resources request, options do |result, operation|
|
466
487
|
result = ::Gapic::Rest::PagedEnumerable.new @persistent_resource_service_stub, :list_persistent_resources, "persistent_resources", request, result, options
|
467
488
|
yield result, operation if block_given?
|
468
|
-
|
489
|
+
throw :response, result
|
469
490
|
end
|
470
491
|
rescue ::Gapic::Rest::Error => e
|
471
492
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -554,7 +575,7 @@ module Google
|
|
554
575
|
@persistent_resource_service_stub.delete_persistent_resource request, options do |result, operation|
|
555
576
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
556
577
|
yield result, operation if block_given?
|
557
|
-
|
578
|
+
throw :response, result
|
558
579
|
end
|
559
580
|
rescue ::Gapic::Rest::Error => e
|
560
581
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -648,7 +669,7 @@ module Google
|
|
648
669
|
@persistent_resource_service_stub.update_persistent_resource request, options do |result, operation|
|
649
670
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
650
671
|
yield result, operation if block_given?
|
651
|
-
|
672
|
+
throw :response, result
|
652
673
|
end
|
653
674
|
rescue ::Gapic::Rest::Error => e
|
654
675
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -737,7 +758,7 @@ module Google
|
|
737
758
|
@persistent_resource_service_stub.reboot_persistent_resource request, options do |result, operation|
|
738
759
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
739
760
|
yield result, operation if block_given?
|
740
|
-
|
761
|
+
throw :response, result
|
741
762
|
end
|
742
763
|
rescue ::Gapic::Rest::Error => e
|
743
764
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -817,6 +838,11 @@ module Google
|
|
817
838
|
# default endpoint URL. The default value of nil uses the environment
|
818
839
|
# universe (usually the default "googleapis.com" universe).
|
819
840
|
# @return [::String,nil]
|
841
|
+
# @!attribute [rw] logger
|
842
|
+
# A custom logger to use for request/response debug logging, or the value
|
843
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
844
|
+
# explicitly disable logging.
|
845
|
+
# @return [::Logger,:default,nil]
|
820
846
|
#
|
821
847
|
class Configuration
|
822
848
|
extend ::Gapic::Config
|
@@ -845,6 +871,7 @@ module Google
|
|
845
871
|
# by the host service.
|
846
872
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
847
873
|
config_attr :bindings_override, {}, ::Hash, nil
|
874
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
848
875
|
|
849
876
|
# @private
|
850
877
|
def initialize parent_config = nil
|
@@ -196,7 +196,7 @@ module Google
|
|
196
196
|
@operations_stub.list_operations request, options do |result, operation|
|
197
197
|
result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
|
198
198
|
yield result, operation if block_given?
|
199
|
-
|
199
|
+
throw :response, result
|
200
200
|
end
|
201
201
|
rescue ::Gapic::Rest::Error => e
|
202
202
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -285,7 +285,7 @@ module Google
|
|
285
285
|
@operations_stub.get_operation request, options do |result, operation|
|
286
286
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
287
287
|
yield result, operation if block_given?
|
288
|
-
|
288
|
+
throw :response, result
|
289
289
|
end
|
290
290
|
rescue ::Gapic::Rest::Error => e
|
291
291
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -367,7 +367,6 @@ module Google
|
|
367
367
|
|
368
368
|
@operations_stub.delete_operation request, options do |result, operation|
|
369
369
|
yield result, operation if block_given?
|
370
|
-
return result
|
371
370
|
end
|
372
371
|
rescue ::Gapic::Rest::Error => e
|
373
372
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -456,7 +455,6 @@ module Google
|
|
456
455
|
|
457
456
|
@operations_stub.cancel_operation request, options do |result, operation|
|
458
457
|
yield result, operation if block_given?
|
459
|
-
return result
|
460
458
|
end
|
461
459
|
rescue ::Gapic::Rest::Error => e
|
462
460
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -555,7 +553,7 @@ module Google
|
|
555
553
|
@operations_stub.wait_operation request, options do |result, operation|
|
556
554
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
557
555
|
yield result, operation if block_given?
|
558
|
-
|
556
|
+
throw :response, result
|
559
557
|
end
|
560
558
|
rescue ::Gapic::Rest::Error => e
|
561
559
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -635,6 +633,11 @@ module Google
|
|
635
633
|
# default endpoint URL. The default value of nil uses the environment
|
636
634
|
# universe (usually the default "googleapis.com" universe).
|
637
635
|
# @return [::String,nil]
|
636
|
+
# @!attribute [rw] logger
|
637
|
+
# A custom logger to use for request/response debug logging, or the value
|
638
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
639
|
+
# explicitly disable logging.
|
640
|
+
# @return [::Logger,:default,nil]
|
638
641
|
#
|
639
642
|
class Configuration
|
640
643
|
extend ::Gapic::Config
|
@@ -656,6 +659,7 @@ module Google
|
|
656
659
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
657
660
|
config_attr :quota_project, nil, ::String, nil
|
658
661
|
config_attr :universe_domain, nil, ::String, nil
|
662
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
659
663
|
|
660
664
|
# @private
|
661
665
|
def initialize parent_config = nil
|
@@ -782,16 +786,18 @@ module Google
|
|
782
786
|
|
783
787
|
response = @client_stub.make_http_request(
|
784
788
|
verb,
|
785
|
-
uri:
|
786
|
-
body:
|
787
|
-
params:
|
789
|
+
uri: uri,
|
790
|
+
body: body || "",
|
791
|
+
params: query_string_params,
|
792
|
+
method_name: "list_operations",
|
788
793
|
options: options
|
789
794
|
)
|
790
795
|
operation = ::Gapic::Rest::TransportOperation.new response
|
791
796
|
result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
792
|
-
|
793
|
-
|
794
|
-
|
797
|
+
catch :response do
|
798
|
+
yield result, operation if block_given?
|
799
|
+
result
|
800
|
+
end
|
795
801
|
end
|
796
802
|
|
797
803
|
##
|
@@ -820,16 +826,18 @@ module Google
|
|
820
826
|
|
821
827
|
response = @client_stub.make_http_request(
|
822
828
|
verb,
|
823
|
-
uri:
|
824
|
-
body:
|
825
|
-
params:
|
829
|
+
uri: uri,
|
830
|
+
body: body || "",
|
831
|
+
params: query_string_params,
|
832
|
+
method_name: "get_operation",
|
826
833
|
options: options
|
827
834
|
)
|
828
835
|
operation = ::Gapic::Rest::TransportOperation.new response
|
829
836
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
830
|
-
|
831
|
-
|
832
|
-
|
837
|
+
catch :response do
|
838
|
+
yield result, operation if block_given?
|
839
|
+
result
|
840
|
+
end
|
833
841
|
end
|
834
842
|
|
835
843
|
##
|
@@ -858,16 +866,18 @@ module Google
|
|
858
866
|
|
859
867
|
response = @client_stub.make_http_request(
|
860
868
|
verb,
|
861
|
-
uri:
|
862
|
-
body:
|
863
|
-
params:
|
869
|
+
uri: uri,
|
870
|
+
body: body || "",
|
871
|
+
params: query_string_params,
|
872
|
+
method_name: "delete_operation",
|
864
873
|
options: options
|
865
874
|
)
|
866
875
|
operation = ::Gapic::Rest::TransportOperation.new response
|
867
876
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
868
|
-
|
869
|
-
|
870
|
-
|
877
|
+
catch :response do
|
878
|
+
yield result, operation if block_given?
|
879
|
+
result
|
880
|
+
end
|
871
881
|
end
|
872
882
|
|
873
883
|
##
|
@@ -896,16 +906,18 @@ module Google
|
|
896
906
|
|
897
907
|
response = @client_stub.make_http_request(
|
898
908
|
verb,
|
899
|
-
uri:
|
900
|
-
body:
|
901
|
-
params:
|
909
|
+
uri: uri,
|
910
|
+
body: body || "",
|
911
|
+
params: query_string_params,
|
912
|
+
method_name: "cancel_operation",
|
902
913
|
options: options
|
903
914
|
)
|
904
915
|
operation = ::Gapic::Rest::TransportOperation.new response
|
905
916
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
906
|
-
|
907
|
-
|
908
|
-
|
917
|
+
catch :response do
|
918
|
+
yield result, operation if block_given?
|
919
|
+
result
|
920
|
+
end
|
909
921
|
end
|
910
922
|
|
911
923
|
##
|
@@ -934,16 +946,18 @@ module Google
|
|
934
946
|
|
935
947
|
response = @client_stub.make_http_request(
|
936
948
|
verb,
|
937
|
-
uri:
|
938
|
-
body:
|
939
|
-
params:
|
949
|
+
uri: uri,
|
950
|
+
body: body || "",
|
951
|
+
params: query_string_params,
|
952
|
+
method_name: "wait_operation",
|
940
953
|
options: options
|
941
954
|
)
|
942
955
|
operation = ::Gapic::Rest::TransportOperation.new response
|
943
956
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
944
|
-
|
945
|
-
|
946
|
-
|
957
|
+
catch :response do
|
958
|
+
yield result, operation if block_given?
|
959
|
+
result
|
960
|
+
end
|
947
961
|
end
|
948
962
|
|
949
963
|
##
|
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: true,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
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
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the create_persistent_resource REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "create_persistent_resource",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -125,16 +139,18 @@ module Google
|
|
125
139
|
|
126
140
|
response = @client_stub.make_http_request(
|
127
141
|
verb,
|
128
|
-
uri:
|
129
|
-
body:
|
130
|
-
params:
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "get_persistent_resource",
|
131
146
|
options: options
|
132
147
|
)
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
134
149
|
result = ::Google::Cloud::AIPlatform::V1::PersistentResource.decode_json response.body, ignore_unknown_fields: true
|
135
|
-
|
136
|
-
|
137
|
-
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
138
154
|
end
|
139
155
|
|
140
156
|
##
|
@@ -163,16 +179,18 @@ module Google
|
|
163
179
|
|
164
180
|
response = @client_stub.make_http_request(
|
165
181
|
verb,
|
166
|
-
uri:
|
167
|
-
body:
|
168
|
-
params:
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "list_persistent_resources",
|
169
186
|
options: options
|
170
187
|
)
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
172
189
|
result = ::Google::Cloud::AIPlatform::V1::ListPersistentResourcesResponse.decode_json response.body, ignore_unknown_fields: true
|
173
|
-
|
174
|
-
|
175
|
-
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
176
194
|
end
|
177
195
|
|
178
196
|
##
|
@@ -201,16 +219,18 @@ module Google
|
|
201
219
|
|
202
220
|
response = @client_stub.make_http_request(
|
203
221
|
verb,
|
204
|
-
uri:
|
205
|
-
body:
|
206
|
-
params:
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "delete_persistent_resource",
|
207
226
|
options: options
|
208
227
|
)
|
209
228
|
operation = ::Gapic::Rest::TransportOperation.new response
|
210
229
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
211
|
-
|
212
|
-
|
213
|
-
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
214
234
|
end
|
215
235
|
|
216
236
|
##
|
@@ -239,16 +259,18 @@ module Google
|
|
239
259
|
|
240
260
|
response = @client_stub.make_http_request(
|
241
261
|
verb,
|
242
|
-
uri:
|
243
|
-
body:
|
244
|
-
params:
|
262
|
+
uri: uri,
|
263
|
+
body: body || "",
|
264
|
+
params: query_string_params,
|
265
|
+
method_name: "update_persistent_resource",
|
245
266
|
options: options
|
246
267
|
)
|
247
268
|
operation = ::Gapic::Rest::TransportOperation.new response
|
248
269
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
249
|
-
|
250
|
-
|
251
|
-
|
270
|
+
catch :response do
|
271
|
+
yield result, operation if block_given?
|
272
|
+
result
|
273
|
+
end
|
252
274
|
end
|
253
275
|
|
254
276
|
##
|
@@ -277,16 +299,18 @@ module Google
|
|
277
299
|
|
278
300
|
response = @client_stub.make_http_request(
|
279
301
|
verb,
|
280
|
-
uri:
|
281
|
-
body:
|
282
|
-
params:
|
302
|
+
uri: uri,
|
303
|
+
body: body || "",
|
304
|
+
params: query_string_params,
|
305
|
+
method_name: "reboot_persistent_resource",
|
283
306
|
options: options
|
284
307
|
)
|
285
308
|
operation = ::Gapic::Rest::TransportOperation.new response
|
286
309
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
287
|
-
|
288
|
-
|
289
|
-
|
310
|
+
catch :response do
|
311
|
+
yield result, operation if block_given?
|
312
|
+
result
|
313
|
+
end
|
290
314
|
end
|
291
315
|
|
292
316
|
##
|
@@ -168,14 +168,26 @@ module Google
|
|
168
168
|
universe_domain: @config.universe_domain,
|
169
169
|
channel_args: @config.channel_args,
|
170
170
|
interceptors: @config.interceptors,
|
171
|
-
channel_pool_config: @config.channel_pool
|
171
|
+
channel_pool_config: @config.channel_pool,
|
172
|
+
logger: @config.logger
|
172
173
|
)
|
173
174
|
|
175
|
+
@pipeline_service_stub.stub_logger&.info do |entry|
|
176
|
+
entry.set_system_name
|
177
|
+
entry.set_service
|
178
|
+
entry.message = "Created client for #{entry.service}"
|
179
|
+
entry.set_credentials_fields credentials
|
180
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
181
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
182
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
183
|
+
end
|
184
|
+
|
174
185
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
175
186
|
config.credentials = credentials
|
176
187
|
config.quota_project = @quota_project_id
|
177
188
|
config.endpoint = @pipeline_service_stub.endpoint
|
178
189
|
config.universe_domain = @pipeline_service_stub.universe_domain
|
190
|
+
config.logger = @pipeline_service_stub.logger if config.respond_to? :logger=
|
179
191
|
end
|
180
192
|
|
181
193
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -183,6 +195,7 @@ module Google
|
|
183
195
|
config.quota_project = @quota_project_id
|
184
196
|
config.endpoint = @pipeline_service_stub.endpoint
|
185
197
|
config.universe_domain = @pipeline_service_stub.universe_domain
|
198
|
+
config.logger = @pipeline_service_stub.logger if config.respond_to? :logger=
|
186
199
|
end
|
187
200
|
end
|
188
201
|
|
@@ -207,6 +220,15 @@ module Google
|
|
207
220
|
#
|
208
221
|
attr_reader :iam_policy_client
|
209
222
|
|
223
|
+
##
|
224
|
+
# The logger used for request/response debug logging.
|
225
|
+
#
|
226
|
+
# @return [Logger]
|
227
|
+
#
|
228
|
+
def logger
|
229
|
+
@pipeline_service_stub.logger
|
230
|
+
end
|
231
|
+
|
210
232
|
# Service calls
|
211
233
|
|
212
234
|
##
|
@@ -293,7 +315,6 @@ module Google
|
|
293
315
|
|
294
316
|
@pipeline_service_stub.call_rpc :create_training_pipeline, request, options: options do |response, operation|
|
295
317
|
yield response, operation if block_given?
|
296
|
-
return response
|
297
318
|
end
|
298
319
|
rescue ::GRPC::BadStatus => e
|
299
320
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -381,7 +402,6 @@ module Google
|
|
381
402
|
|
382
403
|
@pipeline_service_stub.call_rpc :get_training_pipeline, request, options: options do |response, operation|
|
383
404
|
yield response, operation if block_given?
|
384
|
-
return response
|
385
405
|
end
|
386
406
|
rescue ::GRPC::BadStatus => e
|
387
407
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -505,7 +525,7 @@ module Google
|
|
505
525
|
@pipeline_service_stub.call_rpc :list_training_pipelines, request, options: options do |response, operation|
|
506
526
|
response = ::Gapic::PagedEnumerable.new @pipeline_service_stub, :list_training_pipelines, request, response, operation, options
|
507
527
|
yield response, operation if block_given?
|
508
|
-
|
528
|
+
throw :response, response
|
509
529
|
end
|
510
530
|
rescue ::GRPC::BadStatus => e
|
511
531
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -601,7 +621,7 @@ module Google
|
|
601
621
|
@pipeline_service_stub.call_rpc :delete_training_pipeline, request, options: options do |response, operation|
|
602
622
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
603
623
|
yield response, operation if block_given?
|
604
|
-
|
624
|
+
throw :response, response
|
605
625
|
end
|
606
626
|
rescue ::GRPC::BadStatus => e
|
607
627
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -702,7 +722,6 @@ module Google
|
|
702
722
|
|
703
723
|
@pipeline_service_stub.call_rpc :cancel_training_pipeline, request, options: options do |response, operation|
|
704
724
|
yield response, operation if block_given?
|
705
|
-
return response
|
706
725
|
end
|
707
726
|
rescue ::GRPC::BadStatus => e
|
708
727
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -798,7 +817,6 @@ module Google
|
|
798
817
|
|
799
818
|
@pipeline_service_stub.call_rpc :create_pipeline_job, request, options: options do |response, operation|
|
800
819
|
yield response, operation if block_given?
|
801
|
-
return response
|
802
820
|
end
|
803
821
|
rescue ::GRPC::BadStatus => e
|
804
822
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -886,7 +904,6 @@ module Google
|
|
886
904
|
|
887
905
|
@pipeline_service_stub.call_rpc :get_pipeline_job, request, options: options do |response, operation|
|
888
906
|
yield response, operation if block_given?
|
889
|
-
return response
|
890
907
|
end
|
891
908
|
rescue ::GRPC::BadStatus => e
|
892
909
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1038,7 +1055,7 @@ module Google
|
|
1038
1055
|
@pipeline_service_stub.call_rpc :list_pipeline_jobs, request, options: options do |response, operation|
|
1039
1056
|
response = ::Gapic::PagedEnumerable.new @pipeline_service_stub, :list_pipeline_jobs, request, response, operation, options
|
1040
1057
|
yield response, operation if block_given?
|
1041
|
-
|
1058
|
+
throw :response, response
|
1042
1059
|
end
|
1043
1060
|
rescue ::GRPC::BadStatus => e
|
1044
1061
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1134,7 +1151,7 @@ module Google
|
|
1134
1151
|
@pipeline_service_stub.call_rpc :delete_pipeline_job, request, options: options do |response, operation|
|
1135
1152
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1136
1153
|
yield response, operation if block_given?
|
1137
|
-
|
1154
|
+
throw :response, response
|
1138
1155
|
end
|
1139
1156
|
rescue ::GRPC::BadStatus => e
|
1140
1157
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1236,7 +1253,7 @@ module Google
|
|
1236
1253
|
@pipeline_service_stub.call_rpc :batch_delete_pipeline_jobs, request, options: options do |response, operation|
|
1237
1254
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1238
1255
|
yield response, operation if block_given?
|
1239
|
-
|
1256
|
+
throw :response, response
|
1240
1257
|
end
|
1241
1258
|
rescue ::GRPC::BadStatus => e
|
1242
1259
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1336,7 +1353,6 @@ module Google
|
|
1336
1353
|
|
1337
1354
|
@pipeline_service_stub.call_rpc :cancel_pipeline_job, request, options: options do |response, operation|
|
1338
1355
|
yield response, operation if block_given?
|
1339
|
-
return response
|
1340
1356
|
end
|
1341
1357
|
rescue ::GRPC::BadStatus => e
|
1342
1358
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1442,7 +1458,7 @@ module Google
|
|
1442
1458
|
@pipeline_service_stub.call_rpc :batch_cancel_pipeline_jobs, request, options: options do |response, operation|
|
1443
1459
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1444
1460
|
yield response, operation if block_given?
|
1445
|
-
|
1461
|
+
throw :response, response
|
1446
1462
|
end
|
1447
1463
|
rescue ::GRPC::BadStatus => e
|
1448
1464
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1531,6 +1547,11 @@ module Google
|
|
1531
1547
|
# default endpoint URL. The default value of nil uses the environment
|
1532
1548
|
# universe (usually the default "googleapis.com" universe).
|
1533
1549
|
# @return [::String,nil]
|
1550
|
+
# @!attribute [rw] logger
|
1551
|
+
# A custom logger to use for request/response debug logging, or the value
|
1552
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1553
|
+
# explicitly disable logging.
|
1554
|
+
# @return [::Logger,:default,nil]
|
1534
1555
|
#
|
1535
1556
|
class Configuration
|
1536
1557
|
extend ::Gapic::Config
|
@@ -1555,6 +1576,7 @@ module Google
|
|
1555
1576
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1556
1577
|
config_attr :quota_project, nil, ::String, nil
|
1557
1578
|
config_attr :universe_domain, nil, ::String, nil
|
1579
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1558
1580
|
|
1559
1581
|
# @private
|
1560
1582
|
def initialize parent_config = nil
|