{-# 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 #-}
module Amazonka.DeviceFarm.CreateRemoteAccessSession
(
CreateRemoteAccessSession (..),
newCreateRemoteAccessSession,
createRemoteAccessSession_clientId,
createRemoteAccessSession_skipAppResign,
createRemoteAccessSession_instanceArn,
createRemoteAccessSession_remoteRecordEnabled,
createRemoteAccessSession_remoteRecordAppArn,
createRemoteAccessSession_sshPublicKey,
createRemoteAccessSession_name,
createRemoteAccessSession_remoteDebugEnabled,
createRemoteAccessSession_configuration,
createRemoteAccessSession_interactionMode,
createRemoteAccessSession_projectArn,
createRemoteAccessSession_deviceArn,
CreateRemoteAccessSessionResponse (..),
newCreateRemoteAccessSessionResponse,
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
data CreateRemoteAccessSession = CreateRemoteAccessSession'
{
CreateRemoteAccessSession -> Maybe Text
clientId :: Prelude.Maybe Prelude.Text,
CreateRemoteAccessSession -> Maybe Bool
skipAppResign :: Prelude.Maybe Prelude.Bool,
CreateRemoteAccessSession -> Maybe Text
instanceArn :: Prelude.Maybe Prelude.Text,
CreateRemoteAccessSession -> Maybe Bool
remoteRecordEnabled :: Prelude.Maybe Prelude.Bool,
CreateRemoteAccessSession -> Maybe Text
remoteRecordAppArn :: Prelude.Maybe Prelude.Text,
CreateRemoteAccessSession -> Maybe Text
sshPublicKey :: Prelude.Maybe Prelude.Text,
CreateRemoteAccessSession -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CreateRemoteAccessSession -> Maybe Bool
remoteDebugEnabled :: Prelude.Maybe Prelude.Bool,
CreateRemoteAccessSession
-> Maybe CreateRemoteAccessSessionConfiguration
configuration :: Prelude.Maybe CreateRemoteAccessSessionConfiguration,
CreateRemoteAccessSession -> Maybe InteractionMode
interactionMode :: Prelude.Maybe InteractionMode,
CreateRemoteAccessSession -> Text
projectArn :: Prelude.Text,
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)
newCreateRemoteAccessSession ::
Prelude.Text ->
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_
}
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
data CreateRemoteAccessSessionResponse = CreateRemoteAccessSessionResponse'
{
CreateRemoteAccessSessionResponse -> Maybe RemoteAccessSession
remoteAccessSession :: Prelude.Maybe RemoteAccessSession,
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)
newCreateRemoteAccessSessionResponse ::
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_
}
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)
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