{-# 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.SSOOIDC.StartDeviceAuthorization
(
StartDeviceAuthorization (..),
newStartDeviceAuthorization,
startDeviceAuthorization_clientId,
startDeviceAuthorization_clientSecret,
startDeviceAuthorization_startUrl,
StartDeviceAuthorizationResponse (..),
newStartDeviceAuthorizationResponse,
startDeviceAuthorizationResponse_userCode,
startDeviceAuthorizationResponse_interval,
startDeviceAuthorizationResponse_expiresIn,
startDeviceAuthorizationResponse_verificationUri,
startDeviceAuthorizationResponse_deviceCode,
startDeviceAuthorizationResponse_verificationUriComplete,
startDeviceAuthorizationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SSOOIDC.Types
data StartDeviceAuthorization = StartDeviceAuthorization'
{
StartDeviceAuthorization -> Text
clientId :: Prelude.Text,
StartDeviceAuthorization -> Text
clientSecret :: Prelude.Text,
StartDeviceAuthorization -> Text
startUrl :: Prelude.Text
}
deriving (StartDeviceAuthorization -> StartDeviceAuthorization -> Bool
(StartDeviceAuthorization -> StartDeviceAuthorization -> Bool)
-> (StartDeviceAuthorization -> StartDeviceAuthorization -> Bool)
-> Eq StartDeviceAuthorization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartDeviceAuthorization -> StartDeviceAuthorization -> Bool
$c/= :: StartDeviceAuthorization -> StartDeviceAuthorization -> Bool
== :: StartDeviceAuthorization -> StartDeviceAuthorization -> Bool
$c== :: StartDeviceAuthorization -> StartDeviceAuthorization -> Bool
Prelude.Eq, ReadPrec [StartDeviceAuthorization]
ReadPrec StartDeviceAuthorization
Int -> ReadS StartDeviceAuthorization
ReadS [StartDeviceAuthorization]
(Int -> ReadS StartDeviceAuthorization)
-> ReadS [StartDeviceAuthorization]
-> ReadPrec StartDeviceAuthorization
-> ReadPrec [StartDeviceAuthorization]
-> Read StartDeviceAuthorization
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartDeviceAuthorization]
$creadListPrec :: ReadPrec [StartDeviceAuthorization]
readPrec :: ReadPrec StartDeviceAuthorization
$creadPrec :: ReadPrec StartDeviceAuthorization
readList :: ReadS [StartDeviceAuthorization]
$creadList :: ReadS [StartDeviceAuthorization]
readsPrec :: Int -> ReadS StartDeviceAuthorization
$creadsPrec :: Int -> ReadS StartDeviceAuthorization
Prelude.Read, Int -> StartDeviceAuthorization -> ShowS
[StartDeviceAuthorization] -> ShowS
StartDeviceAuthorization -> String
(Int -> StartDeviceAuthorization -> ShowS)
-> (StartDeviceAuthorization -> String)
-> ([StartDeviceAuthorization] -> ShowS)
-> Show StartDeviceAuthorization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartDeviceAuthorization] -> ShowS
$cshowList :: [StartDeviceAuthorization] -> ShowS
show :: StartDeviceAuthorization -> String
$cshow :: StartDeviceAuthorization -> String
showsPrec :: Int -> StartDeviceAuthorization -> ShowS
$cshowsPrec :: Int -> StartDeviceAuthorization -> ShowS
Prelude.Show, (forall x.
StartDeviceAuthorization -> Rep StartDeviceAuthorization x)
-> (forall x.
Rep StartDeviceAuthorization x -> StartDeviceAuthorization)
-> Generic StartDeviceAuthorization
forall x.
Rep StartDeviceAuthorization x -> StartDeviceAuthorization
forall x.
StartDeviceAuthorization -> Rep StartDeviceAuthorization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartDeviceAuthorization x -> StartDeviceAuthorization
$cfrom :: forall x.
StartDeviceAuthorization -> Rep StartDeviceAuthorization x
Prelude.Generic)
newStartDeviceAuthorization ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
StartDeviceAuthorization
newStartDeviceAuthorization :: Text -> Text -> Text -> StartDeviceAuthorization
newStartDeviceAuthorization
Text
pClientId_
Text
pClientSecret_
Text
pStartUrl_ =
StartDeviceAuthorization' :: Text -> Text -> Text -> StartDeviceAuthorization
StartDeviceAuthorization'
{ $sel:clientId:StartDeviceAuthorization' :: Text
clientId = Text
pClientId_,
$sel:clientSecret:StartDeviceAuthorization' :: Text
clientSecret = Text
pClientSecret_,
$sel:startUrl:StartDeviceAuthorization' :: Text
startUrl = Text
pStartUrl_
}
startDeviceAuthorization_clientId :: Lens.Lens' StartDeviceAuthorization Prelude.Text
startDeviceAuthorization_clientId :: (Text -> f Text)
-> StartDeviceAuthorization -> f StartDeviceAuthorization
startDeviceAuthorization_clientId = (StartDeviceAuthorization -> Text)
-> (StartDeviceAuthorization -> Text -> StartDeviceAuthorization)
-> Lens StartDeviceAuthorization StartDeviceAuthorization Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDeviceAuthorization' {Text
clientId :: Text
$sel:clientId:StartDeviceAuthorization' :: StartDeviceAuthorization -> Text
clientId} -> Text
clientId) (\s :: StartDeviceAuthorization
s@StartDeviceAuthorization' {} Text
a -> StartDeviceAuthorization
s {$sel:clientId:StartDeviceAuthorization' :: Text
clientId = Text
a} :: StartDeviceAuthorization)
startDeviceAuthorization_clientSecret :: Lens.Lens' StartDeviceAuthorization Prelude.Text
startDeviceAuthorization_clientSecret :: (Text -> f Text)
-> StartDeviceAuthorization -> f StartDeviceAuthorization
startDeviceAuthorization_clientSecret = (StartDeviceAuthorization -> Text)
-> (StartDeviceAuthorization -> Text -> StartDeviceAuthorization)
-> Lens StartDeviceAuthorization StartDeviceAuthorization Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDeviceAuthorization' {Text
clientSecret :: Text
$sel:clientSecret:StartDeviceAuthorization' :: StartDeviceAuthorization -> Text
clientSecret} -> Text
clientSecret) (\s :: StartDeviceAuthorization
s@StartDeviceAuthorization' {} Text
a -> StartDeviceAuthorization
s {$sel:clientSecret:StartDeviceAuthorization' :: Text
clientSecret = Text
a} :: StartDeviceAuthorization)
startDeviceAuthorization_startUrl :: Lens.Lens' StartDeviceAuthorization Prelude.Text
startDeviceAuthorization_startUrl :: (Text -> f Text)
-> StartDeviceAuthorization -> f StartDeviceAuthorization
startDeviceAuthorization_startUrl = (StartDeviceAuthorization -> Text)
-> (StartDeviceAuthorization -> Text -> StartDeviceAuthorization)
-> Lens StartDeviceAuthorization StartDeviceAuthorization Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDeviceAuthorization' {Text
startUrl :: Text
$sel:startUrl:StartDeviceAuthorization' :: StartDeviceAuthorization -> Text
startUrl} -> Text
startUrl) (\s :: StartDeviceAuthorization
s@StartDeviceAuthorization' {} Text
a -> StartDeviceAuthorization
s {$sel:startUrl:StartDeviceAuthorization' :: Text
startUrl = Text
a} :: StartDeviceAuthorization)
instance Core.AWSRequest StartDeviceAuthorization where
type
AWSResponse StartDeviceAuthorization =
StartDeviceAuthorizationResponse
request :: StartDeviceAuthorization -> Request StartDeviceAuthorization
request = Service
-> StartDeviceAuthorization -> Request StartDeviceAuthorization
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StartDeviceAuthorization
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartDeviceAuthorization)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse StartDeviceAuthorization))
-> Logger
-> Service
-> Proxy StartDeviceAuthorization
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartDeviceAuthorization)))
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 Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> StartDeviceAuthorizationResponse
StartDeviceAuthorizationResponse'
(Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> StartDeviceAuthorizationResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> StartDeviceAuthorizationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"userCode")
Either
String
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> StartDeviceAuthorizationResponse)
-> Either String (Maybe Int)
-> Either
String
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> StartDeviceAuthorizationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"interval")
Either
String
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> StartDeviceAuthorizationResponse)
-> Either String (Maybe Int)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> StartDeviceAuthorizationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"expiresIn")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> StartDeviceAuthorizationResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text -> Int -> StartDeviceAuthorizationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"verificationUri")
Either
String
(Maybe Text
-> Maybe Text -> Int -> StartDeviceAuthorizationResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Int -> StartDeviceAuthorizationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"deviceCode")
Either
String (Maybe Text -> Int -> StartDeviceAuthorizationResponse)
-> Either String (Maybe Text)
-> Either String (Int -> StartDeviceAuthorizationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"verificationUriComplete")
Either String (Int -> StartDeviceAuthorizationResponse)
-> Either String Int
-> Either String StartDeviceAuthorizationResponse
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 StartDeviceAuthorization
instance Prelude.NFData StartDeviceAuthorization
instance Core.ToHeaders StartDeviceAuthorization where
toHeaders :: StartDeviceAuthorization -> ResponseHeaders
toHeaders =
ResponseHeaders -> StartDeviceAuthorization -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 StartDeviceAuthorization where
toJSON :: StartDeviceAuthorization -> Value
toJSON StartDeviceAuthorization' {Text
startUrl :: Text
clientSecret :: Text
clientId :: Text
$sel:startUrl:StartDeviceAuthorization' :: StartDeviceAuthorization -> Text
$sel:clientSecret:StartDeviceAuthorization' :: StartDeviceAuthorization -> Text
$sel:clientId:StartDeviceAuthorization' :: StartDeviceAuthorization -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"clientId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"clientSecret" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientSecret),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"startUrl" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
startUrl)
]
)
instance Core.ToPath StartDeviceAuthorization where
toPath :: StartDeviceAuthorization -> ByteString
toPath = ByteString -> StartDeviceAuthorization -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/device_authorization"
instance Core.ToQuery StartDeviceAuthorization where
toQuery :: StartDeviceAuthorization -> QueryString
toQuery = QueryString -> StartDeviceAuthorization -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StartDeviceAuthorizationResponse = StartDeviceAuthorizationResponse'
{
StartDeviceAuthorizationResponse -> Maybe Text
userCode :: Prelude.Maybe Prelude.Text,
StartDeviceAuthorizationResponse -> Maybe Int
interval :: Prelude.Maybe Prelude.Int,
StartDeviceAuthorizationResponse -> Maybe Int
expiresIn :: Prelude.Maybe Prelude.Int,
StartDeviceAuthorizationResponse -> Maybe Text
verificationUri :: Prelude.Maybe Prelude.Text,
StartDeviceAuthorizationResponse -> Maybe Text
deviceCode :: Prelude.Maybe Prelude.Text,
StartDeviceAuthorizationResponse -> Maybe Text
verificationUriComplete :: Prelude.Maybe Prelude.Text,
StartDeviceAuthorizationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartDeviceAuthorizationResponse
-> StartDeviceAuthorizationResponse -> Bool
(StartDeviceAuthorizationResponse
-> StartDeviceAuthorizationResponse -> Bool)
-> (StartDeviceAuthorizationResponse
-> StartDeviceAuthorizationResponse -> Bool)
-> Eq StartDeviceAuthorizationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartDeviceAuthorizationResponse
-> StartDeviceAuthorizationResponse -> Bool
$c/= :: StartDeviceAuthorizationResponse
-> StartDeviceAuthorizationResponse -> Bool
== :: StartDeviceAuthorizationResponse
-> StartDeviceAuthorizationResponse -> Bool
$c== :: StartDeviceAuthorizationResponse
-> StartDeviceAuthorizationResponse -> Bool
Prelude.Eq, ReadPrec [StartDeviceAuthorizationResponse]
ReadPrec StartDeviceAuthorizationResponse
Int -> ReadS StartDeviceAuthorizationResponse
ReadS [StartDeviceAuthorizationResponse]
(Int -> ReadS StartDeviceAuthorizationResponse)
-> ReadS [StartDeviceAuthorizationResponse]
-> ReadPrec StartDeviceAuthorizationResponse
-> ReadPrec [StartDeviceAuthorizationResponse]
-> Read StartDeviceAuthorizationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartDeviceAuthorizationResponse]
$creadListPrec :: ReadPrec [StartDeviceAuthorizationResponse]
readPrec :: ReadPrec StartDeviceAuthorizationResponse
$creadPrec :: ReadPrec StartDeviceAuthorizationResponse
readList :: ReadS [StartDeviceAuthorizationResponse]
$creadList :: ReadS [StartDeviceAuthorizationResponse]
readsPrec :: Int -> ReadS StartDeviceAuthorizationResponse
$creadsPrec :: Int -> ReadS StartDeviceAuthorizationResponse
Prelude.Read, Int -> StartDeviceAuthorizationResponse -> ShowS
[StartDeviceAuthorizationResponse] -> ShowS
StartDeviceAuthorizationResponse -> String
(Int -> StartDeviceAuthorizationResponse -> ShowS)
-> (StartDeviceAuthorizationResponse -> String)
-> ([StartDeviceAuthorizationResponse] -> ShowS)
-> Show StartDeviceAuthorizationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartDeviceAuthorizationResponse] -> ShowS
$cshowList :: [StartDeviceAuthorizationResponse] -> ShowS
show :: StartDeviceAuthorizationResponse -> String
$cshow :: StartDeviceAuthorizationResponse -> String
showsPrec :: Int -> StartDeviceAuthorizationResponse -> ShowS
$cshowsPrec :: Int -> StartDeviceAuthorizationResponse -> ShowS
Prelude.Show, (forall x.
StartDeviceAuthorizationResponse
-> Rep StartDeviceAuthorizationResponse x)
-> (forall x.
Rep StartDeviceAuthorizationResponse x
-> StartDeviceAuthorizationResponse)
-> Generic StartDeviceAuthorizationResponse
forall x.
Rep StartDeviceAuthorizationResponse x
-> StartDeviceAuthorizationResponse
forall x.
StartDeviceAuthorizationResponse
-> Rep StartDeviceAuthorizationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartDeviceAuthorizationResponse x
-> StartDeviceAuthorizationResponse
$cfrom :: forall x.
StartDeviceAuthorizationResponse
-> Rep StartDeviceAuthorizationResponse x
Prelude.Generic)
newStartDeviceAuthorizationResponse ::
Prelude.Int ->
StartDeviceAuthorizationResponse
newStartDeviceAuthorizationResponse :: Int -> StartDeviceAuthorizationResponse
newStartDeviceAuthorizationResponse Int
pHttpStatus_ =
StartDeviceAuthorizationResponse' :: Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> StartDeviceAuthorizationResponse
StartDeviceAuthorizationResponse'
{ $sel:userCode:StartDeviceAuthorizationResponse' :: Maybe Text
userCode =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:interval:StartDeviceAuthorizationResponse' :: Maybe Int
interval = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:expiresIn:StartDeviceAuthorizationResponse' :: Maybe Int
expiresIn = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:verificationUri:StartDeviceAuthorizationResponse' :: Maybe Text
verificationUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deviceCode:StartDeviceAuthorizationResponse' :: Maybe Text
deviceCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:verificationUriComplete:StartDeviceAuthorizationResponse' :: Maybe Text
verificationUriComplete = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartDeviceAuthorizationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startDeviceAuthorizationResponse_userCode :: Lens.Lens' StartDeviceAuthorizationResponse (Prelude.Maybe Prelude.Text)
startDeviceAuthorizationResponse_userCode :: (Maybe Text -> f (Maybe Text))
-> StartDeviceAuthorizationResponse
-> f StartDeviceAuthorizationResponse
startDeviceAuthorizationResponse_userCode = (StartDeviceAuthorizationResponse -> Maybe Text)
-> (StartDeviceAuthorizationResponse
-> Maybe Text -> StartDeviceAuthorizationResponse)
-> Lens
StartDeviceAuthorizationResponse
StartDeviceAuthorizationResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDeviceAuthorizationResponse' {Maybe Text
userCode :: Maybe Text
$sel:userCode:StartDeviceAuthorizationResponse' :: StartDeviceAuthorizationResponse -> Maybe Text
userCode} -> Maybe Text
userCode) (\s :: StartDeviceAuthorizationResponse
s@StartDeviceAuthorizationResponse' {} Maybe Text
a -> StartDeviceAuthorizationResponse
s {$sel:userCode:StartDeviceAuthorizationResponse' :: Maybe Text
userCode = Maybe Text
a} :: StartDeviceAuthorizationResponse)
startDeviceAuthorizationResponse_interval :: Lens.Lens' StartDeviceAuthorizationResponse (Prelude.Maybe Prelude.Int)
startDeviceAuthorizationResponse_interval :: (Maybe Int -> f (Maybe Int))
-> StartDeviceAuthorizationResponse
-> f StartDeviceAuthorizationResponse
startDeviceAuthorizationResponse_interval = (StartDeviceAuthorizationResponse -> Maybe Int)
-> (StartDeviceAuthorizationResponse
-> Maybe Int -> StartDeviceAuthorizationResponse)
-> Lens
StartDeviceAuthorizationResponse
StartDeviceAuthorizationResponse
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDeviceAuthorizationResponse' {Maybe Int
interval :: Maybe Int
$sel:interval:StartDeviceAuthorizationResponse' :: StartDeviceAuthorizationResponse -> Maybe Int
interval} -> Maybe Int
interval) (\s :: StartDeviceAuthorizationResponse
s@StartDeviceAuthorizationResponse' {} Maybe Int
a -> StartDeviceAuthorizationResponse
s {$sel:interval:StartDeviceAuthorizationResponse' :: Maybe Int
interval = Maybe Int
a} :: StartDeviceAuthorizationResponse)
startDeviceAuthorizationResponse_expiresIn :: Lens.Lens' StartDeviceAuthorizationResponse (Prelude.Maybe Prelude.Int)
startDeviceAuthorizationResponse_expiresIn :: (Maybe Int -> f (Maybe Int))
-> StartDeviceAuthorizationResponse
-> f StartDeviceAuthorizationResponse
startDeviceAuthorizationResponse_expiresIn = (StartDeviceAuthorizationResponse -> Maybe Int)
-> (StartDeviceAuthorizationResponse
-> Maybe Int -> StartDeviceAuthorizationResponse)
-> Lens
StartDeviceAuthorizationResponse
StartDeviceAuthorizationResponse
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDeviceAuthorizationResponse' {Maybe Int
expiresIn :: Maybe Int
$sel:expiresIn:StartDeviceAuthorizationResponse' :: StartDeviceAuthorizationResponse -> Maybe Int
expiresIn} -> Maybe Int
expiresIn) (\s :: StartDeviceAuthorizationResponse
s@StartDeviceAuthorizationResponse' {} Maybe Int
a -> StartDeviceAuthorizationResponse
s {$sel:expiresIn:StartDeviceAuthorizationResponse' :: Maybe Int
expiresIn = Maybe Int
a} :: StartDeviceAuthorizationResponse)
startDeviceAuthorizationResponse_verificationUri :: Lens.Lens' StartDeviceAuthorizationResponse (Prelude.Maybe Prelude.Text)
startDeviceAuthorizationResponse_verificationUri :: (Maybe Text -> f (Maybe Text))
-> StartDeviceAuthorizationResponse
-> f StartDeviceAuthorizationResponse
startDeviceAuthorizationResponse_verificationUri = (StartDeviceAuthorizationResponse -> Maybe Text)
-> (StartDeviceAuthorizationResponse
-> Maybe Text -> StartDeviceAuthorizationResponse)
-> Lens
StartDeviceAuthorizationResponse
StartDeviceAuthorizationResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDeviceAuthorizationResponse' {Maybe Text
verificationUri :: Maybe Text
$sel:verificationUri:StartDeviceAuthorizationResponse' :: StartDeviceAuthorizationResponse -> Maybe Text
verificationUri} -> Maybe Text
verificationUri) (\s :: StartDeviceAuthorizationResponse
s@StartDeviceAuthorizationResponse' {} Maybe Text
a -> StartDeviceAuthorizationResponse
s {$sel:verificationUri:StartDeviceAuthorizationResponse' :: Maybe Text
verificationUri = Maybe Text
a} :: StartDeviceAuthorizationResponse)
startDeviceAuthorizationResponse_deviceCode :: Lens.Lens' StartDeviceAuthorizationResponse (Prelude.Maybe Prelude.Text)
startDeviceAuthorizationResponse_deviceCode :: (Maybe Text -> f (Maybe Text))
-> StartDeviceAuthorizationResponse
-> f StartDeviceAuthorizationResponse
startDeviceAuthorizationResponse_deviceCode = (StartDeviceAuthorizationResponse -> Maybe Text)
-> (StartDeviceAuthorizationResponse
-> Maybe Text -> StartDeviceAuthorizationResponse)
-> Lens
StartDeviceAuthorizationResponse
StartDeviceAuthorizationResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDeviceAuthorizationResponse' {Maybe Text
deviceCode :: Maybe Text
$sel:deviceCode:StartDeviceAuthorizationResponse' :: StartDeviceAuthorizationResponse -> Maybe Text
deviceCode} -> Maybe Text
deviceCode) (\s :: StartDeviceAuthorizationResponse
s@StartDeviceAuthorizationResponse' {} Maybe Text
a -> StartDeviceAuthorizationResponse
s {$sel:deviceCode:StartDeviceAuthorizationResponse' :: Maybe Text
deviceCode = Maybe Text
a} :: StartDeviceAuthorizationResponse)
startDeviceAuthorizationResponse_verificationUriComplete :: Lens.Lens' StartDeviceAuthorizationResponse (Prelude.Maybe Prelude.Text)
startDeviceAuthorizationResponse_verificationUriComplete :: (Maybe Text -> f (Maybe Text))
-> StartDeviceAuthorizationResponse
-> f StartDeviceAuthorizationResponse
startDeviceAuthorizationResponse_verificationUriComplete = (StartDeviceAuthorizationResponse -> Maybe Text)
-> (StartDeviceAuthorizationResponse
-> Maybe Text -> StartDeviceAuthorizationResponse)
-> Lens
StartDeviceAuthorizationResponse
StartDeviceAuthorizationResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDeviceAuthorizationResponse' {Maybe Text
verificationUriComplete :: Maybe Text
$sel:verificationUriComplete:StartDeviceAuthorizationResponse' :: StartDeviceAuthorizationResponse -> Maybe Text
verificationUriComplete} -> Maybe Text
verificationUriComplete) (\s :: StartDeviceAuthorizationResponse
s@StartDeviceAuthorizationResponse' {} Maybe Text
a -> StartDeviceAuthorizationResponse
s {$sel:verificationUriComplete:StartDeviceAuthorizationResponse' :: Maybe Text
verificationUriComplete = Maybe Text
a} :: StartDeviceAuthorizationResponse)
startDeviceAuthorizationResponse_httpStatus :: Lens.Lens' StartDeviceAuthorizationResponse Prelude.Int
startDeviceAuthorizationResponse_httpStatus :: (Int -> f Int)
-> StartDeviceAuthorizationResponse
-> f StartDeviceAuthorizationResponse
startDeviceAuthorizationResponse_httpStatus = (StartDeviceAuthorizationResponse -> Int)
-> (StartDeviceAuthorizationResponse
-> Int -> StartDeviceAuthorizationResponse)
-> Lens
StartDeviceAuthorizationResponse
StartDeviceAuthorizationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartDeviceAuthorizationResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartDeviceAuthorizationResponse' :: StartDeviceAuthorizationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartDeviceAuthorizationResponse
s@StartDeviceAuthorizationResponse' {} Int
a -> StartDeviceAuthorizationResponse
s {$sel:httpStatus:StartDeviceAuthorizationResponse' :: Int
httpStatus = Int
a} :: StartDeviceAuthorizationResponse)
instance
Prelude.NFData
StartDeviceAuthorizationResponse