Device Streaming v1 API - Class DirectAccessServiceClientImpl (1.0.0-beta01)

public sealed class DirectAccessServiceClientImpl : DirectAccessServiceClient

Reference documentation and code samples for the Device Streaming v1 API class DirectAccessServiceClientImpl.

DirectAccessService client wrapper implementation, for convenient use.

Inheritance

object > DirectAccessServiceClient > DirectAccessServiceClientImpl

Namespace

Google.Cloud.DeviceStreaming.V1

Assembly

Google.Cloud.DeviceStreaming.V1.dll

Remarks

A service for allocating Android devices and interacting with the live-allocated devices.

Each Session will wait for available capacity, at a higher priority over Test Execution. When allocated, the session will be exposed through a stream for integration.

DirectAccessService is currently available as a preview to select developers. You can register today on behalf of you and your team at https://developer.android.com/studio/preview/android-device-streaming

Constructors

DirectAccessServiceClientImpl(DirectAccessServiceClient, DirectAccessServiceSettings, ILogger)

public DirectAccessServiceClientImpl(DirectAccessService.DirectAccessServiceClient grpcClient, DirectAccessServiceSettings settings, ILogger logger)

Constructs a client wrapper for the DirectAccessService service, with the specified gRPC client and settings.

Parameters
Name Description
grpcClient DirectAccessServiceDirectAccessServiceClient

The underlying gRPC client.

settings DirectAccessServiceSettings

The base DirectAccessServiceSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override DirectAccessService.DirectAccessServiceClient GrpcClient { get; }

The underlying gRPC DirectAccessService client

Property Value
Type Description
DirectAccessServiceDirectAccessServiceClient
Overrides

Methods

AdbConnect(CallSettings, BidirectionalStreamingSettings)

public override DirectAccessServiceClient.AdbConnectStream AdbConnect(CallSettings callSettings = null, BidirectionalStreamingSettings streamingSettings = null)

Exposes an ADB connection if the device supports ADB. gRPC headers are used to authenticate the Connect RPC, as well as associate to a particular DeviceSession. In particular, the user must specify the "X-Omnilab-Session-Name" header.

Parameters
Name Description
callSettings CallSettings

If not null, applies overrides to this RPC call.

streamingSettings BidirectionalStreamingSettings

If not null, applies streaming overrides to this RPC call.

Returns
Type Description
DirectAccessServiceClientAdbConnectStream

The client-server stream.

Overrides

CancelDeviceSession(CancelDeviceSessionRequest, CallSettings)

public override void CancelDeviceSession(CancelDeviceSessionRequest request, CallSettings callSettings = null)

Cancel a DeviceSession. This RPC changes the DeviceSession to state FINISHED and terminates all connections. Canceled sessions are not deleted and can be retrieved or listed by the user until they expire based on the 28 day deletion policy.

Parameters
Name Description
request CancelDeviceSessionRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Overrides

CancelDeviceSessionAsync(CancelDeviceSessionRequest, CallSettings)

public override Task CancelDeviceSessionAsync(CancelDeviceSessionRequest request, CallSettings callSettings = null)

Cancel a DeviceSession. This RPC changes the DeviceSession to state FINISHED and terminates all connections. Canceled sessions are not deleted and can be retrieved or listed by the user until they expire based on the 28 day deletion policy.

Parameters
Name Description
request CancelDeviceSessionRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Overrides

CreateDeviceSession(CreateDeviceSessionRequest, CallSettings)

public override DeviceSession CreateDeviceSession(CreateDeviceSessionRequest request, CallSettings callSettings = null)

Creates a DeviceSession.

Parameters
Name Description
request CreateDeviceSessionRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DeviceSession

The RPC response.

Overrides

CreateDeviceSessionAsync(CreateDeviceSessionRequest, CallSettings)

public override Task<DeviceSession> CreateDeviceSessionAsync(CreateDeviceSessionRequest request, CallSettings callSettings = null)

Creates a DeviceSession.

Parameters
Name Description
request CreateDeviceSessionRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDeviceSession

A Task containing the RPC response.

Overrides

GetDeviceSession(GetDeviceSessionRequest, CallSettings)

public override DeviceSession GetDeviceSession(GetDeviceSessionRequest request, CallSettings callSettings = null)

Gets a DeviceSession, which documents the allocation status and whether the device is allocated. Clients making requests from this API must poll GetDeviceSession.

Parameters
Name Description
request GetDeviceSessionRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DeviceSession

The RPC response.

Overrides

GetDeviceSessionAsync(GetDeviceSessionRequest, CallSettings)

public override Task<DeviceSession> GetDeviceSessionAsync(GetDeviceSessionRequest request, CallSettings callSettings = null)

Gets a DeviceSession, which documents the allocation status and whether the device is allocated. Clients making requests from this API must poll GetDeviceSession.

Parameters
Name Description
request GetDeviceSessionRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDeviceSession

A Task containing the RPC response.

Overrides

ListDeviceSessions(ListDeviceSessionsRequest, CallSettings)

public override PagedEnumerable<ListDeviceSessionsResponse, DeviceSession> ListDeviceSessions(ListDeviceSessionsRequest request, CallSettings callSettings = null)

Lists DeviceSessions owned by the project user.

Parameters
Name Description
request ListDeviceSessionsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListDeviceSessionsResponseDeviceSession

A pageable sequence of DeviceSession resources.

Overrides

ListDeviceSessionsAsync(ListDeviceSessionsRequest, CallSettings)

public override PagedAsyncEnumerable<ListDeviceSessionsResponse, DeviceSession> ListDeviceSessionsAsync(ListDeviceSessionsRequest request, CallSettings callSettings = null)

Lists DeviceSessions owned by the project user.

Parameters
Name Description
request ListDeviceSessionsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListDeviceSessionsResponseDeviceSession

A pageable asynchronous sequence of DeviceSession resources.

Overrides

UpdateDeviceSession(UpdateDeviceSessionRequest, CallSettings)

public override DeviceSession UpdateDeviceSession(UpdateDeviceSessionRequest request, CallSettings callSettings = null)

Updates the current DeviceSession to the fields described by the update_mask.

Parameters
Name Description
request UpdateDeviceSessionRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DeviceSession

The RPC response.

Overrides

UpdateDeviceSessionAsync(UpdateDeviceSessionRequest, CallSettings)

public override Task<DeviceSession> UpdateDeviceSessionAsync(UpdateDeviceSessionRequest request, CallSettings callSettings = null)

Updates the current DeviceSession to the fields described by the update_mask.

Parameters
Name Description
request UpdateDeviceSessionRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDeviceSession

A Task containing the RPC response.

Overrides