Class DeviceSession.Builder (0.2.0)

public static final class DeviceSession.Builder extends GeneratedMessageV3.Builder<DeviceSession.Builder> implements DeviceSessionOrBuilder

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

Protobuf type google.cloud.devicestreaming.v1.DeviceSession

Static Methods

getDescriptor()

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

Methods

addAllStateHistories(Iterable<? extends DeviceSession.SessionStateEvent> values)

public DeviceSession.Builder addAllStateHistories(Iterable<? extends DeviceSession.SessionStateEvent> values)

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
values Iterable<? extends com.google.cloud.devicestreaming.v1.DeviceSession.SessionStateEvent>
Returns
Type Description
DeviceSession.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DeviceSession.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
DeviceSession.Builder
Overrides

addStateHistories(DeviceSession.SessionStateEvent value)

public DeviceSession.Builder addStateHistories(DeviceSession.SessionStateEvent value)

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
value DeviceSession.SessionStateEvent
Returns
Type Description
DeviceSession.Builder

addStateHistories(DeviceSession.SessionStateEvent.Builder builderForValue)

public DeviceSession.Builder addStateHistories(DeviceSession.SessionStateEvent.Builder builderForValue)

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
builderForValue DeviceSession.SessionStateEvent.Builder
Returns
Type Description
DeviceSession.Builder

addStateHistories(int index, DeviceSession.SessionStateEvent value)

public DeviceSession.Builder addStateHistories(int index, DeviceSession.SessionStateEvent value)

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];

Parameters
Name Description
index int
value DeviceSession.SessionStateEvent
Returns
Type Description
DeviceSession.Builder

addStateHistories(int index, DeviceSession.SessionStateEvent.Builder builderForValue)

public DeviceSession.Builder addStateHistories(int index, DeviceSession.SessionStateEvent.Builder builderForValue)

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];

Parameters
Name Description
index int
builderForValue DeviceSession.SessionStateEvent.Builder
Returns
Type Description
DeviceSession.Builder

addStateHistoriesBuilder()

public DeviceSession.SessionStateEvent.Builder addStateHistoriesBuilder()

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
DeviceSession.SessionStateEvent.Builder

addStateHistoriesBuilder(int index)

public DeviceSession.SessionStateEvent.Builder addStateHistoriesBuilder(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.Builder

build()

public DeviceSession build()
Returns
Type Description
DeviceSession

buildPartial()

public DeviceSession buildPartial()
Returns
Type Description
DeviceSession

clear()

public DeviceSession.Builder clear()
Returns
Type Description
DeviceSession.Builder
Overrides

clearActiveStartTime()

public DeviceSession.Builder clearActiveStartTime()

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
DeviceSession.Builder

clearAndroidDevice()

public DeviceSession.Builder clearAndroidDevice()

Required. The requested device

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

Returns
Type Description
DeviceSession.Builder

clearCreateTime()

public DeviceSession.Builder clearCreateTime()

Output only. The time that the Session was created.

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

Returns
Type Description
DeviceSession.Builder

clearDisplayName()

public DeviceSession.Builder clearDisplayName()

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
DeviceSession.Builder

This builder for chaining.

clearExpiration()

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

clearExpireTime()

public DeviceSession.Builder clearExpireTime()

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
DeviceSession.Builder

clearField(Descriptors.FieldDescriptor field)

public DeviceSession.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
DeviceSession.Builder
Overrides

clearInactivityTimeout()

public DeviceSession.Builder clearInactivityTimeout()

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
DeviceSession.Builder

clearName()

public DeviceSession.Builder clearName()

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

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

Returns
Type Description
DeviceSession.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public DeviceSession.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
DeviceSession.Builder
Overrides

clearState()

public DeviceSession.Builder clearState()

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.Builder

This builder for chaining.

clearStateHistories()

public DeviceSession.Builder clearStateHistories()

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
DeviceSession.Builder

clearTtl()

public DeviceSession.Builder clearTtl()

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
DeviceSession.Builder

clone()

public DeviceSession.Builder clone()
Returns
Type Description
DeviceSession.Builder
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.

getActiveStartTimeBuilder()

public Timestamp.Builder getActiveStartTimeBuilder()

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
Builder

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.

getAndroidDeviceBuilder()

public AndroidDevice.Builder getAndroidDeviceBuilder()

Required. The requested device

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

Returns
Type Description
AndroidDevice.Builder

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.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time that the Session was created.

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

Returns
Type Description
Builder

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

getExpireTimeBuilder()

public Timestamp.Builder getExpireTimeBuilder()

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
Builder

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.

getInactivityTimeoutBuilder()

public Duration.Builder getInactivityTimeoutBuilder()

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
Builder

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.

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

getStateHistoriesBuilder(int index)

public DeviceSession.SessionStateEvent.Builder getStateHistoriesBuilder(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.Builder

getStateHistoriesBuilderList()

public List<DeviceSession.SessionStateEvent.Builder> getStateHistoriesBuilderList()

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<Builder>

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.

getTtlBuilder()

public Duration.Builder getTtlBuilder()

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
Builder

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeActiveStartTime(Timestamp value)

public DeviceSession.Builder mergeActiveStartTime(Timestamp value)

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

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

Parameter
Name Description
value Timestamp
Returns
Type Description
DeviceSession.Builder

mergeAndroidDevice(AndroidDevice value)

public DeviceSession.Builder mergeAndroidDevice(AndroidDevice value)

Required. The requested device

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

Parameter
Name Description
value AndroidDevice
Returns
Type Description
DeviceSession.Builder

mergeCreateTime(Timestamp value)

public DeviceSession.Builder mergeCreateTime(Timestamp value)

Output only. The time that the Session was created.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
DeviceSession.Builder

mergeExpireTime(Timestamp value)

public DeviceSession.Builder mergeExpireTime(Timestamp value)

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];

Parameter
Name Description
value Timestamp
Returns
Type Description
DeviceSession.Builder

mergeFrom(DeviceSession other)

public DeviceSession.Builder mergeFrom(DeviceSession other)
Parameter
Name Description
other DeviceSession
Returns
Type Description
DeviceSession.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DeviceSession.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceSession.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public DeviceSession.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
DeviceSession.Builder
Overrides

mergeInactivityTimeout(Duration value)

public DeviceSession.Builder mergeInactivityTimeout(Duration value)

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];

Parameter
Name Description
value Duration
Returns
Type Description
DeviceSession.Builder

mergeTtl(Duration value)

public DeviceSession.Builder mergeTtl(Duration value)

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];

Parameter
Name Description
value Duration
Returns
Type Description
DeviceSession.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DeviceSession.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DeviceSession.Builder
Overrides

removeStateHistories(int index)

public DeviceSession.Builder removeStateHistories(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.Builder

setActiveStartTime(Timestamp value)

public DeviceSession.Builder setActiveStartTime(Timestamp value)

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

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

Parameter
Name Description
value Timestamp
Returns
Type Description
DeviceSession.Builder

setActiveStartTime(Timestamp.Builder builderForValue)

public DeviceSession.Builder setActiveStartTime(Timestamp.Builder builderForValue)

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

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
DeviceSession.Builder

setAndroidDevice(AndroidDevice value)

public DeviceSession.Builder setAndroidDevice(AndroidDevice value)

Required. The requested device

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

Parameter
Name Description
value AndroidDevice
Returns
Type Description
DeviceSession.Builder

setAndroidDevice(AndroidDevice.Builder builderForValue)

public DeviceSession.Builder setAndroidDevice(AndroidDevice.Builder builderForValue)

Required. The requested device

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

Parameter
Name Description
builderForValue AndroidDevice.Builder
Returns
Type Description
DeviceSession.Builder

setCreateTime(Timestamp value)

public DeviceSession.Builder setCreateTime(Timestamp value)

Output only. The time that the Session was created.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
DeviceSession.Builder

setCreateTime(Timestamp.Builder builderForValue)

public DeviceSession.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time that the Session was created.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
DeviceSession.Builder

setDisplayName(String value)

public DeviceSession.Builder setDisplayName(String value)

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

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

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
DeviceSession.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public DeviceSession.Builder setDisplayNameBytes(ByteString value)

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

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

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
DeviceSession.Builder

This builder for chaining.

setExpireTime(Timestamp value)

public DeviceSession.Builder setExpireTime(Timestamp value)

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];

Parameter
Name Description
value Timestamp
Returns
Type Description
DeviceSession.Builder

setExpireTime(Timestamp.Builder builderForValue)

public DeviceSession.Builder setExpireTime(Timestamp.Builder builderForValue)

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];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
DeviceSession.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public DeviceSession.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
DeviceSession.Builder
Overrides

setInactivityTimeout(Duration value)

public DeviceSession.Builder setInactivityTimeout(Duration value)

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];

Parameter
Name Description
value Duration
Returns
Type Description
DeviceSession.Builder

setInactivityTimeout(Duration.Builder builderForValue)

public DeviceSession.Builder setInactivityTimeout(Duration.Builder builderForValue)

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];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
DeviceSession.Builder

setName(String value)

public DeviceSession.Builder setName(String value)

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

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
DeviceSession.Builder

This builder for chaining.

setNameBytes(ByteString value)

public DeviceSession.Builder setNameBytes(ByteString value)

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

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
DeviceSession.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public DeviceSession.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
DeviceSession.Builder
Overrides

setState(DeviceSession.SessionState value)

public DeviceSession.Builder setState(DeviceSession.SessionState value)

Output only. Current state of the DeviceSession.

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

Parameter
Name Description
value DeviceSession.SessionState

The state to set.

Returns
Type Description
DeviceSession.Builder

This builder for chaining.

setStateHistories(int index, DeviceSession.SessionStateEvent value)

public DeviceSession.Builder setStateHistories(int index, DeviceSession.SessionStateEvent value)

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];

Parameters
Name Description
index int
value DeviceSession.SessionStateEvent
Returns
Type Description
DeviceSession.Builder

setStateHistories(int index, DeviceSession.SessionStateEvent.Builder builderForValue)

public DeviceSession.Builder setStateHistories(int index, DeviceSession.SessionStateEvent.Builder builderForValue)

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];

Parameters
Name Description
index int
builderForValue DeviceSession.SessionStateEvent.Builder
Returns
Type Description
DeviceSession.Builder

setStateValue(int value)

public DeviceSession.Builder setStateValue(int value)

Output only. Current state of the DeviceSession.

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

Parameter
Name Description
value int

The enum numeric value on the wire for state to set.

Returns
Type Description
DeviceSession.Builder

This builder for chaining.

setTtl(Duration value)

public DeviceSession.Builder setTtl(Duration value)

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];

Parameter
Name Description
value Duration
Returns
Type Description
DeviceSession.Builder

setTtl(Duration.Builder builderForValue)

public DeviceSession.Builder setTtl(Duration.Builder builderForValue)

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];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
DeviceSession.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final DeviceSession.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DeviceSession.Builder
Overrides