google-cloud-ai_platform-v1 0.39.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +138 -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 +2280 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/rest/operations.rb +3971 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/rest/service_stub.rb +1196 -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 +3971 -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 +19 -8
- 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 +3971 -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 +3971 -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 +3971 -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 +3971 -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 +11 -4
- 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 +6 -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 +3971 -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 +3971 -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/rest/client.rb +3841 -0
- data/lib/google/cloud/ai_platform/v1/job_service/rest/operations.rb +3971 -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 +3971 -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 +3971 -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 +3971 -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 +123 -10
- data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +13 -5
- data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +1503 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/rest/operations.rb +3971 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/rest/service_stub.rb +723 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service.rb +6 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +15 -6
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +13 -5
- 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 +3971 -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 +6 -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 +3971 -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 +37 -15
- data/lib/google/cloud/ai_platform/v1/prediction_service/credentials.rb +2 -1
- data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +1303 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service/rest/service_stub.rb +658 -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 +3971 -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 +3971 -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 +3971 -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 +3971 -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 +6 -1
- data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/content_pb.rb +4 -4
- data/lib/google/cloud/aiplatform/v1/dataset_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/dataset_service_pb.rb +3 -2
- data/lib/google/cloud/aiplatform/v1/dataset_service_services_pb.rb +2 -0
- data/lib/google/cloud/aiplatform/v1/dataset_version_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/deployment_resource_pool_pb.rb +3 -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_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/featurestore_online_service_pb.rb +3 -1
- data/lib/google/cloud/aiplatform/v1/index_pb.rb +2 -1
- data/lib/google/cloud/aiplatform/v1/index_service_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/match_service_pb.rb +2 -1
- data/lib/google/cloud/aiplatform/v1/metadata_store_pb.rb +2 -1
- data/lib/google/cloud/aiplatform/v1/notebook_runtime_pb.rb +3 -1
- data/lib/google/cloud/aiplatform/v1/notebook_service_pb.rb +2 -1
- data/lib/google/cloud/aiplatform/v1/notebook_service_services_pb.rb +2 -0
- data/lib/google/cloud/aiplatform/v1/persistent_resource_pb.rb +2 -1
- 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/tool_pb.rb +4 -1
- data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +3 -0
- data/proto_docs/google/cloud/aiplatform/v1/content.rb +26 -48
- data/proto_docs/google/cloud/aiplatform/v1/dataset.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/dataset_service.rb +17 -0
- data/proto_docs/google/cloud/aiplatform/v1/dataset_version.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/deployment_resource_pool.rb +23 -0
- data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +7 -0
- data/proto_docs/google/cloud/aiplatform/v1/feature.rb +3 -0
- data/proto_docs/google/cloud/aiplatform/v1/feature_group.rb +3 -3
- data/proto_docs/google/cloud/aiplatform/v1/feature_online_store.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/feature_registry_service.rb +1 -1
- data/proto_docs/google/cloud/aiplatform/v1/featurestore_online_service.rb +24 -0
- data/proto_docs/google/cloud/aiplatform/v1/index.rb +23 -3
- data/proto_docs/google/cloud/aiplatform/v1/index_service.rb +20 -2
- data/proto_docs/google/cloud/aiplatform/v1/match_service.rb +18 -1
- data/proto_docs/google/cloud/aiplatform/v1/metadata_store.rb +13 -0
- data/proto_docs/google/cloud/aiplatform/v1/model.rb +1 -1
- data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb +17 -2
- data/proto_docs/google/cloud/aiplatform/v1/notebook_service.rb +18 -0
- data/proto_docs/google/cloud/aiplatform/v1/persistent_resource.rb +63 -0
- data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/publisher_model.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/tool.rb +43 -5
- data/proto_docs/google/cloud/aiplatform/v1/tuning_job.rb +8 -7
- metadata +101 -2
|
@@ -0,0 +1,541 @@
|
|
|
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/match_service_pb"
|
|
21
|
+
require "google/cloud/ai_platform/v1/match_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 MatchService
|
|
30
|
+
module Rest
|
|
31
|
+
##
|
|
32
|
+
# REST client for the MatchService service.
|
|
33
|
+
#
|
|
34
|
+
# MatchService is a Google managed service for efficient vector similarity
|
|
35
|
+
# search at scale.
|
|
36
|
+
#
|
|
37
|
+
class Client
|
|
38
|
+
# @private
|
|
39
|
+
API_VERSION = ""
|
|
40
|
+
|
|
41
|
+
# @private
|
|
42
|
+
DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
|
|
43
|
+
|
|
44
|
+
include Paths
|
|
45
|
+
|
|
46
|
+
# @private
|
|
47
|
+
attr_reader :match_service_stub
|
|
48
|
+
|
|
49
|
+
##
|
|
50
|
+
# Configure the MatchService Client class.
|
|
51
|
+
#
|
|
52
|
+
# See {::Google::Cloud::AIPlatform::V1::MatchService::Rest::Client::Configuration}
|
|
53
|
+
# for a description of the configuration fields.
|
|
54
|
+
#
|
|
55
|
+
# @example
|
|
56
|
+
#
|
|
57
|
+
# # Modify the configuration for all MatchService clients
|
|
58
|
+
# ::Google::Cloud::AIPlatform::V1::MatchService::Rest::Client.configure do |config|
|
|
59
|
+
# config.timeout = 10.0
|
|
60
|
+
# end
|
|
61
|
+
#
|
|
62
|
+
# @yield [config] Configure the Client client.
|
|
63
|
+
# @yieldparam config [Client::Configuration]
|
|
64
|
+
#
|
|
65
|
+
# @return [Client::Configuration]
|
|
66
|
+
#
|
|
67
|
+
def self.configure
|
|
68
|
+
@configure ||= begin
|
|
69
|
+
namespace = ["Google", "Cloud", "AIPlatform", "V1"]
|
|
70
|
+
parent_config = while namespace.any?
|
|
71
|
+
parent_name = namespace.join "::"
|
|
72
|
+
parent_const = const_get parent_name
|
|
73
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
|
74
|
+
namespace.pop
|
|
75
|
+
end
|
|
76
|
+
default_config = Client::Configuration.new parent_config
|
|
77
|
+
|
|
78
|
+
default_config
|
|
79
|
+
end
|
|
80
|
+
yield @configure if block_given?
|
|
81
|
+
@configure
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
##
|
|
85
|
+
# Configure the MatchService Client instance.
|
|
86
|
+
#
|
|
87
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
|
88
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
|
89
|
+
# should be made on {Client.configure}.
|
|
90
|
+
#
|
|
91
|
+
# See {::Google::Cloud::AIPlatform::V1::MatchService::Rest::Client::Configuration}
|
|
92
|
+
# for a description of the configuration fields.
|
|
93
|
+
#
|
|
94
|
+
# @yield [config] Configure the Client client.
|
|
95
|
+
# @yieldparam config [Client::Configuration]
|
|
96
|
+
#
|
|
97
|
+
# @return [Client::Configuration]
|
|
98
|
+
#
|
|
99
|
+
def configure
|
|
100
|
+
yield @config if block_given?
|
|
101
|
+
@config
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
##
|
|
105
|
+
# The effective universe domain
|
|
106
|
+
#
|
|
107
|
+
# @return [String]
|
|
108
|
+
#
|
|
109
|
+
def universe_domain
|
|
110
|
+
@match_service_stub.universe_domain
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
##
|
|
114
|
+
# Create a new MatchService REST client object.
|
|
115
|
+
#
|
|
116
|
+
# @example
|
|
117
|
+
#
|
|
118
|
+
# # Create a client using the default configuration
|
|
119
|
+
# client = ::Google::Cloud::AIPlatform::V1::MatchService::Rest::Client.new
|
|
120
|
+
#
|
|
121
|
+
# # Create a client using a custom configuration
|
|
122
|
+
# client = ::Google::Cloud::AIPlatform::V1::MatchService::Rest::Client.new do |config|
|
|
123
|
+
# config.timeout = 10.0
|
|
124
|
+
# end
|
|
125
|
+
#
|
|
126
|
+
# @yield [config] Configure the MatchService client.
|
|
127
|
+
# @yieldparam config [Client::Configuration]
|
|
128
|
+
#
|
|
129
|
+
def initialize
|
|
130
|
+
# Create the configuration object
|
|
131
|
+
@config = Configuration.new Client.configure
|
|
132
|
+
|
|
133
|
+
# Yield the configuration if needed
|
|
134
|
+
yield @config if block_given?
|
|
135
|
+
|
|
136
|
+
# Create credentials
|
|
137
|
+
credentials = @config.credentials
|
|
138
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
139
|
+
# but only if the default endpoint does not have a region prefix.
|
|
140
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
141
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
142
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
143
|
+
credentials ||= Credentials.default scope: @config.scope,
|
|
144
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
|
145
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
146
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
@quota_project_id = @config.quota_project
|
|
150
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
151
|
+
|
|
152
|
+
@match_service_stub = ::Google::Cloud::AIPlatform::V1::MatchService::Rest::ServiceStub.new(
|
|
153
|
+
endpoint: @config.endpoint,
|
|
154
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
155
|
+
universe_domain: @config.universe_domain,
|
|
156
|
+
credentials: credentials
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
|
160
|
+
config.credentials = credentials
|
|
161
|
+
config.quota_project = @quota_project_id
|
|
162
|
+
config.endpoint = @match_service_stub.endpoint
|
|
163
|
+
config.universe_domain = @match_service_stub.universe_domain
|
|
164
|
+
config.bindings_override = @config.bindings_override
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
|
168
|
+
config.credentials = credentials
|
|
169
|
+
config.quota_project = @quota_project_id
|
|
170
|
+
config.endpoint = @match_service_stub.endpoint
|
|
171
|
+
config.universe_domain = @match_service_stub.universe_domain
|
|
172
|
+
config.bindings_override = @config.bindings_override
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
##
|
|
177
|
+
# Get the associated client for mix-in of the Locations.
|
|
178
|
+
#
|
|
179
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
|
180
|
+
#
|
|
181
|
+
attr_reader :location_client
|
|
182
|
+
|
|
183
|
+
##
|
|
184
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
|
185
|
+
#
|
|
186
|
+
# @return [Google::Iam::V1::IAMPolicy::Rest::Client]
|
|
187
|
+
#
|
|
188
|
+
attr_reader :iam_policy_client
|
|
189
|
+
|
|
190
|
+
# Service calls
|
|
191
|
+
|
|
192
|
+
##
|
|
193
|
+
# Finds the nearest neighbors of each vector within the request.
|
|
194
|
+
#
|
|
195
|
+
# @overload find_neighbors(request, options = nil)
|
|
196
|
+
# Pass arguments to `find_neighbors` via a request object, either of type
|
|
197
|
+
# {::Google::Cloud::AIPlatform::V1::FindNeighborsRequest} or an equivalent Hash.
|
|
198
|
+
#
|
|
199
|
+
# @param request [::Google::Cloud::AIPlatform::V1::FindNeighborsRequest, ::Hash]
|
|
200
|
+
# A request object representing the call parameters. Required. To specify no
|
|
201
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
202
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
203
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
204
|
+
#
|
|
205
|
+
# @overload find_neighbors(index_endpoint: nil, deployed_index_id: nil, queries: nil, return_full_datapoint: nil)
|
|
206
|
+
# Pass arguments to `find_neighbors` via keyword arguments. Note that at
|
|
207
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
208
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
209
|
+
#
|
|
210
|
+
# @param index_endpoint [::String]
|
|
211
|
+
# Required. The name of the index endpoint.
|
|
212
|
+
# Format:
|
|
213
|
+
# `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
|
|
214
|
+
# @param deployed_index_id [::String]
|
|
215
|
+
# The ID of the DeployedIndex that will serve the request. This request is
|
|
216
|
+
# sent to a specific IndexEndpoint, as per the IndexEndpoint.network. That
|
|
217
|
+
# IndexEndpoint also has IndexEndpoint.deployed_indexes, and each such index
|
|
218
|
+
# has a DeployedIndex.id field.
|
|
219
|
+
# The value of the field below must equal one of the DeployedIndex.id
|
|
220
|
+
# fields of the IndexEndpoint that is being called for this request.
|
|
221
|
+
# @param queries [::Array<::Google::Cloud::AIPlatform::V1::FindNeighborsRequest::Query, ::Hash>]
|
|
222
|
+
# The list of queries.
|
|
223
|
+
# @param return_full_datapoint [::Boolean]
|
|
224
|
+
# If set to true, the full datapoints (including all vector values and
|
|
225
|
+
# restricts) of the nearest neighbors are returned.
|
|
226
|
+
# Note that returning full datapoint will significantly increase the
|
|
227
|
+
# latency and cost of the query.
|
|
228
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
229
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::FindNeighborsResponse]
|
|
230
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
231
|
+
#
|
|
232
|
+
# @return [::Google::Cloud::AIPlatform::V1::FindNeighborsResponse]
|
|
233
|
+
#
|
|
234
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
235
|
+
#
|
|
236
|
+
# @example Basic example
|
|
237
|
+
# require "google/cloud/ai_platform/v1"
|
|
238
|
+
#
|
|
239
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
240
|
+
# client = Google::Cloud::AIPlatform::V1::MatchService::Rest::Client.new
|
|
241
|
+
#
|
|
242
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
243
|
+
# request = Google::Cloud::AIPlatform::V1::FindNeighborsRequest.new
|
|
244
|
+
#
|
|
245
|
+
# # Call the find_neighbors method.
|
|
246
|
+
# result = client.find_neighbors request
|
|
247
|
+
#
|
|
248
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::FindNeighborsResponse.
|
|
249
|
+
# p result
|
|
250
|
+
#
|
|
251
|
+
def find_neighbors request, options = nil
|
|
252
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
253
|
+
|
|
254
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::FindNeighborsRequest
|
|
255
|
+
|
|
256
|
+
# Converts hash and nil to an options object
|
|
257
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
258
|
+
|
|
259
|
+
# Customize the options with defaults
|
|
260
|
+
call_metadata = @config.rpcs.find_neighbors.metadata.to_h
|
|
261
|
+
|
|
262
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
263
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
264
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
265
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
|
266
|
+
transports_version_send: [:rest]
|
|
267
|
+
|
|
268
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
269
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
270
|
+
|
|
271
|
+
options.apply_defaults timeout: @config.rpcs.find_neighbors.timeout,
|
|
272
|
+
metadata: call_metadata,
|
|
273
|
+
retry_policy: @config.rpcs.find_neighbors.retry_policy
|
|
274
|
+
|
|
275
|
+
options.apply_defaults timeout: @config.timeout,
|
|
276
|
+
metadata: @config.metadata,
|
|
277
|
+
retry_policy: @config.retry_policy
|
|
278
|
+
|
|
279
|
+
@match_service_stub.find_neighbors request, options do |result, operation|
|
|
280
|
+
yield result, operation if block_given?
|
|
281
|
+
return result
|
|
282
|
+
end
|
|
283
|
+
rescue ::Gapic::Rest::Error => e
|
|
284
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
##
|
|
288
|
+
# Reads the datapoints/vectors of the given IDs.
|
|
289
|
+
# A maximum of 1000 datapoints can be retrieved in a batch.
|
|
290
|
+
#
|
|
291
|
+
# @overload read_index_datapoints(request, options = nil)
|
|
292
|
+
# Pass arguments to `read_index_datapoints` via a request object, either of type
|
|
293
|
+
# {::Google::Cloud::AIPlatform::V1::ReadIndexDatapointsRequest} or an equivalent Hash.
|
|
294
|
+
#
|
|
295
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ReadIndexDatapointsRequest, ::Hash]
|
|
296
|
+
# A request object representing the call parameters. Required. To specify no
|
|
297
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
298
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
299
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
300
|
+
#
|
|
301
|
+
# @overload read_index_datapoints(index_endpoint: nil, deployed_index_id: nil, ids: nil)
|
|
302
|
+
# Pass arguments to `read_index_datapoints` via keyword arguments. Note that at
|
|
303
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
304
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
305
|
+
#
|
|
306
|
+
# @param index_endpoint [::String]
|
|
307
|
+
# Required. The name of the index endpoint.
|
|
308
|
+
# Format:
|
|
309
|
+
# `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`
|
|
310
|
+
# @param deployed_index_id [::String]
|
|
311
|
+
# The ID of the DeployedIndex that will serve the request.
|
|
312
|
+
# @param ids [::Array<::String>]
|
|
313
|
+
# IDs of the datapoints to be searched for.
|
|
314
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
315
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::ReadIndexDatapointsResponse]
|
|
316
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
317
|
+
#
|
|
318
|
+
# @return [::Google::Cloud::AIPlatform::V1::ReadIndexDatapointsResponse]
|
|
319
|
+
#
|
|
320
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
321
|
+
#
|
|
322
|
+
# @example Basic example
|
|
323
|
+
# require "google/cloud/ai_platform/v1"
|
|
324
|
+
#
|
|
325
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
326
|
+
# client = Google::Cloud::AIPlatform::V1::MatchService::Rest::Client.new
|
|
327
|
+
#
|
|
328
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
329
|
+
# request = Google::Cloud::AIPlatform::V1::ReadIndexDatapointsRequest.new
|
|
330
|
+
#
|
|
331
|
+
# # Call the read_index_datapoints method.
|
|
332
|
+
# result = client.read_index_datapoints request
|
|
333
|
+
#
|
|
334
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::ReadIndexDatapointsResponse.
|
|
335
|
+
# p result
|
|
336
|
+
#
|
|
337
|
+
def read_index_datapoints request, options = nil
|
|
338
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
339
|
+
|
|
340
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ReadIndexDatapointsRequest
|
|
341
|
+
|
|
342
|
+
# Converts hash and nil to an options object
|
|
343
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
344
|
+
|
|
345
|
+
# Customize the options with defaults
|
|
346
|
+
call_metadata = @config.rpcs.read_index_datapoints.metadata.to_h
|
|
347
|
+
|
|
348
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
349
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
350
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
351
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
|
352
|
+
transports_version_send: [:rest]
|
|
353
|
+
|
|
354
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
355
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
356
|
+
|
|
357
|
+
options.apply_defaults timeout: @config.rpcs.read_index_datapoints.timeout,
|
|
358
|
+
metadata: call_metadata,
|
|
359
|
+
retry_policy: @config.rpcs.read_index_datapoints.retry_policy
|
|
360
|
+
|
|
361
|
+
options.apply_defaults timeout: @config.timeout,
|
|
362
|
+
metadata: @config.metadata,
|
|
363
|
+
retry_policy: @config.retry_policy
|
|
364
|
+
|
|
365
|
+
@match_service_stub.read_index_datapoints request, options do |result, operation|
|
|
366
|
+
yield result, operation if block_given?
|
|
367
|
+
return result
|
|
368
|
+
end
|
|
369
|
+
rescue ::Gapic::Rest::Error => e
|
|
370
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
##
|
|
374
|
+
# Configuration class for the MatchService REST API.
|
|
375
|
+
#
|
|
376
|
+
# This class represents the configuration for MatchService REST,
|
|
377
|
+
# providing control over timeouts, retry behavior, logging, transport
|
|
378
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
|
379
|
+
# applied individually to specific RPCs. See
|
|
380
|
+
# {::Google::Cloud::AIPlatform::V1::MatchService::Rest::Client::Configuration::Rpcs}
|
|
381
|
+
# for a list of RPCs that can be configured independently.
|
|
382
|
+
#
|
|
383
|
+
# Configuration can be applied globally to all clients, or to a single client
|
|
384
|
+
# on construction.
|
|
385
|
+
#
|
|
386
|
+
# @example
|
|
387
|
+
#
|
|
388
|
+
# # Modify the global config, setting the timeout for
|
|
389
|
+
# # find_neighbors to 20 seconds,
|
|
390
|
+
# # and all remaining timeouts to 10 seconds.
|
|
391
|
+
# ::Google::Cloud::AIPlatform::V1::MatchService::Rest::Client.configure do |config|
|
|
392
|
+
# config.timeout = 10.0
|
|
393
|
+
# config.rpcs.find_neighbors.timeout = 20.0
|
|
394
|
+
# end
|
|
395
|
+
#
|
|
396
|
+
# # Apply the above configuration only to a new client.
|
|
397
|
+
# client = ::Google::Cloud::AIPlatform::V1::MatchService::Rest::Client.new do |config|
|
|
398
|
+
# config.timeout = 10.0
|
|
399
|
+
# config.rpcs.find_neighbors.timeout = 20.0
|
|
400
|
+
# end
|
|
401
|
+
#
|
|
402
|
+
# @!attribute [rw] endpoint
|
|
403
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
404
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
405
|
+
# @return [::String,nil]
|
|
406
|
+
# @!attribute [rw] credentials
|
|
407
|
+
# Credentials to send with calls. You may provide any of the following types:
|
|
408
|
+
# * (`String`) The path to a service account key file in JSON format
|
|
409
|
+
# * (`Hash`) A service account key as a Hash
|
|
410
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
411
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
412
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
413
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
|
414
|
+
# * (`nil`) indicating no credentials
|
|
415
|
+
# @return [::Object]
|
|
416
|
+
# @!attribute [rw] scope
|
|
417
|
+
# The OAuth scopes
|
|
418
|
+
# @return [::Array<::String>]
|
|
419
|
+
# @!attribute [rw] lib_name
|
|
420
|
+
# The library name as recorded in instrumentation and logging
|
|
421
|
+
# @return [::String]
|
|
422
|
+
# @!attribute [rw] lib_version
|
|
423
|
+
# The library version as recorded in instrumentation and logging
|
|
424
|
+
# @return [::String]
|
|
425
|
+
# @!attribute [rw] timeout
|
|
426
|
+
# The call timeout in seconds.
|
|
427
|
+
# @return [::Numeric]
|
|
428
|
+
# @!attribute [rw] metadata
|
|
429
|
+
# Additional headers to be sent with the call.
|
|
430
|
+
# @return [::Hash{::Symbol=>::String}]
|
|
431
|
+
# @!attribute [rw] retry_policy
|
|
432
|
+
# The retry policy. The value is a hash with the following keys:
|
|
433
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
434
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
435
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
436
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
437
|
+
# trigger a retry.
|
|
438
|
+
# @return [::Hash]
|
|
439
|
+
# @!attribute [rw] quota_project
|
|
440
|
+
# A separate project against which to charge quota.
|
|
441
|
+
# @return [::String]
|
|
442
|
+
# @!attribute [rw] universe_domain
|
|
443
|
+
# The universe domain within which to make requests. This determines the
|
|
444
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
445
|
+
# universe (usually the default "googleapis.com" universe).
|
|
446
|
+
# @return [::String,nil]
|
|
447
|
+
#
|
|
448
|
+
class Configuration
|
|
449
|
+
extend ::Gapic::Config
|
|
450
|
+
|
|
451
|
+
# @private
|
|
452
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
453
|
+
DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
|
|
454
|
+
|
|
455
|
+
config_attr :endpoint, nil, ::String, nil
|
|
456
|
+
config_attr :credentials, nil do |value|
|
|
457
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
458
|
+
allowed.any? { |klass| klass === value }
|
|
459
|
+
end
|
|
460
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
|
461
|
+
config_attr :lib_name, nil, ::String, nil
|
|
462
|
+
config_attr :lib_version, nil, ::String, nil
|
|
463
|
+
config_attr :timeout, nil, ::Numeric, nil
|
|
464
|
+
config_attr :metadata, nil, ::Hash, nil
|
|
465
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
466
|
+
config_attr :quota_project, nil, ::String, nil
|
|
467
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
468
|
+
|
|
469
|
+
# @private
|
|
470
|
+
# Overrides for http bindings for the RPCs of this service
|
|
471
|
+
# are only used when this service is used as mixin, and only
|
|
472
|
+
# by the host service.
|
|
473
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
|
474
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
|
475
|
+
|
|
476
|
+
# @private
|
|
477
|
+
def initialize parent_config = nil
|
|
478
|
+
@parent_config = parent_config unless parent_config.nil?
|
|
479
|
+
|
|
480
|
+
yield self if block_given?
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
##
|
|
484
|
+
# Configurations for individual RPCs
|
|
485
|
+
# @return [Rpcs]
|
|
486
|
+
#
|
|
487
|
+
def rpcs
|
|
488
|
+
@rpcs ||= begin
|
|
489
|
+
parent_rpcs = nil
|
|
490
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
|
491
|
+
Rpcs.new parent_rpcs
|
|
492
|
+
end
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
##
|
|
496
|
+
# Configuration RPC class for the MatchService API.
|
|
497
|
+
#
|
|
498
|
+
# Includes fields providing the configuration for each RPC in this service.
|
|
499
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
|
500
|
+
# the following configuration fields:
|
|
501
|
+
#
|
|
502
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
|
503
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
|
504
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
|
505
|
+
# include the following keys:
|
|
506
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
507
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
508
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
509
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
510
|
+
# trigger a retry.
|
|
511
|
+
#
|
|
512
|
+
class Rpcs
|
|
513
|
+
##
|
|
514
|
+
# RPC-specific configuration for `find_neighbors`
|
|
515
|
+
# @return [::Gapic::Config::Method]
|
|
516
|
+
#
|
|
517
|
+
attr_reader :find_neighbors
|
|
518
|
+
##
|
|
519
|
+
# RPC-specific configuration for `read_index_datapoints`
|
|
520
|
+
# @return [::Gapic::Config::Method]
|
|
521
|
+
#
|
|
522
|
+
attr_reader :read_index_datapoints
|
|
523
|
+
|
|
524
|
+
# @private
|
|
525
|
+
def initialize parent_rpcs = nil
|
|
526
|
+
find_neighbors_config = parent_rpcs.find_neighbors if parent_rpcs.respond_to? :find_neighbors
|
|
527
|
+
@find_neighbors = ::Gapic::Config::Method.new find_neighbors_config
|
|
528
|
+
read_index_datapoints_config = parent_rpcs.read_index_datapoints if parent_rpcs.respond_to? :read_index_datapoints
|
|
529
|
+
@read_index_datapoints = ::Gapic::Config::Method.new read_index_datapoints_config
|
|
530
|
+
|
|
531
|
+
yield self if block_given?
|
|
532
|
+
end
|
|
533
|
+
end
|
|
534
|
+
end
|
|
535
|
+
end
|
|
536
|
+
end
|
|
537
|
+
end
|
|
538
|
+
end
|
|
539
|
+
end
|
|
540
|
+
end
|
|
541
|
+
end
|