{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.DeviceFarm.CreateRemoteAccessSession
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Specifies and starts a remote access session.
module Amazonka.DeviceFarm.CreateRemoteAccessSession
  ( -- * Creating a Request
    CreateRemoteAccessSession (..),
    newCreateRemoteAccessSession,

    -- * Request Lenses
    createRemoteAccessSession_clientId,
    createRemoteAccessSession_configuration,
    createRemoteAccessSession_instanceArn,
    createRemoteAccessSession_interactionMode,
    createRemoteAccessSession_name,
    createRemoteAccessSession_remoteDebugEnabled,
    createRemoteAccessSession_remoteRecordAppArn,
    createRemoteAccessSession_remoteRecordEnabled,
    createRemoteAccessSession_skipAppResign,
    createRemoteAccessSession_sshPublicKey,
    createRemoteAccessSession_projectArn,
    createRemoteAccessSession_deviceArn,

    -- * Destructuring the Response
    CreateRemoteAccessSessionResponse (..),
    newCreateRemoteAccessSessionResponse,

    -- * Response Lenses
    createRemoteAccessSessionResponse_remoteAccessSession,
    createRemoteAccessSessionResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DeviceFarm.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Creates and submits a request to start a remote access session.
--
-- /See:/ 'newCreateRemoteAccessSession' smart constructor.
data CreateRemoteAccessSession = CreateRemoteAccessSession'
  { -- | Unique identifier for the client. If you want access to multiple devices
    -- on the same client, you should pass the same @clientId@ value in each
    -- call to @CreateRemoteAccessSession@. This identifier is required only if
    -- @remoteDebugEnabled@ is set to @true@.
    --
    -- Remote debugging is
    -- <https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html no longer supported>.
    CreateRemoteAccessSession -> Maybe Text
clientId :: Prelude.Maybe Prelude.Text,
    -- | The configuration information for the remote access session request.
    CreateRemoteAccessSession
-> Maybe CreateRemoteAccessSessionConfiguration
configuration :: Prelude.Maybe CreateRemoteAccessSessionConfiguration,
    -- | The Amazon Resource Name (ARN) of the device instance for which you want
    -- to create a remote access session.
    CreateRemoteAccessSession -> Maybe Text
instanceArn :: Prelude.Maybe Prelude.Text,
    -- | The interaction mode of the remote access session. Valid values are:
    --
    -- -   INTERACTIVE: You can interact with the iOS device by viewing,
    --     touching, and rotating the screen. You cannot run XCUITest
    --     framework-based tests in this mode.
    --
    -- -   NO_VIDEO: You are connected to the device, but cannot interact with
    --     it or view the screen. This mode has the fastest test execution
    --     speed. You can run XCUITest framework-based tests in this mode.
    --
    -- -   VIDEO_ONLY: You can view the screen, but cannot touch or rotate it.
    --     You can run XCUITest framework-based tests and watch the screen in
    --     this mode.
    CreateRemoteAccessSession -> Maybe InteractionMode
interactionMode :: Prelude.Maybe InteractionMode,
    -- | The name of the remote access session to create.
    CreateRemoteAccessSession -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Set to @true@ if you want to access devices remotely for debugging in
    -- your remote access session.
    --
    -- Remote debugging is
    -- <https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html no longer supported>.
    CreateRemoteAccessSession -> Maybe Bool
remoteDebugEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Name (ARN) for the app to be recorded in the remote
    -- access session.
    CreateRemoteAccessSession -> Maybe Text
remoteRecordAppArn :: Prelude.Maybe Prelude.Text,
    -- | Set to @true@ to enable remote recording for the remote access session.
    CreateRemoteAccessSession -> Maybe Bool
remoteRecordEnabled :: Prelude.Maybe Prelude.Bool,
    -- | When set to @true@, for private devices, Device Farm does not sign your
    -- app again. For public devices, Device Farm always signs your apps again.
    --
    -- For more information on how Device Farm modifies your uploads during
    -- tests, see
    -- <http://aws.amazon.com/device-farm/faqs/ Do you modify my app?>
    CreateRemoteAccessSession -> Maybe Bool
skipAppResign :: Prelude.Maybe Prelude.Bool,
    -- | Ignored. The public key of the @ssh@ key pair you want to use for
    -- connecting to remote devices in your remote debugging session. This key
    -- is required only if @remoteDebugEnabled@ is set to @true@.
    --
    -- Remote debugging is
    -- <https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html no longer supported>.
    CreateRemoteAccessSession -> Maybe Text
sshPublicKey :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the project for which you want to
    -- create a remote access session.
    CreateRemoteAccessSession -> Text
projectArn :: Prelude.Text,
    -- | The ARN of the device for which you want to create a remote access
    -- session.
    CreateRemoteAccessSession -> Text
deviceArn :: Prelude.Text
  }
  deriving (CreateRemoteAccessSession -> CreateRemoteAccessSession -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRemoteAccessSession -> CreateRemoteAccessSession -> Bool
$c/= :: CreateRemoteAccessSession -> CreateRemoteAccessSession -> Bool
== :: CreateRemoteAccessSession -> CreateRemoteAccessSession -> Bool
$c== :: CreateRemoteAccessSession -> CreateRemoteAccessSession -> Bool
Prelude.Eq, ReadPrec [CreateRemoteAccessSession]
ReadPrec CreateRemoteAccessSession
Int -> ReadS CreateRemoteAccessSession
ReadS [CreateRemoteAccessSession]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRemoteAccessSession]
$creadListPrec :: ReadPrec [CreateRemoteAccessSession]
readPrec :: ReadPrec CreateRemoteAccessSession
$creadPrec :: ReadPrec CreateRemoteAccessSession
readList :: ReadS [CreateRemoteAccessSession]
$creadList :: ReadS [CreateRemoteAccessSession]
readsPrec :: Int -> ReadS CreateRemoteAccessSession
$creadsPrec :: Int -> ReadS CreateRemoteAccessSession
Prelude.Read, Int -> CreateRemoteAccessSession -> ShowS
[CreateRemoteAccessSession] -> ShowS
CreateRemoteAccessSession -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRemoteAccessSession] -> ShowS
$cshowList :: [CreateRemoteAccessSession] -> ShowS
show :: CreateRemoteAccessSession -> String
$cshow :: CreateRemoteAccessSession -> String
showsPrec :: Int -> CreateRemoteAccessSession -> ShowS
$cshowsPrec :: Int -> CreateRemoteAccessSession -> ShowS
Prelude.Show, forall x.
Rep CreateRemoteAccessSession x -> CreateRemoteAccessSession
forall x.
CreateRemoteAccessSession -> Rep CreateRemoteAccessSession x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateRemoteAccessSession x -> CreateRemoteAccessSession
$cfrom :: forall x.
CreateRemoteAccessSession -> Rep CreateRemoteAccessSession x
Prelude.Generic)

