{-# 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.SecurityHub.Types.AwsEc2NetworkAclDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsEc2NetworkAclAssociation
import Amazonka.SecurityHub.Types.AwsEc2NetworkAclEntry
data AwsEc2NetworkAclDetails = AwsEc2NetworkAclDetails'
{
AwsEc2NetworkAclDetails -> Maybe [AwsEc2NetworkAclEntry]
entries :: Prelude.Maybe [AwsEc2NetworkAclEntry],
AwsEc2NetworkAclDetails -> Maybe Text
networkAclId :: Prelude.Maybe Prelude.Text,
AwsEc2NetworkAclDetails -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
AwsEc2NetworkAclDetails -> Maybe Text
ownerId :: Prelude.Maybe Prelude.Text,
AwsEc2NetworkAclDetails -> Maybe [AwsEc2NetworkAclAssociation]
associations :: Prelude.Maybe [AwsEc2NetworkAclAssociation],
AwsEc2NetworkAclDetails -> Maybe Bool
isDefault :: Prelude.Maybe Prelude.Bool
}
deriving (AwsEc2NetworkAclDetails -> AwsEc2NetworkAclDetails -> Bool
(AwsEc2NetworkAclDetails -> AwsEc2NetworkAclDetails -> Bool)
-> (AwsEc2NetworkAclDetails -> AwsEc2NetworkAclDetails -> Bool)
-> Eq AwsEc2NetworkAclDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEc2NetworkAclDetails -> AwsEc2NetworkAclDetails -> Bool
$c/= :: AwsEc2NetworkAclDetails -> AwsEc2NetworkAclDetails -> Bool
== :: AwsEc2NetworkAclDetails -> AwsEc2NetworkAclDetails -> Bool
$c== :: AwsEc2NetworkAclDetails -> AwsEc2NetworkAclDetails -> Bool
Prelude.Eq, ReadPrec [AwsEc2NetworkAclDetails]
ReadPrec AwsEc2NetworkAclDetails
Int -> ReadS AwsEc2NetworkAclDetails
ReadS [AwsEc2NetworkAclDetails]
(Int -> ReadS AwsEc2NetworkAclDetails)
-> ReadS [AwsEc2NetworkAclDetails]
-> ReadPrec AwsEc2NetworkAclDetails
-> ReadPrec [AwsEc2NetworkAclDetails]
-> Read AwsEc2NetworkAclDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsEc2NetworkAclDetails]
$creadListPrec :: ReadPrec [AwsEc2NetworkAclDetails]
readPrec :: ReadPrec AwsEc2NetworkAclDetails
$creadPrec :: ReadPrec AwsEc2NetworkAclDetails
readList :: ReadS [AwsEc2NetworkAclDetails]
$creadList :: ReadS [AwsEc2NetworkAclDetails]
readsPrec :: Int -> ReadS AwsEc2NetworkAclDetails
$creadsPrec :: Int -> ReadS AwsEc2NetworkAclDetails
Prelude.Read, Int -> AwsEc2NetworkAclDetails -> ShowS
[AwsEc2NetworkAclDetails] -> ShowS
AwsEc2NetworkAclDetails -> String
(Int -> AwsEc2NetworkAclDetails -> ShowS)
-> (AwsEc2NetworkAclDetails -> String)
-> ([AwsEc2NetworkAclDetails] -> ShowS)
-> Show AwsEc2NetworkAclDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEc2NetworkAclDetails] -> ShowS
$cshowList :: [AwsEc2NetworkAclDetails] -> ShowS
show :: AwsEc2NetworkAclDetails -> String
$cshow :: AwsEc2NetworkAclDetails -> String
showsPrec :: Int -> AwsEc2NetworkAclDetails -> ShowS
$cshowsPrec :: Int -> AwsEc2NetworkAclDetails -> ShowS
Prelude.Show, (forall x.
AwsEc2NetworkAclDetails -> Rep AwsEc2NetworkAclDetails x)
-> (forall x.
Rep AwsEc2NetworkAclDetails x -> AwsEc2NetworkAclDetails)
-> Generic AwsEc2NetworkAclDetails
forall x. Rep AwsEc2NetworkAclDetails x -> AwsEc2NetworkAclDetails
forall x. AwsEc2NetworkAclDetails -> Rep AwsEc2NetworkAclDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AwsEc2NetworkAclDetails x -> AwsEc2NetworkAclDetails
$cfrom :: forall x. AwsEc2NetworkAclDetails -> Rep AwsEc2NetworkAclDetails x
Prelude.Generic)
newAwsEc2NetworkAclDetails ::
AwsEc2NetworkAclDetails
newAwsEc2NetworkAclDetails :: AwsEc2NetworkAclDetails
newAwsEc2NetworkAclDetails =
AwsEc2NetworkAclDetails' :: Maybe [AwsEc2NetworkAclEntry]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AwsEc2NetworkAclAssociation]
-> Maybe Bool
-> AwsEc2NetworkAclDetails
AwsEc2NetworkAclDetails'
{ $sel:entries:AwsEc2NetworkAclDetails' :: Maybe [AwsEc2NetworkAclEntry]
entries = Maybe [AwsEc2NetworkAclEntry]
forall a. Maybe a
Prelude.Nothing,
$sel:networkAclId:AwsEc2NetworkAclDetails' :: Maybe Text
networkAclId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:AwsEc2NetworkAclDetails' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ownerId:AwsEc2NetworkAclDetails' :: Maybe Text
ownerId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:associations:AwsEc2NetworkAclDetails' :: Maybe [AwsEc2NetworkAclAssociation]
associations = Maybe [AwsEc2NetworkAclAssociation]
forall a. Maybe a
Prelude.Nothing,
$sel:isDefault:AwsEc2NetworkAclDetails' :: Maybe Bool
isDefault = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
awsEc2NetworkAclDetails_entries :: Lens.Lens' AwsEc2NetworkAclDetails (Prelude.Maybe [AwsEc2NetworkAclEntry])
awsEc2NetworkAclDetails_entries :: (Maybe [AwsEc2NetworkAclEntry]
-> f (Maybe [AwsEc2NetworkAclEntry]))
-> AwsEc2NetworkAclDetails -> f AwsEc2NetworkAclDetails
awsEc2NetworkAclDetails_entries = (AwsEc2NetworkAclDetails -> Maybe [AwsEc2NetworkAclEntry])
-> (AwsEc2NetworkAclDetails
-> Maybe [AwsEc2NetworkAclEntry] -> AwsEc2NetworkAclDetails)
-> Lens
AwsEc2NetworkAclDetails
AwsEc2NetworkAclDetails
(Maybe [AwsEc2NetworkAclEntry])
(Maybe [AwsEc2NetworkAclEntry])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2NetworkAclDetails' {Maybe [AwsEc2NetworkAclEntry]
entries :: Maybe [AwsEc2NetworkAclEntry]
$sel:entries:AwsEc2NetworkAclDetails' :: AwsEc2NetworkAclDetails -> Maybe [AwsEc2NetworkAclEntry]
entries} -> Maybe [AwsEc2NetworkAclEntry]
entries) (\s :: AwsEc2NetworkAclDetails
s@AwsEc2NetworkAclDetails' {} Maybe [AwsEc2NetworkAclEntry]
a -> AwsEc2NetworkAclDetails
s {$sel:entries:AwsEc2NetworkAclDetails' :: Maybe [AwsEc2NetworkAclEntry]
entries = Maybe [AwsEc2NetworkAclEntry]
a} :: AwsEc2NetworkAclDetails) ((Maybe [AwsEc2NetworkAclEntry]
-> f (Maybe [AwsEc2NetworkAclEntry]))
-> AwsEc2NetworkAclDetails -> f AwsEc2NetworkAclDetails)
-> ((Maybe [AwsEc2NetworkAclEntry]
-> f (Maybe [AwsEc2NetworkAclEntry]))
-> Maybe [AwsEc2NetworkAclEntry]
-> f (Maybe [AwsEc2NetworkAclEntry]))
-> (Maybe [AwsEc2NetworkAclEntry]
-> f (Maybe [AwsEc2NetworkAclEntry]))
-> AwsEc2NetworkAclDetails
-> f AwsEc2NetworkAclDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AwsEc2NetworkAclEntry]
[AwsEc2NetworkAclEntry]
[AwsEc2NetworkAclEntry]
[AwsEc2NetworkAclEntry]
-> Iso
(Maybe [AwsEc2NetworkAclEntry])
(Maybe [AwsEc2NetworkAclEntry])
(Maybe [AwsEc2NetworkAclEntry])
(Maybe [AwsEc2NetworkAclEntry])
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
[AwsEc2NetworkAclEntry]
[AwsEc2NetworkAclEntry]
[AwsEc2NetworkAclEntry]
[AwsEc2NetworkAclEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
awsEc2NetworkAclDetails_networkAclId :: Lens.Lens' AwsEc2NetworkAclDetails (Prelude.Maybe Prelude.Text)
awsEc2NetworkAclDetails_networkAclId :: (Maybe Text -> f (Maybe Text))
-> AwsEc2NetworkAclDetails -> f AwsEc2NetworkAclDetails
awsEc2NetworkAclDetails_networkAclId = (AwsEc2NetworkAclDetails -> Maybe Text)
-> (AwsEc2NetworkAclDetails
-> Maybe Text -> AwsEc2NetworkAclDetails)
-> Lens
AwsEc2NetworkAclDetails
AwsEc2NetworkAclDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2NetworkAclDetails' {Maybe Text
networkAclId :: Maybe Text
$sel:networkAclId:AwsEc2NetworkAclDetails' :: AwsEc2NetworkAclDetails -> Maybe Text
networkAclId} -> Maybe Text
networkAclId) (\s :: AwsEc2NetworkAclDetails
s@AwsEc2NetworkAclDetails' {} Maybe Text
a -> AwsEc2NetworkAclDetails
s {$sel:networkAclId:AwsEc2NetworkAclDetails' :: Maybe Text
networkAclId = Maybe Text
a} :: AwsEc2NetworkAclDetails)
awsEc2NetworkAclDetails_vpcId :: Lens.Lens' AwsEc2NetworkAclDetails (Prelude.Maybe Prelude.Text)
awsEc2NetworkAclDetails_vpcId :: (Maybe Text -> f (Maybe Text))
-> AwsEc2NetworkAclDetails -> f AwsEc2NetworkAclDetails
awsEc2NetworkAclDetails_vpcId = (AwsEc2NetworkAclDetails -> Maybe Text)
-> (AwsEc2NetworkAclDetails
-> Maybe Text -> AwsEc2NetworkAclDetails)
-> Lens
AwsEc2NetworkAclDetails
AwsEc2NetworkAclDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2NetworkAclDetails' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:AwsEc2NetworkAclDetails' :: AwsEc2NetworkAclDetails -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: AwsEc2NetworkAclDetails
s@AwsEc2NetworkAclDetails' {} Maybe Text
a -> AwsEc2NetworkAclDetails
s {$sel:vpcId:AwsEc2NetworkAclDetails' :: Maybe Text
vpcId = Maybe Text
a} :: AwsEc2NetworkAclDetails)
awsEc2NetworkAclDetails_ownerId :: Lens.Lens' AwsEc2NetworkAclDetails (Prelude.Maybe Prelude.Text)
awsEc2NetworkAclDetails_ownerId :: (Maybe Text -> f (Maybe Text))
-> AwsEc2NetworkAclDetails -> f AwsEc2NetworkAclDetails
awsEc2NetworkAclDetails_ownerId = (AwsEc2NetworkAclDetails -> Maybe Text)
-> (AwsEc2NetworkAclDetails
-> Maybe Text -> AwsEc2NetworkAclDetails)
-> Lens
AwsEc2NetworkAclDetails
AwsEc2NetworkAclDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2NetworkAclDetails' {Maybe Text
ownerId :: Maybe Text
$sel:ownerId:AwsEc2NetworkAclDetails' :: AwsEc2NetworkAclDetails -> Maybe Text
ownerId} -> Maybe Text
ownerId) (\s :: AwsEc2NetworkAclDetails
s@AwsEc2NetworkAclDetails' {} Maybe Text
a -> AwsEc2NetworkAclDetails
s {$sel:ownerId:AwsEc2NetworkAclDetails' :: Maybe Text
ownerId = Maybe Text
a} :: AwsEc2NetworkAclDetails)
awsEc2NetworkAclDetails_associations :: Lens.Lens' AwsEc2NetworkAclDetails (Prelude.Maybe [AwsEc2NetworkAclAssociation])
awsEc2NetworkAclDetails_associations :: (Maybe [AwsEc2NetworkAclAssociation]
-> f (Maybe [AwsEc2NetworkAclAssociation]))
-> AwsEc2NetworkAclDetails -> f AwsEc2NetworkAclDetails
awsEc2NetworkAclDetails_associations = (AwsEc2NetworkAclDetails -> Maybe [AwsEc2NetworkAclAssociation])
-> (AwsEc2NetworkAclDetails
-> Maybe [AwsEc2NetworkAclAssociation] -> AwsEc2NetworkAclDetails)
-> Lens
AwsEc2NetworkAclDetails
AwsEc2NetworkAclDetails
(Maybe [AwsEc2NetworkAclAssociation])
(Maybe [AwsEc2NetworkAclAssociation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2NetworkAclDetails' {Maybe [AwsEc2NetworkAclAssociation]
associations :: Maybe [AwsEc2NetworkAclAssociation]
$sel:associations:AwsEc2NetworkAclDetails' :: AwsEc2NetworkAclDetails -> Maybe [AwsEc2NetworkAclAssociation]
associations} -> Maybe [AwsEc2NetworkAclAssociation]
associations) (\s :: AwsEc2NetworkAclDetails
s@AwsEc2NetworkAclDetails' {} Maybe [AwsEc2NetworkAclAssociation]
a -> AwsEc2NetworkAclDetails
s {$sel:associations:AwsEc2NetworkAclDetails' :: Maybe [AwsEc2NetworkAclAssociation]
associations = Maybe [AwsEc2NetworkAclAssociation]
a} :: AwsEc2NetworkAclDetails) ((Maybe [AwsEc2NetworkAclAssociation]
-> f (Maybe [AwsEc2NetworkAclAssociation]))
-> AwsEc2NetworkAclDetails -> f AwsEc2NetworkAclDetails)
-> ((Maybe [AwsEc2NetworkAclAssociation]
-> f (Maybe [AwsEc2NetworkAclAssociation]))
-> Maybe [AwsEc2NetworkAclAssociation]
-> f (Maybe [AwsEc2NetworkAclAssociation]))
-> (Maybe [AwsEc2NetworkAclAssociation]
-> f (Maybe [AwsEc2NetworkAclAssociation]))
-> AwsEc2NetworkAclDetails
-> f AwsEc2NetworkAclDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AwsEc2NetworkAclAssociation]
[AwsEc2NetworkAclAssociation]
[AwsEc2NetworkAclAssociation]
[AwsEc2NetworkAclAssociation]
-> Iso
(Maybe [AwsEc2NetworkAclAssociation])
(Maybe [AwsEc2NetworkAclAssociation])
(Maybe [AwsEc2NetworkAclAssociation])
(Maybe [AwsEc2NetworkAclAssociation])
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
[AwsEc2NetworkAclAssociation]
[AwsEc2NetworkAclAssociation]
[AwsEc2NetworkAclAssociation]
[AwsEc2NetworkAclAssociation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
awsEc2NetworkAclDetails_isDefault :: Lens.Lens' AwsEc2NetworkAclDetails (Prelude.Maybe Prelude.Bool)
awsEc2NetworkAclDetails_isDefault :: (Maybe Bool -> f (Maybe Bool))
-> AwsEc2NetworkAclDetails -> f AwsEc2NetworkAclDetails
awsEc2NetworkAclDetails_isDefault = (AwsEc2NetworkAclDetails -> Maybe Bool)
-> (AwsEc2NetworkAclDetails
-> Maybe Bool -> AwsEc2NetworkAclDetails)
-> Lens
AwsEc2NetworkAclDetails
AwsEc2NetworkAclDetails
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEc2NetworkAclDetails' {Maybe Bool
isDefault :: Maybe Bool
$sel:isDefault:AwsEc2NetworkAclDetails' :: AwsEc2NetworkAclDetails -> Maybe Bool
isDefault} -> Maybe Bool
isDefault) (\s :: AwsEc2NetworkAclDetails
s@AwsEc2NetworkAclDetails' {} Maybe Bool
a -> AwsEc2NetworkAclDetails
s {$sel:isDefault:AwsEc2NetworkAclDetails' :: Maybe Bool
isDefault = Maybe Bool
a} :: AwsEc2NetworkAclDetails)
instance Core.FromJSON AwsEc2NetworkAclDetails where
parseJSON :: Value -> Parser AwsEc2NetworkAclDetails
parseJSON =
String
-> (Object -> Parser AwsEc2NetworkAclDetails)
-> Value
-> Parser AwsEc2NetworkAclDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsEc2NetworkAclDetails"
( \Object
x ->
Maybe [AwsEc2NetworkAclEntry]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AwsEc2NetworkAclAssociation]
-> Maybe Bool
-> AwsEc2NetworkAclDetails
AwsEc2NetworkAclDetails'
(Maybe [AwsEc2NetworkAclEntry]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AwsEc2NetworkAclAssociation]
-> Maybe Bool
-> AwsEc2NetworkAclDetails)
-> Parser (Maybe [AwsEc2NetworkAclEntry])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AwsEc2NetworkAclAssociation]
-> Maybe Bool
-> AwsEc2NetworkAclDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [AwsEc2NetworkAclEntry]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Entries" Parser (Maybe (Maybe [AwsEc2NetworkAclEntry]))
-> Maybe [AwsEc2NetworkAclEntry]
-> Parser (Maybe [AwsEc2NetworkAclEntry])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AwsEc2NetworkAclEntry]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [AwsEc2NetworkAclAssociation]
-> Maybe Bool
-> AwsEc2NetworkAclDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [AwsEc2NetworkAclAssociation]
-> Maybe Bool
-> AwsEc2NetworkAclDetails)
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
"NetworkAclId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe [AwsEc2NetworkAclAssociation]
-> Maybe Bool
-> AwsEc2NetworkAclDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [AwsEc2NetworkAclAssociation]
-> Maybe Bool
-> AwsEc2NetworkAclDetails)
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
"VpcId")
Parser
(Maybe Text
-> Maybe [AwsEc2NetworkAclAssociation]
-> Maybe Bool
-> AwsEc2NetworkAclDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe [AwsEc2NetworkAclAssociation]
-> Maybe Bool -> AwsEc2NetworkAclDetails)
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 [AwsEc2NetworkAclAssociation]
-> Maybe Bool -> AwsEc2NetworkAclDetails)
-> Parser (Maybe [AwsEc2NetworkAclAssociation])
-> Parser (Maybe Bool -> AwsEc2NetworkAclDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe (Maybe [AwsEc2NetworkAclAssociation]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Associations" Parser (Maybe (Maybe [AwsEc2NetworkAclAssociation]))
-> Maybe [AwsEc2NetworkAclAssociation]
-> Parser (Maybe [AwsEc2NetworkAclAssociation])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AwsEc2NetworkAclAssociation]
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Bool -> AwsEc2NetworkAclDetails)
-> Parser (Maybe Bool) -> Parser AwsEc2NetworkAclDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IsDefault")
)
instance Prelude.Hashable AwsEc2NetworkAclDetails
instance Prelude.NFData AwsEc2NetworkAclDetails
instance Core.ToJSON AwsEc2NetworkAclDetails where
toJSON :: AwsEc2NetworkAclDetails -> Value
toJSON AwsEc2NetworkAclDetails' {Maybe Bool
Maybe [AwsEc2NetworkAclAssociation]
Maybe [AwsEc2NetworkAclEntry]
Maybe Text
isDefault :: Maybe Bool
associations :: Maybe [AwsEc2NetworkAclAssociation]
ownerId :: Maybe Text
vpcId :: Maybe Text
networkAclId :: Maybe Text
entries :: Maybe [AwsEc2NetworkAclEntry]
$sel:isDefault:AwsEc2NetworkAclDetails' :: AwsEc2NetworkAclDetails -> Maybe Bool
$sel:associations:AwsEc2NetworkAclDetails' :: AwsEc2NetworkAclDetails -> Maybe [AwsEc2NetworkAclAssociation]
$sel:ownerId:AwsEc2NetworkAclDetails' :: AwsEc2NetworkAclDetails -> Maybe Text
$sel:vpcId:AwsEc2NetworkAclDetails' :: AwsEc2NetworkAclDetails -> Maybe Text
$sel:networkAclId:AwsEc2NetworkAclDetails' :: AwsEc2NetworkAclDetails -> Maybe Text
$sel:entries:AwsEc2NetworkAclDetails' :: AwsEc2NetworkAclDetails -> Maybe [AwsEc2NetworkAclEntry]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Entries" Text -> [AwsEc2NetworkAclEntry] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([AwsEc2NetworkAclEntry] -> Pair)
-> Maybe [AwsEc2NetworkAclEntry] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AwsEc2NetworkAclEntry]
entries,
(Text
"NetworkAclId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
networkAclId,
(Text
"VpcId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
vpcId,
(Text
"OwnerId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ownerId,
(Text
"Associations" Text -> [AwsEc2NetworkAclAssociation] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([AwsEc2NetworkAclAssociation] -> Pair)
-> Maybe [AwsEc2NetworkAclAssociation] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AwsEc2NetworkAclAssociation]
associations,
(Text
"IsDefault" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
isDefault
]
)