{-# 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.FMS.Types.NetworkFirewallPolicyDescription
-- 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)
module Amazonka.FMS.Types.NetworkFirewallPolicyDescription where

import qualified Amazonka.Core as Core
import Amazonka.FMS.Types.StatefulRuleGroup
import Amazonka.FMS.Types.StatelessRuleGroup
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The definition of the Network Firewall firewall policy.
--
-- /See:/ 'newNetworkFirewallPolicyDescription' smart constructor.
data NetworkFirewallPolicyDescription = NetworkFirewallPolicyDescription'
  { -- | The stateful rule groups that are used in the Network Firewall firewall
    -- policy.
    NetworkFirewallPolicyDescription -> Maybe [StatefulRuleGroup]
statefulRuleGroups :: Prelude.Maybe [StatefulRuleGroup],
    -- | The stateless rule groups that are used in the Network Firewall firewall
    -- policy.
    NetworkFirewallPolicyDescription -> Maybe [StatelessRuleGroup]
statelessRuleGroups :: Prelude.Maybe [StatelessRuleGroup],
    -- | The actions to take on packet fragments that don\'t match any of the
    -- stateless rule groups.
    NetworkFirewallPolicyDescription -> Maybe [Text]
statelessFragmentDefaultActions :: Prelude.Maybe [Prelude.Text],
    -- | Names of custom actions that are available for use in the stateless
    -- default actions settings.
    NetworkFirewallPolicyDescription -> Maybe [Text]
statelessCustomActions :: Prelude.Maybe [Prelude.Text],
    -- | The actions to take on packets that don\'t match any of the stateless
    -- rule groups.
    NetworkFirewallPolicyDescription -> Maybe [Text]
statelessDefaultActions :: Prelude.Maybe [Prelude.Text]
  }
  deriving (NetworkFirewallPolicyDescription
-> NetworkFirewallPolicyDescription -> Bool
(NetworkFirewallPolicyDescription
 -> NetworkFirewallPolicyDescription -> Bool)
-> (NetworkFirewallPolicyDescription
    -> NetworkFirewallPolicyDescription -> Bool)
-> Eq NetworkFirewallPolicyDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkFirewallPolicyDescription
-> NetworkFirewallPolicyDescription -> Bool
$c/= :: NetworkFirewallPolicyDescription
-> NetworkFirewallPolicyDescription -> Bool
== :: NetworkFirewallPolicyDescription
-> NetworkFirewallPolicyDescription -> Bool
$c== :: NetworkFirewallPolicyDescription
-> NetworkFirewallPolicyDescription -> Bool
Prelude.Eq, ReadPrec [NetworkFirewallPolicyDescription]
ReadPrec NetworkFirewallPolicyDescription
Int -> ReadS NetworkFirewallPolicyDescription
ReadS [NetworkFirewallPolicyDescription]
(Int -> ReadS NetworkFirewallPolicyDescription)
-> ReadS [NetworkFirewallPolicyDescription]
-> ReadPrec NetworkFirewallPolicyDescription
-> ReadPrec [NetworkFirewallPolicyDescription]
-> Read NetworkFirewallPolicyDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NetworkFirewallPolicyDescription]
$creadListPrec :: ReadPrec [NetworkFirewallPolicyDescription]
readPrec :: ReadPrec NetworkFirewallPolicyDescription
$creadPrec :: ReadPrec NetworkFirewallPolicyDescription
readList :: ReadS [NetworkFirewallPolicyDescription]
$creadList :: ReadS [NetworkFirewallPolicyDescription]
readsPrec :: Int -> ReadS NetworkFirewallPolicyDescription
$creadsPrec :: Int -> ReadS NetworkFirewallPolicyDescription
Prelude.Read, Int -> NetworkFirewallPolicyDescription -> ShowS
[NetworkFirewallPolicyDescription] -> ShowS
NetworkFirewallPolicyDescription -> String
(Int -> NetworkFirewallPolicyDescription -> ShowS)
-> (NetworkFirewallPolicyDescription -> String)
-> ([NetworkFirewallPolicyDescription] -> ShowS)
-> Show NetworkFirewallPolicyDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkFirewallPolicyDescription] -> ShowS
$cshowList :: [NetworkFirewallPolicyDescription] -> ShowS
show :: NetworkFirewallPolicyDescription -> String
$cshow :: NetworkFirewallPolicyDescription -> String
showsPrec :: Int -> NetworkFirewallPolicyDescription -> ShowS
$cshowsPrec :: Int -> NetworkFirewallPolicyDescription -> ShowS
Prelude.Show, (forall x.
 NetworkFirewallPolicyDescription
 -> Rep NetworkFirewallPolicyDescription x)
-> (forall x.
    Rep NetworkFirewallPolicyDescription x
    -> NetworkFirewallPolicyDescription)
-> Generic NetworkFirewallPolicyDescription
forall x.
Rep NetworkFirewallPolicyDescription x
-> NetworkFirewallPolicyDescription
forall x.
NetworkFirewallPolicyDescription
-> Rep NetworkFirewallPolicyDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NetworkFirewallPolicyDescription x
-> NetworkFirewallPolicyDescription
$cfrom :: forall x.
NetworkFirewallPolicyDescription
-> Rep NetworkFirewallPolicyDescription x
Prelude.Generic)

-- |
-- Create a value of 'NetworkFirewallPolicyDescription' 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:
--
-- 'statefulRuleGroups', 'networkFirewallPolicyDescription_statefulRuleGroups' - The stateful rule groups that are used in the Network Firewall firewall
-- policy.
--
-- 'statelessRuleGroups', 'networkFirewallPolicyDescription_statelessRuleGroups' - The stateless rule groups that are used in the Network Firewall firewall
-- policy.
--
-- 'statelessFragmentDefaultActions', 'networkFirewallPolicyDescription_statelessFragmentDefaultActions' - The actions to take on packet fragments that don\'t match any of the
-- stateless rule groups.
--
-- 'statelessCustomActions', 'networkFirewallPolicyDescription_statelessCustomActions' - Names of custom actions that are available for use in the stateless
-- default actions settings.
--
-- 'statelessDefaultActions', 'networkFirewallPolicyDescription_statelessDefaultActions' - The actions to take on packets that don\'t match any of the stateless
-- rule groups.
newNetworkFirewallPolicyDescription ::
  NetworkFirewallPolicyDescription
newNetworkFirewallPolicyDescription :: NetworkFirewallPolicyDescription
newNetworkFirewallPolicyDescription =
  NetworkFirewallPolicyDescription' :: Maybe [StatefulRuleGroup]
-> Maybe [StatelessRuleGroup]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> NetworkFirewallPolicyDescription
NetworkFirewallPolicyDescription'
    { $sel:statefulRuleGroups:NetworkFirewallPolicyDescription' :: Maybe [StatefulRuleGroup]
statefulRuleGroups =
        Maybe [StatefulRuleGroup]
forall a. Maybe a
Prelude.Nothing,
      $sel:statelessRuleGroups:NetworkFirewallPolicyDescription' :: Maybe [StatelessRuleGroup]
statelessRuleGroups = Maybe [StatelessRuleGroup]
forall a. Maybe a
Prelude.Nothing,
      $sel:statelessFragmentDefaultActions:NetworkFirewallPolicyDescription' :: Maybe [Text]
statelessFragmentDefaultActions =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:statelessCustomActions:NetworkFirewallPolicyDescription' :: Maybe [Text]
statelessCustomActions = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:statelessDefaultActions:NetworkFirewallPolicyDescription' :: Maybe [Text]
statelessDefaultActions = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
    }

-- | The stateful rule groups that are used in the Network Firewall firewall
-- policy.
networkFirewallPolicyDescription_statefulRuleGroups :: Lens.Lens' NetworkFirewallPolicyDescription (Prelude.Maybe [StatefulRuleGroup])
networkFirewallPolicyDescription_statefulRuleGroups :: (Maybe [StatefulRuleGroup] -> f (Maybe [StatefulRuleGroup]))
-> NetworkFirewallPolicyDescription
-> f NetworkFirewallPolicyDescription
networkFirewallPolicyDescription_statefulRuleGroups = (NetworkFirewallPolicyDescription -> Maybe [StatefulRuleGroup])
-> (NetworkFirewallPolicyDescription
    -> Maybe [StatefulRuleGroup] -> NetworkFirewallPolicyDescription)
-> Lens
     NetworkFirewallPolicyDescription
     NetworkFirewallPolicyDescription
     (Maybe [StatefulRuleGroup])
     (Maybe [StatefulRuleGroup])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallPolicyDescription' {Maybe [StatefulRuleGroup]
