{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- 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_skipAppResign,
    createRemoteAccessSession_instanceArn,
    createRemoteAccessSession_remoteRecordEnabled,
    createRemoteAccessSession_remoteRecordAppArn,
    createRemoteAccessSession_sshPublicKey,
    createRemoteAccessSession_name,
    createRemoteAccessSession_remoteDebugEnabled,
    createRemoteAccessSession_configuration,
    createRemoteAccessSession_interactionMode,
    createRemoteAccessSession_projectArn,
    createRemoteAccessSession_deviceArn,

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

    -- * Response Lenses
    createRemoteAccessSessionResponse_remoteAccessSession,
    createRemoteAccessSessionResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DeviceFarm.Types
import qualified Amazonka.Lens as Lens
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,
    -- | 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
    -- <https://aws.amazon.com/device-farm/faq/ Do you modify my app?>
    CreateRemoteAccessSession -> Maybe Bool
skipAppResign :: Prelude.Maybe Prelude.Bool,
    -- | 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,
    -- | Set to @true@ to enable remote recording for the remote access session.
    CreateRemoteAccessSession -> Maybe Bool
remoteRecordEnabled :: 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,
    -- | 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 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 configuration information for the remote access session request.
    CreateRemoteAccessSession
-> Maybe CreateRemoteAccessSessionConfiguration
configuration :: Prelude.Maybe CreateRemoteAccessSessionConfiguration,
    -- | 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 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
(CreateRemoteAccessSession -> CreateRemoteAccessSession -> Bool)
-> (CreateRemoteAccessSession -> CreateRemoteAccessSession -> Bool)
-> Eq CreateRemoteAccessSession
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]
(Int -> ReadS CreateRemoteAccessSession)
-> ReadS [CreateRemoteAccessSession]
-> ReadPrec CreateRemoteAccessSession
-> ReadPrec [CreateRemoteAccessSession]
-> Read 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
(Int -> CreateRemoteAccessSession -> ShowS)
-> (CreateRemoteAccessSession -> String)
-> ([CreateRemoteAccessSession] -> ShowS)
-> Show CreateRemoteAccessSession
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.
 CreateRemoteAccessSession -> Rep CreateRemoteAccessSession x)
-> (forall x.
    Rep CreateRemoteAccessSession x -> CreateRemoteAccessSession)
-> Generic CreateRemoteAccessSession
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>.
--
-- '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
-- <https://aws.amazon.com/device-farm/faq/ Do you modify my app?>
--
-- 'instanceArn', 'createRemoteAccessSession_instanceArn' - The Amazon Resource Name (ARN) of the device instance for which you want
-- to create a remote access session.
--
-- 'remoteRecordEnabled', 'createRemoteAccessSession_remoteRecordEnabled' - Set to @true@ to enable remote recording for the remote access session.
--
-- 'remoteRecordAppArn', 'createRemoteAccessSession_remoteRecordAppArn' - The Amazon Resource Name (ARN) for the app to be recorded in the remote
-- access session.
--
-- '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>.
--
-- '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>.
--
-- 'configuration', 'createRemoteAccessSession_configuration' - The configuration information for the remote access session request.
--
-- '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.
--
-- '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' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe CreateRemoteAccessSessionConfiguration
-> Maybe InteractionMode
-> Text
-> Text
-> CreateRemoteAccessSession
CreateRemoteAccessSession'
    { $sel:clientId:CreateRemoteAccessSession' :: Maybe Text
clientId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:skipAppResign:CreateRemoteAccessSession' :: Maybe Bool
skipAppResign = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceArn:CreateRemoteAccessSession' :: Maybe Text
instanceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:remoteRecordEnabled:CreateRemoteAccessSession' :: Maybe Bool
remoteRecordEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:remoteRecordAppArn:CreateRemoteAccessSession' :: Maybe Text
remoteRecordAppArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sshPublicKey:CreateRemoteAccessSession' :: Maybe Text
sshPublicKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateRemoteAccessSession' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:remoteDebugEnabled:CreateRemoteAccessSession' :: Maybe Bool
remoteDebugEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:configuration:CreateRemoteAccessSession' :: Maybe CreateRemoteAccessSessionConfiguration
configuration = Maybe CreateRemoteAccessSessionConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:interactionMode:CreateRemoteAccessSession' :: Maybe InteractionMode
interactionMode = Maybe InteractionMode
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 :: (Maybe Text -> f (Maybe Text))
-> CreateRemoteAccessSession -> f CreateRemoteAccessSession
createRemoteAccessSession_clientId = (CreateRemoteAccessSession -> Maybe Text)
-> (CreateRemoteAccessSession
    -> Maybe Text -> CreateRemoteAccessSession)
-> Lens
     CreateRemoteAccessSession
     CreateRemoteAccessSession
     (Maybe Text)
     (Maybe Text)
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)

