google-cloud-vision_ai-v1 0.a → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/vision_ai/v1/app_platform/client.rb +3318 -0
  6. data/lib/google/cloud/vision_ai/v1/app_platform/credentials.rb +47 -0
  7. data/lib/google/cloud/vision_ai/v1/app_platform/operations.rb +809 -0
  8. data/lib/google/cloud/vision_ai/v1/app_platform/paths.rb +151 -0
  9. data/lib/google/cloud/vision_ai/v1/app_platform/rest/client.rb +3106 -0
  10. data/lib/google/cloud/vision_ai/v1/app_platform/rest/operations.rb +951 -0
  11. data/lib/google/cloud/vision_ai/v1/app_platform/rest/service_stub.rb +1618 -0
  12. data/lib/google/cloud/vision_ai/v1/app_platform/rest.rb +53 -0
  13. data/lib/google/cloud/vision_ai/v1/app_platform.rb +56 -0
  14. data/lib/google/cloud/vision_ai/v1/health_check_service/client.rb +456 -0
  15. data/lib/google/cloud/vision_ai/v1/health_check_service/credentials.rb +47 -0
  16. data/lib/google/cloud/vision_ai/v1/health_check_service/paths.rb +52 -0
  17. data/lib/google/cloud/vision_ai/v1/health_check_service/rest/client.rb +423 -0
  18. data/lib/google/cloud/vision_ai/v1/health_check_service/rest/service_stub.rb +128 -0
  19. data/lib/google/cloud/vision_ai/v1/health_check_service/rest.rb +53 -0
  20. data/lib/google/cloud/vision_ai/v1/health_check_service.rb +56 -0
  21. data/lib/google/cloud/vision_ai/v1/live_video_analytics/client.rb +2375 -0
  22. data/lib/google/cloud/vision_ai/v1/live_video_analytics/credentials.rb +47 -0
  23. data/lib/google/cloud/vision_ai/v1/live_video_analytics/operations.rb +809 -0
  24. data/lib/google/cloud/vision_ai/v1/live_video_analytics/paths.rb +130 -0
  25. data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/client.rb +2220 -0
  26. data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/operations.rb +951 -0
  27. data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/service_stub.rb +1139 -0
  28. data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest.rb +54 -0
  29. data/lib/google/cloud/vision_ai/v1/live_video_analytics.rb +57 -0
  30. data/lib/google/cloud/vision_ai/v1/rest.rb +42 -0
  31. data/lib/google/cloud/vision_ai/v1/streaming_service/client.rb +915 -0
  32. data/lib/google/cloud/vision_ai/v1/streaming_service/credentials.rb +47 -0
  33. data/lib/google/cloud/vision_ai/v1/streaming_service/paths.rb +54 -0
  34. data/lib/google/cloud/vision_ai/v1/streaming_service/rest/client.rb +610 -0
  35. data/lib/google/cloud/vision_ai/v1/streaming_service/rest/service_stub.rb +249 -0
  36. data/lib/google/cloud/vision_ai/v1/streaming_service/rest.rb +52 -0
  37. data/lib/google/cloud/vision_ai/v1/streaming_service.rb +55 -0
  38. data/lib/google/cloud/vision_ai/v1/streams_service/client.rb +2931 -0
  39. data/lib/google/cloud/vision_ai/v1/streams_service/credentials.rb +47 -0
  40. data/lib/google/cloud/vision_ai/v1/streams_service/operations.rb +809 -0
  41. data/lib/google/cloud/vision_ai/v1/streams_service/paths.rb +153 -0
  42. data/lib/google/cloud/vision_ai/v1/streams_service/rest/client.rb +2740 -0
  43. data/lib/google/cloud/vision_ai/v1/streams_service/rest/operations.rb +951 -0
  44. data/lib/google/cloud/vision_ai/v1/streams_service/rest/service_stub.rb +1437 -0
  45. data/lib/google/cloud/vision_ai/v1/streams_service/rest.rb +56 -0
  46. data/lib/google/cloud/vision_ai/v1/streams_service.rb +59 -0
  47. data/lib/google/cloud/vision_ai/v1/version.rb +8 -3
  48. data/lib/google/cloud/vision_ai/v1/warehouse/client.rb +6958 -0
  49. data/lib/google/cloud/vision_ai/v1/warehouse/credentials.rb +47 -0
  50. data/lib/google/cloud/vision_ai/v1/warehouse/operations.rb +809 -0
  51. data/lib/google/cloud/vision_ai/v1/warehouse/paths.rb +237 -0
  52. data/lib/google/cloud/vision_ai/v1/warehouse/rest/client.rb +6403 -0
  53. data/lib/google/cloud/vision_ai/v1/warehouse/rest/operations.rb +951 -0
  54. data/lib/google/cloud/vision_ai/v1/warehouse/rest/service_stub.rb +3760 -0
  55. data/lib/google/cloud/vision_ai/v1/warehouse/rest.rb +53 -0
  56. data/lib/google/cloud/vision_ai/v1/warehouse.rb +56 -0
  57. data/lib/google/cloud/vision_ai/v1.rb +50 -0
  58. data/lib/google/cloud/visionai/v1/annotations_pb.rb +90 -0
  59. data/lib/google/cloud/visionai/v1/common_pb.rb +50 -0
  60. data/lib/google/cloud/visionai/v1/health_service_pb.rb +48 -0
  61. data/lib/google/cloud/visionai/v1/health_service_services_pb.rb +46 -0
  62. data/lib/google/cloud/visionai/v1/lva_pb.rb +54 -0
  63. data/lib/google/cloud/visionai/v1/lva_resources_pb.rb +51 -0
  64. data/lib/google/cloud/visionai/v1/lva_service_pb.rb +80 -0
  65. data/lib/google/cloud/visionai/v1/lva_service_services_pb.rb +81 -0
  66. data/lib/google/cloud/visionai/v1/platform_pb.rb +162 -0
  67. data/lib/google/cloud/visionai/v1/platform_services_pb.rb +111 -0
  68. data/lib/google/cloud/visionai/v1/streaming_resources_pb.rb +58 -0
  69. data/lib/google/cloud/visionai/v1/streaming_service_pb.rb +71 -0
  70. data/lib/google/cloud/visionai/v1/streaming_service_services_pb.rb +55 -0
  71. data/lib/google/cloud/visionai/v1/streams_resources_pb.rb +53 -0
  72. data/lib/google/cloud/visionai/v1/streams_service_pb.rb +85 -0
  73. data/lib/google/cloud/visionai/v1/streams_service_services_pb.rb +92 -0
  74. data/lib/google/cloud/visionai/v1/warehouse_pb.rb +251 -0
  75. data/lib/google/cloud/visionai/v1/warehouse_services_pb.rb +228 -0
  76. data/lib/google-cloud-vision_ai-v1.rb +21 -0
  77. data/proto_docs/README.md +4 -0
  78. data/proto_docs/google/api/client.rb +420 -0
  79. data/proto_docs/google/api/field_behavior.rb +85 -0
  80. data/proto_docs/google/api/launch_stage.rb +71 -0
  81. data/proto_docs/google/api/resource.rb +227 -0
  82. data/proto_docs/google/cloud/visionai/v1/annotations.rb +787 -0
  83. data/proto_docs/google/cloud/visionai/v1/common.rb +134 -0
  84. data/proto_docs/google/cloud/visionai/v1/health_service.rb +61 -0
  85. data/proto_docs/google/cloud/visionai/v1/lva.rb +345 -0
  86. data/proto_docs/google/cloud/visionai/v1/lva_resources.rb +167 -0
  87. data/proto_docs/google/cloud/visionai/v1/lva_service.rb +543 -0
  88. data/proto_docs/google/cloud/visionai/v1/platform.rb +2228 -0
  89. data/proto_docs/google/cloud/visionai/v1/streaming_resources.rb +178 -0
  90. data/proto_docs/google/cloud/visionai/v1/streaming_service.rb +393 -0
  91. data/proto_docs/google/cloud/visionai/v1/streams_resources.rb +229 -0
  92. data/proto_docs/google/cloud/visionai/v1/streams_service.rb +644 -0
  93. data/proto_docs/google/cloud/visionai/v1/warehouse.rb +3055 -0
  94. data/proto_docs/google/longrunning/operations.rb +164 -0
  95. data/proto_docs/google/protobuf/any.rb +145 -0
  96. data/proto_docs/google/protobuf/duration.rb +98 -0
  97. data/proto_docs/google/protobuf/empty.rb +34 -0
  98. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  99. data/proto_docs/google/protobuf/struct.rb +96 -0
  100. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  101. data/proto_docs/google/rpc/status.rb +48 -0
  102. data/proto_docs/google/type/datetime.rb +99 -0
  103. data/proto_docs/google/type/expr.rb +75 -0
  104. metadata +183 -10
@@ -0,0 +1,2375 @@
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/lva_service_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 LiveVideoAnalytics
29
+ ##
30
+ # Client for the LiveVideoAnalytics service.
31
+ #
32
+ # Service describing handlers for resources. The service enables clients to run
33
+ # Live Video Analytics (LVA) on the streaming inputs.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "visionai.$UNIVERSE_DOMAIN$"
41
+
42
+ include Paths
43
+
44
+ # @private
45
+ attr_reader :live_video_analytics_stub
46
+
47
+ ##
48
+ # Configure the LiveVideoAnalytics Client class.
49
+ #
50
+ # See {::Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client::Configuration}
51
+ # for a description of the configuration fields.
52
+ #
53
+ # @example
54
+ #
55
+ # # Modify the configuration for all LiveVideoAnalytics clients
56
+ # ::Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.configure do |config|
57
+ # config.timeout = 10.0
58
+ # end
59
+ #
60
+ # @yield [config] Configure the Client client.
61
+ # @yieldparam config [Client::Configuration]
62
+ #
63
+ # @return [Client::Configuration]
64
+ #
65
+ def self.configure
66
+ @configure ||= begin
67
+ namespace = ["Google", "Cloud", "VisionAI", "V1"]
68
+ parent_config = while namespace.any?
69
+ parent_name = namespace.join "::"
70
+ parent_const = const_get parent_name
71
+ break parent_const.configure if parent_const.respond_to? :configure
72
+ namespace.pop
73
+ end
74
+ default_config = Client::Configuration.new parent_config
75
+
76
+ default_config.timeout = 60.0
77
+ default_config.retry_policy = {
78
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
79
+ }
80
+
81
+ default_config.rpcs.list_operators.timeout = 60.0
82
+
83
+ default_config.rpcs.get_operator.timeout = 60.0
84
+
85
+ default_config.rpcs.create_operator.timeout = 300.0
86
+
87
+ default_config.rpcs.update_operator.timeout = 60.0
88
+
89
+ default_config.rpcs.delete_operator.timeout = 60.0
90
+
91
+ default_config.rpcs.list_analyses.timeout = 60.0
92
+
93
+ default_config.rpcs.get_analysis.timeout = 60.0
94
+
95
+ default_config.rpcs.create_analysis.timeout = 300.0
96
+
97
+ default_config.rpcs.update_analysis.timeout = 60.0
98
+
99
+ default_config.rpcs.delete_analysis.timeout = 60.0
100
+
101
+ default_config
102
+ end
103
+ yield @configure if block_given?
104
+ @configure
105
+ end
106
+
107
+ ##
108
+ # Configure the LiveVideoAnalytics Client instance.
109
+ #
110
+ # The configuration is set to the derived mode, meaning that values can be changed,
111
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
112
+ # should be made on {Client.configure}.
113
+ #
114
+ # See {::Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client::Configuration}
115
+ # for a description of the configuration fields.
116
+ #
117
+ # @yield [config] Configure the Client client.
118
+ # @yieldparam config [Client::Configuration]
119
+ #
120
+ # @return [Client::Configuration]
121
+ #
122
+ def configure
123
+ yield @config if block_given?
124
+ @config
125
+ end
126
+
127
+ ##
128
+ # The effective universe domain
129
+ #
130
+ # @return [String]
131
+ #
132
+ def universe_domain
133
+ @live_video_analytics_stub.universe_domain
134
+ end
135
+
136
+ ##
137
+ # Create a new LiveVideoAnalytics client object.
138
+ #
139
+ # @example
140
+ #
141
+ # # Create a client using the default configuration
142
+ # client = ::Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
143
+ #
144
+ # # Create a client using a custom configuration
145
+ # client = ::Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new do |config|
146
+ # config.timeout = 10.0
147
+ # end
148
+ #
149
+ # @yield [config] Configure the LiveVideoAnalytics client.
150
+ # @yieldparam config [Client::Configuration]
151
+ #
152
+ def initialize
153
+ # These require statements are intentionally placed here to initialize
154
+ # the gRPC module only when it's required.
155
+ # See https://github.com/googleapis/toolkit/issues/446
156
+ require "gapic/grpc"
157
+ require "google/cloud/visionai/v1/lva_service_services_pb"
158
+
159
+ # Create the configuration object
160
+ @config = Configuration.new Client.configure
161
+
162
+ # Yield the configuration if needed
163
+ yield @config if block_given?
164
+
165
+ # Create credentials
166
+ credentials = @config.credentials
167
+ # Use self-signed JWT if the endpoint is unchanged from default,
168
+ # but only if the default endpoint does not have a region prefix.
169
+ enable_self_signed_jwt = @config.endpoint.nil? ||
170
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
171
+ !@config.endpoint.split(".").first.include?("-"))
172
+ credentials ||= Credentials.default scope: @config.scope,
173
+ enable_self_signed_jwt: enable_self_signed_jwt
174
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
175
+ credentials = Credentials.new credentials, scope: @config.scope
176
+ end
177
+ @quota_project_id = @config.quota_project
178
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
179
+
180
+ @operations_client = Operations.new do |config|
181
+ config.credentials = credentials
182
+ config.quota_project = @quota_project_id
183
+ config.endpoint = @config.endpoint
184
+ config.universe_domain = @config.universe_domain
185
+ end
186
+
187
+ @live_video_analytics_stub = ::Gapic::ServiceStub.new(
188
+ ::Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Stub,
189
+ credentials: credentials,
190
+ endpoint: @config.endpoint,
191
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
192
+ universe_domain: @config.universe_domain,
193
+ channel_args: @config.channel_args,
194
+ interceptors: @config.interceptors,
195
+ channel_pool_config: @config.channel_pool
196
+ )
197
+
198
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
199
+ config.credentials = credentials
200
+ config.quota_project = @quota_project_id
201
+ config.endpoint = @live_video_analytics_stub.endpoint
202
+ config.universe_domain = @live_video_analytics_stub.universe_domain
203
+ end
204
+
205
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
206
+ config.credentials = credentials
207
+ config.quota_project = @quota_project_id
208
+ config.endpoint = @live_video_analytics_stub.endpoint
209
+ config.universe_domain = @live_video_analytics_stub.universe_domain
210
+ end
211
+ end
212
+
213
+ ##
214
+ # Get the associated client for long-running operations.
215
+ #
216
+ # @return [::Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Operations]
217
+ #
218
+ attr_reader :operations_client
219
+
220
+ ##
221
+ # Get the associated client for mix-in of the Locations.
222
+ #
223
+ # @return [Google::Cloud::Location::Locations::Client]
224
+ #
225
+ attr_reader :location_client
226
+
227
+ ##
228
+ # Get the associated client for mix-in of the IAMPolicy.
229
+ #
230
+ # @return [Google::Iam::V1::IAMPolicy::Client]
231
+ #
232
+ attr_reader :iam_policy_client
233
+
234
+ # Service calls
235
+
236
+ ##
237
+ # ListPublicOperators returns all the operators in public registry.
238
+ #
239
+ # @overload list_public_operators(request, options = nil)
240
+ # Pass arguments to `list_public_operators` via a request object, either of type
241
+ # {::Google::Cloud::VisionAI::V1::ListPublicOperatorsRequest} or an equivalent Hash.
242
+ #
243
+ # @param request [::Google::Cloud::VisionAI::V1::ListPublicOperatorsRequest, ::Hash]
244
+ # A request object representing the call parameters. Required. To specify no
245
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
246
+ # @param options [::Gapic::CallOptions, ::Hash]
247
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
248
+ #
249
+ # @overload list_public_operators(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
250
+ # Pass arguments to `list_public_operators` via keyword arguments. Note that at
251
+ # least one keyword argument is required. To specify no parameters, or to keep all
252
+ # the default parameter values, pass an empty Hash as a request object (see above).
253
+ #
254
+ # @param parent [::String]
255
+ # Required. Parent value for ListPublicOperatorsRequest.
256
+ # @param page_size [::Integer]
257
+ # Requested page size. Server may return fewer items than requested.
258
+ # If unspecified, server will pick an appropriate default.
259
+ # @param page_token [::String]
260
+ # A token identifying a page of results the server should return.
261
+ # @param filter [::String]
262
+ # Filtering results.
263
+ # @param order_by [::String]
264
+ # Hint for how to order the results.
265
+ #
266
+ # @yield [response, operation] Access the result along with the RPC operation
267
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Operator>]
268
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
269
+ #
270
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Operator>]
271
+ #
272
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
273
+ #
274
+ # @example Basic example
275
+ # require "google/cloud/vision_ai/v1"
276
+ #
277
+ # # Create a client object. The client can be reused for multiple calls.
278
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
279
+ #
280
+ # # Create a request. To set request fields, pass in keyword arguments.
281
+ # request = Google::Cloud::VisionAI::V1::ListPublicOperatorsRequest.new
282
+ #
283
+ # # Call the list_public_operators method.
284
+ # result = client.list_public_operators request
285
+ #
286
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
287
+ # # over elements, and API calls will be issued to fetch pages as needed.
288
+ # result.each do |item|
289
+ # # Each element is of type ::Google::Cloud::VisionAI::V1::Operator.
290
+ # p item
291
+ # end
292
+ #
293
+ def list_public_operators request, options = nil
294
+ raise ::ArgumentError, "request must be provided" if request.nil?
295
+
296
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::ListPublicOperatorsRequest
297
+
298
+ # Converts hash and nil to an options object
299
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
300
+
301
+ # Customize the options with defaults
302
+ metadata = @config.rpcs.list_public_operators.metadata.to_h
303
+
304
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
305
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
306
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
307
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
308
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
309
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
310
+
311
+ header_params = {}
312
+ if request.parent
313
+ header_params["parent"] = request.parent
314
+ end
315
+
316
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
317
+ metadata[:"x-goog-request-params"] ||= request_params_header
318
+
319
+ options.apply_defaults timeout: @config.rpcs.list_public_operators.timeout,
320
+ metadata: metadata,
321
+ retry_policy: @config.rpcs.list_public_operators.retry_policy
322
+
323
+ options.apply_defaults timeout: @config.timeout,
324
+ metadata: @config.metadata,
325
+ retry_policy: @config.retry_policy
326
+
327
+ @live_video_analytics_stub.call_rpc :list_public_operators, request, options: options do |response, operation|
328
+ response = ::Gapic::PagedEnumerable.new @live_video_analytics_stub, :list_public_operators, request, response, operation, options
329
+ yield response, operation if block_given?
330
+ return response
331
+ end
332
+ rescue ::GRPC::BadStatus => e
333
+ raise ::Google::Cloud::Error.from_error(e)
334
+ end
335
+
336
+ ##
337
+ # ResolveOperatorInfo returns the operator information based on the request.
338
+ #
339
+ # @overload resolve_operator_info(request, options = nil)
340
+ # Pass arguments to `resolve_operator_info` via a request object, either of type
341
+ # {::Google::Cloud::VisionAI::V1::ResolveOperatorInfoRequest} or an equivalent Hash.
342
+ #
343
+ # @param request [::Google::Cloud::VisionAI::V1::ResolveOperatorInfoRequest, ::Hash]
344
+ # A request object representing the call parameters. Required. To specify no
345
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
346
+ # @param options [::Gapic::CallOptions, ::Hash]
347
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
348
+ #
349
+ # @overload resolve_operator_info(parent: nil, queries: nil)
350
+ # Pass arguments to `resolve_operator_info` via keyword arguments. Note that at
351
+ # least one keyword argument is required. To specify no parameters, or to keep all
352
+ # the default parameter values, pass an empty Hash as a request object (see above).
353
+ #
354
+ # @param parent [::String]
355
+ # Required. Parent value for ResolveOperatorInfoRequest.
356
+ # @param queries [::Array<::Google::Cloud::VisionAI::V1::OperatorQuery, ::Hash>]
357
+ # Required. The operator queries.
358
+ #
359
+ # @yield [response, operation] Access the result along with the RPC operation
360
+ # @yieldparam response [::Google::Cloud::VisionAI::V1::ResolveOperatorInfoResponse]
361
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
362
+ #
363
+ # @return [::Google::Cloud::VisionAI::V1::ResolveOperatorInfoResponse]
364
+ #
365
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
366
+ #
367
+ # @example Basic example
368
+ # require "google/cloud/vision_ai/v1"
369
+ #
370
+ # # Create a client object. The client can be reused for multiple calls.
371
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
372
+ #
373
+ # # Create a request. To set request fields, pass in keyword arguments.
374
+ # request = Google::Cloud::VisionAI::V1::ResolveOperatorInfoRequest.new
375
+ #
376
+ # # Call the resolve_operator_info method.
377
+ # result = client.resolve_operator_info request
378
+ #
379
+ # # The returned object is of type Google::Cloud::VisionAI::V1::ResolveOperatorInfoResponse.
380
+ # p result
381
+ #
382
+ def resolve_operator_info request, options = nil
383
+ raise ::ArgumentError, "request must be provided" if request.nil?
384
+
385
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::ResolveOperatorInfoRequest
386
+
387
+ # Converts hash and nil to an options object
388
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
389
+
390
+ # Customize the options with defaults
391
+ metadata = @config.rpcs.resolve_operator_info.metadata.to_h
392
+
393
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
394
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
395
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
396
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
397
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
398
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
399
+
400
+ header_params = {}
401
+ if request.parent
402
+ header_params["parent"] = request.parent
403
+ end
404
+
405
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
406
+ metadata[:"x-goog-request-params"] ||= request_params_header
407
+
408
+ options.apply_defaults timeout: @config.rpcs.resolve_operator_info.timeout,
409
+ metadata: metadata,
410
+ retry_policy: @config.rpcs.resolve_operator_info.retry_policy
411
+
412
+ options.apply_defaults timeout: @config.timeout,
413
+ metadata: @config.metadata,
414
+ retry_policy: @config.retry_policy
415
+
416
+ @live_video_analytics_stub.call_rpc :resolve_operator_info, request, options: options do |response, operation|
417
+ yield response, operation if block_given?
418
+ return response
419
+ end
420
+ rescue ::GRPC::BadStatus => e
421
+ raise ::Google::Cloud::Error.from_error(e)
422
+ end
423
+
424
+ ##
425
+ # Lists Operators in a given project and location.
426
+ #
427
+ # @overload list_operators(request, options = nil)
428
+ # Pass arguments to `list_operators` via a request object, either of type
429
+ # {::Google::Cloud::VisionAI::V1::ListOperatorsRequest} or an equivalent Hash.
430
+ #
431
+ # @param request [::Google::Cloud::VisionAI::V1::ListOperatorsRequest, ::Hash]
432
+ # A request object representing the call parameters. Required. To specify no
433
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
434
+ # @param options [::Gapic::CallOptions, ::Hash]
435
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
436
+ #
437
+ # @overload list_operators(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
438
+ # Pass arguments to `list_operators` via keyword arguments. Note that at
439
+ # least one keyword argument is required. To specify no parameters, or to keep all
440
+ # the default parameter values, pass an empty Hash as a request object (see above).
441
+ #
442
+ # @param parent [::String]
443
+ # Required. Parent value for ListOperatorsRequest.
444
+ # @param page_size [::Integer]
445
+ # Requested page size. Server may return fewer items than requested.
446
+ # If unspecified, server will pick an appropriate default.
447
+ # @param page_token [::String]
448
+ # A token identifying a page of results the server should return.
449
+ # @param filter [::String]
450
+ # Filtering results.
451
+ # @param order_by [::String]
452
+ # Hint for how to order the results.
453
+ #
454
+ # @yield [response, operation] Access the result along with the RPC operation
455
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Operator>]
456
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
457
+ #
458
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Operator>]
459
+ #
460
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
461
+ #
462
+ # @example Basic example
463
+ # require "google/cloud/vision_ai/v1"
464
+ #
465
+ # # Create a client object. The client can be reused for multiple calls.
466
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
467
+ #
468
+ # # Create a request. To set request fields, pass in keyword arguments.
469
+ # request = Google::Cloud::VisionAI::V1::ListOperatorsRequest.new
470
+ #
471
+ # # Call the list_operators method.
472
+ # result = client.list_operators request
473
+ #
474
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
475
+ # # over elements, and API calls will be issued to fetch pages as needed.
476
+ # result.each do |item|
477
+ # # Each element is of type ::Google::Cloud::VisionAI::V1::Operator.
478
+ # p item
479
+ # end
480
+ #
481
+ def list_operators request, options = nil
482
+ raise ::ArgumentError, "request must be provided" if request.nil?
483
+
484
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::ListOperatorsRequest
485
+
486
+ # Converts hash and nil to an options object
487
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
488
+
489
+ # Customize the options with defaults
490
+ metadata = @config.rpcs.list_operators.metadata.to_h
491
+
492
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
493
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
494
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
495
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
496
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
497
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
498
+
499
+ header_params = {}
500
+ if request.parent
501
+ header_params["parent"] = request.parent
502
+ end
503
+
504
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
505
+ metadata[:"x-goog-request-params"] ||= request_params_header
506
+
507
+ options.apply_defaults timeout: @config.rpcs.list_operators.timeout,
508
+ metadata: metadata,
509
+ retry_policy: @config.rpcs.list_operators.retry_policy
510
+
511
+ options.apply_defaults timeout: @config.timeout,
512
+ metadata: @config.metadata,
513
+ retry_policy: @config.retry_policy
514
+
515
+ @live_video_analytics_stub.call_rpc :list_operators, request, options: options do |response, operation|
516
+ response = ::Gapic::PagedEnumerable.new @live_video_analytics_stub, :list_operators, request, response, operation, options
517
+ yield response, operation if block_given?
518
+ return response
519
+ end
520
+ rescue ::GRPC::BadStatus => e
521
+ raise ::Google::Cloud::Error.from_error(e)
522
+ end
523
+
524
+ ##
525
+ # Gets details of a single Operator.
526
+ #
527
+ # @overload get_operator(request, options = nil)
528
+ # Pass arguments to `get_operator` via a request object, either of type
529
+ # {::Google::Cloud::VisionAI::V1::GetOperatorRequest} or an equivalent Hash.
530
+ #
531
+ # @param request [::Google::Cloud::VisionAI::V1::GetOperatorRequest, ::Hash]
532
+ # A request object representing the call parameters. Required. To specify no
533
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
534
+ # @param options [::Gapic::CallOptions, ::Hash]
535
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
536
+ #
537
+ # @overload get_operator(name: nil)
538
+ # Pass arguments to `get_operator` via keyword arguments. Note that at
539
+ # least one keyword argument is required. To specify no parameters, or to keep all
540
+ # the default parameter values, pass an empty Hash as a request object (see above).
541
+ #
542
+ # @param name [::String]
543
+ # Required. Name of the resource.
544
+ #
545
+ # @yield [response, operation] Access the result along with the RPC operation
546
+ # @yieldparam response [::Google::Cloud::VisionAI::V1::Operator]
547
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
548
+ #
549
+ # @return [::Google::Cloud::VisionAI::V1::Operator]
550
+ #
551
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
552
+ #
553
+ # @example Basic example
554
+ # require "google/cloud/vision_ai/v1"
555
+ #
556
+ # # Create a client object. The client can be reused for multiple calls.
557
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
558
+ #
559
+ # # Create a request. To set request fields, pass in keyword arguments.
560
+ # request = Google::Cloud::VisionAI::V1::GetOperatorRequest.new
561
+ #
562
+ # # Call the get_operator method.
563
+ # result = client.get_operator request
564
+ #
565
+ # # The returned object is of type Google::Cloud::VisionAI::V1::Operator.
566
+ # p result
567
+ #
568
+ def get_operator request, options = nil
569
+ raise ::ArgumentError, "request must be provided" if request.nil?
570
+
571
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::GetOperatorRequest
572
+
573
+ # Converts hash and nil to an options object
574
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
575
+
576
+ # Customize the options with defaults
577
+ metadata = @config.rpcs.get_operator.metadata.to_h
578
+
579
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
580
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
581
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
582
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
583
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
584
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
585
+
586
+ header_params = {}
587
+ if request.name
588
+ header_params["name"] = request.name
589
+ end
590
+
591
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
592
+ metadata[:"x-goog-request-params"] ||= request_params_header
593
+
594
+ options.apply_defaults timeout: @config.rpcs.get_operator.timeout,
595
+ metadata: metadata,
596
+ retry_policy: @config.rpcs.get_operator.retry_policy
597
+
598
+ options.apply_defaults timeout: @config.timeout,
599
+ metadata: @config.metadata,
600
+ retry_policy: @config.retry_policy
601
+
602
+ @live_video_analytics_stub.call_rpc :get_operator, request, options: options do |response, operation|
603
+ yield response, operation if block_given?
604
+ return response
605
+ end
606
+ rescue ::GRPC::BadStatus => e
607
+ raise ::Google::Cloud::Error.from_error(e)
608
+ end
609
+
610
+ ##
611
+ # Creates a new Operator in a given project and location.
612
+ #
613
+ # @overload create_operator(request, options = nil)
614
+ # Pass arguments to `create_operator` via a request object, either of type
615
+ # {::Google::Cloud::VisionAI::V1::CreateOperatorRequest} or an equivalent Hash.
616
+ #
617
+ # @param request [::Google::Cloud::VisionAI::V1::CreateOperatorRequest, ::Hash]
618
+ # A request object representing the call parameters. Required. To specify no
619
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
620
+ # @param options [::Gapic::CallOptions, ::Hash]
621
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
622
+ #
623
+ # @overload create_operator(parent: nil, operator_id: nil, operator: nil, request_id: nil)
624
+ # Pass arguments to `create_operator` via keyword arguments. Note that at
625
+ # least one keyword argument is required. To specify no parameters, or to keep all
626
+ # the default parameter values, pass an empty Hash as a request object (see above).
627
+ #
628
+ # @param parent [::String]
629
+ # Required. Value for parent.
630
+ # @param operator_id [::String]
631
+ # Required. Id of the requesting object.
632
+ # @param operator [::Google::Cloud::VisionAI::V1::Operator, ::Hash]
633
+ # Required. The resource being created.
634
+ # @param request_id [::String]
635
+ # Optional. An optional request ID to identify requests. Specify a unique
636
+ # request ID so that if you must retry your request, the server will know to
637
+ # ignore the request if it has already been completed. The server will
638
+ # guarantee that for at least 60 minutes since the first request.
639
+ #
640
+ # For example, consider a situation where you make an initial request and the
641
+ # request times out. If you make the request again with the same request ID,
642
+ # the server can check if original operation with the same request ID was
643
+ # received, and if so, will ignore the second request. This prevents clients
644
+ # from accidentally creating duplicate commitments.
645
+ #
646
+ # The request ID must be a valid UUID with the exception that zero UUID is
647
+ # not supported (00000000-0000-0000-0000-000000000000).
648
+ #
649
+ # @yield [response, operation] Access the result along with the RPC operation
650
+ # @yieldparam response [::Gapic::Operation]
651
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
652
+ #
653
+ # @return [::Gapic::Operation]
654
+ #
655
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
656
+ #
657
+ # @example Basic example
658
+ # require "google/cloud/vision_ai/v1"
659
+ #
660
+ # # Create a client object. The client can be reused for multiple calls.
661
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
662
+ #
663
+ # # Create a request. To set request fields, pass in keyword arguments.
664
+ # request = Google::Cloud::VisionAI::V1::CreateOperatorRequest.new
665
+ #
666
+ # # Call the create_operator method.
667
+ # result = client.create_operator request
668
+ #
669
+ # # The returned object is of type Gapic::Operation. You can use it to
670
+ # # check the status of an operation, cancel it, or wait for results.
671
+ # # Here is how to wait for a response.
672
+ # result.wait_until_done! timeout: 60
673
+ # if result.response?
674
+ # p result.response
675
+ # else
676
+ # puts "No response received."
677
+ # end
678
+ #
679
+ def create_operator request, options = nil
680
+ raise ::ArgumentError, "request must be provided" if request.nil?
681
+
682
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::CreateOperatorRequest
683
+
684
+ # Converts hash and nil to an options object
685
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
686
+
687
+ # Customize the options with defaults
688
+ metadata = @config.rpcs.create_operator.metadata.to_h
689
+
690
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
691
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
692
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
693
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
694
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
695
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
696
+
697
+ header_params = {}
698
+ if request.parent
699
+ header_params["parent"] = request.parent
700
+ end
701
+
702
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
703
+ metadata[:"x-goog-request-params"] ||= request_params_header
704
+
705
+ options.apply_defaults timeout: @config.rpcs.create_operator.timeout,
706
+ metadata: metadata,
707
+ retry_policy: @config.rpcs.create_operator.retry_policy
708
+
709
+ options.apply_defaults timeout: @config.timeout,
710
+ metadata: @config.metadata,
711
+ retry_policy: @config.retry_policy
712
+
713
+ @live_video_analytics_stub.call_rpc :create_operator, request, options: options do |response, operation|
714
+ response = ::Gapic::Operation.new response, @operations_client, options: options
715
+ yield response, operation if block_given?
716
+ return response
717
+ end
718
+ rescue ::GRPC::BadStatus => e
719
+ raise ::Google::Cloud::Error.from_error(e)
720
+ end
721
+
722
+ ##
723
+ # Updates the parameters of a single Operator.
724
+ #
725
+ # @overload update_operator(request, options = nil)
726
+ # Pass arguments to `update_operator` via a request object, either of type
727
+ # {::Google::Cloud::VisionAI::V1::UpdateOperatorRequest} or an equivalent Hash.
728
+ #
729
+ # @param request [::Google::Cloud::VisionAI::V1::UpdateOperatorRequest, ::Hash]
730
+ # A request object representing the call parameters. Required. To specify no
731
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
732
+ # @param options [::Gapic::CallOptions, ::Hash]
733
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
734
+ #
735
+ # @overload update_operator(update_mask: nil, operator: nil, request_id: nil)
736
+ # Pass arguments to `update_operator` via keyword arguments. Note that at
737
+ # least one keyword argument is required. To specify no parameters, or to keep all
738
+ # the default parameter values, pass an empty Hash as a request object (see above).
739
+ #
740
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
741
+ # Required. Field mask is used to specify the fields to be overwritten in the
742
+ # Operator resource by the update.
743
+ # The fields specified in the update_mask are relative to the resource, not
744
+ # the full request. A field will be overwritten if it is in the mask. If the
745
+ # user does not provide a mask then all fields will be overwritten.
746
+ # @param operator [::Google::Cloud::VisionAI::V1::Operator, ::Hash]
747
+ # Required. The resource being updated
748
+ # @param request_id [::String]
749
+ # Optional. An optional request ID to identify requests. Specify a unique
750
+ # request ID so that if you must retry your request, the server will know to
751
+ # ignore the request if it has already been completed. The server will
752
+ # guarantee that for at least 60 minutes since the first request.
753
+ #
754
+ # For example, consider a situation where you make an initial request and the
755
+ # request times out. If you make the request again with the same request ID,
756
+ # the server can check if original operation with the same request ID was
757
+ # received, and if so, will ignore the second request. This prevents clients
758
+ # from accidentally creating duplicate commitments.
759
+ #
760
+ # The request ID must be a valid UUID with the exception that zero UUID is
761
+ # not supported (00000000-0000-0000-0000-000000000000).
762
+ #
763
+ # @yield [response, operation] Access the result along with the RPC operation
764
+ # @yieldparam response [::Gapic::Operation]
765
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
766
+ #
767
+ # @return [::Gapic::Operation]
768
+ #
769
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
770
+ #
771
+ # @example Basic example
772
+ # require "google/cloud/vision_ai/v1"
773
+ #
774
+ # # Create a client object. The client can be reused for multiple calls.
775
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
776
+ #
777
+ # # Create a request. To set request fields, pass in keyword arguments.
778
+ # request = Google::Cloud::VisionAI::V1::UpdateOperatorRequest.new
779
+ #
780
+ # # Call the update_operator method.
781
+ # result = client.update_operator request
782
+ #
783
+ # # The returned object is of type Gapic::Operation. You can use it to
784
+ # # check the status of an operation, cancel it, or wait for results.
785
+ # # Here is how to wait for a response.
786
+ # result.wait_until_done! timeout: 60
787
+ # if result.response?
788
+ # p result.response
789
+ # else
790
+ # puts "No response received."
791
+ # end
792
+ #
793
+ def update_operator request, options = nil
794
+ raise ::ArgumentError, "request must be provided" if request.nil?
795
+
796
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::UpdateOperatorRequest
797
+
798
+ # Converts hash and nil to an options object
799
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
800
+
801
+ # Customize the options with defaults
802
+ metadata = @config.rpcs.update_operator.metadata.to_h
803
+
804
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
805
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
806
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
807
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
808
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
809
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
810
+
811
+ header_params = {}
812
+ if request.operator&.name
813
+ header_params["operator.name"] = request.operator.name
814
+ end
815
+
816
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
817
+ metadata[:"x-goog-request-params"] ||= request_params_header
818
+
819
+ options.apply_defaults timeout: @config.rpcs.update_operator.timeout,
820
+ metadata: metadata,
821
+ retry_policy: @config.rpcs.update_operator.retry_policy
822
+
823
+ options.apply_defaults timeout: @config.timeout,
824
+ metadata: @config.metadata,
825
+ retry_policy: @config.retry_policy
826
+
827
+ @live_video_analytics_stub.call_rpc :update_operator, request, options: options do |response, operation|
828
+ response = ::Gapic::Operation.new response, @operations_client, options: options
829
+ yield response, operation if block_given?
830
+ return response
831
+ end
832
+ rescue ::GRPC::BadStatus => e
833
+ raise ::Google::Cloud::Error.from_error(e)
834
+ end
835
+
836
+ ##
837
+ # Deletes a single Operator.
838
+ #
839
+ # @overload delete_operator(request, options = nil)
840
+ # Pass arguments to `delete_operator` via a request object, either of type
841
+ # {::Google::Cloud::VisionAI::V1::DeleteOperatorRequest} or an equivalent Hash.
842
+ #
843
+ # @param request [::Google::Cloud::VisionAI::V1::DeleteOperatorRequest, ::Hash]
844
+ # A request object representing the call parameters. Required. To specify no
845
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
846
+ # @param options [::Gapic::CallOptions, ::Hash]
847
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
848
+ #
849
+ # @overload delete_operator(name: nil, request_id: nil)
850
+ # Pass arguments to `delete_operator` via keyword arguments. Note that at
851
+ # least one keyword argument is required. To specify no parameters, or to keep all
852
+ # the default parameter values, pass an empty Hash as a request object (see above).
853
+ #
854
+ # @param name [::String]
855
+ # Required. Name of the resource
856
+ # @param request_id [::String]
857
+ # Optional. An optional request ID to identify requests. Specify a unique
858
+ # request ID so that if you must retry your request, the server will know to
859
+ # ignore the request if it has already been completed. The server will
860
+ # guarantee that for at least 60 minutes after the first request.
861
+ #
862
+ # For example, consider a situation where you make an initial request and the
863
+ # request times out. If you make the request again with the same request ID,
864
+ # the server can check if original operation with the same request ID was
865
+ # received, and if so, will ignore the second request. This prevents clients
866
+ # from accidentally creating duplicate commitments.
867
+ #
868
+ # The request ID must be a valid UUID with the exception that zero UUID is
869
+ # not supported (00000000-0000-0000-0000-000000000000).
870
+ #
871
+ # @yield [response, operation] Access the result along with the RPC operation
872
+ # @yieldparam response [::Gapic::Operation]
873
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
874
+ #
875
+ # @return [::Gapic::Operation]
876
+ #
877
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
878
+ #
879
+ # @example Basic example
880
+ # require "google/cloud/vision_ai/v1"
881
+ #
882
+ # # Create a client object. The client can be reused for multiple calls.
883
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
884
+ #
885
+ # # Create a request. To set request fields, pass in keyword arguments.
886
+ # request = Google::Cloud::VisionAI::V1::DeleteOperatorRequest.new
887
+ #
888
+ # # Call the delete_operator method.
889
+ # result = client.delete_operator request
890
+ #
891
+ # # The returned object is of type Gapic::Operation. You can use it to
892
+ # # check the status of an operation, cancel it, or wait for results.
893
+ # # Here is how to wait for a response.
894
+ # result.wait_until_done! timeout: 60
895
+ # if result.response?
896
+ # p result.response
897
+ # else
898
+ # puts "No response received."
899
+ # end
900
+ #
901
+ def delete_operator request, options = nil
902
+ raise ::ArgumentError, "request must be provided" if request.nil?
903
+
904
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::DeleteOperatorRequest
905
+
906
+ # Converts hash and nil to an options object
907
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
908
+
909
+ # Customize the options with defaults
910
+ metadata = @config.rpcs.delete_operator.metadata.to_h
911
+
912
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
913
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
914
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
915
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
916
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
917
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
918
+
919
+ header_params = {}
920
+ if request.name
921
+ header_params["name"] = request.name
922
+ end
923
+
924
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
925
+ metadata[:"x-goog-request-params"] ||= request_params_header
926
+
927
+ options.apply_defaults timeout: @config.rpcs.delete_operator.timeout,
928
+ metadata: metadata,
929
+ retry_policy: @config.rpcs.delete_operator.retry_policy
930
+
931
+ options.apply_defaults timeout: @config.timeout,
932
+ metadata: @config.metadata,
933
+ retry_policy: @config.retry_policy
934
+
935
+ @live_video_analytics_stub.call_rpc :delete_operator, request, options: options do |response, operation|
936
+ response = ::Gapic::Operation.new response, @operations_client, options: options
937
+ yield response, operation if block_given?
938
+ return response
939
+ end
940
+ rescue ::GRPC::BadStatus => e
941
+ raise ::Google::Cloud::Error.from_error(e)
942
+ end
943
+
944
+ ##
945
+ # Lists Analyses in a given project and location.
946
+ #
947
+ # @overload list_analyses(request, options = nil)
948
+ # Pass arguments to `list_analyses` via a request object, either of type
949
+ # {::Google::Cloud::VisionAI::V1::ListAnalysesRequest} or an equivalent Hash.
950
+ #
951
+ # @param request [::Google::Cloud::VisionAI::V1::ListAnalysesRequest, ::Hash]
952
+ # A request object representing the call parameters. Required. To specify no
953
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
954
+ # @param options [::Gapic::CallOptions, ::Hash]
955
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
956
+ #
957
+ # @overload list_analyses(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
958
+ # Pass arguments to `list_analyses` via keyword arguments. Note that at
959
+ # least one keyword argument is required. To specify no parameters, or to keep all
960
+ # the default parameter values, pass an empty Hash as a request object (see above).
961
+ #
962
+ # @param parent [::String]
963
+ # Required. Parent value for ListAnalysesRequest
964
+ # @param page_size [::Integer]
965
+ # Requested page size. Server may return fewer items than requested.
966
+ # If unspecified, server will pick an appropriate default.
967
+ # @param page_token [::String]
968
+ # A token identifying a page of results the server should return.
969
+ # @param filter [::String]
970
+ # Filtering results
971
+ # @param order_by [::String]
972
+ # Hint for how to order the results
973
+ #
974
+ # @yield [response, operation] Access the result along with the RPC operation
975
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Analysis>]
976
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
977
+ #
978
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Analysis>]
979
+ #
980
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
981
+ #
982
+ # @example Basic example
983
+ # require "google/cloud/vision_ai/v1"
984
+ #
985
+ # # Create a client object. The client can be reused for multiple calls.
986
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
987
+ #
988
+ # # Create a request. To set request fields, pass in keyword arguments.
989
+ # request = Google::Cloud::VisionAI::V1::ListAnalysesRequest.new
990
+ #
991
+ # # Call the list_analyses method.
992
+ # result = client.list_analyses request
993
+ #
994
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
995
+ # # over elements, and API calls will be issued to fetch pages as needed.
996
+ # result.each do |item|
997
+ # # Each element is of type ::Google::Cloud::VisionAI::V1::Analysis.
998
+ # p item
999
+ # end
1000
+ #
1001
+ def list_analyses request, options = nil
1002
+ raise ::ArgumentError, "request must be provided" if request.nil?
1003
+
1004
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::ListAnalysesRequest
1005
+
1006
+ # Converts hash and nil to an options object
1007
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1008
+
1009
+ # Customize the options with defaults
1010
+ metadata = @config.rpcs.list_analyses.metadata.to_h
1011
+
1012
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1013
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1014
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1015
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
1016
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1017
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1018
+
1019
+ header_params = {}
1020
+ if request.parent
1021
+ header_params["parent"] = request.parent
1022
+ end
1023
+
1024
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1025
+ metadata[:"x-goog-request-params"] ||= request_params_header
1026
+
1027
+ options.apply_defaults timeout: @config.rpcs.list_analyses.timeout,
1028
+ metadata: metadata,
1029
+ retry_policy: @config.rpcs.list_analyses.retry_policy
1030
+
1031
+ options.apply_defaults timeout: @config.timeout,
1032
+ metadata: @config.metadata,
1033
+ retry_policy: @config.retry_policy
1034
+
1035
+ @live_video_analytics_stub.call_rpc :list_analyses, request, options: options do |response, operation|
1036
+ response = ::Gapic::PagedEnumerable.new @live_video_analytics_stub, :list_analyses, request, response, operation, options
1037
+ yield response, operation if block_given?
1038
+ return response
1039
+ end
1040
+ rescue ::GRPC::BadStatus => e
1041
+ raise ::Google::Cloud::Error.from_error(e)
1042
+ end
1043
+
1044
+ ##
1045
+ # Gets details of a single Analysis.
1046
+ #
1047
+ # @overload get_analysis(request, options = nil)
1048
+ # Pass arguments to `get_analysis` via a request object, either of type
1049
+ # {::Google::Cloud::VisionAI::V1::GetAnalysisRequest} or an equivalent Hash.
1050
+ #
1051
+ # @param request [::Google::Cloud::VisionAI::V1::GetAnalysisRequest, ::Hash]
1052
+ # A request object representing the call parameters. Required. To specify no
1053
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1054
+ # @param options [::Gapic::CallOptions, ::Hash]
1055
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1056
+ #
1057
+ # @overload get_analysis(name: nil)
1058
+ # Pass arguments to `get_analysis` via keyword arguments. Note that at
1059
+ # least one keyword argument is required. To specify no parameters, or to keep all
1060
+ # the default parameter values, pass an empty Hash as a request object (see above).
1061
+ #
1062
+ # @param name [::String]
1063
+ # Required. Name of the resource.
1064
+ #
1065
+ # @yield [response, operation] Access the result along with the RPC operation
1066
+ # @yieldparam response [::Google::Cloud::VisionAI::V1::Analysis]
1067
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1068
+ #
1069
+ # @return [::Google::Cloud::VisionAI::V1::Analysis]
1070
+ #
1071
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1072
+ #
1073
+ # @example Basic example
1074
+ # require "google/cloud/vision_ai/v1"
1075
+ #
1076
+ # # Create a client object. The client can be reused for multiple calls.
1077
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
1078
+ #
1079
+ # # Create a request. To set request fields, pass in keyword arguments.
1080
+ # request = Google::Cloud::VisionAI::V1::GetAnalysisRequest.new
1081
+ #
1082
+ # # Call the get_analysis method.
1083
+ # result = client.get_analysis request
1084
+ #
1085
+ # # The returned object is of type Google::Cloud::VisionAI::V1::Analysis.
1086
+ # p result
1087
+ #
1088
+ def get_analysis request, options = nil
1089
+ raise ::ArgumentError, "request must be provided" if request.nil?
1090
+
1091
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::GetAnalysisRequest
1092
+
1093
+ # Converts hash and nil to an options object
1094
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1095
+
1096
+ # Customize the options with defaults
1097
+ metadata = @config.rpcs.get_analysis.metadata.to_h
1098
+
1099
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1100
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1101
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1102
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
1103
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1104
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1105
+
1106
+ header_params = {}
1107
+ if request.name
1108
+ header_params["name"] = request.name
1109
+ end
1110
+
1111
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1112
+ metadata[:"x-goog-request-params"] ||= request_params_header
1113
+
1114
+ options.apply_defaults timeout: @config.rpcs.get_analysis.timeout,
1115
+ metadata: metadata,
1116
+ retry_policy: @config.rpcs.get_analysis.retry_policy
1117
+
1118
+ options.apply_defaults timeout: @config.timeout,
1119
+ metadata: @config.metadata,
1120
+ retry_policy: @config.retry_policy
1121
+
1122
+ @live_video_analytics_stub.call_rpc :get_analysis, request, options: options do |response, operation|
1123
+ yield response, operation if block_given?
1124
+ return response
1125
+ end
1126
+ rescue ::GRPC::BadStatus => e
1127
+ raise ::Google::Cloud::Error.from_error(e)
1128
+ end
1129
+
1130
+ ##
1131
+ # Creates a new Analysis in a given project and location.
1132
+ #
1133
+ # @overload create_analysis(request, options = nil)
1134
+ # Pass arguments to `create_analysis` via a request object, either of type
1135
+ # {::Google::Cloud::VisionAI::V1::CreateAnalysisRequest} or an equivalent Hash.
1136
+ #
1137
+ # @param request [::Google::Cloud::VisionAI::V1::CreateAnalysisRequest, ::Hash]
1138
+ # A request object representing the call parameters. Required. To specify no
1139
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1140
+ # @param options [::Gapic::CallOptions, ::Hash]
1141
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1142
+ #
1143
+ # @overload create_analysis(parent: nil, analysis_id: nil, analysis: nil, request_id: nil)
1144
+ # Pass arguments to `create_analysis` via keyword arguments. Note that at
1145
+ # least one keyword argument is required. To specify no parameters, or to keep all
1146
+ # the default parameter values, pass an empty Hash as a request object (see above).
1147
+ #
1148
+ # @param parent [::String]
1149
+ # Required. Value for parent.
1150
+ # @param analysis_id [::String]
1151
+ # Required. Id of the requesting object.
1152
+ # @param analysis [::Google::Cloud::VisionAI::V1::Analysis, ::Hash]
1153
+ # Required. The resource being created.
1154
+ # @param request_id [::String]
1155
+ # Optional. An optional request ID to identify requests. Specify a unique
1156
+ # request ID so that if you must retry your request, the server will know to
1157
+ # ignore the request if it has already been completed. The server will
1158
+ # guarantee that for at least 60 minutes since the first request.
1159
+ #
1160
+ # For example, consider a situation where you make an initial request and the
1161
+ # request times out. If you make the request again with the same request ID,
1162
+ # the server can check if original operation with the same request ID was
1163
+ # received, and if so, will ignore the second request. This prevents clients
1164
+ # from accidentally creating duplicate commitments.
1165
+ #
1166
+ # The request ID must be a valid UUID with the exception that zero UUID is
1167
+ # not supported (00000000-0000-0000-0000-000000000000).
1168
+ #
1169
+ # @yield [response, operation] Access the result along with the RPC operation
1170
+ # @yieldparam response [::Gapic::Operation]
1171
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1172
+ #
1173
+ # @return [::Gapic::Operation]
1174
+ #
1175
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1176
+ #
1177
+ # @example Basic example
1178
+ # require "google/cloud/vision_ai/v1"
1179
+ #
1180
+ # # Create a client object. The client can be reused for multiple calls.
1181
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
1182
+ #
1183
+ # # Create a request. To set request fields, pass in keyword arguments.
1184
+ # request = Google::Cloud::VisionAI::V1::CreateAnalysisRequest.new
1185
+ #
1186
+ # # Call the create_analysis method.
1187
+ # result = client.create_analysis request
1188
+ #
1189
+ # # The returned object is of type Gapic::Operation. You can use it to
1190
+ # # check the status of an operation, cancel it, or wait for results.
1191
+ # # Here is how to wait for a response.
1192
+ # result.wait_until_done! timeout: 60
1193
+ # if result.response?
1194
+ # p result.response
1195
+ # else
1196
+ # puts "No response received."
1197
+ # end
1198
+ #
1199
+ def create_analysis request, options = nil
1200
+ raise ::ArgumentError, "request must be provided" if request.nil?
1201
+
1202
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::CreateAnalysisRequest
1203
+
1204
+ # Converts hash and nil to an options object
1205
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1206
+
1207
+ # Customize the options with defaults
1208
+ metadata = @config.rpcs.create_analysis.metadata.to_h
1209
+
1210
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1211
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1212
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1213
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
1214
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1215
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1216
+
1217
+ header_params = {}
1218
+ if request.parent
1219
+ header_params["parent"] = request.parent
1220
+ end
1221
+
1222
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1223
+ metadata[:"x-goog-request-params"] ||= request_params_header
1224
+
1225
+ options.apply_defaults timeout: @config.rpcs.create_analysis.timeout,
1226
+ metadata: metadata,
1227
+ retry_policy: @config.rpcs.create_analysis.retry_policy
1228
+
1229
+ options.apply_defaults timeout: @config.timeout,
1230
+ metadata: @config.metadata,
1231
+ retry_policy: @config.retry_policy
1232
+
1233
+ @live_video_analytics_stub.call_rpc :create_analysis, request, options: options do |response, operation|
1234
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1235
+ yield response, operation if block_given?
1236
+ return response
1237
+ end
1238
+ rescue ::GRPC::BadStatus => e
1239
+ raise ::Google::Cloud::Error.from_error(e)
1240
+ end
1241
+
1242
+ ##
1243
+ # Updates the parameters of a single Analysis.
1244
+ #
1245
+ # @overload update_analysis(request, options = nil)
1246
+ # Pass arguments to `update_analysis` via a request object, either of type
1247
+ # {::Google::Cloud::VisionAI::V1::UpdateAnalysisRequest} or an equivalent Hash.
1248
+ #
1249
+ # @param request [::Google::Cloud::VisionAI::V1::UpdateAnalysisRequest, ::Hash]
1250
+ # A request object representing the call parameters. Required. To specify no
1251
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1252
+ # @param options [::Gapic::CallOptions, ::Hash]
1253
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1254
+ #
1255
+ # @overload update_analysis(update_mask: nil, analysis: nil, request_id: nil)
1256
+ # Pass arguments to `update_analysis` via keyword arguments. Note that at
1257
+ # least one keyword argument is required. To specify no parameters, or to keep all
1258
+ # the default parameter values, pass an empty Hash as a request object (see above).
1259
+ #
1260
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1261
+ # Required. Field mask is used to specify the fields to be overwritten in the
1262
+ # Analysis resource by the update.
1263
+ # The fields specified in the update_mask are relative to the resource, not
1264
+ # the full request. A field will be overwritten if it is in the mask. If the
1265
+ # user does not provide a mask then all fields will be overwritten.
1266
+ # @param analysis [::Google::Cloud::VisionAI::V1::Analysis, ::Hash]
1267
+ # Required. The resource being updated.
1268
+ # @param request_id [::String]
1269
+ # Optional. An optional request ID to identify requests. Specify a unique
1270
+ # request ID so that if you must retry your request, the server will know to
1271
+ # ignore the request if it has already been completed. The server will
1272
+ # guarantee that for at least 60 minutes since the first request.
1273
+ #
1274
+ # For example, consider a situation where you make an initial request and the
1275
+ # request times out. If you make the request again with the same request ID,
1276
+ # the server can check if original operation with the same request ID was
1277
+ # received, and if so, will ignore the second request. This prevents clients
1278
+ # from accidentally creating duplicate commitments.
1279
+ #
1280
+ # The request ID must be a valid UUID with the exception that zero UUID is
1281
+ # not supported (00000000-0000-0000-0000-000000000000).
1282
+ #
1283
+ # @yield [response, operation] Access the result along with the RPC operation
1284
+ # @yieldparam response [::Gapic::Operation]
1285
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1286
+ #
1287
+ # @return [::Gapic::Operation]
1288
+ #
1289
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1290
+ #
1291
+ # @example Basic example
1292
+ # require "google/cloud/vision_ai/v1"
1293
+ #
1294
+ # # Create a client object. The client can be reused for multiple calls.
1295
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
1296
+ #
1297
+ # # Create a request. To set request fields, pass in keyword arguments.
1298
+ # request = Google::Cloud::VisionAI::V1::UpdateAnalysisRequest.new
1299
+ #
1300
+ # # Call the update_analysis method.
1301
+ # result = client.update_analysis request
1302
+ #
1303
+ # # The returned object is of type Gapic::Operation. You can use it to
1304
+ # # check the status of an operation, cancel it, or wait for results.
1305
+ # # Here is how to wait for a response.
1306
+ # result.wait_until_done! timeout: 60
1307
+ # if result.response?
1308
+ # p result.response
1309
+ # else
1310
+ # puts "No response received."
1311
+ # end
1312
+ #
1313
+ def update_analysis request, options = nil
1314
+ raise ::ArgumentError, "request must be provided" if request.nil?
1315
+
1316
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::UpdateAnalysisRequest
1317
+
1318
+ # Converts hash and nil to an options object
1319
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1320
+
1321
+ # Customize the options with defaults
1322
+ metadata = @config.rpcs.update_analysis.metadata.to_h
1323
+
1324
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1325
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1326
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1327
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
1328
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1329
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1330
+
1331
+ header_params = {}
1332
+ if request.analysis&.name
1333
+ header_params["analysis.name"] = request.analysis.name
1334
+ end
1335
+
1336
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1337
+ metadata[:"x-goog-request-params"] ||= request_params_header
1338
+
1339
+ options.apply_defaults timeout: @config.rpcs.update_analysis.timeout,
1340
+ metadata: metadata,
1341
+ retry_policy: @config.rpcs.update_analysis.retry_policy
1342
+
1343
+ options.apply_defaults timeout: @config.timeout,
1344
+ metadata: @config.metadata,
1345
+ retry_policy: @config.retry_policy
1346
+
1347
+ @live_video_analytics_stub.call_rpc :update_analysis, request, options: options do |response, operation|
1348
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1349
+ yield response, operation if block_given?
1350
+ return response
1351
+ end
1352
+ rescue ::GRPC::BadStatus => e
1353
+ raise ::Google::Cloud::Error.from_error(e)
1354
+ end
1355
+
1356
+ ##
1357
+ # Deletes a single Analysis.
1358
+ #
1359
+ # @overload delete_analysis(request, options = nil)
1360
+ # Pass arguments to `delete_analysis` via a request object, either of type
1361
+ # {::Google::Cloud::VisionAI::V1::DeleteAnalysisRequest} or an equivalent Hash.
1362
+ #
1363
+ # @param request [::Google::Cloud::VisionAI::V1::DeleteAnalysisRequest, ::Hash]
1364
+ # A request object representing the call parameters. Required. To specify no
1365
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1366
+ # @param options [::Gapic::CallOptions, ::Hash]
1367
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1368
+ #
1369
+ # @overload delete_analysis(name: nil, request_id: nil)
1370
+ # Pass arguments to `delete_analysis` via keyword arguments. Note that at
1371
+ # least one keyword argument is required. To specify no parameters, or to keep all
1372
+ # the default parameter values, pass an empty Hash as a request object (see above).
1373
+ #
1374
+ # @param name [::String]
1375
+ # Required. Name of the resource.
1376
+ # @param request_id [::String]
1377
+ # Optional. An optional request ID to identify requests. Specify a unique
1378
+ # request ID so that if you must retry your request, the server will know to
1379
+ # ignore the request if it has already been completed. The server will
1380
+ # guarantee that for at least 60 minutes after the first request.
1381
+ #
1382
+ # For example, consider a situation where you make an initial request and the
1383
+ # request times out. If you make the request again with the same request ID,
1384
+ # the server can check if original operation with the same request ID was
1385
+ # received, and if so, will ignore the second request. This prevents clients
1386
+ # from accidentally creating duplicate commitments.
1387
+ #
1388
+ # The request ID must be a valid UUID with the exception that zero UUID is
1389
+ # not supported (00000000-0000-0000-0000-000000000000).
1390
+ #
1391
+ # @yield [response, operation] Access the result along with the RPC operation
1392
+ # @yieldparam response [::Gapic::Operation]
1393
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1394
+ #
1395
+ # @return [::Gapic::Operation]
1396
+ #
1397
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1398
+ #
1399
+ # @example Basic example
1400
+ # require "google/cloud/vision_ai/v1"
1401
+ #
1402
+ # # Create a client object. The client can be reused for multiple calls.
1403
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
1404
+ #
1405
+ # # Create a request. To set request fields, pass in keyword arguments.
1406
+ # request = Google::Cloud::VisionAI::V1::DeleteAnalysisRequest.new
1407
+ #
1408
+ # # Call the delete_analysis method.
1409
+ # result = client.delete_analysis request
1410
+ #
1411
+ # # The returned object is of type Gapic::Operation. You can use it to
1412
+ # # check the status of an operation, cancel it, or wait for results.
1413
+ # # Here is how to wait for a response.
1414
+ # result.wait_until_done! timeout: 60
1415
+ # if result.response?
1416
+ # p result.response
1417
+ # else
1418
+ # puts "No response received."
1419
+ # end
1420
+ #
1421
+ def delete_analysis request, options = nil
1422
+ raise ::ArgumentError, "request must be provided" if request.nil?
1423
+
1424
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::DeleteAnalysisRequest
1425
+
1426
+ # Converts hash and nil to an options object
1427
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1428
+
1429
+ # Customize the options with defaults
1430
+ metadata = @config.rpcs.delete_analysis.metadata.to_h
1431
+
1432
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1433
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1434
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1435
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
1436
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1437
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1438
+
1439
+ header_params = {}
1440
+ if request.name
1441
+ header_params["name"] = request.name
1442
+ end
1443
+
1444
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1445
+ metadata[:"x-goog-request-params"] ||= request_params_header
1446
+
1447
+ options.apply_defaults timeout: @config.rpcs.delete_analysis.timeout,
1448
+ metadata: metadata,
1449
+ retry_policy: @config.rpcs.delete_analysis.retry_policy
1450
+
1451
+ options.apply_defaults timeout: @config.timeout,
1452
+ metadata: @config.metadata,
1453
+ retry_policy: @config.retry_policy
1454
+
1455
+ @live_video_analytics_stub.call_rpc :delete_analysis, request, options: options do |response, operation|
1456
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1457
+ yield response, operation if block_given?
1458
+ return response
1459
+ end
1460
+ rescue ::GRPC::BadStatus => e
1461
+ raise ::Google::Cloud::Error.from_error(e)
1462
+ end
1463
+
1464
+ ##
1465
+ # Lists Processes in a given project and location.
1466
+ #
1467
+ # @overload list_processes(request, options = nil)
1468
+ # Pass arguments to `list_processes` via a request object, either of type
1469
+ # {::Google::Cloud::VisionAI::V1::ListProcessesRequest} or an equivalent Hash.
1470
+ #
1471
+ # @param request [::Google::Cloud::VisionAI::V1::ListProcessesRequest, ::Hash]
1472
+ # A request object representing the call parameters. Required. To specify no
1473
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1474
+ # @param options [::Gapic::CallOptions, ::Hash]
1475
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1476
+ #
1477
+ # @overload list_processes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1478
+ # Pass arguments to `list_processes` via keyword arguments. Note that at
1479
+ # least one keyword argument is required. To specify no parameters, or to keep all
1480
+ # the default parameter values, pass an empty Hash as a request object (see above).
1481
+ #
1482
+ # @param parent [::String]
1483
+ # Required. Parent value for ListProcessesRequest.
1484
+ # @param page_size [::Integer]
1485
+ # Requested page size. Server may return fewer items than requested.
1486
+ # If unspecified, server will pick an appropriate default.
1487
+ # @param page_token [::String]
1488
+ # A token identifying a page of results the server should return.
1489
+ # @param filter [::String]
1490
+ # Filtering results
1491
+ # @param order_by [::String]
1492
+ # Hint for how to order the results
1493
+ #
1494
+ # @yield [response, operation] Access the result along with the RPC operation
1495
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Process>]
1496
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1497
+ #
1498
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::VisionAI::V1::Process>]
1499
+ #
1500
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1501
+ #
1502
+ # @example Basic example
1503
+ # require "google/cloud/vision_ai/v1"
1504
+ #
1505
+ # # Create a client object. The client can be reused for multiple calls.
1506
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
1507
+ #
1508
+ # # Create a request. To set request fields, pass in keyword arguments.
1509
+ # request = Google::Cloud::VisionAI::V1::ListProcessesRequest.new
1510
+ #
1511
+ # # Call the list_processes method.
1512
+ # result = client.list_processes request
1513
+ #
1514
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1515
+ # # over elements, and API calls will be issued to fetch pages as needed.
1516
+ # result.each do |item|
1517
+ # # Each element is of type ::Google::Cloud::VisionAI::V1::Process.
1518
+ # p item
1519
+ # end
1520
+ #
1521
+ def list_processes request, options = nil
1522
+ raise ::ArgumentError, "request must be provided" if request.nil?
1523
+
1524
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::ListProcessesRequest
1525
+
1526
+ # Converts hash and nil to an options object
1527
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1528
+
1529
+ # Customize the options with defaults
1530
+ metadata = @config.rpcs.list_processes.metadata.to_h
1531
+
1532
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1533
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1534
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1535
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
1536
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1537
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1538
+
1539
+ header_params = {}
1540
+ if request.parent
1541
+ header_params["parent"] = request.parent
1542
+ end
1543
+
1544
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1545
+ metadata[:"x-goog-request-params"] ||= request_params_header
1546
+
1547
+ options.apply_defaults timeout: @config.rpcs.list_processes.timeout,
1548
+ metadata: metadata,
1549
+ retry_policy: @config.rpcs.list_processes.retry_policy
1550
+
1551
+ options.apply_defaults timeout: @config.timeout,
1552
+ metadata: @config.metadata,
1553
+ retry_policy: @config.retry_policy
1554
+
1555
+ @live_video_analytics_stub.call_rpc :list_processes, request, options: options do |response, operation|
1556
+ response = ::Gapic::PagedEnumerable.new @live_video_analytics_stub, :list_processes, request, response, operation, options
1557
+ yield response, operation if block_given?
1558
+ return response
1559
+ end
1560
+ rescue ::GRPC::BadStatus => e
1561
+ raise ::Google::Cloud::Error.from_error(e)
1562
+ end
1563
+
1564
+ ##
1565
+ # Gets details of a single Process.
1566
+ #
1567
+ # @overload get_process(request, options = nil)
1568
+ # Pass arguments to `get_process` via a request object, either of type
1569
+ # {::Google::Cloud::VisionAI::V1::GetProcessRequest} or an equivalent Hash.
1570
+ #
1571
+ # @param request [::Google::Cloud::VisionAI::V1::GetProcessRequest, ::Hash]
1572
+ # A request object representing the call parameters. Required. To specify no
1573
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1574
+ # @param options [::Gapic::CallOptions, ::Hash]
1575
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1576
+ #
1577
+ # @overload get_process(name: nil)
1578
+ # Pass arguments to `get_process` via keyword arguments. Note that at
1579
+ # least one keyword argument is required. To specify no parameters, or to keep all
1580
+ # the default parameter values, pass an empty Hash as a request object (see above).
1581
+ #
1582
+ # @param name [::String]
1583
+ # Required. Name of the resource.
1584
+ #
1585
+ # @yield [response, operation] Access the result along with the RPC operation
1586
+ # @yieldparam response [::Google::Cloud::VisionAI::V1::Process]
1587
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1588
+ #
1589
+ # @return [::Google::Cloud::VisionAI::V1::Process]
1590
+ #
1591
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1592
+ #
1593
+ # @example Basic example
1594
+ # require "google/cloud/vision_ai/v1"
1595
+ #
1596
+ # # Create a client object. The client can be reused for multiple calls.
1597
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
1598
+ #
1599
+ # # Create a request. To set request fields, pass in keyword arguments.
1600
+ # request = Google::Cloud::VisionAI::V1::GetProcessRequest.new
1601
+ #
1602
+ # # Call the get_process method.
1603
+ # result = client.get_process request
1604
+ #
1605
+ # # The returned object is of type Google::Cloud::VisionAI::V1::Process.
1606
+ # p result
1607
+ #
1608
+ def get_process request, options = nil
1609
+ raise ::ArgumentError, "request must be provided" if request.nil?
1610
+
1611
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::GetProcessRequest
1612
+
1613
+ # Converts hash and nil to an options object
1614
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1615
+
1616
+ # Customize the options with defaults
1617
+ metadata = @config.rpcs.get_process.metadata.to_h
1618
+
1619
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1620
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1621
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1622
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
1623
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1624
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1625
+
1626
+ header_params = {}
1627
+ if request.name
1628
+ header_params["name"] = request.name
1629
+ end
1630
+
1631
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1632
+ metadata[:"x-goog-request-params"] ||= request_params_header
1633
+
1634
+ options.apply_defaults timeout: @config.rpcs.get_process.timeout,
1635
+ metadata: metadata,
1636
+ retry_policy: @config.rpcs.get_process.retry_policy
1637
+
1638
+ options.apply_defaults timeout: @config.timeout,
1639
+ metadata: @config.metadata,
1640
+ retry_policy: @config.retry_policy
1641
+
1642
+ @live_video_analytics_stub.call_rpc :get_process, request, options: options do |response, operation|
1643
+ yield response, operation if block_given?
1644
+ return response
1645
+ end
1646
+ rescue ::GRPC::BadStatus => e
1647
+ raise ::Google::Cloud::Error.from_error(e)
1648
+ end
1649
+
1650
+ ##
1651
+ # Creates a new Process in a given project and location.
1652
+ #
1653
+ # @overload create_process(request, options = nil)
1654
+ # Pass arguments to `create_process` via a request object, either of type
1655
+ # {::Google::Cloud::VisionAI::V1::CreateProcessRequest} or an equivalent Hash.
1656
+ #
1657
+ # @param request [::Google::Cloud::VisionAI::V1::CreateProcessRequest, ::Hash]
1658
+ # A request object representing the call parameters. Required. To specify no
1659
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1660
+ # @param options [::Gapic::CallOptions, ::Hash]
1661
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1662
+ #
1663
+ # @overload create_process(parent: nil, process_id: nil, process: nil, request_id: nil)
1664
+ # Pass arguments to `create_process` via keyword arguments. Note that at
1665
+ # least one keyword argument is required. To specify no parameters, or to keep all
1666
+ # the default parameter values, pass an empty Hash as a request object (see above).
1667
+ #
1668
+ # @param parent [::String]
1669
+ # Required. Value for parent.
1670
+ # @param process_id [::String]
1671
+ # Required. Id of the requesting object.
1672
+ # @param process [::Google::Cloud::VisionAI::V1::Process, ::Hash]
1673
+ # Required. The resource being created.
1674
+ # @param request_id [::String]
1675
+ # Optional. An optional request ID to identify requests. Specify a unique
1676
+ # request ID so that if you must retry your request, the server will know to
1677
+ # ignore the request if it has already been completed. The server will
1678
+ # guarantee that for at least 60 minutes since the first request.
1679
+ #
1680
+ # For example, consider a situation where you make an initial request and the
1681
+ # request times out. If you make the request again with the same request ID,
1682
+ # the server can check if original operation with the same request ID was
1683
+ # received, and if so, will ignore the second request. This prevents clients
1684
+ # from accidentally creating duplicate commitments.
1685
+ #
1686
+ # The request ID must be a valid UUID with the exception that zero UUID is
1687
+ # not supported (00000000-0000-0000-0000-000000000000).
1688
+ #
1689
+ # @yield [response, operation] Access the result along with the RPC operation
1690
+ # @yieldparam response [::Gapic::Operation]
1691
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1692
+ #
1693
+ # @return [::Gapic::Operation]
1694
+ #
1695
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1696
+ #
1697
+ # @example Basic example
1698
+ # require "google/cloud/vision_ai/v1"
1699
+ #
1700
+ # # Create a client object. The client can be reused for multiple calls.
1701
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
1702
+ #
1703
+ # # Create a request. To set request fields, pass in keyword arguments.
1704
+ # request = Google::Cloud::VisionAI::V1::CreateProcessRequest.new
1705
+ #
1706
+ # # Call the create_process method.
1707
+ # result = client.create_process request
1708
+ #
1709
+ # # The returned object is of type Gapic::Operation. You can use it to
1710
+ # # check the status of an operation, cancel it, or wait for results.
1711
+ # # Here is how to wait for a response.
1712
+ # result.wait_until_done! timeout: 60
1713
+ # if result.response?
1714
+ # p result.response
1715
+ # else
1716
+ # puts "No response received."
1717
+ # end
1718
+ #
1719
+ def create_process request, options = nil
1720
+ raise ::ArgumentError, "request must be provided" if request.nil?
1721
+
1722
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::CreateProcessRequest
1723
+
1724
+ # Converts hash and nil to an options object
1725
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1726
+
1727
+ # Customize the options with defaults
1728
+ metadata = @config.rpcs.create_process.metadata.to_h
1729
+
1730
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1731
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1732
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1733
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
1734
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1735
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1736
+
1737
+ header_params = {}
1738
+ if request.parent
1739
+ header_params["parent"] = request.parent
1740
+ end
1741
+
1742
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1743
+ metadata[:"x-goog-request-params"] ||= request_params_header
1744
+
1745
+ options.apply_defaults timeout: @config.rpcs.create_process.timeout,
1746
+ metadata: metadata,
1747
+ retry_policy: @config.rpcs.create_process.retry_policy
1748
+
1749
+ options.apply_defaults timeout: @config.timeout,
1750
+ metadata: @config.metadata,
1751
+ retry_policy: @config.retry_policy
1752
+
1753
+ @live_video_analytics_stub.call_rpc :create_process, request, options: options do |response, operation|
1754
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1755
+ yield response, operation if block_given?
1756
+ return response
1757
+ end
1758
+ rescue ::GRPC::BadStatus => e
1759
+ raise ::Google::Cloud::Error.from_error(e)
1760
+ end
1761
+
1762
+ ##
1763
+ # Updates the parameters of a single Process.
1764
+ #
1765
+ # @overload update_process(request, options = nil)
1766
+ # Pass arguments to `update_process` via a request object, either of type
1767
+ # {::Google::Cloud::VisionAI::V1::UpdateProcessRequest} or an equivalent Hash.
1768
+ #
1769
+ # @param request [::Google::Cloud::VisionAI::V1::UpdateProcessRequest, ::Hash]
1770
+ # A request object representing the call parameters. Required. To specify no
1771
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1772
+ # @param options [::Gapic::CallOptions, ::Hash]
1773
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1774
+ #
1775
+ # @overload update_process(update_mask: nil, process: nil, request_id: nil)
1776
+ # Pass arguments to `update_process` via keyword arguments. Note that at
1777
+ # least one keyword argument is required. To specify no parameters, or to keep all
1778
+ # the default parameter values, pass an empty Hash as a request object (see above).
1779
+ #
1780
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1781
+ # Required. Field mask is used to specify the fields to be overwritten in the
1782
+ # Process resource by the update.
1783
+ # The fields specified in the update_mask are relative to the resource, not
1784
+ # the full request. A field will be overwritten if it is in the mask. If the
1785
+ # user does not provide a mask then all fields will be overwritten.
1786
+ # @param process [::Google::Cloud::VisionAI::V1::Process, ::Hash]
1787
+ # Required. The resource being updated.
1788
+ # @param request_id [::String]
1789
+ # Optional. An optional request ID to identify requests. Specify a unique
1790
+ # request ID so that if you must retry your request, the server will know to
1791
+ # ignore the request if it has already been completed. The server will
1792
+ # guarantee that for at least 60 minutes since the first request.
1793
+ #
1794
+ # For example, consider a situation where you make an initial request and the
1795
+ # request times out. If you make the request again with the same request ID,
1796
+ # the server can check if original operation with the same request ID was
1797
+ # received, and if so, will ignore the second request. This prevents clients
1798
+ # from accidentally creating duplicate commitments.
1799
+ #
1800
+ # The request ID must be a valid UUID with the exception that zero UUID is
1801
+ # not supported (00000000-0000-0000-0000-000000000000).
1802
+ #
1803
+ # @yield [response, operation] Access the result along with the RPC operation
1804
+ # @yieldparam response [::Gapic::Operation]
1805
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1806
+ #
1807
+ # @return [::Gapic::Operation]
1808
+ #
1809
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1810
+ #
1811
+ # @example Basic example
1812
+ # require "google/cloud/vision_ai/v1"
1813
+ #
1814
+ # # Create a client object. The client can be reused for multiple calls.
1815
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
1816
+ #
1817
+ # # Create a request. To set request fields, pass in keyword arguments.
1818
+ # request = Google::Cloud::VisionAI::V1::UpdateProcessRequest.new
1819
+ #
1820
+ # # Call the update_process method.
1821
+ # result = client.update_process request
1822
+ #
1823
+ # # The returned object is of type Gapic::Operation. You can use it to
1824
+ # # check the status of an operation, cancel it, or wait for results.
1825
+ # # Here is how to wait for a response.
1826
+ # result.wait_until_done! timeout: 60
1827
+ # if result.response?
1828
+ # p result.response
1829
+ # else
1830
+ # puts "No response received."
1831
+ # end
1832
+ #
1833
+ def update_process request, options = nil
1834
+ raise ::ArgumentError, "request must be provided" if request.nil?
1835
+
1836
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::UpdateProcessRequest
1837
+
1838
+ # Converts hash and nil to an options object
1839
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1840
+
1841
+ # Customize the options with defaults
1842
+ metadata = @config.rpcs.update_process.metadata.to_h
1843
+
1844
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1845
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1846
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1847
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
1848
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1849
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1850
+
1851
+ header_params = {}
1852
+ if request.process&.name
1853
+ header_params["process.name"] = request.process.name
1854
+ end
1855
+
1856
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1857
+ metadata[:"x-goog-request-params"] ||= request_params_header
1858
+
1859
+ options.apply_defaults timeout: @config.rpcs.update_process.timeout,
1860
+ metadata: metadata,
1861
+ retry_policy: @config.rpcs.update_process.retry_policy
1862
+
1863
+ options.apply_defaults timeout: @config.timeout,
1864
+ metadata: @config.metadata,
1865
+ retry_policy: @config.retry_policy
1866
+
1867
+ @live_video_analytics_stub.call_rpc :update_process, request, options: options do |response, operation|
1868
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1869
+ yield response, operation if block_given?
1870
+ return response
1871
+ end
1872
+ rescue ::GRPC::BadStatus => e
1873
+ raise ::Google::Cloud::Error.from_error(e)
1874
+ end
1875
+
1876
+ ##
1877
+ # Deletes a single Process.
1878
+ #
1879
+ # @overload delete_process(request, options = nil)
1880
+ # Pass arguments to `delete_process` via a request object, either of type
1881
+ # {::Google::Cloud::VisionAI::V1::DeleteProcessRequest} or an equivalent Hash.
1882
+ #
1883
+ # @param request [::Google::Cloud::VisionAI::V1::DeleteProcessRequest, ::Hash]
1884
+ # A request object representing the call parameters. Required. To specify no
1885
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1886
+ # @param options [::Gapic::CallOptions, ::Hash]
1887
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1888
+ #
1889
+ # @overload delete_process(name: nil, request_id: nil)
1890
+ # Pass arguments to `delete_process` via keyword arguments. Note that at
1891
+ # least one keyword argument is required. To specify no parameters, or to keep all
1892
+ # the default parameter values, pass an empty Hash as a request object (see above).
1893
+ #
1894
+ # @param name [::String]
1895
+ # Required. Name of the resource.
1896
+ # @param request_id [::String]
1897
+ # Optional. An optional request ID to identify requests. Specify a unique
1898
+ # request ID so that if you must retry your request, the server will know to
1899
+ # ignore the request if it has already been completed. The server will
1900
+ # guarantee that for at least 60 minutes after the first request.
1901
+ #
1902
+ # For example, consider a situation where you make an initial request and the
1903
+ # request times out. If you make the request again with the same request ID,
1904
+ # the server can check if original operation with the same request ID was
1905
+ # received, and if so, will ignore the second request. This prevents clients
1906
+ # from accidentally creating duplicate commitments.
1907
+ #
1908
+ # The request ID must be a valid UUID with the exception that zero UUID is
1909
+ # not supported (00000000-0000-0000-0000-000000000000).
1910
+ #
1911
+ # @yield [response, operation] Access the result along with the RPC operation
1912
+ # @yieldparam response [::Gapic::Operation]
1913
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1914
+ #
1915
+ # @return [::Gapic::Operation]
1916
+ #
1917
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1918
+ #
1919
+ # @example Basic example
1920
+ # require "google/cloud/vision_ai/v1"
1921
+ #
1922
+ # # Create a client object. The client can be reused for multiple calls.
1923
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
1924
+ #
1925
+ # # Create a request. To set request fields, pass in keyword arguments.
1926
+ # request = Google::Cloud::VisionAI::V1::DeleteProcessRequest.new
1927
+ #
1928
+ # # Call the delete_process method.
1929
+ # result = client.delete_process request
1930
+ #
1931
+ # # The returned object is of type Gapic::Operation. You can use it to
1932
+ # # check the status of an operation, cancel it, or wait for results.
1933
+ # # Here is how to wait for a response.
1934
+ # result.wait_until_done! timeout: 60
1935
+ # if result.response?
1936
+ # p result.response
1937
+ # else
1938
+ # puts "No response received."
1939
+ # end
1940
+ #
1941
+ def delete_process request, options = nil
1942
+ raise ::ArgumentError, "request must be provided" if request.nil?
1943
+
1944
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::DeleteProcessRequest
1945
+
1946
+ # Converts hash and nil to an options object
1947
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1948
+
1949
+ # Customize the options with defaults
1950
+ metadata = @config.rpcs.delete_process.metadata.to_h
1951
+
1952
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1953
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1954
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1955
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
1956
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1957
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1958
+
1959
+ header_params = {}
1960
+ if request.name
1961
+ header_params["name"] = request.name
1962
+ end
1963
+
1964
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1965
+ metadata[:"x-goog-request-params"] ||= request_params_header
1966
+
1967
+ options.apply_defaults timeout: @config.rpcs.delete_process.timeout,
1968
+ metadata: metadata,
1969
+ retry_policy: @config.rpcs.delete_process.retry_policy
1970
+
1971
+ options.apply_defaults timeout: @config.timeout,
1972
+ metadata: @config.metadata,
1973
+ retry_policy: @config.retry_policy
1974
+
1975
+ @live_video_analytics_stub.call_rpc :delete_process, request, options: options do |response, operation|
1976
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1977
+ yield response, operation if block_given?
1978
+ return response
1979
+ end
1980
+ rescue ::GRPC::BadStatus => e
1981
+ raise ::Google::Cloud::Error.from_error(e)
1982
+ end
1983
+
1984
+ ##
1985
+ # Run all of the processes to "completion". Max time for each process is
1986
+ # the LRO time limit.
1987
+ #
1988
+ # @overload batch_run_process(request, options = nil)
1989
+ # Pass arguments to `batch_run_process` via a request object, either of type
1990
+ # {::Google::Cloud::VisionAI::V1::BatchRunProcessRequest} or an equivalent Hash.
1991
+ #
1992
+ # @param request [::Google::Cloud::VisionAI::V1::BatchRunProcessRequest, ::Hash]
1993
+ # A request object representing the call parameters. Required. To specify no
1994
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1995
+ # @param options [::Gapic::CallOptions, ::Hash]
1996
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1997
+ #
1998
+ # @overload batch_run_process(parent: nil, requests: nil, options: nil)
1999
+ # Pass arguments to `batch_run_process` via keyword arguments. Note that at
2000
+ # least one keyword argument is required. To specify no parameters, or to keep all
2001
+ # the default parameter values, pass an empty Hash as a request object (see above).
2002
+ #
2003
+ # @param parent [::String]
2004
+ # Required. The parent resource shared by all processes being created.
2005
+ # @param requests [::Array<::Google::Cloud::VisionAI::V1::CreateProcessRequest, ::Hash>]
2006
+ # Required. The create process requests.
2007
+ # @param options [::Google::Cloud::VisionAI::V1::BatchRunProcessRequest::BatchRunProcessOptions, ::Hash]
2008
+ # Optional. Options for batch processes.
2009
+ #
2010
+ # @yield [response, operation] Access the result along with the RPC operation
2011
+ # @yieldparam response [::Gapic::Operation]
2012
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2013
+ #
2014
+ # @return [::Gapic::Operation]
2015
+ #
2016
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2017
+ #
2018
+ # @example Basic example
2019
+ # require "google/cloud/vision_ai/v1"
2020
+ #
2021
+ # # Create a client object. The client can be reused for multiple calls.
2022
+ # client = Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new
2023
+ #
2024
+ # # Create a request. To set request fields, pass in keyword arguments.
2025
+ # request = Google::Cloud::VisionAI::V1::BatchRunProcessRequest.new
2026
+ #
2027
+ # # Call the batch_run_process method.
2028
+ # result = client.batch_run_process request
2029
+ #
2030
+ # # The returned object is of type Gapic::Operation. You can use it to
2031
+ # # check the status of an operation, cancel it, or wait for results.
2032
+ # # Here is how to wait for a response.
2033
+ # result.wait_until_done! timeout: 60
2034
+ # if result.response?
2035
+ # p result.response
2036
+ # else
2037
+ # puts "No response received."
2038
+ # end
2039
+ #
2040
+ def batch_run_process request, options = nil
2041
+ raise ::ArgumentError, "request must be provided" if request.nil?
2042
+
2043
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VisionAI::V1::BatchRunProcessRequest
2044
+
2045
+ # Converts hash and nil to an options object
2046
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2047
+
2048
+ # Customize the options with defaults
2049
+ metadata = @config.rpcs.batch_run_process.metadata.to_h
2050
+
2051
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2052
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2053
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2054
+ gapic_version: ::Google::Cloud::VisionAI::V1::VERSION
2055
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2056
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2057
+
2058
+ header_params = {}
2059
+ if request.parent
2060
+ header_params["parent"] = request.parent
2061
+ end
2062
+
2063
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2064
+ metadata[:"x-goog-request-params"] ||= request_params_header
2065
+
2066
+ options.apply_defaults timeout: @config.rpcs.batch_run_process.timeout,
2067
+ metadata: metadata,
2068
+ retry_policy: @config.rpcs.batch_run_process.retry_policy
2069
+
2070
+ options.apply_defaults timeout: @config.timeout,
2071
+ metadata: @config.metadata,
2072
+ retry_policy: @config.retry_policy
2073
+
2074
+ @live_video_analytics_stub.call_rpc :batch_run_process, request, options: options do |response, operation|
2075
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2076
+ yield response, operation if block_given?
2077
+ return response
2078
+ end
2079
+ rescue ::GRPC::BadStatus => e
2080
+ raise ::Google::Cloud::Error.from_error(e)
2081
+ end
2082
+
2083
+ ##
2084
+ # Configuration class for the LiveVideoAnalytics API.
2085
+ #
2086
+ # This class represents the configuration for LiveVideoAnalytics,
2087
+ # providing control over timeouts, retry behavior, logging, transport
2088
+ # parameters, and other low-level controls. Certain parameters can also be
2089
+ # applied individually to specific RPCs. See
2090
+ # {::Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client::Configuration::Rpcs}
2091
+ # for a list of RPCs that can be configured independently.
2092
+ #
2093
+ # Configuration can be applied globally to all clients, or to a single client
2094
+ # on construction.
2095
+ #
2096
+ # @example
2097
+ #
2098
+ # # Modify the global config, setting the timeout for
2099
+ # # list_public_operators to 20 seconds,
2100
+ # # and all remaining timeouts to 10 seconds.
2101
+ # ::Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.configure do |config|
2102
+ # config.timeout = 10.0
2103
+ # config.rpcs.list_public_operators.timeout = 20.0
2104
+ # end
2105
+ #
2106
+ # # Apply the above configuration only to a new client.
2107
+ # client = ::Google::Cloud::VisionAI::V1::LiveVideoAnalytics::Client.new do |config|
2108
+ # config.timeout = 10.0
2109
+ # config.rpcs.list_public_operators.timeout = 20.0
2110
+ # end
2111
+ #
2112
+ # @!attribute [rw] endpoint
2113
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2114
+ # nil, indicating to use the default endpoint in the current universe domain.
2115
+ # @return [::String,nil]
2116
+ # @!attribute [rw] credentials
2117
+ # Credentials to send with calls. You may provide any of the following types:
2118
+ # * (`String`) The path to a service account key file in JSON format
2119
+ # * (`Hash`) A service account key as a Hash
2120
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2121
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2122
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2123
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2124
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2125
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2126
+ # * (`nil`) indicating no credentials
2127
+ # @return [::Object]
2128
+ # @!attribute [rw] scope
2129
+ # The OAuth scopes
2130
+ # @return [::Array<::String>]
2131
+ # @!attribute [rw] lib_name
2132
+ # The library name as recorded in instrumentation and logging
2133
+ # @return [::String]
2134
+ # @!attribute [rw] lib_version
2135
+ # The library version as recorded in instrumentation and logging
2136
+ # @return [::String]
2137
+ # @!attribute [rw] channel_args
2138
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
2139
+ # `GRPC::Core::Channel` object is provided as the credential.
2140
+ # @return [::Hash]
2141
+ # @!attribute [rw] interceptors
2142
+ # An array of interceptors that are run before calls are executed.
2143
+ # @return [::Array<::GRPC::ClientInterceptor>]
2144
+ # @!attribute [rw] timeout
2145
+ # The call timeout in seconds.
2146
+ # @return [::Numeric]
2147
+ # @!attribute [rw] metadata
2148
+ # Additional gRPC headers to be sent with the call.
2149
+ # @return [::Hash{::Symbol=>::String}]
2150
+ # @!attribute [rw] retry_policy
2151
+ # The retry policy. The value is a hash with the following keys:
2152
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2153
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2154
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2155
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2156
+ # trigger a retry.
2157
+ # @return [::Hash]
2158
+ # @!attribute [rw] quota_project
2159
+ # A separate project against which to charge quota.
2160
+ # @return [::String]
2161
+ # @!attribute [rw] universe_domain
2162
+ # The universe domain within which to make requests. This determines the
2163
+ # default endpoint URL. The default value of nil uses the environment
2164
+ # universe (usually the default "googleapis.com" universe).
2165
+ # @return [::String,nil]
2166
+ #
2167
+ class Configuration
2168
+ extend ::Gapic::Config
2169
+
2170
+ # @private
2171
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2172
+ DEFAULT_ENDPOINT = "visionai.googleapis.com"
2173
+
2174
+ config_attr :endpoint, nil, ::String, nil
2175
+ config_attr :credentials, nil do |value|
2176
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2177
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
2178
+ allowed.any? { |klass| klass === value }
2179
+ end
2180
+ config_attr :scope, nil, ::String, ::Array, nil
2181
+ config_attr :lib_name, nil, ::String, nil
2182
+ config_attr :lib_version, nil, ::String, nil
2183
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
2184
+ config_attr :interceptors, nil, ::Array, nil
2185
+ config_attr :timeout, nil, ::Numeric, nil
2186
+ config_attr :metadata, nil, ::Hash, nil
2187
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2188
+ config_attr :quota_project, nil, ::String, nil
2189
+ config_attr :universe_domain, nil, ::String, nil
2190
+
2191
+ # @private
2192
+ def initialize parent_config = nil
2193
+ @parent_config = parent_config unless parent_config.nil?
2194
+
2195
+ yield self if block_given?
2196
+ end
2197
+
2198
+ ##
2199
+ # Configurations for individual RPCs
2200
+ # @return [Rpcs]
2201
+ #
2202
+ def rpcs
2203
+ @rpcs ||= begin
2204
+ parent_rpcs = nil
2205
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2206
+ Rpcs.new parent_rpcs
2207
+ end
2208
+ end
2209
+
2210
+ ##
2211
+ # Configuration for the channel pool
2212
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
2213
+ #
2214
+ def channel_pool
2215
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
2216
+ end
2217
+
2218
+ ##
2219
+ # Configuration RPC class for the LiveVideoAnalytics API.
2220
+ #
2221
+ # Includes fields providing the configuration for each RPC in this service.
2222
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2223
+ # the following configuration fields:
2224
+ #
2225
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2226
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
2227
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2228
+ # include the following keys:
2229
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2230
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2231
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2232
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2233
+ # trigger a retry.
2234
+ #
2235
+ class Rpcs
2236
+ ##
2237
+ # RPC-specific configuration for `list_public_operators`
2238
+ # @return [::Gapic::Config::Method]
2239
+ #
2240
+ attr_reader :list_public_operators
2241
+ ##
2242
+ # RPC-specific configuration for `resolve_operator_info`
2243
+ # @return [::Gapic::Config::Method]
2244
+ #
2245
+ attr_reader :resolve_operator_info
2246
+ ##
2247
+ # RPC-specific configuration for `list_operators`
2248
+ # @return [::Gapic::Config::Method]
2249
+ #
2250
+ attr_reader :list_operators
2251
+ ##
2252
+ # RPC-specific configuration for `get_operator`
2253
+ # @return [::Gapic::Config::Method]
2254
+ #
2255
+ attr_reader :get_operator
2256
+ ##
2257
+ # RPC-specific configuration for `create_operator`
2258
+ # @return [::Gapic::Config::Method]
2259
+ #
2260
+ attr_reader :create_operator
2261
+ ##
2262
+ # RPC-specific configuration for `update_operator`
2263
+ # @return [::Gapic::Config::Method]
2264
+ #
2265
+ attr_reader :update_operator
2266
+ ##
2267
+ # RPC-specific configuration for `delete_operator`
2268
+ # @return [::Gapic::Config::Method]
2269
+ #
2270
+ attr_reader :delete_operator
2271
+ ##
2272
+ # RPC-specific configuration for `list_analyses`
2273
+ # @return [::Gapic::Config::Method]
2274
+ #
2275
+ attr_reader :list_analyses
2276
+ ##
2277
+ # RPC-specific configuration for `get_analysis`
2278
+ # @return [::Gapic::Config::Method]
2279
+ #
2280
+ attr_reader :get_analysis
2281
+ ##
2282
+ # RPC-specific configuration for `create_analysis`
2283
+ # @return [::Gapic::Config::Method]
2284
+ #
2285
+ attr_reader :create_analysis
2286
+ ##
2287
+ # RPC-specific configuration for `update_analysis`
2288
+ # @return [::Gapic::Config::Method]
2289
+ #
2290
+ attr_reader :update_analysis
2291
+ ##
2292
+ # RPC-specific configuration for `delete_analysis`
2293
+ # @return [::Gapic::Config::Method]
2294
+ #
2295
+ attr_reader :delete_analysis
2296
+ ##
2297
+ # RPC-specific configuration for `list_processes`
2298
+ # @return [::Gapic::Config::Method]
2299
+ #
2300
+ attr_reader :list_processes
2301
+ ##
2302
+ # RPC-specific configuration for `get_process`
2303
+ # @return [::Gapic::Config::Method]
2304
+ #
2305
+ attr_reader :get_process
2306
+ ##
2307
+ # RPC-specific configuration for `create_process`
2308
+ # @return [::Gapic::Config::Method]
2309
+ #
2310
+ attr_reader :create_process
2311
+ ##
2312
+ # RPC-specific configuration for `update_process`
2313
+ # @return [::Gapic::Config::Method]
2314
+ #
2315
+ attr_reader :update_process
2316
+ ##
2317
+ # RPC-specific configuration for `delete_process`
2318
+ # @return [::Gapic::Config::Method]
2319
+ #
2320
+ attr_reader :delete_process
2321
+ ##
2322
+ # RPC-specific configuration for `batch_run_process`
2323
+ # @return [::Gapic::Config::Method]
2324
+ #
2325
+ attr_reader :batch_run_process
2326
+
2327
+ # @private
2328
+ def initialize parent_rpcs = nil
2329
+ list_public_operators_config = parent_rpcs.list_public_operators if parent_rpcs.respond_to? :list_public_operators
2330
+ @list_public_operators = ::Gapic::Config::Method.new list_public_operators_config
2331
+ resolve_operator_info_config = parent_rpcs.resolve_operator_info if parent_rpcs.respond_to? :resolve_operator_info
2332
+ @resolve_operator_info = ::Gapic::Config::Method.new resolve_operator_info_config
2333
+ list_operators_config = parent_rpcs.list_operators if parent_rpcs.respond_to? :list_operators
2334
+ @list_operators = ::Gapic::Config::Method.new list_operators_config
2335
+ get_operator_config = parent_rpcs.get_operator if parent_rpcs.respond_to? :get_operator
2336
+ @get_operator = ::Gapic::Config::Method.new get_operator_config
2337
+ create_operator_config = parent_rpcs.create_operator if parent_rpcs.respond_to? :create_operator
2338
+ @create_operator = ::Gapic::Config::Method.new create_operator_config
2339
+ update_operator_config = parent_rpcs.update_operator if parent_rpcs.respond_to? :update_operator
2340
+ @update_operator = ::Gapic::Config::Method.new update_operator_config
2341
+ delete_operator_config = parent_rpcs.delete_operator if parent_rpcs.respond_to? :delete_operator
2342
+ @delete_operator = ::Gapic::Config::Method.new delete_operator_config
2343
+ list_analyses_config = parent_rpcs.list_analyses if parent_rpcs.respond_to? :list_analyses
2344
+ @list_analyses = ::Gapic::Config::Method.new list_analyses_config
2345
+ get_analysis_config = parent_rpcs.get_analysis if parent_rpcs.respond_to? :get_analysis
2346
+ @get_analysis = ::Gapic::Config::Method.new get_analysis_config
2347
+ create_analysis_config = parent_rpcs.create_analysis if parent_rpcs.respond_to? :create_analysis
2348
+ @create_analysis = ::Gapic::Config::Method.new create_analysis_config
2349
+ update_analysis_config = parent_rpcs.update_analysis if parent_rpcs.respond_to? :update_analysis
2350
+ @update_analysis = ::Gapic::Config::Method.new update_analysis_config
2351
+ delete_analysis_config = parent_rpcs.delete_analysis if parent_rpcs.respond_to? :delete_analysis
2352
+ @delete_analysis = ::Gapic::Config::Method.new delete_analysis_config
2353
+ list_processes_config = parent_rpcs.list_processes if parent_rpcs.respond_to? :list_processes
2354
+ @list_processes = ::Gapic::Config::Method.new list_processes_config
2355
+ get_process_config = parent_rpcs.get_process if parent_rpcs.respond_to? :get_process
2356
+ @get_process = ::Gapic::Config::Method.new get_process_config
2357
+ create_process_config = parent_rpcs.create_process if parent_rpcs.respond_to? :create_process
2358
+ @create_process = ::Gapic::Config::Method.new create_process_config
2359
+ update_process_config = parent_rpcs.update_process if parent_rpcs.respond_to? :update_process
2360
+ @update_process = ::Gapic::Config::Method.new update_process_config
2361
+ delete_process_config = parent_rpcs.delete_process if parent_rpcs.respond_to? :delete_process
2362
+ @delete_process = ::Gapic::Config::Method.new delete_process_config
2363
+ batch_run_process_config = parent_rpcs.batch_run_process if parent_rpcs.respond_to? :batch_run_process
2364
+ @batch_run_process = ::Gapic::Config::Method.new batch_run_process_config
2365
+
2366
+ yield self if block_given?
2367
+ end
2368
+ end
2369
+ end
2370
+ end
2371
+ end
2372
+ end
2373
+ end
2374
+ end
2375
+ end