{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.Firewall
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.NetworkFirewall.Types.Firewall 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.EncryptionConfiguration
import Amazonka.NetworkFirewall.Types.SubnetMapping
import Amazonka.NetworkFirewall.Types.Tag
import qualified Amazonka.Prelude as Prelude

-- | The firewall defines the configuration settings for an Network Firewall
-- firewall. These settings include the firewall policy, the subnets in
-- your VPC to use for the firewall endpoints, and any tags that are
-- attached to the firewall Amazon Web Services resource.
--
-- The status of the firewall, for example whether it\'s ready to filter
-- network traffic, is provided in the corresponding FirewallStatus. You
-- can retrieve both objects by calling DescribeFirewall.
--
-- /See:/ 'newFirewall' smart constructor.
data Firewall = Firewall'
  { -- | A flag indicating whether it is possible to delete the firewall. A
    -- setting of @TRUE@ indicates that the firewall is protected against
    -- deletion. Use this setting to protect against accidentally deleting a
    -- firewall that is in use. When you create a firewall, the operation
    -- initializes this flag to @TRUE@.
    Firewall -> Maybe Bool
deleteProtection :: Prelude.Maybe Prelude.Bool,
    -- | A description of the firewall.
    Firewall -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A complex type that contains the Amazon Web Services KMS encryption
    -- configuration settings for your firewall.
    Firewall -> Maybe EncryptionConfiguration
encryptionConfiguration :: Prelude.Maybe EncryptionConfiguration,
    -- | The Amazon Resource Name (ARN) of the firewall.
    Firewall -> 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.
    Firewall -> Maybe Text
firewallName :: Prelude.Maybe Prelude.Text,
    -- | A setting indicating whether the firewall is protected against a change
    -- to the firewall policy association. Use this setting to protect against
    -- accidentally modifying the firewall policy for a firewall that is in
    -- use. When you create a firewall, the operation initializes this setting
    -- to @TRUE@.
    Firewall -> Maybe Bool
firewallPolicyChangeProtection :: Prelude.Maybe Prelude.Bool,
    -- | A setting indicating whether the firewall is protected against changes
    -- to the subnet associations. Use this setting to protect against
    -- accidentally modifying the subnet associations for a firewall that is in
    -- use. When you create a firewall, the operation initializes this setting
    -- to @TRUE@.
    Firewall -> Maybe Bool
subnetChangeProtection :: Prelude.Maybe Prelude.Bool,
    Firewall -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
    -- | The Amazon Resource Name (ARN) of the firewall policy.
    --
    -- The relationship of firewall to firewall policy is many to one. Each
    -- firewall requires one firewall policy association, and you can use the
    -- same firewall policy for multiple firewalls.
    Firewall -> Text
firewallPolicyArn :: Prelude.Text,
    -- | The unique identifier of the VPC where the firewall is in use.
    Firewall -> Text
vpcId :: Prelude.Text,
    -- | The public subnets that Network Firewall is using for the firewall. Each
    -- subnet must belong to a different Availability Zone.
    Firewall -> [SubnetMapping]
subnetMappings :: [SubnetMapping],
    -- | The unique identifier for the firewall.
    Firewall -> Text
firewallId :: Prelude.Text
  }
  deriving (Firewall -> Firewall -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Firewall -> Firewall -> Bool
$c/= :: Firewall -> Firewall -> Bool
== :: Firewall -> Firewall -> Bool
$c== :: Firewall -> Firewall -> Bool
Prelude.Eq, ReadPrec [Firewall]
ReadPrec Firewall
Int -> ReadS Firewall
ReadS [Firewall]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Firewall]
$creadListPrec :: ReadPrec [Firewall]
readPrec :: ReadPrec Firewall
$creadPrec :: ReadPrec Firewall
readList :: ReadS [Firewall]
$creadList :: ReadS [Firewall]
readsPrec :: Int -> ReadS Firewall
$creadsPrec :: Int -> ReadS Firewall
Prelude.Read, Int -> Firewall -> ShowS
[Firewall] -> ShowS
Firewall -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Firewall] -> ShowS
$cshowList :: [Firewall] -> ShowS
show :: Firewall -> String
$cshow :: Firewall -> String
showsPrec :: Int -> Firewall -> ShowS
$cshowsPrec :: Int -> Firewall -> ShowS
Prelude.Show, forall x. Rep Firewall x -> Firewall
forall x. Firewall -> Rep Firewall x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Firewall x -> Firewall
$cfrom :: forall x. Firewall -> Rep Firewall x
Prelude.Generic)