-- |
-- Create a value of 'CreateRemoteAccessSession' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'clientId', 'createRemoteAccessSession_clientId' - Unique identifier for the client. If you want access to multiple devices
-- on the same client, you should pass the same @clientId@ value in each
-- call to @CreateRemoteAccessSession@. This identifier is required only if
-- @remoteDebugEnabled@ is set to @true@.
--
-- Remote debugging is
-- <https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html no longer supported>.
--
-- 'configuration', 'createRemoteAccessSession_configuration' - The configuration information for the remote access session request.
--
-- 'instanceArn', 'createRemoteAccessSession_instanceArn' - The Amazon Resource Name (ARN) of the device instance for which you want
-- to create a remote access session.
--
-- 'interactionMode', 'createRemoteAccessSession_interactionMode' - The interaction mode of the remote access session. Valid values are:
--
-- -   INTERACTIVE: You can interact with the iOS device by viewing,
--     touching, and rotating the screen. You cannot run XCUITest
--     framework-based tests in this mode.
--
-- -   NO_VIDEO: You are connected to the device, but cannot interact with
--     it or view the screen. This mode has the fastest test execution
--     speed. You can run XCUITest framework-based tests in this mode.
--
-- -   VIDEO_ONLY: You can view the screen, but cannot touch or rotate it.
--     You can run XCUITest framework-based tests and watch the screen in
--     this mode.
--
-- 'name', 'createRemoteAccessSession_name' - The name of the remote access session to create.
--
-- 'remoteDebugEnabled', 'createRemoteAccessSession_remoteDebugEnabled' - Set to @true@ if you want to access devices remotely for debugging in
-- your remote access session.
--
-- Remote debugging is
-- <https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html no longer supported>.
--
-- 'remoteRecordAppArn', 'createRemoteAccessSession_remoteRecordAppArn' - The Amazon Resource Name (ARN) for the app to be recorded in the remote
-- access session.
--
-- 'remoteRecordEnabled', 'createRemoteAccessSession_remoteRecordEnabled' - Set to @true@ to enable remote recording for the remote access session.
--
-- 'skipAppResign', 'createRemoteAccessSession_skipAppResign' - When set to @true@, for private devices, Device Farm does not sign your
-- app again. For public devices, Device Farm always signs your apps again.
--
-- For more information on how Device Farm modifies your uploads during
-- tests, see
-- <http://aws.amazon.com/device-farm/faqs/ Do you modify my app?>
--
-- 'sshPublicKey', 'createRemoteAccessSession_sshPublicKey' - Ignored. The public key of the @ssh@ key pair you want to use for
-- connecting to remote devices in your remote debugging session. This key
-- is required only if @remoteDebugEnabled@ is set to @true@.
--
-- Remote debugging is
-- <https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html no longer supported>.
--
-- 'projectArn', 'createRemoteAccessSession_projectArn' - The Amazon Resource Name (ARN) of the project for which you want to
-- create a remote access session.
--
-- 'deviceArn', 'createRemoteAccessSession_deviceArn' - The ARN of the device for which you want to create a remote access
-- session.
newCreateRemoteAccessSession ::
  -- | 'projectArn'
  Prelude.Text ->
  -- | 'deviceArn'
  Prelude.Text ->
  CreateRemoteAccessSession
newCreateRemoteAccessSession :: Text -> Text -> CreateRemoteAccessSession
newCreateRemoteAccessSession Text
pProjectArn_ Text
pDeviceArn_ =
  CreateRemoteAccessSession'
    { $sel:clientId:CreateRemoteAccessSession' :: Maybe Text
clientId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:configuration:CreateRemoteAccessSession' :: Maybe CreateRemoteAccessSessionConfiguration
configuration = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceArn:CreateRemoteAccessSession' :: Maybe Text
instanceArn = forall a. Maybe a
Prelude.Nothing,
      $sel:interactionMode:CreateRemoteAccessSession' :: Maybe InteractionMode
interactionMode = forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateRemoteAccessSession' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:remoteDebugEnabled:CreateRemoteAccessSession' :: Maybe Bool
remoteDebugEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:remoteRecordAppArn:CreateRemoteAccessSession' :: Maybe Text
remoteRecordAppArn = forall a. Maybe a
Prelude.Nothing,
      $sel:remoteRecordEnabled:CreateRemoteAccessSession' :: Maybe Bool
remoteRecordEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:skipAppResign:CreateRemoteAccessSession' :: Maybe Bool
skipAppResign = forall a. Maybe a
Prelude.Nothing,
      $sel:sshPublicKey:CreateRemoteAccessSession' :: Maybe Text
sshPublicKey = forall a. Maybe a
Prelude.Nothing,
      $sel:projectArn:CreateRemoteAccessSession' :: Text
projectArn = Text
pProjectArn_,
      $sel:deviceArn:CreateRemoteAccessSession' :: Text
deviceArn = Text
pDeviceArn_
    }

-- | Unique identifier for the client. If you want access to multiple devices
-- on the same client, you should pass the same @clientId@ value in each
-- call to @CreateRemoteAccessSession@. This identifier is required only if
-- @remoteDebugEnabled@ is set to @true@.
--
-- Remote debugging is
-- <https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html no longer supported>.
createRemoteAccessSession_clientId :: Lens.Lens' CreateRemoteAccessSession (Prelude.Maybe Prelude.Text)
createRemoteAccessSession_clientId :: Lens' CreateRemoteAccessSession (Maybe Text)
createRemoteAccessSession_clientId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSession' {Maybe Text
clientId :: Maybe Text
$sel:clientId:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
clientId} -> Maybe Text
clientId) (\s :: CreateRemoteAccessSession
s@CreateRemoteAccessSession' {} Maybe Text
a -> CreateRemoteAccessSession
s {$sel:clientId:CreateRemoteAccessSession' :: Maybe Text
clientId = Maybe Text
a} :: CreateRemoteAccessSession)

-- | The configuration information for the remote access session request.
createRemoteAccessSession_configuration :: Lens.Lens' CreateRemoteAccessSession (Prelude.Maybe CreateRemoteAccessSessionConfiguration)
createRemoteAccessSession_configuration :: Lens'
  CreateRemoteAccessSession
  (Maybe CreateRemoteAccessSessionConfiguration)
