Class DeviceSession

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.devicestreaming.v1.DeviceSession
All Implemented Interfaces:
DeviceSessionOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class DeviceSession extends com.google.protobuf.GeneratedMessage implements DeviceSessionOrBuilder
 Protobuf message describing the device message, used from several RPCs.
 
Protobuf type google.cloud.devicestreaming.v1.DeviceSession
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • DISPLAY_NAME_FIELD_NUMBER

      public static final int DISPLAY_NAME_FIELD_NUMBER
      See Also:
    • STATE_FIELD_NUMBER

      public static final int STATE_FIELD_NUMBER
      See Also:
    • STATE_HISTORIES_FIELD_NUMBER

      public static final int STATE_HISTORIES_FIELD_NUMBER
      See Also:
    • TTL_FIELD_NUMBER

      public static final int TTL_FIELD_NUMBER
      See Also:
    • EXPIRE_TIME_FIELD_NUMBER

      public static final int EXPIRE_TIME_FIELD_NUMBER
      See Also:
    • INACTIVITY_TIMEOUT_FIELD_NUMBER

      public static final int INACTIVITY_TIMEOUT_FIELD_NUMBER
      See Also:
    • CREATE_TIME_FIELD_NUMBER

      public static final int CREATE_TIME_FIELD_NUMBER
      See Also:
    • ACTIVE_START_TIME_FIELD_NUMBER

      public static final int ACTIVE_START_TIME_FIELD_NUMBER
      See Also:
    • ANDROID_DEVICE_FIELD_NUMBER

      public static final int ANDROID_DEVICE_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getExpirationCase

      public DeviceSession.ExpirationCase getExpirationCase()
      Specified by:
      getExpirationCase in interface DeviceSessionOrBuilder
    • 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];
      Specified by:
      getName in interface DeviceSessionOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Optional. Name of the DeviceSession, e.g.
       "projects/{project_id}/deviceSessions/{session_id}"
       
      string name = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNameBytes in interface DeviceSessionOrBuilder
      Returns:
      The bytes for name.
    • 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];
      Specified by:
      getDisplayName in interface DeviceSessionOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.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];
      Specified by:
      getDisplayNameBytes in interface DeviceSessionOrBuilder
      Returns:
      The bytes for displayName.
    • 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];
      Specified by:
      getStateValue in interface DeviceSessionOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • 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];
      Specified by:
      getState in interface DeviceSessionOrBuilder
      Returns:
      The state.
    • 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];
      Specified by:
      getStateHistoriesList in interface DeviceSessionOrBuilder
    • 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];
      Specified by:
      getStateHistoriesOrBuilderList in interface DeviceSessionOrBuilder
    • 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];
      Specified by:
      getStateHistoriesCount in interface DeviceSessionOrBuilder
    • getStateHistories

      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];
      Specified by:
      getStateHistories in interface DeviceSessionOrBuilder
    • getStateHistoriesOrBuilder

      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];
      Specified by:
      getStateHistoriesOrBuilder in interface DeviceSessionOrBuilder
    • 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];
      Specified by:
      hasTtl in interface DeviceSessionOrBuilder
      Returns:
      Whether the ttl field is set.
    • getTtl

      public com.google.protobuf.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];
      Specified by:
      getTtl in interface DeviceSessionOrBuilder
      Returns:
      The ttl.
    • getTtlOrBuilder

      public com.google.protobuf.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];
      Specified by:
      getTtlOrBuilder in interface DeviceSessionOrBuilder
    • 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];
      Specified by:
      hasExpireTime in interface DeviceSessionOrBuilder
      Returns:
      Whether the expireTime field is set.
    • getExpireTime

      public com.google.protobuf.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];
      Specified by:
      getExpireTime in interface DeviceSessionOrBuilder
      Returns:
      The expireTime.
    • getExpireTimeOrBuilder

      public com.google.protobuf.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];
      Specified by:
      getExpireTimeOrBuilder in interface DeviceSessionOrBuilder
    • 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];
      Specified by:
      hasInactivityTimeout in interface DeviceSessionOrBuilder
      Returns:
      Whether the inactivityTimeout field is set.
    • getInactivityTimeout

      public com.google.protobuf.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];
      Specified by:
      getInactivityTimeout in interface DeviceSessionOrBuilder
      Returns:
      The inactivityTimeout.
    • getInactivityTimeoutOrBuilder

      public com.google.protobuf.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];
      Specified by:
      getInactivityTimeoutOrBuilder in interface DeviceSessionOrBuilder
    • 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];
      Specified by:
      hasCreateTime in interface DeviceSessionOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. The time that the Session was created.
       
      .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface DeviceSessionOrBuilder
      Returns:
      The createTime.
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. The time that the Session was created.
       
      .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface DeviceSessionOrBuilder
    • 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];
      Specified by:
      hasActiveStartTime in interface DeviceSessionOrBuilder
      Returns:
      Whether the activeStartTime field is set.
    • getActiveStartTime

      public com.google.protobuf.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];
      Specified by:
      getActiveStartTime in interface DeviceSessionOrBuilder
      Returns:
      The activeStartTime.
    • getActiveStartTimeOrBuilder

      public com.google.protobuf.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];
      Specified by:
      getActiveStartTimeOrBuilder in interface DeviceSessionOrBuilder
    • hasAndroidDevice

      public boolean hasAndroidDevice()
       Required. The requested device
       
      .google.cloud.devicestreaming.v1.AndroidDevice android_device = 15 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasAndroidDevice in interface DeviceSessionOrBuilder
      Returns:
      Whether the androidDevice field is set.
    • getAndroidDevice

      public AndroidDevice getAndroidDevice()
       Required. The requested device
       
      .google.cloud.devicestreaming.v1.AndroidDevice android_device = 15 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getAndroidDevice in interface DeviceSessionOrBuilder
      Returns:
      The androidDevice.
    • getAndroidDeviceOrBuilder

      public AndroidDeviceOrBuilder getAndroidDeviceOrBuilder()
       Required. The requested device
       
      .google.cloud.devicestreaming.v1.AndroidDevice android_device = 15 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getAndroidDeviceOrBuilder in interface DeviceSessionOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static DeviceSession parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DeviceSession parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DeviceSession parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DeviceSession parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DeviceSession parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DeviceSession parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DeviceSession parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DeviceSession parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static DeviceSession parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static DeviceSession parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DeviceSession parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DeviceSession parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public DeviceSession.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static DeviceSession.Builder newBuilder()
    • newBuilder

      public static DeviceSession.Builder newBuilder(DeviceSession prototype)
    • toBuilder

      public DeviceSession.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected DeviceSession.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static DeviceSession getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<DeviceSession> parser()
    • getParserForType

      public com.google.protobuf.Parser<DeviceSession> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public DeviceSession getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder