{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.IoT.UpdateAuthorizer
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates an authorizer.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions UpdateAuthorizer>
-- action.
module Amazonka.IoT.UpdateAuthorizer
  ( -- * Creating a Request
    UpdateAuthorizer (..),
    newUpdateAuthorizer,

    -- * Request Lenses
    updateAuthorizer_status,
    updateAuthorizer_authorizerFunctionArn,
    updateAuthorizer_tokenSigningPublicKeys,
    updateAuthorizer_tokenKeyName,
    updateAuthorizer_authorizerName,

    -- * Destructuring the Response
    UpdateAuthorizerResponse (..),
    newUpdateAuthorizerResponse,

    -- * Response Lenses
    updateAuthorizerResponse_authorizerName,
    updateAuthorizerResponse_authorizerArn,
    updateAuthorizerResponse_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

-- | /See:/ 'newUpdateAuthorizer' smart constructor.
data UpdateAuthorizer = UpdateAuthorizer'
  { -- | The status of the update authorizer request.
    UpdateAuthorizer -> Maybe AuthorizerStatus
status :: Prelude.Maybe AuthorizerStatus,
    -- | The ARN of the authorizer\'s Lambda function.
    UpdateAuthorizer -> Maybe Text
authorizerFunctionArn :: Prelude.Maybe Prelude.Text,
    -- | The public keys used to verify the token signature.
    UpdateAuthorizer -> Maybe (HashMap Text Text)
tokenSigningPublicKeys :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The key used to extract the token from the HTTP headers.
    UpdateAuthorizer -> Maybe Text
tokenKeyName :: Prelude.Maybe Prelude.Text,
    -- | The authorizer name.
    UpdateAuthorizer -> Text
authorizerName :: Prelude.Text
  }
  deriving (UpdateAuthorizer -> UpdateAuthorizer -> Bool
(UpdateAuthorizer -> UpdateAuthorizer -> Bool)
-> (UpdateAuthorizer -> UpdateAuthorizer -> Bool)
-> Eq UpdateAuthorizer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAuthorizer -> UpdateAuthorizer -> Bool
$c/= :: UpdateAuthorizer -> UpdateAuthorizer -> Bool
== :: UpdateAuthorizer -> UpdateAuthorizer -> Bool
$c== :: UpdateAuthorizer -> UpdateAuthorizer -> Bool
Prelude.Eq, ReadPrec [UpdateAuthorizer]
ReadPrec UpdateAuthorizer
Int -> ReadS UpdateAuthorizer
ReadS [UpdateAuthorizer]
(Int -> ReadS UpdateAuthorizer)
-> ReadS [UpdateAuthorizer]
-> ReadPrec UpdateAuthorizer
-> ReadPrec [UpdateAuthorizer]
-> Read UpdateAuthorizer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateAuthorizer]
$creadListPrec :: ReadPrec [UpdateAuthorizer]
readPrec :: ReadPrec UpdateAuthorizer
$creadPrec :: ReadPrec UpdateAuthorizer
readList :: ReadS [UpdateAuthorizer]
$creadList :: ReadS [UpdateAuthorizer]
readsPrec :: Int -> ReadS UpdateAuthorizer
$creadsPrec :: Int -> ReadS UpdateAuthorizer
Prelude.Read, Int -> UpdateAuthorizer -> ShowS
[UpdateAuthorizer] -> ShowS
UpdateAuthorizer -> String
(Int -> UpdateAuthorizer -> ShowS)
-> (UpdateAuthorizer -> String)
-> ([UpdateAuthorizer] -> ShowS)
-> Show UpdateAuthorizer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAuthorizer] -> ShowS
$cshowList :: [UpdateAuthorizer] -> ShowS
show :: UpdateAuthorizer -> String
$cshow :: UpdateAuthorizer -> String
showsPrec :: Int -> UpdateAuthorizer -> ShowS
$cshowsPrec :: Int -> UpdateAuthorizer -> ShowS
Prelude.Show, (forall x. UpdateAuthorizer -> Rep UpdateAuthorizer x)
-> (forall x. Rep UpdateAuthorizer x -> UpdateAuthorizer)
-> Generic UpdateAuthorizer
forall x. Rep UpdateAuthorizer x -> UpdateAuthorizer
forall x. UpdateAuthorizer -> Rep UpdateAuthorizer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateAuthorizer x -> UpdateAuthorizer
$cfrom :: forall x. UpdateAuthorizer -> Rep UpdateAuthorizer x
Prelude.Generic)

-- |
-- Create a value of 'UpdateAuthorizer' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'status', 'updateAuthorizer_status' - The status of the update authorizer request.
--
-- 'authorizerFunctionArn', 'updateAuthorizer_authorizerFunctionArn' - The ARN of the authorizer\'s Lambda function.
--
-- 'tokenSigningPublicKeys', 'updateAuthorizer_tokenSigningPublicKeys' - The public keys used to verify the token signature.
--
-- 'tokenKeyName', 'updateAuthorizer_tokenKeyName' - The key used to extract the token from the HTTP headers.
--
-- 'authorizerName', 'updateAuthorizer_authorizerName' - The authorizer name.
newUpdateAuthorizer ::
  -- | 'authorizerName'
  Prelude.Text ->
  UpdateAuthorizer
newUpdateAuthorizer :: Text -> UpdateAuthorizer
newUpdateAuthorizer Text
pAuthorizerName_ =
  UpdateAuthorizer' :: Maybe AuthorizerStatus
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Text
-> UpdateAuthorizer
UpdateAuthorizer'
    { $sel:status:UpdateAuthorizer' :: Maybe AuthorizerStatus
status = Maybe AuthorizerStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:authorizerFunctionArn:UpdateAuthorizer' :: Maybe Text
authorizerFunctionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tokenSigningPublicKeys:UpdateAuthorizer' :: Maybe (HashMap Text Text)
tokenSigningPublicKeys = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:tokenKeyName:UpdateAuthorizer' :: Maybe Text
tokenKeyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:authorizerName:UpdateAuthorizer' :: Text
authorizerName = Text
pAuthorizerName_
    }

-- | The status of the update authorizer request.
updateAuthorizer_status :: Lens.Lens' UpdateAuthorizer (Prelude.Maybe AuthorizerStatus)
updateAuthorizer_status :: (Maybe AuthorizerStatus -> f (Maybe AuthorizerStatus))
-> UpdateAuthorizer -> f UpdateAuthorizer
updateAuthorizer_status = (UpdateAuthorizer -> Maybe AuthorizerStatus)
-> (UpdateAuthorizer -> Maybe AuthorizerStatus -> UpdateAuthorizer)
-> Lens
     UpdateAuthorizer
     UpdateAuthorizer
     (Maybe AuthorizerStatus)
     (Maybe AuthorizerStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAuthorizer' {Maybe AuthorizerStatus
status :: Maybe AuthorizerStatus
$sel:status:UpdateAuthorizer' :: UpdateAuthorizer -> Maybe AuthorizerStatus
status} -> Maybe AuthorizerStatus
status) (\s :: UpdateAuthorizer
s@UpdateAuthorizer' {} Maybe AuthorizerStatus
a -> UpdateAuthorizer
s {$sel:status:UpdateAuthorizer' :: Maybe AuthorizerStatus
status = Maybe AuthorizerStatus
a} :: UpdateAuthorizer)

-- | The ARN of the authorizer\'s Lambda function.
updateAuthorizer_authorizerFunctionArn :: Lens.Lens' UpdateAuthorizer (Prelude.Maybe Prelude.Text)
updateAuthorizer_authorizerFunctionArn :: (Maybe Text -> f (Maybe Text))
-> UpdateAuthorizer -> f UpdateAuthorizer
updateAuthorizer_authorizerFunctionArn = (UpdateAuthorizer -> Maybe Text)
-> (UpdateAuthorizer -> Maybe Text -> UpdateAuthorizer)
-> Lens UpdateAuthorizer UpdateAuthorizer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAuthorizer' {Maybe Text
authorizerFunctionArn :: Maybe Text
$sel:authorizerFunctionArn:UpdateAuthorizer' :: UpdateAuthorizer -> Maybe Text
authorizerFunctionArn} -> Maybe Text
authorizerFunctionArn) (\s :: UpdateAuthorizer
s@UpdateAuthorizer' {} Maybe Text
a -> UpdateAuthorizer
s {$sel:authorizerFunctionArn:UpdateAuthorizer' :: Maybe Text
authorizerFunctionArn = Maybe Text
a} :: UpdateAuthorizer)

-- | The public keys used to verify the token signature.
updateAuthorizer_tokenSigningPublicKeys :: Lens.Lens' UpdateAuthorizer (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateAuthorizer_tokenSigningPublicKeys :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateAuthorizer -> f UpdateAuthorizer
updateAuthorizer_tokenSigningPublicKeys = (UpdateAuthorizer -> Maybe (HashMap Text Text))
-> (UpdateAuthorizer
    -> Maybe (HashMap Text Text) -> UpdateAuthorizer)
-> Lens
     UpdateAuthorizer
     UpdateAuthorizer
     (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 (\UpdateAuthorizer' {Maybe (HashMap Text Text)
tokenSigningPublicKeys :: Maybe (HashMap Text Text)
$sel:tokenSigningPublicKeys:UpdateAuthorizer' :: UpdateAuthorizer -> Maybe (HashMap Text Text)
tokenSigningPublicKeys} -> Maybe (HashMap Text Text)
tokenSigningPublicKeys) (\s :: UpdateAuthorizer
s@UpdateAuthorizer' {} Maybe (HashMap Text Text)
a -> UpdateAuthorizer
s {$sel:tokenSigningPublicKeys:UpdateAuthorizer' :: Maybe (HashMap Text Text)
tokenSigningPublicKeys = Maybe (HashMap Text Text)
a} :: UpdateAuthorizer) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateAuthorizer -> f UpdateAuthorizer)
-> ((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)))
-> UpdateAuthorizer
-> f UpdateAuthorizer
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

-- | The key used to extract the token from the HTTP headers.
updateAuthorizer_tokenKeyName :: Lens.Lens' UpdateAuthorizer (Prelude.Maybe Prelude.Text)
updateAuthorizer_tokenKeyName :: (Maybe Text -> f (Maybe Text))
-> UpdateAuthorizer -> f UpdateAuthorizer
updateAuthorizer_tokenKeyName = (UpdateAuthorizer -> Maybe Text)
-> (UpdateAuthorizer -> Maybe Text -> UpdateAuthorizer)
-> Lens UpdateAuthorizer UpdateAuthorizer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAuthorizer' {Maybe Text
tokenKeyName :: Maybe Text
$sel:tokenKeyName:UpdateAuthorizer' :: UpdateAuthorizer -> Maybe Text
tokenKeyName} -> Maybe Text
tokenKeyName) (\s :: UpdateAuthorizer
s@UpdateAuthorizer' {} Maybe Text
a -> UpdateAuthorizer
s {$sel:tokenKeyName:UpdateAuthorizer' :: Maybe Text
tokenKeyName = Maybe Text
a} :: UpdateAuthorizer)

-- | The authorizer name.
updateAuthorizer_authorizerName :: Lens.Lens' UpdateAuthorizer Prelude.Text
updateAuthorizer_authorizerName :: (Text -> f Text) -> UpdateAuthorizer -> f UpdateAuthorizer
updateAuthorizer_authorizerName = (UpdateAuthorizer -> Text)
-> (UpdateAuthorizer -> Text -> UpdateAuthorizer)
-> Lens UpdateAuthorizer UpdateAuthorizer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAuthorizer' {Text
authorizerName :: Text
$sel:authorizerName:UpdateAuthorizer' :: UpdateAuthorizer -> Text
authorizerName} -> Text
authorizerName) (\s :: UpdateAuthorizer
s@UpdateAuthorizer' {} Text
a -> UpdateAuthorizer
s {$sel:authorizerName:UpdateAuthorizer' :: Text
authorizerName = Text
a} :: UpdateAuthorizer)

instance Core.AWSRequest UpdateAuthorizer where
  type
    AWSResponse UpdateAuthorizer =
      UpdateAuthorizerResponse
  request :: UpdateAuthorizer -> Request UpdateAuthorizer
request = Service -> UpdateAuthorizer -> Request UpdateAuthorizer
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateAuthorizer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateAuthorizer)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateAuthorizer))
-> Logger
-> Service
-> Proxy UpdateAuthorizer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateAuthorizer)))
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 -> UpdateAuthorizerResponse
UpdateAuthorizerResponse'
            (Maybe Text -> Maybe Text -> Int -> UpdateAuthorizerResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> UpdateAuthorizerResponse)
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 -> UpdateAuthorizerResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateAuthorizerResponse)
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 -> UpdateAuthorizerResponse)
-> Either String Int -> Either String UpdateAuthorizerResponse
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 UpdateAuthorizer

instance Prelude.NFData UpdateAuthorizer

instance Core.ToHeaders UpdateAuthorizer where
  toHeaders :: UpdateAuthorizer -> ResponseHeaders
toHeaders = ResponseHeaders -> UpdateAuthorizer -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToJSON UpdateAuthorizer where
  toJSON :: UpdateAuthorizer -> Value
toJSON UpdateAuthorizer' {Maybe Text
Maybe (HashMap Text Text)
Maybe AuthorizerStatus
Text
authorizerName :: Text
tokenKeyName :: Maybe Text
tokenSigningPublicKeys :: Maybe (HashMap Text Text)
authorizerFunctionArn :: Maybe Text
status :: Maybe AuthorizerStatus
$sel:authorizerName:UpdateAuthorizer' :: UpdateAuthorizer -> Text
$sel:tokenKeyName:UpdateAuthorizer' :: UpdateAuthorizer -> Maybe Text
$sel:tokenSigningPublicKeys:UpdateAuthorizer' :: UpdateAuthorizer -> Maybe (HashMap Text Text)
$sel:authorizerFunctionArn:UpdateAuthorizer' :: UpdateAuthorizer -> Maybe Text
$sel:status:UpdateAuthorizer' :: UpdateAuthorizer -> 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
"authorizerFunctionArn" 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
authorizerFunctionArn,
            (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
          ]
      )

instance Core.ToPath UpdateAuthorizer where
  toPath :: UpdateAuthorizer -> ByteString
toPath UpdateAuthorizer' {Maybe Text
Maybe (HashMap Text Text)
Maybe AuthorizerStatus
Text
authorizerName :: Text
tokenKeyName :: Maybe Text
tokenSigningPublicKeys :: Maybe (HashMap Text Text)
authorizerFunctionArn :: Maybe Text
status :: Maybe AuthorizerStatus
$sel:authorizerName:UpdateAuthorizer' :: UpdateAuthorizer -> Text
$sel:tokenKeyName:UpdateAuthorizer' :: UpdateAuthorizer -> Maybe Text
$sel:tokenSigningPublicKeys:UpdateAuthorizer' :: UpdateAuthorizer -> Maybe (HashMap Text Text)
$sel:authorizerFunctionArn:UpdateAuthorizer' :: UpdateAuthorizer -> Maybe Text
$sel:status:UpdateAuthorizer' :: UpdateAuthorizer -> 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 UpdateAuthorizer where
  toQuery :: UpdateAuthorizer -> QueryString
toQuery = QueryString -> UpdateAuthorizer -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateAuthorizerResponse' smart constructor.
data UpdateAuthorizerResponse = UpdateAuthorizerResponse'
  { -- | The authorizer name.
    UpdateAuthorizerResponse -> Maybe Text
authorizerName :: Prelude.Maybe Prelude.Text,
    -- | The authorizer ARN.
    UpdateAuthorizerResponse -> Maybe Text
authorizerArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateAuthorizerResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateAuthorizerResponse -> UpdateAuthorizerResponse -> Bool
(UpdateAuthorizerResponse -> UpdateAuthorizerResponse -> Bool)
-> (UpdateAuthorizerResponse -> UpdateAuthorizerResponse -> Bool)
-> Eq UpdateAuthorizerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAuthorizerResponse -> UpdateAuthorizerResponse -> Bool
$c/= :: UpdateAuthorizerResponse -> UpdateAuthorizerResponse -> Bool
== :: UpdateAuthorizerResponse -> UpdateAuthorizerResponse -> Bool
$c== :: UpdateAuthorizerResponse -> UpdateAuthorizerResponse -> Bool
Prelude.Eq, ReadPrec [UpdateAuthorizerResponse]
ReadPrec UpdateAuthorizerResponse
Int -> ReadS UpdateAuthorizerResponse
ReadS [UpdateAuthorizerResponse]
(Int -> ReadS UpdateAuthorizerResponse)
-> ReadS [UpdateAuthorizerResponse]
-> ReadPrec UpdateAuthorizerResponse
-> ReadPrec [UpdateAuthorizerResponse]
-> Read UpdateAuthorizerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateAuthorizerResponse]
$creadListPrec :: ReadPrec [UpdateAuthorizerResponse]
readPrec :: ReadPrec UpdateAuthorizerResponse
$creadPrec :: ReadPrec UpdateAuthorizerResponse
readList :: ReadS [UpdateAuthorizerResponse]
$creadList :: ReadS [UpdateAuthorizerResponse]
readsPrec :: Int -> ReadS UpdateAuthorizerResponse
$creadsPrec :: Int -> ReadS UpdateAuthorizerResponse
Prelude.Read, Int -> UpdateAuthorizerResponse -> ShowS
[UpdateAuthorizerResponse] -> ShowS
UpdateAuthorizerResponse -> String
(Int -> UpdateAuthorizerResponse -> ShowS)
-> (UpdateAuthorizerResponse -> String)
-> ([UpdateAuthorizerResponse] -> ShowS)
-> Show UpdateAuthorizerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAuthorizerResponse] -> ShowS
$cshowList :: [UpdateAuthorizerResponse] -> ShowS
show :: UpdateAuthorizerResponse -> String
$cshow :: UpdateAuthorizerResponse -> String
showsPrec :: Int -> UpdateAuthorizerResponse -> ShowS
$cshowsPrec :: Int -> UpdateAuthorizerResponse -> ShowS
Prelude.Show, (forall x.
 UpdateAuthorizerResponse -> Rep UpdateAuthorizerResponse x)
-> (forall x.
    Rep UpdateAuthorizerResponse x -> UpdateAuthorizerResponse)
-> Generic UpdateAuthorizerResponse
forall x.
Rep UpdateAuthorizerResponse x -> UpdateAuthorizerResponse
forall x.
UpdateAuthorizerResponse -> Rep UpdateAuthorizerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateAuthorizerResponse x -> UpdateAuthorizerResponse
$cfrom :: forall x.
UpdateAuthorizerResponse -> Rep UpdateAuthorizerResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateAuthorizerResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'authorizerName', 'updateAuthorizerResponse_authorizerName' - The authorizer name.
--
-- 'authorizerArn', 'updateAuthorizerResponse_authorizerArn' - The authorizer ARN.
--
-- 'httpStatus', 'updateAuthorizerResponse_httpStatus' - The response's http status code.
newUpdateAuthorizerResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateAuthorizerResponse
newUpdateAuthorizerResponse :: Int -> UpdateAuthorizerResponse
newUpdateAuthorizerResponse Int
pHttpStatus_ =
  UpdateAuthorizerResponse' :: Maybe Text -> Maybe Text -> Int -> UpdateAuthorizerResponse