createRemoteAccessSession_configuration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSession' {Maybe CreateRemoteAccessSessionConfiguration
configuration :: Maybe CreateRemoteAccessSessionConfiguration
$sel:configuration:CreateRemoteAccessSession' :: CreateRemoteAccessSession
-> Maybe CreateRemoteAccessSessionConfiguration
configuration} -> Maybe CreateRemoteAccessSessionConfiguration
configuration) (\s :: CreateRemoteAccessSession
s@CreateRemoteAccessSession' {} Maybe CreateRemoteAccessSessionConfiguration
a -> CreateRemoteAccessSession
s {$sel:configuration:CreateRemoteAccessSession' :: Maybe CreateRemoteAccessSessionConfiguration
configuration = Maybe CreateRemoteAccessSessionConfiguration
a} :: CreateRemoteAccessSession)

-- | The Amazon Resource Name (ARN) of the device instance for which you want
-- to create a remote access session.
createRemoteAccessSession_instanceArn :: Lens.Lens' CreateRemoteAccessSession (Prelude.Maybe Prelude.Text)
createRemoteAccessSession_instanceArn :: Lens' CreateRemoteAccessSession (Maybe Text)
createRemoteAccessSession_instanceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSession' {Maybe Text
instanceArn :: Maybe Text
$sel:instanceArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
instanceArn} -> Maybe Text
instanceArn) (\s :: CreateRemoteAccessSession
s@CreateRemoteAccessSession' {} Maybe Text
a -> CreateRemoteAccessSession
s {$sel:instanceArn:CreateRemoteAccessSession' :: Maybe Text
instanceArn = Maybe Text
a} :: CreateRemoteAccessSession)

-- | The interaction mode of the remote access session. Valid values are:
--
-- -   INTERACTIVE: You can interact with the iOS device by viewing,
--     touching, and rotating the screen. You cannot run XCUITest
--     framework-based tests in this mode.
--
-- -   NO_VIDEO: You are connected to the device, but cannot interact with
--     it or view the screen. This mode has the fastest test execution
--     speed. You can run XCUITest framework-based tests in this mode.
--
-- -   VIDEO_ONLY: You can view the screen, but cannot touch or rotate it.
--     You can run XCUITest framework-based tests and watch the screen in
--     this mode.
createRemoteAccessSession_interactionMode :: Lens.Lens' CreateRemoteAccessSession (Prelude.Maybe InteractionMode)
createRemoteAccessSession_interactionMode :: Lens' CreateRemoteAccessSession (Maybe InteractionMode)
createRemoteAccessSession_interactionMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSession' {Maybe InteractionMode
interactionMode :: Maybe InteractionMode
$sel:interactionMode:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe InteractionMode
interactionMode} -> Maybe InteractionMode
interactionMode) (\s :: CreateRemoteAccessSession
s@CreateRemoteAccessSession' {} Maybe InteractionMode
a -> CreateRemoteAccessSession
s {$sel:interactionMode:CreateRemoteAccessSession' :: Maybe InteractionMode
interactionMode = Maybe InteractionMode
a} :: CreateRemoteAccessSession)

-- | The name of the remote access session to create.
createRemoteAccessSession_name :: Lens.Lens' CreateRemoteAccessSession (Prelude.Maybe Prelude.Text)
createRemoteAccessSession_name :: Lens' CreateRemoteAccessSession (Maybe Text)
createRemoteAccessSession_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSession' {Maybe Text
name :: Maybe Text
$sel:name:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateRemoteAccessSession
s@CreateRemoteAccessSession' {} Maybe Text
a -> CreateRemoteAccessSession
s {$sel:name:CreateRemoteAccessSession' :: Maybe Text
name = Maybe Text
a} :: CreateRemoteAccessSession)

-- | Set to @true@ if you want to access devices remotely for debugging in
-- your remote access session.
--
-- Remote debugging is
-- <https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html no longer supported>.
createRemoteAccessSession_remoteDebugEnabled :: Lens.Lens' CreateRemoteAccessSession (Prelude.Maybe Prelude.Bool)
createRemoteAccessSession_remoteDebugEnabled :: Lens' CreateRemoteAccessSession (Maybe Bool)
createRemoteAccessSession_remoteDebugEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSession' {Maybe Bool
remoteDebugEnabled :: Maybe Bool
$sel:remoteDebugEnabled:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Bool
remoteDebugEnabled} -> Maybe Bool
remoteDebugEnabled) (\s :: CreateRemoteAccessSession
s@CreateRemoteAccessSession' {} Maybe Bool
a -> CreateRemoteAccessSession
s {$sel:remoteDebugEnabled:CreateRemoteAccessSession' :: Maybe Bool
remoteDebugEnabled = Maybe Bool
a} :: CreateRemoteAccessSession)

-- | The Amazon Resource Name (ARN) for the app to be recorded in the remote
-- access session.
createRemoteAccessSession_remoteRecordAppArn :: Lens.Lens' CreateRemoteAccessSession (Prelude.Maybe Prelude.Text)
createRemoteAccessSession_remoteRecordAppArn :: Lens' CreateRemoteAccessSession (Maybe Text)
createRemoteAccessSession_remoteRecordAppArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSession' {Maybe Text
remoteRecordAppArn :: Maybe Text
$sel:remoteRecordAppArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
remoteRecordAppArn} -> Maybe Text
remoteRecordAppArn) (\s :: CreateRemoteAccessSession
s@CreateRemoteAccessSession' {} Maybe Text
a -> CreateRemoteAccessSession
s {$sel:remoteRecordAppArn:CreateRemoteAccessSession' :: Maybe Text
remoteRecordAppArn = Maybe Text
a} :: CreateRemoteAccessSession)

-- | Set to @true@ to enable remote recording for the remote access session.
createRemoteAccessSession_remoteRecordEnabled :: Lens.Lens' CreateRemoteAccessSession (Prelude.Maybe Prelude.Bool)
createRemoteAccessSession_remoteRecordEnabled :: Lens' CreateRemoteAccessSession (Maybe Bool)
createRemoteAccessSession_remoteRecordEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSession' {Maybe Bool
remoteRecordEnabled :: Maybe Bool
$sel:remoteRecordEnabled:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Bool
remoteRecordEnabled} -> Maybe Bool
remoteRecordEnabled) (\s :: CreateRemoteAccessSession
s@CreateRemoteAccessSession' {} Maybe Bool
a -> CreateRemoteAccessSession
s {$sel:remoteRecordEnabled:CreateRemoteAccessSession' :: Maybe Bool
remoteRecordEnabled = Maybe Bool
a} :: CreateRemoteAccessSession)

-- | When set to @true@, for private devices, Device Farm does not sign your
-- app again. For public devices, Device Farm always signs your apps again.
--
-- For more information on how Device Farm modifies your uploads during
-- tests, see
-- <http://aws.amazon.com/device-farm/faqs/ Do you modify my app?>
createRemoteAccessSession_skipAppResign :: Lens.Lens' CreateRemoteAccessSession (Prelude.Maybe Prelude.Bool)
createRemoteAccessSession_skipAppResign :: Lens' CreateRemoteAccessSession (Maybe Bool)
createRemoteAccessSession_skipAppResign = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSession' {Maybe Bool
skipAppResign :: Maybe Bool
$sel:skipAppResign:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Bool
skipAppResign} -> Maybe Bool
skipAppResign) (\s :: CreateRemoteAccessSession
s@CreateRemoteAccessSession' {} Maybe Bool
a -> CreateRemoteAccessSession
s {$sel:skipAppResign:CreateRemoteAccessSession' :: Maybe Bool
skipAppResign = Maybe Bool
a} :: CreateRemoteAccessSession)

-- | Ignored. The public key of the @ssh@ key pair you want to use for
-- connecting to remote devices in your remote debugging session. This key
-- is required only if @remoteDebugEnabled@ is set to @true@.
--
-- Remote debugging is
-- <https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html no longer supported>.
createRemoteAccessSession_sshPublicKey :: Lens.Lens' CreateRemoteAccessSession (Prelude.Maybe Prelude.Text)
createRemoteAccessSession_sshPublicKey :: Lens' CreateRemoteAccessSession (Maybe Text)
createRemoteAccessSession_sshPublicKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSession' {Maybe Text
sshPublicKey :: Maybe Text
$sel:sshPublicKey:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
sshPublicKey} -> Maybe Text
sshPublicKey) (\s :: CreateRemoteAccessSession
s@CreateRemoteAccessSession' {} Maybe Text
a -> CreateRemoteAccessSession
s {$sel:sshPublicKey:CreateRemoteAccessSession' :: Maybe Text
sshPublicKey = Maybe Text
a} :: CreateRemoteAccessSession)

-- | The Amazon Resource Name (ARN) of the project for which you want to
-- create a remote access session.
createRemoteAccessSession_projectArn :: Lens.Lens' CreateRemoteAccessSession Prelude.Text
createRemoteAccessSession_projectArn :: Lens' CreateRemoteAccessSession Text
createRemoteAccessSession_projectArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSession' {Text
projectArn :: Text
$sel:projectArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Text
projectArn} -> Text
projectArn) (\s :: CreateRemoteAccessSession
s@CreateRemoteAccessSession' {} Text
a -> CreateRemoteAccessSession
s {$sel:projectArn:CreateRemoteAccessSession' :: Text
projectArn = Text
a} :: CreateRemoteAccessSession)