-- |
-- Create a value of 'Firewall' 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:
--
-- 'deleteProtection', 'firewall_deleteProtection' - A flag indicating whether it is possible to delete the firewall. A
-- setting of @TRUE@ indicates that the firewall is protected against
-- deletion. Use this setting to protect against accidentally deleting a
-- firewall that is in use. When you create a firewall, the operation
-- initializes this flag to @TRUE@.
--
-- 'description', 'firewall_description' - A description of the firewall.
--
-- 'encryptionConfiguration', 'firewall_encryptionConfiguration' - A complex type that contains the Amazon Web Services KMS encryption
-- configuration settings for your firewall.
--
-- 'firewallArn', 'firewall_firewallArn' - The Amazon Resource Name (ARN) of the firewall.
--
-- 'firewallName', 'firewall_firewallName' - The descriptive name of the firewall. You can\'t change the name of a
-- firewall after you create it.
--
-- 'firewallPolicyChangeProtection', 'firewall_firewallPolicyChangeProtection' - A setting indicating whether the firewall is protected against a change
-- to the firewall policy association. Use this setting to protect against
-- accidentally modifying the firewall policy for a firewall that is in
-- use. When you create a firewall, the operation initializes this setting
-- to @TRUE@.
--
-- 'subnetChangeProtection', 'firewall_subnetChangeProtection' - A setting indicating whether the firewall is protected against changes
-- to the subnet associations. Use this setting to protect against
-- accidentally modifying the subnet associations for a firewall that is in
-- use. When you create a firewall, the operation initializes this setting
-- to @TRUE@.
--
-- 'tags', 'firewall_tags' -
--
-- 'firewallPolicyArn', 'firewall_firewallPolicyArn' - The Amazon Resource Name (ARN) of the firewall policy.
--
-- The relationship of firewall to firewall policy is many to one. Each
-- firewall requires one firewall policy association, and you can use the
-- same firewall policy for multiple firewalls.
--
-- 'vpcId', 'firewall_vpcId' - The unique identifier of the VPC where the firewall is in use.
--
-- 'subnetMappings', 'firewall_subnetMappings' - The public subnets that Network Firewall is using for the firewall. Each
-- subnet must belong to a different Availability Zone.
--
-- 'firewallId', 'firewall_firewallId' - The unique identifier for the firewall.
newFirewall ::
  -- | 'firewallPolicyArn'
  Prelude.Text ->
  -- | 'vpcId'
  Prelude.Text ->
  -- | 'firewallId'
  Prelude.Text ->
  Firewall
newFirewall :: Text -> Text -> Text -> Firewall
newFirewall Text
pFirewallPolicyArn_ Text
pVpcId_ Text
pFirewallId_ =
  Firewall'
    { $sel:deleteProtection:Firewall' :: Maybe Bool
deleteProtection = forall a. Maybe a
Prelude.Nothing,
      $sel:description:Firewall' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:encryptionConfiguration:Firewall' :: Maybe EncryptionConfiguration
encryptionConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:firewallArn:Firewall' :: Maybe Text
firewallArn = forall a. Maybe a
Prelude.Nothing,
      $sel:firewallName:Firewall' :: Maybe Text
firewallName = forall a. Maybe a
Prelude.Nothing,
      $sel:firewallPolicyChangeProtection:Firewall' :: Maybe Bool
firewallPolicyChangeProtection = forall a. Maybe a
Prelude.Nothing,
      $sel:subnetChangeProtection:Firewall' :: Maybe Bool
subnetChangeProtection = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Firewall' :: Maybe (NonEmpty Tag)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:firewallPolicyArn:Firewall' :: Text
firewallPolicyArn = Text
pFirewallPolicyArn_,
      $sel:vpcId:Firewall' :: Text
vpcId = Text
pVpcId_,
      $sel:subnetMappings:Firewall' :: [SubnetMapping]
subnetMappings = forall a. Monoid a => a
Prelude.mempty,
      $sel:firewallId:Firewall' :: Text
firewallId = Text
pFirewallId_
    }

-- | A flag indicating whether it is possible to delete the firewall. A
-- setting of @TRUE@ indicates that the firewall is protected against
-- deletion. Use this setting to protect against accidentally deleting a
-- firewall that is in use. When you create a firewall, the operation
-- initializes this flag to @TRUE@.
firewall_deleteProtection :: Lens.Lens' Firewall (Prelude.Maybe Prelude.Bool)
firewall_deleteProtection :: Lens' Firewall (Maybe Bool)
firewall_deleteProtection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Firewall' {Maybe Bool
deleteProtection :: Maybe Bool
$sel:deleteProtection:Firewall' :: Firewall -> Maybe Bool
deleteProtection} -> Maybe Bool
deleteProtection) (\s :: Firewall
s@Firewall' {} Maybe Bool
a -> Firewall
s {$sel:deleteProtection:Firewall' :: Maybe Bool
deleteProtection = Maybe Bool
a} :: Firewall)

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

-- | A complex type that contains the Amazon Web Services KMS encryption
-- configuration settings for your firewall.
firewall_encryptionConfiguration :: Lens.Lens' Firewall (Prelude.Maybe EncryptionConfiguration)
firewall_encryptionConfiguration :: Lens' Firewall (Maybe EncryptionConfiguration)
firewall_encryptionConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Firewall' {Maybe EncryptionConfiguration
encryptionConfiguration :: Maybe EncryptionConfiguration
$sel:encryptionConfiguration:Firewall' :: Firewall -> Maybe EncryptionConfiguration
encryptionConfiguration} -> Maybe EncryptionConfiguration
encryptionConfiguration) (\s :: Firewall
s@Firewall' {} Maybe EncryptionConfiguration
a -> Firewall
s {$sel:encryptionConfiguration:Firewall' :: Maybe EncryptionConfiguration
encryptionConfiguration = Maybe EncryptionConfiguration
a} :: Firewall)

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

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

-- | A setting indicating whether the firewall is protected against a change
-- to the firewall policy association. Use this setting to protect against
-- accidentally modifying the firewall policy for a firewall that is in
-- use. When you create a firewall, the operation initializes this setting
-- to @TRUE@.
firewall_firewallPolicyChangeProtection :: Lens.Lens' Firewall (Prelude.Maybe Prelude.Bool)
firewall_firewallPolicyChangeProtection :: Lens' Firewall (Maybe Bool)
firewall_firewallPolicyChangeProtection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Firewall' {Maybe Bool
firewallPolicyChangeProtection :: Maybe Bool
$sel:firewallPolicyChangeProtection:Firewall' :: Firewall -> Maybe Bool
firewallPolicyChangeProtection} -> Maybe Bool
firewallPolicyChangeProtection) (\s :: Firewall
s@Firewall' {} Maybe Bool
a -> Firewall
s {$sel:firewallPolicyChangeProtection:Firewall' :: Maybe Bool
firewallPolicyChangeProtection = Maybe Bool
a} :: Firewall)

-- | A setting indicating whether the firewall is protected against changes
-- to the subnet associations. Use this setting to protect against
-- accidentally modifying the subnet associations for a firewall that is in
-- use. When you create a firewall, the operation initializes this setting
-- to @TRUE@.
firewall_subnetChangeProtection :: Lens.Lens' Firewall (Prelude.Maybe Prelude.Bool)
firewall_subnetChangeProtection :: Lens' Firewall (Maybe Bool)
firewall_subnetChangeProtection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Firewall' {Maybe Bool
subnetChangeProtection :: Maybe Bool
$sel:subnetChangeProtection:Firewall' :: Firewall -> Maybe Bool
subnetChangeProtection} -> Maybe Bool
subnetChangeProtection) (\s :: Firewall
s@Firewall' {} Maybe Bool
a -> Firewall
s {$sel:subnetChangeProtection:Firewall' :: Maybe Bool
subnetChangeProtection = Maybe Bool
a} :: Firewall)

