{-# 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 #-}
module Amazonka.Route53Resolver.Types.FirewallRuleGroupMetadata where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53Resolver.Types.ShareStatus
data FirewallRuleGroupMetadata = FirewallRuleGroupMetadata'
{
FirewallRuleGroupMetadata -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
FirewallRuleGroupMetadata -> Maybe Text
creatorRequestId :: Prelude.Maybe Prelude.Text,
FirewallRuleGroupMetadata -> Maybe ShareStatus
shareStatus :: Prelude.Maybe ShareStatus,
FirewallRuleGroupMetadata -> Maybe Text
ownerId :: Prelude.Maybe Prelude.Text,
FirewallRuleGroupMetadata -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
FirewallRuleGroupMetadata -> Maybe Text
id :: Prelude.Maybe Prelude.Text
}
deriving (FirewallRuleGroupMetadata -> FirewallRuleGroupMetadata -> Bool
(FirewallRuleGroupMetadata -> FirewallRuleGroupMetadata -> Bool)
-> (FirewallRuleGroupMetadata -> FirewallRuleGroupMetadata -> Bool)
-> Eq FirewallRuleGroupMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FirewallRuleGroupMetadata -> FirewallRuleGroupMetadata -> Bool
$c/= :: FirewallRuleGroupMetadata -> FirewallRuleGroupMetadata -> Bool
== :: FirewallRuleGroupMetadata -> FirewallRuleGroupMetadata -> Bool
$c== :: FirewallRuleGroupMetadata -> FirewallRuleGroupMetadata -> Bool
Prelude.Eq, ReadPrec [FirewallRuleGroupMetadata]
ReadPrec FirewallRuleGroupMetadata
Int -> ReadS FirewallRuleGroupMetadata
ReadS [FirewallRuleGroupMetadata]
(Int -> ReadS FirewallRuleGroupMetadata)
-> ReadS [FirewallRuleGroupMetadata]
-> ReadPrec FirewallRuleGroupMetadata
-> ReadPrec [FirewallRuleGroupMetadata]
-> Read FirewallRuleGroupMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FirewallRuleGroupMetadata]
$creadListPrec :: ReadPrec [FirewallRuleGroupMetadata]
readPrec :: ReadPrec FirewallRuleGroupMetadata
$creadPrec :: ReadPrec FirewallRuleGroupMetadata
readList :: ReadS [FirewallRuleGroupMetadata]
$creadList :: ReadS [FirewallRuleGroupMetadata]
readsPrec :: Int -> ReadS FirewallRuleGroupMetadata
$creadsPrec :: Int -> ReadS FirewallRuleGroupMetadata
Prelude.Read, Int -> FirewallRuleGroupMetadata -> ShowS
[FirewallRuleGroupMetadata] -> ShowS
FirewallRuleGroupMetadata -> String
(Int -> FirewallRuleGroupMetadata -> ShowS)
-> (FirewallRuleGroupMetadata -> String)
-> ([FirewallRuleGroupMetadata] -> ShowS)
-> Show FirewallRuleGroupMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FirewallRuleGroupMetadata] -> ShowS
$cshowList :: [FirewallRuleGroupMetadata] -> ShowS
show :: FirewallRuleGroupMetadata -> String
$cshow :: FirewallRuleGroupMetadata -> String
showsPrec :: Int -> FirewallRuleGroupMetadata -> ShowS
$cshowsPrec :: Int -> FirewallRuleGroupMetadata -> ShowS
Prelude.Show, (forall x.
FirewallRuleGroupMetadata -> Rep FirewallRuleGroupMetadata x)
-> (forall x.
Rep FirewallRuleGroupMetadata x -> FirewallRuleGroupMetadata)
-> Generic FirewallRuleGroupMetadata
forall x.
Rep FirewallRuleGroupMetadata x -> FirewallRuleGroupMetadata
forall x.
FirewallRuleGroupMetadata -> Rep FirewallRuleGroupMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FirewallRuleGroupMetadata x -> FirewallRuleGroupMetadata
$cfrom :: forall x.
FirewallRuleGroupMetadata -> Rep FirewallRuleGroupMetadata x
Prelude.Generic)
newFirewallRuleGroupMetadata ::
FirewallRuleGroupMetadata
newFirewallRuleGroupMetadata :: FirewallRuleGroupMetadata
newFirewallRuleGroupMetadata =
FirewallRuleGroupMetadata' :: Maybe Text
-> Maybe Text
-> Maybe ShareStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> FirewallRuleGroupMetadata
FirewallRuleGroupMetadata'
{ $sel:arn:FirewallRuleGroupMetadata' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creatorRequestId:FirewallRuleGroupMetadata' :: Maybe Text
creatorRequestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:shareStatus:FirewallRuleGroupMetadata' :: Maybe ShareStatus
shareStatus = Maybe ShareStatus
forall a. Maybe a
Prelude.Nothing,
$sel:ownerId:FirewallRuleGroupMetadata' :: Maybe Text
ownerId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:FirewallRuleGroupMetadata' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:FirewallRuleGroupMetadata' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
firewallRuleGroupMetadata_arn :: Lens.Lens' FirewallRuleGroupMetadata (Prelude.Maybe Prelude.Text)
firewallRuleGroupMetadata_arn :: (Maybe Text -> f (Maybe Text))
-> FirewallRuleGroupMetadata -> f FirewallRuleGroupMetadata
firewallRuleGroupMetadata_arn = (FirewallRuleGroupMetadata -> Maybe Text)
-> (FirewallRuleGroupMetadata
-> Maybe Text -> FirewallRuleGroupMetadata)
-> Lens
FirewallRuleGroupMetadata
FirewallRuleGroupMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroupMetadata' {Maybe Text
arn :: Maybe Text
$sel:arn:FirewallRuleGroupMetadata' :: FirewallRuleGroupMetadata -> Maybe Text
arn} -> Maybe Text
arn) (\s :: FirewallRuleGroupMetadata
s@FirewallRuleGroupMetadata' {} Maybe Text
a -> FirewallRuleGroupMetadata
s {$sel:arn:FirewallRuleGroupMetadata' :: Maybe Text
arn = Maybe Text
a} :: FirewallRuleGroupMetadata)
firewallRuleGroupMetadata_creatorRequestId :: Lens.Lens' FirewallRuleGroupMetadata (Prelude.Maybe Prelude.Text)
firewallRuleGroupMetadata_creatorRequestId :: (Maybe Text -> f (Maybe Text))
-> FirewallRuleGroupMetadata -> f FirewallRuleGroupMetadata
firewallRuleGroupMetadata_creatorRequestId = (FirewallRuleGroupMetadata -> Maybe Text)
-> (FirewallRuleGroupMetadata
-> Maybe Text -> FirewallRuleGroupMetadata)
-> Lens
FirewallRuleGroupMetadata
FirewallRuleGroupMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroupMetadata' {Maybe Text
creatorRequestId :: Maybe Text
$sel:creatorRequestId:FirewallRuleGroupMetadata' :: FirewallRuleGroupMetadata -> Maybe Text
creatorRequestId} -> Maybe Text
creatorRequestId) (\s :: FirewallRuleGroupMetadata
s@FirewallRuleGroupMetadata' {} Maybe Text
a -> FirewallRuleGroupMetadata
s {$sel:creatorRequestId:FirewallRuleGroupMetadata' :: Maybe Text
creatorRequestId = Maybe Text
a} :: FirewallRuleGroupMetadata)
firewallRuleGroupMetadata_shareStatus :: Lens.Lens' FirewallRuleGroupMetadata (Prelude.Maybe ShareStatus)
firewallRuleGroupMetadata_shareStatus :: (Maybe ShareStatus -> f (Maybe ShareStatus))
-> FirewallRuleGroupMetadata -> f FirewallRuleGroupMetadata
firewallRuleGroupMetadata_shareStatus = (FirewallRuleGroupMetadata -> Maybe ShareStatus)
-> (FirewallRuleGroupMetadata
-> Maybe ShareStatus -> FirewallRuleGroupMetadata)
-> Lens
FirewallRuleGroupMetadata
FirewallRuleGroupMetadata
(Maybe ShareStatus)
(Maybe ShareStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroupMetadata' {Maybe ShareStatus
shareStatus :: Maybe ShareStatus
$sel:shareStatus:FirewallRuleGroupMetadata' :: FirewallRuleGroupMetadata -> Maybe ShareStatus
shareStatus} -> Maybe ShareStatus
shareStatus) (\s :: FirewallRuleGroupMetadata
s@FirewallRuleGroupMetadata' {} Maybe ShareStatus
a -> FirewallRuleGroupMetadata
s {$sel:shareStatus:FirewallRuleGroupMetadata' :: Maybe ShareStatus
shareStatus = Maybe ShareStatus
a} :: FirewallRuleGroupMetadata)
firewallRuleGroupMetadata_ownerId :: Lens.Lens' FirewallRuleGroupMetadata (Prelude.Maybe Prelude.Text)
firewallRuleGroupMetadata_ownerId :: (Maybe Text -> f (Maybe Text))
-> FirewallRuleGroupMetadata -> f FirewallRuleGroupMetadata
firewallRuleGroupMetadata_ownerId = (FirewallRuleGroupMetadata -> Maybe Text)
-> (FirewallRuleGroupMetadata
-> Maybe Text -> FirewallRuleGroupMetadata)
-> Lens
FirewallRuleGroupMetadata
FirewallRuleGroupMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroupMetadata' {Maybe Text
ownerId :: Maybe Text
$sel:ownerId:FirewallRuleGroupMetadata' :: FirewallRuleGroupMetadata -> Maybe Text
ownerId} -> Maybe Text
ownerId) (\s :: FirewallRuleGroupMetadata
s@FirewallRuleGroupMetadata' {} Maybe Text
a -> FirewallRuleGroupMetadata
s {$sel:ownerId:FirewallRuleGroupMetadata' :: Maybe Text
ownerId = Maybe Text
a} :: FirewallRuleGroupMetadata)
firewallRuleGroupMetadata_name :: Lens.Lens' FirewallRuleGroupMetadata (Prelude.Maybe Prelude.Text)
firewallRuleGroupMetadata_name :: (Maybe Text -> f (Maybe Text))
-> FirewallRuleGroupMetadata -> f FirewallRuleGroupMetadata
firewallRuleGroupMetadata_name = (FirewallRuleGroupMetadata -> Maybe Text)
-> (FirewallRuleGroupMetadata
-> Maybe Text -> FirewallRuleGroupMetadata)
-> Lens
FirewallRuleGroupMetadata
FirewallRuleGroupMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroupMetadata' {Maybe Text
name :: Maybe Text
$sel:name:FirewallRuleGroupMetadata' :: FirewallRuleGroupMetadata -> Maybe Text
name} -> Maybe Text
name) (\s :: FirewallRuleGroupMetadata
s@FirewallRuleGroupMetadata' {} Maybe Text
a -> FirewallRuleGroupMetadata
s {$sel:name:FirewallRuleGroupMetadata' :: Maybe Text
name = Maybe Text
a} :: FirewallRuleGroupMetadata)
firewallRuleGroupMetadata_id :: Lens.Lens' FirewallRuleGroupMetadata (Prelude.Maybe Prelude.Text)
firewallRuleGroupMetadata_id :: (Maybe Text -> f (Maybe Text))
-> FirewallRuleGroupMetadata -> f FirewallRuleGroupMetadata
firewallRuleGroupMetadata_id = (FirewallRuleGroupMetadata -> Maybe Text)
-> (FirewallRuleGroupMetadata
-> Maybe Text -> FirewallRuleGroupMetadata)
-> Lens
FirewallRuleGroupMetadata
FirewallRuleGroupMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FirewallRuleGroupMetadata' {Maybe Text
id :: Maybe Text
$sel:id:FirewallRuleGroupMetadata' :: FirewallRuleGroupMetadata -> Maybe Text
id} -> Maybe Text
id) (\s :: FirewallRuleGroupMetadata
s@FirewallRuleGroupMetadata' {} Maybe Text
a -> FirewallRuleGroupMetadata
s {$sel:id:FirewallRuleGroupMetadata' :: Maybe Text
id = Maybe Text
a} :: FirewallRuleGroupMetadata)
instance Core.FromJSON FirewallRuleGroupMetadata where
parseJSON :: Value -> Parser FirewallRuleGroupMetadata
parseJSON =
String
-> (Object -> Parser FirewallRuleGroupMetadata)
-> Value
-> Parser FirewallRuleGroupMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FirewallRuleGroupMetadata"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe ShareStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> FirewallRuleGroupMetadata
FirewallRuleGroupMetadata'
(Maybe Text
-> Maybe Text
-> Maybe ShareStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> FirewallRuleGroupMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe ShareStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> FirewallRuleGroupMetadata)
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
"Arn")
Parser
(Maybe Text
-> Maybe ShareStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> FirewallRuleGroupMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe ShareStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> FirewallRuleGroupMetadata)
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 ShareStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> FirewallRuleGroupMetadata)
-> Parser (Maybe ShareStatus)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> FirewallRuleGroupMetadata)
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 -> FirewallRuleGroupMetadata)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> FirewallRuleGroupMetadata)
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 -> FirewallRuleGroupMetadata)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> FirewallRuleGroupMetadata)
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 -> FirewallRuleGroupMetadata)
-> Parser (Maybe Text) -> Parser FirewallRuleGroupMetadata
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")
)
instance Prelude.Hashable FirewallRuleGroupMetadata
instance Prelude.NFData FirewallRuleGroupMetadata