google-cloud-ai_platform-v1 0.61.0 → 0.63.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/ai_platform/v1/bindings_override.rb +24 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +11 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb +11 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/evaluation_service/client.rb +57 -0
- data/lib/google/cloud/ai_platform/v1/evaluation_service/rest/client.rb +57 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +26 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb +26 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/client.rb +879 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/paths.rb +88 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/rest/client.rb +827 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/rest/service_stub.rb +388 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/rest.rb +53 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service.rb +55 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/index_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/index_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/index_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/job_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/job_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/job_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/match_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/match_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/model_service/client.rb +124 -0
- data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +117 -0
- data/lib/google/cloud/ai_platform/v1/model_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/model_service/rest/service_stub.rb +61 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/notebook_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +21 -2
- data/lib/google/cloud/ai_platform/v1/prediction_service/paths.rb +19 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +21 -2
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/client.rb +600 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/paths.rb +52 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest/client.rb +571 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest/service_stub.rb +199 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest.rb +53 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service.rb +55 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/client.rb +921 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/operations.rb +821 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/paths.rb +69 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest/client.rb +869 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest/operations.rb +4328 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest/service_stub.rb +388 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service.rb +56 -0
- data/lib/google/cloud/ai_platform/v1/rest.rb +3 -0
- data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/schedule_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/schedule_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1/vertex_rag_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vertex_rag_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service/rest/client.rb +7 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service/rest/operations.rb +70 -0
- data/lib/google/cloud/ai_platform/v1.rb +3 -0
- data/lib/google/cloud/aiplatform/v1/cached_content_pb.rb +54 -0
- data/lib/google/cloud/aiplatform/v1/content_pb.rb +3 -1
- data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +5 -2
- data/lib/google/cloud/aiplatform/v1/feature_view_pb.rb +2 -1
- data/lib/google/cloud/aiplatform/v1/gen_ai_cache_service_pb.rb +57 -0
- data/lib/google/cloud/aiplatform/v1/gen_ai_cache_service_services_pb.rb +54 -0
- data/lib/google/cloud/aiplatform/v1/model_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/model_service_pb.rb +4 -1
- data/lib/google/cloud/aiplatform/v1/model_service_services_pb.rb +2 -0
- data/lib/google/cloud/aiplatform/v1/notebook_runtime_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +1 -1
- data/lib/google/cloud/aiplatform/v1/reasoning_engine_execution_service_pb.rb +52 -0
- data/lib/google/cloud/aiplatform/v1/reasoning_engine_execution_service_services_pb.rb +47 -0
- data/lib/google/cloud/aiplatform/v1/reasoning_engine_pb.rb +51 -0
- data/lib/google/cloud/aiplatform/v1/reasoning_engine_service_pb.rb +62 -0
- data/lib/google/cloud/aiplatform/v1/reasoning_engine_service_services_pb.rb +53 -0
- data/lib/google/cloud/aiplatform/v1/tool_pb.rb +9 -1
- data/proto_docs/google/cloud/aiplatform/v1/batch_prediction_job.rb +12 -0
- data/proto_docs/google/cloud/aiplatform/v1/cached_content.rb +105 -0
- data/proto_docs/google/cloud/aiplatform/v1/content.rb +61 -0
- data/proto_docs/google/cloud/aiplatform/v1/custom_job.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/data_labeling_job.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/dataset.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/dataset_service.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +57 -5
- data/proto_docs/google/cloud/aiplatform/v1/evaluation_service.rb +100 -0
- data/proto_docs/google/cloud/aiplatform/v1/explanation.rb +16 -0
- data/proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/feature_online_store.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb +18 -0
- data/proto_docs/google/cloud/aiplatform/v1/feature_view.rb +39 -0
- data/proto_docs/google/cloud/aiplatform/v1/featurestore_online_service.rb +24 -0
- data/proto_docs/google/cloud/aiplatform/v1/featurestore_service.rb +29 -0
- data/proto_docs/google/cloud/aiplatform/v1/gen_ai_cache_service.rb +108 -0
- data/proto_docs/google/cloud/aiplatform/v1/index.rb +6 -0
- data/proto_docs/google/cloud/aiplatform/v1/io.rb +8 -0
- data/proto_docs/google/cloud/aiplatform/v1/migratable_resource.rb +8 -0
- data/proto_docs/google/cloud/aiplatform/v1/migration_service.rb +18 -0
- data/proto_docs/google/cloud/aiplatform/v1/model.rb +7 -0
- data/proto_docs/google/cloud/aiplatform/v1/model_evaluation_slice.rb +10 -0
- data/proto_docs/google/cloud/aiplatform/v1/model_monitoring.rb +10 -0
- data/proto_docs/google/cloud/aiplatform/v1/model_service.rb +63 -0
- data/proto_docs/google/cloud/aiplatform/v1/notebook_execution_job.rb +14 -0
- data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb +42 -2
- data/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +24 -0
- data/proto_docs/google/cloud/aiplatform/v1/publisher_model.rb +14 -0
- data/proto_docs/google/cloud/aiplatform/v1/reasoning_engine.rb +87 -0
- data/proto_docs/google/cloud/aiplatform/v1/reasoning_engine_execution_service.rb +73 -0
- data/proto_docs/google/cloud/aiplatform/v1/reasoning_engine_service.rb +136 -0
- data/proto_docs/google/cloud/aiplatform/v1/schedule.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_tables.rb +12 -0
- data/proto_docs/google/cloud/aiplatform/v1/study.rb +24 -0
- data/proto_docs/google/cloud/aiplatform/v1/tensorboard_data.rb +6 -0
- data/proto_docs/google/cloud/aiplatform/v1/tool.rb +95 -0
- data/proto_docs/google/cloud/aiplatform/v1/training_pipeline.rb +14 -0
- data/proto_docs/google/cloud/aiplatform/v1/tuning_job.rb +6 -0
- data/proto_docs/google/cloud/aiplatform/v1/user_action_reference.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/value.rb +6 -0
- data/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data.rb +32 -0
- data/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data_service.rb +8 -0
- data/proto_docs/google/longrunning/operations.rb +4 -0
- data/proto_docs/google/protobuf/struct.rb +12 -0
- data/proto_docs/google/type/latlng.rb +38 -0
- metadata +43 -9
@@ -0,0 +1,388 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/aiplatform/v1/gen_ai_cache_service_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module AIPlatform
|
24
|
+
module V1
|
25
|
+
module GenAiCacheService
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the GenAiCacheService service.
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
|
+
#
|
32
|
+
class ServiceStub
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
35
|
+
# These require statements are intentionally placed here to initialize
|
36
|
+
# the REST modules only when it's required.
|
37
|
+
require "gapic/rest"
|
38
|
+
|
39
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
40
|
+
endpoint_template: endpoint_template,
|
41
|
+
universe_domain: universe_domain,
|
42
|
+
credentials: credentials,
|
43
|
+
numeric_enums: true,
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
47
|
+
end
|
48
|
+
|
49
|
+
##
|
50
|
+
# The effective universe domain
|
51
|
+
#
|
52
|
+
# @return [String]
|
53
|
+
#
|
54
|
+
def universe_domain
|
55
|
+
@client_stub.universe_domain
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# The effective endpoint
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
#
|
63
|
+
def endpoint
|
64
|
+
@client_stub.endpoint
|
65
|
+
end
|
66
|
+
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# Baseline implementation for the create_cached_content REST call
|
78
|
+
#
|
79
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::CreateCachedContentRequest]
|
80
|
+
# A request object representing the call parameters. Required.
|
81
|
+
# @param options [::Gapic::CallOptions]
|
82
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
83
|
+
#
|
84
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
85
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::CachedContent]
|
86
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
87
|
+
#
|
88
|
+
# @return [::Google::Cloud::AIPlatform::V1::CachedContent]
|
89
|
+
# A result object deserialized from the server's reply
|
90
|
+
def create_cached_content request_pb, options = nil
|
91
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
92
|
+
|
93
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_cached_content_request request_pb
|
94
|
+
query_string_params = if query_string_params.any?
|
95
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
96
|
+
else
|
97
|
+
{}
|
98
|
+
end
|
99
|
+
|
100
|
+
response = @client_stub.make_http_request(
|
101
|
+
verb,
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "create_cached_content",
|
106
|
+
options: options
|
107
|
+
)
|
108
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
109
|
+
result = ::Google::Cloud::AIPlatform::V1::CachedContent.decode_json response.body, ignore_unknown_fields: true
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
##
|
117
|
+
# Baseline implementation for the get_cached_content REST call
|
118
|
+
#
|
119
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::GetCachedContentRequest]
|
120
|
+
# A request object representing the call parameters. Required.
|
121
|
+
# @param options [::Gapic::CallOptions]
|
122
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
123
|
+
#
|
124
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
125
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::CachedContent]
|
126
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
127
|
+
#
|
128
|
+
# @return [::Google::Cloud::AIPlatform::V1::CachedContent]
|
129
|
+
# A result object deserialized from the server's reply
|
130
|
+
def get_cached_content request_pb, options = nil
|
131
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
132
|
+
|
133
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_cached_content_request request_pb
|
134
|
+
query_string_params = if query_string_params.any?
|
135
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
136
|
+
else
|
137
|
+
{}
|
138
|
+
end
|
139
|
+
|
140
|
+
response = @client_stub.make_http_request(
|
141
|
+
verb,
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "get_cached_content",
|
146
|
+
options: options
|
147
|
+
)
|
148
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
149
|
+
result = ::Google::Cloud::AIPlatform::V1::CachedContent.decode_json response.body, ignore_unknown_fields: true
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
##
|
157
|
+
# Baseline implementation for the update_cached_content REST call
|
158
|
+
#
|
159
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::UpdateCachedContentRequest]
|
160
|
+
# A request object representing the call parameters. Required.
|
161
|
+
# @param options [::Gapic::CallOptions]
|
162
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
163
|
+
#
|
164
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
165
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::CachedContent]
|
166
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
167
|
+
#
|
168
|
+
# @return [::Google::Cloud::AIPlatform::V1::CachedContent]
|
169
|
+
# A result object deserialized from the server's reply
|
170
|
+
def update_cached_content request_pb, options = nil
|
171
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
172
|
+
|
173
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_cached_content_request request_pb
|
174
|
+
query_string_params = if query_string_params.any?
|
175
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
176
|
+
else
|
177
|
+
{}
|
178
|
+
end
|
179
|
+
|
180
|
+
response = @client_stub.make_http_request(
|
181
|
+
verb,
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "update_cached_content",
|
186
|
+
options: options
|
187
|
+
)
|
188
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
189
|
+
result = ::Google::Cloud::AIPlatform::V1::CachedContent.decode_json response.body, ignore_unknown_fields: true
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# Baseline implementation for the delete_cached_content REST call
|
198
|
+
#
|
199
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::DeleteCachedContentRequest]
|
200
|
+
# A request object representing the call parameters. Required.
|
201
|
+
# @param options [::Gapic::CallOptions]
|
202
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
203
|
+
#
|
204
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
205
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
206
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
207
|
+
#
|
208
|
+
# @return [::Google::Protobuf::Empty]
|
209
|
+
# A result object deserialized from the server's reply
|
210
|
+
def delete_cached_content request_pb, options = nil
|
211
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
212
|
+
|
213
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_cached_content_request request_pb
|
214
|
+
query_string_params = if query_string_params.any?
|
215
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
216
|
+
else
|
217
|
+
{}
|
218
|
+
end
|
219
|
+
|
220
|
+
response = @client_stub.make_http_request(
|
221
|
+
verb,
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "delete_cached_content",
|
226
|
+
options: options
|
227
|
+
)
|
228
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
229
|
+
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
##
|
237
|
+
# Baseline implementation for the list_cached_contents REST call
|
238
|
+
#
|
239
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::ListCachedContentsRequest]
|
240
|
+
# A request object representing the call parameters. Required.
|
241
|
+
# @param options [::Gapic::CallOptions]
|
242
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
243
|
+
#
|
244
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
245
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::ListCachedContentsResponse]
|
246
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
247
|
+
#
|
248
|
+
# @return [::Google::Cloud::AIPlatform::V1::ListCachedContentsResponse]
|
249
|
+
# A result object deserialized from the server's reply
|
250
|
+
def list_cached_contents request_pb, options = nil
|
251
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
252
|
+
|
253
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_cached_contents_request request_pb
|
254
|
+
query_string_params = if query_string_params.any?
|
255
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
256
|
+
else
|
257
|
+
{}
|
258
|
+
end
|
259
|
+
|
260
|
+
response = @client_stub.make_http_request(
|
261
|
+
verb,
|
262
|
+
uri: uri,
|
263
|
+
body: body || "",
|
264
|
+
params: query_string_params,
|
265
|
+
method_name: "list_cached_contents",
|
266
|
+
options: options
|
267
|
+
)
|
268
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
269
|
+
result = ::Google::Cloud::AIPlatform::V1::ListCachedContentsResponse.decode_json response.body, ignore_unknown_fields: true
|
270
|
+
catch :response do
|
271
|
+
yield result, operation if block_given?
|
272
|
+
result
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
276
|
+
##
|
277
|
+
# @private
|
278
|
+
#
|
279
|
+
# GRPC transcoding helper method for the create_cached_content REST call
|
280
|
+
#
|
281
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::CreateCachedContentRequest]
|
282
|
+
# A request object representing the call parameters. Required.
|
283
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
284
|
+
# Uri, Body, Query string parameters
|
285
|
+
def self.transcode_create_cached_content_request request_pb
|
286
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
287
|
+
.with_bindings(
|
288
|
+
uri_method: :post,
|
289
|
+
uri_template: "/v1/{parent}/cachedContents",
|
290
|
+
body: "cached_content",
|
291
|
+
matches: [
|
292
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
293
|
+
]
|
294
|
+
)
|
295
|
+
transcoder.transcode request_pb
|
296
|
+
end
|
297
|
+
|
298
|
+
##
|
299
|
+
# @private
|
300
|
+
#
|
301
|
+
# GRPC transcoding helper method for the get_cached_content REST call
|
302
|
+
#
|
303
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::GetCachedContentRequest]
|
304
|
+
# A request object representing the call parameters. Required.
|
305
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
306
|
+
# Uri, Body, Query string parameters
|
307
|
+
def self.transcode_get_cached_content_request request_pb
|
308
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
309
|
+
.with_bindings(
|
310
|
+
uri_method: :get,
|
311
|
+
uri_template: "/v1/{name}",
|
312
|
+
matches: [
|
313
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/cachedContents/[^/]+/?$}, false]
|
314
|
+
]
|
315
|
+
)
|
316
|
+
transcoder.transcode request_pb
|
317
|
+
end
|
318
|
+
|
319
|
+
##
|
320
|
+
# @private
|
321
|
+
#
|
322
|
+
# GRPC transcoding helper method for the update_cached_content REST call
|
323
|
+
#
|
324
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::UpdateCachedContentRequest]
|
325
|
+
# A request object representing the call parameters. Required.
|
326
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
327
|
+
# Uri, Body, Query string parameters
|
328
|
+
def self.transcode_update_cached_content_request request_pb
|
329
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
330
|
+
.with_bindings(
|
331
|
+
uri_method: :patch,
|
332
|
+
uri_template: "/v1/{cached_content.name}",
|
333
|
+
body: "cached_content",
|
334
|
+
matches: [
|
335
|
+
["cached_content.name", %r{^projects/[^/]+/locations/[^/]+/cachedContents/[^/]+/?$}, false]
|
336
|
+
]
|
337
|
+
)
|
338
|
+
transcoder.transcode request_pb
|
339
|
+
end
|
340
|
+
|
341
|
+
##
|
342
|
+
# @private
|
343
|
+
#
|
344
|
+
# GRPC transcoding helper method for the delete_cached_content REST call
|
345
|
+
#
|
346
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::DeleteCachedContentRequest]
|
347
|
+
# A request object representing the call parameters. Required.
|
348
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
349
|
+
# Uri, Body, Query string parameters
|
350
|
+
def self.transcode_delete_cached_content_request request_pb
|
351
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
352
|
+
.with_bindings(
|
353
|
+
uri_method: :delete,
|
354
|
+
uri_template: "/v1/{name}",
|
355
|
+
matches: [
|
356
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/cachedContents/[^/]+/?$}, false]
|
357
|
+
]
|
358
|
+
)
|
359
|
+
transcoder.transcode request_pb
|
360
|
+
end
|
361
|
+
|
362
|
+
##
|
363
|
+
# @private
|
364
|
+
#
|
365
|
+
# GRPC transcoding helper method for the list_cached_contents REST call
|
366
|
+
#
|
367
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::ListCachedContentsRequest]
|
368
|
+
# A request object representing the call parameters. Required.
|
369
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
370
|
+
# Uri, Body, Query string parameters
|
371
|
+
def self.transcode_list_cached_contents_request request_pb
|
372
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
373
|
+
.with_bindings(
|
374
|
+
uri_method: :get,
|
375
|
+
uri_template: "/v1/{parent}/cachedContents",
|
376
|
+
matches: [
|
377
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
378
|
+
]
|
379
|
+
)
|
380
|
+
transcoder.transcode request_pb
|
381
|
+
end
|
382
|
+
end
|
383
|
+
end
|
384
|
+
end
|
385
|
+
end
|
386
|
+
end
|
387
|
+
end
|
388
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/ai_platform/v1/version"
|
24
|
+
require "google/cloud/ai_platform/v1/bindings_override"
|
25
|
+
|
26
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/credentials"
|
27
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/paths"
|
28
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/rest/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module AIPlatform
|
33
|
+
module V1
|
34
|
+
##
|
35
|
+
# Service for managing Vertex AI's CachedContent resource.
|
36
|
+
#
|
37
|
+
# To load this service and instantiate a REST client:
|
38
|
+
#
|
39
|
+
# require "google/cloud/ai_platform/v1/gen_ai_cache_service/rest"
|
40
|
+
# client = ::Google::Cloud::AIPlatform::V1::GenAiCacheService::Rest::Client.new
|
41
|
+
#
|
42
|
+
module GenAiCacheService
|
43
|
+
# Client for the REST transport
|
44
|
+
module Rest
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
53
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/rest/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/ai_platform/v1/version"
|
24
|
+
|
25
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/credentials"
|
26
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/paths"
|
27
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/client"
|
28
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/rest"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module AIPlatform
|
33
|
+
module V1
|
34
|
+
##
|
35
|
+
# Service for managing Vertex AI's CachedContent resource.
|
36
|
+
#
|
37
|
+
# @example Load this service and instantiate a gRPC client
|
38
|
+
#
|
39
|
+
# require "google/cloud/ai_platform/v1/gen_ai_cache_service"
|
40
|
+
# client = ::Google::Cloud::AIPlatform::V1::GenAiCacheService::Client.new
|
41
|
+
#
|
42
|
+
# @example Load this service and instantiate a REST client
|
43
|
+
#
|
44
|
+
# require "google/cloud/ai_platform/v1/gen_ai_cache_service/rest"
|
45
|
+
# client = ::Google::Cloud::AIPlatform::V1::GenAiCacheService::Rest::Client.new
|
46
|
+
#
|
47
|
+
module GenAiCacheService
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
helper_path = ::File.join __dir__, "gen_ai_cache_service", "helpers.rb"
|
55
|
+
require "google/cloud/ai_platform/v1/gen_ai_cache_service/helpers" if ::File.file? helper_path
|
@@ -752,6 +752,13 @@ module Google
|
|
752
752
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
753
753
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
754
754
|
# * (`nil`) indicating no credentials
|
755
|
+
#
|
756
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
757
|
+
# external source for authentication to Google Cloud, you must validate it before
|
758
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
759
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
760
|
+
# For more information, refer to [Validate credential configurations from external
|
761
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
755
762
|
# @return [::Object]
|
756
763
|
# @!attribute [rw] scope
|
757
764
|
# The OAuth scopes
|
@@ -648,6 +648,13 @@ module Google
|
|
648
648
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
649
649
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
650
650
|
# * (`nil`) indicating no credentials
|
651
|
+
#
|
652
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
653
|
+
# external source for authentication to Google Cloud, you must validate it before
|
654
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
655
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
656
|
+
# For more information, refer to [Validate credential configurations from external
|
657
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
651
658
|
# @return [::Object]
|
652
659
|
# @!attribute [rw] scope
|
653
660
|
# The OAuth scopes
|
@@ -710,6 +710,13 @@ module Google
|
|
710
710
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
711
711
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
712
712
|
# * (`nil`) indicating no credentials
|
713
|
+
#
|
714
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
715
|
+
# external source for authentication to Google Cloud, you must validate it before
|
716
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
717
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
718
|
+
# For more information, refer to [Validate credential configurations from external
|
719
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
713
720
|
# @return [::Object]
|
714
721
|
# @!attribute [rw] scope
|
715
722
|
# The OAuth scopes
|