{-# 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.IoT.CreateAuthorizer
(
CreateAuthorizer (..),
newCreateAuthorizer,
createAuthorizer_status,
createAuthorizer_signingDisabled,
createAuthorizer_tokenSigningPublicKeys,
createAuthorizer_tokenKeyName,
createAuthorizer_tags,
createAuthorizer_authorizerName,
createAuthorizer_authorizerFunctionArn,
CreateAuthorizerResponse (..),
newCreateAuthorizerResponse,
createAuthorizerResponse_authorizerName,
createAuthorizerResponse_authorizerArn,
createAuthorizerResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IoT.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 CreateAuthorizer = CreateAuthorizer'
{
CreateAuthorizer -> Maybe AuthorizerStatus
status :: Prelude.Maybe AuthorizerStatus,
CreateAuthorizer -> Maybe Bool
signingDisabled :: Prelude.Maybe Prelude.Bool,
CreateAuthorizer -> Maybe (HashMap Text Text)
tokenSigningPublicKeys :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateAuthorizer -> Maybe Text
tokenKeyName :: Prelude.Maybe Prelude.Text,
CreateAuthorizer -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateAuthorizer -> Text
authorizerName :: Prelude.Text,
CreateAuthorizer -> Text
authorizerFunctionArn :: Prelude.Text
}
deriving (CreateAuthorizer -> CreateAuthorizer -> Bool
(CreateAuthorizer -> CreateAuthorizer -> Bool)
-> (CreateAuthorizer -> CreateAuthorizer -> Bool)
-> Eq CreateAuthorizer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAuthorizer -> CreateAuthorizer -> Bool
$c/= :: CreateAuthorizer -> CreateAuthorizer -> Bool
== :: CreateAuthorizer -> CreateAuthorizer -> Bool
$c== :: CreateAuthorizer -> CreateAuthorizer -> Bool
Prelude.Eq, ReadPrec [CreateAuthorizer]
ReadPrec CreateAuthorizer
Int -> ReadS CreateAuthorizer
ReadS [CreateAuthorizer]
(Int -> ReadS CreateAuthorizer)
-> ReadS [CreateAuthorizer]
-> ReadPrec CreateAuthorizer
-> ReadPrec [CreateAuthorizer]
-> Read CreateAuthorizer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAuthorizer]
$creadListPrec :: ReadPrec [CreateAuthorizer]
readPrec :: ReadPrec CreateAuthorizer
$creadPrec :: ReadPrec CreateAuthorizer
readList :: ReadS [CreateAuthorizer]
$creadList :: ReadS [CreateAuthorizer]
readsPrec :: Int -> ReadS CreateAuthorizer
$creadsPrec :: Int -> ReadS CreateAuthorizer
Prelude.Read, Int -> CreateAuthorizer -> ShowS
[CreateAuthorizer] -> ShowS
CreateAuthorizer -> String
(Int -> CreateAuthorizer -> ShowS)
-> (CreateAuthorizer -> String)
-> ([CreateAuthorizer] -> ShowS)
-> Show CreateAuthorizer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAuthorizer] -> ShowS
$cshowList :: [CreateAuthorizer] -> ShowS
show :: CreateAuthorizer -> String
$cshow :: CreateAuthorizer -> String
showsPrec :: Int -> CreateAuthorizer -> ShowS
$cshowsPrec :: Int -> CreateAuthorizer -> ShowS
Prelude.Show, (forall x. CreateAuthorizer -> Rep CreateAuthorizer x)
-> (forall x. Rep CreateAuthorizer x -> CreateAuthorizer)
-> Generic CreateAuthorizer
forall x. Rep CreateAuthorizer x -> CreateAuthorizer
forall x. CreateAuthorizer -> Rep CreateAuthorizer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAuthorizer x -> CreateAuthorizer
$cfrom :: forall x. CreateAuthorizer -> Rep CreateAuthorizer x
Prelude.Generic)
newCreateAuthorizer ::
Prelude.Text ->
Prelude.Text ->
CreateAuthorizer
newCreateAuthorizer :: Text -> Text -> CreateAuthorizer
newCreateAuthorizer
Text
pAuthorizerName_
Text
pAuthorizerFunctionArn_ =
CreateAuthorizer' :: Maybe AuthorizerStatus
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe [Tag]
-> Text
-> Text
-> CreateAuthorizer
CreateAuthorizer'
{ $sel:status:CreateAuthorizer' :: Maybe AuthorizerStatus
status = Maybe AuthorizerStatus
forall a. Maybe a
Prelude.Nothing,
$sel:signingDisabled:CreateAuthorizer' :: Maybe Bool
signingDisabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:tokenSigningPublicKeys:CreateAuthorizer' :: Maybe (HashMap Text Text)
tokenSigningPublicKeys = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:tokenKeyName:CreateAuthorizer' :: Maybe Text
tokenKeyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateAuthorizer' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerName:CreateAuthorizer' :: Text
authorizerName = Text
pAuthorizerName_,
$sel:authorizerFunctionArn:CreateAuthorizer' :: Text
authorizerFunctionArn = Text
pAuthorizerFunctionArn_
}
createAuthorizer_status :: Lens.Lens' CreateAuthorizer (Prelude.Maybe AuthorizerStatus)
createAuthorizer_status :: (Maybe AuthorizerStatus -> f (Maybe AuthorizerStatus))
-> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_status = (CreateAuthorizer -> Maybe AuthorizerStatus)
-> (CreateAuthorizer -> Maybe AuthorizerStatus -> CreateAuthorizer)
-> Lens
CreateAuthorizer
CreateAuthorizer
(Maybe AuthorizerStatus)
(Maybe AuthorizerStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Maybe AuthorizerStatus
status :: Maybe AuthorizerStatus
$sel:status:CreateAuthorizer' :: CreateAuthorizer -> Maybe AuthorizerStatus
status} -> Maybe AuthorizerStatus
status) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Maybe AuthorizerStatus
a -> CreateAuthorizer
s {$sel:status:CreateAuthorizer' :: Maybe AuthorizerStatus
status = Maybe AuthorizerStatus
a} :: CreateAuthorizer)
createAuthorizer_signingDisabled :: Lens.Lens' CreateAuthorizer (Prelude.Maybe Prelude.Bool)
createAuthorizer_signingDisabled :: (Maybe Bool -> f (Maybe Bool))
-> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_signingDisabled = (CreateAuthorizer -> Maybe Bool)
-> (CreateAuthorizer -> Maybe Bool -> CreateAuthorizer)
-> Lens CreateAuthorizer CreateAuthorizer (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Maybe Bool
signingDisabled :: Maybe Bool
$sel:signingDisabled:CreateAuthorizer' :: CreateAuthorizer -> Maybe Bool
signingDisabled} -> Maybe Bool
signingDisabled) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Maybe Bool
a -> CreateAuthorizer
s {$sel:signingDisabled:CreateAuthorizer' :: Maybe Bool
signingDisabled = Maybe Bool
a} :: CreateAuthorizer)
createAuthorizer_tokenSigningPublicKeys :: Lens.Lens' CreateAuthorizer (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createAuthorizer_tokenSigningPublicKeys :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_tokenSigningPublicKeys = (CreateAuthorizer -> Maybe (HashMap Text Text))
-> (CreateAuthorizer
-> Maybe (HashMap Text Text) -> CreateAuthorizer)
-> Lens
CreateAuthorizer
CreateAuthorizer
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Maybe (HashMap Text Text)
tokenSigningPublicKeys :: Maybe (HashMap Text Text)
$sel:tokenSigningPublicKeys:CreateAuthorizer' :: CreateAuthorizer -> Maybe (HashMap Text Text)
tokenSigningPublicKeys} -> Maybe (HashMap Text Text)
tokenSigningPublicKeys) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Maybe (HashMap Text Text)
a -> CreateAuthorizer
s {$sel:tokenSigningPublicKeys:CreateAuthorizer' :: Maybe (HashMap Text Text)
tokenSigningPublicKeys = Maybe (HashMap Text Text)
a} :: CreateAuthorizer) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAuthorizer -> f CreateAuthorizer)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAuthorizer
-> f CreateAuthorizer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text 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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createAuthorizer_tokenKeyName :: Lens.Lens' CreateAuthorizer (Prelude.Maybe Prelude.Text)
createAuthorizer_tokenKeyName :: (Maybe Text -> f (Maybe Text))
-> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_tokenKeyName = (CreateAuthorizer -> Maybe Text)
-> (CreateAuthorizer -> Maybe Text -> CreateAuthorizer)
-> Lens CreateAuthorizer CreateAuthorizer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Maybe Text
tokenKeyName :: Maybe Text
$sel:tokenKeyName:CreateAuthorizer' :: CreateAuthorizer -> Maybe Text
tokenKeyName} -> Maybe Text
tokenKeyName) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Maybe Text
a -> CreateAuthorizer
s {$sel:tokenKeyName:CreateAuthorizer' :: Maybe Text
tokenKeyName = Maybe Text
a} :: CreateAuthorizer)
createAuthorizer_tags :: Lens.Lens' CreateAuthorizer (Prelude.Maybe [Tag])
createAuthorizer_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_tags = (CreateAuthorizer -> Maybe [Tag])
-> (CreateAuthorizer -> Maybe [Tag] -> CreateAuthorizer)
-> Lens
CreateAuthorizer CreateAuthorizer (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateAuthorizer' :: CreateAuthorizer -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Maybe [Tag]
a -> CreateAuthorizer
s {$sel:tags:CreateAuthorizer' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateAuthorizer) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateAuthorizer -> f CreateAuthorizer)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateAuthorizer
-> f CreateAuthorizer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createAuthorizer_authorizerName :: Lens.Lens' CreateAuthorizer Prelude.Text
createAuthorizer_authorizerName :: (Text -> f Text) -> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_authorizerName = (CreateAuthorizer -> Text)
-> (CreateAuthorizer -> Text -> CreateAuthorizer)
-> Lens CreateAuthorizer CreateAuthorizer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Text
authorizerName :: Text
$sel:authorizerName:CreateAuthorizer' :: CreateAuthorizer -> Text
authorizerName} -> Text
authorizerName) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Text
a -> CreateAuthorizer
s {$sel:authorizerName:CreateAuthorizer' :: Text
authorizerName = Text
a} :: CreateAuthorizer)
createAuthorizer_authorizerFunctionArn :: Lens.Lens' CreateAuthorizer Prelude.Text
createAuthorizer_authorizerFunctionArn :: (Text -> f Text) -> CreateAuthorizer -> f CreateAuthorizer
createAuthorizer_authorizerFunctionArn = (CreateAuthorizer -> Text)
-> (CreateAuthorizer -> Text -> CreateAuthorizer)
-> Lens CreateAuthorizer CreateAuthorizer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizer' {Text
authorizerFunctionArn :: Text
$sel:authorizerFunctionArn:CreateAuthorizer' :: CreateAuthorizer -> Text
authorizerFunctionArn} -> Text
authorizerFunctionArn) (\s :: CreateAuthorizer
s@CreateAuthorizer' {} Text
a -> CreateAuthorizer
s {$sel:authorizerFunctionArn:CreateAuthorizer' :: Text
authorizerFunctionArn = Text
a} :: CreateAuthorizer)
instance Core.AWSRequest CreateAuthorizer where
type
AWSResponse CreateAuthorizer =
CreateAuthorizerResponse
request :: CreateAuthorizer -> Request CreateAuthorizer
request = Service -> CreateAuthorizer -> Request CreateAuthorizer
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateAuthorizer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAuthorizer)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateAuthorizer))
-> Logger
-> Service
-> Proxy CreateAuthorizer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAuthorizer)))
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 -> Int -> CreateAuthorizerResponse
CreateAuthorizerResponse'
(Maybe Text -> Maybe Text -> Int -> CreateAuthorizerResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CreateAuthorizerResponse)
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
"authorizerName")
Either String (Maybe Text -> Int -> CreateAuthorizerResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateAuthorizerResponse)
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
"authorizerArn")
Either String (Int -> CreateAuthorizerResponse)
-> Either String Int -> Either String CreateAuthorizerResponse
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 CreateAuthorizer
instance Prelude.NFData CreateAuthorizer
instance Core.ToHeaders CreateAuthorizer where
toHeaders :: CreateAuthorizer -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateAuthorizer -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON CreateAuthorizer where
toJSON :: CreateAuthorizer -> Value
toJSON CreateAuthorizer' {Maybe Bool
Maybe [Tag]
Maybe Text
Maybe (HashMap Text Text)
Maybe AuthorizerStatus
Text
authorizerFunctionArn :: Text
authorizerName :: Text
tags :: Maybe [Tag]
tokenKeyName :: Maybe Text
tokenSigningPublicKeys :: Maybe (HashMap Text Text)
signingDisabled :: Maybe Bool
status :: Maybe AuthorizerStatus
$sel:authorizerFunctionArn:CreateAuthorizer' :: CreateAuthorizer -> Text
$sel:authorizerName:CreateAuthorizer' :: CreateAuthorizer -> Text
$sel:tags:CreateAuthorizer' :: CreateAuthorizer -> Maybe [Tag]
$sel:tokenKeyName:CreateAuthorizer' :: CreateAuthorizer -> Maybe Text
$sel:tokenSigningPublicKeys:CreateAuthorizer' :: CreateAuthorizer -> Maybe (HashMap Text Text)
$sel:signingDisabled:CreateAuthorizer' :: CreateAuthorizer -> Maybe Bool
$sel:status:CreateAuthorizer' :: CreateAuthorizer -> Maybe AuthorizerStatus
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"status" Text -> AuthorizerStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AuthorizerStatus -> Pair) -> Maybe AuthorizerStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AuthorizerStatus
status,
(Text
"signingDisabled" 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
signingDisabled,
(Text
"tokenSigningPublicKeys" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tokenSigningPublicKeys,
(Text
"tokenKeyName" 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
tokenKeyName,
(Text
"tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"authorizerFunctionArn"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
authorizerFunctionArn
)
]
)
instance Core.ToPath CreateAuthorizer where
toPath :: CreateAuthorizer -> ByteString
toPath CreateAuthorizer' {Maybe Bool
Maybe [Tag]
Maybe Text
Maybe (HashMap Text Text)
Maybe AuthorizerStatus
Text
authorizerFunctionArn :: Text
authorizerName :: Text
tags :: Maybe [Tag]
tokenKeyName :: Maybe Text
tokenSigningPublicKeys :: Maybe (HashMap Text Text)
signingDisabled :: Maybe Bool
status :: Maybe AuthorizerStatus
$sel:authorizerFunctionArn:CreateAuthorizer' :: CreateAuthorizer -> Text
$sel:authorizerName:CreateAuthorizer' :: CreateAuthorizer -> Text
$sel:tags:CreateAuthorizer' :: CreateAuthorizer -> Maybe [Tag]
$sel:tokenKeyName:CreateAuthorizer' :: CreateAuthorizer -> Maybe Text
$sel:tokenSigningPublicKeys:CreateAuthorizer' :: CreateAuthorizer -> Maybe (HashMap Text Text)
$sel:signingDisabled:CreateAuthorizer' :: CreateAuthorizer -> Maybe Bool
$sel:status:CreateAuthorizer' :: CreateAuthorizer -> Maybe AuthorizerStatus
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/authorizer/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
authorizerName]
instance Core.ToQuery CreateAuthorizer where
toQuery :: CreateAuthorizer -> QueryString
toQuery = QueryString -> CreateAuthorizer -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateAuthorizerResponse = CreateAuthorizerResponse'
{
CreateAuthorizerResponse -> Maybe Text
authorizerName :: Prelude.Maybe Prelude.Text,
CreateAuthorizerResponse -> Maybe Text
authorizerArn :: Prelude.Maybe Prelude.Text,
CreateAuthorizerResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateAuthorizerResponse -> CreateAuthorizerResponse -> Bool
(CreateAuthorizerResponse -> CreateAuthorizerResponse -> Bool)
-> (CreateAuthorizerResponse -> CreateAuthorizerResponse -> Bool)
-> Eq CreateAuthorizerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAuthorizerResponse -> CreateAuthorizerResponse -> Bool
$c/= :: CreateAuthorizerResponse -> CreateAuthorizerResponse -> Bool
== :: CreateAuthorizerResponse -> CreateAuthorizerResponse -> Bool
$c== :: CreateAuthorizerResponse -> CreateAuthorizerResponse -> Bool
Prelude.Eq, ReadPrec [CreateAuthorizerResponse]
ReadPrec CreateAuthorizerResponse
Int -> ReadS CreateAuthorizerResponse
ReadS [CreateAuthorizerResponse]
(Int -> ReadS CreateAuthorizerResponse)
-> ReadS [CreateAuthorizerResponse]
-> ReadPrec CreateAuthorizerResponse
-> ReadPrec [CreateAuthorizerResponse]
-> Read CreateAuthorizerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAuthorizerResponse]
$creadListPrec :: ReadPrec [CreateAuthorizerResponse]
readPrec :: ReadPrec CreateAuthorizerResponse
$creadPrec :: ReadPrec CreateAuthorizerResponse
readList :: ReadS [CreateAuthorizerResponse]
$creadList :: ReadS [CreateAuthorizerResponse]
readsPrec :: Int -> ReadS CreateAuthorizerResponse
$creadsPrec :: Int -> ReadS CreateAuthorizerResponse
Prelude.Read, Int -> CreateAuthorizerResponse -> ShowS
[CreateAuthorizerResponse] -> ShowS
CreateAuthorizerResponse -> String
(Int -> CreateAuthorizerResponse -> ShowS)
-> (CreateAuthorizerResponse -> String)
-> ([CreateAuthorizerResponse] -> ShowS)
-> Show CreateAuthorizerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAuthorizerResponse] -> ShowS
$cshowList :: [CreateAuthorizerResponse] -> ShowS
show :: CreateAuthorizerResponse -> String
$cshow :: CreateAuthorizerResponse -> String
showsPrec :: Int -> CreateAuthorizerResponse -> ShowS
$cshowsPrec :: Int -> CreateAuthorizerResponse -> ShowS
Prelude.Show, (forall x.
CreateAuthorizerResponse -> Rep CreateAuthorizerResponse x)
-> (forall x.
Rep CreateAuthorizerResponse x -> CreateAuthorizerResponse)
-> Generic CreateAuthorizerResponse
forall x.
Rep CreateAuthorizerResponse x -> CreateAuthorizerResponse
forall x.
CreateAuthorizerResponse -> Rep CreateAuthorizerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateAuthorizerResponse x -> CreateAuthorizerResponse
$cfrom :: forall x.
CreateAuthorizerResponse -> Rep CreateAuthorizerResponse x
Prelude.Generic)
newCreateAuthorizerResponse ::
Prelude.Int ->
CreateAuthorizerResponse
newCreateAuthorizerResponse :: Int -> CreateAuthorizerResponse
newCreateAuthorizerResponse Int
pHttpStatus_ =
CreateAuthorizerResponse' :: Maybe Text -> Maybe Text -> Int -> CreateAuthorizerResponse
CreateAuthorizerResponse'
{ $sel:authorizerName:CreateAuthorizerResponse' :: Maybe Text
authorizerName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:authorizerArn:CreateAuthorizerResponse' :: Maybe Text
authorizerArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateAuthorizerResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createAuthorizerResponse_authorizerName :: Lens.Lens' CreateAuthorizerResponse (Prelude.Maybe Prelude.Text)
createAuthorizerResponse_authorizerName :: (Maybe Text -> f (Maybe Text))
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse
createAuthorizerResponse_authorizerName = (CreateAuthorizerResponse -> Maybe Text)
-> (CreateAuthorizerResponse
-> Maybe Text -> CreateAuthorizerResponse)
-> Lens
CreateAuthorizerResponse
CreateAuthorizerResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizerResponse' {Maybe Text
authorizerName :: Maybe Text
$sel:authorizerName:CreateAuthorizerResponse' :: CreateAuthorizerResponse -> Maybe Text
authorizerName} -> Maybe Text
authorizerName) (\s :: CreateAuthorizerResponse
s@CreateAuthorizerResponse' {} Maybe Text
a -> CreateAuthorizerResponse
s {$sel:authorizerName:CreateAuthorizerResponse' :: Maybe Text
authorizerName = Maybe Text
a} :: CreateAuthorizerResponse)
createAuthorizerResponse_authorizerArn :: Lens.Lens' CreateAuthorizerResponse (Prelude.Maybe Prelude.Text)
createAuthorizerResponse_authorizerArn :: (Maybe Text -> f (Maybe Text))
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse
createAuthorizerResponse_authorizerArn = (CreateAuthorizerResponse -> Maybe Text)
-> (CreateAuthorizerResponse
-> Maybe Text -> CreateAuthorizerResponse)
-> Lens
CreateAuthorizerResponse
CreateAuthorizerResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizerResponse' {Maybe Text
authorizerArn :: Maybe Text
$sel:authorizerArn:CreateAuthorizerResponse' :: CreateAuthorizerResponse -> Maybe Text
authorizerArn} -> Maybe Text
authorizerArn) (\s :: CreateAuthorizerResponse
s@CreateAuthorizerResponse' {} Maybe Text
a -> CreateAuthorizerResponse
s {$sel:authorizerArn:CreateAuthorizerResponse' :: Maybe Text
authorizerArn = Maybe Text
a} :: CreateAuthorizerResponse)
createAuthorizerResponse_httpStatus :: Lens.Lens' CreateAuthorizerResponse Prelude.Int
createAuthorizerResponse_httpStatus :: (Int -> f Int)
-> CreateAuthorizerResponse -> f CreateAuthorizerResponse
createAuthorizerResponse_httpStatus = (CreateAuthorizerResponse -> Int)
-> (CreateAuthorizerResponse -> Int -> CreateAuthorizerResponse)
-> Lens CreateAuthorizerResponse CreateAuthorizerResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuthorizerResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateAuthorizerResponse' :: CreateAuthorizerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateAuthorizerResponse
s@CreateAuthorizerResponse' {} Int
a -> CreateAuthorizerResponse
s {$sel:httpStatus:CreateAuthorizerResponse' :: Int
httpStatus = Int
a} :: CreateAuthorizerResponse)
instance Prelude.NFData CreateAuthorizerResponse