google-cloud-ai_platform-v1 0.38.0 → 0.40.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/ai_platform/v1/bindings_override.rb +399 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +39 -18
- data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb +2188 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/rest/service_stub.rb +1136 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/client.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/client.rb +851 -0
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/service_stub.rb +365 -0
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +21 -11
- data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb +1215 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/service_stub.rb +546 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +29 -13
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/client.rb +1732 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/service_stub.rb +841 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest.rb +55 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +7 -2
- data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/client.rb +534 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/service_stub.rb +189 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest.rb +53 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +24 -11
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/client.rb +1450 -0
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/service_stub.rb +663 -0
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest.rb +55 -0
- data/lib/google/cloud/ai_platform/v1/feature_registry_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +9 -3
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/client.rb +645 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/service_stub.rb +244 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest.rb +53 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +45 -21
- data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb +2765 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/service_stub.rb +1319 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/client.rb +765 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/paths.rb +154 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/client.rb +720 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/service_stub.rb +307 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest.rb +53 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service.rb +55 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +19 -8
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/client.rb +1151 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/service_stub.rb +546 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/index_service/client.rb +17 -7
- data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/index_service/rest/client.rb +1034 -0
- data/lib/google/cloud/ai_platform/v1/index_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/index_service/rest/service_stub.rb +486 -0
- data/lib/google/cloud/ai_platform/v1/index_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/index_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/job_service/client.rb +73 -35
- data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/job_service/paths.rb +19 -0
- data/lib/google/cloud/ai_platform/v1/job_service/rest/client.rb +3841 -0
- data/lib/google/cloud/ai_platform/v1/job_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/job_service/rest/service_stub.rb +2149 -0
- data/lib/google/cloud/ai_platform/v1/job_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/job_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +7 -2
- data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +533 -0
- data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/service_stub.rb +205 -0
- data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest.rb +53 -0
- data/lib/google/cloud/ai_platform/v1/llm_utility_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/match_service/client.rb +7 -2
- data/lib/google/cloud/ai_platform/v1/match_service/rest/client.rb +541 -0
- data/lib/google/cloud/ai_platform/v1/match_service/rest/service_stub.rb +189 -0
- data/lib/google/cloud/ai_platform/v1/match_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/match_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +67 -32
- data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/metadata_service/rest/client.rb +3634 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/rest/service_stub.rb +1972 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +7 -2
- data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/migration_service/rest/client.rb +574 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/rest/service_stub.rb +189 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/rest.rb +55 -0
- data/lib/google/cloud/ai_platform/v1/migration_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +5 -1
- data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +438 -0
- data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb +128 -0
- data/lib/google/cloud/ai_platform/v1/model_garden_service/rest.rb +53 -0
- data/lib/google/cloud/ai_platform/v1/model_garden_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/model_service/client.rb +39 -18
- data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +2213 -0
- data/lib/google/cloud/ai_platform/v1/model_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/model_service/rest/service_stub.rb +1140 -0
- data/lib/google/cloud/ai_platform/v1/model_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/model_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +1497 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +817 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/paths.rb +124 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +1410 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/rest/service_stub.rb +663 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service.rb +56 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +1001 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +817 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/paths.rb +86 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/client.rb +942 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/service_stub.rb +426 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service.rb +56 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +27 -12
- data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/client.rb +1600 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/service_stub.rb +783 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/rest.rb +56 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +39 -15
- data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +1297 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service/rest/service_stub.rb +642 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service/rest.rb +53 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/rest.rb +63 -0
- data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +17 -7
- data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/schedule_service/rest/client.rb +1076 -0
- data/lib/google/cloud/ai_platform/v1/schedule_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/schedule_service/rest/service_stub.rb +486 -0
- data/lib/google/cloud/ai_platform/v1/schedule_service/rest.rb +55 -0
- data/lib/google/cloud/ai_platform/v1/schedule_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/client.rb +847 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/service_stub.rb +366 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest.rb +59 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +63 -30
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/client.rb +3274 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/service_stub.rb +1847 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
- data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +33 -15
- data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/vizier_service/rest/client.rb +1788 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service/rest/operations.rb +3901 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service/rest/service_stub.rb +963 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service/rest.rb +58 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1.rb +9 -1
- data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/content_pb.rb +3 -1
- data/lib/google/cloud/aiplatform/v1/custom_job_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +3 -1
- data/lib/google/cloud/aiplatform/v1/feature_online_store_pb.rb +3 -1
- data/lib/google/cloud/aiplatform/v1/feature_online_store_service_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/feature_view_pb.rb +5 -1
- data/lib/google/cloud/aiplatform/v1/genai_tuning_service_pb.rb +54 -0
- data/lib/google/cloud/aiplatform/v1/genai_tuning_service_services_pb.rb +63 -0
- data/lib/google/cloud/aiplatform/v1/index_service_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/machine_resources_pb.rb +2 -1
- data/lib/google/cloud/aiplatform/v1/network_spec_pb.rb +44 -0
- data/lib/google/cloud/aiplatform/v1/notebook_euc_config_pb.rb +44 -0
- data/lib/google/cloud/aiplatform/v1/notebook_idle_shutdown_config_pb.rb +46 -0
- data/lib/google/cloud/aiplatform/v1/notebook_runtime_pb.rb +61 -0
- data/lib/google/cloud/aiplatform/v1/notebook_runtime_template_ref_pb.rb +45 -0
- data/lib/google/cloud/aiplatform/v1/notebook_service_pb.rb +72 -0
- data/lib/google/cloud/aiplatform/v1/notebook_service_services_pb.rb +64 -0
- data/lib/google/cloud/aiplatform/v1/openapi_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/persistent_resource_pb.rb +60 -0
- data/lib/google/cloud/aiplatform/v1/persistent_resource_service_pb.rb +64 -0
- data/lib/google/cloud/aiplatform/v1/persistent_resource_service_services_pb.rb +55 -0
- data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/publisher_model_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/tuning_job_pb.rb +60 -0
- data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +3 -0
- data/proto_docs/google/cloud/aiplatform/v1/content.rb +52 -3
- data/proto_docs/google/cloud/aiplatform/v1/custom_job.rb +9 -0
- data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +14 -0
- data/proto_docs/google/cloud/aiplatform/v1/endpoint_service.rb +2 -3
- data/proto_docs/google/cloud/aiplatform/v1/feature_online_store.rb +29 -0
- data/proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb +5 -0
- data/proto_docs/google/cloud/aiplatform/v1/feature_registry_service.rb +1 -1
- data/proto_docs/google/cloud/aiplatform/v1/feature_view.rb +86 -0
- data/proto_docs/google/cloud/aiplatform/v1/genai_tuning_service.rb +100 -0
- data/proto_docs/google/cloud/aiplatform/v1/index_service.rb +3 -0
- data/proto_docs/google/cloud/aiplatform/v1/machine_resources.rb +17 -0
- data/proto_docs/google/cloud/aiplatform/v1/network_spec.rb +44 -0
- data/proto_docs/google/cloud/aiplatform/v1/notebook_euc_config.rb +46 -0
- data/proto_docs/google/cloud/aiplatform/v1/notebook_idle_shutdown_config.rb +41 -0
- data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb +263 -0
- data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime_template_ref.rb +35 -0
- data/proto_docs/google/cloud/aiplatform/v1/notebook_service.rb +371 -0
- data/proto_docs/google/cloud/aiplatform/v1/openapi.rb +43 -4
- data/proto_docs/google/cloud/aiplatform/v1/persistent_resource.rb +248 -0
- data/proto_docs/google/cloud/aiplatform/v1/persistent_resource_service.rb +170 -0
- data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +12 -0
- data/proto_docs/google/cloud/aiplatform/v1/publisher_model.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/tool.rb +7 -5
- data/proto_docs/google/cloud/aiplatform/v1/tuning_job.rb +262 -0
- metadata +138 -2
@@ -0,0 +1,2213 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 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/model_service_pb"
|
21
|
+
require "google/cloud/ai_platform/v1/model_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 ModelService
|
30
|
+
module Rest
|
31
|
+
##
|
32
|
+
# REST client for the ModelService service.
|
33
|
+
#
|
34
|
+
# A service for managing Vertex AI's machine learning Models.
|
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 :model_service_stub
|
47
|
+
|
48
|
+
##
|
49
|
+
# Configure the ModelService Client class.
|
50
|
+
#
|
51
|
+
# See {::Google::Cloud::AIPlatform::V1::ModelService::Rest::Client::Configuration}
|
52
|
+
# for a description of the configuration fields.
|
53
|
+
#
|
54
|
+
# @example
|
55
|
+
#
|
56
|
+
# # Modify the configuration for all ModelService clients
|
57
|
+
# ::Google::Cloud::AIPlatform::V1::ModelService::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 ModelService 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::ModelService::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
|
+
@model_service_stub.universe_domain
|
110
|
+
end
|
111
|
+
|
112
|
+
##
|
113
|
+
# Create a new ModelService REST client object.
|
114
|
+
#
|
115
|
+
# @example
|
116
|
+
#
|
117
|
+
# # Create a client using the default configuration
|
118
|
+
# client = ::Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
119
|
+
#
|
120
|
+
# # Create a client using a custom configuration
|
121
|
+
# client = ::Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new do |config|
|
122
|
+
# config.timeout = 10.0
|
123
|
+
# end
|
124
|
+
#
|
125
|
+
# @yield [config] Configure the ModelService 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::ModelService::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
|
+
@model_service_stub = ::Google::Cloud::AIPlatform::V1::ModelService::Rest::ServiceStub.new(
|
159
|
+
endpoint: @config.endpoint,
|
160
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
161
|
+
universe_domain: @config.universe_domain,
|
162
|
+
credentials: credentials
|
163
|
+
)
|
164
|
+
|
165
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
166
|
+
config.credentials = credentials
|
167
|
+
config.quota_project = @quota_project_id
|
168
|
+
config.endpoint = @model_service_stub.endpoint
|
169
|
+
config.universe_domain = @model_service_stub.universe_domain
|
170
|
+
config.bindings_override = @config.bindings_override
|
171
|
+
end
|
172
|
+
|
173
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
174
|
+
config.credentials = credentials
|
175
|
+
config.quota_project = @quota_project_id
|
176
|
+
config.endpoint = @model_service_stub.endpoint
|
177
|
+
config.universe_domain = @model_service_stub.universe_domain
|
178
|
+
config.bindings_override = @config.bindings_override
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
##
|
183
|
+
# Get the associated client for long-running operations.
|
184
|
+
#
|
185
|
+
# @return [::Google::Cloud::AIPlatform::V1::ModelService::Rest::Operations]
|
186
|
+
#
|
187
|
+
attr_reader :operations_client
|
188
|
+
|
189
|
+
##
|
190
|
+
# Get the associated client for mix-in of the Locations.
|
191
|
+
#
|
192
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
193
|
+
#
|
194
|
+
attr_reader :location_client
|
195
|
+
|
196
|
+
##
|
197
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
198
|
+
#
|
199
|
+
# @return [Google::Iam::V1::IAMPolicy::Rest::Client]
|
200
|
+
#
|
201
|
+
attr_reader :iam_policy_client
|
202
|
+
|
203
|
+
# Service calls
|
204
|
+
|
205
|
+
##
|
206
|
+
# Uploads a Model artifact into Vertex AI.
|
207
|
+
#
|
208
|
+
# @overload upload_model(request, options = nil)
|
209
|
+
# Pass arguments to `upload_model` via a request object, either of type
|
210
|
+
# {::Google::Cloud::AIPlatform::V1::UploadModelRequest} or an equivalent Hash.
|
211
|
+
#
|
212
|
+
# @param request [::Google::Cloud::AIPlatform::V1::UploadModelRequest, ::Hash]
|
213
|
+
# A request object representing the call parameters. Required. To specify no
|
214
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
215
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
216
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
217
|
+
#
|
218
|
+
# @overload upload_model(parent: nil, parent_model: nil, model_id: nil, model: nil, service_account: nil)
|
219
|
+
# Pass arguments to `upload_model` via keyword arguments. Note that at
|
220
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
221
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
222
|
+
#
|
223
|
+
# @param parent [::String]
|
224
|
+
# Required. The resource name of the Location into which to upload the Model.
|
225
|
+
# Format: `projects/{project}/locations/{location}`
|
226
|
+
# @param parent_model [::String]
|
227
|
+
# Optional. The resource name of the model into which to upload the version.
|
228
|
+
# Only specify this field when uploading a new version.
|
229
|
+
# @param model_id [::String]
|
230
|
+
# Optional. The ID to use for the uploaded Model, which will become the final
|
231
|
+
# component of the model resource name.
|
232
|
+
#
|
233
|
+
# This value may be up to 63 characters, and valid characters are
|
234
|
+
# `[a-z0-9_-]`. The first character cannot be a number or hyphen.
|
235
|
+
# @param model [::Google::Cloud::AIPlatform::V1::Model, ::Hash]
|
236
|
+
# Required. The Model to create.
|
237
|
+
# @param service_account [::String]
|
238
|
+
# Optional. The user-provided custom service account to use to do the model
|
239
|
+
# upload. If empty, [Vertex AI Service
|
240
|
+
# Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents)
|
241
|
+
# will be used to access resources needed to upload the model. This account
|
242
|
+
# must belong to the target project where the model is uploaded to, i.e., the
|
243
|
+
# project specified in the `parent` field of this request and have necessary
|
244
|
+
# read permissions (to Google Cloud Storage, Artifact Registry, etc.).
|
245
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
246
|
+
# @yieldparam result [::Gapic::Operation]
|
247
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
248
|
+
#
|
249
|
+
# @return [::Gapic::Operation]
|
250
|
+
#
|
251
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
252
|
+
#
|
253
|
+
# @example Basic example
|
254
|
+
# require "google/cloud/ai_platform/v1"
|
255
|
+
#
|
256
|
+
# # Create a client object. The client can be reused for multiple calls.
|
257
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
258
|
+
#
|
259
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
260
|
+
# request = Google::Cloud::AIPlatform::V1::UploadModelRequest.new
|
261
|
+
#
|
262
|
+
# # Call the upload_model method.
|
263
|
+
# result = client.upload_model request
|
264
|
+
#
|
265
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
266
|
+
# # check the status of an operation, cancel it, or wait for results.
|
267
|
+
# # Here is how to wait for a response.
|
268
|
+
# result.wait_until_done! timeout: 60
|
269
|
+
# if result.response?
|
270
|
+
# p result.response
|
271
|
+
# else
|
272
|
+
# puts "No response received."
|
273
|
+
# end
|
274
|
+
#
|
275
|
+
def upload_model request, options = nil
|
276
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
277
|
+
|
278
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UploadModelRequest
|
279
|
+
|
280
|
+
# Converts hash and nil to an options object
|
281
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
282
|
+
|
283
|
+
# Customize the options with defaults
|
284
|
+
call_metadata = @config.rpcs.upload_model.metadata.to_h
|
285
|
+
|
286
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
287
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
288
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
289
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
290
|
+
transports_version_send: [:rest]
|
291
|
+
|
292
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
293
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
294
|
+
|
295
|
+
options.apply_defaults timeout: @config.rpcs.upload_model.timeout,
|
296
|
+
metadata: call_metadata,
|
297
|
+
retry_policy: @config.rpcs.upload_model.retry_policy
|
298
|
+
|
299
|
+
options.apply_defaults timeout: @config.timeout,
|
300
|
+
metadata: @config.metadata,
|
301
|
+
retry_policy: @config.retry_policy
|
302
|
+
|
303
|
+
@model_service_stub.upload_model request, options do |result, operation|
|
304
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
305
|
+
yield result, operation if block_given?
|
306
|
+
return result
|
307
|
+
end
|
308
|
+
rescue ::Gapic::Rest::Error => e
|
309
|
+
raise ::Google::Cloud::Error.from_error(e)
|
310
|
+
end
|
311
|
+
|
312
|
+
##
|
313
|
+
# Gets a Model.
|
314
|
+
#
|
315
|
+
# @overload get_model(request, options = nil)
|
316
|
+
# Pass arguments to `get_model` via a request object, either of type
|
317
|
+
# {::Google::Cloud::AIPlatform::V1::GetModelRequest} or an equivalent Hash.
|
318
|
+
#
|
319
|
+
# @param request [::Google::Cloud::AIPlatform::V1::GetModelRequest, ::Hash]
|
320
|
+
# A request object representing the call parameters. Required. To specify no
|
321
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
322
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
323
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
324
|
+
#
|
325
|
+
# @overload get_model(name: nil)
|
326
|
+
# Pass arguments to `get_model` via keyword arguments. Note that at
|
327
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
328
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
329
|
+
#
|
330
|
+
# @param name [::String]
|
331
|
+
# Required. The name of the Model resource.
|
332
|
+
# Format: `projects/{project}/locations/{location}/models/{model}`
|
333
|
+
#
|
334
|
+
# In order to retrieve a specific version of the model, also provide
|
335
|
+
# the version ID or version alias.
|
336
|
+
# Example: `projects/{project}/locations/{location}/models/{model}@2`
|
337
|
+
# or
|
338
|
+
# `projects/{project}/locations/{location}/models/{model}@golden`
|
339
|
+
# If no version ID or alias is specified, the "default" version will be
|
340
|
+
# returned. The "default" version alias is created for the first version of
|
341
|
+
# the model, and can be moved to other versions later on. There will be
|
342
|
+
# exactly one default version.
|
343
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
344
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::Model]
|
345
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
346
|
+
#
|
347
|
+
# @return [::Google::Cloud::AIPlatform::V1::Model]
|
348
|
+
#
|
349
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
350
|
+
#
|
351
|
+
# @example Basic example
|
352
|
+
# require "google/cloud/ai_platform/v1"
|
353
|
+
#
|
354
|
+
# # Create a client object. The client can be reused for multiple calls.
|
355
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
356
|
+
#
|
357
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
358
|
+
# request = Google::Cloud::AIPlatform::V1::GetModelRequest.new
|
359
|
+
#
|
360
|
+
# # Call the get_model method.
|
361
|
+
# result = client.get_model request
|
362
|
+
#
|
363
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::Model.
|
364
|
+
# p result
|
365
|
+
#
|
366
|
+
def get_model request, options = nil
|
367
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
368
|
+
|
369
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetModelRequest
|
370
|
+
|
371
|
+
# Converts hash and nil to an options object
|
372
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
373
|
+
|
374
|
+
# Customize the options with defaults
|
375
|
+
call_metadata = @config.rpcs.get_model.metadata.to_h
|
376
|
+
|
377
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
378
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
379
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
380
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
381
|
+
transports_version_send: [:rest]
|
382
|
+
|
383
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
384
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
385
|
+
|
386
|
+
options.apply_defaults timeout: @config.rpcs.get_model.timeout,
|
387
|
+
metadata: call_metadata,
|
388
|
+
retry_policy: @config.rpcs.get_model.retry_policy
|
389
|
+
|
390
|
+
options.apply_defaults timeout: @config.timeout,
|
391
|
+
metadata: @config.metadata,
|
392
|
+
retry_policy: @config.retry_policy
|
393
|
+
|
394
|
+
@model_service_stub.get_model request, options do |result, operation|
|
395
|
+
yield result, operation if block_given?
|
396
|
+
return result
|
397
|
+
end
|
398
|
+
rescue ::Gapic::Rest::Error => e
|
399
|
+
raise ::Google::Cloud::Error.from_error(e)
|
400
|
+
end
|
401
|
+
|
402
|
+
##
|
403
|
+
# Lists Models in a Location.
|
404
|
+
#
|
405
|
+
# @overload list_models(request, options = nil)
|
406
|
+
# Pass arguments to `list_models` via a request object, either of type
|
407
|
+
# {::Google::Cloud::AIPlatform::V1::ListModelsRequest} or an equivalent Hash.
|
408
|
+
#
|
409
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ListModelsRequest, ::Hash]
|
410
|
+
# A request object representing the call parameters. Required. To specify no
|
411
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
412
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
413
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
414
|
+
#
|
415
|
+
# @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil)
|
416
|
+
# Pass arguments to `list_models` via keyword arguments. Note that at
|
417
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
418
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
419
|
+
#
|
420
|
+
# @param parent [::String]
|
421
|
+
# Required. The resource name of the Location to list the Models from.
|
422
|
+
# Format: `projects/{project}/locations/{location}`
|
423
|
+
# @param filter [::String]
|
424
|
+
# An expression for filtering the results of the request. For field names
|
425
|
+
# both snake_case and camelCase are supported.
|
426
|
+
#
|
427
|
+
# * `model` supports = and !=. `model` represents the Model ID,
|
428
|
+
# i.e. the last segment of the Model's [resource
|
429
|
+
# name][google.cloud.aiplatform.v1.Model.name].
|
430
|
+
# * `display_name` supports = and !=
|
431
|
+
# * `labels` supports general map functions that is:
|
432
|
+
# * `labels.key=value` - key:value equality
|
433
|
+
# * `labels.key:* or labels:key - key existence
|
434
|
+
# * A key including a space must be quoted. `labels."a key"`.
|
435
|
+
# * `base_model_name` only supports =
|
436
|
+
#
|
437
|
+
# Some examples:
|
438
|
+
#
|
439
|
+
# * `model=1234`
|
440
|
+
# * `displayName="myDisplayName"`
|
441
|
+
# * `labels.myKey="myValue"`
|
442
|
+
# * `baseModelName="text-bison"`
|
443
|
+
# @param page_size [::Integer]
|
444
|
+
# The standard list page size.
|
445
|
+
# @param page_token [::String]
|
446
|
+
# The standard list page token.
|
447
|
+
# Typically obtained via
|
448
|
+
# {::Google::Cloud::AIPlatform::V1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token}
|
449
|
+
# of the previous
|
450
|
+
# {::Google::Cloud::AIPlatform::V1::ModelService::Rest::Client#list_models ModelService.ListModels}
|
451
|
+
# call.
|
452
|
+
# @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
|
453
|
+
# Mask specifying which fields to read.
|
454
|
+
# @param order_by [::String]
|
455
|
+
# A comma-separated list of fields to order by, sorted in ascending order.
|
456
|
+
# Use "desc" after a field name for descending.
|
457
|
+
# Supported fields:
|
458
|
+
#
|
459
|
+
# * `display_name`
|
460
|
+
# * `create_time`
|
461
|
+
# * `update_time`
|
462
|
+
#
|
463
|
+
# Example: `display_name, create_time desc`.
|
464
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
465
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>]
|
466
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
467
|
+
#
|
468
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>]
|
469
|
+
#
|
470
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
471
|
+
#
|
472
|
+
# @example Basic example
|
473
|
+
# require "google/cloud/ai_platform/v1"
|
474
|
+
#
|
475
|
+
# # Create a client object. The client can be reused for multiple calls.
|
476
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
477
|
+
#
|
478
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
479
|
+
# request = Google::Cloud::AIPlatform::V1::ListModelsRequest.new
|
480
|
+
#
|
481
|
+
# # Call the list_models method.
|
482
|
+
# result = client.list_models request
|
483
|
+
#
|
484
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
485
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
486
|
+
# result.each do |item|
|
487
|
+
# # Each element is of type ::Google::Cloud::AIPlatform::V1::Model.
|
488
|
+
# p item
|
489
|
+
# end
|
490
|
+
#
|
491
|
+
def list_models request, options = nil
|
492
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
493
|
+
|
494
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListModelsRequest
|
495
|
+
|
496
|
+
# Converts hash and nil to an options object
|
497
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
498
|
+
|
499
|
+
# Customize the options with defaults
|
500
|
+
call_metadata = @config.rpcs.list_models.metadata.to_h
|
501
|
+
|
502
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
503
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
504
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
505
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
506
|
+
transports_version_send: [:rest]
|
507
|
+
|
508
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
509
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
510
|
+
|
511
|
+
options.apply_defaults timeout: @config.rpcs.list_models.timeout,
|
512
|
+
metadata: call_metadata,
|
513
|
+
retry_policy: @config.rpcs.list_models.retry_policy
|
514
|
+
|
515
|
+
options.apply_defaults timeout: @config.timeout,
|
516
|
+
metadata: @config.metadata,
|
517
|
+
retry_policy: @config.retry_policy
|
518
|
+
|
519
|
+
@model_service_stub.list_models request, options do |result, operation|
|
520
|
+
result = ::Gapic::Rest::PagedEnumerable.new @model_service_stub, :list_models, "models", request, result, options
|
521
|
+
yield result, operation if block_given?
|
522
|
+
return result
|
523
|
+
end
|
524
|
+
rescue ::Gapic::Rest::Error => e
|
525
|
+
raise ::Google::Cloud::Error.from_error(e)
|
526
|
+
end
|
527
|
+
|
528
|
+
##
|
529
|
+
# Lists versions of the specified model.
|
530
|
+
#
|
531
|
+
# @overload list_model_versions(request, options = nil)
|
532
|
+
# Pass arguments to `list_model_versions` via a request object, either of type
|
533
|
+
# {::Google::Cloud::AIPlatform::V1::ListModelVersionsRequest} or an equivalent Hash.
|
534
|
+
#
|
535
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ListModelVersionsRequest, ::Hash]
|
536
|
+
# A request object representing the call parameters. Required. To specify no
|
537
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
538
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
539
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
540
|
+
#
|
541
|
+
# @overload list_model_versions(name: nil, page_size: nil, page_token: nil, filter: nil, read_mask: nil, order_by: nil)
|
542
|
+
# Pass arguments to `list_model_versions` via keyword arguments. Note that at
|
543
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
544
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
545
|
+
#
|
546
|
+
# @param name [::String]
|
547
|
+
# Required. The name of the model to list versions for.
|
548
|
+
# @param page_size [::Integer]
|
549
|
+
# The standard list page size.
|
550
|
+
# @param page_token [::String]
|
551
|
+
# The standard list page token.
|
552
|
+
# Typically obtained via
|
553
|
+
# {::Google::Cloud::AIPlatform::V1::ListModelVersionsResponse#next_page_token next_page_token}
|
554
|
+
# of the previous
|
555
|
+
# {::Google::Cloud::AIPlatform::V1::ModelService::Rest::Client#list_model_versions ListModelVersions}
|
556
|
+
# call.
|
557
|
+
# @param filter [::String]
|
558
|
+
# An expression for filtering the results of the request. For field names
|
559
|
+
# both snake_case and camelCase are supported.
|
560
|
+
#
|
561
|
+
# * `labels` supports general map functions that is:
|
562
|
+
# * `labels.key=value` - key:value equality
|
563
|
+
# * `labels.key:* or labels:key - key existence
|
564
|
+
# * A key including a space must be quoted. `labels."a key"`.
|
565
|
+
#
|
566
|
+
# Some examples:
|
567
|
+
#
|
568
|
+
# * `labels.myKey="myValue"`
|
569
|
+
# @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
|
570
|
+
# Mask specifying which fields to read.
|
571
|
+
# @param order_by [::String]
|
572
|
+
# A comma-separated list of fields to order by, sorted in ascending order.
|
573
|
+
# Use "desc" after a field name for descending.
|
574
|
+
# Supported fields:
|
575
|
+
#
|
576
|
+
# * `create_time`
|
577
|
+
# * `update_time`
|
578
|
+
#
|
579
|
+
# Example: `update_time asc, create_time desc`.
|
580
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
581
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>]
|
582
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
583
|
+
#
|
584
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>]
|
585
|
+
#
|
586
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
587
|
+
#
|
588
|
+
# @example Basic example
|
589
|
+
# require "google/cloud/ai_platform/v1"
|
590
|
+
#
|
591
|
+
# # Create a client object. The client can be reused for multiple calls.
|
592
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
593
|
+
#
|
594
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
595
|
+
# request = Google::Cloud::AIPlatform::V1::ListModelVersionsRequest.new
|
596
|
+
#
|
597
|
+
# # Call the list_model_versions method.
|
598
|
+
# result = client.list_model_versions request
|
599
|
+
#
|
600
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
601
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
602
|
+
# result.each do |item|
|
603
|
+
# # Each element is of type ::Google::Cloud::AIPlatform::V1::Model.
|
604
|
+
# p item
|
605
|
+
# end
|
606
|
+
#
|
607
|
+
def list_model_versions request, options = nil
|
608
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
609
|
+
|
610
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListModelVersionsRequest
|
611
|
+
|
612
|
+
# Converts hash and nil to an options object
|
613
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
614
|
+
|
615
|
+
# Customize the options with defaults
|
616
|
+
call_metadata = @config.rpcs.list_model_versions.metadata.to_h
|
617
|
+
|
618
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
619
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
620
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
621
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
622
|
+
transports_version_send: [:rest]
|
623
|
+
|
624
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
625
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
626
|
+
|
627
|
+
options.apply_defaults timeout: @config.rpcs.list_model_versions.timeout,
|
628
|
+
metadata: call_metadata,
|
629
|
+
retry_policy: @config.rpcs.list_model_versions.retry_policy
|
630
|
+
|
631
|
+
options.apply_defaults timeout: @config.timeout,
|
632
|
+
metadata: @config.metadata,
|
633
|
+
retry_policy: @config.retry_policy
|
634
|
+
|
635
|
+
@model_service_stub.list_model_versions request, options do |result, operation|
|
636
|
+
result = ::Gapic::Rest::PagedEnumerable.new @model_service_stub, :list_model_versions, "models", request, result, options
|
637
|
+
yield result, operation if block_given?
|
638
|
+
return result
|
639
|
+
end
|
640
|
+
rescue ::Gapic::Rest::Error => e
|
641
|
+
raise ::Google::Cloud::Error.from_error(e)
|
642
|
+
end
|
643
|
+
|
644
|
+
##
|
645
|
+
# Updates a Model.
|
646
|
+
#
|
647
|
+
# @overload update_model(request, options = nil)
|
648
|
+
# Pass arguments to `update_model` via a request object, either of type
|
649
|
+
# {::Google::Cloud::AIPlatform::V1::UpdateModelRequest} or an equivalent Hash.
|
650
|
+
#
|
651
|
+
# @param request [::Google::Cloud::AIPlatform::V1::UpdateModelRequest, ::Hash]
|
652
|
+
# A request object representing the call parameters. Required. To specify no
|
653
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
654
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
655
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
656
|
+
#
|
657
|
+
# @overload update_model(model: nil, update_mask: nil)
|
658
|
+
# Pass arguments to `update_model` via keyword arguments. Note that at
|
659
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
660
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
661
|
+
#
|
662
|
+
# @param model [::Google::Cloud::AIPlatform::V1::Model, ::Hash]
|
663
|
+
# Required. The Model which replaces the resource on the server.
|
664
|
+
# When Model Versioning is enabled, the model.name will be used to determine
|
665
|
+
# whether to update the model or model version.
|
666
|
+
# 1. model.name with the @ value, e.g. models/123@1, refers to a version
|
667
|
+
# specific update.
|
668
|
+
# 2. model.name without the @ value, e.g. models/123, refers to a model
|
669
|
+
# update.
|
670
|
+
# 3. model.name with @-, e.g. models/123@-, refers to a model update.
|
671
|
+
# 4. Supported model fields: display_name, description; supported
|
672
|
+
# version-specific fields: version_description. Labels are supported in both
|
673
|
+
# scenarios. Both the model labels and the version labels are merged when a
|
674
|
+
# model is returned. When updating labels, if the request is for
|
675
|
+
# model-specific update, model label gets updated. Otherwise, version labels
|
676
|
+
# get updated.
|
677
|
+
# 5. A model name or model version name fields update mismatch will cause a
|
678
|
+
# precondition error.
|
679
|
+
# 6. One request cannot update both the model and the version fields. You
|
680
|
+
# must update them separately.
|
681
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
682
|
+
# Required. The update mask applies to the resource.
|
683
|
+
# For the `FieldMask` definition, see
|
684
|
+
# {::Google::Protobuf::FieldMask google.protobuf.FieldMask}.
|
685
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
686
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::Model]
|
687
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
688
|
+
#
|
689
|
+
# @return [::Google::Cloud::AIPlatform::V1::Model]
|
690
|
+
#
|
691
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
692
|
+
#
|
693
|
+
# @example Basic example
|
694
|
+
# require "google/cloud/ai_platform/v1"
|
695
|
+
#
|
696
|
+
# # Create a client object. The client can be reused for multiple calls.
|
697
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
698
|
+
#
|
699
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
700
|
+
# request = Google::Cloud::AIPlatform::V1::UpdateModelRequest.new
|
701
|
+
#
|
702
|
+
# # Call the update_model method.
|
703
|
+
# result = client.update_model request
|
704
|
+
#
|
705
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::Model.
|
706
|
+
# p result
|
707
|
+
#
|
708
|
+
def update_model request, options = nil
|
709
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
710
|
+
|
711
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateModelRequest
|
712
|
+
|
713
|
+
# Converts hash and nil to an options object
|
714
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
715
|
+
|
716
|
+
# Customize the options with defaults
|
717
|
+
call_metadata = @config.rpcs.update_model.metadata.to_h
|
718
|
+
|
719
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
720
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
721
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
722
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
723
|
+
transports_version_send: [:rest]
|
724
|
+
|
725
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
726
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
727
|
+
|
728
|
+
options.apply_defaults timeout: @config.rpcs.update_model.timeout,
|
729
|
+
metadata: call_metadata,
|
730
|
+
retry_policy: @config.rpcs.update_model.retry_policy
|
731
|
+
|
732
|
+
options.apply_defaults timeout: @config.timeout,
|
733
|
+
metadata: @config.metadata,
|
734
|
+
retry_policy: @config.retry_policy
|
735
|
+
|
736
|
+
@model_service_stub.update_model request, options do |result, operation|
|
737
|
+
yield result, operation if block_given?
|
738
|
+
return result
|
739
|
+
end
|
740
|
+
rescue ::Gapic::Rest::Error => e
|
741
|
+
raise ::Google::Cloud::Error.from_error(e)
|
742
|
+
end
|
743
|
+
|
744
|
+
##
|
745
|
+
# Incrementally update the dataset used for an examples model.
|
746
|
+
#
|
747
|
+
# @overload update_explanation_dataset(request, options = nil)
|
748
|
+
# Pass arguments to `update_explanation_dataset` via a request object, either of type
|
749
|
+
# {::Google::Cloud::AIPlatform::V1::UpdateExplanationDatasetRequest} or an equivalent Hash.
|
750
|
+
#
|
751
|
+
# @param request [::Google::Cloud::AIPlatform::V1::UpdateExplanationDatasetRequest, ::Hash]
|
752
|
+
# A request object representing the call parameters. Required. To specify no
|
753
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
754
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
755
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
756
|
+
#
|
757
|
+
# @overload update_explanation_dataset(model: nil, examples: nil)
|
758
|
+
# Pass arguments to `update_explanation_dataset` via keyword arguments. Note that at
|
759
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
760
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
761
|
+
#
|
762
|
+
# @param model [::String]
|
763
|
+
# Required. The resource name of the Model to update.
|
764
|
+
# Format: `projects/{project}/locations/{location}/models/{model}`
|
765
|
+
# @param examples [::Google::Cloud::AIPlatform::V1::Examples, ::Hash]
|
766
|
+
# The example config containing the location of the dataset.
|
767
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
768
|
+
# @yieldparam result [::Gapic::Operation]
|
769
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
770
|
+
#
|
771
|
+
# @return [::Gapic::Operation]
|
772
|
+
#
|
773
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
774
|
+
#
|
775
|
+
# @example Basic example
|
776
|
+
# require "google/cloud/ai_platform/v1"
|
777
|
+
#
|
778
|
+
# # Create a client object. The client can be reused for multiple calls.
|
779
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
780
|
+
#
|
781
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
782
|
+
# request = Google::Cloud::AIPlatform::V1::UpdateExplanationDatasetRequest.new
|
783
|
+
#
|
784
|
+
# # Call the update_explanation_dataset method.
|
785
|
+
# result = client.update_explanation_dataset request
|
786
|
+
#
|
787
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
788
|
+
# # check the status of an operation, cancel it, or wait for results.
|
789
|
+
# # Here is how to wait for a response.
|
790
|
+
# result.wait_until_done! timeout: 60
|
791
|
+
# if result.response?
|
792
|
+
# p result.response
|
793
|
+
# else
|
794
|
+
# puts "No response received."
|
795
|
+
# end
|
796
|
+
#
|
797
|
+
def update_explanation_dataset request, options = nil
|
798
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
799
|
+
|
800
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateExplanationDatasetRequest
|
801
|
+
|
802
|
+
# Converts hash and nil to an options object
|
803
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
804
|
+
|
805
|
+
# Customize the options with defaults
|
806
|
+
call_metadata = @config.rpcs.update_explanation_dataset.metadata.to_h
|
807
|
+
|
808
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
809
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
810
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
811
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
812
|
+
transports_version_send: [:rest]
|
813
|
+
|
814
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
815
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
816
|
+
|
817
|
+
options.apply_defaults timeout: @config.rpcs.update_explanation_dataset.timeout,
|
818
|
+
metadata: call_metadata,
|
819
|
+
retry_policy: @config.rpcs.update_explanation_dataset.retry_policy
|
820
|
+
|
821
|
+
options.apply_defaults timeout: @config.timeout,
|
822
|
+
metadata: @config.metadata,
|
823
|
+
retry_policy: @config.retry_policy
|
824
|
+
|
825
|
+
@model_service_stub.update_explanation_dataset request, options do |result, operation|
|
826
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
827
|
+
yield result, operation if block_given?
|
828
|
+
return result
|
829
|
+
end
|
830
|
+
rescue ::Gapic::Rest::Error => e
|
831
|
+
raise ::Google::Cloud::Error.from_error(e)
|
832
|
+
end
|
833
|
+
|
834
|
+
##
|
835
|
+
# Deletes a Model.
|
836
|
+
#
|
837
|
+
# A model cannot be deleted if any
|
838
|
+
# {::Google::Cloud::AIPlatform::V1::Endpoint Endpoint} resource has a
|
839
|
+
# {::Google::Cloud::AIPlatform::V1::DeployedModel DeployedModel} based on the
|
840
|
+
# model in its
|
841
|
+
# {::Google::Cloud::AIPlatform::V1::Endpoint#deployed_models deployed_models}
|
842
|
+
# field.
|
843
|
+
#
|
844
|
+
# @overload delete_model(request, options = nil)
|
845
|
+
# Pass arguments to `delete_model` via a request object, either of type
|
846
|
+
# {::Google::Cloud::AIPlatform::V1::DeleteModelRequest} or an equivalent Hash.
|
847
|
+
#
|
848
|
+
# @param request [::Google::Cloud::AIPlatform::V1::DeleteModelRequest, ::Hash]
|
849
|
+
# A request object representing the call parameters. Required. To specify no
|
850
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
851
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
852
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
853
|
+
#
|
854
|
+
# @overload delete_model(name: nil)
|
855
|
+
# Pass arguments to `delete_model` via keyword arguments. Note that at
|
856
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
857
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
858
|
+
#
|
859
|
+
# @param name [::String]
|
860
|
+
# Required. The name of the Model resource to be deleted.
|
861
|
+
# Format: `projects/{project}/locations/{location}/models/{model}`
|
862
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
863
|
+
# @yieldparam result [::Gapic::Operation]
|
864
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
865
|
+
#
|
866
|
+
# @return [::Gapic::Operation]
|
867
|
+
#
|
868
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
869
|
+
#
|
870
|
+
# @example Basic example
|
871
|
+
# require "google/cloud/ai_platform/v1"
|
872
|
+
#
|
873
|
+
# # Create a client object. The client can be reused for multiple calls.
|
874
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
875
|
+
#
|
876
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
877
|
+
# request = Google::Cloud::AIPlatform::V1::DeleteModelRequest.new
|
878
|
+
#
|
879
|
+
# # Call the delete_model method.
|
880
|
+
# result = client.delete_model request
|
881
|
+
#
|
882
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
883
|
+
# # check the status of an operation, cancel it, or wait for results.
|
884
|
+
# # Here is how to wait for a response.
|
885
|
+
# result.wait_until_done! timeout: 60
|
886
|
+
# if result.response?
|
887
|
+
# p result.response
|
888
|
+
# else
|
889
|
+
# puts "No response received."
|
890
|
+
# end
|
891
|
+
#
|
892
|
+
def delete_model request, options = nil
|
893
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
894
|
+
|
895
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteModelRequest
|
896
|
+
|
897
|
+
# Converts hash and nil to an options object
|
898
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
899
|
+
|
900
|
+
# Customize the options with defaults
|
901
|
+
call_metadata = @config.rpcs.delete_model.metadata.to_h
|
902
|
+
|
903
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
904
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
905
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
906
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
907
|
+
transports_version_send: [:rest]
|
908
|
+
|
909
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
910
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
911
|
+
|
912
|
+
options.apply_defaults timeout: @config.rpcs.delete_model.timeout,
|
913
|
+
metadata: call_metadata,
|
914
|
+
retry_policy: @config.rpcs.delete_model.retry_policy
|
915
|
+
|
916
|
+
options.apply_defaults timeout: @config.timeout,
|
917
|
+
metadata: @config.metadata,
|
918
|
+
retry_policy: @config.retry_policy
|
919
|
+
|
920
|
+
@model_service_stub.delete_model request, options do |result, operation|
|
921
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
922
|
+
yield result, operation if block_given?
|
923
|
+
return result
|
924
|
+
end
|
925
|
+
rescue ::Gapic::Rest::Error => e
|
926
|
+
raise ::Google::Cloud::Error.from_error(e)
|
927
|
+
end
|
928
|
+
|
929
|
+
##
|
930
|
+
# Deletes a Model version.
|
931
|
+
#
|
932
|
+
# Model version can only be deleted if there are no
|
933
|
+
# {::Google::Cloud::AIPlatform::V1::DeployedModel DeployedModels} created from it.
|
934
|
+
# Deleting the only version in the Model is not allowed. Use
|
935
|
+
# {::Google::Cloud::AIPlatform::V1::ModelService::Rest::Client#delete_model DeleteModel} for
|
936
|
+
# deleting the Model instead.
|
937
|
+
#
|
938
|
+
# @overload delete_model_version(request, options = nil)
|
939
|
+
# Pass arguments to `delete_model_version` via a request object, either of type
|
940
|
+
# {::Google::Cloud::AIPlatform::V1::DeleteModelVersionRequest} or an equivalent Hash.
|
941
|
+
#
|
942
|
+
# @param request [::Google::Cloud::AIPlatform::V1::DeleteModelVersionRequest, ::Hash]
|
943
|
+
# A request object representing the call parameters. Required. To specify no
|
944
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
945
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
946
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
947
|
+
#
|
948
|
+
# @overload delete_model_version(name: nil)
|
949
|
+
# Pass arguments to `delete_model_version` via keyword arguments. Note that at
|
950
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
951
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
952
|
+
#
|
953
|
+
# @param name [::String]
|
954
|
+
# Required. The name of the model version to be deleted, with a version ID
|
955
|
+
# explicitly included.
|
956
|
+
#
|
957
|
+
# Example: `projects/{project}/locations/{location}/models/{model}@1234`
|
958
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
959
|
+
# @yieldparam result [::Gapic::Operation]
|
960
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
961
|
+
#
|
962
|
+
# @return [::Gapic::Operation]
|
963
|
+
#
|
964
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
965
|
+
#
|
966
|
+
# @example Basic example
|
967
|
+
# require "google/cloud/ai_platform/v1"
|
968
|
+
#
|
969
|
+
# # Create a client object. The client can be reused for multiple calls.
|
970
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
971
|
+
#
|
972
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
973
|
+
# request = Google::Cloud::AIPlatform::V1::DeleteModelVersionRequest.new
|
974
|
+
#
|
975
|
+
# # Call the delete_model_version method.
|
976
|
+
# result = client.delete_model_version request
|
977
|
+
#
|
978
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
979
|
+
# # check the status of an operation, cancel it, or wait for results.
|
980
|
+
# # Here is how to wait for a response.
|
981
|
+
# result.wait_until_done! timeout: 60
|
982
|
+
# if result.response?
|
983
|
+
# p result.response
|
984
|
+
# else
|
985
|
+
# puts "No response received."
|
986
|
+
# end
|
987
|
+
#
|
988
|
+
def delete_model_version request, options = nil
|
989
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
990
|
+
|
991
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteModelVersionRequest
|
992
|
+
|
993
|
+
# Converts hash and nil to an options object
|
994
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
995
|
+
|
996
|
+
# Customize the options with defaults
|
997
|
+
call_metadata = @config.rpcs.delete_model_version.metadata.to_h
|
998
|
+
|
999
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1000
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1001
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1002
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
1003
|
+
transports_version_send: [:rest]
|
1004
|
+
|
1005
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1006
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1007
|
+
|
1008
|
+
options.apply_defaults timeout: @config.rpcs.delete_model_version.timeout,
|
1009
|
+
metadata: call_metadata,
|
1010
|
+
retry_policy: @config.rpcs.delete_model_version.retry_policy
|
1011
|
+
|
1012
|
+
options.apply_defaults timeout: @config.timeout,
|
1013
|
+
metadata: @config.metadata,
|
1014
|
+
retry_policy: @config.retry_policy
|
1015
|
+
|
1016
|
+
@model_service_stub.delete_model_version request, options do |result, operation|
|
1017
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1018
|
+
yield result, operation if block_given?
|
1019
|
+
return result
|
1020
|
+
end
|
1021
|
+
rescue ::Gapic::Rest::Error => e
|
1022
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1023
|
+
end
|
1024
|
+
|
1025
|
+
##
|
1026
|
+
# Merges a set of aliases for a Model version.
|
1027
|
+
#
|
1028
|
+
# @overload merge_version_aliases(request, options = nil)
|
1029
|
+
# Pass arguments to `merge_version_aliases` via a request object, either of type
|
1030
|
+
# {::Google::Cloud::AIPlatform::V1::MergeVersionAliasesRequest} or an equivalent Hash.
|
1031
|
+
#
|
1032
|
+
# @param request [::Google::Cloud::AIPlatform::V1::MergeVersionAliasesRequest, ::Hash]
|
1033
|
+
# A request object representing the call parameters. Required. To specify no
|
1034
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1035
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1036
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1037
|
+
#
|
1038
|
+
# @overload merge_version_aliases(name: nil, version_aliases: nil)
|
1039
|
+
# Pass arguments to `merge_version_aliases` via keyword arguments. Note that at
|
1040
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1041
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1042
|
+
#
|
1043
|
+
# @param name [::String]
|
1044
|
+
# Required. The name of the model version to merge aliases, with a version ID
|
1045
|
+
# explicitly included.
|
1046
|
+
#
|
1047
|
+
# Example: `projects/{project}/locations/{location}/models/{model}@1234`
|
1048
|
+
# @param version_aliases [::Array<::String>]
|
1049
|
+
# Required. The set of version aliases to merge.
|
1050
|
+
# The alias should be at most 128 characters, and match
|
1051
|
+
# `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
|
1052
|
+
# Add the `-` prefix to an alias means removing that alias from the version.
|
1053
|
+
# `-` is NOT counted in the 128 characters. Example: `-golden` means removing
|
1054
|
+
# the `golden` alias from the version.
|
1055
|
+
#
|
1056
|
+
# There is NO ordering in aliases, which means
|
1057
|
+
# 1) The aliases returned from GetModel API might not have the exactly same
|
1058
|
+
# order from this MergeVersionAliases API. 2) Adding and deleting the same
|
1059
|
+
# alias in the request is not recommended, and the 2 operations will be
|
1060
|
+
# cancelled out.
|
1061
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1062
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::Model]
|
1063
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1064
|
+
#
|
1065
|
+
# @return [::Google::Cloud::AIPlatform::V1::Model]
|
1066
|
+
#
|
1067
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1068
|
+
#
|
1069
|
+
# @example Basic example
|
1070
|
+
# require "google/cloud/ai_platform/v1"
|
1071
|
+
#
|
1072
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1073
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
1074
|
+
#
|
1075
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1076
|
+
# request = Google::Cloud::AIPlatform::V1::MergeVersionAliasesRequest.new
|
1077
|
+
#
|
1078
|
+
# # Call the merge_version_aliases method.
|
1079
|
+
# result = client.merge_version_aliases request
|
1080
|
+
#
|
1081
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::Model.
|
1082
|
+
# p result
|
1083
|
+
#
|
1084
|
+
def merge_version_aliases request, options = nil
|
1085
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1086
|
+
|
1087
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::MergeVersionAliasesRequest
|
1088
|
+
|
1089
|
+
# Converts hash and nil to an options object
|
1090
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1091
|
+
|
1092
|
+
# Customize the options with defaults
|
1093
|
+
call_metadata = @config.rpcs.merge_version_aliases.metadata.to_h
|
1094
|
+
|
1095
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1096
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1097
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1098
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
1099
|
+
transports_version_send: [:rest]
|
1100
|
+
|
1101
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1102
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1103
|
+
|
1104
|
+
options.apply_defaults timeout: @config.rpcs.merge_version_aliases.timeout,
|
1105
|
+
metadata: call_metadata,
|
1106
|
+
retry_policy: @config.rpcs.merge_version_aliases.retry_policy
|
1107
|
+
|
1108
|
+
options.apply_defaults timeout: @config.timeout,
|
1109
|
+
metadata: @config.metadata,
|
1110
|
+
retry_policy: @config.retry_policy
|
1111
|
+
|
1112
|
+
@model_service_stub.merge_version_aliases request, options do |result, operation|
|
1113
|
+
yield result, operation if block_given?
|
1114
|
+
return result
|
1115
|
+
end
|
1116
|
+
rescue ::Gapic::Rest::Error => e
|
1117
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1118
|
+
end
|
1119
|
+
|
1120
|
+
##
|
1121
|
+
# Exports a trained, exportable Model to a location specified by the
|
1122
|
+
# user. A Model is considered to be exportable if it has at least one
|
1123
|
+
# [supported export
|
1124
|
+
# format][google.cloud.aiplatform.v1.Model.supported_export_formats].
|
1125
|
+
#
|
1126
|
+
# @overload export_model(request, options = nil)
|
1127
|
+
# Pass arguments to `export_model` via a request object, either of type
|
1128
|
+
# {::Google::Cloud::AIPlatform::V1::ExportModelRequest} or an equivalent Hash.
|
1129
|
+
#
|
1130
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ExportModelRequest, ::Hash]
|
1131
|
+
# A request object representing the call parameters. Required. To specify no
|
1132
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1133
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1134
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1135
|
+
#
|
1136
|
+
# @overload export_model(name: nil, output_config: nil)
|
1137
|
+
# Pass arguments to `export_model` via keyword arguments. Note that at
|
1138
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1139
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1140
|
+
#
|
1141
|
+
# @param name [::String]
|
1142
|
+
# Required. The resource name of the Model to export.
|
1143
|
+
# The resource name may contain version id or version alias to specify the
|
1144
|
+
# version, if no version is specified, the default version will be exported.
|
1145
|
+
# @param output_config [::Google::Cloud::AIPlatform::V1::ExportModelRequest::OutputConfig, ::Hash]
|
1146
|
+
# Required. The desired output location and configuration.
|
1147
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1148
|
+
# @yieldparam result [::Gapic::Operation]
|
1149
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1150
|
+
#
|
1151
|
+
# @return [::Gapic::Operation]
|
1152
|
+
#
|
1153
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1154
|
+
#
|
1155
|
+
# @example Basic example
|
1156
|
+
# require "google/cloud/ai_platform/v1"
|
1157
|
+
#
|
1158
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1159
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
1160
|
+
#
|
1161
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1162
|
+
# request = Google::Cloud::AIPlatform::V1::ExportModelRequest.new
|
1163
|
+
#
|
1164
|
+
# # Call the export_model method.
|
1165
|
+
# result = client.export_model request
|
1166
|
+
#
|
1167
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1168
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1169
|
+
# # Here is how to wait for a response.
|
1170
|
+
# result.wait_until_done! timeout: 60
|
1171
|
+
# if result.response?
|
1172
|
+
# p result.response
|
1173
|
+
# else
|
1174
|
+
# puts "No response received."
|
1175
|
+
# end
|
1176
|
+
#
|
1177
|
+
def export_model request, options = nil
|
1178
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1179
|
+
|
1180
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ExportModelRequest
|
1181
|
+
|
1182
|
+
# Converts hash and nil to an options object
|
1183
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1184
|
+
|
1185
|
+
# Customize the options with defaults
|
1186
|
+
call_metadata = @config.rpcs.export_model.metadata.to_h
|
1187
|
+
|
1188
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1189
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1190
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1191
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
1192
|
+
transports_version_send: [:rest]
|
1193
|
+
|
1194
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1195
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1196
|
+
|
1197
|
+
options.apply_defaults timeout: @config.rpcs.export_model.timeout,
|
1198
|
+
metadata: call_metadata,
|
1199
|
+
retry_policy: @config.rpcs.export_model.retry_policy
|
1200
|
+
|
1201
|
+
options.apply_defaults timeout: @config.timeout,
|
1202
|
+
metadata: @config.metadata,
|
1203
|
+
retry_policy: @config.retry_policy
|
1204
|
+
|
1205
|
+
@model_service_stub.export_model request, options do |result, operation|
|
1206
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1207
|
+
yield result, operation if block_given?
|
1208
|
+
return result
|
1209
|
+
end
|
1210
|
+
rescue ::Gapic::Rest::Error => e
|
1211
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1212
|
+
end
|
1213
|
+
|
1214
|
+
##
|
1215
|
+
# Copies an already existing Vertex AI Model into the specified Location.
|
1216
|
+
# The source Model must exist in the same Project.
|
1217
|
+
# When copying custom Models, the users themselves are responsible for
|
1218
|
+
# {::Google::Cloud::AIPlatform::V1::Model#metadata Model.metadata} content to be
|
1219
|
+
# region-agnostic, as well as making sure that any resources (e.g. files) it
|
1220
|
+
# depends on remain accessible.
|
1221
|
+
#
|
1222
|
+
# @overload copy_model(request, options = nil)
|
1223
|
+
# Pass arguments to `copy_model` via a request object, either of type
|
1224
|
+
# {::Google::Cloud::AIPlatform::V1::CopyModelRequest} or an equivalent Hash.
|
1225
|
+
#
|
1226
|
+
# @param request [::Google::Cloud::AIPlatform::V1::CopyModelRequest, ::Hash]
|
1227
|
+
# A request object representing the call parameters. Required. To specify no
|
1228
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1229
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1230
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1231
|
+
#
|
1232
|
+
# @overload copy_model(model_id: nil, parent_model: nil, parent: nil, source_model: nil, encryption_spec: nil)
|
1233
|
+
# Pass arguments to `copy_model` via keyword arguments. Note that at
|
1234
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1235
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1236
|
+
#
|
1237
|
+
# @param model_id [::String]
|
1238
|
+
# Optional. Copy source_model into a new Model with this ID. The ID will
|
1239
|
+
# become the final component of the model resource name.
|
1240
|
+
#
|
1241
|
+
# This value may be up to 63 characters, and valid characters are
|
1242
|
+
# `[a-z0-9_-]`. The first character cannot be a number or hyphen.
|
1243
|
+
# @param parent_model [::String]
|
1244
|
+
# Optional. Specify this field to copy source_model into this existing
|
1245
|
+
# Model as a new version. Format:
|
1246
|
+
# `projects/{project}/locations/{location}/models/{model}`
|
1247
|
+
# @param parent [::String]
|
1248
|
+
# Required. The resource name of the Location into which to copy the Model.
|
1249
|
+
# Format: `projects/{project}/locations/{location}`
|
1250
|
+
# @param source_model [::String]
|
1251
|
+
# Required. The resource name of the Model to copy. That Model must be in the
|
1252
|
+
# same Project. Format:
|
1253
|
+
# `projects/{project}/locations/{location}/models/{model}`
|
1254
|
+
# @param encryption_spec [::Google::Cloud::AIPlatform::V1::EncryptionSpec, ::Hash]
|
1255
|
+
# Customer-managed encryption key options. If this is set,
|
1256
|
+
# then the Model copy will be encrypted with the provided encryption key.
|
1257
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1258
|
+
# @yieldparam result [::Gapic::Operation]
|
1259
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1260
|
+
#
|
1261
|
+
# @return [::Gapic::Operation]
|
1262
|
+
#
|
1263
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1264
|
+
#
|
1265
|
+
# @example Basic example
|
1266
|
+
# require "google/cloud/ai_platform/v1"
|
1267
|
+
#
|
1268
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1269
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
1270
|
+
#
|
1271
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1272
|
+
# request = Google::Cloud::AIPlatform::V1::CopyModelRequest.new
|
1273
|
+
#
|
1274
|
+
# # Call the copy_model method.
|
1275
|
+
# result = client.copy_model request
|
1276
|
+
#
|
1277
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1278
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1279
|
+
# # Here is how to wait for a response.
|
1280
|
+
# result.wait_until_done! timeout: 60
|
1281
|
+
# if result.response?
|
1282
|
+
# p result.response
|
1283
|
+
# else
|
1284
|
+
# puts "No response received."
|
1285
|
+
# end
|
1286
|
+
#
|
1287
|
+
def copy_model request, options = nil
|
1288
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1289
|
+
|
1290
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CopyModelRequest
|
1291
|
+
|
1292
|
+
# Converts hash and nil to an options object
|
1293
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1294
|
+
|
1295
|
+
# Customize the options with defaults
|
1296
|
+
call_metadata = @config.rpcs.copy_model.metadata.to_h
|
1297
|
+
|
1298
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1299
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1300
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1301
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
1302
|
+
transports_version_send: [:rest]
|
1303
|
+
|
1304
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1305
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1306
|
+
|
1307
|
+
options.apply_defaults timeout: @config.rpcs.copy_model.timeout,
|
1308
|
+
metadata: call_metadata,
|
1309
|
+
retry_policy: @config.rpcs.copy_model.retry_policy
|
1310
|
+
|
1311
|
+
options.apply_defaults timeout: @config.timeout,
|
1312
|
+
metadata: @config.metadata,
|
1313
|
+
retry_policy: @config.retry_policy
|
1314
|
+
|
1315
|
+
@model_service_stub.copy_model request, options do |result, operation|
|
1316
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1317
|
+
yield result, operation if block_given?
|
1318
|
+
return result
|
1319
|
+
end
|
1320
|
+
rescue ::Gapic::Rest::Error => e
|
1321
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1322
|
+
end
|
1323
|
+
|
1324
|
+
##
|
1325
|
+
# Imports an externally generated ModelEvaluation.
|
1326
|
+
#
|
1327
|
+
# @overload import_model_evaluation(request, options = nil)
|
1328
|
+
# Pass arguments to `import_model_evaluation` via a request object, either of type
|
1329
|
+
# {::Google::Cloud::AIPlatform::V1::ImportModelEvaluationRequest} or an equivalent Hash.
|
1330
|
+
#
|
1331
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ImportModelEvaluationRequest, ::Hash]
|
1332
|
+
# A request object representing the call parameters. Required. To specify no
|
1333
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1334
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1335
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1336
|
+
#
|
1337
|
+
# @overload import_model_evaluation(parent: nil, model_evaluation: nil)
|
1338
|
+
# Pass arguments to `import_model_evaluation` via keyword arguments. Note that at
|
1339
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1340
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1341
|
+
#
|
1342
|
+
# @param parent [::String]
|
1343
|
+
# Required. The name of the parent model resource.
|
1344
|
+
# Format: `projects/{project}/locations/{location}/models/{model}`
|
1345
|
+
# @param model_evaluation [::Google::Cloud::AIPlatform::V1::ModelEvaluation, ::Hash]
|
1346
|
+
# Required. Model evaluation resource to be imported.
|
1347
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1348
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::ModelEvaluation]
|
1349
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1350
|
+
#
|
1351
|
+
# @return [::Google::Cloud::AIPlatform::V1::ModelEvaluation]
|
1352
|
+
#
|
1353
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1354
|
+
#
|
1355
|
+
# @example Basic example
|
1356
|
+
# require "google/cloud/ai_platform/v1"
|
1357
|
+
#
|
1358
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1359
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
1360
|
+
#
|
1361
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1362
|
+
# request = Google::Cloud::AIPlatform::V1::ImportModelEvaluationRequest.new
|
1363
|
+
#
|
1364
|
+
# # Call the import_model_evaluation method.
|
1365
|
+
# result = client.import_model_evaluation request
|
1366
|
+
#
|
1367
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::ModelEvaluation.
|
1368
|
+
# p result
|
1369
|
+
#
|
1370
|
+
def import_model_evaluation request, options = nil
|
1371
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1372
|
+
|
1373
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ImportModelEvaluationRequest
|
1374
|
+
|
1375
|
+
# Converts hash and nil to an options object
|
1376
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1377
|
+
|
1378
|
+
# Customize the options with defaults
|
1379
|
+
call_metadata = @config.rpcs.import_model_evaluation.metadata.to_h
|
1380
|
+
|
1381
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1382
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1383
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1384
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
1385
|
+
transports_version_send: [:rest]
|
1386
|
+
|
1387
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1388
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1389
|
+
|
1390
|
+
options.apply_defaults timeout: @config.rpcs.import_model_evaluation.timeout,
|
1391
|
+
metadata: call_metadata,
|
1392
|
+
retry_policy: @config.rpcs.import_model_evaluation.retry_policy
|
1393
|
+
|
1394
|
+
options.apply_defaults timeout: @config.timeout,
|
1395
|
+
metadata: @config.metadata,
|
1396
|
+
retry_policy: @config.retry_policy
|
1397
|
+
|
1398
|
+
@model_service_stub.import_model_evaluation request, options do |result, operation|
|
1399
|
+
yield result, operation if block_given?
|
1400
|
+
return result
|
1401
|
+
end
|
1402
|
+
rescue ::Gapic::Rest::Error => e
|
1403
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1404
|
+
end
|
1405
|
+
|
1406
|
+
##
|
1407
|
+
# Imports a list of externally generated ModelEvaluationSlice.
|
1408
|
+
#
|
1409
|
+
# @overload batch_import_model_evaluation_slices(request, options = nil)
|
1410
|
+
# Pass arguments to `batch_import_model_evaluation_slices` via a request object, either of type
|
1411
|
+
# {::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesRequest} or an equivalent Hash.
|
1412
|
+
#
|
1413
|
+
# @param request [::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesRequest, ::Hash]
|
1414
|
+
# A request object representing the call parameters. Required. To specify no
|
1415
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1416
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1417
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1418
|
+
#
|
1419
|
+
# @overload batch_import_model_evaluation_slices(parent: nil, model_evaluation_slices: nil)
|
1420
|
+
# Pass arguments to `batch_import_model_evaluation_slices` via keyword arguments. Note that at
|
1421
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1422
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1423
|
+
#
|
1424
|
+
# @param parent [::String]
|
1425
|
+
# Required. The name of the parent ModelEvaluation resource.
|
1426
|
+
# Format:
|
1427
|
+
# `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
|
1428
|
+
# @param model_evaluation_slices [::Array<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice, ::Hash>]
|
1429
|
+
# Required. Model evaluation slice resource to be imported.
|
1430
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1431
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse]
|
1432
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1433
|
+
#
|
1434
|
+
# @return [::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse]
|
1435
|
+
#
|
1436
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1437
|
+
#
|
1438
|
+
# @example Basic example
|
1439
|
+
# require "google/cloud/ai_platform/v1"
|
1440
|
+
#
|
1441
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1442
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
1443
|
+
#
|
1444
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1445
|
+
# request = Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesRequest.new
|
1446
|
+
#
|
1447
|
+
# # Call the batch_import_model_evaluation_slices method.
|
1448
|
+
# result = client.batch_import_model_evaluation_slices request
|
1449
|
+
#
|
1450
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesResponse.
|
1451
|
+
# p result
|
1452
|
+
#
|
1453
|
+
def batch_import_model_evaluation_slices request, options = nil
|
1454
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1455
|
+
|
1456
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::BatchImportModelEvaluationSlicesRequest
|
1457
|
+
|
1458
|
+
# Converts hash and nil to an options object
|
1459
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1460
|
+
|
1461
|
+
# Customize the options with defaults
|
1462
|
+
call_metadata = @config.rpcs.batch_import_model_evaluation_slices.metadata.to_h
|
1463
|
+
|
1464
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1465
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1466
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1467
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
1468
|
+
transports_version_send: [:rest]
|
1469
|
+
|
1470
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1471
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1472
|
+
|
1473
|
+
options.apply_defaults timeout: @config.rpcs.batch_import_model_evaluation_slices.timeout,
|
1474
|
+
metadata: call_metadata,
|
1475
|
+
retry_policy: @config.rpcs.batch_import_model_evaluation_slices.retry_policy
|
1476
|
+
|
1477
|
+
options.apply_defaults timeout: @config.timeout,
|
1478
|
+
metadata: @config.metadata,
|
1479
|
+
retry_policy: @config.retry_policy
|
1480
|
+
|
1481
|
+
@model_service_stub.batch_import_model_evaluation_slices request, options do |result, operation|
|
1482
|
+
yield result, operation if block_given?
|
1483
|
+
return result
|
1484
|
+
end
|
1485
|
+
rescue ::Gapic::Rest::Error => e
|
1486
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1487
|
+
end
|
1488
|
+
|
1489
|
+
##
|
1490
|
+
# Imports a list of externally generated EvaluatedAnnotations.
|
1491
|
+
#
|
1492
|
+
# @overload batch_import_evaluated_annotations(request, options = nil)
|
1493
|
+
# Pass arguments to `batch_import_evaluated_annotations` via a request object, either of type
|
1494
|
+
# {::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsRequest} or an equivalent Hash.
|
1495
|
+
#
|
1496
|
+
# @param request [::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsRequest, ::Hash]
|
1497
|
+
# A request object representing the call parameters. Required. To specify no
|
1498
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1499
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1500
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1501
|
+
#
|
1502
|
+
# @overload batch_import_evaluated_annotations(parent: nil, evaluated_annotations: nil)
|
1503
|
+
# Pass arguments to `batch_import_evaluated_annotations` via keyword arguments. Note that at
|
1504
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1505
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1506
|
+
#
|
1507
|
+
# @param parent [::String]
|
1508
|
+
# Required. The name of the parent ModelEvaluationSlice resource.
|
1509
|
+
# Format:
|
1510
|
+
# `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
|
1511
|
+
# @param evaluated_annotations [::Array<::Google::Cloud::AIPlatform::V1::EvaluatedAnnotation, ::Hash>]
|
1512
|
+
# Required. Evaluated annotations resource to be imported.
|
1513
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1514
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse]
|
1515
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1516
|
+
#
|
1517
|
+
# @return [::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse]
|
1518
|
+
#
|
1519
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1520
|
+
#
|
1521
|
+
# @example Basic example
|
1522
|
+
# require "google/cloud/ai_platform/v1"
|
1523
|
+
#
|
1524
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1525
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
1526
|
+
#
|
1527
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1528
|
+
# request = Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsRequest.new
|
1529
|
+
#
|
1530
|
+
# # Call the batch_import_evaluated_annotations method.
|
1531
|
+
# result = client.batch_import_evaluated_annotations request
|
1532
|
+
#
|
1533
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsResponse.
|
1534
|
+
# p result
|
1535
|
+
#
|
1536
|
+
def batch_import_evaluated_annotations request, options = nil
|
1537
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1538
|
+
|
1539
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::BatchImportEvaluatedAnnotationsRequest
|
1540
|
+
|
1541
|
+
# Converts hash and nil to an options object
|
1542
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1543
|
+
|
1544
|
+
# Customize the options with defaults
|
1545
|
+
call_metadata = @config.rpcs.batch_import_evaluated_annotations.metadata.to_h
|
1546
|
+
|
1547
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1548
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1549
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1550
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
1551
|
+
transports_version_send: [:rest]
|
1552
|
+
|
1553
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1554
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1555
|
+
|
1556
|
+
options.apply_defaults timeout: @config.rpcs.batch_import_evaluated_annotations.timeout,
|
1557
|
+
metadata: call_metadata,
|
1558
|
+
retry_policy: @config.rpcs.batch_import_evaluated_annotations.retry_policy
|
1559
|
+
|
1560
|
+
options.apply_defaults timeout: @config.timeout,
|
1561
|
+
metadata: @config.metadata,
|
1562
|
+
retry_policy: @config.retry_policy
|
1563
|
+
|
1564
|
+
@model_service_stub.batch_import_evaluated_annotations request, options do |result, operation|
|
1565
|
+
yield result, operation if block_given?
|
1566
|
+
return result
|
1567
|
+
end
|
1568
|
+
rescue ::Gapic::Rest::Error => e
|
1569
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1570
|
+
end
|
1571
|
+
|
1572
|
+
##
|
1573
|
+
# Gets a ModelEvaluation.
|
1574
|
+
#
|
1575
|
+
# @overload get_model_evaluation(request, options = nil)
|
1576
|
+
# Pass arguments to `get_model_evaluation` via a request object, either of type
|
1577
|
+
# {::Google::Cloud::AIPlatform::V1::GetModelEvaluationRequest} or an equivalent Hash.
|
1578
|
+
#
|
1579
|
+
# @param request [::Google::Cloud::AIPlatform::V1::GetModelEvaluationRequest, ::Hash]
|
1580
|
+
# A request object representing the call parameters. Required. To specify no
|
1581
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1582
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1583
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1584
|
+
#
|
1585
|
+
# @overload get_model_evaluation(name: nil)
|
1586
|
+
# Pass arguments to `get_model_evaluation` via keyword arguments. Note that at
|
1587
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1588
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1589
|
+
#
|
1590
|
+
# @param name [::String]
|
1591
|
+
# Required. The name of the ModelEvaluation resource.
|
1592
|
+
# Format:
|
1593
|
+
# `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
|
1594
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1595
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::ModelEvaluation]
|
1596
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1597
|
+
#
|
1598
|
+
# @return [::Google::Cloud::AIPlatform::V1::ModelEvaluation]
|
1599
|
+
#
|
1600
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1601
|
+
#
|
1602
|
+
# @example Basic example
|
1603
|
+
# require "google/cloud/ai_platform/v1"
|
1604
|
+
#
|
1605
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1606
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
1607
|
+
#
|
1608
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1609
|
+
# request = Google::Cloud::AIPlatform::V1::GetModelEvaluationRequest.new
|
1610
|
+
#
|
1611
|
+
# # Call the get_model_evaluation method.
|
1612
|
+
# result = client.get_model_evaluation request
|
1613
|
+
#
|
1614
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::ModelEvaluation.
|
1615
|
+
# p result
|
1616
|
+
#
|
1617
|
+
def get_model_evaluation request, options = nil
|
1618
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1619
|
+
|
1620
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetModelEvaluationRequest
|
1621
|
+
|
1622
|
+
# Converts hash and nil to an options object
|
1623
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1624
|
+
|
1625
|
+
# Customize the options with defaults
|
1626
|
+
call_metadata = @config.rpcs.get_model_evaluation.metadata.to_h
|
1627
|
+
|
1628
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1629
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1630
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1631
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
1632
|
+
transports_version_send: [:rest]
|
1633
|
+
|
1634
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1635
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1636
|
+
|
1637
|
+
options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout,
|
1638
|
+
metadata: call_metadata,
|
1639
|
+
retry_policy: @config.rpcs.get_model_evaluation.retry_policy
|
1640
|
+
|
1641
|
+
options.apply_defaults timeout: @config.timeout,
|
1642
|
+
metadata: @config.metadata,
|
1643
|
+
retry_policy: @config.retry_policy
|
1644
|
+
|
1645
|
+
@model_service_stub.get_model_evaluation request, options do |result, operation|
|
1646
|
+
yield result, operation if block_given?
|
1647
|
+
return result
|
1648
|
+
end
|
1649
|
+
rescue ::Gapic::Rest::Error => e
|
1650
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1651
|
+
end
|
1652
|
+
|
1653
|
+
##
|
1654
|
+
# Lists ModelEvaluations in a Model.
|
1655
|
+
#
|
1656
|
+
# @overload list_model_evaluations(request, options = nil)
|
1657
|
+
# Pass arguments to `list_model_evaluations` via a request object, either of type
|
1658
|
+
# {::Google::Cloud::AIPlatform::V1::ListModelEvaluationsRequest} or an equivalent Hash.
|
1659
|
+
#
|
1660
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ListModelEvaluationsRequest, ::Hash]
|
1661
|
+
# A request object representing the call parameters. Required. To specify no
|
1662
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1663
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1664
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1665
|
+
#
|
1666
|
+
# @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil)
|
1667
|
+
# Pass arguments to `list_model_evaluations` via keyword arguments. Note that at
|
1668
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1669
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1670
|
+
#
|
1671
|
+
# @param parent [::String]
|
1672
|
+
# Required. The resource name of the Model to list the ModelEvaluations from.
|
1673
|
+
# Format: `projects/{project}/locations/{location}/models/{model}`
|
1674
|
+
# @param filter [::String]
|
1675
|
+
# The standard list filter.
|
1676
|
+
# @param page_size [::Integer]
|
1677
|
+
# The standard list page size.
|
1678
|
+
# @param page_token [::String]
|
1679
|
+
# The standard list page token.
|
1680
|
+
# Typically obtained via
|
1681
|
+
# {::Google::Cloud::AIPlatform::V1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token}
|
1682
|
+
# of the previous
|
1683
|
+
# {::Google::Cloud::AIPlatform::V1::ModelService::Rest::Client#list_model_evaluations ModelService.ListModelEvaluations}
|
1684
|
+
# call.
|
1685
|
+
# @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1686
|
+
# Mask specifying which fields to read.
|
1687
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1688
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluation>]
|
1689
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1690
|
+
#
|
1691
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluation>]
|
1692
|
+
#
|
1693
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1694
|
+
#
|
1695
|
+
# @example Basic example
|
1696
|
+
# require "google/cloud/ai_platform/v1"
|
1697
|
+
#
|
1698
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1699
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
1700
|
+
#
|
1701
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1702
|
+
# request = Google::Cloud::AIPlatform::V1::ListModelEvaluationsRequest.new
|
1703
|
+
#
|
1704
|
+
# # Call the list_model_evaluations method.
|
1705
|
+
# result = client.list_model_evaluations request
|
1706
|
+
#
|
1707
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1708
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1709
|
+
# result.each do |item|
|
1710
|
+
# # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelEvaluation.
|
1711
|
+
# p item
|
1712
|
+
# end
|
1713
|
+
#
|
1714
|
+
def list_model_evaluations request, options = nil
|
1715
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1716
|
+
|
1717
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListModelEvaluationsRequest
|
1718
|
+
|
1719
|
+
# Converts hash and nil to an options object
|
1720
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1721
|
+
|
1722
|
+
# Customize the options with defaults
|
1723
|
+
call_metadata = @config.rpcs.list_model_evaluations.metadata.to_h
|
1724
|
+
|
1725
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1726
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1727
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1728
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
1729
|
+
transports_version_send: [:rest]
|
1730
|
+
|
1731
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1732
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1733
|
+
|
1734
|
+
options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout,
|
1735
|
+
metadata: call_metadata,
|
1736
|
+
retry_policy: @config.rpcs.list_model_evaluations.retry_policy
|
1737
|
+
|
1738
|
+
options.apply_defaults timeout: @config.timeout,
|
1739
|
+
metadata: @config.metadata,
|
1740
|
+
retry_policy: @config.retry_policy
|
1741
|
+
|
1742
|
+
@model_service_stub.list_model_evaluations request, options do |result, operation|
|
1743
|
+
result = ::Gapic::Rest::PagedEnumerable.new @model_service_stub, :list_model_evaluations, "model_evaluations", request, result, options
|
1744
|
+
yield result, operation if block_given?
|
1745
|
+
return result
|
1746
|
+
end
|
1747
|
+
rescue ::Gapic::Rest::Error => e
|
1748
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1749
|
+
end
|
1750
|
+
|
1751
|
+
##
|
1752
|
+
# Gets a ModelEvaluationSlice.
|
1753
|
+
#
|
1754
|
+
# @overload get_model_evaluation_slice(request, options = nil)
|
1755
|
+
# Pass arguments to `get_model_evaluation_slice` via a request object, either of type
|
1756
|
+
# {::Google::Cloud::AIPlatform::V1::GetModelEvaluationSliceRequest} or an equivalent Hash.
|
1757
|
+
#
|
1758
|
+
# @param request [::Google::Cloud::AIPlatform::V1::GetModelEvaluationSliceRequest, ::Hash]
|
1759
|
+
# A request object representing the call parameters. Required. To specify no
|
1760
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1761
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1762
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1763
|
+
#
|
1764
|
+
# @overload get_model_evaluation_slice(name: nil)
|
1765
|
+
# Pass arguments to `get_model_evaluation_slice` via keyword arguments. Note that at
|
1766
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1767
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1768
|
+
#
|
1769
|
+
# @param name [::String]
|
1770
|
+
# Required. The name of the ModelEvaluationSlice resource.
|
1771
|
+
# Format:
|
1772
|
+
# `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
|
1773
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1774
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice]
|
1775
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1776
|
+
#
|
1777
|
+
# @return [::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice]
|
1778
|
+
#
|
1779
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1780
|
+
#
|
1781
|
+
# @example Basic example
|
1782
|
+
# require "google/cloud/ai_platform/v1"
|
1783
|
+
#
|
1784
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1785
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
1786
|
+
#
|
1787
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1788
|
+
# request = Google::Cloud::AIPlatform::V1::GetModelEvaluationSliceRequest.new
|
1789
|
+
#
|
1790
|
+
# # Call the get_model_evaluation_slice method.
|
1791
|
+
# result = client.get_model_evaluation_slice request
|
1792
|
+
#
|
1793
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::ModelEvaluationSlice.
|
1794
|
+
# p result
|
1795
|
+
#
|
1796
|
+
def get_model_evaluation_slice request, options = nil
|
1797
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1798
|
+
|
1799
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetModelEvaluationSliceRequest
|
1800
|
+
|
1801
|
+
# Converts hash and nil to an options object
|
1802
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1803
|
+
|
1804
|
+
# Customize the options with defaults
|
1805
|
+
call_metadata = @config.rpcs.get_model_evaluation_slice.metadata.to_h
|
1806
|
+
|
1807
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1808
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1809
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1810
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
1811
|
+
transports_version_send: [:rest]
|
1812
|
+
|
1813
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1814
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1815
|
+
|
1816
|
+
options.apply_defaults timeout: @config.rpcs.get_model_evaluation_slice.timeout,
|
1817
|
+
metadata: call_metadata,
|
1818
|
+
retry_policy: @config.rpcs.get_model_evaluation_slice.retry_policy
|
1819
|
+
|
1820
|
+
options.apply_defaults timeout: @config.timeout,
|
1821
|
+
metadata: @config.metadata,
|
1822
|
+
retry_policy: @config.retry_policy
|
1823
|
+
|
1824
|
+
@model_service_stub.get_model_evaluation_slice request, options do |result, operation|
|
1825
|
+
yield result, operation if block_given?
|
1826
|
+
return result
|
1827
|
+
end
|
1828
|
+
rescue ::Gapic::Rest::Error => e
|
1829
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1830
|
+
end
|
1831
|
+
|
1832
|
+
##
|
1833
|
+
# Lists ModelEvaluationSlices in a ModelEvaluation.
|
1834
|
+
#
|
1835
|
+
# @overload list_model_evaluation_slices(request, options = nil)
|
1836
|
+
# Pass arguments to `list_model_evaluation_slices` via a request object, either of type
|
1837
|
+
# {::Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesRequest} or an equivalent Hash.
|
1838
|
+
#
|
1839
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesRequest, ::Hash]
|
1840
|
+
# A request object representing the call parameters. Required. To specify no
|
1841
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1842
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1843
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1844
|
+
#
|
1845
|
+
# @overload list_model_evaluation_slices(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil)
|
1846
|
+
# Pass arguments to `list_model_evaluation_slices` via keyword arguments. Note that at
|
1847
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1848
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1849
|
+
#
|
1850
|
+
# @param parent [::String]
|
1851
|
+
# Required. The resource name of the ModelEvaluation to list the
|
1852
|
+
# ModelEvaluationSlices from. Format:
|
1853
|
+
# `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
|
1854
|
+
# @param filter [::String]
|
1855
|
+
# The standard list filter.
|
1856
|
+
#
|
1857
|
+
# * `slice.dimension` - for =.
|
1858
|
+
# @param page_size [::Integer]
|
1859
|
+
# The standard list page size.
|
1860
|
+
# @param page_token [::String]
|
1861
|
+
# The standard list page token.
|
1862
|
+
# Typically obtained via
|
1863
|
+
# {::Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesResponse#next_page_token ListModelEvaluationSlicesResponse.next_page_token}
|
1864
|
+
# of the previous
|
1865
|
+
# {::Google::Cloud::AIPlatform::V1::ModelService::Rest::Client#list_model_evaluation_slices ModelService.ListModelEvaluationSlices}
|
1866
|
+
# call.
|
1867
|
+
# @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1868
|
+
# Mask specifying which fields to read.
|
1869
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1870
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice>]
|
1871
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1872
|
+
#
|
1873
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice>]
|
1874
|
+
#
|
1875
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1876
|
+
#
|
1877
|
+
# @example Basic example
|
1878
|
+
# require "google/cloud/ai_platform/v1"
|
1879
|
+
#
|
1880
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1881
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new
|
1882
|
+
#
|
1883
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1884
|
+
# request = Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesRequest.new
|
1885
|
+
#
|
1886
|
+
# # Call the list_model_evaluation_slices method.
|
1887
|
+
# result = client.list_model_evaluation_slices request
|
1888
|
+
#
|
1889
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1890
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1891
|
+
# result.each do |item|
|
1892
|
+
# # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice.
|
1893
|
+
# p item
|
1894
|
+
# end
|
1895
|
+
#
|
1896
|
+
def list_model_evaluation_slices request, options = nil
|
1897
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1898
|
+
|
1899
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesRequest
|
1900
|
+
|
1901
|
+
# Converts hash and nil to an options object
|
1902
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1903
|
+
|
1904
|
+
# Customize the options with defaults
|
1905
|
+
call_metadata = @config.rpcs.list_model_evaluation_slices.metadata.to_h
|
1906
|
+
|
1907
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1908
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1909
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1910
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
1911
|
+
transports_version_send: [:rest]
|
1912
|
+
|
1913
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1914
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1915
|
+
|
1916
|
+
options.apply_defaults timeout: @config.rpcs.list_model_evaluation_slices.timeout,
|
1917
|
+
metadata: call_metadata,
|
1918
|
+
retry_policy: @config.rpcs.list_model_evaluation_slices.retry_policy
|
1919
|
+
|
1920
|
+
options.apply_defaults timeout: @config.timeout,
|
1921
|
+
metadata: @config.metadata,
|
1922
|
+
retry_policy: @config.retry_policy
|
1923
|
+
|
1924
|
+
@model_service_stub.list_model_evaluation_slices request, options do |result, operation|
|
1925
|
+
result = ::Gapic::Rest::PagedEnumerable.new @model_service_stub, :list_model_evaluation_slices, "model_evaluation_slices", request, result, options
|
1926
|
+
yield result, operation if block_given?
|
1927
|
+
return result
|
1928
|
+
end
|
1929
|
+
rescue ::Gapic::Rest::Error => e
|
1930
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1931
|
+
end
|
1932
|
+
|
1933
|
+
##
|
1934
|
+
# Configuration class for the ModelService REST API.
|
1935
|
+
#
|
1936
|
+
# This class represents the configuration for ModelService REST,
|
1937
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1938
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1939
|
+
# applied individually to specific RPCs. See
|
1940
|
+
# {::Google::Cloud::AIPlatform::V1::ModelService::Rest::Client::Configuration::Rpcs}
|
1941
|
+
# for a list of RPCs that can be configured independently.
|
1942
|
+
#
|
1943
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1944
|
+
# on construction.
|
1945
|
+
#
|
1946
|
+
# @example
|
1947
|
+
#
|
1948
|
+
# # Modify the global config, setting the timeout for
|
1949
|
+
# # upload_model to 20 seconds,
|
1950
|
+
# # and all remaining timeouts to 10 seconds.
|
1951
|
+
# ::Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.configure do |config|
|
1952
|
+
# config.timeout = 10.0
|
1953
|
+
# config.rpcs.upload_model.timeout = 20.0
|
1954
|
+
# end
|
1955
|
+
#
|
1956
|
+
# # Apply the above configuration only to a new client.
|
1957
|
+
# client = ::Google::Cloud::AIPlatform::V1::ModelService::Rest::Client.new do |config|
|
1958
|
+
# config.timeout = 10.0
|
1959
|
+
# config.rpcs.upload_model.timeout = 20.0
|
1960
|
+
# end
|
1961
|
+
#
|
1962
|
+
# @!attribute [rw] endpoint
|
1963
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
1964
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
1965
|
+
# @return [::String,nil]
|
1966
|
+
# @!attribute [rw] credentials
|
1967
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1968
|
+
# * (`String`) The path to a service account key file in JSON format
|
1969
|
+
# * (`Hash`) A service account key as a Hash
|
1970
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1971
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1972
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1973
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1974
|
+
# * (`nil`) indicating no credentials
|
1975
|
+
# @return [::Object]
|
1976
|
+
# @!attribute [rw] scope
|
1977
|
+
# The OAuth scopes
|
1978
|
+
# @return [::Array<::String>]
|
1979
|
+
# @!attribute [rw] lib_name
|
1980
|
+
# The library name as recorded in instrumentation and logging
|
1981
|
+
# @return [::String]
|
1982
|
+
# @!attribute [rw] lib_version
|
1983
|
+
# The library version as recorded in instrumentation and logging
|
1984
|
+
# @return [::String]
|
1985
|
+
# @!attribute [rw] timeout
|
1986
|
+
# The call timeout in seconds.
|
1987
|
+
# @return [::Numeric]
|
1988
|
+
# @!attribute [rw] metadata
|
1989
|
+
# Additional headers to be sent with the call.
|
1990
|
+
# @return [::Hash{::Symbol=>::String}]
|
1991
|
+
# @!attribute [rw] retry_policy
|
1992
|
+
# The retry policy. The value is a hash with the following keys:
|
1993
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1994
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1995
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1996
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1997
|
+
# trigger a retry.
|
1998
|
+
# @return [::Hash]
|
1999
|
+
# @!attribute [rw] quota_project
|
2000
|
+
# A separate project against which to charge quota.
|
2001
|
+
# @return [::String]
|
2002
|
+
# @!attribute [rw] universe_domain
|
2003
|
+
# The universe domain within which to make requests. This determines the
|
2004
|
+
# default endpoint URL. The default value of nil uses the environment
|
2005
|
+
# universe (usually the default "googleapis.com" universe).
|
2006
|
+
# @return [::String,nil]
|
2007
|
+
#
|
2008
|
+
class Configuration
|
2009
|
+
extend ::Gapic::Config
|
2010
|
+
|
2011
|
+
# @private
|
2012
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
2013
|
+
DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
|
2014
|
+
|
2015
|
+
config_attr :endpoint, nil, ::String, nil
|
2016
|
+
config_attr :credentials, nil do |value|
|
2017
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2018
|
+
allowed.any? { |klass| klass === value }
|
2019
|
+
end
|
2020
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
2021
|
+
config_attr :lib_name, nil, ::String, nil
|
2022
|
+
config_attr :lib_version, nil, ::String, nil
|
2023
|
+
config_attr :timeout, nil, ::Numeric, nil
|
2024
|
+
config_attr :metadata, nil, ::Hash, nil
|
2025
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2026
|
+
config_attr :quota_project, nil, ::String, nil
|
2027
|
+
config_attr :universe_domain, nil, ::String, nil
|
2028
|
+
|
2029
|
+
# @private
|
2030
|
+
# Overrides for http bindings for the RPCs of this service
|
2031
|
+
# are only used when this service is used as mixin, and only
|
2032
|
+
# by the host service.
|
2033
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
2034
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
2035
|
+
|
2036
|
+
# @private
|
2037
|
+
def initialize parent_config = nil
|
2038
|
+
@parent_config = parent_config unless parent_config.nil?
|
2039
|
+
|
2040
|
+
yield self if block_given?
|
2041
|
+
end
|
2042
|
+
|
2043
|
+
##
|
2044
|
+
# Configurations for individual RPCs
|
2045
|
+
# @return [Rpcs]
|
2046
|
+
#
|
2047
|
+
def rpcs
|
2048
|
+
@rpcs ||= begin
|
2049
|
+
parent_rpcs = nil
|
2050
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
2051
|
+
Rpcs.new parent_rpcs
|
2052
|
+
end
|
2053
|
+
end
|
2054
|
+
|
2055
|
+
##
|
2056
|
+
# Configuration RPC class for the ModelService API.
|
2057
|
+
#
|
2058
|
+
# Includes fields providing the configuration for each RPC in this service.
|
2059
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
2060
|
+
# the following configuration fields:
|
2061
|
+
#
|
2062
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
2063
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
2064
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
2065
|
+
# include the following keys:
|
2066
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
2067
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
2068
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
2069
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
2070
|
+
# trigger a retry.
|
2071
|
+
#
|
2072
|
+
class Rpcs
|
2073
|
+
##
|
2074
|
+
# RPC-specific configuration for `upload_model`
|
2075
|
+
# @return [::Gapic::Config::Method]
|
2076
|
+
#
|
2077
|
+
attr_reader :upload_model
|
2078
|
+
##
|
2079
|
+
# RPC-specific configuration for `get_model`
|
2080
|
+
# @return [::Gapic::Config::Method]
|
2081
|
+
#
|
2082
|
+
attr_reader :get_model
|
2083
|
+
##
|
2084
|
+
# RPC-specific configuration for `list_models`
|
2085
|
+
# @return [::Gapic::Config::Method]
|
2086
|
+
#
|
2087
|
+
attr_reader :list_models
|
2088
|
+
##
|
2089
|
+
# RPC-specific configuration for `list_model_versions`
|
2090
|
+
# @return [::Gapic::Config::Method]
|
2091
|
+
#
|
2092
|
+
attr_reader :list_model_versions
|
2093
|
+
##
|
2094
|
+
# RPC-specific configuration for `update_model`
|
2095
|
+
# @return [::Gapic::Config::Method]
|
2096
|
+
#
|
2097
|
+
attr_reader :update_model
|
2098
|
+
##
|
2099
|
+
# RPC-specific configuration for `update_explanation_dataset`
|
2100
|
+
# @return [::Gapic::Config::Method]
|
2101
|
+
#
|
2102
|
+
attr_reader :update_explanation_dataset
|
2103
|
+
##
|
2104
|
+
# RPC-specific configuration for `delete_model`
|
2105
|
+
# @return [::Gapic::Config::Method]
|
2106
|
+
#
|
2107
|
+
attr_reader :delete_model
|
2108
|
+
##
|
2109
|
+
# RPC-specific configuration for `delete_model_version`
|
2110
|
+
# @return [::Gapic::Config::Method]
|
2111
|
+
#
|
2112
|
+
attr_reader :delete_model_version
|
2113
|
+
##
|
2114
|
+
# RPC-specific configuration for `merge_version_aliases`
|
2115
|
+
# @return [::Gapic::Config::Method]
|
2116
|
+
#
|
2117
|
+
attr_reader :merge_version_aliases
|
2118
|
+
##
|
2119
|
+
# RPC-specific configuration for `export_model`
|
2120
|
+
# @return [::Gapic::Config::Method]
|
2121
|
+
#
|
2122
|
+
attr_reader :export_model
|
2123
|
+
##
|
2124
|
+
# RPC-specific configuration for `copy_model`
|
2125
|
+
# @return [::Gapic::Config::Method]
|
2126
|
+
#
|
2127
|
+
attr_reader :copy_model
|
2128
|
+
##
|
2129
|
+
# RPC-specific configuration for `import_model_evaluation`
|
2130
|
+
# @return [::Gapic::Config::Method]
|
2131
|
+
#
|
2132
|
+
attr_reader :import_model_evaluation
|
2133
|
+
##
|
2134
|
+
# RPC-specific configuration for `batch_import_model_evaluation_slices`
|
2135
|
+
# @return [::Gapic::Config::Method]
|
2136
|
+
#
|
2137
|
+
attr_reader :batch_import_model_evaluation_slices
|
2138
|
+
##
|
2139
|
+
# RPC-specific configuration for `batch_import_evaluated_annotations`
|
2140
|
+
# @return [::Gapic::Config::Method]
|
2141
|
+
#
|
2142
|
+
attr_reader :batch_import_evaluated_annotations
|
2143
|
+
##
|
2144
|
+
# RPC-specific configuration for `get_model_evaluation`
|
2145
|
+
# @return [::Gapic::Config::Method]
|
2146
|
+
#
|
2147
|
+
attr_reader :get_model_evaluation
|
2148
|
+
##
|
2149
|
+
# RPC-specific configuration for `list_model_evaluations`
|
2150
|
+
# @return [::Gapic::Config::Method]
|
2151
|
+
#
|
2152
|
+
attr_reader :list_model_evaluations
|
2153
|
+
##
|
2154
|
+
# RPC-specific configuration for `get_model_evaluation_slice`
|
2155
|
+
# @return [::Gapic::Config::Method]
|
2156
|
+
#
|
2157
|
+
attr_reader :get_model_evaluation_slice
|
2158
|
+
##
|
2159
|
+
# RPC-specific configuration for `list_model_evaluation_slices`
|
2160
|
+
# @return [::Gapic::Config::Method]
|
2161
|
+
#
|
2162
|
+
attr_reader :list_model_evaluation_slices
|
2163
|
+
|
2164
|
+
# @private
|
2165
|
+
def initialize parent_rpcs = nil
|
2166
|
+
upload_model_config = parent_rpcs.upload_model if parent_rpcs.respond_to? :upload_model
|
2167
|
+
@upload_model = ::Gapic::Config::Method.new upload_model_config
|
2168
|
+
get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model
|
2169
|
+
@get_model = ::Gapic::Config::Method.new get_model_config
|
2170
|
+
list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models
|
2171
|
+
@list_models = ::Gapic::Config::Method.new list_models_config
|
2172
|
+
list_model_versions_config = parent_rpcs.list_model_versions if parent_rpcs.respond_to? :list_model_versions
|
2173
|
+
@list_model_versions = ::Gapic::Config::Method.new list_model_versions_config
|
2174
|
+
update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model
|
2175
|
+
@update_model = ::Gapic::Config::Method.new update_model_config
|
2176
|
+
update_explanation_dataset_config = parent_rpcs.update_explanation_dataset if parent_rpcs.respond_to? :update_explanation_dataset
|
2177
|
+
@update_explanation_dataset = ::Gapic::Config::Method.new update_explanation_dataset_config
|
2178
|
+
delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model
|
2179
|
+
@delete_model = ::Gapic::Config::Method.new delete_model_config
|
2180
|
+
delete_model_version_config = parent_rpcs.delete_model_version if parent_rpcs.respond_to? :delete_model_version
|
2181
|
+
@delete_model_version = ::Gapic::Config::Method.new delete_model_version_config
|
2182
|
+
merge_version_aliases_config = parent_rpcs.merge_version_aliases if parent_rpcs.respond_to? :merge_version_aliases
|
2183
|
+
@merge_version_aliases = ::Gapic::Config::Method.new merge_version_aliases_config
|
2184
|
+
export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model
|
2185
|
+
@export_model = ::Gapic::Config::Method.new export_model_config
|
2186
|
+
copy_model_config = parent_rpcs.copy_model if parent_rpcs.respond_to? :copy_model
|
2187
|
+
@copy_model = ::Gapic::Config::Method.new copy_model_config
|
2188
|
+
import_model_evaluation_config = parent_rpcs.import_model_evaluation if parent_rpcs.respond_to? :import_model_evaluation
|
2189
|
+
@import_model_evaluation = ::Gapic::Config::Method.new import_model_evaluation_config
|
2190
|
+
batch_import_model_evaluation_slices_config = parent_rpcs.batch_import_model_evaluation_slices if parent_rpcs.respond_to? :batch_import_model_evaluation_slices
|
2191
|
+
@batch_import_model_evaluation_slices = ::Gapic::Config::Method.new batch_import_model_evaluation_slices_config
|
2192
|
+
batch_import_evaluated_annotations_config = parent_rpcs.batch_import_evaluated_annotations if parent_rpcs.respond_to? :batch_import_evaluated_annotations
|
2193
|
+
@batch_import_evaluated_annotations = ::Gapic::Config::Method.new batch_import_evaluated_annotations_config
|
2194
|
+
get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation
|
2195
|
+
@get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config
|
2196
|
+
list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations
|
2197
|
+
@list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config
|
2198
|
+
get_model_evaluation_slice_config = parent_rpcs.get_model_evaluation_slice if parent_rpcs.respond_to? :get_model_evaluation_slice
|
2199
|
+
@get_model_evaluation_slice = ::Gapic::Config::Method.new get_model_evaluation_slice_config
|
2200
|
+
list_model_evaluation_slices_config = parent_rpcs.list_model_evaluation_slices if parent_rpcs.respond_to? :list_model_evaluation_slices
|
2201
|
+
@list_model_evaluation_slices = ::Gapic::Config::Method.new list_model_evaluation_slices_config
|
2202
|
+
|
2203
|
+
yield self if block_given?
|
2204
|
+
end
|
2205
|
+
end
|
2206
|
+
end
|
2207
|
+
end
|
2208
|
+
end
|
2209
|
+
end
|
2210
|
+
end
|
2211
|
+
end
|
2212
|
+
end
|
2213
|
+
end
|