{-# 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.NetworkFirewall.UpdateFirewallDescription
-- 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)
--
-- Modifies the description for the specified firewall. Use the description
-- to help you identify the firewall when you\'re working with it.
module Amazonka.NetworkFirewall.UpdateFirewallDescription
  ( -- * Creating a Request
    UpdateFirewallDescription (..),
    newUpdateFirewallDescription,

    -- * Request Lenses
    updateFirewallDescription_updateToken,
    updateFirewallDescription_firewallArn,
    updateFirewallDescription_description,
    updateFirewallDescription_firewallName,

    -- * Destructuring the Response
    UpdateFirewallDescriptionResponse (..),
    newUpdateFirewallDescriptionResponse,

    -- * Response Lenses
    updateFirewallDescriptionResponse_updateToken,
    updateFirewallDescriptionResponse_firewallArn,
    updateFirewallDescriptionResponse_description,
    updateFirewallDescriptionResponse_firewallName,
    updateFirewallDescriptionResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.NetworkFirewall.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateFirewallDescription' smart constructor.
data UpdateFirewallDescription = UpdateFirewallDescription'
  { -- | An optional token that you can use for optimistic locking. Network
    -- Firewall returns a token to your requests that access the firewall. The
    -- token marks the state of the firewall resource at the time of the
    -- request.
    --
    -- To make an unconditional change to the firewall, omit the token in your
    -- update request. Without the token, Network Firewall performs your
    -- updates regardless of whether the firewall has changed since you last
    -- retrieved it.
    --
    -- To make a conditional change to the firewall, provide the token in your
    -- update request. Network Firewall uses the token to ensure that the
    -- firewall hasn\'t changed since you last retrieved it. If it has changed,
    -- the operation fails with an @InvalidTokenException@. If this happens,
    -- retrieve the firewall again to get a current copy of it with a new
    -- token. Reapply your changes as needed, then try the operation again
    -- using the new token.
    UpdateFirewallDescription -> Maybe Text
updateToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the firewall.
    --
    -- You must specify the ARN or the name, and you can specify both.
    UpdateFirewallDescription -> Maybe Text
firewallArn :: Prelude.Maybe Prelude.Text,
    -- | The new description for the firewall. If you omit this setting, Network
    -- Firewall removes the description for the firewall.
    UpdateFirewallDescription -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The descriptive name of the firewall. You can\'t change the name of a
    -- firewall after you create it.
    --
    -- You must specify the ARN or the name, and you can specify both.
    UpdateFirewallDescription -> Maybe Text
firewallName :: Prelude.Maybe Prelude.Text
  }
  deriving (UpdateFirewallDescription -> UpdateFirewallDescription -> Bool
(UpdateFirewallDescription -> UpdateFirewallDescription -> Bool)
-> (UpdateFirewallDescription -> UpdateFirewallDescription -> Bool)
-> Eq UpdateFirewallDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFirewallDescription -> UpdateFirewallDescription -> Bool
$c/= :: UpdateFirewallDescription -> UpdateFirewallDescription -> Bool
== :: UpdateFirewallDescription -> UpdateFirewallDescription -> Bool
$c== :: UpdateFirewallDescription -> UpdateFirewallDescription -> Bool
Prelude.Eq, ReadPrec [UpdateFirewallDescription]
ReadPrec UpdateFirewallDescription
Int -> ReadS UpdateFirewallDescription
ReadS [UpdateFirewallDescription]
(Int -> ReadS UpdateFirewallDescription)
-> ReadS [UpdateFirewallDescription]
-> ReadPrec UpdateFirewallDescription
-> ReadPrec [UpdateFirewallDescription]
-> Read UpdateFirewallDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFirewallDescription]
$creadListPrec :: ReadPrec [UpdateFirewallDescription]
readPrec :: ReadPrec UpdateFirewallDescription
$creadPrec :: ReadPrec UpdateFirewallDescription
readList :: ReadS [UpdateFirewallDescription]
$creadList :: ReadS [UpdateFirewallDescription]
readsPrec :: Int -> ReadS UpdateFirewallDescription
$creadsPrec :: Int -> ReadS UpdateFirewallDescription
Prelude.Read, Int -> UpdateFirewallDescription -> ShowS
[UpdateFirewallDescription] -> ShowS
UpdateFirewallDescription -> String
(Int -> UpdateFirewallDescription -> ShowS)
-> (UpdateFirewallDescription -> String)
-> ([UpdateFirewallDescription] -> ShowS)
-> Show UpdateFirewallDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFirewallDescription] -> ShowS
$cshowList :: [UpdateFirewallDescription] -> ShowS
show :: UpdateFirewallDescription -> String
$cshow :: UpdateFirewallDescription -> String
showsPrec :: Int -> UpdateFirewallDescription -> ShowS
$cshowsPrec :: Int -> UpdateFirewallDescription -> ShowS
Prelude.Show, (forall x.
 UpdateFirewallDescription -> Rep UpdateFirewallDescription x)
-> (forall x.
    Rep UpdateFirewallDescription x -> UpdateFirewallDescription)
-> Generic UpdateFirewallDescription
forall x.
Rep UpdateFirewallDescription x -> UpdateFirewallDescription
forall x.
UpdateFirewallDescription -> Rep UpdateFirewallDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateFirewallDescription x -> UpdateFirewallDescription
$cfrom :: forall x.
UpdateFirewallDescription -> Rep UpdateFirewallDescription x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFirewallDescription' 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:
--
-- 'updateToken', 'updateFirewallDescription_updateToken' - An optional token that you can use for optimistic locking. Network
-- Firewall returns a token to your requests that access the firewall. The
-- token marks the state of the firewall resource at the time of the
-- request.
--
-- To make an unconditional change to the firewall, omit the token in your
-- update request. Without the token, Network Firewall performs your
-- updates regardless of whether the firewall has changed since you last
-- retrieved it.
--
-- To make a conditional change to the firewall, provide the token in your
-- update request. Network Firewall uses the token to ensure that the
-- firewall hasn\'t changed since you last retrieved it. If it has changed,
-- the operation fails with an @InvalidTokenException@. If this happens,
-- retrieve the firewall again to get a current copy of it with a new
-- token. Reapply your changes as needed, then try the operation again
-- using the new token.
--
-- 'firewallArn', 'updateFirewallDescription_firewallArn' - The Amazon Resource Name (ARN) of the firewall.
--
-- You must specify the ARN or the name, and you can specify both.
--
-- 'description', 'updateFirewallDescription_description' - The new description for the firewall. If you omit this setting, Network
-- Firewall removes the description for the firewall.
--
-- 'firewallName', 'updateFirewallDescription_firewallName' - The descriptive name of the firewall. You can\'t change the name of a
-- firewall after you create it.
--
-- You must specify the ARN or the name, and you can specify both.
newUpdateFirewallDescription ::
  UpdateFirewallDescription
newUpdateFirewallDescription :: UpdateFirewallDescription
newUpdateFirewallDescription =
  UpdateFirewallDescription' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> UpdateFirewallDescription
UpdateFirewallDescription'
    { $sel:updateToken:UpdateFirewallDescription' :: Maybe Text
updateToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:firewallArn:UpdateFirewallDescription' :: Maybe Text
firewallArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateFirewallDescription' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:firewallName:UpdateFirewallDescription' :: Maybe Text
firewallName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | An optional token that you can use for optimistic locking. Network
-- Firewall returns a token to your requests that access the firewall. The
-- token marks the state of the firewall resource at the time of the
-- request.
--
-- To make an unconditional change to the firewall, omit the token in your
-- update request. Without the token, Network Firewall performs your
-- updates regardless of whether the firewall has changed since you last
-- retrieved it.
--
-- To make a conditional change to the firewall, provide the token in your
-- update request. Network Firewall uses the token to ensure that the
-- firewall hasn\'t changed since you last retrieved it. If it has changed,
-- the operation fails with an @InvalidTokenException@. If this happens,
-- retrieve the firewall again to get a current copy of it with a new
-- token. Reapply your changes as needed, then try the operation again
-- using the new token.
updateFirewallDescription_updateToken :: Lens.Lens' UpdateFirewallDescription (Prelude.Maybe Prelude.Text)
updateFirewallDescription_updateToken :: (Maybe Text -> f (Maybe Text))
-> UpdateFirewallDescription -> f UpdateFirewallDescription
updateFirewallDescription_updateToken = (UpdateFirewallDescription -> Maybe Text)
-> (UpdateFirewallDescription
    -> Maybe Text -> UpdateFirewallDescription)
-> Lens
     UpdateFirewallDescription
     UpdateFirewallDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallDescription' {Maybe Text
updateToken :: Maybe Text
$sel:updateToken:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
updateToken} -> Maybe Text
updateToken) (\s :: UpdateFirewallDescription
s@UpdateFirewallDescription' {} Maybe Text
a -> UpdateFirewallDescription
s {$sel:updateToken:UpdateFirewallDescription' :: Maybe Text
updateToken = Maybe Text
a} :: UpdateFirewallDescription)

-- | The Amazon Resource Name (ARN) of the firewall.
--
-- You must specify the ARN or the name, and you can specify both.
updateFirewallDescription_firewallArn :: Lens.Lens' UpdateFirewallDescription (Prelude.Maybe Prelude.Text)
updateFirewallDescription_firewallArn :: (Maybe Text -> f (Maybe Text))
-> UpdateFirewallDescription -> f UpdateFirewallDescription
updateFirewallDescription_firewallArn = (UpdateFirewallDescription -> Maybe Text)
-> (UpdateFirewallDescription
    -> Maybe Text -> UpdateFirewallDescription)
-> Lens
     UpdateFirewallDescription
     UpdateFirewallDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallDescription' {Maybe Text
firewallArn :: Maybe Text
$sel:firewallArn:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
firewallArn} -> Maybe Text
firewallArn) (\s :: UpdateFirewallDescription
s@UpdateFirewallDescription' {} Maybe Text
a -> UpdateFirewallDescription
s {$sel:firewallArn:UpdateFirewallDescription' :: Maybe Text
firewallArn = Maybe Text
a} :: UpdateFirewallDescription)

-- | The new description for the firewall. If you omit this setting, Network
-- Firewall removes the description for the firewall.
updateFirewallDescription_description :: Lens.Lens' UpdateFirewallDescription (Prelude.Maybe Prelude.Text)
updateFirewallDescription_description :: (Maybe Text -> f (Maybe Text))
-> UpdateFirewallDescription -> f UpdateFirewallDescription
updateFirewallDescription_description = (UpdateFirewallDescription -> Maybe Text)
-> (UpdateFirewallDescription
    -> Maybe Text -> UpdateFirewallDescription)
-> Lens
     UpdateFirewallDescription
     UpdateFirewallDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallDescription' {Maybe Text
description :: Maybe Text
$sel:description:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateFirewallDescription
s@UpdateFirewallDescription' {} Maybe Text
a -> UpdateFirewallDescription
s {$sel:description:UpdateFirewallDescription' :: Maybe Text
description = Maybe Text
a} :: UpdateFirewallDescription)

-- | The descriptive name of the firewall. You can\'t change the name of a
-- firewall after you create it.
--
-- You must specify the ARN or the name, and you can specify both.
updateFirewallDescription_firewallName :: Lens.Lens' UpdateFirewallDescription (Prelude.Maybe Prelude.Text)
updateFirewallDescription_firewallName :: (Maybe Text -> f (Maybe Text))
-> UpdateFirewallDescription -> f UpdateFirewallDescription
updateFirewallDescription_firewallName = (UpdateFirewallDescription -> Maybe Text)
-> (UpdateFirewallDescription
    -> Maybe Text -> UpdateFirewallDescription)
-> Lens
     UpdateFirewallDescription
     UpdateFirewallDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallDescription' {Maybe Text
firewallName :: Maybe Text
$sel:firewallName:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
firewallName} -> Maybe Text
firewallName) (\s :: UpdateFirewallDescription
s@UpdateFirewallDescription' {} Maybe Text
a -> UpdateFirewallDescription
s {$sel:firewallName:UpdateFirewallDescription' :: Maybe Text
firewallName = Maybe Text
a} :: UpdateFirewallDescription)

instance Core.AWSRequest UpdateFirewallDescription where
  type
    AWSResponse UpdateFirewallDescription =
      UpdateFirewallDescriptionResponse
  request :: UpdateFirewallDescription -> Request UpdateFirewallDescription
request = Service
-> UpdateFirewallDescription -> Request UpdateFirewallDescription
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateFirewallDescription
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateFirewallDescription)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateFirewallDescription))
-> Logger
-> Service
-> Proxy UpdateFirewallDescription
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateFirewallDescription)))
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 Text
-> Maybe Text
-> Int
-> UpdateFirewallDescriptionResponse
UpdateFirewallDescriptionResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> UpdateFirewallDescriptionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateFirewallDescriptionResponse)
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
"UpdateToken")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> UpdateFirewallDescriptionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Int -> UpdateFirewallDescriptionResponse)
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
"FirewallArn")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Int -> UpdateFirewallDescriptionResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> UpdateFirewallDescriptionResponse)
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
"Description")
            Either
  String (Maybe Text -> Int -> UpdateFirewallDescriptionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateFirewallDescriptionResponse)
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
"FirewallName")
            Either String (Int -> UpdateFirewallDescriptionResponse)
-> Either String Int
-> Either String UpdateFirewallDescriptionResponse
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 UpdateFirewallDescription

instance Prelude.NFData UpdateFirewallDescription

instance Core.ToHeaders UpdateFirewallDescription where
  toHeaders :: UpdateFirewallDescription -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateFirewallDescription -> 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
"NetworkFirewall_20201112.UpdateFirewallDescription" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateFirewallDescription where
  toJSON :: UpdateFirewallDescription -> Value
toJSON UpdateFirewallDescription' {Maybe Text
firewallName :: Maybe Text
description :: Maybe Text
firewallArn :: Maybe Text
updateToken :: Maybe Text
$sel:firewallName:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
$sel:description:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
$sel:firewallArn:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
$sel:updateToken:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"UpdateToken" 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
updateToken,
            (Text
"FirewallArn" 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
firewallArn,
            (Text
"Description" 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
description,
            (Text
"FirewallName" 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
firewallName
          ]
      )

instance Core.ToPath UpdateFirewallDescription where
  toPath :: UpdateFirewallDescription -> ByteString
toPath = ByteString -> UpdateFirewallDescription -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery UpdateFirewallDescription where
  toQuery :: UpdateFirewallDescription -> QueryString
toQuery = QueryString -> UpdateFirewallDescription -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateFirewallDescriptionResponse' smart constructor.
data UpdateFirewallDescriptionResponse = UpdateFirewallDescriptionResponse'
  { -- | An optional token that you can use for optimistic locking. Network
    -- Firewall returns a token to your requests that access the firewall. The
    -- token marks the state of the firewall resource at the time of the
    -- request.
    --
    -- To make an unconditional change to the firewall, omit the token in your
    -- update request. Without the token, Network Firewall performs your
    -- updates regardless of whether the firewall has changed since you last
    -- retrieved it.
    --
    -- To make a conditional change to the firewall, provide the token in your
    -- update request. Network Firewall uses the token to ensure that the
    -- firewall hasn\'t changed since you last retrieved it. If it has changed,
    -- the operation fails with an @InvalidTokenException@. If this happens,
    -- retrieve the firewall again to get a current copy of it with a new
    -- token. Reapply your changes as needed, then try the operation again
    -- using the new token.
    UpdateFirewallDescriptionResponse -> Maybe Text
updateToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the firewall.
    UpdateFirewallDescriptionResponse -> Maybe Text
firewallArn :: Prelude.Maybe Prelude.Text,
    -- | A description of the firewall.
    UpdateFirewallDescriptionResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The descriptive name of the firewall. You can\'t change the name of a
    -- firewall after you create it.
    UpdateFirewallDescriptionResponse -> Maybe Text
firewallName :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateFirewallDescriptionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateFirewallDescriptionResponse
-> UpdateFirewallDescriptionResponse -> Bool
(UpdateFirewallDescriptionResponse
 -> UpdateFirewallDescriptionResponse -> Bool)
-> (UpdateFirewallDescriptionResponse
    -> UpdateFirewallDescriptionResponse -> Bool)
-> Eq UpdateFirewallDescriptionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFirewallDescriptionResponse
-> UpdateFirewallDescriptionResponse -> Bool
$c/= :: UpdateFirewallDescriptionResponse
-> UpdateFirewallDescriptionResponse -> Bool
== :: UpdateFirewallDescriptionResponse
-> UpdateFirewallDescriptionResponse -> Bool
$c== :: UpdateFirewallDescriptionResponse
-> UpdateFirewallDescriptionResponse -> Bool
Prelude.Eq, ReadPrec [UpdateFirewallDescriptionResponse]
ReadPrec UpdateFirewallDescriptionResponse
Int -> ReadS UpdateFirewallDescriptionResponse
ReadS [UpdateFirewallDescriptionResponse]
(Int -> ReadS UpdateFirewallDescriptionResponse)
-> ReadS [UpdateFirewallDescriptionResponse]
-> ReadPrec UpdateFirewallDescriptionResponse
-> ReadPrec [UpdateFirewallDescriptionResponse]
-> Read UpdateFirewallDescriptionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFirewallDescriptionResponse]
$creadListPrec :: ReadPrec [UpdateFirewallDescriptionResponse]
readPrec :: ReadPrec UpdateFirewallDescriptionResponse
$creadPrec :: ReadPrec UpdateFirewallDescriptionResponse
readList :: ReadS [UpdateFirewallDescriptionResponse]
$creadList :: ReadS [UpdateFirewallDescriptionResponse]
readsPrec :: Int -> ReadS UpdateFirewallDescriptionResponse
$creadsPrec :: Int -> ReadS UpdateFirewallDescriptionResponse
Prelude.Read, Int -> UpdateFirewallDescriptionResponse -> ShowS
[UpdateFirewallDescriptionResponse] -> ShowS
UpdateFirewallDescriptionResponse -> String
(Int -> UpdateFirewallDescriptionResponse -> ShowS)
-> (UpdateFirewallDescriptionResponse -> String)
-> ([UpdateFirewallDescriptionResponse] -> ShowS)
-> Show UpdateFirewallDescriptionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFirewallDescriptionResponse] -> ShowS
$cshowList :: [UpdateFirewallDescriptionResponse] -> ShowS
show :: UpdateFirewallDescriptionResponse -> String
$cshow :: UpdateFirewallDescriptionResponse -> String
showsPrec :: Int -> UpdateFirewallDescriptionResponse -> ShowS
$cshowsPrec :: Int -> UpdateFirewallDescriptionResponse -> ShowS
Prelude.Show, (forall x.
 UpdateFirewallDescriptionResponse
 -> Rep UpdateFirewallDescriptionResponse x)
-> (forall x.
    Rep UpdateFirewallDescriptionResponse x
    -> UpdateFirewallDescriptionResponse)
-> Generic UpdateFirewallDescriptionResponse
forall x.
Rep UpdateFirewallDescriptionResponse x
-> UpdateFirewallDescriptionResponse
forall x.
UpdateFirewallDescriptionResponse
-> Rep UpdateFirewallDescriptionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateFirewallDescriptionResponse x
-> UpdateFirewallDescriptionResponse
$cfrom :: forall x.
UpdateFirewallDescriptionResponse
-> Rep UpdateFirewallDescriptionResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateFirewallDescriptionResponse' 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:
--
-- 'updateToken', 'updateFirewallDescriptionResponse_updateToken' - An optional token that you can use for optimistic locking. Network
-- Firewall returns a token to your requests that access the firewall. The
-- token marks the state of the firewall resource at the time of the
-- request.
--
-- To make an unconditional change to the firewall, omit the token in your
-- update request. Without the token, Network Firewall performs your
-- updates regardless of whether the firewall has changed since you last
-- retrieved it.
--
-- To make a conditional change to the firewall, provide the token in your
-- update request. Network Firewall uses the token to ensure that the
-- firewall hasn\'t changed since you last retrieved it. If it has changed,
-- the operation fails with an @InvalidTokenException@. If this happens,
-- retrieve the firewall again to get a current copy of it with a new
-- token. Reapply your changes as needed, then try the operation again
-- using the new token.
--
-- 'firewallArn', 'updateFirewallDescriptionResponse_firewallArn' - The Amazon Resource Name (ARN) of the firewall.
--
-- 'description', 'updateFirewallDescriptionResponse_description' - A description of the firewall.
--
-- 'firewallName', 'updateFirewallDescriptionResponse_firewallName' - The descriptive name of the firewall. You can\'t change the name of a
-- firewall after you create it.
--
-- 'httpStatus', 'updateFirewallDescriptionResponse_httpStatus' - The response's http status code.
newUpdateFirewallDescriptionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateFirewallDescriptionResponse
newUpdateFirewallDescriptionResponse :: Int -> UpdateFirewallDescriptionResponse
newUpdateFirewallDescriptionResponse Int
pHttpStatus_ =
  UpdateFirewallDescriptionResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateFirewallDescriptionResponse
UpdateFirewallDescriptionResponse'
    { $sel:updateToken:UpdateFirewallDescriptionResponse' :: Maybe Text
updateToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:firewallArn:UpdateFirewallDescriptionResponse' :: Maybe Text
firewallArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateFirewallDescriptionResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:firewallName:UpdateFirewallDescriptionResponse' :: Maybe Text
firewallName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateFirewallDescriptionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An optional token that you can use for optimistic locking. Network
-- Firewall returns a token to your requests that access the firewall. The
-- token marks the state of the firewall resource at the time of the
-- request.
--
-- To make an unconditional change to the firewall, omit the token in your
-- update request. Without the token, Network Firewall performs your
-- updates regardless of whether the firewall has changed since you last
-- retrieved it.
--
-- To make a conditional change to the firewall, provide the token in your
-- update request. Network Firewall uses the token to ensure that the
-- firewall hasn\'t changed since you last retrieved it. If it has changed,
-- the operation fails with an @InvalidTokenException@. If this happens,
-- retrieve the firewall again to get a current copy of it with a new
-- token. Reapply your changes as needed, then try the operation again
-- using the new token.
updateFirewallDescriptionResponse_updateToken :: Lens.Lens' UpdateFirewallDescriptionResponse (Prelude.Maybe Prelude.Text)
updateFirewallDescriptionResponse_updateToken :: (Maybe Text -> f (Maybe Text))
-> UpdateFirewallDescriptionResponse
-> f UpdateFirewallDescriptionResponse
updateFirewallDescriptionResponse_updateToken = (UpdateFirewallDescriptionResponse -> Maybe Text)
-> (UpdateFirewallDescriptionResponse
    -> Maybe Text -> UpdateFirewallDescriptionResponse)
-> Lens
     UpdateFirewallDescriptionResponse
     UpdateFirewallDescriptionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallDescriptionResponse' {Maybe Text
updateToken :: Maybe Text
$sel:updateToken:UpdateFirewallDescriptionResponse' :: UpdateFirewallDescriptionResponse -> Maybe Text
updateToken} -> Maybe Text
updateToken) (\s :: UpdateFirewallDescriptionResponse
s@UpdateFirewallDescriptionResponse' {} Maybe Text
a -> UpdateFirewallDescriptionResponse
s {$sel:updateToken:UpdateFirewallDescriptionResponse' :: Maybe Text
updateToken = Maybe Text
a} :: UpdateFirewallDescriptionResponse)

-- | The Amazon Resource Name (ARN) of the firewall.
updateFirewallDescriptionResponse_firewallArn :: Lens.Lens' UpdateFirewallDescriptionResponse (Prelude.Maybe Prelude.Text)
updateFirewallDescriptionResponse_firewallArn :: (Maybe Text -> f (Maybe Text))
-> UpdateFirewallDescriptionResponse
-> f UpdateFirewallDescriptionResponse
updateFirewallDescriptionResponse_firewallArn = (UpdateFirewallDescriptionResponse -> Maybe Text)
-> (UpdateFirewallDescriptionResponse
    -> Maybe Text -> UpdateFirewallDescriptionResponse)
-> Lens
     UpdateFirewallDescriptionResponse
     UpdateFirewallDescriptionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallDescriptionResponse' {Maybe Text
firewallArn :: Maybe Text
$sel:firewallArn:UpdateFirewallDescriptionResponse' :: UpdateFirewallDescriptionResponse -> Maybe Text
firewallArn} -> Maybe Text
firewallArn) (\s :: UpdateFirewallDescriptionResponse
s@UpdateFirewallDescriptionResponse' {} Maybe Text
a -> UpdateFirewallDescriptionResponse
s {$sel:firewallArn:UpdateFirewallDescriptionResponse' :: Maybe Text
firewallArn = Maybe Text
a} :: UpdateFirewallDescriptionResponse)

-- | A description of the firewall.
updateFirewallDescriptionResponse_description :: Lens.Lens' UpdateFirewallDescriptionResponse (Prelude.Maybe Prelude.Text)
updateFirewallDescriptionResponse_description :: (Maybe Text -> f (Maybe Text))
-> UpdateFirewallDescriptionResponse
-> f UpdateFirewallDescriptionResponse
updateFirewallDescriptionResponse_description = (UpdateFirewallDescriptionResponse -> Maybe Text)
-> (UpdateFirewallDescriptionResponse
    -> Maybe Text -> UpdateFirewallDescriptionResponse)
-> Lens
     UpdateFirewallDescriptionResponse
     UpdateFirewallDescriptionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallDescriptionResponse' {Maybe Text
description :: Maybe Text
$sel:description:UpdateFirewallDescriptionResponse' :: UpdateFirewallDescriptionResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateFirewallDescriptionResponse
s@UpdateFirewallDescriptionResponse' {} Maybe Text
a -> UpdateFirewallDescriptionResponse
s {$sel:description:UpdateFirewallDescriptionResponse' :: Maybe Text
description = Maybe Text
a} :: UpdateFirewallDescriptionResponse)

-- | The descriptive name of the firewall. You can\'t change the name of a
-- firewall after you create it.
updateFirewallDescriptionResponse_firewallName :: Lens.Lens' UpdateFirewallDescriptionResponse (Prelude.Maybe Prelude.Text)
updateFirewallDescriptionResponse_firewallName :: (Maybe Text -> f (Maybe Text))
-> UpdateFirewallDescriptionResponse
-> f UpdateFirewallDescriptionResponse
updateFirewallDescriptionResponse_firewallName = (UpdateFirewallDescriptionResponse -> Maybe Text)
-> (UpdateFirewallDescriptionResponse
    -> Maybe Text -> UpdateFirewallDescriptionResponse)
-> Lens
     UpdateFirewallDescriptionResponse
     UpdateFirewallDescriptionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFirewallDescriptionResponse' {Maybe Text
firewallName :: Maybe Text
$sel:firewallName:UpdateFirewallDescriptionResponse' :: UpdateFirewallDescriptionResponse -> Maybe Text
firewallName} -> Maybe Text
firewallName) (\s :: UpdateFirewallDescriptionResponse
s@UpdateFirewallDescriptionResponse' {} Maybe Text
a -> UpdateFirewallDescriptionResponse
s {$sel:firewallName:UpdateFirewallDescriptionResponse' :: Maybe Text
firewallName = Maybe Text
a} :: UpdateFirewallDescriptionResponse)

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

instance
  Prelude.NFData
    UpdateFirewallDescriptionResponse