{-# 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.Route53Resolver.Types.FirewallRuleGroup
-- 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.Route53Resolver.Types.FirewallRuleGroup where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53Resolver.Types.FirewallRuleGroupStatus
import Amazonka.Route53Resolver.Types.ShareStatus

-- | High-level information for a firewall rule group. A firewall rule group
-- is a collection of rules that DNS Firewall uses to filter DNS network
-- traffic for a VPC. To retrieve the rules for the rule group, call
-- ListFirewallRules.
--
-- /See:/ 'newFirewallRuleGroup' smart constructor.
data FirewallRuleGroup = FirewallRuleGroup'
  { -- | The date and time that the rule group was created, in Unix time format
    -- and Coordinated Universal Time (UTC).
    FirewallRuleGroup -> Maybe Text
creationTime :: Prelude.Maybe Prelude.Text,
    -- | The status of the domain list.
    FirewallRuleGroup -> Maybe FirewallRuleGroupStatus
status :: Prelude.Maybe FirewallRuleGroupStatus,
    -- | The ARN (Amazon Resource Name) of the rule group.
    FirewallRuleGroup -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | A unique string defined by you to identify the request. This allows you
    -- to retry failed requests without the risk of running the operation
    -- twice. This can be any unique string, for example, a timestamp.
    FirewallRuleGroup -> Maybe Text
creatorRequestId :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the rule group was last modified, in Unix time
    -- format and Coordinated Universal Time (UTC).
    FirewallRuleGroup -> Maybe Text
modificationTime :: Prelude.Maybe Prelude.Text,
    -- | Whether the rule group is shared with other Amazon Web Services
    -- accounts, or was shared with the current account by another Amazon Web
    -- Services account. Sharing is configured through Resource Access Manager
    -- (RAM).
    FirewallRuleGroup -> Maybe ShareStatus
shareStatus :: Prelude.Maybe ShareStatus,
    -- | The Amazon Web Services account ID for the account that created the rule
    -- group. When a rule group is shared with your account, this is the
    -- account that has shared the rule group with you.
    FirewallRuleGroup -> Maybe Text
ownerId :: Prelude.Maybe Prelude.Text,
    -- | Additional information about the status of the rule group, if available.
    FirewallRuleGroup -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | The name of the rule group.
    FirewallRuleGroup -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The ID of the rule group.
    FirewallRuleGroup -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The number of rules in the rule group.
    FirewallRuleGroup -> Maybe Int
ruleCount :: Prelude.Maybe Prelude.Int
  }
  deriving (FirewallRuleGroup -> FirewallRuleGroup -> Bool
(FirewallRuleGroup -> FirewallRuleGroup -> Bool)
-> (FirewallRuleGroup -> FirewallRuleGroup -> Bool)
-> Eq FirewallRuleGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FirewallRuleGroup -> FirewallRuleGroup -> Bool
$c/= :: FirewallRuleGroup -> FirewallRuleGroup -> Bool
== :: FirewallRuleGroup -> FirewallRuleGroup -> Bool
$c== :: FirewallRuleGroup -> FirewallRuleGroup -> Bool
Prelude.Eq, ReadPrec [FirewallRuleGroup]
ReadPrec FirewallRuleGroup
Int -> ReadS FirewallRuleGroup
ReadS [FirewallRuleGroup]
(Int -> ReadS FirewallRuleGroup)
-> ReadS [FirewallRuleGroup]
-> ReadPrec FirewallRuleGroup
-> ReadPrec [FirewallRuleGroup]
-> Read FirewallRuleGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FirewallRuleGroup]
$creadListPrec :: ReadPrec [FirewallRuleGroup]
readPrec :: ReadPrec FirewallRuleGroup
$creadPrec :: ReadPrec FirewallRuleGroup
readList :: ReadS [FirewallRuleGroup]
$creadList :: ReadS [FirewallRuleGroup]
readsPrec :: Int -> ReadS FirewallRuleGroup
$creadsPrec :: Int -> ReadS FirewallRuleGroup
Prelude.Read, Int -> FirewallRuleGroup -> ShowS
[FirewallRuleGroup] -> ShowS
FirewallRuleGroup -> String
(Int -> FirewallRuleGroup -> ShowS)
-> (FirewallRuleGroup -> String)
-> ([FirewallRuleGroup] -> ShowS)
-> Show FirewallRuleGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FirewallRuleGroup] -> ShowS
$cshowList :: [FirewallRuleGroup] -> ShowS
show :: FirewallRuleGroup -> String
$cshow :: FirewallRuleGroup -> String
showsPrec :: Int -> FirewallRuleGroup -> ShowS
$cshowsPrec :: Int -> FirewallRuleGroup -> ShowS
Prelude.Show, (forall x. FirewallRuleGroup -> Rep FirewallRuleGroup x)
-> (forall x. Rep FirewallRuleGroup x -> FirewallRuleGroup)
-> Generic FirewallRuleGroup
forall x. Rep FirewallRuleGroup x -> FirewallRuleGroup
forall x. FirewallRuleGroup -> Rep FirewallRuleGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FirewallRuleGroup x -> FirewallRuleGroup
$cfrom :: forall x. FirewallRuleGroup -> Rep FirewallRuleGroup x
Prelude.Generic)

