# Class DeviceSession (0.5.0)

0.5.0 (latest) 0.4.0 0.3.0 0.2.0 0.1.0

    DeviceSession(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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

This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `name` | `str` Optional. Name of the DeviceSession, e.g. "projects/{project_id}/deviceSessions/{session_id}". |
| `display_name` | `str` Output only. The title of the DeviceSession to be presented in the UI. |
| `state` | `https://docs.cloud.google.com/python/docs/reference/google-cloud-devicestreaming/latest/google.cloud.devicestreaming_v1.types.DeviceSession.SessionState` Output only. Current state of the DeviceSession. |
| `state_histories` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/google-cloud-devicestreaming/latest/google.cloud.devicestreaming_v1.types.DeviceSession.SessionStateEvent]` Output only. The historical state transitions of the session_state message including the current session state. |
| `ttl` | `google.protobuf.duration_pb2.Duration` 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. This field is a member of `oneof`_ `expiration`. |
| `expire_time` | `google.protobuf.timestamp_pb2.Timestamp` 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. This field is a member of `oneof`_ `expiration`. |
| `inactivity_timeout` | `google.protobuf.duration_pb2.Duration` Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY. |
| `create_time` | `google.protobuf.timestamp_pb2.Timestamp` Output only. The time that the Session was created. |
| `active_start_time` | `google.protobuf.timestamp_pb2.Timestamp` Output only. The timestamp that the session first became ACTIVE. |
| `android_device` | `https://docs.cloud.google.com/python/docs/reference/google-cloud-devicestreaming/latest/google.cloud.devicestreaming_v1.types.AndroidDevice` Required. The requested device |

## Classes

### SessionState

    SessionState(value)

The state that the DeviceSession resides.

### SessionStateEvent

    SessionStateEvent(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A message encapsulating a series of Session states and the
time that the DeviceSession first entered those states.