{-# 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.FirewallPolicyResponse
-- 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.NetworkFirewall.Types.FirewallPolicyResponse where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.NetworkFirewall.Types.ResourceStatus
import Amazonka.NetworkFirewall.Types.Tag
import qualified Amazonka.Prelude as Prelude

-- | The high-level properties of a firewall policy. This, along with the
-- FirewallPolicy, define the policy. You can retrieve all objects for a
-- firewall policy by calling DescribeFirewallPolicy.
--
-- /See:/ 'newFirewallPolicyResponse' smart constructor.
data FirewallPolicyResponse = FirewallPolicyResponse'
  { -- | The number of capacity units currently consumed by the policy\'s
    -- stateless rules.
    FirewallPolicyResponse -> Maybe Int
consumedStatelessRuleCapacity :: Prelude.Maybe Prelude.Int,
    -- | The number of firewalls that are associated with this firewall policy.
    FirewallPolicyResponse -> Maybe Int
numberOfAssociations :: Prelude.Maybe Prelude.Int,
    -- | The current status of the firewall policy. You can retrieve this for a
    -- firewall policy by calling DescribeFirewallPolicy and providing the
    -- firewall policy\'s name or ARN.
    FirewallPolicyResponse -> Maybe ResourceStatus
firewallPolicyStatus :: Prelude.Maybe ResourceStatus,
    -- | The number of capacity units currently consumed by the policy\'s
    -- stateful rules.
    FirewallPolicyResponse -> Maybe Int
consumedStatefulRuleCapacity :: Prelude.Maybe Prelude.Int,
    -- | A description of the firewall policy.
    FirewallPolicyResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The key:value pairs to associate with the resource.
    FirewallPolicyResponse -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
    -- | The descriptive name of the firewall policy. You can\'t change the name
    -- of a firewall policy after you create it.
    FirewallPolicyResponse -> Text
firewallPolicyName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the firewall policy.
    --
    -- If this response is for a create request that had @DryRun@ set to
    -- @TRUE@, then this ARN is a placeholder that isn\'t attached to a valid
    -- resource.
    FirewallPolicyResponse -> Text
firewallPolicyArn :: Prelude.Text,
    -- | The unique identifier for the firewall policy.
    FirewallPolicyResponse -> Text
firewallPolicyId :: Prelude.Text
  }
  deriving (FirewallPolicyResponse -> FirewallPolicyResponse -> Bool
(FirewallPolicyResponse -> FirewallPolicyResponse -> Bool)
-> (FirewallPolicyResponse -> FirewallPolicyResponse -> Bool)
-> Eq FirewallPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FirewallPolicyResponse -> FirewallPolicyResponse -> Bool
$c/= :: FirewallPolicyResponse -> FirewallPolicyResponse -> Bool
== :: FirewallPolicyResponse -> FirewallPolicyResponse -> Bool
$c== :: FirewallPolicyResponse -> FirewallPolicyResponse -> Bool
Prelude.Eq, ReadPrec [FirewallPolicyResponse]
ReadPrec FirewallPolicyResponse
Int -> ReadS FirewallPolicyResponse
ReadS [FirewallPolicyResponse]
(Int -> ReadS FirewallPolicyResponse)
-> ReadS [FirewallPolicyResponse]
-> ReadPrec FirewallPolicyResponse
-> ReadPrec [FirewallPolicyResponse]
-> Read FirewallPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FirewallPolicyResponse]
$creadListPrec :: ReadPrec [FirewallPolicyResponse]
readPrec :: ReadPrec FirewallPolicyResponse
$creadPrec :: ReadPrec FirewallPolicyResponse
readList :: ReadS [FirewallPolicyResponse]
$creadList :: ReadS [FirewallPolicyResponse]
readsPrec :: Int -> ReadS FirewallPolicyResponse
$creadsPrec :: Int -> ReadS FirewallPolicyResponse
Prelude.Read, Int -> FirewallPolicyResponse -> ShowS
[FirewallPolicyResponse] -> ShowS
FirewallPolicyResponse -> String
(Int -> FirewallPolicyResponse -> ShowS)
-> (FirewallPolicyResponse -> String)
-> ([FirewallPolicyResponse] -> ShowS)
-> Show FirewallPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FirewallPolicyResponse] -> ShowS
$cshowList :: [FirewallPolicyResponse] -> ShowS
show :: FirewallPolicyResponse -> String
$cshow :: FirewallPolicyResponse -> String
showsPrec :: Int -> FirewallPolicyResponse -> ShowS
$cshowsPrec :: Int -> FirewallPolicyResponse -> ShowS
Prelude.Show, (forall x. FirewallPolicyResponse -> Rep FirewallPolicyResponse x)
-> (forall x.
    Rep FirewallPolicyResponse x -> FirewallPolicyResponse)
-> Generic FirewallPolicyResponse
forall x. Rep FirewallPolicyResponse x -> FirewallPolicyResponse
forall x. FirewallPolicyResponse -> Rep FirewallPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FirewallPolicyResponse x -> FirewallPolicyResponse
$cfrom :: forall x. FirewallPolicyResponse -> Rep FirewallPolicyResponse x
Prelude.Generic)

-- |
-- Create a value of 'FirewallPolicyResponse' 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:
--
-- 'consumedStatelessRuleCapacity', 'firewallPolicyResponse_consumedStatelessRuleCapacity' - The number of capacity units currently consumed by the policy\'s
-- stateless rules.
--
-- 'numberOfAssociations', 'firewallPolicyResponse_numberOfAssociations' - The number of firewalls that are associated with this firewall policy.
--
-- 'firewallPolicyStatus', 'firewallPolicyResponse_firewallPolicyStatus' - The current status of the firewall policy. You can retrieve this for a
-- firewall policy by calling DescribeFirewallPolicy and providing the
-- firewall policy\'s name or ARN.
--
-- 'consumedStatefulRuleCapacity', 'firewallPolicyResponse_consumedStatefulRuleCapacity' - The number of capacity units currently consumed by the policy\'s
-- stateful rules.
--
-- 'description', 'firewallPolicyResponse_description' - A description of the firewall policy.
--
-- 'tags', 'firewallPolicyResponse_tags' - The key:value pairs to associate with the resource.
--
-- 'firewallPolicyName', 'firewallPolicyResponse_firewallPolicyName' - The descriptive name of the firewall policy. You can\'t change the name
-- of a firewall policy after you create it.
--
-- 'firewallPolicyArn', 'firewallPolicyResponse_firewallPolicyArn' - The Amazon Resource Name (ARN) of the firewall policy.
--
-- If this response is for a create request that had @DryRun@ set to
-- @TRUE@, then this ARN is a placeholder that isn\'t attached to a valid
-- resource.
--
-- 'firewallPolicyId', 'firewallPolicyResponse_firewallPolicyId' - The unique identifier for the firewall policy.
newFirewallPolicyResponse ::
  -- | 'firewallPolicyName'
  Prelude.Text ->
  -- | 'firewallPolicyArn'
  Prelude.Text ->
  -- | 'firewallPolicyId'
  Prelude.Text ->
  FirewallPolicyResponse
newFirewallPolicyResponse :: Text -> Text -> Text -> FirewallPolicyResponse
newFirewallPolicyResponse
  Text
pFirewallPolicyName_
  Text
pFirewallPolicyArn_
  Text
pFirewallPolicyId_ =
    FirewallPolicyResponse' :: Maybe Int
-> Maybe Int
-> Maybe ResourceStatus
-> Maybe Int
-> Maybe Text
-> Maybe (NonEmpty Tag)
-> Text
-> Text
-> Text
-> FirewallPolicyResponse
FirewallPolicyResponse'
      { $sel:consumedStatelessRuleCapacity:FirewallPolicyResponse' :: Maybe Int
consumedStatelessRuleCapacity =
          Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:numberOfAssociations:FirewallPolicyResponse' :: Maybe Int
numberOfAssociations = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:firewallPolicyStatus:FirewallPolicyResponse' :: Maybe ResourceStatus
firewallPolicyStatus = Maybe ResourceStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:consumedStatefulRuleCapacity:FirewallPolicyResponse' :: Maybe Int
consumedStatefulRuleCapacity = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:description:FirewallPolicyResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:FirewallPolicyResponse' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
forall a. Maybe a
Prelude.Nothing,
        $sel:firewallPolicyName:FirewallPolicyResponse' :: Text
firewallPolicyName = Text
pFirewallPolicyName_,
        $sel:firewallPolicyArn:FirewallPolicyResponse' :: Text
firewallPolicyArn = Text
pFirewallPolicyArn_,
        $sel:firewallPolicyId:FirewallPolicyResponse' :: Text
firewallPolicyId = Text
pFirewallPolicyId_
      }

-- | The number of capacity units currently consumed by the policy\'s
-- stateless rules.
firewallPolicyResponse_consumedStatelessRuleCapacity :: Lens.Lens' FirewallPolicyResponse (Prelude.Maybe Prelude.Int)
firewallPolicyResponse_consumedStatelessRuleCapacity :: (Maybe Int -> f (Maybe Int))
-> FirewallPolicyResponse -> f FirewallPolicyResponse
firewallPolicyResponse_consumedStatelessRuleCapacity = (FirewallPolicyResponse -> Maybe Int)
-> (FirewallPolicyResponse -> Maybe Int -> FirewallPolicyResponse)
-> Lens
     FirewallPolicyResponse
     FirewallPolicyResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallPolicyResponse' {Maybe Int
consumedStatelessRuleCapacity :: Maybe Int
$sel:consumedStatelessRuleCapacity:FirewallPolicyResponse' :: FirewallPolicyResponse -> Maybe Int
consumedStatelessRuleCapacity} -> Maybe Int
consumedStatelessRuleCapacity) (\s :: FirewallPolicyResponse
s@FirewallPolicyResponse' {} Maybe Int
a -> FirewallPolicyResponse
s {$sel:consumedStatelessRuleCapacity:FirewallPolicyResponse' :: Maybe Int
consumedStatelessRuleCapacity = Maybe Int
a} :: FirewallPolicyResponse)

-- | The number of firewalls that are associated with this firewall policy.
firewallPolicyResponse_numberOfAssociations :: Lens.Lens' FirewallPolicyResponse (Prelude.Maybe Prelude.Int)
firewallPolicyResponse_numberOfAssociations :: (Maybe Int -> f (Maybe Int))
-> FirewallPolicyResponse -> f FirewallPolicyResponse
firewallPolicyResponse_numberOfAssociations = (FirewallPolicyResponse -> Maybe Int)
-> (FirewallPolicyResponse -> Maybe Int -> FirewallPolicyResponse)
-> Lens
     FirewallPolicyResponse
     FirewallPolicyResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallPolicyResponse' {Maybe Int
numberOfAssociations :: Maybe Int
$sel:numberOfAssociations:FirewallPolicyResponse' :: FirewallPolicyResponse -> Maybe Int
numberOfAssociations} -> Maybe Int
numberOfAssociations) (\s :: FirewallPolicyResponse
s@FirewallPolicyResponse' {} Maybe Int
a -> FirewallPolicyResponse
s {$sel:numberOfAssociations:FirewallPolicyResponse' :: Maybe Int
numberOfAssociations = Maybe Int
a} :: FirewallPolicyResponse)

-- | The current status of the firewall policy. You can retrieve this for a
-- firewall policy by calling DescribeFirewallPolicy and providing the
-- firewall policy\'s name or ARN.
firewallPolicyResponse_firewallPolicyStatus :: Lens.Lens' FirewallPolicyResponse (Prelude.Maybe ResourceStatus)
firewallPolicyResponse_firewallPolicyStatus :: (Maybe ResourceStatus -> f (Maybe ResourceStatus))
-> FirewallPolicyResponse -> f FirewallPolicyResponse
firewallPolicyResponse_firewallPolicyStatus = (FirewallPolicyResponse -> Maybe ResourceStatus)
-> (FirewallPolicyResponse
    -> Maybe ResourceStatus -> FirewallPolicyResponse)
-> Lens
     FirewallPolicyResponse
     FirewallPolicyResponse
     (Maybe ResourceStatus)
     (Maybe ResourceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallPolicyResponse' {Maybe ResourceStatus
firewallPolicyStatus :: Maybe ResourceStatus
$sel:firewallPolicyStatus:FirewallPolicyResponse' :: FirewallPolicyResponse -> Maybe ResourceStatus
firewallPolicyStatus} -> Maybe ResourceStatus
firewallPolicyStatus) (\s :: FirewallPolicyResponse
s@FirewallPolicyResponse' {} Maybe ResourceStatus
a -> FirewallPolicyResponse
s {$sel:firewallPolicyStatus:FirewallPolicyResponse' :: Maybe ResourceStatus
firewallPolicyStatus = Maybe ResourceStatus
a} :: FirewallPolicyResponse)

-- | The number of capacity units currently consumed by the policy\'s
-- stateful rules.
firewallPolicyResponse_consumedStatefulRuleCapacity :: Lens.Lens' FirewallPolicyResponse (Prelude.Maybe Prelude.Int)
firewallPolicyResponse_consumedStatefulRuleCapacity :: (Maybe Int -> f (Maybe Int))
-> FirewallPolicyResponse -> f FirewallPolicyResponse
firewallPolicyResponse_consumedStatefulRuleCapacity = (FirewallPolicyResponse -> Maybe Int)
-> (FirewallPolicyResponse -> Maybe Int -> FirewallPolicyResponse)
-> Lens
     FirewallPolicyResponse
     FirewallPolicyResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallPolicyResponse' {Maybe Int
consumedStatefulRuleCapacity :: Maybe Int
$sel:consumedStatefulRuleCapacity:FirewallPolicyResponse' :: FirewallPolicyResponse -> Maybe Int
consumedStatefulRuleCapacity} -> Maybe Int
consumedStatefulRuleCapacity) (\s :: FirewallPolicyResponse
s@FirewallPolicyResponse' {} Maybe Int
a -> FirewallPolicyResponse
s {$sel:consumedStatefulRuleCapacity:FirewallPolicyResponse' :: Maybe Int
consumedStatefulRuleCapacity = Maybe Int
a} :: FirewallPolicyResponse)

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

-- | The key:value pairs to associate with the resource.
firewallPolicyResponse_tags :: Lens.Lens' FirewallPolicyResponse (Prelude.Maybe (Prelude.NonEmpty Tag))
firewallPolicyResponse_tags :: (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> FirewallPolicyResponse -> f FirewallPolicyResponse
firewallPolicyResponse_tags = (FirewallPolicyResponse -> Maybe (NonEmpty Tag))
-> (FirewallPolicyResponse
    -> Maybe (NonEmpty Tag) -> FirewallPolicyResponse)
-> Lens
     FirewallPolicyResponse
     FirewallPolicyResponse
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallPolicyResponse' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:FirewallPolicyResponse' :: FirewallPolicyResponse -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: FirewallPolicyResponse
s@FirewallPolicyResponse' {} Maybe (NonEmpty Tag)
a -> FirewallPolicyResponse
s {$sel:tags:FirewallPolicyResponse' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: FirewallPolicyResponse) ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
 -> FirewallPolicyResponse -> f FirewallPolicyResponse)
-> ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
    -> Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> FirewallPolicyResponse
-> f FirewallPolicyResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
-> Iso
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
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 (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The Amazon Resource Name (ARN) of the firewall policy.
--
-- If this response is for a create request that had @DryRun@ set to
-- @TRUE@, then this ARN is a placeholder that isn\'t attached to a valid
-- resource.
firewallPolicyResponse_firewallPolicyArn :: Lens.Lens' FirewallPolicyResponse Prelude.Text
firewallPolicyResponse_firewallPolicyArn :: (Text -> f Text)
-> FirewallPolicyResponse -> f FirewallPolicyResponse
firewallPolicyResponse_firewallPolicyArn = (FirewallPolicyResponse -> Text)
-> (FirewallPolicyResponse -> Text -> FirewallPolicyResponse)
-> Lens FirewallPolicyResponse FirewallPolicyResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallPolicyResponse' {Text
firewallPolicyArn :: Text
$sel:firewallPolicyArn:FirewallPolicyResponse' :: FirewallPolicyResponse -> Text
firewallPolicyArn} -> Text
firewallPolicyArn) (\s :: FirewallPolicyResponse
s@FirewallPolicyResponse' {} Text
a -> FirewallPolicyResponse
s {$sel:firewallPolicyArn:FirewallPolicyResponse' :: Text
firewallPolicyArn = Text
a} :: FirewallPolicyResponse)