statefulRuleGroups :: Maybe [StatefulRuleGroup]
$sel:statefulRuleGroups:NetworkFirewallPolicyDescription' :: NetworkFirewallPolicyDescription -> Maybe [StatefulRuleGroup]
statefulRuleGroups} -> Maybe [StatefulRuleGroup]
statefulRuleGroups) (\s :: NetworkFirewallPolicyDescription
s@NetworkFirewallPolicyDescription' {} Maybe [StatefulRuleGroup]
a -> NetworkFirewallPolicyDescription
s {$sel:statefulRuleGroups:NetworkFirewallPolicyDescription' :: Maybe [StatefulRuleGroup]
statefulRuleGroups = Maybe [StatefulRuleGroup]
a} :: NetworkFirewallPolicyDescription) ((Maybe [StatefulRuleGroup] -> f (Maybe [StatefulRuleGroup]))
 -> NetworkFirewallPolicyDescription
 -> f NetworkFirewallPolicyDescription)
-> ((Maybe [StatefulRuleGroup] -> f (Maybe [StatefulRuleGroup]))
    -> Maybe [StatefulRuleGroup] -> f (Maybe [StatefulRuleGroup]))
-> (Maybe [StatefulRuleGroup] -> f (Maybe [StatefulRuleGroup]))
-> NetworkFirewallPolicyDescription
-> f NetworkFirewallPolicyDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [StatefulRuleGroup]
  [StatefulRuleGroup]
  [StatefulRuleGroup]
  [StatefulRuleGroup]
-> Iso
     (Maybe [StatefulRuleGroup])
     (Maybe [StatefulRuleGroup])
     (Maybe [StatefulRuleGroup])
     (Maybe [StatefulRuleGroup])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [StatefulRuleGroup]
  [StatefulRuleGroup]
  [StatefulRuleGroup]
  [StatefulRuleGroup]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The stateless rule groups that are used in the Network Firewall firewall
-- policy.
networkFirewallPolicyDescription_statelessRuleGroups :: Lens.Lens' NetworkFirewallPolicyDescription (Prelude.Maybe [StatelessRuleGroup])
networkFirewallPolicyDescription_statelessRuleGroups :: (Maybe [StatelessRuleGroup] -> f (Maybe [StatelessRuleGroup]))
-> NetworkFirewallPolicyDescription
-> f NetworkFirewallPolicyDescription
networkFirewallPolicyDescription_statelessRuleGroups = (NetworkFirewallPolicyDescription -> Maybe [StatelessRuleGroup])
-> (NetworkFirewallPolicyDescription
    -> Maybe [StatelessRuleGroup] -> NetworkFirewallPolicyDescription)
-> Lens
     NetworkFirewallPolicyDescription
     NetworkFirewallPolicyDescription
     (Maybe [StatelessRuleGroup])
     (Maybe [StatelessRuleGroup])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallPolicyDescription' {Maybe [StatelessRuleGroup]
statelessRuleGroups :: Maybe [StatelessRuleGroup]
$sel:statelessRuleGroups:NetworkFirewallPolicyDescription' :: NetworkFirewallPolicyDescription -> Maybe [StatelessRuleGroup]
statelessRuleGroups} -> Maybe [StatelessRuleGroup]
statelessRuleGroups) (\s :: NetworkFirewallPolicyDescription
s@NetworkFirewallPolicyDescription' {} Maybe [StatelessRuleGroup]
a -> NetworkFirewallPolicyDescription
s {$sel:statelessRuleGroups:NetworkFirewallPolicyDescription' :: Maybe [StatelessRuleGroup]
statelessRuleGroups = Maybe [StatelessRuleGroup]
a} :: NetworkFirewallPolicyDescription) ((Maybe [StatelessRuleGroup] -> f (Maybe [StatelessRuleGroup]))
 -> NetworkFirewallPolicyDescription
 -> f NetworkFirewallPolicyDescription)
-> ((Maybe [StatelessRuleGroup] -> f (Maybe [StatelessRuleGroup]))
    -> Maybe [StatelessRuleGroup] -> f (Maybe [StatelessRuleGroup]))
-> (Maybe [StatelessRuleGroup] -> f (Maybe [StatelessRuleGroup]))
-> NetworkFirewallPolicyDescription
-> f NetworkFirewallPolicyDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [StatelessRuleGroup]
  [StatelessRuleGroup]
  [StatelessRuleGroup]
  [StatelessRuleGroup]