firewall_tags :: Lens.Lens' Firewall (Prelude.Maybe (Prelude.NonEmpty Tag))
firewall_tags :: Lens' Firewall (Maybe (NonEmpty Tag))
firewall_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Firewall' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:Firewall' :: Firewall -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: Firewall
s@Firewall' {} Maybe (NonEmpty Tag)
a -> Firewall
s {$sel:tags:Firewall' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: Firewall) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of the firewall policy.
--
-- The relationship of firewall to firewall policy is many to one. Each
-- firewall requires one firewall policy association, and you can use the
-- same firewall policy for multiple firewalls.
firewall_firewallPolicyArn :: Lens.Lens' Firewall Prelude.Text
firewall_firewallPolicyArn :: Lens' Firewall Text
firewall_firewallPolicyArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Firewall' {Text
firewallPolicyArn :: Text
$sel:firewallPolicyArn:Firewall' :: Firewall -> Text
firewallPolicyArn} -> Text
firewallPolicyArn) (\s :: Firewall
s@Firewall' {} Text
a -> Firewall
s {$sel:firewallPolicyArn:Firewall' :: Text
firewallPolicyArn = Text
a} :: Firewall)

-- | The unique identifier of the VPC where the firewall is in use.
firewall_vpcId :: Lens.Lens' Firewall Prelude.Text
firewall_vpcId :: Lens' Firewall Text
firewall_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Firewall' {Text
vpcId :: Text
$sel:vpcId:Firewall' :: Firewall -> Text
vpcId} -> Text
vpcId) (\s :: Firewall
s@Firewall' {} Text
a -> Firewall
s {$sel:vpcId:Firewall' :: Text
vpcId = Text
a} :: Firewall)

-- | The public subnets that Network Firewall is using for the firewall. Each
-- subnet must belong to a different Availability Zone.
firewall_subnetMappings :: Lens.Lens' Firewall [SubnetMapping]
firewall_subnetMappings :: Lens' Firewall [SubnetMapping]
firewall_subnetMappings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Firewall' {[SubnetMapping]
subnetMappings :: [SubnetMapping]
$sel:subnetMappings:Firewall' :: Firewall -> [SubnetMapping]
subnetMappings} -> [SubnetMapping]
subnetMappings) (\s :: Firewall
s@Firewall' {} [SubnetMapping]
a -> Firewall
s {$sel:subnetMappings:Firewall' :: [SubnetMapping]
subnetMappings = [SubnetMapping]
a} :: Firewall) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The unique identifier for the firewall.
firewall_firewallId :: Lens.Lens' Firewall Prelude.Text
firewall_firewallId :: Lens' Firewall Text
firewall_firewallId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Firewall' {Text
firewallId :: Text
$sel:firewallId:Firewall' :: Firewall -> Text
firewallId} -> Text
firewallId) (\s :: Firewall
s@Firewall' {} Text
a -> Firewall
s {$sel:firewallId:Firewall' :: Text
firewallId = Text
a} :: Firewall)

instance Data.FromJSON Firewall where
  parseJSON :: Value -> Parser Firewall
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Firewall"
      ( \Object
x ->
          Maybe Bool
-> Maybe Text
-> Maybe EncryptionConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe (NonEmpty Tag)
-> Text
-> Text
-> [SubnetMapping]
-> Text
-> Firewall
Firewall'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DeleteProtection")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (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 -> Parser (Maybe a)
Data..:? Key
"EncryptionConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (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 -> Parser (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 -> Parser (Maybe a)
Data..:? Key
"FirewallPolicyChangeProtection")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SubnetChangeProtection")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Tags")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"FirewallPolicyArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"VpcId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SubnetMappings" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"FirewallId")
      )

