Device Streaming v1 API - Class DirectAccessService.DirectAccessServiceClient (1.0.0-beta01)

public class DirectAccessService.DirectAccessServiceClient : ClientBase<DirectAccessService.DirectAccessServiceClient>

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

Client for DirectAccessService

Inheritance

object > ClientBase > ClientBaseDirectAccessServiceDirectAccessServiceClient > DirectAccessService.DirectAccessServiceClient

Namespace

Google.Cloud.DeviceStreaming.V1

Assembly

Google.Cloud.DeviceStreaming.V1.dll

Constructors

DirectAccessServiceClient()

protected DirectAccessServiceClient()

Protected parameterless constructor to allow creation of test doubles.

DirectAccessServiceClient(CallInvoker)

public DirectAccessServiceClient(CallInvoker callInvoker)

Creates a new client for DirectAccessService that uses a custom CallInvoker.

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

DirectAccessServiceClient(ChannelBase)

public DirectAccessServiceClient(ChannelBase channel)

Creates a new client for DirectAccessService

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

DirectAccessServiceClient(ClientBaseConfiguration)

protected DirectAccessServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

AdbConnect(CallOptions)

public virtual AsyncDuplexStreamingCall<AdbMessage, DeviceMessage> AdbConnect(CallOptions options)

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.

Parameter
Name Description
options CallOptions

The options for the call.

Returns
Type Description
AsyncDuplexStreamingCallAdbMessageDeviceMessage

The call object.

AdbConnect(Metadata, DateTime?, CancellationToken)

public virtual AsyncDuplexStreamingCall<AdbMessage, DeviceMessage> AdbConnect(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncDuplexStreamingCallAdbMessageDeviceMessage

The call object.

CancelDeviceSession(CancelDeviceSessionRequest, CallOptions)

public virtual Empty CancelDeviceSession(CancelDeviceSessionRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Empty

The response received from the server.

CancelDeviceSession(CancelDeviceSessionRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty CancelDeviceSession(CancelDeviceSessionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Empty

The response received from the server.

CancelDeviceSessionAsync(CancelDeviceSessionRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> CancelDeviceSessionAsync(CancelDeviceSessionRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

CancelDeviceSessionAsync(CancelDeviceSessionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> CancelDeviceSessionAsync(CancelDeviceSessionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

CreateDeviceSession(CreateDeviceSessionRequest, CallOptions)

public virtual DeviceSession CreateDeviceSession(CreateDeviceSessionRequest request, CallOptions options)

Creates a DeviceSession.

Parameters
Name Description
request CreateDeviceSessionRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
DeviceSession

The response received from the server.

CreateDeviceSession(CreateDeviceSessionRequest, Metadata, DateTime?, CancellationToken)

public virtual DeviceSession CreateDeviceSession(CreateDeviceSessionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a DeviceSession.

Parameters
Name Description
request CreateDeviceSessionRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
DeviceSession

The response received from the server.

CreateDeviceSessionAsync(CreateDeviceSessionRequest, CallOptions)

public virtual AsyncUnaryCall<DeviceSession> CreateDeviceSessionAsync(CreateDeviceSessionRequest request, CallOptions options)

Creates a DeviceSession.

Parameters
Name Description
request CreateDeviceSessionRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallDeviceSession

The call object.

CreateDeviceSessionAsync(CreateDeviceSessionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<DeviceSession> CreateDeviceSessionAsync(CreateDeviceSessionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a DeviceSession.

Parameters
Name Description
request CreateDeviceSessionRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallDeviceSession

The call object.

GetDeviceSession(GetDeviceSessionRequest, CallOptions)

public virtual DeviceSession GetDeviceSession(GetDeviceSessionRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
DeviceSession

The response received from the server.

GetDeviceSession(GetDeviceSessionRequest, Metadata, DateTime?, CancellationToken)

public virtual DeviceSession GetDeviceSession(GetDeviceSessionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
DeviceSession

The response received from the server.

GetDeviceSessionAsync(GetDeviceSessionRequest, CallOptions)

public virtual AsyncUnaryCall<DeviceSession> GetDeviceSessionAsync(GetDeviceSessionRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallDeviceSession

The call object.

GetDeviceSessionAsync(GetDeviceSessionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<DeviceSession> GetDeviceSessionAsync(GetDeviceSessionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallDeviceSession

The call object.

ListDeviceSessions(ListDeviceSessionsRequest, CallOptions)

public virtual ListDeviceSessionsResponse ListDeviceSessions(ListDeviceSessionsRequest request, CallOptions options)

Lists DeviceSessions owned by the project user.

Parameters
Name Description
request ListDeviceSessionsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ListDeviceSessionsResponse

The response received from the server.

ListDeviceSessions(ListDeviceSessionsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListDeviceSessionsResponse ListDeviceSessions(ListDeviceSessionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists DeviceSessions owned by the project user.

Parameters
Name Description
request ListDeviceSessionsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ListDeviceSessionsResponse

The response received from the server.

ListDeviceSessionsAsync(ListDeviceSessionsRequest, CallOptions)

public virtual AsyncUnaryCall<ListDeviceSessionsResponse> ListDeviceSessionsAsync(ListDeviceSessionsRequest request, CallOptions options)

Lists DeviceSessions owned by the project user.

Parameters
Name Description
request ListDeviceSessionsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallListDeviceSessionsResponse

The call object.

ListDeviceSessionsAsync(ListDeviceSessionsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListDeviceSessionsResponse> ListDeviceSessionsAsync(ListDeviceSessionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists DeviceSessions owned by the project user.

Parameters
Name Description
request ListDeviceSessionsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallListDeviceSessionsResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override DirectAccessService.DirectAccessServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
DirectAccessServiceDirectAccessServiceClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.DeviceStreaming.V1.DirectAccessService.DirectAccessServiceClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

UpdateDeviceSession(UpdateDeviceSessionRequest, CallOptions)

public virtual DeviceSession UpdateDeviceSession(UpdateDeviceSessionRequest request, CallOptions options)

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

Parameters
Name Description
request UpdateDeviceSessionRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
DeviceSession

The response received from the server.

UpdateDeviceSession(UpdateDeviceSessionRequest, Metadata, DateTime?, CancellationToken)

public virtual DeviceSession UpdateDeviceSession(UpdateDeviceSessionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request UpdateDeviceSessionRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
DeviceSession

The response received from the server.

UpdateDeviceSessionAsync(UpdateDeviceSessionRequest, CallOptions)

public virtual AsyncUnaryCall<DeviceSession> UpdateDeviceSessionAsync(UpdateDeviceSessionRequest request, CallOptions options)

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

Parameters
Name Description
request UpdateDeviceSessionRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallDeviceSession

The call object.

UpdateDeviceSessionAsync(UpdateDeviceSessionRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<DeviceSession> UpdateDeviceSessionAsync(UpdateDeviceSessionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request UpdateDeviceSessionRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallDeviceSession

The call object.