google-cloud-device_streaming-v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +153 -0
  6. data/lib/google/cloud/device_streaming/v1/direct_access_service/client.rb +978 -0
  7. data/lib/google/cloud/device_streaming/v1/direct_access_service/credentials.rb +47 -0
  8. data/lib/google/cloud/device_streaming/v1/direct_access_service/paths.rb +64 -0
  9. data/lib/google/cloud/device_streaming/v1/direct_access_service/rest/client.rb +827 -0
  10. data/lib/google/cloud/device_streaming/v1/direct_access_service/rest/service_stub.rb +389 -0
  11. data/lib/google/cloud/device_streaming/v1/direct_access_service/rest.rb +61 -0
  12. data/lib/google/cloud/device_streaming/v1/direct_access_service.rb +64 -0
  13. data/lib/google/cloud/device_streaming/v1/rest.rb +37 -0
  14. data/lib/google/cloud/device_streaming/v1/version.rb +28 -0
  15. data/lib/google/cloud/device_streaming/v1.rb +45 -0
  16. data/lib/google/cloud/devicestreaming/v1/adb_service_pb.rb +53 -0
  17. data/lib/google/cloud/devicestreaming/v1/service_pb.rb +64 -0
  18. data/lib/google/cloud/devicestreaming/v1/service_services_pb.rb +74 -0
  19. data/lib/google-cloud-device_streaming-v1.rb +21 -0
  20. data/proto_docs/README.md +4 -0
  21. data/proto_docs/google/api/client.rb +473 -0
  22. data/proto_docs/google/api/field_behavior.rb +85 -0
  23. data/proto_docs/google/api/launch_stage.rb +71 -0
  24. data/proto_docs/google/api/resource.rb +227 -0
  25. data/proto_docs/google/cloud/devicestreaming/v1/adb_service.rb +192 -0
  26. data/proto_docs/google/cloud/devicestreaming/v1/service.rb +234 -0
  27. data/proto_docs/google/protobuf/duration.rb +98 -0
  28. data/proto_docs/google/protobuf/empty.rb +34 -0
  29. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  30. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  31. metadata +99 -0