-- |
-- Create a value of 'FirewallRuleGroup' 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:
--
-- 'creationTime', 'firewallRuleGroup_creationTime' - The date and time that the rule group was created, in Unix time format
-- and Coordinated Universal Time (UTC).
--
-- 'status', 'firewallRuleGroup_status' - The status of the domain list.
--
-- 'arn', 'firewallRuleGroup_arn' - The ARN (Amazon Resource Name) of the rule group.
--
-- 'creatorRequestId', 'firewallRuleGroup_creatorRequestId' - A unique string defined by you to identify the request. This allows you
-- to retry failed requests without the risk of running the operation
-- twice. This can be any unique string, for example, a timestamp.
--
-- 'modificationTime', 'firewallRuleGroup_modificationTime' - The date and time that the rule group was last modified, in Unix time
-- format and Coordinated Universal Time (UTC).
--
-- 'shareStatus', 'firewallRuleGroup_shareStatus' - Whether the rule group is shared with other Amazon Web Services
-- accounts, or was shared with the current account by another Amazon Web
-- Services account. Sharing is configured through Resource Access Manager
-- (RAM).
--
-- 'ownerId', 'firewallRuleGroup_ownerId' - The Amazon Web Services account ID for the account that created the rule
-- group. When a rule group is shared with your account, this is the
-- account that has shared the rule group with you.
--
-- 'statusMessage', 'firewallRuleGroup_statusMessage' - Additional information about the status of the rule group, if available.
--
-- 'name', 'firewallRuleGroup_name' - The name of the rule group.
--
-- 'id', 'firewallRuleGroup_id' - The ID of the rule group.
--
-- 'ruleCount', 'firewallRuleGroup_ruleCount' - The number of rules in the rule group.
newFirewallRuleGroup ::
  FirewallRuleGroup
newFirewallRuleGroup :: FirewallRuleGroup
newFirewallRuleGroup =
  FirewallRuleGroup' :: Maybe Text
-> Maybe FirewallRuleGroupStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ShareStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> FirewallRuleGroup
FirewallRuleGroup'
    { $sel:creationTime:FirewallRuleGroup' :: Maybe Text
creationTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:FirewallRuleGroup' :: Maybe FirewallRuleGroupStatus
status = Maybe FirewallRuleGroupStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:FirewallRuleGroup' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creatorRequestId:FirewallRuleGroup' :: Maybe Text
creatorRequestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:modificationTime:FirewallRuleGroup' :: Maybe Text
modificationTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:shareStatus:FirewallRuleGroup' :: Maybe ShareStatus
shareStatus = Maybe ShareStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:ownerId:FirewallRuleGroup' :: Maybe Text
ownerId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:FirewallRuleGroup' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:FirewallRuleGroup' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:FirewallRuleGroup' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ruleCount:FirewallRuleGroup' :: Maybe Int
ruleCount = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | The date and time that the rule group was created, in Unix time format
-- and Coordinated Universal Time (UTC).
firewallRuleGroup_creationTime :: Lens.Lens' FirewallRuleGroup (Prelude.Maybe Prelude.Text)
firewallRuleGroup_creationTime :: (Maybe Text -> f (Maybe Text))
-> FirewallRuleGroup -> f FirewallRuleGroup
firewallRuleGroup_creationTime = (FirewallRuleGroup -> Maybe Text)
-> (FirewallRuleGroup -> Maybe Text -> FirewallRuleGroup)
-> Lens
     FirewallRuleGroup FirewallRuleGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroup' {Maybe Text
creationTime :: Maybe Text
$sel:creationTime:FirewallRuleGroup' :: FirewallRuleGroup -> Maybe Text
creationTime} -> Maybe Text
creationTime) (\s :: FirewallRuleGroup
s@FirewallRuleGroup' {} Maybe Text
a -> FirewallRuleGroup
s {$sel:creationTime:FirewallRuleGroup' :: Maybe Text
creationTime = Maybe Text
a} :: FirewallRuleGroup)