-- | 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
-- <https://aws.amazon.com/device-farm/faq/ Do you modify my app?>
createRemoteAccessSession_skipAppResign :: Lens.Lens' CreateRemoteAccessSession (Prelude.Maybe Prelude.Bool)
createRemoteAccessSession_skipAppResign :: (Maybe Bool -> f (Maybe Bool))
-> CreateRemoteAccessSession -> f CreateRemoteAccessSession
createRemoteAccessSession_skipAppResign = (CreateRemoteAccessSession -> Maybe Bool)
-> (CreateRemoteAccessSession
    -> Maybe Bool -> CreateRemoteAccessSession)
-> Lens
     CreateRemoteAccessSession
     CreateRemoteAccessSession
     (Maybe Bool)
     (Maybe Bool)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> CreateRemoteAccessSession -> f CreateRemoteAccessSession
createRemoteAccessSession_instanceArn = (CreateRemoteAccessSession -> Maybe Text)
-> (CreateRemoteAccessSession
    -> Maybe Text -> CreateRemoteAccessSession)
-> Lens
     CreateRemoteAccessSession
     CreateRemoteAccessSession
     (Maybe Text)
     (Maybe Text)
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)

-- | Set to @true@ to enable remote recording for the remote access session.
createRemoteAccessSession_remoteRecordEnabled :: Lens.Lens' CreateRemoteAccessSession (Prelude.Maybe Prelude.Bool)
createRemoteAccessSession_remoteRecordEnabled :: (Maybe Bool -> f (Maybe Bool))
-> CreateRemoteAccessSession -> f CreateRemoteAccessSession
createRemoteAccessSession_remoteRecordEnabled = (CreateRemoteAccessSession -> Maybe Bool)
-> (CreateRemoteAccessSession
    -> Maybe Bool -> CreateRemoteAccessSession)
-> Lens
     CreateRemoteAccessSession
     CreateRemoteAccessSession
     (Maybe Bool)
     (Maybe Bool)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> CreateRemoteAccessSession -> f CreateRemoteAccessSession
createRemoteAccessSession_remoteRecordAppArn = (CreateRemoteAccessSession -> Maybe Text)
-> (CreateRemoteAccessSession
    -> Maybe Text -> CreateRemoteAccessSession)
-> Lens
     CreateRemoteAccessSession
     CreateRemoteAccessSession
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> CreateRemoteAccessSession -> f CreateRemoteAccessSession
createRemoteAccessSession_sshPublicKey = (CreateRemoteAccessSession -> Maybe Text)
-> (CreateRemoteAccessSession
    -> Maybe Text -> CreateRemoteAccessSession)
-> Lens
     CreateRemoteAccessSession
     CreateRemoteAccessSession
     (Maybe Text)
     (Maybe Text)
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 name of the remote access session to create.
createRemoteAccessSession_name :: Lens.Lens' CreateRemoteAccessSession (Prelude.Maybe Prelude.Text)
createRemoteAccessSession_name :: (Maybe Text -> f (Maybe Text))
-> CreateRemoteAccessSession -> f CreateRemoteAccessSession
createRemoteAccessSession_name = (CreateRemoteAccessSession -> Maybe Text)
-> (CreateRemoteAccessSession
    -> Maybe Text -> CreateRemoteAccessSession)
-> Lens
     CreateRemoteAccessSession
     CreateRemoteAccessSession
     (Maybe Text)
     (Maybe Text)
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 :: (Maybe Bool -> f (Maybe Bool))
-> CreateRemoteAccessSession -> f CreateRemoteAccessSession
createRemoteAccessSession_remoteDebugEnabled = (CreateRemoteAccessSession -> Maybe Bool)
-> (CreateRemoteAccessSession
    -> Maybe Bool -> CreateRemoteAccessSession)
-> Lens
     CreateRemoteAccessSession
     CreateRemoteAccessSession
     (Maybe Bool)
     (Maybe Bool)
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 configuration information for the remote access session request.
createRemoteAccessSession_configuration :: Lens.Lens' CreateRemoteAccessSession (Prelude.Maybe CreateRemoteAccessSessionConfiguration)
createRemoteAccessSession_configuration :: (Maybe CreateRemoteAccessSessionConfiguration
 -> f (Maybe CreateRemoteAccessSessionConfiguration))
-> CreateRemoteAccessSession -> f CreateRemoteAccessSession
createRemoteAccessSession_configuration = (CreateRemoteAccessSession
 -> Maybe CreateRemoteAccessSessionConfiguration)
-> (CreateRemoteAccessSession
    -> Maybe CreateRemoteAccessSessionConfiguration
    -> CreateRemoteAccessSession)
-> Lens
     CreateRemoteAccessSession
     CreateRemoteAccessSession
     (Maybe CreateRemoteAccessSessionConfiguration)
     (Maybe CreateRemoteAccessSessionConfiguration)
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 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 :: (Maybe InteractionMode -> f (Maybe InteractionMode))
-> CreateRemoteAccessSession -> f CreateRemoteAccessSession
createRemoteAccessSession_interactionMode = (CreateRemoteAccessSession -> Maybe InteractionMode)
-> (CreateRemoteAccessSession
    -> Maybe InteractionMode -> CreateRemoteAccessSession)