@@ -0,0 +1,978 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/devicestreaming/v1/service_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module DeviceStreaming
25
+ module V1
26
+ module DirectAccessService
27
+ ##
28
+ # Client for the DirectAccessService service.
29
+ #
30
+ # A service for allocating Android devices and interacting with the
31
+ # live-allocated devices.
32
+ #
33
+ # Each Session will wait for available capacity, at a higher
34
+ # priority over Test Execution. When allocated, the session will be exposed
35
+ # through a stream for integration.
36
+ #
37
+ # DirectAccessService is currently available as a preview to select developers.
38
+ # You can register today on behalf of you and your team at
39
+ # https://developer.android.com/studio/preview/android-device-streaming
40
+ #
41
+ class Client
42
+ # @private
43
+ API_VERSION = ""
44
+
45
+ # @private
46
+ DEFAULT_ENDPOINT_TEMPLATE = "devicestreaming.$UNIVERSE_DOMAIN$"
47
+
48
+ include Paths
49
+
50
+ # @private
51
+ attr_reader :direct_access_service_stub
52
+
53
+ ##
54
+ # Configure the DirectAccessService Client class.
55
+ #
56
+ # See {::Google::Cloud::DeviceStreaming::V1::DirectAccessService::Client::Configuration}
57
+ # for a description of the configuration fields.
58
+ #
59
+ # @example
60
+ #
61
+ # # Modify the configuration for all DirectAccessService clients
62
+ # ::Google::Cloud::DeviceStreaming::V1::DirectAccessService::Client.configure do |config|
63
+ # config.timeout = 10.0
64
+ # end
65
+ #
66
+ # @yield [config] Configure the Client client.
67
+ # @yieldparam config [Client::Configuration]
68
+ #
69
+ # @return [Client::Configuration]
70
+ #
71
+ def self.configure
72
+ @configure ||= begin
73
+ namespace = ["Google", "Cloud", "DeviceStreaming", "V1"]
74
+ parent_config = while namespace.any?
75
+ parent_name = namespace.join "::"
76
+ parent_const = const_get parent_name
77
+ break parent_const.configure if parent_const.respond_to? :configure
78
+ namespace.pop
79
+ end
80
+ default_config = Client::Configuration.new parent_config
81
+
82
+ default_config.rpcs.create_device_session.timeout = 20.0
83
+
84
+ default_config.rpcs.list_device_sessions.timeout = 20.0
85
+ default_config.rpcs.list_device_sessions.retry_policy = {
86
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
87
+ }
88
+
89
+ default_config.rpcs.get_device_session.timeout = 20.0
90
+ default_config.rpcs.get_device_session.retry_policy = {
91
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
92
+ }
93
+
94
+ default_config.rpcs.cancel_device_session.timeout = 20.0
95
+ default_config.rpcs.cancel_device_session.retry_policy = {
96
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
97
+ }
98
+
99
+ default_config.rpcs.update_device_session.timeout = 20.0
100
+
101
+ default_config.rpcs.adb_connect.timeout = 1800.0
102
+
103
+ default_config
104
+ end
105
+ yield @configure if block_given?
106
+ @configure
107
+ end
108
+
109
+ ##
110
+ # Configure the DirectAccessService Client instance.
111
+ #
112
+ # The configuration is set to the derived mode, meaning that values can be changed,
113
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
114
+ # should be made on {Client.configure}.
115
+ #
116
+ # See {::Google::Cloud::DeviceStreaming::V1::DirectAccessService::Client::Configuration}
117
+ # for a description of the configuration fields.
118
+ #
119
+ # @yield [config] Configure the Client client.
120
+ # @yieldparam config [Client::Configuration]
121
+ #
122
+ # @return [Client::Configuration]
123
+ #
124
+ def configure
125
+ yield @config if block_given?
126
+ @config
127
+ end
128
+
129
+ ##
130
+ # The effective universe domain
131
+ #
132
+ # @return [String]
133
+ #
134
+ def universe_domain
135
+ @direct_access_service_stub.universe_domain
136
+ end
137
+
138
+ ##
139
+ # Create a new DirectAccessService client object.
140
+ #
141
+ # @example
142
+ #
143
+ # # Create a client using the default configuration
144
+ # client = ::Google::Cloud::DeviceStreaming::V1::DirectAccessService::Client.new
145
+ #
146
+ # # Create a client using a custom configuration
147
+ # client = ::Google::Cloud::DeviceStreaming::V1::DirectAccessService::Client.new do |config|
148
+ # config.timeout = 10.0
149
+ # end
150
+ #
151
+ # @yield [config] Configure the DirectAccessService client.
152
+ # @yieldparam config [Client::Configuration]
153
+ #
154
+ def initialize
155
+ # These require statements are intentionally placed here to initialize
156
+ # the gRPC module only when it's required.
157
+ # See https://github.com/googleapis/toolkit/issues/446
158
+ require "gapic/grpc"
159
+ require "google/cloud/devicestreaming/v1/service_services_pb"
160
+
161
+ # Create the configuration object
162
+ @config = Configuration.new Client.configure
163
+
164
+ # Yield the configuration if needed
165
+ yield @config if block_given?
166
+
167
+ # Create credentials
168
+ credentials = @config.credentials
169
+ # Use self-signed JWT if the endpoint is unchanged from default,
170
+ # but only if the default endpoint does not have a region prefix.
171
+ enable_self_signed_jwt = @config.endpoint.nil? ||
172
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
173
+ !@config.endpoint.split(".").first.include?("-"))
174
+ credentials ||= Credentials.default scope: @config.scope,
175
+ enable_self_signed_jwt: enable_self_signed_jwt
176
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
177
+ credentials = Credentials.new credentials, scope: @config.scope
178
+ end
179
+ @quota_project_id = @config.quota_project
180
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
181
+
182
+ @direct_access_service_stub = ::Gapic::ServiceStub.new(
183
+ ::Google::Cloud::DeviceStreaming::V1::DirectAccessService::Stub,
184
+ credentials: credentials,
185
+ endpoint: @config.endpoint,
186
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
187
+ universe_domain: @config.universe_domain,
188
+ channel_args: @config.channel_args,
189
+ interceptors: @config.interceptors,
190
+ channel_pool_config: @config.channel_pool,
191
+ logger: @config.logger
192
+ )
193
+
194
+ @direct_access_service_stub.stub_logger&.info do |entry|
195
+ entry.set_system_name
196
+ entry.set_service
197
+ entry.message = "Created client for #{entry.service}"
198
+ entry.set_credentials_fields credentials
199
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
200
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
201
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
202
+ end
203
+ end
204
+
205
+ ##
206
+ # The logger used for request/response debug logging.
207
+ #
208
+ # @return [Logger]
209
+ #
210
+ def logger
211
+ @direct_access_service_stub.logger
212
+ end
213
+
214
+ # Service calls
215
+
216
+ ##
217
+ # Creates a DeviceSession.
218
+ #
219
+ # @overload create_device_session(request, options = nil)
220
+ # Pass arguments to `create_device_session` via a request object, either of type
221
+ # {::Google::Cloud::DeviceStreaming::V1::CreateDeviceSessionRequest} or an equivalent Hash.
222
+ #
223
+ # @param request [::Google::Cloud::DeviceStreaming::V1::CreateDeviceSessionRequest, ::Hash]
224
+ # A request object representing the call parameters. Required. To specify no
225
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
226
+ # @param options [::Gapic::CallOptions, ::Hash]
227
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
228
+ #
229
+ # @overload create_device_session(parent: nil, device_session: nil, device_session_id: nil)
230
+ # Pass arguments to `create_device_session` via keyword arguments. Note that at
231
+ # least one keyword argument is required. To specify no parameters, or to keep all
232
+ # the default parameter values, pass an empty Hash as a request object (see above).
233
+ #
234
+ # @param parent [::String]
235
+ # Required. The Compute Engine project under which this device will be
236
+ # allocated. "projects/\\{project_id}"
237
+ # @param device_session [::Google::Cloud::DeviceStreaming::V1::DeviceSession, ::Hash]
238
+ # Required. A DeviceSession to create.
239
+ # @param device_session_id [::String]
240
+ # Optional. The ID to use for the DeviceSession, which will become the final
241
+ # component of the DeviceSession's resource name.
242
+ #
243
+ # This value should be 4-63 characters, and valid characters
244
+ # are /[a-z][0-9]-/.
245
+ #
246
+ # @yield [response, operation] Access the result along with the RPC operation
247
+ # @yieldparam response [::Google::Cloud::DeviceStreaming::V1::DeviceSession]
248
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
249
+ #
250
+ # @return [::Google::Cloud::DeviceStreaming::V1::DeviceSession]
251
+ #
252
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
253
+ #
254
+ # @example Basic example
255
+ # require "google/cloud/device_streaming/v1"
256
+ #
257
+ # # Create a client object. The client can be reused for multiple calls.
258
+ # client = Google::Cloud::DeviceStreaming::V1::DirectAccessService::Client.new
259
+ #
260
+ # # Create a request. To set request fields, pass in keyword arguments.
261
+ # request = Google::Cloud::DeviceStreaming::V1::CreateDeviceSessionRequest.new
262
+ #
263
+ # # Call the create_device_session method.
264
+ # result = client.create_device_session request
265
+ #
266
+ # # The returned object is of type Google::Cloud::DeviceStreaming::V1::DeviceSession.
267
+ # p result
268
+ #
269
+ def create_device_session request, options = nil
270
+ raise ::ArgumentError, "request must be provided" if request.nil?
271
+
272
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeviceStreaming::V1::CreateDeviceSessionRequest
273
+
274
+ # Converts hash and nil to an options object
275
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
276
+
277
+ # Customize the options with defaults
278
+ metadata = @config.rpcs.create_device_session.metadata.to_h
279
+
280
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
281
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
282
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
283
+ gapic_version: ::Google::Cloud::DeviceStreaming::V1::VERSION
284
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
285
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
286
+
287
+ header_params = {}
288
+ if request.parent
289
+ header_params["parent"] = request.parent
290
+ end
291
+
292
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
293
+ metadata[:"x-goog-request-params"] ||= request_params_header
294
+
295
+ options.apply_defaults timeout: @config.rpcs.create_device_session.timeout,
296
+ metadata: metadata,
297
+ retry_policy: @config.rpcs.create_device_session.retry_policy
298
+
299
+ options.apply_defaults timeout: @config.timeout,
300
+ metadata: @config.metadata,
301
+ retry_policy: @config.retry_policy
302
+
303
+ @direct_access_service_stub.call_rpc :create_device_session, request, options: options do |response, operation|
304
+ yield response, operation if block_given?
305
+ end
306
+ rescue ::GRPC::BadStatus => e
307
+ raise ::Google::Cloud::Error.from_error(e)
308
+ end
309
+
310
+ ##
311
+ # Lists DeviceSessions owned by the project user.
312
+ #
313
+ # @overload list_device_sessions(request, options = nil)
314
+ # Pass arguments to `list_device_sessions` via a request object, either of type
315
+ # {::Google::Cloud::DeviceStreaming::V1::ListDeviceSessionsRequest} or an equivalent Hash.
316
+ #
317
+ # @param request [::Google::Cloud::DeviceStreaming::V1::ListDeviceSessionsRequest, ::Hash]
318
+ # A request object representing the call parameters. Required. To specify no
319
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
320
+ # @param options [::Gapic::CallOptions, ::Hash]
321
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
322
+ #
323
+ # @overload list_device_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil)
324
+ # Pass arguments to `list_device_sessions` via keyword arguments. Note that at
325
+ # least one keyword argument is required. To specify no parameters, or to keep all
326
+ # the default parameter values, pass an empty Hash as a request object (see above).
327
+ #
328
+ # @param parent [::String]
329
+ # Required. The name of the parent to request, e.g. "projects/\\{project_id}"
330
+ # @param page_size [::Integer]
331
+ # Optional. The maximum number of DeviceSessions to return.
332
+ # @param page_token [::String]
333
+ # Optional. A continuation token for paging.
334
+ # @param filter [::String]
335
+ # Optional. If specified, responses will be filtered by the given filter.
336
+ # Allowed fields are: session_state.
337
+ #
338
+ # @yield [response, operation] Access the result along with the RPC operation
339
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DeviceStreaming::V1::DeviceSession>]
340
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
341
+ #
342
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::DeviceStreaming::V1::DeviceSession>]
343
+ #
344
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
345
+ #
346
+ # @example Basic example
347
+ # require "google/cloud/device_streaming/v1"
348
+ #
349
+ # # Create a client object. The client can be reused for multiple calls.
350
+ # client = Google::Cloud::DeviceStreaming::V1::DirectAccessService::Client.new
351
+ #
352
+ # # Create a request. To set request fields, pass in keyword arguments.
353
+ # request = Google::Cloud::DeviceStreaming::V1::ListDeviceSessionsRequest.new
354
+ #
355
+ # # Call the list_device_sessions method.
356
+ # result = client.list_device_sessions request
357
+ #
358
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
359
+ # # over elements, and API calls will be issued to fetch pages as needed.
360
+ # result.each do |item|
361
+ # # Each element is of type ::Google::Cloud::DeviceStreaming::V1::DeviceSession.
362
+ # p item
363
+ # end
364
+ #
365
+ def list_device_sessions request, options = nil
366
+ raise ::ArgumentError, "request must be provided" if request.nil?
367
+
368
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeviceStreaming::V1::ListDeviceSessionsRequest
369
+
370
+ # Converts hash and nil to an options object
371
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
372
+
373
+ # Customize the options with defaults
374
+ metadata = @config.rpcs.list_device_sessions.metadata.to_h
375
+
376
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
377
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
378
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
379
+ gapic_version: ::Google::Cloud::DeviceStreaming::V1::VERSION
380
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
381
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
382
+
383
+ header_params = {}
384
+ if request.parent
385
+ header_params["parent"] = request.parent
386
+ end
387
+
388
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
389
+ metadata[:"x-goog-request-params"] ||= request_params_header
390
+
391
+ options.apply_defaults timeout: @config.rpcs.list_device_sessions.timeout,
392
+ metadata: metadata,
393
+ retry_policy: @config.rpcs.list_device_sessions.retry_policy
394
+
395
+ options.apply_defaults timeout: @config.timeout,
396
+ metadata: @config.metadata,
397
+ retry_policy: @config.retry_policy
398
+
399
+ @direct_access_service_stub.call_rpc :list_device_sessions, request, options: options do |response, operation|
400
+ response = ::Gapic::PagedEnumerable.new @direct_access_service_stub, :list_device_sessions, request, response, operation, options
401
+ yield response, operation if block_given?
402
+ throw :response, response
403
+ end
404
+ rescue ::GRPC::BadStatus => e
405
+ raise ::Google::Cloud::Error.from_error(e)
406
+ end
407
+
408
+ ##
409
+ # Gets a DeviceSession, which documents the allocation status and
410
+ # whether the device is allocated. Clients making requests from this API
411
+ # must poll GetDeviceSession.
412
+ #
413
+ # @overload get_device_session(request, options = nil)
414
+ # Pass arguments to `get_device_session` via a request object, either of type
415
+ # {::Google::Cloud::DeviceStreaming::V1::GetDeviceSessionRequest} or an equivalent Hash.
416
+ #
417
+ # @param request [::Google::Cloud::DeviceStreaming::V1::GetDeviceSessionRequest, ::Hash]
418
+ # A request object representing the call parameters. Required. To specify no
419
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
420
+ # @param options [::Gapic::CallOptions, ::Hash]
421
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
422
+ #
423
+ # @overload get_device_session(name: nil)
424
+ # Pass arguments to `get_device_session` via keyword arguments. Note that at
425
+ # least one keyword argument is required. To specify no parameters, or to keep all
426
+ # the default parameter values, pass an empty Hash as a request object (see above).
427
+ #
428
+ # @param name [::String]
429
+ # Required. Name of the DeviceSession, e.g.
430
+ # "projects/\\{project_id}/deviceSessions/\\{session_id}"
431
+ #
432
+ # @yield [response, operation] Access the result along with the RPC operation
433
+ # @yieldparam response [::Google::Cloud::DeviceStreaming::V1::DeviceSession]
434
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
435
+ #
436
+ # @return [::Google::Cloud::DeviceStreaming::V1::DeviceSession]
437
+ #
438
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
439
+ #
440
+ # @example Basic example
441
+ # require "google/cloud/device_streaming/v1"
442
+ #
443
+ # # Create a client object. The client can be reused for multiple calls.
444
+ # client = Google::Cloud::DeviceStreaming::V1::DirectAccessService::Client.new
445
+ #
446
+ # # Create a request. To set request fields, pass in keyword arguments.
447
+ # request = Google::Cloud::DeviceStreaming::V1::GetDeviceSessionRequest.new
448
+ #
449
+ # # Call the get_device_session method.
450
+ # result = client.get_device_session request
451
+ #
452
+ # # The returned object is of type Google::Cloud::DeviceStreaming::V1::DeviceSession.
453
+ # p result
454
+ #
455
+ def get_device_session request, options = nil
456
+ raise ::ArgumentError, "request must be provided" if request.nil?
457
+
458
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeviceStreaming::V1::GetDeviceSessionRequest
459
+
460
+ # Converts hash and nil to an options object
461
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
462
+
463
+ # Customize the options with defaults
464
+ metadata = @config.rpcs.get_device_session.metadata.to_h
465
+
466
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
467
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
468
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
469
+ gapic_version: ::Google::Cloud::DeviceStreaming::V1::VERSION
470
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
471
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
472
+
473
+ header_params = {}
474
+ if request.name
475
+ header_params["name"] = request.name
476
+ end
477
+
478
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
479
+ metadata[:"x-goog-request-params"] ||= request_params_header
480
+
481
+ options.apply_defaults timeout: @config.rpcs.get_device_session.timeout,
482
+ metadata: metadata,
483
+ retry_policy: @config.rpcs.get_device_session.retry_policy
484
+
485
+ options.apply_defaults timeout: @config.timeout,
486
+ metadata: @config.metadata,
487
+ retry_policy: @config.retry_policy
488
+
489
+ @direct_access_service_stub.call_rpc :get_device_session, request, options: options do |response, operation|
490
+ yield response, operation if block_given?
491
+ end
492
+ rescue ::GRPC::BadStatus => e
493
+ raise ::Google::Cloud::Error.from_error(e)
494
+ end
495
+
496
+ ##
497
+ # Cancel a DeviceSession.
498
+ # This RPC changes the DeviceSession to state FINISHED and terminates all
499
+ # connections.
500
+ # Canceled sessions are not deleted and can be retrieved or
501
+ # listed by the user until they expire based on the 28 day deletion policy.
502
+ #
503
+ # @overload cancel_device_session(request, options = nil)
504
+ # Pass arguments to `cancel_device_session` via a request object, either of type
505
+ # {::Google::Cloud::DeviceStreaming::V1::CancelDeviceSessionRequest} or an equivalent Hash.
506
+ #
507
+ # @param request [::Google::Cloud::DeviceStreaming::V1::CancelDeviceSessionRequest, ::Hash]
508
+ # A request object representing the call parameters. Required. To specify no
509
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
510
+ # @param options [::Gapic::CallOptions, ::Hash]
511
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
512
+ #
513
+ # @overload cancel_device_session(name: nil)
514
+ # Pass arguments to `cancel_device_session` via keyword arguments. Note that at
515
+ # least one keyword argument is required. To specify no parameters, or to keep all
516
+ # the default parameter values, pass an empty Hash as a request object (see above).
517
+ #
518
+ # @param name [::String]
519
+ # Required. Name of the DeviceSession, e.g.
520
+ # "projects/\\{project_id}/deviceSessions/\\{session_id}"
521
+ #
522
+ # @yield [response, operation] Access the result along with the RPC operation
523
+ # @yieldparam response [::Google::Protobuf::Empty]
524
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
525
+ #
526
+ # @return [::Google::Protobuf::Empty]
527
+ #
528
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
529
+ #
530
+ # @example Basic example
531
+ # require "google/cloud/device_streaming/v1"
532
+ #
533
+ # # Create a client object. The client can be reused for multiple calls.
534
+ # client = Google::Cloud::DeviceStreaming::V1::DirectAccessService::Client.new
535
+ #
536
+ # # Create a request. To set request fields, pass in keyword arguments.
537
+ # request = Google::Cloud::DeviceStreaming::V1::CancelDeviceSessionRequest.new
538
+ #
539
+ # # Call the cancel_device_session method.
540
+ # result = client.cancel_device_session request
541
+ #
542
+ # # The returned object is of type Google::Protobuf::Empty.
543
+ # p result
544
+ #
545
+ def cancel_device_session request, options = nil
546
+ raise ::ArgumentError, "request must be provided" if request.nil?
547
+
548
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeviceStreaming::V1::CancelDeviceSessionRequest
549
+
550
+ # Converts hash and nil to an options object
551
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
552
+
553
+ # Customize the options with defaults
554
+ metadata = @config.rpcs.cancel_device_session.metadata.to_h
555
+
556
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
557
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
558
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
559
+ gapic_version: ::Google::Cloud::DeviceStreaming::V1::VERSION
560
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
561
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
562
+
563
+ header_params = {}
564
+ if request.name
565
+ header_params["name"] = request.name
566
+ end
567
+
568
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
569
+ metadata[:"x-goog-request-params"] ||= request_params_header
570
+
571
+ options.apply_defaults timeout: @config.rpcs.cancel_device_session.timeout,
572
+ metadata: metadata,
573
+ retry_policy: @config.rpcs.cancel_device_session.retry_policy
574
+
575
+ options.apply_defaults timeout: @config.timeout,
576
+ metadata: @config.metadata,
577
+ retry_policy: @config.retry_policy
578
+
579
+ @direct_access_service_stub.call_rpc :cancel_device_session, request, options: options do |response, operation|
580
+ yield response, operation if block_given?
581
+ end
582
+ rescue ::GRPC::BadStatus => e
583
+ raise ::Google::Cloud::Error.from_error(e)
584
+ end
585
+
586
+ ##
587
+ # Updates the current DeviceSession to the fields described by the
588
+ # update_mask.
589
+ #
590
+ # @overload update_device_session(request, options = nil)
591
+ # Pass arguments to `update_device_session` via a request object, either of type
592
+ # {::Google::Cloud::DeviceStreaming::V1::UpdateDeviceSessionRequest} or an equivalent Hash.
593
+ #
594
+ # @param request [::Google::Cloud::DeviceStreaming::V1::UpdateDeviceSessionRequest, ::Hash]
595
+ # A request object representing the call parameters. Required. To specify no
596
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
597
+ # @param options [::Gapic::CallOptions, ::Hash]
598
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
599
+ #
600
+ # @overload update_device_session(device_session: nil, update_mask: nil)
601
+ # Pass arguments to `update_device_session` via keyword arguments. Note that at
602
+ # least one keyword argument is required. To specify no parameters, or to keep all
603
+ # the default parameter values, pass an empty Hash as a request object (see above).
604
+ #
605
+ # @param device_session [::Google::Cloud::DeviceStreaming::V1::DeviceSession, ::Hash]
606
+ # Required. DeviceSession to update.
607
+ # The DeviceSession's `name` field is used to identify the session to update
608
+ # "projects/\\{project_id}/deviceSessions/\\{session_id}"
609
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
610
+ # Optional. The list of fields to update.
611
+ #
612
+ # @yield [response, operation] Access the result along with the RPC operation
613
+ # @yieldparam response [::Google::Cloud::DeviceStreaming::V1::DeviceSession]
614
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
615
+ #
616
+ # @return [::Google::Cloud::DeviceStreaming::V1::DeviceSession]
617
+ #
618
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
619
+ #
620
+ # @example Basic example
621
+ # require "google/cloud/device_streaming/v1"
622
+ #
623
+ # # Create a client object. The client can be reused for multiple calls.
624
+ # client = Google::Cloud::DeviceStreaming::V1::DirectAccessService::Client.new
625
+ #
626
+ # # Create a request. To set request fields, pass in keyword arguments.
627
+ # request = Google::Cloud::DeviceStreaming::V1::UpdateDeviceSessionRequest.new
628
+ #
629
+ # # Call the update_device_session method.
630
+ # result = client.update_device_session request
631
+ #
632
+ # # The returned object is of type Google::Cloud::DeviceStreaming::V1::DeviceSession.
633
+ # p result
634
+ #
635
+ def update_device_session request, options = nil
636
+ raise ::ArgumentError, "request must be provided" if request.nil?
637
+
638
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DeviceStreaming::V1::UpdateDeviceSessionRequest
639
+
640
+ # Converts hash and nil to an options object
641
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
642
+
643
+ # Customize the options with defaults
644
+ metadata = @config.rpcs.update_device_session.metadata.to_h
645
+
646
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
647
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
648
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
649
+ gapic_version: ::Google::Cloud::DeviceStreaming::V1::VERSION
650
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
651
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
652
+
653
+ header_params = {}
654
+ if request.device_session&.name
655
+ header_params["device_session.name"] = request.device_session.name
656
+ end
657
+
658
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
659
+ metadata[:"x-goog-request-params"] ||= request_params_header
660
+
661
+ options.apply_defaults timeout: @config.rpcs.update_device_session.timeout,
662
+ metadata: metadata,
663
+ retry_policy: @config.rpcs.update_device_session.retry_policy
664
+
665
+ options.apply_defaults timeout: @config.timeout,
666
+ metadata: @config.metadata,
667
+ retry_policy: @config.retry_policy
668
+
669
+ @direct_access_service_stub.call_rpc :update_device_session, request, options: options do |response, operation|
670
+ yield response, operation if block_given?
671
+ end
672
+ rescue ::GRPC::BadStatus => e
673
+ raise ::Google::Cloud::Error.from_error(e)
674
+ end
675
+
676
+ ##
677
+ # Exposes an ADB connection if the device supports ADB.
678
+ # gRPC headers are used to authenticate the Connect RPC, as well as
679
+ # associate to a particular DeviceSession.
680
+ # In particular, the user must specify the "X-Omnilab-Session-Name" header.
681
+ #
682
+ # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::DeviceStreaming::V1::AdbMessage, ::Hash>]
683
+ # An enumerable of {::Google::Cloud::DeviceStreaming::V1::AdbMessage} instances.
684
+ # @param options [::Gapic::CallOptions, ::Hash]
685
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
686
+ #
687
+ # @yield [response, operation] Access the result along with the RPC operation
688
+ # @yieldparam response [::Enumerable<::Google::Cloud::DeviceStreaming::V1::DeviceMessage>]
689
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
690
+ #
691
+ # @return [::Enumerable<::Google::Cloud::DeviceStreaming::V1::DeviceMessage>]
692
+ #
693
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
694
+ #
695
+ # @example Basic example
696
+ # require "google/cloud/device_streaming/v1"
697
+ #
698
+ # # Create a client object. The client can be reused for multiple calls.
699
+ # client = Google::Cloud::DeviceStreaming::V1::DirectAccessService::Client.new
700
+ #
701
+ # # Create an input stream.
702
+ # input = Gapic::StreamInput.new
703
+ #
704
+ # # Call the adb_connect method to start streaming.
705
+ # output = client.adb_connect input
706
+ #
707
+ # # Send requests on the stream. For each request object, set fields by
708
+ # # passing keyword arguments. Be sure to close the stream when done.
709
+ # input << Google::Cloud::DeviceStreaming::V1::AdbMessage.new
710
+ # input << Google::Cloud::DeviceStreaming::V1::AdbMessage.new
711
+ # input.close
712
+ #
713
+ # # The returned object is a streamed enumerable yielding elements of type
714
+ # # ::Google::Cloud::DeviceStreaming::V1::DeviceMessage
715
+ # output.each do |current_response|
716
+ # p current_response
717
+ # end
718
+ #
719
+ def adb_connect request, options = nil
720
+ unless request.is_a? ::Enumerable
721
+ raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum
722
+ request = request.to_enum
723
+ end
724
+
725
+ request = request.lazy.map do |req|
726
+ ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::DeviceStreaming::V1::AdbMessage
727
+ end
728
+
729
+ # Converts hash and nil to an options object
730
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
731
+
732
+ # Customize the options with defaults
733
+ metadata = @config.rpcs.adb_connect.metadata.to_h
734
+
735
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
736
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
737
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
738
+ gapic_version: ::Google::Cloud::DeviceStreaming::V1::VERSION
739
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
740
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
741
+
742
+ options.apply_defaults timeout: @config.rpcs.adb_connect.timeout,
743
+ metadata: metadata,
744
+ retry_policy: @config.rpcs.adb_connect.retry_policy
745
+
746
+ options.apply_defaults timeout: @config.timeout,
747
+ metadata: @config.metadata,
748
+ retry_policy: @config.retry_policy
749
+
750
+ @direct_access_service_stub.call_rpc :adb_connect, request, options: options do |response, operation|
751
+ yield response, operation if block_given?
752
+ end
753
+ rescue ::GRPC::BadStatus => e
754
+ raise ::Google::Cloud::Error.from_error(e)
755
+ end
756
+
757
+ ##
758
+ # Configuration class for the DirectAccessService API.
759
+ #
760
+ # This class represents the configuration for DirectAccessService,
761
+ # providing control over timeouts, retry behavior, logging, transport
762
+ # parameters, and other low-level controls. Certain parameters can also be
763
+ # applied individually to specific RPCs. See
764
+ # {::Google::Cloud::DeviceStreaming::V1::DirectAccessService::Client::Configuration::Rpcs}
765
+ # for a list of RPCs that can be configured independently.
766
+ #
767
+ # Configuration can be applied globally to all clients, or to a single client
768
+ # on construction.
769
+ #
770
+ # @example
771
+ #
772
+ # # Modify the global config, setting the timeout for
773
+ # # create_device_session to 20 seconds,
774
+ # # and all remaining timeouts to 10 seconds.
775
+ # ::Google::Cloud::DeviceStreaming::V1::DirectAccessService::Client.configure do |config|
776
+ # config.timeout = 10.0
777
+ # config.rpcs.create_device_session.timeout = 20.0
778
+ # end
779
+ #
780
+ # # Apply the above configuration only to a new client.
781
+ # client = ::Google::Cloud::DeviceStreaming::V1::DirectAccessService::Client.new do |config|
782
+ # config.timeout = 10.0
783
+ # config.rpcs.create_device_session.timeout = 20.0
784
+ # end
785
+ #
786
+ # @!attribute [rw] endpoint
787
+ # A custom service endpoint, as a hostname or hostname:port. The default is
788
+ # nil, indicating to use the default endpoint in the current universe domain.
789
+ # @return [::String,nil]
790
+ # @!attribute [rw] credentials
791
+ # Credentials to send with calls. You may provide any of the following types:
792
+ # * (`String`) The path to a service account key file in JSON format
793
+ # * (`Hash`) A service account key as a Hash
794
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
795
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
796
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
797
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
798
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
799
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
800
+ # * (`nil`) indicating no credentials
801
+ #
802
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
803
+ # external source for authentication to Google Cloud, you must validate it before
804
+ # providing it to a Google API client library. Providing an unvalidated credential
805
+ # configuration to Google APIs can compromise the security of your systems and data.
806
+ # For more information, refer to [Validate credential configurations from external
807
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
808
+ # @return [::Object]
809
+ # @!attribute [rw] scope
810
+ # The OAuth scopes
811
+ # @return [::Array<::String>]
812
+ # @!attribute [rw] lib_name
813
+ # The library name as recorded in instrumentation and logging
814
+ # @return [::String]
815
+ # @!attribute [rw] lib_version
816
+ # The library version as recorded in instrumentation and logging
817
+ # @return [::String]
818
+ # @!attribute [rw] channel_args
819
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
820
+ # `GRPC::Core::Channel` object is provided as the credential.
821
+ # @return [::Hash]
822
+ # @!attribute [rw] interceptors
823
+ # An array of interceptors that are run before calls are executed.
824
+ # @return [::Array<::GRPC::ClientInterceptor>]
825
+ # @!attribute [rw] timeout
826
+ # The call timeout in seconds.
827
+ # @return [::Numeric]
828
+ # @!attribute [rw] metadata
829
+ # Additional gRPC headers to be sent with the call.
830
+ # @return [::Hash{::Symbol=>::String}]
831
+ # @!attribute [rw] retry_policy
832
+ # The retry policy. The value is a hash with the following keys:
833
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
834
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
835
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
836
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
837
+ # trigger a retry.
838
+ # @return [::Hash]
839
+ # @!attribute [rw] quota_project
840
+ # A separate project against which to charge quota.
841
+ # @return [::String]
842
+ # @!attribute [rw] universe_domain
843
+ # The universe domain within which to make requests. This determines the
844
+ # default endpoint URL. The default value of nil uses the environment
845
+ # universe (usually the default "googleapis.com" universe).
846
+ # @return [::String,nil]
847
+ # @!attribute [rw] logger
848
+ # A custom logger to use for request/response debug logging, or the value
849
+ # `:default` (the default) to construct a default logger, or `nil` to
850
+ # explicitly disable logging.
851
+ # @return [::Logger,:default,nil]
852
+ #
853
+ class Configuration
854
+ extend ::Gapic::Config
855
+
856
+ # @private
857
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
858
+ DEFAULT_ENDPOINT = "devicestreaming.googleapis.com"
859
+
860
+ config_attr :endpoint, nil, ::String, nil
861
+ config_attr :credentials, nil do |value|
862
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
863
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
864
+ allowed.any? { |klass| klass === value }
865
+ end
866
+ config_attr :scope, nil, ::String, ::Array, nil
867
+ config_attr :lib_name, nil, ::String, nil
868
+ config_attr :lib_version, nil, ::String, nil
869
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
870
+ config_attr :interceptors, nil, ::Array, nil
871
+ config_attr :timeout, nil, ::Numeric, nil
872
+ config_attr :metadata, nil, ::Hash, nil
873
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
874
+ config_attr :quota_project, nil, ::String, nil
875
+ config_attr :universe_domain, nil, ::String, nil
876
+ config_attr :logger, :default, ::Logger, nil, :default
877
+
878
+ # @private
879
+ def initialize parent_config = nil
880
+ @parent_config = parent_config unless parent_config.nil?
881
+
882
+ yield self if block_given?
883
+ end
884
+
885
+ ##
886
+ # Configurations for individual RPCs
887
+ # @return [Rpcs]
888
+ #
889
+ def rpcs
890
+ @rpcs ||= begin
891
+ parent_rpcs = nil
892
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
893
+ Rpcs.new parent_rpcs
894
+ end
895
+ end
896
+
897
+ ##
898
+ # Configuration for the channel pool
899
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
900
+ #
901
+ def channel_pool
902
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
903
+ end
904
+
905
+ ##
906
+ # Configuration RPC class for the DirectAccessService API.
907
+ #
908
+ # Includes fields providing the configuration for each RPC in this service.
909
+ # Each configuration object is of type `Gapic::Config::Method` and includes
910
+ # the following configuration fields:
911
+ #
912
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
913
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
914
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
915
+ # include the following keys:
916
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
917
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
918
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
919
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
920
+ # trigger a retry.
921
+ #
922
+ class Rpcs
923
+ ##
924
+ # RPC-specific configuration for `create_device_session`
925
+ # @return [::Gapic::Config::Method]
926
+ #
927
+ attr_reader :create_device_session
928
+ ##
929
+ # RPC-specific configuration for `list_device_sessions`
930
+ # @return [::Gapic::Config::Method]
931
+ #
932
+ attr_reader :list_device_sessions
933
+ ##
934
+ # RPC-specific configuration for `get_device_session`
935
+ # @return [::Gapic::Config::Method]
936
+ #
937
+ attr_reader :get_device_session
938
+ ##
939
+ # RPC-specific configuration for `cancel_device_session`
940
+ # @return [::Gapic::Config::Method]
941
+ #
942
+ attr_reader :cancel_device_session
943
+ ##
944
+ # RPC-specific configuration for `update_device_session`
945
+ # @return [::Gapic::Config::Method]
946
+ #
947
+ attr_reader :update_device_session
948
+ ##
949
+ # RPC-specific configuration for `adb_connect`
950
+ # @return [::Gapic::Config::Method]
951
+ #
952
+ attr_reader :adb_connect
953
+
954
+ # @private
955
+ def initialize parent_rpcs = nil
956
+ create_device_session_config = parent_rpcs.create_device_session if parent_rpcs.respond_to? :create_device_session
957
+ @create_device_session = ::Gapic::Config::Method.new create_device_session_config
958
+ list_device_sessions_config = parent_rpcs.list_device_sessions if parent_rpcs.respond_to? :list_device_sessions
959
+ @list_device_sessions = ::Gapic::Config::Method.new list_device_sessions_config
960
+ get_device_session_config = parent_rpcs.get_device_session if parent_rpcs.respond_to? :get_device_session
961
+ @get_device_session = ::Gapic::Config::Method.new get_device_session_config
962
+ cancel_device_session_config = parent_rpcs.cancel_device_session if parent_rpcs.respond_to? :cancel_device_session
963
+ @cancel_device_session = ::Gapic::Config::Method.new cancel_device_session_config
964
+ update_device_session_config = parent_rpcs.update_device_session if parent_rpcs.respond_to? :update_device_session
965
+ @update_device_session = ::Gapic::Config::Method.new update_device_session_config
966
+ adb_connect_config = parent_rpcs.adb_connect if parent_rpcs.respond_to? :adb_connect
967
+ @adb_connect = ::Gapic::Config::Method.new adb_connect_config
968
+
969
+ yield self if block_given?
970
+ end
971
+ end
972
+ end
973
+ end
974
+ end
975
+ end
976
+ end
977
+ end
978
+ end