-> Iso
     (Maybe [StatelessRuleGroup])
     (Maybe [StatelessRuleGroup])
     (Maybe [StatelessRuleGroup])
     (Maybe [StatelessRuleGroup])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [StatelessRuleGroup]
  [StatelessRuleGroup]
  [StatelessRuleGroup]
  [StatelessRuleGroup]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The actions to take on packet fragments that don\'t match any of the
-- stateless rule groups.
networkFirewallPolicyDescription_statelessFragmentDefaultActions :: Lens.Lens' NetworkFirewallPolicyDescription (Prelude.Maybe [Prelude.Text])
networkFirewallPolicyDescription_statelessFragmentDefaultActions :: (Maybe [Text] -> f (Maybe [Text]))
-> NetworkFirewallPolicyDescription
-> f NetworkFirewallPolicyDescription
networkFirewallPolicyDescription_statelessFragmentDefaultActions = (NetworkFirewallPolicyDescription -> Maybe [Text])
-> (NetworkFirewallPolicyDescription
    -> Maybe [Text] -> NetworkFirewallPolicyDescription)
-> Lens
     NetworkFirewallPolicyDescription
     NetworkFirewallPolicyDescription
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallPolicyDescription' {Maybe [Text]
statelessFragmentDefaultActions :: Maybe [Text]
$sel:statelessFragmentDefaultActions:NetworkFirewallPolicyDescription' :: NetworkFirewallPolicyDescription -> Maybe [Text]
statelessFragmentDefaultActions} -> Maybe [Text]
statelessFragmentDefaultActions) (\s :: NetworkFirewallPolicyDescription
s@NetworkFirewallPolicyDescription' {} Maybe [Text]
a -> NetworkFirewallPolicyDescription
s {$sel:statelessFragmentDefaultActions:NetworkFirewallPolicyDescription' :: Maybe [Text]
statelessFragmentDefaultActions = Maybe [Text]
a} :: NetworkFirewallPolicyDescription) ((Maybe [Text] -> f (Maybe [Text]))
 -> NetworkFirewallPolicyDescription
 -> f NetworkFirewallPolicyDescription)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> NetworkFirewallPolicyDescription
-> f NetworkFirewallPolicyDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Names of custom actions that are available for use in the stateless
-- default actions settings.
networkFirewallPolicyDescription_statelessCustomActions :: Lens.Lens' NetworkFirewallPolicyDescription (Prelude.Maybe [Prelude.Text])
networkFirewallPolicyDescription_statelessCustomActions :: (Maybe [Text] -> f (Maybe [Text]))
-> NetworkFirewallPolicyDescription
-> f NetworkFirewallPolicyDescription
networkFirewallPolicyDescription_statelessCustomActions = (NetworkFirewallPolicyDescription -> Maybe [Text])
-> (NetworkFirewallPolicyDescription
    -> Maybe [Text] -> NetworkFirewallPolicyDescription)
-> Lens
     NetworkFirewallPolicyDescription
     NetworkFirewallPolicyDescription
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallPolicyDescription' {Maybe [Text]
statelessCustomActions :: Maybe [Text]
$sel:statelessCustomActions:NetworkFirewallPolicyDescription' :: NetworkFirewallPolicyDescription -> Maybe [Text]
statelessCustomActions} -> Maybe [Text]
statelessCustomActions) (\s :: NetworkFirewallPolicyDescription
s@NetworkFirewallPolicyDescription' {} Maybe [Text]
a -> NetworkFirewallPolicyDescription
s {$sel:statelessCustomActions:NetworkFirewallPolicyDescription' :: Maybe [Text]
statelessCustomActions = Maybe [Text]
a} :: NetworkFirewallPolicyDescription) ((Maybe [Text] -> f (Maybe [Text]))
 -> NetworkFirewallPolicyDescription
 -> f NetworkFirewallPolicyDescription)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> NetworkFirewallPolicyDescription
-> f NetworkFirewallPolicyDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The actions to take on packets that don\'t match any of the stateless
-- rule groups.
networkFirewallPolicyDescription_statelessDefaultActions :: Lens.Lens' NetworkFirewallPolicyDescription (Prelude.Maybe [Prelude.Text])
networkFirewallPolicyDescription_statelessDefaultActions :: (Maybe [Text] -> f (Maybe [Text]))
-> NetworkFirewallPolicyDescription
-> f NetworkFirewallPolicyDescription
networkFirewallPolicyDescription_statelessDefaultActions = (NetworkFirewallPolicyDescription -> Maybe [Text])
-> (NetworkFirewallPolicyDescription
    -> Maybe [Text] -> NetworkFirewallPolicyDescription)
-> Lens
     NetworkFirewallPolicyDescription
     NetworkFirewallPolicyDescription
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallPolicyDescription' {Maybe [Text]
statelessDefaultActions :: Maybe [Text]
$sel:statelessDefaultActions:NetworkFirewallPolicyDescription' :: NetworkFirewallPolicyDescription -> Maybe [Text]
statelessDefaultActions} -> Maybe [Text]
statelessDefaultActions) (\s :: NetworkFirewallPolicyDescription
s@NetworkFirewallPolicyDescription' {} Maybe [Text]
a -> NetworkFirewallPolicyDescription
s {$sel:statelessDefaultActions:NetworkFirewallPolicyDescription' :: Maybe [Text]
statelessDefaultActions = Maybe [Text]
a} :: NetworkFirewallPolicyDescription) ((Maybe [Text] -> f (Maybe [Text]))
 -> NetworkFirewallPolicyDescription
 -> f NetworkFirewallPolicyDescription)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> NetworkFirewallPolicyDescription
-> f NetworkFirewallPolicyDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.FromJSON
    NetworkFirewallPolicyDescription
  where
  parseJSON :: Value -> Parser NetworkFirewallPolicyDescription
parseJSON =
    String
-> (Object -> Parser NetworkFirewallPolicyDescription)
-> Value
-> Parser NetworkFirewallPolicyDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"NetworkFirewallPolicyDescription"
      ( \Object
x ->
          Maybe [StatefulRuleGroup]
-> Maybe [StatelessRuleGroup]
-> Maybe [Text]
-> Maybe [Text]
-> Maybe [Text]
-> NetworkFirewallPolicyDescription
NetworkFirewallPolicyDescription'
            (Maybe [StatefulRuleGroup]
 -> Maybe [StatelessRuleGroup]
 -> Maybe [Text]
 -> Maybe [Text]
 -> Maybe [Text]
 -> NetworkFirewallPolicyDescription)
-> Parser (Maybe [StatefulRuleGroup])
-> Parser
     (Maybe [StatelessRuleGroup]
      -> Maybe [Text]
      -> Maybe [Text]
      -> Maybe [Text]
      -> NetworkFirewallPolicyDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [StatefulRuleGroup]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StatefulRuleGroups"
                            Parser (Maybe (Maybe [StatefulRuleGroup]))
-> Maybe [StatefulRuleGroup] -> Parser (Maybe [StatefulRuleGroup])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [StatefulRuleGroup]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe [StatelessRuleGroup]
   -> Maybe [Text]
   -> Maybe [Text]
   -> Maybe [Text]
   -> NetworkFirewallPolicyDescription)
-> Parser (Maybe [StatelessRuleGroup])
-> Parser
     (Maybe [Text]
      -> Maybe [Text]
      -> Maybe [Text]
      -> NetworkFirewallPolicyDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [StatelessRuleGroup]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StatelessRuleGroups"
                            Parser (Maybe (Maybe [StatelessRuleGroup]))
-> Maybe [StatelessRuleGroup]
-> Parser (Maybe [StatelessRuleGroup])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [StatelessRuleGroup]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe [Text]
   -> Maybe [Text]
   -> Maybe [Text]
   -> NetworkFirewallPolicyDescription)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Text] -> Maybe [Text] -> NetworkFirewallPolicyDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StatelessFragmentDefaultActions"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe [Text] -> Maybe [Text] -> NetworkFirewallPolicyDescription)
-> Parser (Maybe [Text])
-> Parser (Maybe [Text] -> NetworkFirewallPolicyDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StatelessCustomActions"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser (Maybe [Text] -> NetworkFirewallPolicyDescription)
-> Parser (Maybe [Text]) -> Parser NetworkFirewallPolicyDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StatelessDefaultActions"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance
  Prelude.Hashable
    NetworkFirewallPolicyDescription

instance
  Prelude.NFData
    NetworkFirewallPolicyDescription