-> Lens
     CreateRemoteAccessSession
     CreateRemoteAccessSession
     (Maybe InteractionMode)
     (Maybe 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 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 :: (Text -> f Text)
-> CreateRemoteAccessSession -> f CreateRemoteAccessSession
createRemoteAccessSession_projectArn = (CreateRemoteAccessSession -> Text)
-> (CreateRemoteAccessSession -> Text -> CreateRemoteAccessSession)
-> Lens
     CreateRemoteAccessSession CreateRemoteAccessSession Text Text
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 :: (Text -> f Text)
-> CreateRemoteAccessSession -> f CreateRemoteAccessSession
createRemoteAccessSession_deviceArn = (CreateRemoteAccessSession -> Text)
-> (CreateRemoteAccessSession -> Text -> CreateRemoteAccessSession)
-> Lens
     CreateRemoteAccessSession CreateRemoteAccessSession Text Text
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 :: CreateRemoteAccessSession -> Request CreateRemoteAccessSession
request = Service
-> CreateRemoteAccessSession -> Request CreateRemoteAccessSession
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateRemoteAccessSession
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateRemoteAccessSession)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateRemoteAccessSession))
-> Logger
-> Service
-> Proxy CreateRemoteAccessSession
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateRemoteAccessSession)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe RemoteAccessSession
-> Int -> CreateRemoteAccessSessionResponse
CreateRemoteAccessSessionResponse'
            (Maybe RemoteAccessSession
 -> Int -> CreateRemoteAccessSessionResponse)
-> Either String (Maybe RemoteAccessSession)
-> Either String (Int -> CreateRemoteAccessSessionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe RemoteAccessSession)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"remoteAccessSession")
            Either String (Int -> CreateRemoteAccessSessionResponse)
-> Either String Int
-> Either String CreateRemoteAccessSessionResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateRemoteAccessSession

instance Prelude.NFData CreateRemoteAccessSession

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

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

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

instance Core.ToQuery CreateRemoteAccessSession where
  toQuery :: CreateRemoteAccessSession -> QueryString
toQuery = QueryString -> CreateRemoteAccessSession -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(CreateRemoteAccessSessionResponse
 -> CreateRemoteAccessSessionResponse -> Bool)
-> (CreateRemoteAccessSessionResponse
    -> CreateRemoteAccessSessionResponse -> Bool)
-> Eq CreateRemoteAccessSessionResponse
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]
(Int -> ReadS CreateRemoteAccessSessionResponse)
-> ReadS [CreateRemoteAccessSessionResponse]
-> ReadPrec CreateRemoteAccessSessionResponse
-> ReadPrec [CreateRemoteAccessSessionResponse]
-> Read 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
(Int -> CreateRemoteAccessSessionResponse -> ShowS)
-> (CreateRemoteAccessSessionResponse -> String)
-> ([CreateRemoteAccessSessionResponse] -> ShowS)
-> Show CreateRemoteAccessSessionResponse
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.
 CreateRemoteAccessSessionResponse
 -> Rep CreateRemoteAccessSessionResponse x)
-> (forall x.
    Rep CreateRemoteAccessSessionResponse x
    -> CreateRemoteAccessSessionResponse)
-> Generic CreateRemoteAccessSessionResponse
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' :: Maybe RemoteAccessSession
-> Int -> CreateRemoteAccessSessionResponse
CreateRemoteAccessSessionResponse'
    { $sel:remoteAccessSession:CreateRemoteAccessSessionResponse' :: Maybe RemoteAccessSession
remoteAccessSession =
        Maybe 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 :: (Maybe RemoteAccessSession -> f (Maybe RemoteAccessSession))
-> CreateRemoteAccessSessionResponse
-> f CreateRemoteAccessSessionResponse
createRemoteAccessSessionResponse_remoteAccessSession = (CreateRemoteAccessSessionResponse -> Maybe RemoteAccessSession)
-> (CreateRemoteAccessSessionResponse
    -> Maybe RemoteAccessSession -> CreateRemoteAccessSessionResponse)
-> Lens
     CreateRemoteAccessSessionResponse
     CreateRemoteAccessSessionResponse
     (Maybe RemoteAccessSession)
     (Maybe 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 :: (Int -> f Int)
-> CreateRemoteAccessSessionResponse
-> f CreateRemoteAccessSessionResponse
createRemoteAccessSessionResponse_httpStatus = (CreateRemoteAccessSessionResponse -> Int)
-> (CreateRemoteAccessSessionResponse
    -> Int -> CreateRemoteAccessSessionResponse)
-> Lens
     CreateRemoteAccessSessionResponse
     CreateRemoteAccessSessionResponse
     Int
     Int
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