-- | The unique identifier for the firewall policy.
firewallPolicyResponse_firewallPolicyId :: Lens.Lens' FirewallPolicyResponse Prelude.Text
firewallPolicyResponse_firewallPolicyId :: (Text -> f Text)
-> FirewallPolicyResponse -> f FirewallPolicyResponse
firewallPolicyResponse_firewallPolicyId = (FirewallPolicyResponse -> Text)
-> (FirewallPolicyResponse -> Text -> FirewallPolicyResponse)
-> Lens FirewallPolicyResponse FirewallPolicyResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallPolicyResponse' {Text
firewallPolicyId :: Text
$sel:firewallPolicyId:FirewallPolicyResponse' :: FirewallPolicyResponse -> Text
firewallPolicyId} -> Text
firewallPolicyId) (\s :: FirewallPolicyResponse
s@FirewallPolicyResponse' {} Text
a -> FirewallPolicyResponse
s {$sel:firewallPolicyId:FirewallPolicyResponse' :: Text
firewallPolicyId = Text
a} :: FirewallPolicyResponse)

instance Core.FromJSON FirewallPolicyResponse where
  parseJSON :: Value -> Parser FirewallPolicyResponse
parseJSON =
    String
-> (Object -> Parser FirewallPolicyResponse)
-> Value
-> Parser FirewallPolicyResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"FirewallPolicyResponse"
      ( \Object
x ->
          Maybe Int
-> Maybe Int
-> Maybe ResourceStatus
-> Maybe Int
-> Maybe Text
-> Maybe (NonEmpty Tag)
-> Text
-> Text
-> Text
-> FirewallPolicyResponse
FirewallPolicyResponse'
            (Maybe Int
 -> Maybe Int
 -> Maybe ResourceStatus
 -> Maybe Int
 -> Maybe Text
 -> Maybe (NonEmpty Tag)
 -> Text
 -> Text
 -> Text
 -> FirewallPolicyResponse)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe ResourceStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Text
      -> Text
      -> Text
      -> FirewallPolicyResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConsumedStatelessRuleCapacity")
            Parser
  (Maybe Int
   -> Maybe ResourceStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Text
   -> Text
   -> Text
   -> FirewallPolicyResponse)
-> Parser (Maybe Int)
-> Parser
     (Maybe ResourceStatus
      -> Maybe Int
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Text
      -> Text
      -> Text
      -> FirewallPolicyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NumberOfAssociations")
            Parser
  (Maybe ResourceStatus
   -> Maybe Int
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Text
   -> Text
   -> Text
   -> FirewallPolicyResponse)
-> Parser (Maybe ResourceStatus)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Text
      -> Text
      -> Text
      -> FirewallPolicyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FirewallPolicyStatus")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Text
   -> Text
   -> Text
   -> FirewallPolicyResponse)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty Tag)
      -> Text
      -> Text
      -> Text
      -> FirewallPolicyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConsumedStatefulRuleCapacity")
            Parser
  (Maybe Text
   -> Maybe (NonEmpty Tag)
   -> Text
   -> Text
   -> Text
   -> FirewallPolicyResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty Tag)
      -> Text -> Text -> Text -> FirewallPolicyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
            Parser
  (Maybe (NonEmpty Tag)
   -> Text -> Text -> Text -> FirewallPolicyResponse)
-> Parser (Maybe (NonEmpty Tag))
-> Parser (Text -> Text -> Text -> FirewallPolicyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Tag))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags")
            Parser (Text -> Text -> Text -> FirewallPolicyResponse)
-> Parser Text -> Parser (Text -> Text -> FirewallPolicyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"FirewallPolicyName")
            Parser (Text -> Text -> FirewallPolicyResponse)
-> Parser Text -> Parser (Text -> FirewallPolicyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"FirewallPolicyArn")
            Parser (Text -> FirewallPolicyResponse)
-> Parser Text -> Parser FirewallPolicyResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"FirewallPolicyId")
      )

instance Prelude.Hashable FirewallPolicyResponse

instance Prelude.NFData FirewallPolicyResponse