-- | The status of the domain list.
firewallRuleGroup_status :: Lens.Lens' FirewallRuleGroup (Prelude.Maybe FirewallRuleGroupStatus)
firewallRuleGroup_status :: (Maybe FirewallRuleGroupStatus
 -> f (Maybe FirewallRuleGroupStatus))
-> FirewallRuleGroup -> f FirewallRuleGroup
firewallRuleGroup_status = (FirewallRuleGroup -> Maybe FirewallRuleGroupStatus)
-> (FirewallRuleGroup
    -> Maybe FirewallRuleGroupStatus -> FirewallRuleGroup)
-> Lens
     FirewallRuleGroup
     FirewallRuleGroup
     (Maybe FirewallRuleGroupStatus)
     (Maybe FirewallRuleGroupStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroup' {Maybe FirewallRuleGroupStatus
status :: Maybe FirewallRuleGroupStatus
$sel:status:FirewallRuleGroup' :: FirewallRuleGroup -> Maybe FirewallRuleGroupStatus
status} -> Maybe FirewallRuleGroupStatus
status) (\s :: FirewallRuleGroup
s@FirewallRuleGroup' {} Maybe FirewallRuleGroupStatus
a -> FirewallRuleGroup
s {$sel:status:FirewallRuleGroup' :: Maybe FirewallRuleGroupStatus
status = Maybe FirewallRuleGroupStatus
a} :: FirewallRuleGroup)

-- | The ARN (Amazon Resource Name) of the rule group.
firewallRuleGroup_arn :: Lens.Lens' FirewallRuleGroup (Prelude.Maybe Prelude.Text)
firewallRuleGroup_arn :: (Maybe Text -> f (Maybe Text))
-> FirewallRuleGroup -> f FirewallRuleGroup
firewallRuleGroup_arn = (FirewallRuleGroup -> Maybe Text)
-> (FirewallRuleGroup -> Maybe Text -> FirewallRuleGroup)
-> Lens
     FirewallRuleGroup FirewallRuleGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroup' {Maybe Text
arn :: Maybe Text
$sel:arn:FirewallRuleGroup' :: FirewallRuleGroup -> Maybe Text
arn} -> Maybe Text
arn) (\s :: FirewallRuleGroup
s@FirewallRuleGroup' {} Maybe Text
a -> FirewallRuleGroup
s {$sel:arn:FirewallRuleGroup' :: Maybe Text
arn = Maybe Text
a} :: FirewallRuleGroup)

-- | A unique string defined by you to identify the request. This allows you
-- to retry failed requests without the risk of running the operation
-- twice. This can be any unique string, for example, a timestamp.
firewallRuleGroup_creatorRequestId :: Lens.Lens' FirewallRuleGroup (Prelude.Maybe Prelude.Text)
firewallRuleGroup_creatorRequestId :: (Maybe Text -> f (Maybe Text))
-> FirewallRuleGroup -> f FirewallRuleGroup
firewallRuleGroup_creatorRequestId = (FirewallRuleGroup -> Maybe Text)
-> (FirewallRuleGroup -> Maybe Text -> FirewallRuleGroup)
-> Lens
     FirewallRuleGroup FirewallRuleGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroup' {Maybe Text
creatorRequestId :: Maybe Text
$sel:creatorRequestId:FirewallRuleGroup' :: FirewallRuleGroup -> Maybe Text
creatorRequestId} -> Maybe Text
creatorRequestId) (\s :: FirewallRuleGroup
s@FirewallRuleGroup' {} Maybe Text
a -> FirewallRuleGroup
s {$sel:creatorRequestId:FirewallRuleGroup' :: Maybe Text
creatorRequestId = Maybe Text
a} :: FirewallRuleGroup)

-- | The date and time that the rule group was last modified, in Unix time
-- format and Coordinated Universal Time (UTC).
firewallRuleGroup_modificationTime :: Lens.Lens' FirewallRuleGroup (Prelude.Maybe Prelude.Text)
firewallRuleGroup_modificationTime :: (Maybe Text -> f (Maybe Text))
-> FirewallRuleGroup -> f FirewallRuleGroup
firewallRuleGroup_modificationTime = (FirewallRuleGroup -> Maybe Text)
-> (FirewallRuleGroup -> Maybe Text -> FirewallRuleGroup)
-> Lens
     FirewallRuleGroup FirewallRuleGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroup' {Maybe Text
modificationTime :: Maybe Text
$sel:modificationTime:FirewallRuleGroup' :: FirewallRuleGroup -> Maybe Text
modificationTime} -> Maybe Text
modificationTime) (\s :: FirewallRuleGroup
s@FirewallRuleGroup' {} Maybe Text
a -> FirewallRuleGroup
s {$sel:modificationTime:FirewallRuleGroup' :: Maybe Text
modificationTime = Maybe Text
a} :: FirewallRuleGroup)

-- | Whether the rule group is shared with other Amazon Web Services
-- accounts, or was shared with the current account by another Amazon Web
-- Services account. Sharing is configured through Resource Access Manager
-- (RAM).
firewallRuleGroup_shareStatus :: Lens.Lens' FirewallRuleGroup (Prelude.Maybe ShareStatus)
firewallRuleGroup_shareStatus :: (Maybe ShareStatus -> f (Maybe ShareStatus))
-> FirewallRuleGroup -> f FirewallRuleGroup
firewallRuleGroup_shareStatus = (FirewallRuleGroup -> Maybe ShareStatus)
-> (FirewallRuleGroup -> Maybe ShareStatus -> FirewallRuleGroup)
-> Lens
     FirewallRuleGroup
     FirewallRuleGroup
     (Maybe ShareStatus)
     (Maybe ShareStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroup' {Maybe ShareStatus
shareStatus :: Maybe ShareStatus
$sel:shareStatus:FirewallRuleGroup' :: FirewallRuleGroup -> Maybe ShareStatus
shareStatus} -> Maybe ShareStatus
shareStatus) (\s :: FirewallRuleGroup
s@FirewallRuleGroup' {} Maybe ShareStatus
a -> FirewallRuleGroup
s {$sel:shareStatus:FirewallRuleGroup' :: Maybe ShareStatus
shareStatus = Maybe ShareStatus
a} :: FirewallRuleGroup)

-- | The Amazon Web Services account ID for the account that created the rule
-- group. When a rule group is shared with your account, this is the
-- account that has shared the rule group with you.
firewallRuleGroup_ownerId :: Lens.Lens' FirewallRuleGroup (Prelude.Maybe Prelude.Text)
firewallRuleGroup_ownerId :: (Maybe Text -> f (Maybe Text))
-> FirewallRuleGroup -> f FirewallRuleGroup
firewallRuleGroup_ownerId = (FirewallRuleGroup -> Maybe Text)
-> (FirewallRuleGroup -> Maybe Text -> FirewallRuleGroup)
-> Lens
     FirewallRuleGroup FirewallRuleGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroup' {Maybe Text
ownerId :: Maybe Text
$sel:ownerId:FirewallRuleGroup' :: FirewallRuleGroup -> Maybe Text
ownerId} -> Maybe Text
ownerId) (\s :: FirewallRuleGroup
s@FirewallRuleGroup' {} Maybe Text
a -> FirewallRuleGroup
s {$sel:ownerId:FirewallRuleGroup' :: Maybe Text
ownerId = Maybe Text
a} :: FirewallRuleGroup)

-- | Additional information about the status of the rule group, if available.
firewallRuleGroup_statusMessage :: Lens.Lens' FirewallRuleGroup (Prelude.Maybe Prelude.Text)
firewallRuleGroup_statusMessage :: (Maybe Text -> f (Maybe Text))
-> FirewallRuleGroup -> f FirewallRuleGroup
firewallRuleGroup_statusMessage = (FirewallRuleGroup -> Maybe Text)
-> (FirewallRuleGroup -> Maybe Text -> FirewallRuleGroup)
-> Lens
     FirewallRuleGroup FirewallRuleGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroup' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:FirewallRuleGroup' :: FirewallRuleGroup -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: FirewallRuleGroup
s@FirewallRuleGroup' {} Maybe Text
a -> FirewallRuleGroup
s {$sel:statusMessage:FirewallRuleGroup' :: Maybe Text
statusMessage = Maybe Text
a} :: FirewallRuleGroup)

-- | The name of the rule group.
firewallRuleGroup_name :: Lens.Lens' FirewallRuleGroup (Prelude.Maybe Prelude.Text)
firewallRuleGroup_name :: (Maybe Text -> f (Maybe Text))
-> FirewallRuleGroup -> f FirewallRuleGroup
firewallRuleGroup_name = (FirewallRuleGroup -> Maybe Text)
-> (FirewallRuleGroup -> Maybe Text -> FirewallRuleGroup)
-> Lens
     FirewallRuleGroup FirewallRuleGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroup' {Maybe Text
name :: Maybe Text
$sel:name:FirewallRuleGroup' :: FirewallRuleGroup -> Maybe Text
name} -> Maybe Text
name) (\s :: FirewallRuleGroup
s@FirewallRuleGroup' {} Maybe Text
a -> FirewallRuleGroup
s {$sel:name:FirewallRuleGroup' :: Maybe Text
name = Maybe Text
a} :: FirewallRuleGroup)

-- | The ID of the rule group.
firewallRuleGroup_id :: Lens.Lens' FirewallRuleGroup (Prelude.Maybe Prelude.Text)
firewallRuleGroup_id :: (Maybe Text -> f (Maybe Text))
-> FirewallRuleGroup -> f FirewallRuleGroup
firewallRuleGroup_id = (FirewallRuleGroup -> Maybe Text)
-> (FirewallRuleGroup -> Maybe Text -> FirewallRuleGroup)
-> Lens
     FirewallRuleGroup FirewallRuleGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroup' {Maybe Text
id :: Maybe Text
$sel:id:FirewallRuleGroup' :: FirewallRuleGroup -> Maybe Text
id} -> Maybe Text
id) (\s :: FirewallRuleGroup
s@FirewallRuleGroup' {} Maybe Text
a -> FirewallRuleGroup
s {$sel:id:FirewallRuleGroup' :: Maybe Text
id = Maybe Text
a} :: FirewallRuleGroup)

-- | The number of rules in the rule group.
firewallRuleGroup_ruleCount :: Lens.Lens' FirewallRuleGroup (Prelude.Maybe Prelude.Int)
firewallRuleGroup_ruleCount :: (Maybe Int -> f (Maybe Int))
-> FirewallRuleGroup -> f FirewallRuleGroup
firewallRuleGroup_ruleCount = (FirewallRuleGroup -> Maybe Int)
-> (FirewallRuleGroup -> Maybe Int -> FirewallRuleGroup)
-> Lens FirewallRuleGroup FirewallRuleGroup (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroup' {Maybe Int
ruleCount :: Maybe Int
$sel:ruleCount:FirewallRuleGroup' :: FirewallRuleGroup -> Maybe Int
ruleCount} -> Maybe Int
ruleCount) (\s :: FirewallRuleGroup
s@FirewallRuleGroup' {} Maybe Int
a -> FirewallRuleGroup
s {$sel:ruleCount:FirewallRuleGroup' :: Maybe Int
ruleCount = Maybe Int
a} :: FirewallRuleGroup)

instance Core.FromJSON FirewallRuleGroup where
  parseJSON :: Value -> Parser FirewallRuleGroup
parseJSON =
    String
-> (Object -> Parser FirewallRuleGroup)
-> Value
-> Parser FirewallRuleGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"FirewallRuleGroup"
      ( \Object
x ->
          Maybe Text
-> Maybe FirewallRuleGroupStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ShareStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> FirewallRuleGroup
FirewallRuleGroup'
            (Maybe Text
 -> Maybe FirewallRuleGroupStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ShareStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> FirewallRuleGroup)
-> Parser (Maybe Text)
-> Parser
     (Maybe FirewallRuleGroupStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ShareStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> FirewallRuleGroup)
forall (f :: * -> *) a b. Functor 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
"CreationTime")
            Parser
  (Maybe FirewallRuleGroupStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ShareStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> FirewallRuleGroup)
-> Parser (Maybe FirewallRuleGroupStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ShareStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> FirewallRuleGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FirewallRuleGroupStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ShareStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> FirewallRuleGroup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ShareStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> FirewallRuleGroup)
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
"Arn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ShareStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> FirewallRuleGroup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ShareStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> FirewallRuleGroup)
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
"CreatorRequestId")
            Parser
  (Maybe Text
   -> Maybe ShareStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> FirewallRuleGroup)
-> Parser (Maybe Text)
-> Parser
     (Maybe ShareStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> FirewallRuleGroup)
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
"ModificationTime")
            Parser
  (Maybe ShareStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> FirewallRuleGroup)
-> Parser (Maybe ShareStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> FirewallRuleGroup)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ShareStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ShareStatus")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> FirewallRuleGroup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Maybe Int -> FirewallRuleGroup)
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
"OwnerId")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Maybe Int -> FirewallRuleGroup)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Int -> FirewallRuleGroup)
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
"StatusMessage")
            Parser (Maybe Text -> Maybe Text -> Maybe Int -> FirewallRuleGroup)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Int -> FirewallRuleGroup)
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
"Name")
            Parser (Maybe Text -> Maybe Int -> FirewallRuleGroup)
-> Parser (Maybe Text) -> Parser (Maybe Int -> FirewallRuleGroup)
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
"Id")
            Parser (Maybe Int -> FirewallRuleGroup)
-> Parser (Maybe Int) -> Parser FirewallRuleGroup
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
"RuleCount")
      )

instance Prelude.Hashable FirewallRuleGroup

instance Prelude.NFData FirewallRuleGroup