{-# 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.LicenseManager.CreateToken
(
CreateToken (..),
newCreateToken,
createToken_tokenProperties,
createToken_roleArns,
createToken_expirationInDays,
createToken_licenseArn,
createToken_clientToken,
CreateTokenResponse (..),
newCreateTokenResponse,
createTokenResponse_token,
createTokenResponse_tokenId,
createTokenResponse_tokenType,
createTokenResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LicenseManager.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateToken = CreateToken'
{
CreateToken -> Maybe [Text]
tokenProperties :: Prelude.Maybe [Prelude.Text],
CreateToken -> Maybe [Text]
roleArns :: Prelude.Maybe [Prelude.Text],
CreateToken -> Maybe Int
expirationInDays :: Prelude.Maybe Prelude.Int,
CreateToken -> Text
licenseArn :: Prelude.Text,
CreateToken -> Text
clientToken :: Prelude.Text
}
deriving (CreateToken -> CreateToken -> Bool
(CreateToken -> CreateToken -> Bool)
-> (CreateToken -> CreateToken -> Bool) -> Eq CreateToken
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateToken -> CreateToken -> Bool
$c/= :: CreateToken -> CreateToken -> Bool
== :: CreateToken -> CreateToken -> Bool
$c== :: CreateToken -> CreateToken -> Bool
Prelude.Eq, ReadPrec [CreateToken]
ReadPrec CreateToken
Int -> ReadS CreateToken
ReadS [CreateToken]
(Int -> ReadS CreateToken)
-> ReadS [CreateToken]
-> ReadPrec CreateToken
-> ReadPrec [CreateToken]
-> Read CreateToken
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateToken]
$creadListPrec :: ReadPrec [CreateToken]
readPrec :: ReadPrec CreateToken
$creadPrec :: ReadPrec CreateToken
readList :: ReadS [CreateToken]
$creadList :: ReadS [CreateToken]
readsPrec :: Int -> ReadS CreateToken
$creadsPrec :: Int -> ReadS CreateToken
Prelude.Read, Int -> CreateToken -> ShowS
[CreateToken] -> ShowS
CreateToken -> String
(Int -> CreateToken -> ShowS)
-> (CreateToken -> String)
-> ([CreateToken] -> ShowS)
-> Show CreateToken
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateToken] -> ShowS
$cshowList :: [CreateToken] -> ShowS
show :: CreateToken -> String
$cshow :: CreateToken -> String
showsPrec :: Int -> CreateToken -> ShowS
$cshowsPrec :: Int -> CreateToken -> ShowS
Prelude.Show, (forall x. CreateToken -> Rep CreateToken x)
-> (forall x. Rep CreateToken x -> CreateToken)
-> Generic CreateToken
forall x. Rep CreateToken x -> CreateToken
forall x. CreateToken -> Rep CreateToken x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateToken x -> CreateToken
$cfrom :: forall x. CreateToken -> Rep CreateToken x
Prelude.Generic)
newCreateToken ::
Prelude.Text ->
Prelude.Text ->
CreateToken
newCreateToken :: Text -> Text -> CreateToken
newCreateToken Text
pLicenseArn_ Text
pClientToken_ =
CreateToken' :: Maybe [Text]
-> Maybe [Text] -> Maybe Int -> Text -> Text -> CreateToken
CreateToken'
{ $sel:tokenProperties:CreateToken' :: Maybe [Text]
tokenProperties = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:roleArns:CreateToken' :: Maybe [Text]
roleArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:expirationInDays:CreateToken' :: Maybe Int
expirationInDays = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:licenseArn:CreateToken' :: Text
licenseArn = Text
pLicenseArn_,
$sel:clientToken:CreateToken' :: Text
clientToken = Text
pClientToken_
}
createToken_tokenProperties :: Lens.Lens' CreateToken (Prelude.Maybe [Prelude.Text])
createToken_tokenProperties :: (Maybe [Text] -> f (Maybe [Text])) -> CreateToken -> f CreateToken
createToken_tokenProperties = (CreateToken -> Maybe [Text])
-> (CreateToken -> Maybe [Text] -> CreateToken)
-> Lens CreateToken CreateToken (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateToken' {Maybe [Text]
tokenProperties :: Maybe [Text]
$sel:tokenProperties:CreateToken' :: CreateToken -> Maybe [Text]
tokenProperties} -> Maybe [Text]
tokenProperties) (\s :: CreateToken
s@CreateToken' {} Maybe [Text]
a -> CreateToken
s {$sel:tokenProperties:CreateToken' :: Maybe [Text]
tokenProperties = Maybe [Text]
a} :: CreateToken) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateToken -> f CreateToken)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateToken
-> f CreateToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createToken_roleArns :: Lens.Lens' CreateToken (Prelude.Maybe [Prelude.Text])
createToken_roleArns :: (Maybe [Text] -> f (Maybe [Text])) -> CreateToken -> f CreateToken
createToken_roleArns = (CreateToken -> Maybe [Text])
-> (CreateToken -> Maybe [Text] -> CreateToken)
-> Lens CreateToken CreateToken (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateToken' {Maybe [Text]
roleArns :: Maybe [Text]
$sel:roleArns:CreateToken' :: CreateToken -> Maybe [Text]
roleArns} -> Maybe [Text]
roleArns) (\s :: CreateToken
s@CreateToken' {} Maybe [Text]
a -> CreateToken
s {$sel:roleArns:CreateToken' :: Maybe [Text]
roleArns = Maybe [Text]
a} :: CreateToken) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateToken -> f CreateToken)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateToken
-> f CreateToken
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createToken_expirationInDays :: Lens.Lens' CreateToken (Prelude.Maybe Prelude.Int)
createToken_expirationInDays :: (Maybe Int -> f (Maybe Int)) -> CreateToken -> f CreateToken
createToken_expirationInDays = (CreateToken -> Maybe Int)
-> (CreateToken -> Maybe Int -> CreateToken)
-> Lens CreateToken CreateToken (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateToken' {Maybe Int
expirationInDays :: Maybe Int
$sel:expirationInDays:CreateToken' :: CreateToken -> Maybe Int
expirationInDays} -> Maybe Int
expirationInDays) (\s :: CreateToken
s@CreateToken' {} Maybe Int
a -> CreateToken
s {$sel:expirationInDays:CreateToken' :: Maybe Int
expirationInDays = Maybe Int
a} :: CreateToken)
createToken_licenseArn :: Lens.Lens' CreateToken Prelude.Text
createToken_licenseArn :: (Text -> f Text) -> CreateToken -> f CreateToken
createToken_licenseArn = (CreateToken -> Text)
-> (CreateToken -> Text -> CreateToken)
-> Lens CreateToken CreateToken Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateToken' {Text
licenseArn :: Text
$sel:licenseArn:CreateToken' :: CreateToken -> Text
licenseArn} -> Text
licenseArn) (\s :: CreateToken
s@CreateToken' {} Text
a -> CreateToken
s {$sel:licenseArn:CreateToken' :: Text
licenseArn = Text
a} :: CreateToken)
createToken_clientToken :: Lens.Lens' CreateToken Prelude.Text
createToken_clientToken :: (Text -> f Text) -> CreateToken -> f CreateToken
createToken_clientToken = (CreateToken -> Text)
-> (CreateToken -> Text -> CreateToken)
-> Lens CreateToken CreateToken Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateToken' {Text
clientToken :: Text
$sel:clientToken:CreateToken' :: CreateToken -> Text
clientToken} -> Text
clientToken) (\s :: CreateToken
s@CreateToken' {} Text
a -> CreateToken
s {$sel:clientToken:CreateToken' :: Text
clientToken = Text
a} :: CreateToken)
instance Core.AWSRequest CreateToken where
type AWSResponse CreateToken = CreateTokenResponse
request :: CreateToken -> Request CreateToken
request = Service -> CreateToken -> Request CreateToken
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateToken
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateToken)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateToken))
-> Logger
-> Service
-> Proxy CreateToken
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateToken)))
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 Text -> Maybe TokenType -> Int -> CreateTokenResponse
CreateTokenResponse'
(Maybe Text
-> Maybe Text -> Maybe TokenType -> Int -> CreateTokenResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text -> Maybe TokenType -> Int -> CreateTokenResponse)
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
"Token")
Either
String
(Maybe Text -> Maybe TokenType -> Int -> CreateTokenResponse)
-> Either String (Maybe Text)
-> Either String (Maybe TokenType -> Int -> CreateTokenResponse)
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
"TokenId")
Either String (Maybe TokenType -> Int -> CreateTokenResponse)
-> Either String (Maybe TokenType)
-> Either String (Int -> CreateTokenResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe TokenType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TokenType")
Either String (Int -> CreateTokenResponse)
-> Either String Int -> Either String CreateTokenResponse
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 CreateToken
instance Prelude.NFData CreateToken
instance Core.ToHeaders CreateToken where
toHeaders :: CreateToken -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateToken -> 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
"AWSLicenseManager.CreateToken" ::
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 CreateToken where
toJSON :: CreateToken -> Value
toJSON CreateToken' {Maybe Int
Maybe [Text]
Text
clientToken :: Text
licenseArn :: Text
expirationInDays :: Maybe Int
roleArns :: Maybe [Text]
tokenProperties :: Maybe [Text]
$sel:clientToken:CreateToken' :: CreateToken -> Text
$sel:licenseArn:CreateToken' :: CreateToken -> Text
$sel:expirationInDays:CreateToken' :: CreateToken -> Maybe Int
$sel:roleArns:CreateToken' :: CreateToken -> Maybe [Text]
$sel:tokenProperties:CreateToken' :: CreateToken -> Maybe [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"TokenProperties" 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]
tokenProperties,
(Text
"RoleArns" 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]
roleArns,
(Text
"ExpirationInDays" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
expirationInDays,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"LicenseArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
licenseArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ClientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientToken)
]
)
instance Core.ToPath CreateToken where
toPath :: CreateToken -> ByteString
toPath = ByteString -> CreateToken -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateToken where
toQuery :: CreateToken -> QueryString
toQuery = QueryString -> CreateToken -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateTokenResponse = CreateTokenResponse'
{
CreateTokenResponse -> Maybe Text
token :: Prelude.Maybe Prelude.Text,
CreateTokenResponse -> Maybe Text
tokenId :: Prelude.Maybe Prelude.Text,
CreateTokenResponse -> Maybe TokenType
tokenType :: Prelude.Maybe TokenType,
CreateTokenResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateTokenResponse -> CreateTokenResponse -> Bool
(CreateTokenResponse -> CreateTokenResponse -> Bool)
-> (CreateTokenResponse -> CreateTokenResponse -> Bool)
-> Eq CreateTokenResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTokenResponse -> CreateTokenResponse -> Bool
$c/= :: CreateTokenResponse -> CreateTokenResponse -> Bool
== :: CreateTokenResponse -> CreateTokenResponse -> Bool
$c== :: CreateTokenResponse -> CreateTokenResponse -> Bool
Prelude.Eq, ReadPrec [CreateTokenResponse]
ReadPrec CreateTokenResponse
Int -> ReadS CreateTokenResponse
ReadS [CreateTokenResponse]
(Int -> ReadS CreateTokenResponse)
-> ReadS [CreateTokenResponse]
-> ReadPrec CreateTokenResponse
-> ReadPrec [CreateTokenResponse]
-> Read CreateTokenResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTokenResponse]
$creadListPrec :: ReadPrec [CreateTokenResponse]
readPrec :: ReadPrec CreateTokenResponse
$creadPrec :: ReadPrec CreateTokenResponse
readList :: ReadS [CreateTokenResponse]
$creadList :: ReadS [CreateTokenResponse]
readsPrec :: Int -> ReadS CreateTokenResponse
$creadsPrec :: Int -> ReadS CreateTokenResponse
Prelude.Read, Int -> CreateTokenResponse -> ShowS
[CreateTokenResponse] -> ShowS
CreateTokenResponse -> String
(Int -> CreateTokenResponse -> ShowS)
-> (CreateTokenResponse -> String)
-> ([CreateTokenResponse] -> ShowS)
-> Show CreateTokenResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTokenResponse] -> ShowS
$cshowList :: [CreateTokenResponse] -> ShowS
show :: CreateTokenResponse -> String
$cshow :: CreateTokenResponse -> String
showsPrec :: Int -> CreateTokenResponse -> ShowS
$cshowsPrec :: Int -> CreateTokenResponse -> ShowS
Prelude.Show, (forall x. CreateTokenResponse -> Rep CreateTokenResponse x)
-> (forall x. Rep CreateTokenResponse x -> CreateTokenResponse)
-> Generic CreateTokenResponse
forall x. Rep CreateTokenResponse x -> CreateTokenResponse
forall x. CreateTokenResponse -> Rep CreateTokenResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateTokenResponse x -> CreateTokenResponse
$cfrom :: forall x. CreateTokenResponse -> Rep CreateTokenResponse x
Prelude.Generic)
newCreateTokenResponse ::
Prelude.Int ->
CreateTokenResponse
newCreateTokenResponse :: Int -> CreateTokenResponse
newCreateTokenResponse Int
pHttpStatus_ =
CreateTokenResponse' :: Maybe Text
-> Maybe Text -> Maybe TokenType -> Int -> CreateTokenResponse
CreateTokenResponse'
{ $sel:token:CreateTokenResponse' :: Maybe Text
token = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tokenId:CreateTokenResponse' :: Maybe Text
tokenId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tokenType:CreateTokenResponse' :: Maybe TokenType
tokenType = Maybe TokenType
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateTokenResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createTokenResponse_token :: Lens.Lens' CreateTokenResponse (Prelude.Maybe Prelude.Text)
createTokenResponse_token :: (Maybe Text -> f (Maybe Text))
-> CreateTokenResponse -> f CreateTokenResponse
createTokenResponse_token = (CreateTokenResponse -> Maybe Text)
-> (CreateTokenResponse -> Maybe Text -> CreateTokenResponse)
-> Lens
CreateTokenResponse CreateTokenResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTokenResponse' {Maybe Text
token :: Maybe Text
$sel:token:CreateTokenResponse' :: CreateTokenResponse -> Maybe Text
token} -> Maybe Text
token) (\s :: CreateTokenResponse
s@CreateTokenResponse' {} Maybe Text
a -> CreateTokenResponse
s {$sel:token:CreateTokenResponse' :: Maybe Text
token = Maybe Text
a} :: CreateTokenResponse)
createTokenResponse_tokenId :: Lens.Lens' CreateTokenResponse (Prelude.Maybe Prelude.Text)
createTokenResponse_tokenId :: (Maybe Text -> f (Maybe Text))
-> CreateTokenResponse -> f CreateTokenResponse
createTokenResponse_tokenId = (CreateTokenResponse -> Maybe Text)
-> (CreateTokenResponse -> Maybe Text -> CreateTokenResponse)
-> Lens
CreateTokenResponse CreateTokenResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTokenResponse' {Maybe Text
tokenId :: Maybe Text
$sel:tokenId:CreateTokenResponse' :: CreateTokenResponse -> Maybe Text
tokenId} -> Maybe Text
tokenId) (\s :: CreateTokenResponse
s@CreateTokenResponse' {} Maybe Text
a -> CreateTokenResponse
s {$sel:tokenId:CreateTokenResponse' :: Maybe Text
tokenId = Maybe Text
a} :: CreateTokenResponse)
createTokenResponse_tokenType :: Lens.Lens' CreateTokenResponse (Prelude.Maybe TokenType)
createTokenResponse_tokenType :: (Maybe TokenType -> f (Maybe TokenType))
-> CreateTokenResponse -> f CreateTokenResponse
createTokenResponse_tokenType = (CreateTokenResponse -> Maybe TokenType)
-> (CreateTokenResponse -> Maybe TokenType -> CreateTokenResponse)
-> Lens
CreateTokenResponse
CreateTokenResponse
(Maybe TokenType)
(Maybe TokenType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTokenResponse' {Maybe TokenType
tokenType :: Maybe TokenType
$sel:tokenType:CreateTokenResponse' :: CreateTokenResponse -> Maybe TokenType
tokenType} -> Maybe TokenType
tokenType) (\s :: CreateTokenResponse
s@CreateTokenResponse' {} Maybe TokenType
a -> CreateTokenResponse
s {$sel:tokenType:CreateTokenResponse' :: Maybe TokenType
tokenType = Maybe TokenType
a} :: CreateTokenResponse)
createTokenResponse_httpStatus :: Lens.Lens' CreateTokenResponse Prelude.Int
createTokenResponse_httpStatus :: (Int -> f Int) -> CreateTokenResponse -> f CreateTokenResponse
createTokenResponse_httpStatus = (CreateTokenResponse -> Int)
-> (CreateTokenResponse -> Int -> CreateTokenResponse)
-> Lens CreateTokenResponse CreateTokenResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTokenResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateTokenResponse' :: CreateTokenResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateTokenResponse
s@CreateTokenResponse' {} Int
a -> CreateTokenResponse
s {$sel:httpStatus:CreateTokenResponse' :: Int
httpStatus = Int
a} :: CreateTokenResponse)
instance Prelude.NFData CreateTokenResponse