instance Prelude.Hashable Firewall where
  hashWithSalt :: Int -> Firewall -> Int
hashWithSalt Int
_salt Firewall' {[SubnetMapping]
Maybe Bool
Maybe (NonEmpty Tag)
Maybe Text
Maybe EncryptionConfiguration
Text
firewallId :: Text
subnetMappings :: [SubnetMapping]
vpcId :: Text
firewallPolicyArn :: Text
tags :: Maybe (NonEmpty Tag)
subnetChangeProtection :: Maybe Bool
firewallPolicyChangeProtection :: Maybe Bool
firewallName :: Maybe Text
firewallArn :: Maybe Text
encryptionConfiguration :: Maybe EncryptionConfiguration
description :: Maybe Text
deleteProtection :: Maybe Bool
$sel:firewallId:Firewall' :: Firewall -> Text
$sel:subnetMappings:Firewall' :: Firewall -> [SubnetMapping]
$sel:vpcId:Firewall' :: Firewall -> Text
$sel:firewallPolicyArn:Firewall' :: Firewall -> Text
$sel:tags:Firewall' :: Firewall -> Maybe (NonEmpty Tag)
$sel:subnetChangeProtection:Firewall' :: Firewall -> Maybe Bool
$sel:firewallPolicyChangeProtection:Firewall' :: Firewall -> Maybe Bool
$sel:firewallName:Firewall' :: Firewall -> Maybe Text
$sel:firewallArn:Firewall' :: Firewall -> Maybe Text
$sel:encryptionConfiguration:Firewall' :: Firewall -> Maybe EncryptionConfiguration
$sel:description:Firewall' :: Firewall -> Maybe Text
$sel:deleteProtection:Firewall' :: Firewall -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
deleteProtection
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EncryptionConfiguration
encryptionConfiguration
      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 Bool
firewallPolicyChangeProtection
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
subnetChangeProtection
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Tag)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
firewallPolicyArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vpcId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [SubnetMapping]
subnetMappings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
firewallId

instance Prelude.NFData Firewall where
  rnf :: Firewall -> ()
rnf Firewall' {[SubnetMapping]
Maybe Bool
Maybe (NonEmpty Tag)
Maybe Text
Maybe EncryptionConfiguration
Text
firewallId :: Text
subnetMappings :: [SubnetMapping]
vpcId :: Text
firewallPolicyArn :: Text
tags :: Maybe (NonEmpty Tag)
subnetChangeProtection :: Maybe Bool
firewallPolicyChangeProtection :: Maybe Bool
firewallName :: Maybe Text
firewallArn :: Maybe Text
encryptionConfiguration :: Maybe EncryptionConfiguration
description :: Maybe Text
deleteProtection :: Maybe Bool
$sel:firewallId:Firewall' :: Firewall -> Text
$sel:subnetMappings:Firewall' :: Firewall -> [SubnetMapping]
$sel:vpcId:Firewall' :: Firewall -> Text
$sel:firewallPolicyArn:Firewall' :: Firewall -> Text
$sel:tags:Firewall' :: Firewall -> Maybe (NonEmpty Tag)
$sel:subnetChangeProtection:Firewall' :: Firewall -> Maybe Bool
$sel:firewallPolicyChangeProtection:Firewall' :: Firewall -> Maybe Bool
$sel:firewallName:Firewall' :: Firewall -> Maybe Text
$sel:firewallArn:Firewall' :: Firewall -> Maybe Text
$sel:encryptionConfiguration:Firewall' :: Firewall -> Maybe EncryptionConfiguration
$sel:description:Firewall' :: Firewall -> Maybe Text
$sel:deleteProtection:Firewall' :: Firewall -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
deleteProtection
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 EncryptionConfiguration
encryptionConfiguration
      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 Bool
firewallPolicyChangeProtection
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
subnetChangeProtection
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Tag)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
firewallPolicyArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
vpcId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [SubnetMapping]
subnetMappings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
firewallId