cancel(name, body=None, x__xgafv=None)
POST /v1/projects/{project_id}/deviceSessions/{device_session_id}:cancel 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.
Close httplib2 connections.
create(parent, body=None, x__xgafv=None)
POST /v1/projects/{project_id}/deviceSessions
GET /v1/projects/{project_id}/deviceSessions/{device_session_id} Return a DeviceSession, which documents the allocation status and whether the device is allocated. Clients making requests from this API must poll GetDeviceSession.
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
GET /v1/projects/{project_id}/deviceSessions Lists device Sessions owned by the project user.
Retrieves the next page of results.
patch(name, body=None, updateMask=None, x__xgafv=None)
PATCH /v1/projects/{projectId}/deviceSessions/deviceSessionId}:updateDeviceSession Updates the current device session to the fields described by the update_mask.
cancel(name, body=None, x__xgafv=None)
POST /v1/projects/{project_id}/deviceSessions/{device_session_id}:cancel 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. Args: name: string, Required. Name of the DeviceSession, e.g. "projects/{project_id}/deviceSessions/{session_id}" (required) body: object, The request body. The object takes the form of: { # The request object for cancelling a Device Session. } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } }
close()
Close httplib2 connections.
create(parent, body=None, x__xgafv=None)
POST /v1/projects/{project_id}/deviceSessions Args: parent: string, Required. The Compute Engine project under which this device will be allocated. "projects/{project_id}" (required) body: object, The request body. The object takes the form of: { # Protobuf message describing the device message, used from several RPCs. "activeStartTime": "A String", # Output only. The timestamp that the session first became ACTIVE. "androidDevice": { # A single Android device. # Required. The requested device "androidModelId": "A String", # Required. The id of the Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options. "androidVersionId": "A String", # Required. The id of the Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options. "locale": "A String", # Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options. "orientation": "A String", # Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options. }, "createTime": "A String", # Output only. The time that the Session was created. "displayName": "A String", # Output only. The title of the DeviceSession to be presented in the UI. "expireTime": "A String", # 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. "inactivityTimeout": "A String", # Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY. "name": "A String", # Optional. Name of the DeviceSession, e.g. "projects/{project_id}/deviceSessions/{session_id}" "state": "A String", # Output only. Current state of the DeviceSession. "stateHistories": [ # Output only. The historical state transitions of the session_state message including the current session state. { # A message encapsulating a series of Session states and the time that the DeviceSession first entered those states. "eventTime": "A String", # Output only. The time that the session_state first encountered that state. "sessionState": "A String", # Output only. The session_state tracked by this event "stateMessage": "A String", # Output only. A human-readable message to explain the state. }, ], "ttl": "A String", # 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. } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Protobuf message describing the device message, used from several RPCs. "activeStartTime": "A String", # Output only. The timestamp that the session first became ACTIVE. "androidDevice": { # A single Android device. # Required. The requested device "androidModelId": "A String", # Required. The id of the Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options. "androidVersionId": "A String", # Required. The id of the Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options. "locale": "A String", # Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options. "orientation": "A String", # Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options. }, "createTime": "A String", # Output only. The time that the Session was created. "displayName": "A String", # Output only. The title of the DeviceSession to be presented in the UI. "expireTime": "A String", # 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. "inactivityTimeout": "A String", # Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY. "name": "A String", # Optional. Name of the DeviceSession, e.g. "projects/{project_id}/deviceSessions/{session_id}" "state": "A String", # Output only. Current state of the DeviceSession. "stateHistories": [ # Output only. The historical state transitions of the session_state message including the current session state. { # A message encapsulating a series of Session states and the time that the DeviceSession first entered those states. "eventTime": "A String", # Output only. The time that the session_state first encountered that state. "sessionState": "A String", # Output only. The session_state tracked by this event "stateMessage": "A String", # Output only. A human-readable message to explain the state. }, ], "ttl": "A String", # 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. }
get(name, x__xgafv=None)
GET /v1/projects/{project_id}/deviceSessions/{device_session_id} Return a DeviceSession, which documents the allocation status and whether the device is allocated. Clients making requests from this API must poll GetDeviceSession. Args: name: string, Required. Name of the DeviceSession, e.g. "projects/{project_id}/deviceSessions/{session_id}" (required) x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Protobuf message describing the device message, used from several RPCs. "activeStartTime": "A String", # Output only. The timestamp that the session first became ACTIVE. "androidDevice": { # A single Android device. # Required. The requested device "androidModelId": "A String", # Required. The id of the Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options. "androidVersionId": "A String", # Required. The id of the Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options. "locale": "A String", # Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options. "orientation": "A String", # Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options. }, "createTime": "A String", # Output only. The time that the Session was created. "displayName": "A String", # Output only. The title of the DeviceSession to be presented in the UI. "expireTime": "A String", # 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. "inactivityTimeout": "A String", # Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY. "name": "A String", # Optional. Name of the DeviceSession, e.g. "projects/{project_id}/deviceSessions/{session_id}" "state": "A String", # Output only. Current state of the DeviceSession. "stateHistories": [ # Output only. The historical state transitions of the session_state message including the current session state. { # A message encapsulating a series of Session states and the time that the DeviceSession first entered those states. "eventTime": "A String", # Output only. The time that the session_state first encountered that state. "sessionState": "A String", # Output only. The session_state tracked by this event "stateMessage": "A String", # Output only. A human-readable message to explain the state. }, ], "ttl": "A String", # 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. }
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
GET /v1/projects/{project_id}/deviceSessions Lists device Sessions owned by the project user. Args: parent: string, Required. The name of the parent to request, e.g. "projects/{project_id}" (required) filter: string, Optional. If specified, responses will be filtered by the given filter. Allowed fields are: session_state. pageSize: integer, Optional. The maximum number of DeviceSessions to return. pageToken: string, Optional. A continuation token for paging. x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A list of device sessions. "deviceSessions": [ # The sessions matching the specified filter in the given cloud project. { # Protobuf message describing the device message, used from several RPCs. "activeStartTime": "A String", # Output only. The timestamp that the session first became ACTIVE. "androidDevice": { # A single Android device. # Required. The requested device "androidModelId": "A String", # Required. The id of the Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options. "androidVersionId": "A String", # Required. The id of the Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options. "locale": "A String", # Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options. "orientation": "A String", # Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options. }, "createTime": "A String", # Output only. The time that the Session was created. "displayName": "A String", # Output only. The title of the DeviceSession to be presented in the UI. "expireTime": "A String", # 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. "inactivityTimeout": "A String", # Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY. "name": "A String", # Optional. Name of the DeviceSession, e.g. "projects/{project_id}/deviceSessions/{session_id}" "state": "A String", # Output only. Current state of the DeviceSession. "stateHistories": [ # Output only. The historical state transitions of the session_state message including the current session state. { # A message encapsulating a series of Session states and the time that the DeviceSession first entered those states. "eventTime": "A String", # Output only. The time that the session_state first encountered that state. "sessionState": "A String", # Output only. The session_state tracked by this event "stateMessage": "A String", # Output only. A human-readable message to explain the state. }, ], "ttl": "A String", # 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. }, ], "nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. }
list_next()
Retrieves the next page of results. Args: previous_request: The request for the previous page. (required) previous_response: The response from the request for the previous page. (required) Returns: A request object that you can call 'execute()' on to request the next page. Returns None if there are no more items in the collection.
patch(name, body=None, updateMask=None, x__xgafv=None)
PATCH /v1/projects/{projectId}/deviceSessions/deviceSessionId}:updateDeviceSession Updates the current device session to the fields described by the update_mask. Args: name: string, Optional. Name of the DeviceSession, e.g. "projects/{project_id}/deviceSessions/{session_id}" (required) body: object, The request body. The object takes the form of: { # Protobuf message describing the device message, used from several RPCs. "activeStartTime": "A String", # Output only. The timestamp that the session first became ACTIVE. "androidDevice": { # A single Android device. # Required. The requested device "androidModelId": "A String", # Required. The id of the Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options. "androidVersionId": "A String", # Required. The id of the Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options. "locale": "A String", # Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options. "orientation": "A String", # Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options. }, "createTime": "A String", # Output only. The time that the Session was created. "displayName": "A String", # Output only. The title of the DeviceSession to be presented in the UI. "expireTime": "A String", # 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. "inactivityTimeout": "A String", # Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY. "name": "A String", # Optional. Name of the DeviceSession, e.g. "projects/{project_id}/deviceSessions/{session_id}" "state": "A String", # Output only. Current state of the DeviceSession. "stateHistories": [ # Output only. The historical state transitions of the session_state message including the current session state. { # A message encapsulating a series of Session states and the time that the DeviceSession first entered those states. "eventTime": "A String", # Output only. The time that the session_state first encountered that state. "sessionState": "A String", # Output only. The session_state tracked by this event "stateMessage": "A String", # Output only. A human-readable message to explain the state. }, ], "ttl": "A String", # 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. } updateMask: string, Required. The list of fields to update. x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Protobuf message describing the device message, used from several RPCs. "activeStartTime": "A String", # Output only. The timestamp that the session first became ACTIVE. "androidDevice": { # A single Android device. # Required. The requested device "androidModelId": "A String", # Required. The id of the Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options. "androidVersionId": "A String", # Required. The id of the Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options. "locale": "A String", # Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options. "orientation": "A String", # Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options. }, "createTime": "A String", # Output only. The time that the Session was created. "displayName": "A String", # Output only. The title of the DeviceSession to be presented in the UI. "expireTime": "A String", # 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. "inactivityTimeout": "A String", # Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY. "name": "A String", # Optional. Name of the DeviceSession, e.g. "projects/{project_id}/deviceSessions/{session_id}" "state": "A String", # Output only. Current state of the DeviceSession. "stateHistories": [ # Output only. The historical state transitions of the session_state message including the current session state. { # A message encapsulating a series of Session states and the time that the DeviceSession first entered those states. "eventTime": "A String", # Output only. The time that the session_state first encountered that state. "sessionState": "A String", # Output only. The session_state tracked by this event "stateMessage": "A String", # Output only. A human-readable message to explain the state. }, ], "ttl": "A String", # 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. }