-- | The ARN of the device for which you want to create a remote access
-- session.
createRemoteAccessSession_deviceArn :: Lens.Lens' CreateRemoteAccessSession Prelude.Text
createRemoteAccessSession_deviceArn :: Lens' CreateRemoteAccessSession Text
createRemoteAccessSession_deviceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSession' {Text
deviceArn :: Text
$sel:deviceArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Text
deviceArn} -> Text
deviceArn) (\s :: CreateRemoteAccessSession
s@CreateRemoteAccessSession' {} Text
a -> CreateRemoteAccessSession
s {$sel:deviceArn:CreateRemoteAccessSession' :: Text
deviceArn = Text
a} :: CreateRemoteAccessSession)

instance Core.AWSRequest CreateRemoteAccessSession where
  type
    AWSResponse CreateRemoteAccessSession =
      CreateRemoteAccessSessionResponse
  request :: (Service -> Service)
-> CreateRemoteAccessSession -> Request CreateRemoteAccessSession
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateRemoteAccessSession
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateRemoteAccessSession)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe RemoteAccessSession
-> Int -> CreateRemoteAccessSessionResponse
CreateRemoteAccessSessionResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"remoteAccessSession")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateRemoteAccessSession where
  hashWithSalt :: Int -> CreateRemoteAccessSession -> Int
hashWithSalt Int
_salt CreateRemoteAccessSession' {Maybe Bool
Maybe Text
Maybe CreateRemoteAccessSessionConfiguration
Maybe InteractionMode
Text
deviceArn :: Text
projectArn :: Text
sshPublicKey :: Maybe Text
skipAppResign :: Maybe Bool
remoteRecordEnabled :: Maybe Bool
remoteRecordAppArn :: Maybe Text
remoteDebugEnabled :: Maybe Bool
name :: Maybe Text
interactionMode :: Maybe InteractionMode
instanceArn :: Maybe Text
configuration :: Maybe CreateRemoteAccessSessionConfiguration
clientId :: Maybe Text
$sel:deviceArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Text
$sel:projectArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Text
$sel:sshPublicKey:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
$sel:skipAppResign:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Bool
$sel:remoteRecordEnabled:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Bool
$sel:remoteRecordAppArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
$sel:remoteDebugEnabled:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Bool
$sel:name:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
$sel:interactionMode:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe InteractionMode
$sel:instanceArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
$sel:configuration:CreateRemoteAccessSession' :: CreateRemoteAccessSession
-> Maybe CreateRemoteAccessSessionConfiguration
$sel:clientId:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CreateRemoteAccessSessionConfiguration
configuration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InteractionMode
interactionMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
remoteDebugEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
remoteRecordAppArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
remoteRecordEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
skipAppResign
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sshPublicKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
projectArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
deviceArn

instance Prelude.NFData CreateRemoteAccessSession where
  rnf :: CreateRemoteAccessSession -> ()
rnf CreateRemoteAccessSession' {Maybe Bool
Maybe Text
Maybe CreateRemoteAccessSessionConfiguration
Maybe InteractionMode
Text
deviceArn :: Text
projectArn :: Text
sshPublicKey :: Maybe Text
skipAppResign :: Maybe Bool
remoteRecordEnabled :: Maybe Bool
remoteRecordAppArn :: Maybe Text
remoteDebugEnabled :: Maybe Bool
name :: Maybe Text
interactionMode :: Maybe InteractionMode
instanceArn :: Maybe Text
configuration :: Maybe CreateRemoteAccessSessionConfiguration
clientId :: Maybe Text
$sel:deviceArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Text
$sel:projectArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Text
$sel:sshPublicKey:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
$sel:skipAppResign:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Bool
$sel:remoteRecordEnabled:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Bool
$sel:remoteRecordAppArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
$sel:remoteDebugEnabled:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Bool
$sel:name:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
$sel:interactionMode:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe InteractionMode
$sel:instanceArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
$sel:configuration:CreateRemoteAccessSession' :: CreateRemoteAccessSession
-> Maybe CreateRemoteAccessSessionConfiguration
$sel:clientId:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CreateRemoteAccessSessionConfiguration
configuration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
instanceArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InteractionMode
interactionMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
remoteDebugEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
remoteRecordAppArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
remoteRecordEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
skipAppResign
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sshPublicKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
projectArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
deviceArn

instance Data.ToHeaders CreateRemoteAccessSession where
  toHeaders :: CreateRemoteAccessSession -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"DeviceFarm_20150623.CreateRemoteAccessSession" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON CreateRemoteAccessSession where
  toJSON :: CreateRemoteAccessSession -> Value
toJSON CreateRemoteAccessSession' {Maybe Bool
Maybe Text
Maybe CreateRemoteAccessSessionConfiguration
Maybe InteractionMode
Text
deviceArn :: Text
projectArn :: Text
sshPublicKey :: Maybe Text
skipAppResign :: Maybe Bool
remoteRecordEnabled :: Maybe Bool
remoteRecordAppArn :: Maybe Text
remoteDebugEnabled :: Maybe Bool
name :: Maybe Text
interactionMode :: Maybe InteractionMode
instanceArn :: Maybe Text
configuration :: Maybe CreateRemoteAccessSessionConfiguration
clientId :: Maybe Text
$sel:deviceArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Text
$sel:projectArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Text
$sel:sshPublicKey:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
$sel:skipAppResign:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Bool
$sel:remoteRecordEnabled:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Bool
$sel:remoteRecordAppArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
$sel:remoteDebugEnabled:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Bool
$sel:name:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
$sel:interactionMode:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe InteractionMode
$sel:instanceArn:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
$sel:configuration:CreateRemoteAccessSession' :: CreateRemoteAccessSession
-> Maybe CreateRemoteAccessSessionConfiguration
$sel:clientId:CreateRemoteAccessSession' :: CreateRemoteAccessSession -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"clientId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientId,
            (Key
"configuration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CreateRemoteAccessSessionConfiguration
configuration,
            (Key
"instanceArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
instanceArn,
            (Key
"interactionMode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InteractionMode
interactionMode,
            (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            (Key
"remoteDebugEnabled" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
remoteDebugEnabled,
            (Key
"remoteRecordAppArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
remoteRecordAppArn,
            (Key
"remoteRecordEnabled" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
remoteRecordEnabled,
            (Key
"skipAppResign" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
skipAppResign,
            (Key
"sshPublicKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sshPublicKey,
            forall a. a -> Maybe a
Prelude.Just (Key
"projectArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
projectArn),
            forall a. a -> Maybe a
Prelude.Just (Key
"deviceArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
deviceArn)
          ]
      )

instance Data.ToPath CreateRemoteAccessSession where
  toPath :: CreateRemoteAccessSession -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery CreateRemoteAccessSession where
  toQuery :: CreateRemoteAccessSession -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | Represents the server response from a request to create a remote access
-- session.
--
-- /See:/ 'newCreateRemoteAccessSessionResponse' smart constructor.
data CreateRemoteAccessSessionResponse = CreateRemoteAccessSessionResponse'
  { -- | A container that describes the remote access session when the request to
    -- create a remote access session is sent.
    CreateRemoteAccessSessionResponse -> Maybe RemoteAccessSession
remoteAccessSession :: Prelude.Maybe RemoteAccessSession,
    -- | The response's http status code.
    CreateRemoteAccessSessionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateRemoteAccessSessionResponse
-> CreateRemoteAccessSessionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRemoteAccessSessionResponse
-> CreateRemoteAccessSessionResponse -> Bool
$c/= :: CreateRemoteAccessSessionResponse
-> CreateRemoteAccessSessionResponse -> Bool
== :: CreateRemoteAccessSessionResponse
-> CreateRemoteAccessSessionResponse -> Bool
$c== :: CreateRemoteAccessSessionResponse
-> CreateRemoteAccessSessionResponse -> Bool
Prelude.Eq, ReadPrec [CreateRemoteAccessSessionResponse]
ReadPrec CreateRemoteAccessSessionResponse
Int -> ReadS CreateRemoteAccessSessionResponse
ReadS [CreateRemoteAccessSessionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRemoteAccessSessionResponse]
$creadListPrec :: ReadPrec [CreateRemoteAccessSessionResponse]
readPrec :: ReadPrec CreateRemoteAccessSessionResponse
$creadPrec :: ReadPrec CreateRemoteAccessSessionResponse
readList :: ReadS [CreateRemoteAccessSessionResponse]
$creadList :: ReadS [CreateRemoteAccessSessionResponse]
readsPrec :: Int -> ReadS CreateRemoteAccessSessionResponse
$creadsPrec :: Int -> ReadS CreateRemoteAccessSessionResponse
Prelude.Read, Int -> CreateRemoteAccessSessionResponse -> ShowS
[CreateRemoteAccessSessionResponse] -> ShowS
CreateRemoteAccessSessionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRemoteAccessSessionResponse] -> ShowS
$cshowList :: [CreateRemoteAccessSessionResponse] -> ShowS
show :: CreateRemoteAccessSessionResponse -> String
$cshow :: CreateRemoteAccessSessionResponse -> String
showsPrec :: Int -> CreateRemoteAccessSessionResponse -> ShowS
$cshowsPrec :: Int -> CreateRemoteAccessSessionResponse -> ShowS
Prelude.Show, forall x.
Rep CreateRemoteAccessSessionResponse x
-> CreateRemoteAccessSessionResponse
forall x.
CreateRemoteAccessSessionResponse
-> Rep CreateRemoteAccessSessionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateRemoteAccessSessionResponse x
-> CreateRemoteAccessSessionResponse
$cfrom :: forall x.
CreateRemoteAccessSessionResponse
-> Rep CreateRemoteAccessSessionResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateRemoteAccessSessionResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'remoteAccessSession', 'createRemoteAccessSessionResponse_remoteAccessSession' - A container that describes the remote access session when the request to
-- create a remote access session is sent.
--
-- 'httpStatus', 'createRemoteAccessSessionResponse_httpStatus' - The response's http status code.
newCreateRemoteAccessSessionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateRemoteAccessSessionResponse
newCreateRemoteAccessSessionResponse :: Int -> CreateRemoteAccessSessionResponse
newCreateRemoteAccessSessionResponse Int
pHttpStatus_ =
  CreateRemoteAccessSessionResponse'
    { $sel:remoteAccessSession:CreateRemoteAccessSessionResponse' :: Maybe RemoteAccessSession
remoteAccessSession =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateRemoteAccessSessionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A container that describes the remote access session when the request to
-- create a remote access session is sent.
createRemoteAccessSessionResponse_remoteAccessSession :: Lens.Lens' CreateRemoteAccessSessionResponse (Prelude.Maybe RemoteAccessSession)
createRemoteAccessSessionResponse_remoteAccessSession :: Lens' CreateRemoteAccessSessionResponse (Maybe RemoteAccessSession)
createRemoteAccessSessionResponse_remoteAccessSession = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSessionResponse' {Maybe RemoteAccessSession
remoteAccessSession :: Maybe RemoteAccessSession
$sel:remoteAccessSession:CreateRemoteAccessSessionResponse' :: CreateRemoteAccessSessionResponse -> Maybe RemoteAccessSession
remoteAccessSession} -> Maybe RemoteAccessSession
remoteAccessSession) (\s :: CreateRemoteAccessSessionResponse
s@CreateRemoteAccessSessionResponse' {} Maybe RemoteAccessSession
a -> CreateRemoteAccessSessionResponse
s {$sel:remoteAccessSession:CreateRemoteAccessSessionResponse' :: Maybe RemoteAccessSession
remoteAccessSession = Maybe RemoteAccessSession
a} :: CreateRemoteAccessSessionResponse)

-- | The response's http status code.
createRemoteAccessSessionResponse_httpStatus :: Lens.Lens' CreateRemoteAccessSessionResponse Prelude.Int
createRemoteAccessSessionResponse_httpStatus :: Lens' CreateRemoteAccessSessionResponse Int
createRemoteAccessSessionResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRemoteAccessSessionResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateRemoteAccessSessionResponse' :: CreateRemoteAccessSessionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateRemoteAccessSessionResponse
s@CreateRemoteAccessSessionResponse' {} Int
a -> CreateRemoteAccessSessionResponse
s {$sel:httpStatus:CreateRemoteAccessSessionResponse' :: Int
httpStatus = Int
a} :: CreateRemoteAccessSessionResponse)

instance
  Prelude.NFData
    CreateRemoteAccessSessionResponse
  where
  rnf :: CreateRemoteAccessSessionResponse -> ()
rnf CreateRemoteAccessSessionResponse' {Int
Maybe RemoteAccessSession
httpStatus :: Int
remoteAccessSession :: Maybe RemoteAccessSession
$sel:httpStatus:CreateRemoteAccessSessionResponse' :: CreateRemoteAccessSessionResponse -> Int
$sel:remoteAccessSession:CreateRemoteAccessSessionResponse' :: CreateRemoteAccessSessionResponse -> Maybe RemoteAccessSession
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe RemoteAccessSession
remoteAccessSession
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus