{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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_description,
    updateFirewallDescription_firewallArn,
    updateFirewallDescription_firewallName,
    updateFirewallDescription_updateToken,

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

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

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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'
  { -- | 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 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 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,
    -- | 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
  }
  deriving (UpdateFirewallDescription -> UpdateFirewallDescription -> Bool
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]
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
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.
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:
--
-- 'description', 'updateFirewallDescription_description' - The new description for the firewall. If you omit this setting, Network
-- Firewall removes the description for the firewall.
--
-- 'firewallArn', 'updateFirewallDescription_firewallArn' - The Amazon Resource Name (ARN) of the firewall.
--
-- You must specify the ARN or the name, and you can specify both.
--
-- '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.
--
-- '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.
newUpdateFirewallDescription ::
  UpdateFirewallDescription
newUpdateFirewallDescription :: UpdateFirewallDescription
newUpdateFirewallDescription =
  UpdateFirewallDescription'
    { $sel:description:UpdateFirewallDescription' :: Maybe Text
description =
        forall a. Maybe a
Prelude.Nothing,
      $sel:firewallArn:UpdateFirewallDescription' :: Maybe Text
firewallArn = forall a. Maybe a
Prelude.Nothing,
      $sel:firewallName:UpdateFirewallDescription' :: Maybe Text
firewallName = forall a. Maybe a
Prelude.Nothing,
      $sel:updateToken:UpdateFirewallDescription' :: Maybe Text
updateToken = forall a. Maybe a
Prelude.Nothing
    }

-- | 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 :: Lens' UpdateFirewallDescription (Maybe Text)
updateFirewallDescription_description = 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 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 :: Lens' UpdateFirewallDescription (Maybe Text)
updateFirewallDescription_firewallArn = 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 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 :: Lens' UpdateFirewallDescription (Maybe Text)
updateFirewallDescription_firewallName = 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)

-- | 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 :: Lens' UpdateFirewallDescription (Maybe Text)
updateFirewallDescription_updateToken = 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)

instance Core.AWSRequest UpdateFirewallDescription where
  type
    AWSResponse UpdateFirewallDescription =
      UpdateFirewallDescriptionResponse
  request :: (Service -> Service)
-> UpdateFirewallDescription -> Request UpdateFirewallDescription
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateFirewallDescription
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateFirewallDescription)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> 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'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"FirewallArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"FirewallName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"UpdateToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateFirewallDescription where
  hashWithSalt :: Int -> UpdateFirewallDescription -> Int
hashWithSalt Int
_salt UpdateFirewallDescription' {Maybe Text
updateToken :: Maybe Text
firewallName :: Maybe Text
firewallArn :: Maybe Text
description :: Maybe Text
$sel:updateToken:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
$sel:firewallName:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
$sel:firewallArn:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
$sel:description:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
firewallArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
firewallName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
updateToken

instance Prelude.NFData UpdateFirewallDescription where
  rnf :: UpdateFirewallDescription -> ()
rnf UpdateFirewallDescription' {Maybe Text
updateToken :: Maybe Text
firewallName :: Maybe Text
firewallArn :: Maybe Text
description :: Maybe Text
$sel:updateToken:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
$sel:firewallName:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
$sel:firewallArn:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
$sel:description:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
firewallArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
firewallName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
updateToken

instance Data.ToHeaders UpdateFirewallDescription where
  toHeaders :: UpdateFirewallDescription -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"NetworkFirewall_20201112.UpdateFirewallDescription" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON UpdateFirewallDescription where
  toJSON :: UpdateFirewallDescription -> Value
toJSON UpdateFirewallDescription' {Maybe Text
updateToken :: Maybe Text
firewallName :: Maybe Text
firewallArn :: Maybe Text
description :: Maybe Text
$sel:updateToken:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
$sel:firewallName:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
$sel:firewallArn:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
$sel:description:UpdateFirewallDescription' :: UpdateFirewallDescription -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Key
"FirewallArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
firewallArn,
            (Key
"FirewallName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
firewallName,
            (Key
"UpdateToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
updateToken
          ]
      )

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

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

