google-cloud-vision_ai-v1 0.a → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +144 -8
- data/lib/google/cloud/vision_ai/v1/app_platform/client.rb +3318 -0
- data/lib/google/cloud/vision_ai/v1/app_platform/credentials.rb +47 -0
- data/lib/google/cloud/vision_ai/v1/app_platform/operations.rb +809 -0
- data/lib/google/cloud/vision_ai/v1/app_platform/paths.rb +151 -0
- data/lib/google/cloud/vision_ai/v1/app_platform/rest/client.rb +3106 -0
- data/lib/google/cloud/vision_ai/v1/app_platform/rest/operations.rb +951 -0
- data/lib/google/cloud/vision_ai/v1/app_platform/rest/service_stub.rb +1618 -0
- data/lib/google/cloud/vision_ai/v1/app_platform/rest.rb +53 -0
- data/lib/google/cloud/vision_ai/v1/app_platform.rb +56 -0
- data/lib/google/cloud/vision_ai/v1/health_check_service/client.rb +456 -0
- data/lib/google/cloud/vision_ai/v1/health_check_service/credentials.rb +47 -0
- data/lib/google/cloud/vision_ai/v1/health_check_service/paths.rb +52 -0
- data/lib/google/cloud/vision_ai/v1/health_check_service/rest/client.rb +423 -0
- data/lib/google/cloud/vision_ai/v1/health_check_service/rest/service_stub.rb +128 -0
- data/lib/google/cloud/vision_ai/v1/health_check_service/rest.rb +53 -0
- data/lib/google/cloud/vision_ai/v1/health_check_service.rb +56 -0
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/client.rb +2375 -0
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/credentials.rb +47 -0
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/operations.rb +809 -0
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/paths.rb +130 -0
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/client.rb +2220 -0
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/operations.rb +951 -0
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/service_stub.rb +1139 -0
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest.rb +54 -0
- data/lib/google/cloud/vision_ai/v1/live_video_analytics.rb +57 -0
- data/lib/google/cloud/vision_ai/v1/rest.rb +42 -0
- data/lib/google/cloud/vision_ai/v1/streaming_service/client.rb +915 -0
- data/lib/google/cloud/vision_ai/v1/streaming_service/credentials.rb +47 -0
- data/lib/google/cloud/vision_ai/v1/streaming_service/paths.rb +54 -0
- data/lib/google/cloud/vision_ai/v1/streaming_service/rest/client.rb +610 -0
- data/lib/google/cloud/vision_ai/v1/streaming_service/rest/service_stub.rb +249 -0
- data/lib/google/cloud/vision_ai/v1/streaming_service/rest.rb +52 -0
- data/lib/google/cloud/vision_ai/v1/streaming_service.rb +55 -0
- data/lib/google/cloud/vision_ai/v1/streams_service/client.rb +2931 -0
- data/lib/google/cloud/vision_ai/v1/streams_service/credentials.rb +47 -0
- data/lib/google/cloud/vision_ai/v1/streams_service/operations.rb +809 -0
- data/lib/google/cloud/vision_ai/v1/streams_service/paths.rb +153 -0
- data/lib/google/cloud/vision_ai/v1/streams_service/rest/client.rb +2740 -0
- data/lib/google/cloud/vision_ai/v1/streams_service/rest/operations.rb +951 -0
- data/lib/google/cloud/vision_ai/v1/streams_service/rest/service_stub.rb +1437 -0
- data/lib/google/cloud/vision_ai/v1/streams_service/rest.rb +56 -0
- data/lib/google/cloud/vision_ai/v1/streams_service.rb +59 -0
- data/lib/google/cloud/vision_ai/v1/version.rb +8 -3
- data/lib/google/cloud/vision_ai/v1/warehouse/client.rb +6957 -0
- data/lib/google/cloud/vision_ai/v1/warehouse/credentials.rb +47 -0
- data/lib/google/cloud/vision_ai/v1/warehouse/operations.rb +809 -0
- data/lib/google/cloud/vision_ai/v1/warehouse/paths.rb +237 -0
- data/lib/google/cloud/vision_ai/v1/warehouse/rest/client.rb +6402 -0
- data/lib/google/cloud/vision_ai/v1/warehouse/rest/operations.rb +951 -0
- data/lib/google/cloud/vision_ai/v1/warehouse/rest/service_stub.rb +3760 -0
- data/lib/google/cloud/vision_ai/v1/warehouse/rest.rb +53 -0
- data/lib/google/cloud/vision_ai/v1/warehouse.rb +56 -0
- data/lib/google/cloud/vision_ai/v1.rb +50 -0
- data/lib/google/cloud/visionai/v1/annotations_pb.rb +90 -0
- data/lib/google/cloud/visionai/v1/common_pb.rb +50 -0
- data/lib/google/cloud/visionai/v1/health_service_pb.rb +48 -0
- data/lib/google/cloud/visionai/v1/health_service_services_pb.rb +46 -0
- data/lib/google/cloud/visionai/v1/lva_pb.rb +54 -0
- data/lib/google/cloud/visionai/v1/lva_resources_pb.rb +51 -0
- data/lib/google/cloud/visionai/v1/lva_service_pb.rb +80 -0
- data/lib/google/cloud/visionai/v1/lva_service_services_pb.rb +81 -0
- data/lib/google/cloud/visionai/v1/platform_pb.rb +162 -0
- data/lib/google/cloud/visionai/v1/platform_services_pb.rb +111 -0
- data/lib/google/cloud/visionai/v1/streaming_resources_pb.rb +58 -0
- data/lib/google/cloud/visionai/v1/streaming_service_pb.rb +71 -0
- data/lib/google/cloud/visionai/v1/streaming_service_services_pb.rb +55 -0
- data/lib/google/cloud/visionai/v1/streams_resources_pb.rb +53 -0
- data/lib/google/cloud/visionai/v1/streams_service_pb.rb +85 -0
- data/lib/google/cloud/visionai/v1/streams_service_services_pb.rb +92 -0
- data/lib/google/cloud/visionai/v1/warehouse_pb.rb +250 -0
- data/lib/google/cloud/visionai/v1/warehouse_services_pb.rb +227 -0
- data/lib/google-cloud-vision_ai-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +403 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/cloud/visionai/v1/annotations.rb +787 -0
- data/proto_docs/google/cloud/visionai/v1/common.rb +134 -0
- data/proto_docs/google/cloud/visionai/v1/health_service.rb +61 -0
- data/proto_docs/google/cloud/visionai/v1/lva.rb +345 -0
- data/proto_docs/google/cloud/visionai/v1/lva_resources.rb +167 -0
- data/proto_docs/google/cloud/visionai/v1/lva_service.rb +543 -0
- data/proto_docs/google/cloud/visionai/v1/platform.rb +2228 -0
- data/proto_docs/google/cloud/visionai/v1/streaming_resources.rb +178 -0
- data/proto_docs/google/cloud/visionai/v1/streaming_service.rb +393 -0
- data/proto_docs/google/cloud/visionai/v1/streams_resources.rb +229 -0
- data/proto_docs/google/cloud/visionai/v1/streams_service.rb +644 -0
- data/proto_docs/google/cloud/visionai/v1/warehouse.rb +3002 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +145 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- data/proto_docs/google/type/datetime.rb +99 -0
- data/proto_docs/google/type/expr.rb +75 -0
- metadata +183 -10
@@ -0,0 +1,3318 @@
|
|
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/visionai/v1/platform_pb"
|
21
|
+
require "google/cloud/location"
|
22
|
+
require "google/iam/v1"
|
23
|
+
|
24
|
+
module Google
|
25
|
+
module Cloud
|
26
|
+
module VisionAI
|
27
|
+
module V1
|
28
|
+
module AppPlatform
|
29
|
+
##
|
30
|
+
# Client for the AppPlatform service.
|
31
|
+
#
|
32
|
+
# Service describing handlers for resources
|
33
|
+
#
|
34
|
+
class Client
|
35
|
+
# @private
|
36
|
+
API_VERSION = ""
|
37
|
+
|
38
|
+
# @private
|
39
|
+
DEFAULT_ENDPOINT_TEMPLATE = "visionai.$UNIVERSE_DOMAIN$"
|
40
|
+
|
41
|
+
include Paths
|
42
|
+
|
43
|
+
# @private
|
44
|
+
attr_reader :app_platform_stub
|
45
|
+
|
46
|
+
##
|
47
|
+
# Configure the AppPlatform Client class.
|
48
|
+
#
|
49
|
+
# See {::Google::Cloud::VisionAI::V1::AppPlatform::Client::Configuration}
|
50
|
+
# for a description of the configuration fields.
|
51
|
+
#
|
52
|
+
# @example
|
53
|
+
#
|
54
|
+
# # Modify the configuration for all AppPlatform clients
|
55
|
+
# ::Google::Cloud::VisionAI::V1::AppPlatform::Client.configure do |config|
|
56
|
+
# config.timeout = 10.0
|
57
|
+
# end
|
58
|
+
#
|
59
|
+
# @yield [config] Configure the Client client.
|
60
|
+
# @yieldparam config [Client::Configuration]
|
61
|
+
#
|
62
|
+
# @return [Client::Configuration]
|
63
|
+
#
|
64
|
+
def self.configure
|
65
|
+
@configure ||= begin
|
66
|
+
namespace = ["Google", "Cloud", "VisionAI", "V1"]
|
67
|
+
parent_config = while namespace.any?
|
68
|
+
parent_name = namespace.join "::"
|
69
|
+
parent_const = const_get parent_name
|
70
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
71
|
+
namespace.pop
|
72
|
+
end
|
73
|
+
default_config = Client::Configuration.new parent_config
|
74
|
+
|
75
|
+
default_config
|
76
|
+
end
|
77
|
+
yield @configure if block_given?
|
78
|
+
@configure
|
79
|
+
end
|
80
|
+
|
81
|
+
##
|
82
|
+
# Configure the AppPlatform Client instance.
|
83
|
+
#
|
84
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
85
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
86
|
+
# should be made on {Client.configure}.
|
87
|
+
#
|
88
|
+
# See {::Google::Cloud::VisionAI::V1::AppPlatform::Client::Configuration}
|
89
|
+
# for a description of the configuration fields.
|
90
|
+
#
|
91
|
+
# @yield [config] Configure the Client client.
|
92
|
+
# @yieldparam config [Client::Configuration]
|
93
|
+
#
|
94
|
+
# @return [Client::Configuration]
|
95
|
+
#
|
96
|
+
def configure
|
97
|
+
yield @config if block_given?
|
98
|
+
@config
|
99
|
+
end
|
100
|
+
|
101
|
+
##
|
102
|
+
# The effective universe domain
|
103
|
+
#
|
104
|
+
# @return [String]
|
105
|
+
#
|
106
|
+
def universe_domain
|
107
|
+
@app_platform_stub.universe_domain
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Create a new AppPlatform client object.
|
112
|
+
#
|
113
|
+
# @example
|
114
|
+
#
|
115
|
+
# # Create a client using the default configuration
|
116
|
+
# client = ::Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
117
|
+
#
|
118
|
+
# # Create a client using a custom configuration
|
119
|
+
# client = ::Google::Cloud::VisionAI::V1::AppPlatform::Client.new do |config|
|
120
|
+
# config.timeout = 10.0
|
121
|
+
# end
|
122
|
+
#
|
123
|
+
# @yield [config] Configure the AppPlatform client.
|
124
|
+
# @yieldparam config [Client::Configuration]
|
125
|
+
#
|
126
|
+
def initialize
|
127
|
+
# These require statements are intentionally placed here to initialize
|
128
|
+
# the gRPC module only when it's required.
|
129
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
130
|
+
require "gapic/grpc"
|
131
|
+
require "google/cloud/visionai/v1/platform_services_pb"
|
132
|
+
|
133
|
+
# Create the configuration object
|
134
|
+
@config = Configuration.new Client.configure
|
135
|
+
|
136
|
+
# Yield the configuration if needed
|
137
|
+
yield @config if block_given?
|
138
|
+
|
139
|
+
# Create credentials
|
140
|
+
credentials = @config.credentials
|
141
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
142
|
+
# but only if the default endpoint does not have a region prefix.
|
143
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
144
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
145
|
+
!@config.endpoint.split(".").first.include?("-"))
|
146
|
+
credentials ||= Credentials.default scope: @config.scope,
|
147
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
148
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
149
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
150
|
+
end
|
151
|
+
@quota_project_id = @config.quota_project
|
152
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
153
|
+
|
154
|
+
@operations_client = Operations.new do |config|
|
155
|
+
config.credentials = credentials
|
156
|
+
config.quota_project = @quota_project_id
|
157
|
+
config.endpoint = @config.endpoint
|
158
|
+
config.universe_domain = @config.universe_domain
|
159
|
+
end
|
160
|
+
|
161
|
+
@app_platform_stub = ::Gapic::ServiceStub.new(
|
162
|
+
::Google::Cloud::VisionAI::V1::AppPlatform::Stub,
|
163
|
+
credentials: credentials,
|
164
|
+
endpoint: @config.endpoint,
|
165
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
166
|
+
universe_domain: @config.universe_domain,
|
167
|
+
channel_args: @config.channel_args,
|
168
|
+
interceptors: @config.interceptors,
|
169
|
+
channel_pool_config: @config.channel_pool
|
170
|
+
)
|
171
|
+
|
172
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
173
|
+
config.credentials = credentials
|
174
|
+
config.quota_project = @quota_project_id
|
175
|
+
config.endpoint = @app_platform_stub.endpoint
|
176
|
+
config.universe_domain = @app_platform_stub.universe_domain
|
177
|
+
end
|
178
|
+
|
179
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
180
|
+
config.credentials = credentials
|
181
|
+
config.quota_project = @quota_project_id
|
182
|
+
config.endpoint = @app_platform_stub.endpoint
|
183
|
+
config.universe_domain = @app_platform_stub.universe_domain
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
##
|
188
|
+
# Get the associated client for long-running operations.
|
189
|
+
#
|
190
|
+
# @return [::Google::Cloud::VisionAI::V1::AppPlatform::Operations]
|
191
|
+
#
|
192
|
+
attr_reader :operations_client
|
193
|
+
|
194
|
+
##
|
195
|
+
# Get the associated client for mix-in of the Locations.
|
196
|
+
#
|
197
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
198
|
+
#
|
199
|
+
attr_reader :location_client
|
200
|
+
|
201
|
+
##
|
202
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
203
|
+
#
|
204
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
205
|
+
#
|
206
|
+
attr_reader :iam_policy_client
|
207
|
+
|
208
|
+
# Service calls
|
209
|
+
|
210
|
+
##
|
211
|
+
# Lists Applications in a given project and location.
|
212
|
+
#
|
213
|
+
# @overload list_applications(request, options = nil)
|
214
|
+
# Pass arguments to `list_applications` via a request object, either of type
|
215
|
+
# {::Google::Cloud::VisionAI::V1::ListApplicationsRequest} or an equivalent Hash.
|
216
|
+
#
|
217
|
+
# @param request [::Google::Cloud::VisionAI::V1::ListApplicationsRequest, ::Hash]
|
218
|
+
# A request object representing the call parameters. Required. To specify no
|
219
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
220
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
221
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
222
|
+
#
|
223
|
+
# @overload list_applications(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
224
|
+
# Pass arguments to `list_applications` via keyword arguments. Note that at
|
225
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
226
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
227
|
+
#
|
228
|
+
# @param parent [::String]
|
229
|
+
# Required. Parent value for ListApplicationsRequest.
|
230
|
+
# @param page_size [::Integer]
|
231
|
+
# Requested page size. Server may return fewer items than requested.
|
232
|
+
# If unspecified, server will pick an appropriate default.
|
233
|
+
# @param page_token [::String]
|
234
|
+
# A token identifying a page of results the server should return.
|
235
|
+
# @param filter [::String]
|
236
|
+
# Filtering results.
|
237
|
+
# @param order_by [::String]
|
238
|
+
# Hint for how to order the results.
|
239
|
+
#
|
240
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
241
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Application>]
|
242
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
243
|
+
#
|
244
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Application>]
|
245
|
+
#
|
246
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
247
|
+
#
|
248
|
+
# @example Basic example
|
249
|
+
# require "google/cloud/vision_ai/v1"
|
250
|
+
#
|
251
|
+
# # Create a client object. The client can be reused for multiple calls.
|
252
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
253
|
+
#
|
254
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
255
|
+
# request = Google::Cloud::VisionAI::V1::ListApplicationsRequest.new
|
256
|
+
#
|
257
|
+
# # Call the list_applications method.
|
258
|
+
# result = client.list_applications request
|
259
|
+
#
|
260
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
261
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
262
|
+
# result.each do |item|
|
263
|
+
# # Each element is of type ::Google::Cloud::VisionAI::V1::Application.
|
264
|
+
# p item
|
265
|
+
# end
|
266
|
+
#
|
267
|
+
def list_applications request, options = nil
|
268
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
269
|
+
|
270
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::ListApplicationsRequest
|
271
|
+
|
272
|
+
# Converts hash and nil to an options object
|
273
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
274
|
+
|
275
|
+
# Customize the options with defaults
|
276
|
+
metadata = @config.rpcs.list_applications.metadata.to_h
|
277
|
+
|
278
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
279
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
280
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
281
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
282
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
283
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
284
|
+
|
285
|
+
header_params = {}
|
286
|
+
if request.parent
|
287
|
+
header_params["parent"] = request.parent
|
288
|
+
end
|
289
|
+
|
290
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
291
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
292
|
+
|
293
|
+
options.apply_defaults timeout: @config.rpcs.list_applications.timeout,
|
294
|
+
metadata: metadata,
|
295
|
+
retry_policy: @config.rpcs.list_applications.retry_policy
|
296
|
+
|
297
|
+
options.apply_defaults timeout: @config.timeout,
|
298
|
+
metadata: @config.metadata,
|
299
|
+
retry_policy: @config.retry_policy
|
300
|
+
|
301
|
+
@app_platform_stub.call_rpc :list_applications, request, options: options do |response, operation|
|
302
|
+
response = ::Gapic::PagedEnumerable.new @app_platform_stub, :list_applications, request, response, operation, options
|
303
|
+
yield response, operation if block_given?
|
304
|
+
return response
|
305
|
+
end
|
306
|
+
rescue ::GRPC::BadStatus => e
|
307
|
+
raise ::Google::Cloud::Error.from_error(e)
|
308
|
+
end
|
309
|
+
|
310
|
+
##
|
311
|
+
# Gets details of a single Application.
|
312
|
+
#
|
313
|
+
# @overload get_application(request, options = nil)
|
314
|
+
# Pass arguments to `get_application` via a request object, either of type
|
315
|
+
# {::Google::Cloud::VisionAI::V1::GetApplicationRequest} or an equivalent Hash.
|
316
|
+
#
|
317
|
+
# @param request [::Google::Cloud::VisionAI::V1::GetApplicationRequest, ::Hash]
|
318
|
+
# A request object representing the call parameters. Required. To specify no
|
319
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
320
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
321
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
322
|
+
#
|
323
|
+
# @overload get_application(name: nil)
|
324
|
+
# Pass arguments to `get_application` via keyword arguments. Note that at
|
325
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
326
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
327
|
+
#
|
328
|
+
# @param name [::String]
|
329
|
+
# Required. Name of the resource.
|
330
|
+
#
|
331
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
332
|
+
# @yieldparam response [::Google::Cloud::VisionAI::V1::Application]
|
333
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
334
|
+
#
|
335
|
+
# @return [::Google::Cloud::VisionAI::V1::Application]
|
336
|
+
#
|
337
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
338
|
+
#
|
339
|
+
# @example Basic example
|
340
|
+
# require "google/cloud/vision_ai/v1"
|
341
|
+
#
|
342
|
+
# # Create a client object. The client can be reused for multiple calls.
|
343
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
344
|
+
#
|
345
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
346
|
+
# request = Google::Cloud::VisionAI::V1::GetApplicationRequest.new
|
347
|
+
#
|
348
|
+
# # Call the get_application method.
|
349
|
+
# result = client.get_application request
|
350
|
+
#
|
351
|
+
# # The returned object is of type Google::Cloud::VisionAI::V1::Application.
|
352
|
+
# p result
|
353
|
+
#
|
354
|
+
def get_application request, options = nil
|
355
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
356
|
+
|
357
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::GetApplicationRequest
|
358
|
+
|
359
|
+
# Converts hash and nil to an options object
|
360
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
361
|
+
|
362
|
+
# Customize the options with defaults
|
363
|
+
metadata = @config.rpcs.get_application.metadata.to_h
|
364
|
+
|
365
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
366
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
367
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
368
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
369
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
370
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
371
|
+
|
372
|
+
header_params = {}
|
373
|
+
if request.name
|
374
|
+
header_params["name"] = request.name
|
375
|
+
end
|
376
|
+
|
377
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
378
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
379
|
+
|
380
|
+
options.apply_defaults timeout: @config.rpcs.get_application.timeout,
|
381
|
+
metadata: metadata,
|
382
|
+
retry_policy: @config.rpcs.get_application.retry_policy
|
383
|
+
|
384
|
+
options.apply_defaults timeout: @config.timeout,
|
385
|
+
metadata: @config.metadata,
|
386
|
+
retry_policy: @config.retry_policy
|
387
|
+
|
388
|
+
@app_platform_stub.call_rpc :get_application, request, options: options do |response, operation|
|
389
|
+
yield response, operation if block_given?
|
390
|
+
return response
|
391
|
+
end
|
392
|
+
rescue ::GRPC::BadStatus => e
|
393
|
+
raise ::Google::Cloud::Error.from_error(e)
|
394
|
+
end
|
395
|
+
|
396
|
+
##
|
397
|
+
# Creates a new Application in a given project and location.
|
398
|
+
#
|
399
|
+
# @overload create_application(request, options = nil)
|
400
|
+
# Pass arguments to `create_application` via a request object, either of type
|
401
|
+
# {::Google::Cloud::VisionAI::V1::CreateApplicationRequest} or an equivalent Hash.
|
402
|
+
#
|
403
|
+
# @param request [::Google::Cloud::VisionAI::V1::CreateApplicationRequest, ::Hash]
|
404
|
+
# A request object representing the call parameters. Required. To specify no
|
405
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
406
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
407
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
408
|
+
#
|
409
|
+
# @overload create_application(parent: nil, application_id: nil, application: nil, request_id: nil)
|
410
|
+
# Pass arguments to `create_application` via keyword arguments. Note that at
|
411
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
412
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
413
|
+
#
|
414
|
+
# @param parent [::String]
|
415
|
+
# Required. Value for parent.
|
416
|
+
# @param application_id [::String]
|
417
|
+
# Required. Id of the requesting object.
|
418
|
+
# @param application [::Google::Cloud::VisionAI::V1::Application, ::Hash]
|
419
|
+
# Required. The resource being created.
|
420
|
+
# @param request_id [::String]
|
421
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
422
|
+
# request ID so that if you must retry your request, the server will know to
|
423
|
+
# ignore the request if it has already been completed. The server will
|
424
|
+
# guarantee that for at least 60 minutes since the first request.
|
425
|
+
#
|
426
|
+
# For example, consider a situation where you make an initial request and
|
427
|
+
# the request times out. If you make the request again with the same request
|
428
|
+
# ID, the server can check if original operation with the same request ID
|
429
|
+
# was received, and if so, will ignore the second request. This prevents
|
430
|
+
# clients from accidentally creating duplicate commitments.
|
431
|
+
#
|
432
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
433
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
434
|
+
#
|
435
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
436
|
+
# @yieldparam response [::Gapic::Operation]
|
437
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
438
|
+
#
|
439
|
+
# @return [::Gapic::Operation]
|
440
|
+
#
|
441
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
442
|
+
#
|
443
|
+
# @example Basic example
|
444
|
+
# require "google/cloud/vision_ai/v1"
|
445
|
+
#
|
446
|
+
# # Create a client object. The client can be reused for multiple calls.
|
447
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
448
|
+
#
|
449
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
450
|
+
# request = Google::Cloud::VisionAI::V1::CreateApplicationRequest.new
|
451
|
+
#
|
452
|
+
# # Call the create_application method.
|
453
|
+
# result = client.create_application request
|
454
|
+
#
|
455
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
456
|
+
# # check the status of an operation, cancel it, or wait for results.
|
457
|
+
# # Here is how to wait for a response.
|
458
|
+
# result.wait_until_done! timeout: 60
|
459
|
+
# if result.response?
|
460
|
+
# p result.response
|
461
|
+
# else
|
462
|
+
# puts "No response received."
|
463
|
+
# end
|
464
|
+
#
|
465
|
+
def create_application request, options = nil
|
466
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
467
|
+
|
468
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::CreateApplicationRequest
|
469
|
+
|
470
|
+
# Converts hash and nil to an options object
|
471
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
472
|
+
|
473
|
+
# Customize the options with defaults
|
474
|
+
metadata = @config.rpcs.create_application.metadata.to_h
|
475
|
+
|
476
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
477
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
478
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
479
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
480
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
481
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
482
|
+
|
483
|
+
header_params = {}
|
484
|
+
if request.parent
|
485
|
+
header_params["parent"] = request.parent
|
486
|
+
end
|
487
|
+
|
488
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
489
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
490
|
+
|
491
|
+
options.apply_defaults timeout: @config.rpcs.create_application.timeout,
|
492
|
+
metadata: metadata,
|
493
|
+
retry_policy: @config.rpcs.create_application.retry_policy
|
494
|
+
|
495
|
+
options.apply_defaults timeout: @config.timeout,
|
496
|
+
metadata: @config.metadata,
|
497
|
+
retry_policy: @config.retry_policy
|
498
|
+
|
499
|
+
@app_platform_stub.call_rpc :create_application, request, options: options do |response, operation|
|
500
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
501
|
+
yield response, operation if block_given?
|
502
|
+
return response
|
503
|
+
end
|
504
|
+
rescue ::GRPC::BadStatus => e
|
505
|
+
raise ::Google::Cloud::Error.from_error(e)
|
506
|
+
end
|
507
|
+
|
508
|
+
##
|
509
|
+
# Updates the parameters of a single Application.
|
510
|
+
#
|
511
|
+
# @overload update_application(request, options = nil)
|
512
|
+
# Pass arguments to `update_application` via a request object, either of type
|
513
|
+
# {::Google::Cloud::VisionAI::V1::UpdateApplicationRequest} or an equivalent Hash.
|
514
|
+
#
|
515
|
+
# @param request [::Google::Cloud::VisionAI::V1::UpdateApplicationRequest, ::Hash]
|
516
|
+
# A request object representing the call parameters. Required. To specify no
|
517
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
518
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
519
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
520
|
+
#
|
521
|
+
# @overload update_application(update_mask: nil, application: nil, request_id: nil)
|
522
|
+
# Pass arguments to `update_application` via keyword arguments. Note that at
|
523
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
524
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
525
|
+
#
|
526
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
527
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
528
|
+
# Application resource by the update.
|
529
|
+
# The fields specified in the update_mask are relative to the resource, not
|
530
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
531
|
+
# user does not provide a mask then all fields will be overwritten.
|
532
|
+
# @param application [::Google::Cloud::VisionAI::V1::Application, ::Hash]
|
533
|
+
# Required. The resource being updated.
|
534
|
+
# @param request_id [::String]
|
535
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
536
|
+
# request ID so that if you must retry your request, the server will know to
|
537
|
+
# ignore the request if it has already been completed. The server will
|
538
|
+
# guarantee that for at least 60 minutes since the first request.
|
539
|
+
#
|
540
|
+
# For example, consider a situation where you make an initial request and
|
541
|
+
# the request times out. If you make the request again with the same request
|
542
|
+
# ID, the server can check if original operation with the same request ID
|
543
|
+
# was received, and if so, will ignore the second request. This prevents
|
544
|
+
# clients from accidentally creating duplicate commitments.
|
545
|
+
#
|
546
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
547
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
548
|
+
#
|
549
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
550
|
+
# @yieldparam response [::Gapic::Operation]
|
551
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
552
|
+
#
|
553
|
+
# @return [::Gapic::Operation]
|
554
|
+
#
|
555
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
556
|
+
#
|
557
|
+
# @example Basic example
|
558
|
+
# require "google/cloud/vision_ai/v1"
|
559
|
+
#
|
560
|
+
# # Create a client object. The client can be reused for multiple calls.
|
561
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
562
|
+
#
|
563
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
564
|
+
# request = Google::Cloud::VisionAI::V1::UpdateApplicationRequest.new
|
565
|
+
#
|
566
|
+
# # Call the update_application method.
|
567
|
+
# result = client.update_application request
|
568
|
+
#
|
569
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
570
|
+
# # check the status of an operation, cancel it, or wait for results.
|
571
|
+
# # Here is how to wait for a response.
|
572
|
+
# result.wait_until_done! timeout: 60
|
573
|
+
# if result.response?
|
574
|
+
# p result.response
|
575
|
+
# else
|
576
|
+
# puts "No response received."
|
577
|
+
# end
|
578
|
+
#
|
579
|
+
def update_application request, options = nil
|
580
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
581
|
+
|
582
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::UpdateApplicationRequest
|
583
|
+
|
584
|
+
# Converts hash and nil to an options object
|
585
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
586
|
+
|
587
|
+
# Customize the options with defaults
|
588
|
+
metadata = @config.rpcs.update_application.metadata.to_h
|
589
|
+
|
590
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
591
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
592
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
593
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
594
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
595
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
596
|
+
|
597
|
+
header_params = {}
|
598
|
+
if request.application&.name
|
599
|
+
header_params["application.name"] = request.application.name
|
600
|
+
end
|
601
|
+
|
602
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
603
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
604
|
+
|
605
|
+
options.apply_defaults timeout: @config.rpcs.update_application.timeout,
|
606
|
+
metadata: metadata,
|
607
|
+
retry_policy: @config.rpcs.update_application.retry_policy
|
608
|
+
|
609
|
+
options.apply_defaults timeout: @config.timeout,
|
610
|
+
metadata: @config.metadata,
|
611
|
+
retry_policy: @config.retry_policy
|
612
|
+
|
613
|
+
@app_platform_stub.call_rpc :update_application, request, options: options do |response, operation|
|
614
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
615
|
+
yield response, operation if block_given?
|
616
|
+
return response
|
617
|
+
end
|
618
|
+
rescue ::GRPC::BadStatus => e
|
619
|
+
raise ::Google::Cloud::Error.from_error(e)
|
620
|
+
end
|
621
|
+
|
622
|
+
##
|
623
|
+
# Deletes a single Application.
|
624
|
+
#
|
625
|
+
# @overload delete_application(request, options = nil)
|
626
|
+
# Pass arguments to `delete_application` via a request object, either of type
|
627
|
+
# {::Google::Cloud::VisionAI::V1::DeleteApplicationRequest} or an equivalent Hash.
|
628
|
+
#
|
629
|
+
# @param request [::Google::Cloud::VisionAI::V1::DeleteApplicationRequest, ::Hash]
|
630
|
+
# A request object representing the call parameters. Required. To specify no
|
631
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
632
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
633
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
634
|
+
#
|
635
|
+
# @overload delete_application(name: nil, request_id: nil, force: nil)
|
636
|
+
# Pass arguments to `delete_application` via keyword arguments. Note that at
|
637
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
638
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
639
|
+
#
|
640
|
+
# @param name [::String]
|
641
|
+
# Required. Name of the resource.
|
642
|
+
# @param request_id [::String]
|
643
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
644
|
+
# request ID so that if you must retry your request, the server will know to
|
645
|
+
# ignore the request if it has already been completed. The server will
|
646
|
+
# guarantee that for at least 60 minutes after the first request.
|
647
|
+
#
|
648
|
+
# For example, consider a situation where you make an initial request and
|
649
|
+
# the request times out. If you make the request again with the same request
|
650
|
+
# ID, the server can check if original operation with the same request ID
|
651
|
+
# was received, and if so, will ignore the second request. This prevents
|
652
|
+
# clients from accidentally creating duplicate commitments.
|
653
|
+
#
|
654
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
655
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
656
|
+
# @param force [::Boolean]
|
657
|
+
# Optional. If set to true, any instances and drafts from this application
|
658
|
+
# will also be deleted. (Otherwise, the request will only work if the
|
659
|
+
# application has no instances and drafts.)
|
660
|
+
#
|
661
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
662
|
+
# @yieldparam response [::Gapic::Operation]
|
663
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
664
|
+
#
|
665
|
+
# @return [::Gapic::Operation]
|
666
|
+
#
|
667
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
668
|
+
#
|
669
|
+
# @example Basic example
|
670
|
+
# require "google/cloud/vision_ai/v1"
|
671
|
+
#
|
672
|
+
# # Create a client object. The client can be reused for multiple calls.
|
673
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
674
|
+
#
|
675
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
676
|
+
# request = Google::Cloud::VisionAI::V1::DeleteApplicationRequest.new
|
677
|
+
#
|
678
|
+
# # Call the delete_application method.
|
679
|
+
# result = client.delete_application request
|
680
|
+
#
|
681
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
682
|
+
# # check the status of an operation, cancel it, or wait for results.
|
683
|
+
# # Here is how to wait for a response.
|
684
|
+
# result.wait_until_done! timeout: 60
|
685
|
+
# if result.response?
|
686
|
+
# p result.response
|
687
|
+
# else
|
688
|
+
# puts "No response received."
|
689
|
+
# end
|
690
|
+
#
|
691
|
+
def delete_application request, options = nil
|
692
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
693
|
+
|
694
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::DeleteApplicationRequest
|
695
|
+
|
696
|
+
# Converts hash and nil to an options object
|
697
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
698
|
+
|
699
|
+
# Customize the options with defaults
|
700
|
+
metadata = @config.rpcs.delete_application.metadata.to_h
|
701
|
+
|
702
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
703
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
704
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
705
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
706
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
707
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
708
|
+
|
709
|
+
header_params = {}
|
710
|
+
if request.name
|
711
|
+
header_params["name"] = request.name
|
712
|
+
end
|
713
|
+
|
714
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
715
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
716
|
+
|
717
|
+
options.apply_defaults timeout: @config.rpcs.delete_application.timeout,
|
718
|
+
metadata: metadata,
|
719
|
+
retry_policy: @config.rpcs.delete_application.retry_policy
|
720
|
+
|
721
|
+
options.apply_defaults timeout: @config.timeout,
|
722
|
+
metadata: @config.metadata,
|
723
|
+
retry_policy: @config.retry_policy
|
724
|
+
|
725
|
+
@app_platform_stub.call_rpc :delete_application, request, options: options do |response, operation|
|
726
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
727
|
+
yield response, operation if block_given?
|
728
|
+
return response
|
729
|
+
end
|
730
|
+
rescue ::GRPC::BadStatus => e
|
731
|
+
raise ::Google::Cloud::Error.from_error(e)
|
732
|
+
end
|
733
|
+
|
734
|
+
##
|
735
|
+
# Deploys a single Application.
|
736
|
+
#
|
737
|
+
# @overload deploy_application(request, options = nil)
|
738
|
+
# Pass arguments to `deploy_application` via a request object, either of type
|
739
|
+
# {::Google::Cloud::VisionAI::V1::DeployApplicationRequest} or an equivalent Hash.
|
740
|
+
#
|
741
|
+
# @param request [::Google::Cloud::VisionAI::V1::DeployApplicationRequest, ::Hash]
|
742
|
+
# A request object representing the call parameters. Required. To specify no
|
743
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
744
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
745
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
746
|
+
#
|
747
|
+
# @overload deploy_application(name: nil, validate_only: nil, request_id: nil, enable_monitoring: nil)
|
748
|
+
# Pass arguments to `deploy_application` via keyword arguments. Note that at
|
749
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
750
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
751
|
+
#
|
752
|
+
# @param name [::String]
|
753
|
+
# Required. the name of the application to retrieve.
|
754
|
+
# Format:
|
755
|
+
# "projects/\\{project}/locations/\\{location}/applications/\\{application}"
|
756
|
+
# @param validate_only [::Boolean]
|
757
|
+
# If set, validate the request and preview the application graph, but do not
|
758
|
+
# actually deploy it.
|
759
|
+
# @param request_id [::String]
|
760
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
761
|
+
# request ID so that if you must retry your request, the server will know to
|
762
|
+
# ignore the request if it has already been completed. The server will
|
763
|
+
# guarantee that for at least 60 minutes since the first request.
|
764
|
+
#
|
765
|
+
# For example, consider a situation where you make an initial request and
|
766
|
+
# the request times out. If you make the request again with the same request
|
767
|
+
# ID, the server can check if original operation with the same request ID
|
768
|
+
# was received, and if so, will ignore the second request. This prevents
|
769
|
+
# clients from accidentally creating duplicate commitments.
|
770
|
+
#
|
771
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
772
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
773
|
+
# @param enable_monitoring [::Boolean]
|
774
|
+
# Optional. Whether or not to enable monitoring for the application on
|
775
|
+
# deployment.
|
776
|
+
#
|
777
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
778
|
+
# @yieldparam response [::Gapic::Operation]
|
779
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
780
|
+
#
|
781
|
+
# @return [::Gapic::Operation]
|
782
|
+
#
|
783
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
784
|
+
#
|
785
|
+
# @example Basic example
|
786
|
+
# require "google/cloud/vision_ai/v1"
|
787
|
+
#
|
788
|
+
# # Create a client object. The client can be reused for multiple calls.
|
789
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
790
|
+
#
|
791
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
792
|
+
# request = Google::Cloud::VisionAI::V1::DeployApplicationRequest.new
|
793
|
+
#
|
794
|
+
# # Call the deploy_application method.
|
795
|
+
# result = client.deploy_application request
|
796
|
+
#
|
797
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
798
|
+
# # check the status of an operation, cancel it, or wait for results.
|
799
|
+
# # Here is how to wait for a response.
|
800
|
+
# result.wait_until_done! timeout: 60
|
801
|
+
# if result.response?
|
802
|
+
# p result.response
|
803
|
+
# else
|
804
|
+
# puts "No response received."
|
805
|
+
# end
|
806
|
+
#
|
807
|
+
def deploy_application request, options = nil
|
808
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
809
|
+
|
810
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::DeployApplicationRequest
|
811
|
+
|
812
|
+
# Converts hash and nil to an options object
|
813
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
814
|
+
|
815
|
+
# Customize the options with defaults
|
816
|
+
metadata = @config.rpcs.deploy_application.metadata.to_h
|
817
|
+
|
818
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
819
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
820
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
821
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
822
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
823
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
824
|
+
|
825
|
+
header_params = {}
|
826
|
+
if request.name
|
827
|
+
header_params["name"] = request.name
|
828
|
+
end
|
829
|
+
|
830
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
831
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
832
|
+
|
833
|
+
options.apply_defaults timeout: @config.rpcs.deploy_application.timeout,
|
834
|
+
metadata: metadata,
|
835
|
+
retry_policy: @config.rpcs.deploy_application.retry_policy
|
836
|
+
|
837
|
+
options.apply_defaults timeout: @config.timeout,
|
838
|
+
metadata: @config.metadata,
|
839
|
+
retry_policy: @config.retry_policy
|
840
|
+
|
841
|
+
@app_platform_stub.call_rpc :deploy_application, request, options: options do |response, operation|
|
842
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
843
|
+
yield response, operation if block_given?
|
844
|
+
return response
|
845
|
+
end
|
846
|
+
rescue ::GRPC::BadStatus => e
|
847
|
+
raise ::Google::Cloud::Error.from_error(e)
|
848
|
+
end
|
849
|
+
|
850
|
+
##
|
851
|
+
# Undeploys a single Application.
|
852
|
+
#
|
853
|
+
# @overload undeploy_application(request, options = nil)
|
854
|
+
# Pass arguments to `undeploy_application` via a request object, either of type
|
855
|
+
# {::Google::Cloud::VisionAI::V1::UndeployApplicationRequest} or an equivalent Hash.
|
856
|
+
#
|
857
|
+
# @param request [::Google::Cloud::VisionAI::V1::UndeployApplicationRequest, ::Hash]
|
858
|
+
# A request object representing the call parameters. Required. To specify no
|
859
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
860
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
861
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
862
|
+
#
|
863
|
+
# @overload undeploy_application(name: nil, request_id: nil)
|
864
|
+
# Pass arguments to `undeploy_application` via keyword arguments. Note that at
|
865
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
866
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
867
|
+
#
|
868
|
+
# @param name [::String]
|
869
|
+
# Required. the name of the application to retrieve.
|
870
|
+
# Format:
|
871
|
+
# "projects/\\{project}/locations/\\{location}/applications/\\{application}"
|
872
|
+
# @param request_id [::String]
|
873
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
874
|
+
# request ID so that if you must retry your request, the server will know to
|
875
|
+
# ignore the request if it has already been completed. The server will
|
876
|
+
# guarantee that for at least 60 minutes since the first request.
|
877
|
+
#
|
878
|
+
# For example, consider a situation where you make an initial request and
|
879
|
+
# the request times out. If you make the request again with the same request
|
880
|
+
# ID, the server can check if original operation with the same request ID
|
881
|
+
# was received, and if so, will ignore the second request. This prevents
|
882
|
+
# clients from accidentally creating duplicate commitments.
|
883
|
+
#
|
884
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
885
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
886
|
+
#
|
887
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
888
|
+
# @yieldparam response [::Gapic::Operation]
|
889
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
890
|
+
#
|
891
|
+
# @return [::Gapic::Operation]
|
892
|
+
#
|
893
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
894
|
+
#
|
895
|
+
# @example Basic example
|
896
|
+
# require "google/cloud/vision_ai/v1"
|
897
|
+
#
|
898
|
+
# # Create a client object. The client can be reused for multiple calls.
|
899
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
900
|
+
#
|
901
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
902
|
+
# request = Google::Cloud::VisionAI::V1::UndeployApplicationRequest.new
|
903
|
+
#
|
904
|
+
# # Call the undeploy_application method.
|
905
|
+
# result = client.undeploy_application request
|
906
|
+
#
|
907
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
908
|
+
# # check the status of an operation, cancel it, or wait for results.
|
909
|
+
# # Here is how to wait for a response.
|
910
|
+
# result.wait_until_done! timeout: 60
|
911
|
+
# if result.response?
|
912
|
+
# p result.response
|
913
|
+
# else
|
914
|
+
# puts "No response received."
|
915
|
+
# end
|
916
|
+
#
|
917
|
+
def undeploy_application request, options = nil
|
918
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
919
|
+
|
920
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::UndeployApplicationRequest
|
921
|
+
|
922
|
+
# Converts hash and nil to an options object
|
923
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
924
|
+
|
925
|
+
# Customize the options with defaults
|
926
|
+
metadata = @config.rpcs.undeploy_application.metadata.to_h
|
927
|
+
|
928
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
929
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
930
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
931
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
932
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
933
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
934
|
+
|
935
|
+
header_params = {}
|
936
|
+
if request.name
|
937
|
+
header_params["name"] = request.name
|
938
|
+
end
|
939
|
+
|
940
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
941
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
942
|
+
|
943
|
+
options.apply_defaults timeout: @config.rpcs.undeploy_application.timeout,
|
944
|
+
metadata: metadata,
|
945
|
+
retry_policy: @config.rpcs.undeploy_application.retry_policy
|
946
|
+
|
947
|
+
options.apply_defaults timeout: @config.timeout,
|
948
|
+
metadata: @config.metadata,
|
949
|
+
retry_policy: @config.retry_policy
|
950
|
+
|
951
|
+
@app_platform_stub.call_rpc :undeploy_application, request, options: options do |response, operation|
|
952
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
953
|
+
yield response, operation if block_given?
|
954
|
+
return response
|
955
|
+
end
|
956
|
+
rescue ::GRPC::BadStatus => e
|
957
|
+
raise ::Google::Cloud::Error.from_error(e)
|
958
|
+
end
|
959
|
+
|
960
|
+
##
|
961
|
+
# Adds target stream input to the Application.
|
962
|
+
# If the Application is deployed, the corresponding new Application instance
|
963
|
+
# will be created. If the stream has already been in the Application, the RPC
|
964
|
+
# will fail.
|
965
|
+
#
|
966
|
+
# @overload add_application_stream_input(request, options = nil)
|
967
|
+
# Pass arguments to `add_application_stream_input` via a request object, either of type
|
968
|
+
# {::Google::Cloud::VisionAI::V1::AddApplicationStreamInputRequest} or an equivalent Hash.
|
969
|
+
#
|
970
|
+
# @param request [::Google::Cloud::VisionAI::V1::AddApplicationStreamInputRequest, ::Hash]
|
971
|
+
# A request object representing the call parameters. Required. To specify no
|
972
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
973
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
974
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
975
|
+
#
|
976
|
+
# @overload add_application_stream_input(name: nil, application_stream_inputs: nil, request_id: nil)
|
977
|
+
# Pass arguments to `add_application_stream_input` via keyword arguments. Note that at
|
978
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
979
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
980
|
+
#
|
981
|
+
# @param name [::String]
|
982
|
+
# Required. the name of the application to retrieve.
|
983
|
+
# Format:
|
984
|
+
# "projects/\\{project}/locations/\\{location}/applications/\\{application}"
|
985
|
+
# @param application_stream_inputs [::Array<::Google::Cloud::VisionAI::V1::ApplicationStreamInput, ::Hash>]
|
986
|
+
# The stream inputs to add, the stream resource name is the key of each
|
987
|
+
# StreamInput, and it must be unique within each application.
|
988
|
+
# @param request_id [::String]
|
989
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
990
|
+
# request ID so that if you must retry your request, the server will know to
|
991
|
+
# ignore the request if it has already been completed. The server will
|
992
|
+
# guarantee that for at least 60 minutes since the first request.
|
993
|
+
#
|
994
|
+
# For example, consider a situation where you make an initial request and
|
995
|
+
# the request times out. If you make the request again with the same request
|
996
|
+
# ID, the server can check if original operation with the same request ID
|
997
|
+
# was received, and if so, will ignore the second request. This prevents
|
998
|
+
# clients from accidentally creating duplicate commitments.
|
999
|
+
#
|
1000
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1001
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1002
|
+
#
|
1003
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1004
|
+
# @yieldparam response [::Gapic::Operation]
|
1005
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1006
|
+
#
|
1007
|
+
# @return [::Gapic::Operation]
|
1008
|
+
#
|
1009
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1010
|
+
#
|
1011
|
+
# @example Basic example
|
1012
|
+
# require "google/cloud/vision_ai/v1"
|
1013
|
+
#
|
1014
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1015
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
1016
|
+
#
|
1017
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1018
|
+
# request = Google::Cloud::VisionAI::V1::AddApplicationStreamInputRequest.new
|
1019
|
+
#
|
1020
|
+
# # Call the add_application_stream_input method.
|
1021
|
+
# result = client.add_application_stream_input request
|
1022
|
+
#
|
1023
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1024
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1025
|
+
# # Here is how to wait for a response.
|
1026
|
+
# result.wait_until_done! timeout: 60
|
1027
|
+
# if result.response?
|
1028
|
+
# p result.response
|
1029
|
+
# else
|
1030
|
+
# puts "No response received."
|
1031
|
+
# end
|
1032
|
+
#
|
1033
|
+
def add_application_stream_input request, options = nil
|
1034
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1035
|
+
|
1036
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::AddApplicationStreamInputRequest
|
1037
|
+
|
1038
|
+
# Converts hash and nil to an options object
|
1039
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1040
|
+
|
1041
|
+
# Customize the options with defaults
|
1042
|
+
metadata = @config.rpcs.add_application_stream_input.metadata.to_h
|
1043
|
+
|
1044
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1045
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1046
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1047
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
1048
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1049
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1050
|
+
|
1051
|
+
header_params = {}
|
1052
|
+
if request.name
|
1053
|
+
header_params["name"] = request.name
|
1054
|
+
end
|
1055
|
+
|
1056
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1057
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1058
|
+
|
1059
|
+
options.apply_defaults timeout: @config.rpcs.add_application_stream_input.timeout,
|
1060
|
+
metadata: metadata,
|
1061
|
+
retry_policy: @config.rpcs.add_application_stream_input.retry_policy
|
1062
|
+
|
1063
|
+
options.apply_defaults timeout: @config.timeout,
|
1064
|
+
metadata: @config.metadata,
|
1065
|
+
retry_policy: @config.retry_policy
|
1066
|
+
|
1067
|
+
@app_platform_stub.call_rpc :add_application_stream_input, request, options: options do |response, operation|
|
1068
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1069
|
+
yield response, operation if block_given?
|
1070
|
+
return response
|
1071
|
+
end
|
1072
|
+
rescue ::GRPC::BadStatus => e
|
1073
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1074
|
+
end
|
1075
|
+
|
1076
|
+
##
|
1077
|
+
# Remove target stream input to the Application, if the Application is
|
1078
|
+
# deployed, the corresponding instance based will be deleted. If the stream
|
1079
|
+
# is not in the Application, the RPC will fail.
|
1080
|
+
#
|
1081
|
+
# @overload remove_application_stream_input(request, options = nil)
|
1082
|
+
# Pass arguments to `remove_application_stream_input` via a request object, either of type
|
1083
|
+
# {::Google::Cloud::VisionAI::V1::RemoveApplicationStreamInputRequest} or an equivalent Hash.
|
1084
|
+
#
|
1085
|
+
# @param request [::Google::Cloud::VisionAI::V1::RemoveApplicationStreamInputRequest, ::Hash]
|
1086
|
+
# A request object representing the call parameters. Required. To specify no
|
1087
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1088
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1089
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1090
|
+
#
|
1091
|
+
# @overload remove_application_stream_input(name: nil, target_stream_inputs: nil, request_id: nil)
|
1092
|
+
# Pass arguments to `remove_application_stream_input` via keyword arguments. Note that at
|
1093
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1094
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1095
|
+
#
|
1096
|
+
# @param name [::String]
|
1097
|
+
# Required. the name of the application to retrieve.
|
1098
|
+
# Format:
|
1099
|
+
# "projects/\\{project}/locations/\\{location}/applications/\\{application}"
|
1100
|
+
# @param target_stream_inputs [::Array<::Google::Cloud::VisionAI::V1::RemoveApplicationStreamInputRequest::TargetStreamInput, ::Hash>]
|
1101
|
+
# The target stream to remove.
|
1102
|
+
# @param request_id [::String]
|
1103
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1104
|
+
# request ID so that if you must retry your request, the server will know to
|
1105
|
+
# ignore the request if it has already been completed. The server will
|
1106
|
+
# guarantee that for at least 60 minutes since the first request.
|
1107
|
+
#
|
1108
|
+
# For example, consider a situation where you make an initial request and
|
1109
|
+
# the request times out. If you make the request again with the same request
|
1110
|
+
# ID, the server can check if original operation with the same request ID
|
1111
|
+
# was received, and if so, will ignore the second request. This prevents
|
1112
|
+
# clients from accidentally creating duplicate commitments.
|
1113
|
+
#
|
1114
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1115
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1116
|
+
#
|
1117
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1118
|
+
# @yieldparam response [::Gapic::Operation]
|
1119
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1120
|
+
#
|
1121
|
+
# @return [::Gapic::Operation]
|
1122
|
+
#
|
1123
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1124
|
+
#
|
1125
|
+
# @example Basic example
|
1126
|
+
# require "google/cloud/vision_ai/v1"
|
1127
|
+
#
|
1128
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1129
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
1130
|
+
#
|
1131
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1132
|
+
# request = Google::Cloud::VisionAI::V1::RemoveApplicationStreamInputRequest.new
|
1133
|
+
#
|
1134
|
+
# # Call the remove_application_stream_input method.
|
1135
|
+
# result = client.remove_application_stream_input request
|
1136
|
+
#
|
1137
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1138
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1139
|
+
# # Here is how to wait for a response.
|
1140
|
+
# result.wait_until_done! timeout: 60
|
1141
|
+
# if result.response?
|
1142
|
+
# p result.response
|
1143
|
+
# else
|
1144
|
+
# puts "No response received."
|
1145
|
+
# end
|
1146
|
+
#
|
1147
|
+
def remove_application_stream_input request, options = nil
|
1148
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1149
|
+
|
1150
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::RemoveApplicationStreamInputRequest
|
1151
|
+
|
1152
|
+
# Converts hash and nil to an options object
|
1153
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1154
|
+
|
1155
|
+
# Customize the options with defaults
|
1156
|
+
metadata = @config.rpcs.remove_application_stream_input.metadata.to_h
|
1157
|
+
|
1158
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1159
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1160
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1161
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
1162
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1163
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1164
|
+
|
1165
|
+
header_params = {}
|
1166
|
+
if request.name
|
1167
|
+
header_params["name"] = request.name
|
1168
|
+
end
|
1169
|
+
|
1170
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1171
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1172
|
+
|
1173
|
+
options.apply_defaults timeout: @config.rpcs.remove_application_stream_input.timeout,
|
1174
|
+
metadata: metadata,
|
1175
|
+
retry_policy: @config.rpcs.remove_application_stream_input.retry_policy
|
1176
|
+
|
1177
|
+
options.apply_defaults timeout: @config.timeout,
|
1178
|
+
metadata: @config.metadata,
|
1179
|
+
retry_policy: @config.retry_policy
|
1180
|
+
|
1181
|
+
@app_platform_stub.call_rpc :remove_application_stream_input, request, options: options do |response, operation|
|
1182
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1183
|
+
yield response, operation if block_given?
|
1184
|
+
return response
|
1185
|
+
end
|
1186
|
+
rescue ::GRPC::BadStatus => e
|
1187
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1188
|
+
end
|
1189
|
+
|
1190
|
+
##
|
1191
|
+
# Update target stream input to the Application, if the Application is
|
1192
|
+
# deployed, the corresponding instance based will be deployed. For
|
1193
|
+
# CreateOrUpdate behavior, set allow_missing to true.
|
1194
|
+
#
|
1195
|
+
# @overload update_application_stream_input(request, options = nil)
|
1196
|
+
# Pass arguments to `update_application_stream_input` via a request object, either of type
|
1197
|
+
# {::Google::Cloud::VisionAI::V1::UpdateApplicationStreamInputRequest} or an equivalent Hash.
|
1198
|
+
#
|
1199
|
+
# @param request [::Google::Cloud::VisionAI::V1::UpdateApplicationStreamInputRequest, ::Hash]
|
1200
|
+
# A request object representing the call parameters. Required. To specify no
|
1201
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1202
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1203
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1204
|
+
#
|
1205
|
+
# @overload update_application_stream_input(name: nil, application_stream_inputs: nil, request_id: nil, allow_missing: nil)
|
1206
|
+
# Pass arguments to `update_application_stream_input` via keyword arguments. Note that at
|
1207
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1208
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1209
|
+
#
|
1210
|
+
# @param name [::String]
|
1211
|
+
# Required. the name of the application to retrieve.
|
1212
|
+
# Format:
|
1213
|
+
# "projects/\\{project}/locations/\\{location}/applications/\\{application}"
|
1214
|
+
# @param application_stream_inputs [::Array<::Google::Cloud::VisionAI::V1::ApplicationStreamInput, ::Hash>]
|
1215
|
+
# The stream inputs to update, the stream resource name is the key of each
|
1216
|
+
# StreamInput, and it must be unique within each application.
|
1217
|
+
# @param request_id [::String]
|
1218
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1219
|
+
# request ID so that if you must retry your request, the server will know to
|
1220
|
+
# ignore the request if it has already been completed. The server will
|
1221
|
+
# guarantee that for at least 60 minutes since the first request.
|
1222
|
+
#
|
1223
|
+
# For example, consider a situation where you make an initial request and
|
1224
|
+
# the request times out. If you make the request again with the same request
|
1225
|
+
# ID, the server can check if original operation with the same request ID
|
1226
|
+
# was received, and if so, will ignore the second request. This prevents
|
1227
|
+
# clients from accidentally creating duplicate commitments.
|
1228
|
+
#
|
1229
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1230
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1231
|
+
# @param allow_missing [::Boolean]
|
1232
|
+
# If true, UpdateApplicationStreamInput will insert stream input to
|
1233
|
+
# application even if the target stream is not included in the application.
|
1234
|
+
#
|
1235
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1236
|
+
# @yieldparam response [::Gapic::Operation]
|
1237
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1238
|
+
#
|
1239
|
+
# @return [::Gapic::Operation]
|
1240
|
+
#
|
1241
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1242
|
+
#
|
1243
|
+
# @example Basic example
|
1244
|
+
# require "google/cloud/vision_ai/v1"
|
1245
|
+
#
|
1246
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1247
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
1248
|
+
#
|
1249
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1250
|
+
# request = Google::Cloud::VisionAI::V1::UpdateApplicationStreamInputRequest.new
|
1251
|
+
#
|
1252
|
+
# # Call the update_application_stream_input method.
|
1253
|
+
# result = client.update_application_stream_input request
|
1254
|
+
#
|
1255
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1256
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1257
|
+
# # Here is how to wait for a response.
|
1258
|
+
# result.wait_until_done! timeout: 60
|
1259
|
+
# if result.response?
|
1260
|
+
# p result.response
|
1261
|
+
# else
|
1262
|
+
# puts "No response received."
|
1263
|
+
# end
|
1264
|
+
#
|
1265
|
+
def update_application_stream_input request, options = nil
|
1266
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1267
|
+
|
1268
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::UpdateApplicationStreamInputRequest
|
1269
|
+
|
1270
|
+
# Converts hash and nil to an options object
|
1271
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1272
|
+
|
1273
|
+
# Customize the options with defaults
|
1274
|
+
metadata = @config.rpcs.update_application_stream_input.metadata.to_h
|
1275
|
+
|
1276
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1277
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1278
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1279
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
1280
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1281
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1282
|
+
|
1283
|
+
header_params = {}
|
1284
|
+
if request.name
|
1285
|
+
header_params["name"] = request.name
|
1286
|
+
end
|
1287
|
+
|
1288
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1289
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1290
|
+
|
1291
|
+
options.apply_defaults timeout: @config.rpcs.update_application_stream_input.timeout,
|
1292
|
+
metadata: metadata,
|
1293
|
+
retry_policy: @config.rpcs.update_application_stream_input.retry_policy
|
1294
|
+
|
1295
|
+
options.apply_defaults timeout: @config.timeout,
|
1296
|
+
metadata: @config.metadata,
|
1297
|
+
retry_policy: @config.retry_policy
|
1298
|
+
|
1299
|
+
@app_platform_stub.call_rpc :update_application_stream_input, request, options: options do |response, operation|
|
1300
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1301
|
+
yield response, operation if block_given?
|
1302
|
+
return response
|
1303
|
+
end
|
1304
|
+
rescue ::GRPC::BadStatus => e
|
1305
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1306
|
+
end
|
1307
|
+
|
1308
|
+
##
|
1309
|
+
# Lists Instances in a given project and location.
|
1310
|
+
#
|
1311
|
+
# @overload list_instances(request, options = nil)
|
1312
|
+
# Pass arguments to `list_instances` via a request object, either of type
|
1313
|
+
# {::Google::Cloud::VisionAI::V1::ListInstancesRequest} or an equivalent Hash.
|
1314
|
+
#
|
1315
|
+
# @param request [::Google::Cloud::VisionAI::V1::ListInstancesRequest, ::Hash]
|
1316
|
+
# A request object representing the call parameters. Required. To specify no
|
1317
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1318
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1319
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1320
|
+
#
|
1321
|
+
# @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1322
|
+
# Pass arguments to `list_instances` via keyword arguments. Note that at
|
1323
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1324
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1325
|
+
#
|
1326
|
+
# @param parent [::String]
|
1327
|
+
# Required. Parent value for ListInstancesRequest.
|
1328
|
+
# @param page_size [::Integer]
|
1329
|
+
# Requested page size. Server may return fewer items than requested.
|
1330
|
+
# If unspecified, server will pick an appropriate default.
|
1331
|
+
# @param page_token [::String]
|
1332
|
+
# A token identifying a page of results the server should return.
|
1333
|
+
# @param filter [::String]
|
1334
|
+
# Filtering results.
|
1335
|
+
# @param order_by [::String]
|
1336
|
+
# Hint for how to order the results.
|
1337
|
+
#
|
1338
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1339
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Instance>]
|
1340
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1341
|
+
#
|
1342
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Instance>]
|
1343
|
+
#
|
1344
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1345
|
+
#
|
1346
|
+
# @example Basic example
|
1347
|
+
# require "google/cloud/vision_ai/v1"
|
1348
|
+
#
|
1349
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1350
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
1351
|
+
#
|
1352
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1353
|
+
# request = Google::Cloud::VisionAI::V1::ListInstancesRequest.new
|
1354
|
+
#
|
1355
|
+
# # Call the list_instances method.
|
1356
|
+
# result = client.list_instances request
|
1357
|
+
#
|
1358
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1359
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1360
|
+
# result.each do |item|
|
1361
|
+
# # Each element is of type ::Google::Cloud::VisionAI::V1::Instance.
|
1362
|
+
# p item
|
1363
|
+
# end
|
1364
|
+
#
|
1365
|
+
def list_instances request, options = nil
|
1366
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1367
|
+
|
1368
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::ListInstancesRequest
|
1369
|
+
|
1370
|
+
# Converts hash and nil to an options object
|
1371
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1372
|
+
|
1373
|
+
# Customize the options with defaults
|
1374
|
+
metadata = @config.rpcs.list_instances.metadata.to_h
|
1375
|
+
|
1376
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1377
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1378
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1379
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
1380
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1381
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1382
|
+
|
1383
|
+
header_params = {}
|
1384
|
+
if request.parent
|
1385
|
+
header_params["parent"] = request.parent
|
1386
|
+
end
|
1387
|
+
|
1388
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1389
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1390
|
+
|
1391
|
+
options.apply_defaults timeout: @config.rpcs.list_instances.timeout,
|
1392
|
+
metadata: metadata,
|
1393
|
+
retry_policy: @config.rpcs.list_instances.retry_policy
|
1394
|
+
|
1395
|
+
options.apply_defaults timeout: @config.timeout,
|
1396
|
+
metadata: @config.metadata,
|
1397
|
+
retry_policy: @config.retry_policy
|
1398
|
+
|
1399
|
+
@app_platform_stub.call_rpc :list_instances, request, options: options do |response, operation|
|
1400
|
+
response = ::Gapic::PagedEnumerable.new @app_platform_stub, :list_instances, request, response, operation, options
|
1401
|
+
yield response, operation if block_given?
|
1402
|
+
return response
|
1403
|
+
end
|
1404
|
+
rescue ::GRPC::BadStatus => e
|
1405
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1406
|
+
end
|
1407
|
+
|
1408
|
+
##
|
1409
|
+
# Gets details of a single Instance.
|
1410
|
+
#
|
1411
|
+
# @overload get_instance(request, options = nil)
|
1412
|
+
# Pass arguments to `get_instance` via a request object, either of type
|
1413
|
+
# {::Google::Cloud::VisionAI::V1::GetInstanceRequest} or an equivalent Hash.
|
1414
|
+
#
|
1415
|
+
# @param request [::Google::Cloud::VisionAI::V1::GetInstanceRequest, ::Hash]
|
1416
|
+
# A request object representing the call parameters. Required. To specify no
|
1417
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1418
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1419
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1420
|
+
#
|
1421
|
+
# @overload get_instance(name: nil)
|
1422
|
+
# Pass arguments to `get_instance` via keyword arguments. Note that at
|
1423
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1424
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1425
|
+
#
|
1426
|
+
# @param name [::String]
|
1427
|
+
# Required. Name of the resource.
|
1428
|
+
#
|
1429
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1430
|
+
# @yieldparam response [::Google::Cloud::VisionAI::V1::Instance]
|
1431
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1432
|
+
#
|
1433
|
+
# @return [::Google::Cloud::VisionAI::V1::Instance]
|
1434
|
+
#
|
1435
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1436
|
+
#
|
1437
|
+
# @example Basic example
|
1438
|
+
# require "google/cloud/vision_ai/v1"
|
1439
|
+
#
|
1440
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1441
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
1442
|
+
#
|
1443
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1444
|
+
# request = Google::Cloud::VisionAI::V1::GetInstanceRequest.new
|
1445
|
+
#
|
1446
|
+
# # Call the get_instance method.
|
1447
|
+
# result = client.get_instance request
|
1448
|
+
#
|
1449
|
+
# # The returned object is of type Google::Cloud::VisionAI::V1::Instance.
|
1450
|
+
# p result
|
1451
|
+
#
|
1452
|
+
def get_instance request, options = nil
|
1453
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1454
|
+
|
1455
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::GetInstanceRequest
|
1456
|
+
|
1457
|
+
# Converts hash and nil to an options object
|
1458
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1459
|
+
|
1460
|
+
# Customize the options with defaults
|
1461
|
+
metadata = @config.rpcs.get_instance.metadata.to_h
|
1462
|
+
|
1463
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1464
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1465
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1466
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
1467
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1468
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1469
|
+
|
1470
|
+
header_params = {}
|
1471
|
+
if request.name
|
1472
|
+
header_params["name"] = request.name
|
1473
|
+
end
|
1474
|
+
|
1475
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1476
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1477
|
+
|
1478
|
+
options.apply_defaults timeout: @config.rpcs.get_instance.timeout,
|
1479
|
+
metadata: metadata,
|
1480
|
+
retry_policy: @config.rpcs.get_instance.retry_policy
|
1481
|
+
|
1482
|
+
options.apply_defaults timeout: @config.timeout,
|
1483
|
+
metadata: @config.metadata,
|
1484
|
+
retry_policy: @config.retry_policy
|
1485
|
+
|
1486
|
+
@app_platform_stub.call_rpc :get_instance, request, options: options do |response, operation|
|
1487
|
+
yield response, operation if block_given?
|
1488
|
+
return response
|
1489
|
+
end
|
1490
|
+
rescue ::GRPC::BadStatus => e
|
1491
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1492
|
+
end
|
1493
|
+
|
1494
|
+
##
|
1495
|
+
# Adds target stream input to the Application.
|
1496
|
+
# If the Application is deployed, the corresponding new Application instance
|
1497
|
+
# will be created. If the stream has already been in the Application, the RPC
|
1498
|
+
# will fail.
|
1499
|
+
#
|
1500
|
+
# @overload create_application_instances(request, options = nil)
|
1501
|
+
# Pass arguments to `create_application_instances` via a request object, either of type
|
1502
|
+
# {::Google::Cloud::VisionAI::V1::CreateApplicationInstancesRequest} or an equivalent Hash.
|
1503
|
+
#
|
1504
|
+
# @param request [::Google::Cloud::VisionAI::V1::CreateApplicationInstancesRequest, ::Hash]
|
1505
|
+
# A request object representing the call parameters. Required. To specify no
|
1506
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1507
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1508
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1509
|
+
#
|
1510
|
+
# @overload create_application_instances(name: nil, application_instances: nil, request_id: nil)
|
1511
|
+
# Pass arguments to `create_application_instances` via keyword arguments. Note that at
|
1512
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1513
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1514
|
+
#
|
1515
|
+
# @param name [::String]
|
1516
|
+
# Required. the name of the application to retrieve.
|
1517
|
+
# Format:
|
1518
|
+
# "projects/\\{project}/locations/\\{location}/applications/\\{application}"
|
1519
|
+
# @param application_instances [::Array<::Google::Cloud::VisionAI::V1::ApplicationInstance, ::Hash>]
|
1520
|
+
# Required. The resources being created.
|
1521
|
+
# @param request_id [::String]
|
1522
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1523
|
+
# request ID so that if you must retry your request, the server will know to
|
1524
|
+
# ignore the request if it has already been completed. The server will
|
1525
|
+
# guarantee that for at least 60 minutes since the first request.
|
1526
|
+
#
|
1527
|
+
# For example, consider a situation where you make an initial request and
|
1528
|
+
# the request times out. If you make the request again with the same request
|
1529
|
+
# ID, the server can check if original operation with the same request ID
|
1530
|
+
# was received, and if so, will ignore the second request. This prevents
|
1531
|
+
# clients from accidentally creating duplicate commitments.
|
1532
|
+
#
|
1533
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1534
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1535
|
+
#
|
1536
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1537
|
+
# @yieldparam response [::Gapic::Operation]
|
1538
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1539
|
+
#
|
1540
|
+
# @return [::Gapic::Operation]
|
1541
|
+
#
|
1542
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1543
|
+
#
|
1544
|
+
# @example Basic example
|
1545
|
+
# require "google/cloud/vision_ai/v1"
|
1546
|
+
#
|
1547
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1548
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
1549
|
+
#
|
1550
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1551
|
+
# request = Google::Cloud::VisionAI::V1::CreateApplicationInstancesRequest.new
|
1552
|
+
#
|
1553
|
+
# # Call the create_application_instances method.
|
1554
|
+
# result = client.create_application_instances request
|
1555
|
+
#
|
1556
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1557
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1558
|
+
# # Here is how to wait for a response.
|
1559
|
+
# result.wait_until_done! timeout: 60
|
1560
|
+
# if result.response?
|
1561
|
+
# p result.response
|
1562
|
+
# else
|
1563
|
+
# puts "No response received."
|
1564
|
+
# end
|
1565
|
+
#
|
1566
|
+
def create_application_instances request, options = nil
|
1567
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1568
|
+
|
1569
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::CreateApplicationInstancesRequest
|
1570
|
+
|
1571
|
+
# Converts hash and nil to an options object
|
1572
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1573
|
+
|
1574
|
+
# Customize the options with defaults
|
1575
|
+
metadata = @config.rpcs.create_application_instances.metadata.to_h
|
1576
|
+
|
1577
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1578
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1579
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1580
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
1581
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1582
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1583
|
+
|
1584
|
+
header_params = {}
|
1585
|
+
if request.name
|
1586
|
+
header_params["name"] = request.name
|
1587
|
+
end
|
1588
|
+
|
1589
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1590
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1591
|
+
|
1592
|
+
options.apply_defaults timeout: @config.rpcs.create_application_instances.timeout,
|
1593
|
+
metadata: metadata,
|
1594
|
+
retry_policy: @config.rpcs.create_application_instances.retry_policy
|
1595
|
+
|
1596
|
+
options.apply_defaults timeout: @config.timeout,
|
1597
|
+
metadata: @config.metadata,
|
1598
|
+
retry_policy: @config.retry_policy
|
1599
|
+
|
1600
|
+
@app_platform_stub.call_rpc :create_application_instances, request, options: options do |response, operation|
|
1601
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1602
|
+
yield response, operation if block_given?
|
1603
|
+
return response
|
1604
|
+
end
|
1605
|
+
rescue ::GRPC::BadStatus => e
|
1606
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1607
|
+
end
|
1608
|
+
|
1609
|
+
##
|
1610
|
+
# Remove target stream input to the Application, if the Application is
|
1611
|
+
# deployed, the corresponding instance based will be deleted. If the stream
|
1612
|
+
# is not in the Application, the RPC will fail.
|
1613
|
+
#
|
1614
|
+
# @overload delete_application_instances(request, options = nil)
|
1615
|
+
# Pass arguments to `delete_application_instances` via a request object, either of type
|
1616
|
+
# {::Google::Cloud::VisionAI::V1::DeleteApplicationInstancesRequest} or an equivalent Hash.
|
1617
|
+
#
|
1618
|
+
# @param request [::Google::Cloud::VisionAI::V1::DeleteApplicationInstancesRequest, ::Hash]
|
1619
|
+
# A request object representing the call parameters. Required. To specify no
|
1620
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1621
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1622
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1623
|
+
#
|
1624
|
+
# @overload delete_application_instances(name: nil, instance_ids: nil, request_id: nil)
|
1625
|
+
# Pass arguments to `delete_application_instances` via keyword arguments. Note that at
|
1626
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1627
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1628
|
+
#
|
1629
|
+
# @param name [::String]
|
1630
|
+
# Required. the name of the application to retrieve.
|
1631
|
+
# Format:
|
1632
|
+
# "projects/\\{project}/locations/\\{location}/applications/\\{application}"
|
1633
|
+
# @param instance_ids [::Array<::String>]
|
1634
|
+
# Required. Id of the requesting object.
|
1635
|
+
# @param request_id [::String]
|
1636
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1637
|
+
# request ID so that if you must retry your request, the server will know to
|
1638
|
+
# ignore the request if it has already been completed. The server will
|
1639
|
+
# guarantee that for at least 60 minutes since the first request.
|
1640
|
+
#
|
1641
|
+
# For example, consider a situation where you make an initial request and
|
1642
|
+
# the request times out. If you make the request again with the same request
|
1643
|
+
# ID, the server can check if original operation with the same request ID
|
1644
|
+
# was received, and if so, will ignore the second request. This prevents
|
1645
|
+
# clients from accidentally creating duplicate commitments.
|
1646
|
+
#
|
1647
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1648
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1649
|
+
#
|
1650
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1651
|
+
# @yieldparam response [::Gapic::Operation]
|
1652
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1653
|
+
#
|
1654
|
+
# @return [::Gapic::Operation]
|
1655
|
+
#
|
1656
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1657
|
+
#
|
1658
|
+
# @example Basic example
|
1659
|
+
# require "google/cloud/vision_ai/v1"
|
1660
|
+
#
|
1661
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1662
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
1663
|
+
#
|
1664
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1665
|
+
# request = Google::Cloud::VisionAI::V1::DeleteApplicationInstancesRequest.new
|
1666
|
+
#
|
1667
|
+
# # Call the delete_application_instances method.
|
1668
|
+
# result = client.delete_application_instances request
|
1669
|
+
#
|
1670
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1671
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1672
|
+
# # Here is how to wait for a response.
|
1673
|
+
# result.wait_until_done! timeout: 60
|
1674
|
+
# if result.response?
|
1675
|
+
# p result.response
|
1676
|
+
# else
|
1677
|
+
# puts "No response received."
|
1678
|
+
# end
|
1679
|
+
#
|
1680
|
+
def delete_application_instances request, options = nil
|
1681
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1682
|
+
|
1683
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::DeleteApplicationInstancesRequest
|
1684
|
+
|
1685
|
+
# Converts hash and nil to an options object
|
1686
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1687
|
+
|
1688
|
+
# Customize the options with defaults
|
1689
|
+
metadata = @config.rpcs.delete_application_instances.metadata.to_h
|
1690
|
+
|
1691
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1692
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1693
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1694
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
1695
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1696
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1697
|
+
|
1698
|
+
header_params = {}
|
1699
|
+
if request.name
|
1700
|
+
header_params["name"] = request.name
|
1701
|
+
end
|
1702
|
+
|
1703
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1704
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1705
|
+
|
1706
|
+
options.apply_defaults timeout: @config.rpcs.delete_application_instances.timeout,
|
1707
|
+
metadata: metadata,
|
1708
|
+
retry_policy: @config.rpcs.delete_application_instances.retry_policy
|
1709
|
+
|
1710
|
+
options.apply_defaults timeout: @config.timeout,
|
1711
|
+
metadata: @config.metadata,
|
1712
|
+
retry_policy: @config.retry_policy
|
1713
|
+
|
1714
|
+
@app_platform_stub.call_rpc :delete_application_instances, request, options: options do |response, operation|
|
1715
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1716
|
+
yield response, operation if block_given?
|
1717
|
+
return response
|
1718
|
+
end
|
1719
|
+
rescue ::GRPC::BadStatus => e
|
1720
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1721
|
+
end
|
1722
|
+
|
1723
|
+
##
|
1724
|
+
# Adds target stream input to the Application.
|
1725
|
+
# If the Application is deployed, the corresponding new Application instance
|
1726
|
+
# will be created. If the stream has already been in the Application, the RPC
|
1727
|
+
# will fail.
|
1728
|
+
#
|
1729
|
+
# @overload update_application_instances(request, options = nil)
|
1730
|
+
# Pass arguments to `update_application_instances` via a request object, either of type
|
1731
|
+
# {::Google::Cloud::VisionAI::V1::UpdateApplicationInstancesRequest} or an equivalent Hash.
|
1732
|
+
#
|
1733
|
+
# @param request [::Google::Cloud::VisionAI::V1::UpdateApplicationInstancesRequest, ::Hash]
|
1734
|
+
# A request object representing the call parameters. Required. To specify no
|
1735
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1736
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1737
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1738
|
+
#
|
1739
|
+
# @overload update_application_instances(name: nil, application_instances: nil, request_id: nil, allow_missing: nil)
|
1740
|
+
# Pass arguments to `update_application_instances` via keyword arguments. Note that at
|
1741
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1742
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1743
|
+
#
|
1744
|
+
# @param name [::String]
|
1745
|
+
# Required. the name of the application to retrieve.
|
1746
|
+
# Format:
|
1747
|
+
# "projects/\\{project}/locations/\\{location}/applications/\\{application}"
|
1748
|
+
# @param application_instances [::Array<::Google::Cloud::VisionAI::V1::UpdateApplicationInstancesRequest::UpdateApplicationInstance, ::Hash>]
|
1749
|
+
# @param request_id [::String]
|
1750
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1751
|
+
# request ID so that if you must retry your request, the server will know to
|
1752
|
+
# ignore the request if it has already been completed. The server will
|
1753
|
+
# guarantee that for at least 60 minutes since the first request.
|
1754
|
+
#
|
1755
|
+
# For example, consider a situation where you make an initial request and
|
1756
|
+
# the request times out. If you make the request again with the same request
|
1757
|
+
# ID, the server can check if original operation with the same request ID
|
1758
|
+
# was received, and if so, will ignore the second request. This prevents
|
1759
|
+
# clients from accidentally creating duplicate commitments.
|
1760
|
+
#
|
1761
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1762
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1763
|
+
# @param allow_missing [::Boolean]
|
1764
|
+
# If true, Update Request will create one resource if the target resource
|
1765
|
+
# doesn't exist, this time, the field_mask will be ignored.
|
1766
|
+
#
|
1767
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1768
|
+
# @yieldparam response [::Gapic::Operation]
|
1769
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1770
|
+
#
|
1771
|
+
# @return [::Gapic::Operation]
|
1772
|
+
#
|
1773
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1774
|
+
#
|
1775
|
+
# @example Basic example
|
1776
|
+
# require "google/cloud/vision_ai/v1"
|
1777
|
+
#
|
1778
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1779
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
1780
|
+
#
|
1781
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1782
|
+
# request = Google::Cloud::VisionAI::V1::UpdateApplicationInstancesRequest.new
|
1783
|
+
#
|
1784
|
+
# # Call the update_application_instances method.
|
1785
|
+
# result = client.update_application_instances request
|
1786
|
+
#
|
1787
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1788
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1789
|
+
# # Here is how to wait for a response.
|
1790
|
+
# result.wait_until_done! timeout: 60
|
1791
|
+
# if result.response?
|
1792
|
+
# p result.response
|
1793
|
+
# else
|
1794
|
+
# puts "No response received."
|
1795
|
+
# end
|
1796
|
+
#
|
1797
|
+
def update_application_instances request, options = nil
|
1798
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1799
|
+
|
1800
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::UpdateApplicationInstancesRequest
|
1801
|
+
|
1802
|
+
# Converts hash and nil to an options object
|
1803
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1804
|
+
|
1805
|
+
# Customize the options with defaults
|
1806
|
+
metadata = @config.rpcs.update_application_instances.metadata.to_h
|
1807
|
+
|
1808
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1809
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1810
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1811
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
1812
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1813
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1814
|
+
|
1815
|
+
header_params = {}
|
1816
|
+
if request.name
|
1817
|
+
header_params["name"] = request.name
|
1818
|
+
end
|
1819
|
+
|
1820
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1821
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1822
|
+
|
1823
|
+
options.apply_defaults timeout: @config.rpcs.update_application_instances.timeout,
|
1824
|
+
metadata: metadata,
|
1825
|
+
retry_policy: @config.rpcs.update_application_instances.retry_policy
|
1826
|
+
|
1827
|
+
options.apply_defaults timeout: @config.timeout,
|
1828
|
+
metadata: @config.metadata,
|
1829
|
+
retry_policy: @config.retry_policy
|
1830
|
+
|
1831
|
+
@app_platform_stub.call_rpc :update_application_instances, request, options: options do |response, operation|
|
1832
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1833
|
+
yield response, operation if block_given?
|
1834
|
+
return response
|
1835
|
+
end
|
1836
|
+
rescue ::GRPC::BadStatus => e
|
1837
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1838
|
+
end
|
1839
|
+
|
1840
|
+
##
|
1841
|
+
# Lists Drafts in a given project and location.
|
1842
|
+
#
|
1843
|
+
# @overload list_drafts(request, options = nil)
|
1844
|
+
# Pass arguments to `list_drafts` via a request object, either of type
|
1845
|
+
# {::Google::Cloud::VisionAI::V1::ListDraftsRequest} or an equivalent Hash.
|
1846
|
+
#
|
1847
|
+
# @param request [::Google::Cloud::VisionAI::V1::ListDraftsRequest, ::Hash]
|
1848
|
+
# A request object representing the call parameters. Required. To specify no
|
1849
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1850
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1851
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1852
|
+
#
|
1853
|
+
# @overload list_drafts(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1854
|
+
# Pass arguments to `list_drafts` via keyword arguments. Note that at
|
1855
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1856
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1857
|
+
#
|
1858
|
+
# @param parent [::String]
|
1859
|
+
# Required. Parent value for ListDraftsRequest.
|
1860
|
+
# @param page_size [::Integer]
|
1861
|
+
# Requested page size. Server may return fewer items than requested.
|
1862
|
+
# If unspecified, server will pick an appropriate default.
|
1863
|
+
# @param page_token [::String]
|
1864
|
+
# A token identifying a page of results the server should return.
|
1865
|
+
# @param filter [::String]
|
1866
|
+
# Filtering results.
|
1867
|
+
# @param order_by [::String]
|
1868
|
+
# Hint for how to order the results.
|
1869
|
+
#
|
1870
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1871
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Draft>]
|
1872
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1873
|
+
#
|
1874
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Draft>]
|
1875
|
+
#
|
1876
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1877
|
+
#
|
1878
|
+
# @example Basic example
|
1879
|
+
# require "google/cloud/vision_ai/v1"
|
1880
|
+
#
|
1881
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1882
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
1883
|
+
#
|
1884
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1885
|
+
# request = Google::Cloud::VisionAI::V1::ListDraftsRequest.new
|
1886
|
+
#
|
1887
|
+
# # Call the list_drafts method.
|
1888
|
+
# result = client.list_drafts request
|
1889
|
+
#
|
1890
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1891
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1892
|
+
# result.each do |item|
|
1893
|
+
# # Each element is of type ::Google::Cloud::VisionAI::V1::Draft.
|
1894
|
+
# p item
|
1895
|
+
# end
|
1896
|
+
#
|
1897
|
+
def list_drafts request, options = nil
|
1898
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1899
|
+
|
1900
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::ListDraftsRequest
|
1901
|
+
|
1902
|
+
# Converts hash and nil to an options object
|
1903
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1904
|
+
|
1905
|
+
# Customize the options with defaults
|
1906
|
+
metadata = @config.rpcs.list_drafts.metadata.to_h
|
1907
|
+
|
1908
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1909
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1910
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1911
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
1912
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1913
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1914
|
+
|
1915
|
+
header_params = {}
|
1916
|
+
if request.parent
|
1917
|
+
header_params["parent"] = request.parent
|
1918
|
+
end
|
1919
|
+
|
1920
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1921
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1922
|
+
|
1923
|
+
options.apply_defaults timeout: @config.rpcs.list_drafts.timeout,
|
1924
|
+
metadata: metadata,
|
1925
|
+
retry_policy: @config.rpcs.list_drafts.retry_policy
|
1926
|
+
|
1927
|
+
options.apply_defaults timeout: @config.timeout,
|
1928
|
+
metadata: @config.metadata,
|
1929
|
+
retry_policy: @config.retry_policy
|
1930
|
+
|
1931
|
+
@app_platform_stub.call_rpc :list_drafts, request, options: options do |response, operation|
|
1932
|
+
response = ::Gapic::PagedEnumerable.new @app_platform_stub, :list_drafts, request, response, operation, options
|
1933
|
+
yield response, operation if block_given?
|
1934
|
+
return response
|
1935
|
+
end
|
1936
|
+
rescue ::GRPC::BadStatus => e
|
1937
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1938
|
+
end
|
1939
|
+
|
1940
|
+
##
|
1941
|
+
# Gets details of a single Draft.
|
1942
|
+
#
|
1943
|
+
# @overload get_draft(request, options = nil)
|
1944
|
+
# Pass arguments to `get_draft` via a request object, either of type
|
1945
|
+
# {::Google::Cloud::VisionAI::V1::GetDraftRequest} or an equivalent Hash.
|
1946
|
+
#
|
1947
|
+
# @param request [::Google::Cloud::VisionAI::V1::GetDraftRequest, ::Hash]
|
1948
|
+
# A request object representing the call parameters. Required. To specify no
|
1949
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1950
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1951
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1952
|
+
#
|
1953
|
+
# @overload get_draft(name: nil)
|
1954
|
+
# Pass arguments to `get_draft` via keyword arguments. Note that at
|
1955
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1956
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1957
|
+
#
|
1958
|
+
# @param name [::String]
|
1959
|
+
# Required. Name of the resource.
|
1960
|
+
#
|
1961
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1962
|
+
# @yieldparam response [::Google::Cloud::VisionAI::V1::Draft]
|
1963
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1964
|
+
#
|
1965
|
+
# @return [::Google::Cloud::VisionAI::V1::Draft]
|
1966
|
+
#
|
1967
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1968
|
+
#
|
1969
|
+
# @example Basic example
|
1970
|
+
# require "google/cloud/vision_ai/v1"
|
1971
|
+
#
|
1972
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1973
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
1974
|
+
#
|
1975
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1976
|
+
# request = Google::Cloud::VisionAI::V1::GetDraftRequest.new
|
1977
|
+
#
|
1978
|
+
# # Call the get_draft method.
|
1979
|
+
# result = client.get_draft request
|
1980
|
+
#
|
1981
|
+
# # The returned object is of type Google::Cloud::VisionAI::V1::Draft.
|
1982
|
+
# p result
|
1983
|
+
#
|
1984
|
+
def get_draft request, options = nil
|
1985
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1986
|
+
|
1987
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::GetDraftRequest
|
1988
|
+
|
1989
|
+
# Converts hash and nil to an options object
|
1990
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1991
|
+
|
1992
|
+
# Customize the options with defaults
|
1993
|
+
metadata = @config.rpcs.get_draft.metadata.to_h
|
1994
|
+
|
1995
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1996
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1997
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1998
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
1999
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2000
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2001
|
+
|
2002
|
+
header_params = {}
|
2003
|
+
if request.name
|
2004
|
+
header_params["name"] = request.name
|
2005
|
+
end
|
2006
|
+
|
2007
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2008
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2009
|
+
|
2010
|
+
options.apply_defaults timeout: @config.rpcs.get_draft.timeout,
|
2011
|
+
metadata: metadata,
|
2012
|
+
retry_policy: @config.rpcs.get_draft.retry_policy
|
2013
|
+
|
2014
|
+
options.apply_defaults timeout: @config.timeout,
|
2015
|
+
metadata: @config.metadata,
|
2016
|
+
retry_policy: @config.retry_policy
|
2017
|
+
|
2018
|
+
@app_platform_stub.call_rpc :get_draft, request, options: options do |response, operation|
|
2019
|
+
yield response, operation if block_given?
|
2020
|
+
return response
|
2021
|
+
end
|
2022
|
+
rescue ::GRPC::BadStatus => e
|
2023
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2024
|
+
end
|
2025
|
+
|
2026
|
+
##
|
2027
|
+
# Creates a new Draft in a given project and location.
|
2028
|
+
#
|
2029
|
+
# @overload create_draft(request, options = nil)
|
2030
|
+
# Pass arguments to `create_draft` via a request object, either of type
|
2031
|
+
# {::Google::Cloud::VisionAI::V1::CreateDraftRequest} or an equivalent Hash.
|
2032
|
+
#
|
2033
|
+
# @param request [::Google::Cloud::VisionAI::V1::CreateDraftRequest, ::Hash]
|
2034
|
+
# A request object representing the call parameters. Required. To specify no
|
2035
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2036
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2037
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2038
|
+
#
|
2039
|
+
# @overload create_draft(parent: nil, draft_id: nil, draft: nil, request_id: nil)
|
2040
|
+
# Pass arguments to `create_draft` via keyword arguments. Note that at
|
2041
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2042
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2043
|
+
#
|
2044
|
+
# @param parent [::String]
|
2045
|
+
# Required. Value for parent.
|
2046
|
+
# @param draft_id [::String]
|
2047
|
+
# Required. Id of the requesting object.
|
2048
|
+
# @param draft [::Google::Cloud::VisionAI::V1::Draft, ::Hash]
|
2049
|
+
# Required. The resource being created.
|
2050
|
+
# @param request_id [::String]
|
2051
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
2052
|
+
# request ID so that if you must retry your request, the server will know to
|
2053
|
+
# ignore the request if it has already been completed. The server will
|
2054
|
+
# guarantee that for at least 60 minutes since the first request.
|
2055
|
+
#
|
2056
|
+
# For example, consider a situation where you make an initial request and
|
2057
|
+
# the request times out. If you make the request again with the same request
|
2058
|
+
# ID, the server can check if original operation with the same request ID
|
2059
|
+
# was received, and if so, will ignore the second request. This prevents
|
2060
|
+
# clients from accidentally creating duplicate commitments.
|
2061
|
+
#
|
2062
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2063
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2064
|
+
#
|
2065
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2066
|
+
# @yieldparam response [::Gapic::Operation]
|
2067
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2068
|
+
#
|
2069
|
+
# @return [::Gapic::Operation]
|
2070
|
+
#
|
2071
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2072
|
+
#
|
2073
|
+
# @example Basic example
|
2074
|
+
# require "google/cloud/vision_ai/v1"
|
2075
|
+
#
|
2076
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2077
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
2078
|
+
#
|
2079
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2080
|
+
# request = Google::Cloud::VisionAI::V1::CreateDraftRequest.new
|
2081
|
+
#
|
2082
|
+
# # Call the create_draft method.
|
2083
|
+
# result = client.create_draft request
|
2084
|
+
#
|
2085
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2086
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2087
|
+
# # Here is how to wait for a response.
|
2088
|
+
# result.wait_until_done! timeout: 60
|
2089
|
+
# if result.response?
|
2090
|
+
# p result.response
|
2091
|
+
# else
|
2092
|
+
# puts "No response received."
|
2093
|
+
# end
|
2094
|
+
#
|
2095
|
+
def create_draft request, options = nil
|
2096
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2097
|
+
|
2098
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::CreateDraftRequest
|
2099
|
+
|
2100
|
+
# Converts hash and nil to an options object
|
2101
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2102
|
+
|
2103
|
+
# Customize the options with defaults
|
2104
|
+
metadata = @config.rpcs.create_draft.metadata.to_h
|
2105
|
+
|
2106
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2107
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2108
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2109
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
2110
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2111
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2112
|
+
|
2113
|
+
header_params = {}
|
2114
|
+
if request.parent
|
2115
|
+
header_params["parent"] = request.parent
|
2116
|
+
end
|
2117
|
+
|
2118
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2119
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2120
|
+
|
2121
|
+
options.apply_defaults timeout: @config.rpcs.create_draft.timeout,
|
2122
|
+
metadata: metadata,
|
2123
|
+
retry_policy: @config.rpcs.create_draft.retry_policy
|
2124
|
+
|
2125
|
+
options.apply_defaults timeout: @config.timeout,
|
2126
|
+
metadata: @config.metadata,
|
2127
|
+
retry_policy: @config.retry_policy
|
2128
|
+
|
2129
|
+
@app_platform_stub.call_rpc :create_draft, request, options: options do |response, operation|
|
2130
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2131
|
+
yield response, operation if block_given?
|
2132
|
+
return response
|
2133
|
+
end
|
2134
|
+
rescue ::GRPC::BadStatus => e
|
2135
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2136
|
+
end
|
2137
|
+
|
2138
|
+
##
|
2139
|
+
# Updates the parameters of a single Draft.
|
2140
|
+
#
|
2141
|
+
# @overload update_draft(request, options = nil)
|
2142
|
+
# Pass arguments to `update_draft` via a request object, either of type
|
2143
|
+
# {::Google::Cloud::VisionAI::V1::UpdateDraftRequest} or an equivalent Hash.
|
2144
|
+
#
|
2145
|
+
# @param request [::Google::Cloud::VisionAI::V1::UpdateDraftRequest, ::Hash]
|
2146
|
+
# A request object representing the call parameters. Required. To specify no
|
2147
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2148
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2149
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2150
|
+
#
|
2151
|
+
# @overload update_draft(update_mask: nil, draft: nil, request_id: nil, allow_missing: nil)
|
2152
|
+
# Pass arguments to `update_draft` via keyword arguments. Note that at
|
2153
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2154
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2155
|
+
#
|
2156
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2157
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
2158
|
+
# Draft resource by the update.
|
2159
|
+
# The fields specified in the update_mask are relative to the resource, not
|
2160
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
2161
|
+
# user does not provide a mask then all fields will be overwritten.
|
2162
|
+
# @param draft [::Google::Cloud::VisionAI::V1::Draft, ::Hash]
|
2163
|
+
# Required. The resource being updated.
|
2164
|
+
# @param request_id [::String]
|
2165
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
2166
|
+
# request ID so that if you must retry your request, the server will know to
|
2167
|
+
# ignore the request if it has already been completed. The server will
|
2168
|
+
# guarantee that for at least 60 minutes since the first request.
|
2169
|
+
#
|
2170
|
+
# For example, consider a situation where you make an initial request and
|
2171
|
+
# the request times out. If you make the request again with the same request
|
2172
|
+
# ID, the server can check if original operation with the same request ID
|
2173
|
+
# was received, and if so, will ignore the second request. This prevents
|
2174
|
+
# clients from accidentally creating duplicate commitments.
|
2175
|
+
#
|
2176
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2177
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2178
|
+
# @param allow_missing [::Boolean]
|
2179
|
+
# If true, UpdateDraftRequest will create one resource if the target resource
|
2180
|
+
# doesn't exist, this time, the field_mask will be ignored.
|
2181
|
+
#
|
2182
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2183
|
+
# @yieldparam response [::Gapic::Operation]
|
2184
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2185
|
+
#
|
2186
|
+
# @return [::Gapic::Operation]
|
2187
|
+
#
|
2188
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2189
|
+
#
|
2190
|
+
# @example Basic example
|
2191
|
+
# require "google/cloud/vision_ai/v1"
|
2192
|
+
#
|
2193
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2194
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
2195
|
+
#
|
2196
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2197
|
+
# request = Google::Cloud::VisionAI::V1::UpdateDraftRequest.new
|
2198
|
+
#
|
2199
|
+
# # Call the update_draft method.
|
2200
|
+
# result = client.update_draft request
|
2201
|
+
#
|
2202
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2203
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2204
|
+
# # Here is how to wait for a response.
|
2205
|
+
# result.wait_until_done! timeout: 60
|
2206
|
+
# if result.response?
|
2207
|
+
# p result.response
|
2208
|
+
# else
|
2209
|
+
# puts "No response received."
|
2210
|
+
# end
|
2211
|
+
#
|
2212
|
+
def update_draft request, options = nil
|
2213
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2214
|
+
|
2215
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::UpdateDraftRequest
|
2216
|
+
|
2217
|
+
# Converts hash and nil to an options object
|
2218
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2219
|
+
|
2220
|
+
# Customize the options with defaults
|
2221
|
+
metadata = @config.rpcs.update_draft.metadata.to_h
|
2222
|
+
|
2223
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2224
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2225
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2226
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
2227
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2228
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2229
|
+
|
2230
|
+
header_params = {}
|
2231
|
+
if request.draft&.name
|
2232
|
+
header_params["draft.name"] = request.draft.name
|
2233
|
+
end
|
2234
|
+
|
2235
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2236
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2237
|
+
|
2238
|
+
options.apply_defaults timeout: @config.rpcs.update_draft.timeout,
|
2239
|
+
metadata: metadata,
|
2240
|
+
retry_policy: @config.rpcs.update_draft.retry_policy
|
2241
|
+
|
2242
|
+
options.apply_defaults timeout: @config.timeout,
|
2243
|
+
metadata: @config.metadata,
|
2244
|
+
retry_policy: @config.retry_policy
|
2245
|
+
|
2246
|
+
@app_platform_stub.call_rpc :update_draft, request, options: options do |response, operation|
|
2247
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2248
|
+
yield response, operation if block_given?
|
2249
|
+
return response
|
2250
|
+
end
|
2251
|
+
rescue ::GRPC::BadStatus => e
|
2252
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2253
|
+
end
|
2254
|
+
|
2255
|
+
##
|
2256
|
+
# Deletes a single Draft.
|
2257
|
+
#
|
2258
|
+
# @overload delete_draft(request, options = nil)
|
2259
|
+
# Pass arguments to `delete_draft` via a request object, either of type
|
2260
|
+
# {::Google::Cloud::VisionAI::V1::DeleteDraftRequest} or an equivalent Hash.
|
2261
|
+
#
|
2262
|
+
# @param request [::Google::Cloud::VisionAI::V1::DeleteDraftRequest, ::Hash]
|
2263
|
+
# A request object representing the call parameters. Required. To specify no
|
2264
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2265
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2266
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2267
|
+
#
|
2268
|
+
# @overload delete_draft(name: nil, request_id: nil)
|
2269
|
+
# Pass arguments to `delete_draft` via keyword arguments. Note that at
|
2270
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2271
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2272
|
+
#
|
2273
|
+
# @param name [::String]
|
2274
|
+
# Required. Name of the resource.
|
2275
|
+
# @param request_id [::String]
|
2276
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
2277
|
+
# request ID so that if you must retry your request, the server will know to
|
2278
|
+
# ignore the request if it has already been completed. The server will
|
2279
|
+
# guarantee that for at least 60 minutes after the first request.
|
2280
|
+
#
|
2281
|
+
# For example, consider a situation where you make an initial request and
|
2282
|
+
# the request times out. If you make the request again with the same request
|
2283
|
+
# ID, the server can check if original operation with the same request ID
|
2284
|
+
# was received, and if so, will ignore the second request. This prevents
|
2285
|
+
# clients from accidentally creating duplicate commitments.
|
2286
|
+
#
|
2287
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2288
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2289
|
+
#
|
2290
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2291
|
+
# @yieldparam response [::Gapic::Operation]
|
2292
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2293
|
+
#
|
2294
|
+
# @return [::Gapic::Operation]
|
2295
|
+
#
|
2296
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2297
|
+
#
|
2298
|
+
# @example Basic example
|
2299
|
+
# require "google/cloud/vision_ai/v1"
|
2300
|
+
#
|
2301
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2302
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
2303
|
+
#
|
2304
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2305
|
+
# request = Google::Cloud::VisionAI::V1::DeleteDraftRequest.new
|
2306
|
+
#
|
2307
|
+
# # Call the delete_draft method.
|
2308
|
+
# result = client.delete_draft request
|
2309
|
+
#
|
2310
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2311
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2312
|
+
# # Here is how to wait for a response.
|
2313
|
+
# result.wait_until_done! timeout: 60
|
2314
|
+
# if result.response?
|
2315
|
+
# p result.response
|
2316
|
+
# else
|
2317
|
+
# puts "No response received."
|
2318
|
+
# end
|
2319
|
+
#
|
2320
|
+
def delete_draft request, options = nil
|
2321
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2322
|
+
|
2323
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::DeleteDraftRequest
|
2324
|
+
|
2325
|
+
# Converts hash and nil to an options object
|
2326
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2327
|
+
|
2328
|
+
# Customize the options with defaults
|
2329
|
+
metadata = @config.rpcs.delete_draft.metadata.to_h
|
2330
|
+
|
2331
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2332
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2333
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2334
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
2335
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2336
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2337
|
+
|
2338
|
+
header_params = {}
|
2339
|
+
if request.name
|
2340
|
+
header_params["name"] = request.name
|
2341
|
+
end
|
2342
|
+
|
2343
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2344
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2345
|
+
|
2346
|
+
options.apply_defaults timeout: @config.rpcs.delete_draft.timeout,
|
2347
|
+
metadata: metadata,
|
2348
|
+
retry_policy: @config.rpcs.delete_draft.retry_policy
|
2349
|
+
|
2350
|
+
options.apply_defaults timeout: @config.timeout,
|
2351
|
+
metadata: @config.metadata,
|
2352
|
+
retry_policy: @config.retry_policy
|
2353
|
+
|
2354
|
+
@app_platform_stub.call_rpc :delete_draft, request, options: options do |response, operation|
|
2355
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2356
|
+
yield response, operation if block_given?
|
2357
|
+
return response
|
2358
|
+
end
|
2359
|
+
rescue ::GRPC::BadStatus => e
|
2360
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2361
|
+
end
|
2362
|
+
|
2363
|
+
##
|
2364
|
+
# Lists Processors in a given project and location.
|
2365
|
+
#
|
2366
|
+
# @overload list_processors(request, options = nil)
|
2367
|
+
# Pass arguments to `list_processors` via a request object, either of type
|
2368
|
+
# {::Google::Cloud::VisionAI::V1::ListProcessorsRequest} or an equivalent Hash.
|
2369
|
+
#
|
2370
|
+
# @param request [::Google::Cloud::VisionAI::V1::ListProcessorsRequest, ::Hash]
|
2371
|
+
# A request object representing the call parameters. Required. To specify no
|
2372
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2373
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2374
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2375
|
+
#
|
2376
|
+
# @overload list_processors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
2377
|
+
# Pass arguments to `list_processors` via keyword arguments. Note that at
|
2378
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2379
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2380
|
+
#
|
2381
|
+
# @param parent [::String]
|
2382
|
+
# Required. Parent value for ListProcessorsRequest.
|
2383
|
+
# @param page_size [::Integer]
|
2384
|
+
# Requested page size. Server may return fewer items than requested.
|
2385
|
+
# If unspecified, server will pick an appropriate default.
|
2386
|
+
# @param page_token [::String]
|
2387
|
+
# A token identifying a page of results the server should return.
|
2388
|
+
# @param filter [::String]
|
2389
|
+
# Filtering results.
|
2390
|
+
# @param order_by [::String]
|
2391
|
+
# Hint for how to order the results.
|
2392
|
+
#
|
2393
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2394
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Processor>]
|
2395
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2396
|
+
#
|
2397
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Processor>]
|
2398
|
+
#
|
2399
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2400
|
+
#
|
2401
|
+
# @example Basic example
|
2402
|
+
# require "google/cloud/vision_ai/v1"
|
2403
|
+
#
|
2404
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2405
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
2406
|
+
#
|
2407
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2408
|
+
# request = Google::Cloud::VisionAI::V1::ListProcessorsRequest.new
|
2409
|
+
#
|
2410
|
+
# # Call the list_processors method.
|
2411
|
+
# result = client.list_processors request
|
2412
|
+
#
|
2413
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2414
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2415
|
+
# result.each do |item|
|
2416
|
+
# # Each element is of type ::Google::Cloud::VisionAI::V1::Processor.
|
2417
|
+
# p item
|
2418
|
+
# end
|
2419
|
+
#
|
2420
|
+
def list_processors request, options = nil
|
2421
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2422
|
+
|
2423
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::ListProcessorsRequest
|
2424
|
+
|
2425
|
+
# Converts hash and nil to an options object
|
2426
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2427
|
+
|
2428
|
+
# Customize the options with defaults
|
2429
|
+
metadata = @config.rpcs.list_processors.metadata.to_h
|
2430
|
+
|
2431
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2432
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2433
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2434
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
2435
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2436
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2437
|
+
|
2438
|
+
header_params = {}
|
2439
|
+
if request.parent
|
2440
|
+
header_params["parent"] = request.parent
|
2441
|
+
end
|
2442
|
+
|
2443
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2444
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2445
|
+
|
2446
|
+
options.apply_defaults timeout: @config.rpcs.list_processors.timeout,
|
2447
|
+
metadata: metadata,
|
2448
|
+
retry_policy: @config.rpcs.list_processors.retry_policy
|
2449
|
+
|
2450
|
+
options.apply_defaults timeout: @config.timeout,
|
2451
|
+
metadata: @config.metadata,
|
2452
|
+
retry_policy: @config.retry_policy
|
2453
|
+
|
2454
|
+
@app_platform_stub.call_rpc :list_processors, request, options: options do |response, operation|
|
2455
|
+
response = ::Gapic::PagedEnumerable.new @app_platform_stub, :list_processors, request, response, operation, options
|
2456
|
+
yield response, operation if block_given?
|
2457
|
+
return response
|
2458
|
+
end
|
2459
|
+
rescue ::GRPC::BadStatus => e
|
2460
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2461
|
+
end
|
2462
|
+
|
2463
|
+
##
|
2464
|
+
# ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt
|
2465
|
+
# Processors.
|
2466
|
+
#
|
2467
|
+
# @overload list_prebuilt_processors(request, options = nil)
|
2468
|
+
# Pass arguments to `list_prebuilt_processors` via a request object, either of type
|
2469
|
+
# {::Google::Cloud::VisionAI::V1::ListPrebuiltProcessorsRequest} or an equivalent Hash.
|
2470
|
+
#
|
2471
|
+
# @param request [::Google::Cloud::VisionAI::V1::ListPrebuiltProcessorsRequest, ::Hash]
|
2472
|
+
# A request object representing the call parameters. Required. To specify no
|
2473
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2474
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2475
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2476
|
+
#
|
2477
|
+
# @overload list_prebuilt_processors(parent: nil)
|
2478
|
+
# Pass arguments to `list_prebuilt_processors` via keyword arguments. Note that at
|
2479
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2480
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2481
|
+
#
|
2482
|
+
# @param parent [::String]
|
2483
|
+
# Required. Parent path.
|
2484
|
+
#
|
2485
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2486
|
+
# @yieldparam response [::Google::Cloud::VisionAI::V1::ListPrebuiltProcessorsResponse]
|
2487
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2488
|
+
#
|
2489
|
+
# @return [::Google::Cloud::VisionAI::V1::ListPrebuiltProcessorsResponse]
|
2490
|
+
#
|
2491
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2492
|
+
#
|
2493
|
+
# @example Basic example
|
2494
|
+
# require "google/cloud/vision_ai/v1"
|
2495
|
+
#
|
2496
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2497
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
2498
|
+
#
|
2499
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2500
|
+
# request = Google::Cloud::VisionAI::V1::ListPrebuiltProcessorsRequest.new
|
2501
|
+
#
|
2502
|
+
# # Call the list_prebuilt_processors method.
|
2503
|
+
# result = client.list_prebuilt_processors request
|
2504
|
+
#
|
2505
|
+
# # The returned object is of type Google::Cloud::VisionAI::V1::ListPrebuiltProcessorsResponse.
|
2506
|
+
# p result
|
2507
|
+
#
|
2508
|
+
def list_prebuilt_processors request, options = nil
|
2509
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2510
|
+
|
2511
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::ListPrebuiltProcessorsRequest
|
2512
|
+
|
2513
|
+
# Converts hash and nil to an options object
|
2514
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2515
|
+
|
2516
|
+
# Customize the options with defaults
|
2517
|
+
metadata = @config.rpcs.list_prebuilt_processors.metadata.to_h
|
2518
|
+
|
2519
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2520
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2521
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2522
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
2523
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2524
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2525
|
+
|
2526
|
+
header_params = {}
|
2527
|
+
if request.parent
|
2528
|
+
header_params["parent"] = request.parent
|
2529
|
+
end
|
2530
|
+
|
2531
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2532
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2533
|
+
|
2534
|
+
options.apply_defaults timeout: @config.rpcs.list_prebuilt_processors.timeout,
|
2535
|
+
metadata: metadata,
|
2536
|
+
retry_policy: @config.rpcs.list_prebuilt_processors.retry_policy
|
2537
|
+
|
2538
|
+
options.apply_defaults timeout: @config.timeout,
|
2539
|
+
metadata: @config.metadata,
|
2540
|
+
retry_policy: @config.retry_policy
|
2541
|
+
|
2542
|
+
@app_platform_stub.call_rpc :list_prebuilt_processors, request, options: options do |response, operation|
|
2543
|
+
yield response, operation if block_given?
|
2544
|
+
return response
|
2545
|
+
end
|
2546
|
+
rescue ::GRPC::BadStatus => e
|
2547
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2548
|
+
end
|
2549
|
+
|
2550
|
+
##
|
2551
|
+
# Gets details of a single Processor.
|
2552
|
+
#
|
2553
|
+
# @overload get_processor(request, options = nil)
|
2554
|
+
# Pass arguments to `get_processor` via a request object, either of type
|
2555
|
+
# {::Google::Cloud::VisionAI::V1::GetProcessorRequest} or an equivalent Hash.
|
2556
|
+
#
|
2557
|
+
# @param request [::Google::Cloud::VisionAI::V1::GetProcessorRequest, ::Hash]
|
2558
|
+
# A request object representing the call parameters. Required. To specify no
|
2559
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2560
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2561
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2562
|
+
#
|
2563
|
+
# @overload get_processor(name: nil)
|
2564
|
+
# Pass arguments to `get_processor` via keyword arguments. Note that at
|
2565
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2566
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2567
|
+
#
|
2568
|
+
# @param name [::String]
|
2569
|
+
# Required. Name of the resource.
|
2570
|
+
#
|
2571
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2572
|
+
# @yieldparam response [::Google::Cloud::VisionAI::V1::Processor]
|
2573
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2574
|
+
#
|
2575
|
+
# @return [::Google::Cloud::VisionAI::V1::Processor]
|
2576
|
+
#
|
2577
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2578
|
+
#
|
2579
|
+
# @example Basic example
|
2580
|
+
# require "google/cloud/vision_ai/v1"
|
2581
|
+
#
|
2582
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2583
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
2584
|
+
#
|
2585
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2586
|
+
# request = Google::Cloud::VisionAI::V1::GetProcessorRequest.new
|
2587
|
+
#
|
2588
|
+
# # Call the get_processor method.
|
2589
|
+
# result = client.get_processor request
|
2590
|
+
#
|
2591
|
+
# # The returned object is of type Google::Cloud::VisionAI::V1::Processor.
|
2592
|
+
# p result
|
2593
|
+
#
|
2594
|
+
def get_processor request, options = nil
|
2595
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2596
|
+
|
2597
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::GetProcessorRequest
|
2598
|
+
|
2599
|
+
# Converts hash and nil to an options object
|
2600
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2601
|
+
|
2602
|
+
# Customize the options with defaults
|
2603
|
+
metadata = @config.rpcs.get_processor.metadata.to_h
|
2604
|
+
|
2605
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2606
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2607
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2608
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
2609
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2610
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2611
|
+
|
2612
|
+
header_params = {}
|
2613
|
+
if request.name
|
2614
|
+
header_params["name"] = request.name
|
2615
|
+
end
|
2616
|
+
|
2617
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2618
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2619
|
+
|
2620
|
+
options.apply_defaults timeout: @config.rpcs.get_processor.timeout,
|
2621
|
+
metadata: metadata,
|
2622
|
+
retry_policy: @config.rpcs.get_processor.retry_policy
|
2623
|
+
|
2624
|
+
options.apply_defaults timeout: @config.timeout,
|
2625
|
+
metadata: @config.metadata,
|
2626
|
+
retry_policy: @config.retry_policy
|
2627
|
+
|
2628
|
+
@app_platform_stub.call_rpc :get_processor, request, options: options do |response, operation|
|
2629
|
+
yield response, operation if block_given?
|
2630
|
+
return response
|
2631
|
+
end
|
2632
|
+
rescue ::GRPC::BadStatus => e
|
2633
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2634
|
+
end
|
2635
|
+
|
2636
|
+
##
|
2637
|
+
# Creates a new Processor in a given project and location.
|
2638
|
+
#
|
2639
|
+
# @overload create_processor(request, options = nil)
|
2640
|
+
# Pass arguments to `create_processor` via a request object, either of type
|
2641
|
+
# {::Google::Cloud::VisionAI::V1::CreateProcessorRequest} or an equivalent Hash.
|
2642
|
+
#
|
2643
|
+
# @param request [::Google::Cloud::VisionAI::V1::CreateProcessorRequest, ::Hash]
|
2644
|
+
# A request object representing the call parameters. Required. To specify no
|
2645
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2646
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2647
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2648
|
+
#
|
2649
|
+
# @overload create_processor(parent: nil, processor_id: nil, processor: nil, request_id: nil)
|
2650
|
+
# Pass arguments to `create_processor` via keyword arguments. Note that at
|
2651
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2652
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2653
|
+
#
|
2654
|
+
# @param parent [::String]
|
2655
|
+
# Required. Value for parent.
|
2656
|
+
# @param processor_id [::String]
|
2657
|
+
# Required. Id of the requesting object.
|
2658
|
+
# @param processor [::Google::Cloud::VisionAI::V1::Processor, ::Hash]
|
2659
|
+
# Required. The resource being created.
|
2660
|
+
# @param request_id [::String]
|
2661
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
2662
|
+
# request ID so that if you must retry your request, the server will know to
|
2663
|
+
# ignore the request if it has already been completed. The server will
|
2664
|
+
# guarantee that for at least 60 minutes since the first request.
|
2665
|
+
#
|
2666
|
+
# For example, consider a situation where you make an initial request and
|
2667
|
+
# the request times out. If you make the request again with the same request
|
2668
|
+
# ID, the server can check if original operation with the same request ID
|
2669
|
+
# was received, and if so, will ignore the second request. This prevents
|
2670
|
+
# clients from accidentally creating duplicate commitments.
|
2671
|
+
#
|
2672
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2673
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2674
|
+
#
|
2675
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2676
|
+
# @yieldparam response [::Gapic::Operation]
|
2677
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2678
|
+
#
|
2679
|
+
# @return [::Gapic::Operation]
|
2680
|
+
#
|
2681
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2682
|
+
#
|
2683
|
+
# @example Basic example
|
2684
|
+
# require "google/cloud/vision_ai/v1"
|
2685
|
+
#
|
2686
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2687
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
2688
|
+
#
|
2689
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2690
|
+
# request = Google::Cloud::VisionAI::V1::CreateProcessorRequest.new
|
2691
|
+
#
|
2692
|
+
# # Call the create_processor method.
|
2693
|
+
# result = client.create_processor request
|
2694
|
+
#
|
2695
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2696
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2697
|
+
# # Here is how to wait for a response.
|
2698
|
+
# result.wait_until_done! timeout: 60
|
2699
|
+
# if result.response?
|
2700
|
+
# p result.response
|
2701
|
+
# else
|
2702
|
+
# puts "No response received."
|
2703
|
+
# end
|
2704
|
+
#
|
2705
|
+
def create_processor request, options = nil
|
2706
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2707
|
+
|
2708
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::CreateProcessorRequest
|
2709
|
+
|
2710
|
+
# Converts hash and nil to an options object
|
2711
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2712
|
+
|
2713
|
+
# Customize the options with defaults
|
2714
|
+
metadata = @config.rpcs.create_processor.metadata.to_h
|
2715
|
+
|
2716
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2717
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2718
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2719
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
2720
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2721
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2722
|
+
|
2723
|
+
header_params = {}
|
2724
|
+
if request.parent
|
2725
|
+
header_params["parent"] = request.parent
|
2726
|
+
end
|
2727
|
+
|
2728
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2729
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2730
|
+
|
2731
|
+
options.apply_defaults timeout: @config.rpcs.create_processor.timeout,
|
2732
|
+
metadata: metadata,
|
2733
|
+
retry_policy: @config.rpcs.create_processor.retry_policy
|
2734
|
+
|
2735
|
+
options.apply_defaults timeout: @config.timeout,
|
2736
|
+
metadata: @config.metadata,
|
2737
|
+
retry_policy: @config.retry_policy
|
2738
|
+
|
2739
|
+
@app_platform_stub.call_rpc :create_processor, request, options: options do |response, operation|
|
2740
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2741
|
+
yield response, operation if block_given?
|
2742
|
+
return response
|
2743
|
+
end
|
2744
|
+
rescue ::GRPC::BadStatus => e
|
2745
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2746
|
+
end
|
2747
|
+
|
2748
|
+
##
|
2749
|
+
# Updates the parameters of a single Processor.
|
2750
|
+
#
|
2751
|
+
# @overload update_processor(request, options = nil)
|
2752
|
+
# Pass arguments to `update_processor` via a request object, either of type
|
2753
|
+
# {::Google::Cloud::VisionAI::V1::UpdateProcessorRequest} or an equivalent Hash.
|
2754
|
+
#
|
2755
|
+
# @param request [::Google::Cloud::VisionAI::V1::UpdateProcessorRequest, ::Hash]
|
2756
|
+
# A request object representing the call parameters. Required. To specify no
|
2757
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2758
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2759
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2760
|
+
#
|
2761
|
+
# @overload update_processor(update_mask: nil, processor: nil, request_id: nil)
|
2762
|
+
# Pass arguments to `update_processor` via keyword arguments. Note that at
|
2763
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2764
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2765
|
+
#
|
2766
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2767
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
2768
|
+
# Processor resource by the update.
|
2769
|
+
# The fields specified in the update_mask are relative to the resource, not
|
2770
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
2771
|
+
# user does not provide a mask then all fields will be overwritten.
|
2772
|
+
# @param processor [::Google::Cloud::VisionAI::V1::Processor, ::Hash]
|
2773
|
+
# Required. The resource being updated.
|
2774
|
+
# @param request_id [::String]
|
2775
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
2776
|
+
# request ID so that if you must retry your request, the server will know to
|
2777
|
+
# ignore the request if it has already been completed. The server will
|
2778
|
+
# guarantee that for at least 60 minutes since the first request.
|
2779
|
+
#
|
2780
|
+
# For example, consider a situation where you make an initial request and
|
2781
|
+
# the request times out. If you make the request again with the same request
|
2782
|
+
# ID, the server can check if original operation with the same request ID
|
2783
|
+
# was received, and if so, will ignore the second request. This prevents
|
2784
|
+
# clients from accidentally creating duplicate commitments.
|
2785
|
+
#
|
2786
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2787
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2788
|
+
#
|
2789
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2790
|
+
# @yieldparam response [::Gapic::Operation]
|
2791
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2792
|
+
#
|
2793
|
+
# @return [::Gapic::Operation]
|
2794
|
+
#
|
2795
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2796
|
+
#
|
2797
|
+
# @example Basic example
|
2798
|
+
# require "google/cloud/vision_ai/v1"
|
2799
|
+
#
|
2800
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2801
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
2802
|
+
#
|
2803
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2804
|
+
# request = Google::Cloud::VisionAI::V1::UpdateProcessorRequest.new
|
2805
|
+
#
|
2806
|
+
# # Call the update_processor method.
|
2807
|
+
# result = client.update_processor request
|
2808
|
+
#
|
2809
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2810
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2811
|
+
# # Here is how to wait for a response.
|
2812
|
+
# result.wait_until_done! timeout: 60
|
2813
|
+
# if result.response?
|
2814
|
+
# p result.response
|
2815
|
+
# else
|
2816
|
+
# puts "No response received."
|
2817
|
+
# end
|
2818
|
+
#
|
2819
|
+
def update_processor request, options = nil
|
2820
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2821
|
+
|
2822
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::UpdateProcessorRequest
|
2823
|
+
|
2824
|
+
# Converts hash and nil to an options object
|
2825
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2826
|
+
|
2827
|
+
# Customize the options with defaults
|
2828
|
+
metadata = @config.rpcs.update_processor.metadata.to_h
|
2829
|
+
|
2830
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2831
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2832
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2833
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
2834
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2835
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2836
|
+
|
2837
|
+
header_params = {}
|
2838
|
+
if request.processor&.name
|
2839
|
+
header_params["processor.name"] = request.processor.name
|
2840
|
+
end
|
2841
|
+
|
2842
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2843
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2844
|
+
|
2845
|
+
options.apply_defaults timeout: @config.rpcs.update_processor.timeout,
|
2846
|
+
metadata: metadata,
|
2847
|
+
retry_policy: @config.rpcs.update_processor.retry_policy
|
2848
|
+
|
2849
|
+
options.apply_defaults timeout: @config.timeout,
|
2850
|
+
metadata: @config.metadata,
|
2851
|
+
retry_policy: @config.retry_policy
|
2852
|
+
|
2853
|
+
@app_platform_stub.call_rpc :update_processor, request, options: options do |response, operation|
|
2854
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2855
|
+
yield response, operation if block_given?
|
2856
|
+
return response
|
2857
|
+
end
|
2858
|
+
rescue ::GRPC::BadStatus => e
|
2859
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2860
|
+
end
|
2861
|
+
|
2862
|
+
##
|
2863
|
+
# Deletes a single Processor.
|
2864
|
+
#
|
2865
|
+
# @overload delete_processor(request, options = nil)
|
2866
|
+
# Pass arguments to `delete_processor` via a request object, either of type
|
2867
|
+
# {::Google::Cloud::VisionAI::V1::DeleteProcessorRequest} or an equivalent Hash.
|
2868
|
+
#
|
2869
|
+
# @param request [::Google::Cloud::VisionAI::V1::DeleteProcessorRequest, ::Hash]
|
2870
|
+
# A request object representing the call parameters. Required. To specify no
|
2871
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2872
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2873
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2874
|
+
#
|
2875
|
+
# @overload delete_processor(name: nil, request_id: nil)
|
2876
|
+
# Pass arguments to `delete_processor` via keyword arguments. Note that at
|
2877
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2878
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2879
|
+
#
|
2880
|
+
# @param name [::String]
|
2881
|
+
# Required. Name of the resource
|
2882
|
+
# @param request_id [::String]
|
2883
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
2884
|
+
# request ID so that if you must retry your request, the server will know to
|
2885
|
+
# ignore the request if it has already been completed. The server will
|
2886
|
+
# guarantee that for at least 60 minutes after the first request.
|
2887
|
+
#
|
2888
|
+
# For example, consider a situation where you make an initial request and
|
2889
|
+
# the request times out. If you make the request again with the same request
|
2890
|
+
# ID, the server can check if original operation with the same request ID
|
2891
|
+
# was received, and if so, will ignore the second request. This prevents
|
2892
|
+
# clients from accidentally creating duplicate commitments.
|
2893
|
+
#
|
2894
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
2895
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
2896
|
+
#
|
2897
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2898
|
+
# @yieldparam response [::Gapic::Operation]
|
2899
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2900
|
+
#
|
2901
|
+
# @return [::Gapic::Operation]
|
2902
|
+
#
|
2903
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2904
|
+
#
|
2905
|
+
# @example Basic example
|
2906
|
+
# require "google/cloud/vision_ai/v1"
|
2907
|
+
#
|
2908
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2909
|
+
# client = Google::Cloud::VisionAI::V1::AppPlatform::Client.new
|
2910
|
+
#
|
2911
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2912
|
+
# request = Google::Cloud::VisionAI::V1::DeleteProcessorRequest.new
|
2913
|
+
#
|
2914
|
+
# # Call the delete_processor method.
|
2915
|
+
# result = client.delete_processor request
|
2916
|
+
#
|
2917
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2918
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2919
|
+
# # Here is how to wait for a response.
|
2920
|
+
# result.wait_until_done! timeout: 60
|
2921
|
+
# if result.response?
|
2922
|
+
# p result.response
|
2923
|
+
# else
|
2924
|
+
# puts "No response received."
|
2925
|
+
# end
|
2926
|
+
#
|
2927
|
+
def delete_processor request, options = nil
|
2928
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2929
|
+
|
2930
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::DeleteProcessorRequest
|
2931
|
+
|
2932
|
+
# Converts hash and nil to an options object
|
2933
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2934
|
+
|
2935
|
+
# Customize the options with defaults
|
2936
|
+
metadata = @config.rpcs.delete_processor.metadata.to_h
|
2937
|
+
|
2938
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2939
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2940
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2941
|
+
gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
|
2942
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2943
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2944
|
+
|
2945
|
+
header_params = {}
|
2946
|
+
if request.name
|
2947
|
+
header_params["name"] = request.name
|
2948
|
+
end
|
2949
|
+
|
2950
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2951
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2952
|
+
|
2953
|
+
options.apply_defaults timeout: @config.rpcs.delete_processor.timeout,
|
2954
|
+
metadata: metadata,
|
2955
|
+
retry_policy: @config.rpcs.delete_processor.retry_policy
|
2956
|
+
|
2957
|
+
options.apply_defaults timeout: @config.timeout,
|
2958
|
+
metadata: @config.metadata,
|
2959
|
+
retry_policy: @config.retry_policy
|
2960
|
+
|
2961
|
+
@app_platform_stub.call_rpc :delete_processor, request, options: options do |response, operation|
|
2962
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2963
|
+
yield response, operation if block_given?
|
2964
|
+
return response
|
2965
|
+
end
|
2966
|
+
rescue ::GRPC::BadStatus => e
|
2967
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2968
|
+
end
|
2969
|
+
|
2970
|
+
##
|
2971
|
+
# Configuration class for the AppPlatform API.
|
2972
|
+
#
|
2973
|
+
# This class represents the configuration for AppPlatform,
|
2974
|
+
# providing control over timeouts, retry behavior, logging, transport
|
2975
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
2976
|
+
# applied individually to specific RPCs. See
|
2977
|
+
# {::Google::Cloud::VisionAI::V1::AppPlatform::Client::Configuration::Rpcs}
|
2978
|
+
# for a list of RPCs that can be configured independently.
|
2979
|
+
#
|
2980
|
+
# Configuration can be applied globally to all clients, or to a single client
|
2981
|
+
# on construction.
|
2982
|
+
#
|
2983
|
+
# @example
|
2984
|
+
#
|
2985
|
+
# # Modify the global config, setting the timeout for
|
2986
|
+
# # list_applications to 20 seconds,
|
2987
|
+
# # and all remaining timeouts to 10 seconds.
|
2988
|
+
# ::Google::Cloud::VisionAI::V1::AppPlatform::Client.configure do |config|
|
2989
|
+
# config.timeout = 10.0
|
2990
|
+
# config.rpcs.list_applications.timeout = 20.0
|
2991
|
+
# end
|
2992
|
+
#
|
2993
|
+
# # Apply the above configuration only to a new client.
|
2994
|
+
# client = ::Google::Cloud::VisionAI::V1::AppPlatform::Client.new do |config|
|
2995
|
+
# config.timeout = 10.0
|
2996
|
+
# config.rpcs.list_applications.timeout = 20.0
|
2997
|
+
# end
|
2998
|
+
#
|
2999
|
+
# @!attribute [rw] endpoint
|
3000
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
3001
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
3002
|
+
# @return [::String,nil]
|
3003
|
+
# @!attribute [rw] credentials
|
3004
|
+
# Credentials to send with calls. You may provide any of the following types:
|
3005
|
+
# * (`String`) The path to a service account key file in JSON format
|
3006
|
+
# * (`Hash`) A service account key as a Hash
|
3007
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
3008
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
3009
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
3010
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
3011
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
3012
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
3013
|
+
# * (`nil`) indicating no credentials
|
3014
|
+
# @return [::Object]
|
3015
|
+
# @!attribute [rw] scope
|
3016
|
+
# The OAuth scopes
|
3017
|
+
# @return [::Array<::String>]
|
3018
|
+
# @!attribute [rw] lib_name
|
3019
|
+
# The library name as recorded in instrumentation and logging
|
3020
|
+
# @return [::String]
|
3021
|
+
# @!attribute [rw] lib_version
|
3022
|
+
# The library version as recorded in instrumentation and logging
|
3023
|
+
# @return [::String]
|
3024
|
+
# @!attribute [rw] channel_args
|
3025
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
3026
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
3027
|
+
# @return [::Hash]
|
3028
|
+
# @!attribute [rw] interceptors
|
3029
|
+
# An array of interceptors that are run before calls are executed.
|
3030
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
3031
|
+
# @!attribute [rw] timeout
|
3032
|
+
# The call timeout in seconds.
|
3033
|
+
# @return [::Numeric]
|
3034
|
+
# @!attribute [rw] metadata
|
3035
|
+
# Additional gRPC headers to be sent with the call.
|
3036
|
+
# @return [::Hash{::Symbol=>::String}]
|
3037
|
+
# @!attribute [rw] retry_policy
|
3038
|
+
# The retry policy. The value is a hash with the following keys:
|
3039
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
3040
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
3041
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
3042
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
3043
|
+
# trigger a retry.
|
3044
|
+
# @return [::Hash]
|
3045
|
+
# @!attribute [rw] quota_project
|
3046
|
+
# A separate project against which to charge quota.
|
3047
|
+
# @return [::String]
|
3048
|
+
# @!attribute [rw] universe_domain
|
3049
|
+
# The universe domain within which to make requests. This determines the
|
3050
|
+
# default endpoint URL. The default value of nil uses the environment
|
3051
|
+
# universe (usually the default "googleapis.com" universe).
|
3052
|
+
# @return [::String,nil]
|
3053
|
+
#
|
3054
|
+
class Configuration
|
3055
|
+
extend ::Gapic::Config
|
3056
|
+
|
3057
|
+
# @private
|
3058
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
3059
|
+
DEFAULT_ENDPOINT = "visionai.googleapis.com"
|
3060
|
+
|
3061
|
+
config_attr :endpoint, nil, ::String, nil
|
3062
|
+
config_attr :credentials, nil do |value|
|
3063
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
3064
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
3065
|
+
allowed.any? { |klass| klass === value }
|
3066
|
+
end
|
3067
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
3068
|
+
config_attr :lib_name, nil, ::String, nil
|
3069
|
+
config_attr :lib_version, nil, ::String, nil
|
3070
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
3071
|
+
config_attr :interceptors, nil, ::Array, nil
|
3072
|
+
config_attr :timeout, nil, ::Numeric, nil
|
3073
|
+
config_attr :metadata, nil, ::Hash, nil
|
3074
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
3075
|
+
config_attr :quota_project, nil, ::String, nil
|
3076
|
+
config_attr :universe_domain, nil, ::String, nil
|
3077
|
+
|
3078
|
+
# @private
|
3079
|
+
def initialize parent_config = nil
|
3080
|
+
@parent_config = parent_config unless parent_config.nil?
|
3081
|
+
|
3082
|
+
yield self if block_given?
|
3083
|
+
end
|
3084
|
+
|
3085
|
+
##
|
3086
|
+
# Configurations for individual RPCs
|
3087
|
+
# @return [Rpcs]
|
3088
|
+
#
|
3089
|
+
def rpcs
|
3090
|
+
@rpcs ||= begin
|
3091
|
+
parent_rpcs = nil
|
3092
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
3093
|
+
Rpcs.new parent_rpcs
|
3094
|
+
end
|
3095
|
+
end
|
3096
|
+
|
3097
|
+
##
|
3098
|
+
# Configuration for the channel pool
|
3099
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
3100
|
+
#
|
3101
|
+
def channel_pool
|
3102
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
3103
|
+
end
|
3104
|
+
|
3105
|
+
##
|
3106
|
+
# Configuration RPC class for the AppPlatform API.
|
3107
|
+
#
|
3108
|
+
# Includes fields providing the configuration for each RPC in this service.
|
3109
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
3110
|
+
# the following configuration fields:
|
3111
|
+
#
|
3112
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
3113
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
3114
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
3115
|
+
# include the following keys:
|
3116
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
3117
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
3118
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
3119
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
3120
|
+
# trigger a retry.
|
3121
|
+
#
|
3122
|
+
class Rpcs
|
3123
|
+
##
|
3124
|
+
# RPC-specific configuration for `list_applications`
|
3125
|
+
# @return [::Gapic::Config::Method]
|
3126
|
+
#
|
3127
|
+
attr_reader :list_applications
|
3128
|
+
##
|
3129
|
+
# RPC-specific configuration for `get_application`
|
3130
|
+
# @return [::Gapic::Config::Method]
|
3131
|
+
#
|
3132
|
+
attr_reader :get_application
|
3133
|
+
##
|
3134
|
+
# RPC-specific configuration for `create_application`
|
3135
|
+
# @return [::Gapic::Config::Method]
|
3136
|
+
#
|
3137
|
+
attr_reader :create_application
|
3138
|
+
##
|
3139
|
+
# RPC-specific configuration for `update_application`
|
3140
|
+
# @return [::Gapic::Config::Method]
|
3141
|
+
#
|
3142
|
+
attr_reader :update_application
|
3143
|
+
##
|
3144
|
+
# RPC-specific configuration for `delete_application`
|
3145
|
+
# @return [::Gapic::Config::Method]
|
3146
|
+
#
|
3147
|
+
attr_reader :delete_application
|
3148
|
+
##
|
3149
|
+
# RPC-specific configuration for `deploy_application`
|
3150
|
+
# @return [::Gapic::Config::Method]
|
3151
|
+
#
|
3152
|
+
attr_reader :deploy_application
|
3153
|
+
##
|
3154
|
+
# RPC-specific configuration for `undeploy_application`
|
3155
|
+
# @return [::Gapic::Config::Method]
|
3156
|
+
#
|
3157
|
+
attr_reader :undeploy_application
|
3158
|
+
##
|
3159
|
+
# RPC-specific configuration for `add_application_stream_input`
|
3160
|
+
# @return [::Gapic::Config::Method]
|
3161
|
+
#
|
3162
|
+
attr_reader :add_application_stream_input
|
3163
|
+
##
|
3164
|
+
# RPC-specific configuration for `remove_application_stream_input`
|
3165
|
+
# @return [::Gapic::Config::Method]
|
3166
|
+
#
|
3167
|
+
attr_reader :remove_application_stream_input
|
3168
|
+
##
|
3169
|
+
# RPC-specific configuration for `update_application_stream_input`
|
3170
|
+
# @return [::Gapic::Config::Method]
|
3171
|
+
#
|
3172
|
+
attr_reader :update_application_stream_input
|
3173
|
+
##
|
3174
|
+
# RPC-specific configuration for `list_instances`
|
3175
|
+
# @return [::Gapic::Config::Method]
|
3176
|
+
#
|
3177
|
+
attr_reader :list_instances
|
3178
|
+
##
|
3179
|
+
# RPC-specific configuration for `get_instance`
|
3180
|
+
# @return [::Gapic::Config::Method]
|
3181
|
+
#
|
3182
|
+
attr_reader :get_instance
|
3183
|
+
##
|
3184
|
+
# RPC-specific configuration for `create_application_instances`
|
3185
|
+
# @return [::Gapic::Config::Method]
|
3186
|
+
#
|
3187
|
+
attr_reader :create_application_instances
|
3188
|
+
##
|
3189
|
+
# RPC-specific configuration for `delete_application_instances`
|
3190
|
+
# @return [::Gapic::Config::Method]
|
3191
|
+
#
|
3192
|
+
attr_reader :delete_application_instances
|
3193
|
+
##
|
3194
|
+
# RPC-specific configuration for `update_application_instances`
|
3195
|
+
# @return [::Gapic::Config::Method]
|
3196
|
+
#
|
3197
|
+
attr_reader :update_application_instances
|
3198
|
+
##
|
3199
|
+
# RPC-specific configuration for `list_drafts`
|
3200
|
+
# @return [::Gapic::Config::Method]
|
3201
|
+
#
|
3202
|
+
attr_reader :list_drafts
|
3203
|
+
##
|
3204
|
+
# RPC-specific configuration for `get_draft`
|
3205
|
+
# @return [::Gapic::Config::Method]
|
3206
|
+
#
|
3207
|
+
attr_reader :get_draft
|
3208
|
+
##
|
3209
|
+
# RPC-specific configuration for `create_draft`
|
3210
|
+
# @return [::Gapic::Config::Method]
|
3211
|
+
#
|
3212
|
+
attr_reader :create_draft
|
3213
|
+
##
|
3214
|
+
# RPC-specific configuration for `update_draft`
|
3215
|
+
# @return [::Gapic::Config::Method]
|
3216
|
+
#
|
3217
|
+
attr_reader :update_draft
|
3218
|
+
##
|
3219
|
+
# RPC-specific configuration for `delete_draft`
|
3220
|
+
# @return [::Gapic::Config::Method]
|
3221
|
+
#
|
3222
|
+
attr_reader :delete_draft
|
3223
|
+
##
|
3224
|
+
# RPC-specific configuration for `list_processors`
|
3225
|
+
# @return [::Gapic::Config::Method]
|
3226
|
+
#
|
3227
|
+
attr_reader :list_processors
|
3228
|
+
##
|
3229
|
+
# RPC-specific configuration for `list_prebuilt_processors`
|
3230
|
+
# @return [::Gapic::Config::Method]
|
3231
|
+
#
|
3232
|
+
attr_reader :list_prebuilt_processors
|
3233
|
+
##
|
3234
|
+
# RPC-specific configuration for `get_processor`
|
3235
|
+
# @return [::Gapic::Config::Method]
|
3236
|
+
#
|
3237
|
+
attr_reader :get_processor
|
3238
|
+
##
|
3239
|
+
# RPC-specific configuration for `create_processor`
|
3240
|
+
# @return [::Gapic::Config::Method]
|
3241
|
+
#
|
3242
|
+
attr_reader :create_processor
|
3243
|
+
##
|
3244
|
+
# RPC-specific configuration for `update_processor`
|
3245
|
+
# @return [::Gapic::Config::Method]
|
3246
|
+
#
|
3247
|
+
attr_reader :update_processor
|
3248
|
+
##
|
3249
|
+
# RPC-specific configuration for `delete_processor`
|
3250
|
+
# @return [::Gapic::Config::Method]
|
3251
|
+
#
|
3252
|
+
attr_reader :delete_processor
|
3253
|
+
|
3254
|
+
# @private
|
3255
|
+
def initialize parent_rpcs = nil
|
3256
|
+
list_applications_config = parent_rpcs.list_applications if parent_rpcs.respond_to? :list_applications
|
3257
|
+
@list_applications = ::Gapic::Config::Method.new list_applications_config
|
3258
|
+
get_application_config = parent_rpcs.get_application if parent_rpcs.respond_to? :get_application
|
3259
|
+
@get_application = ::Gapic::Config::Method.new get_application_config
|
3260
|
+
create_application_config = parent_rpcs.create_application if parent_rpcs.respond_to? :create_application
|
3261
|
+
@create_application = ::Gapic::Config::Method.new create_application_config
|
3262
|
+
update_application_config = parent_rpcs.update_application if parent_rpcs.respond_to? :update_application
|
3263
|
+
@update_application = ::Gapic::Config::Method.new update_application_config
|
3264
|
+
delete_application_config = parent_rpcs.delete_application if parent_rpcs.respond_to? :delete_application
|
3265
|
+
@delete_application = ::Gapic::Config::Method.new delete_application_config
|
3266
|
+
deploy_application_config = parent_rpcs.deploy_application if parent_rpcs.respond_to? :deploy_application
|
3267
|
+
@deploy_application = ::Gapic::Config::Method.new deploy_application_config
|
3268
|
+
undeploy_application_config = parent_rpcs.undeploy_application if parent_rpcs.respond_to? :undeploy_application
|
3269
|
+
@undeploy_application = ::Gapic::Config::Method.new undeploy_application_config
|
3270
|
+
add_application_stream_input_config = parent_rpcs.add_application_stream_input if parent_rpcs.respond_to? :add_application_stream_input
|
3271
|
+
@add_application_stream_input = ::Gapic::Config::Method.new add_application_stream_input_config
|
3272
|
+
remove_application_stream_input_config = parent_rpcs.remove_application_stream_input if parent_rpcs.respond_to? :remove_application_stream_input
|
3273
|
+
@remove_application_stream_input = ::Gapic::Config::Method.new remove_application_stream_input_config
|
3274
|
+
update_application_stream_input_config = parent_rpcs.update_application_stream_input if parent_rpcs.respond_to? :update_application_stream_input
|
3275
|
+
@update_application_stream_input = ::Gapic::Config::Method.new update_application_stream_input_config
|
3276
|
+
list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances
|
3277
|
+
@list_instances = ::Gapic::Config::Method.new list_instances_config
|
3278
|
+
get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance
|
3279
|
+
@get_instance = ::Gapic::Config::Method.new get_instance_config
|
3280
|
+
create_application_instances_config = parent_rpcs.create_application_instances if parent_rpcs.respond_to? :create_application_instances
|
3281
|
+
@create_application_instances = ::Gapic::Config::Method.new create_application_instances_config
|
3282
|
+
delete_application_instances_config = parent_rpcs.delete_application_instances if parent_rpcs.respond_to? :delete_application_instances
|
3283
|
+
@delete_application_instances = ::Gapic::Config::Method.new delete_application_instances_config
|
3284
|
+
update_application_instances_config = parent_rpcs.update_application_instances if parent_rpcs.respond_to? :update_application_instances
|
3285
|
+
@update_application_instances = ::Gapic::Config::Method.new update_application_instances_config
|
3286
|
+
list_drafts_config = parent_rpcs.list_drafts if parent_rpcs.respond_to? :list_drafts
|
3287
|
+
@list_drafts = ::Gapic::Config::Method.new list_drafts_config
|
3288
|
+
get_draft_config = parent_rpcs.get_draft if parent_rpcs.respond_to? :get_draft
|
3289
|
+
@get_draft = ::Gapic::Config::Method.new get_draft_config
|
3290
|
+
create_draft_config = parent_rpcs.create_draft if parent_rpcs.respond_to? :create_draft
|
3291
|
+
@create_draft = ::Gapic::Config::Method.new create_draft_config
|
3292
|
+
update_draft_config = parent_rpcs.update_draft if parent_rpcs.respond_to? :update_draft
|
3293
|
+
@update_draft = ::Gapic::Config::Method.new update_draft_config
|
3294
|
+
delete_draft_config = parent_rpcs.delete_draft if parent_rpcs.respond_to? :delete_draft
|
3295
|
+
@delete_draft = ::Gapic::Config::Method.new delete_draft_config
|
3296
|
+
list_processors_config = parent_rpcs.list_processors if parent_rpcs.respond_to? :list_processors
|
3297
|
+
@list_processors = ::Gapic::Config::Method.new list_processors_config
|
3298
|
+
list_prebuilt_processors_config = parent_rpcs.list_prebuilt_processors if parent_rpcs.respond_to? :list_prebuilt_processors
|
3299
|
+
@list_prebuilt_processors = ::Gapic::Config::Method.new list_prebuilt_processors_config
|
3300
|
+
get_processor_config = parent_rpcs.get_processor if parent_rpcs.respond_to? :get_processor
|
3301
|
+
@get_processor = ::Gapic::Config::Method.new get_processor_config
|
3302
|
+
create_processor_config = parent_rpcs.create_processor if parent_rpcs.respond_to? :create_processor
|
3303
|
+
@create_processor = ::Gapic::Config::Method.new create_processor_config
|
3304
|
+
update_processor_config = parent_rpcs.update_processor if parent_rpcs.respond_to? :update_processor
|
3305
|
+
@update_processor = ::Gapic::Config::Method.new update_processor_config
|
3306
|
+
delete_processor_config = parent_rpcs.delete_processor if parent_rpcs.respond_to? :delete_processor
|
3307
|
+
@delete_processor = ::Gapic::Config::Method.new delete_processor_config
|
3308
|
+
|
3309
|
+
yield self if block_given?
|
3310
|
+
end
|
3311
|
+
end
|
3312
|
+
end
|
3313
|
+
end
|
3314
|
+
end
|
3315
|
+
end
|
3316
|
+
end
|
3317
|
+
end
|
3318
|
+
end
|