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