UpdateAuthorizerResponse'
    { $sel:authorizerName:UpdateAuthorizerResponse' :: Maybe Text
authorizerName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:authorizerArn:UpdateAuthorizerResponse' :: Maybe Text
authorizerArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateAuthorizerResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The authorizer name.
updateAuthorizerResponse_authorizerName :: Lens.Lens' UpdateAuthorizerResponse (Prelude.Maybe Prelude.Text)
updateAuthorizerResponse_authorizerName :: (Maybe Text -> f (Maybe Text))
-> UpdateAuthorizerResponse -> f UpdateAuthorizerResponse
updateAuthorizerResponse_authorizerName = (UpdateAuthorizerResponse -> Maybe Text)
-> (UpdateAuthorizerResponse
    -> Maybe Text -> UpdateAuthorizerResponse)
-> Lens
     UpdateAuthorizerResponse
     UpdateAuthorizerResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAuthorizerResponse' {Maybe Text
authorizerName :: Maybe Text
$sel:authorizerName:UpdateAuthorizerResponse' :: UpdateAuthorizerResponse -> Maybe Text
authorizerName} -> Maybe Text
authorizerName) (\s :: UpdateAuthorizerResponse
s@UpdateAuthorizerResponse' {} Maybe Text
a -> UpdateAuthorizerResponse
s {$sel:authorizerName:UpdateAuthorizerResponse' :: Maybe Text
authorizerName = Maybe Text
a} :: UpdateAuthorizerResponse)

-- | The authorizer ARN.
updateAuthorizerResponse_authorizerArn :: Lens.Lens' UpdateAuthorizerResponse (Prelude.Maybe Prelude.Text)
updateAuthorizerResponse_authorizerArn :: (Maybe Text -> f (Maybe Text))
-> UpdateAuthorizerResponse -> f UpdateAuthorizerResponse
updateAuthorizerResponse_authorizerArn = (UpdateAuthorizerResponse -> Maybe Text)
-> (UpdateAuthorizerResponse
    -> Maybe Text -> UpdateAuthorizerResponse)
-> Lens
     UpdateAuthorizerResponse
     UpdateAuthorizerResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAuthorizerResponse' {Maybe Text
authorizerArn :: Maybe Text
$sel:authorizerArn:UpdateAuthorizerResponse' :: UpdateAuthorizerResponse -> Maybe Text
authorizerArn} -> Maybe Text
authorizerArn) (\s :: UpdateAuthorizerResponse
s@UpdateAuthorizerResponse' {} Maybe Text
a -> UpdateAuthorizerResponse
s {$sel:authorizerArn:UpdateAuthorizerResponse' :: Maybe Text
authorizerArn = Maybe Text
a} :: UpdateAuthorizerResponse)

-- | The response's http status code.
updateAuthorizerResponse_httpStatus :: Lens.Lens' UpdateAuthorizerResponse Prelude.Int
updateAuthorizerResponse_httpStatus :: (Int -> f Int)
-> UpdateAuthorizerResponse -> f UpdateAuthorizerResponse
updateAuthorizerResponse_httpStatus = (UpdateAuthorizerResponse -> Int)
-> (UpdateAuthorizerResponse -> Int -> UpdateAuthorizerResponse)
-> Lens UpdateAuthorizerResponse UpdateAuthorizerResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAuthorizerResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateAuthorizerResponse' :: UpdateAuthorizerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateAuthorizerResponse
s@UpdateAuthorizerResponse' {} Int
a -> UpdateAuthorizerResponse
s {$sel:httpStatus:UpdateAuthorizerResponse' :: Int
httpStatus = Int
a} :: UpdateAuthorizerResponse)

instance Prelude.NFData UpdateAuthorizerResponse