-- | /See:/ 'newUpdateFirewallDescriptionResponse' smart constructor.
data UpdateFirewallDescriptionResponse = UpdateFirewallDescriptionResponse'
  { -- | A description of the firewall.
    UpdateFirewallDescriptionResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the firewall.
    UpdateFirewallDescriptionResponse -> Maybe Text
firewallArn :: 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,
    -- | 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 response's http status code.
    UpdateFirewallDescriptionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateFirewallDescriptionResponse
-> UpdateFirewallDescriptionResponse -> Bool
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]
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
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.
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:
--
-- 'description', 'updateFirewallDescriptionResponse_description' - A description of the firewall.
--
-- 'firewallArn', 'updateFirewallDescriptionResponse_firewallArn' - The Amazon Resource Name (ARN) 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.
--
-- '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.
--
-- 'httpStatus', 'updateFirewallDescriptionResponse_httpStatus' - The response's http status code.
newUpdateFirewallDescriptionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateFirewallDescriptionResponse
newUpdateFirewallDescriptionResponse :: Int -> UpdateFirewallDescriptionResponse
newUpdateFirewallDescriptionResponse Int
pHttpStatus_ =
  UpdateFirewallDescriptionResponse'
    { $sel:description:UpdateFirewallDescriptionResponse' :: Maybe Text
description =
        forall a. Maybe a
Prelude.Nothing,
      $sel:firewallArn:UpdateFirewallDescriptionResponse' :: Maybe Text
firewallArn = forall a. Maybe a
Prelude.Nothing,
      $sel:firewallName:UpdateFirewallDescriptionResponse' :: Maybe Text
firewallName = forall a. Maybe a
Prelude.Nothing,
      $sel:updateToken:UpdateFirewallDescriptionResponse' :: Maybe Text
updateToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateFirewallDescriptionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A description of the firewall.
updateFirewallDescriptionResponse_description :: Lens.Lens' UpdateFirewallDescriptionResponse (Prelude.Maybe Prelude.Text)
updateFirewallDescriptionResponse_description :: Lens' UpdateFirewallDescriptionResponse (Maybe Text)
updateFirewallDescriptionResponse_description = 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 Amazon Resource Name (ARN) of the firewall.
updateFirewallDescriptionResponse_firewallArn :: Lens.Lens' UpdateFirewallDescriptionResponse (Prelude.Maybe Prelude.Text)
updateFirewallDescriptionResponse_firewallArn :: Lens' UpdateFirewallDescriptionResponse (Maybe Text)
updateFirewallDescriptionResponse_firewallArn = 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)

-- | 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 :: Lens' UpdateFirewallDescriptionResponse (Maybe Text)
updateFirewallDescriptionResponse_firewallName = 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)

-- | 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 :: Lens' UpdateFirewallDescriptionResponse (Maybe Text)
updateFirewallDescriptionResponse_updateToken = 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 response's http status code.
updateFirewallDescriptionResponse_httpStatus :: Lens.Lens' UpdateFirewallDescriptionResponse Prelude.Int
updateFirewallDescriptionResponse_httpStatus :: Lens' UpdateFirewallDescriptionResponse Int
updateFirewallDescriptionResponse_httpStatus = 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
  where
  rnf :: UpdateFirewallDescriptionResponse -> ()
rnf UpdateFirewallDescriptionResponse' {Int
Maybe Text
httpStatus :: Int
updateToken :: Maybe Text
firewallName :: Maybe Text
firewallArn :: Maybe Text
description :: Maybe Text
$sel:httpStatus:UpdateFirewallDescriptionResponse' :: UpdateFirewallDescriptionResponse -> Int
$sel:updateToken:UpdateFirewallDescriptionResponse' :: UpdateFirewallDescriptionResponse -> Maybe Text
$sel:firewallName:UpdateFirewallDescriptionResponse' :: UpdateFirewallDescriptionResponse -> Maybe Text
$sel:firewallArn:UpdateFirewallDescriptionResponse' :: UpdateFirewallDescriptionResponse -> Maybe Text
$sel:description:UpdateFirewallDescriptionResponse' :: UpdateFirewallDescriptionResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
firewallArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
firewallName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
updateToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus