Class DeviceSession (0.2.0)

public final class DeviceSession extends GeneratedMessageV3 implements DeviceSessionOrBuilder

Protobuf message describing the device message, used from several RPCs.

Protobuf type google.cloud.devicestreaming.v1.DeviceSession

Static Fields

ACTIVE_START_TIME_FIELD_NUMBER

public static final int ACTIVE_START_TIME_FIELD_NUMBER
Field Value
Type Description
int

ANDROID_DEVICE_FIELD_NUMBER

public static final int ANDROID_DEVICE_FIELD_NUMBER
Field Value
Type Description
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

EXPIRE_TIME_FIELD_NUMBER

public static final int EXPIRE_TIME_FIELD_NUMBER
Field Value
Type Description
int

INACTIVITY_TIMEOUT_FIELD_NUMBER

public static final int INACTIVITY_TIMEOUT_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
Type Description
int

STATE_HISTORIES_FIELD_NUMBER

public static final int STATE_HISTORIES_FIELD_NUMBER
Field Value
Type Description
int

TTL_FIELD_NUMBER

public static final int TTL_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static DeviceSession getDefaultInstance()
Returns
Type Description
DeviceSession

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static DeviceSession.Builder newBuilder()
Returns
Type Description
DeviceSession.Builder

newBuilder(DeviceSession prototype)

public static DeviceSession.Builder newBuilder(DeviceSession prototype)
Parameter
Name Description
prototype DeviceSession
Returns
Type Description
DeviceSession.Builder

parseDelimitedFrom(InputStream input)

public static DeviceSession parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DeviceSession
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DeviceSession parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceSession
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static DeviceSession parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
DeviceSession
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DeviceSession parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceSession
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DeviceSession parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
DeviceSession
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DeviceSession parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceSession
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DeviceSession parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
DeviceSession
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DeviceSession parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceSession
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static DeviceSession parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DeviceSession
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DeviceSession parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceSession
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static DeviceSession parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
DeviceSession
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DeviceSession parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceSession
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<DeviceSession> parser()
Returns
Type Description
Parser<DeviceSession>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getActiveStartTime()

public Timestamp getActiveStartTime()

Output only. The timestamp that the session first became ACTIVE.

.google.protobuf.Timestamp active_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The activeStartTime.

getActiveStartTimeOrBuilder()

public TimestampOrBuilder getActiveStartTimeOrBuilder()

Output only. The timestamp that the session first became ACTIVE.

.google.protobuf.Timestamp active_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getAndroidDevice()

public AndroidDevice getAndroidDevice()

Required. The requested device

.google.cloud.devicestreaming.v1.AndroidDevice android_device = 15 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AndroidDevice

The androidDevice.

getAndroidDeviceOrBuilder()

public AndroidDeviceOrBuilder getAndroidDeviceOrBuilder()

Required. The requested device

.google.cloud.devicestreaming.v1.AndroidDevice android_device = 15 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AndroidDeviceOrBuilder

getCreateTime()

public Timestamp getCreateTime()

Output only. The time that the Session was created.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time that the Session was created.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public DeviceSession getDefaultInstanceForType()
Returns
Type Description
DeviceSession

getDisplayName()

public String getDisplayName()

Output only. The title of the DeviceSession to be presented in the UI.

string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Output only. The title of the DeviceSession to be presented in the UI.

string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for displayName.

getExpirationCase()

public DeviceSession.ExpirationCase getExpirationCase()
Returns
Type Description
DeviceSession.ExpirationCase

getExpireTime()

public Timestamp getExpireTime()

Optional. If the device is still in use at this time, any connections will be ended and the SessionState will transition from ACTIVE to FINISHED.

.google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Timestamp

The expireTime.

getExpireTimeOrBuilder()

public TimestampOrBuilder getExpireTimeOrBuilder()

Optional. If the device is still in use at this time, any connections will be ended and the SessionState will transition from ACTIVE to FINISHED.

.google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TimestampOrBuilder

getInactivityTimeout()

public Duration getInactivityTimeout()

Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY.

.google.protobuf.Duration inactivity_timeout = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Duration

The inactivityTimeout.

getInactivityTimeoutOrBuilder()

public DurationOrBuilder getInactivityTimeoutOrBuilder()

Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY.

.google.protobuf.Duration inactivity_timeout = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
DurationOrBuilder

getName()

public String getName()

Optional. Name of the DeviceSession, e.g. "projects/{project_id}/deviceSessions/{session_id}"

string name = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Optional. Name of the DeviceSession, e.g. "projects/{project_id}/deviceSessions/{session_id}"

string name = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<DeviceSession> getParserForType()
Returns
Type Description
Parser<DeviceSession>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getState()

public DeviceSession.SessionState getState()

Output only. Current state of the DeviceSession.

.google.cloud.devicestreaming.v1.DeviceSession.SessionState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
DeviceSession.SessionState

The state.

getStateHistories(int index)

public DeviceSession.SessionStateEvent getStateHistories(int index)

Output only. The historical state transitions of the session_state message including the current session state.

repeated .google.cloud.devicestreaming.v1.DeviceSession.SessionStateEvent state_histories = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
DeviceSession.SessionStateEvent

getStateHistoriesCount()

public int getStateHistoriesCount()

Output only. The historical state transitions of the session_state message including the current session state.

repeated .google.cloud.devicestreaming.v1.DeviceSession.SessionStateEvent state_histories = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getStateHistoriesList()

public List<DeviceSession.SessionStateEvent> getStateHistoriesList()

Output only. The historical state transitions of the session_state message including the current session state.

repeated .google.cloud.devicestreaming.v1.DeviceSession.SessionStateEvent state_histories = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<SessionStateEvent>

getStateHistoriesOrBuilder(int index)

public DeviceSession.SessionStateEventOrBuilder getStateHistoriesOrBuilder(int index)

Output only. The historical state transitions of the session_state message including the current session state.

repeated .google.cloud.devicestreaming.v1.DeviceSession.SessionStateEvent state_histories = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
DeviceSession.SessionStateEventOrBuilder

getStateHistoriesOrBuilderList()

public List<? extends DeviceSession.SessionStateEventOrBuilder> getStateHistoriesOrBuilderList()

Output only. The historical state transitions of the session_state message including the current session state.

repeated .google.cloud.devicestreaming.v1.DeviceSession.SessionStateEvent state_histories = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.cloud.devicestreaming.v1.DeviceSession.SessionStateEventOrBuilder>

getStateValue()

public int getStateValue()

Output only. Current state of the DeviceSession.

.google.cloud.devicestreaming.v1.DeviceSession.SessionState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getTtl()

public Duration getTtl()

Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the UpdateDeviceSession RPC. Default: 15 minutes.

.google.protobuf.Duration ttl = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Duration

The ttl.

getTtlOrBuilder()

public DurationOrBuilder getTtlOrBuilder()

Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the UpdateDeviceSession RPC. Default: 15 minutes.

.google.protobuf.Duration ttl = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DurationOrBuilder

hasActiveStartTime()

public boolean hasActiveStartTime()

Output only. The timestamp that the session first became ACTIVE.

.google.protobuf.Timestamp active_start_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the activeStartTime field is set.

hasAndroidDevice()

public boolean hasAndroidDevice()

Required. The requested device

.google.cloud.devicestreaming.v1.AndroidDevice android_device = 15 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the androidDevice field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. The time that the Session was created.

.google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasExpireTime()

public boolean hasExpireTime()

Optional. If the device is still in use at this time, any connections will be ended and the SessionState will transition from ACTIVE to FINISHED.

.google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the expireTime field is set.

hasInactivityTimeout()

public boolean hasInactivityTimeout()

Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY.

.google.protobuf.Duration inactivity_timeout = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the inactivityTimeout field is set.

hasTtl()

public boolean hasTtl()

Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the UpdateDeviceSession RPC. Default: 15 minutes.

.google.protobuf.Duration ttl = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the ttl field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public DeviceSession.Builder newBuilderForType()
Returns
Type Description
DeviceSession.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected DeviceSession.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
DeviceSession.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public DeviceSession.Builder toBuilder()
Returns
Type Description
DeviceSession.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException