{-# 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.EC2.Types.NetworkAclAssociation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude
data NetworkAclAssociation = NetworkAclAssociation'
{
NetworkAclAssociation -> Maybe Text
networkAclAssociationId :: Prelude.Maybe Prelude.Text,
NetworkAclAssociation -> Maybe Text
networkAclId :: Prelude.Maybe Prelude.Text,
NetworkAclAssociation -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text
}
deriving (NetworkAclAssociation -> NetworkAclAssociation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkAclAssociation -> NetworkAclAssociation -> Bool
$c/= :: NetworkAclAssociation -> NetworkAclAssociation -> Bool
== :: NetworkAclAssociation -> NetworkAclAssociation -> Bool
$c== :: NetworkAclAssociation -> NetworkAclAssociation -> Bool
Prelude.Eq, ReadPrec [NetworkAclAssociation]
ReadPrec NetworkAclAssociation
Int -> ReadS NetworkAclAssociation
ReadS [NetworkAclAssociation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NetworkAclAssociation]
$creadListPrec :: ReadPrec [NetworkAclAssociation]
readPrec :: ReadPrec NetworkAclAssociation
$creadPrec :: ReadPrec NetworkAclAssociation
readList :: ReadS [NetworkAclAssociation]
$creadList :: ReadS [NetworkAclAssociation]
readsPrec :: Int -> ReadS NetworkAclAssociation
$creadsPrec :: Int -> ReadS NetworkAclAssociation
Prelude.Read, Int -> NetworkAclAssociation -> ShowS
[NetworkAclAssociation] -> ShowS
NetworkAclAssociation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkAclAssociation] -> ShowS
$cshowList :: [NetworkAclAssociation] -> ShowS
show :: NetworkAclAssociation -> String
$cshow :: NetworkAclAssociation -> String
showsPrec :: Int -> NetworkAclAssociation -> ShowS
$cshowsPrec :: Int -> NetworkAclAssociation -> ShowS
Prelude.Show, forall x. Rep NetworkAclAssociation x -> NetworkAclAssociation
forall x. NetworkAclAssociation -> Rep NetworkAclAssociation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NetworkAclAssociation x -> NetworkAclAssociation
$cfrom :: forall x. NetworkAclAssociation -> Rep NetworkAclAssociation x
Prelude.Generic)
newNetworkAclAssociation ::
NetworkAclAssociation
newNetworkAclAssociation :: NetworkAclAssociation
newNetworkAclAssociation =
NetworkAclAssociation'
{ $sel:networkAclAssociationId:NetworkAclAssociation' :: Maybe Text
networkAclAssociationId =
forall a. Maybe a
Prelude.Nothing,
$sel:networkAclId:NetworkAclAssociation' :: Maybe Text
networkAclId = forall a. Maybe a
Prelude.Nothing,
$sel:subnetId:NetworkAclAssociation' :: Maybe Text
subnetId = forall a. Maybe a
Prelude.Nothing
}
networkAclAssociation_networkAclAssociationId :: Lens.Lens' NetworkAclAssociation (Prelude.Maybe Prelude.Text)
networkAclAssociation_networkAclAssociationId :: Lens' NetworkAclAssociation (Maybe Text)
networkAclAssociation_networkAclAssociationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkAclAssociation' {Maybe Text
networkAclAssociationId :: Maybe Text
$sel:networkAclAssociationId:NetworkAclAssociation' :: NetworkAclAssociation -> Maybe Text
networkAclAssociationId} -> Maybe Text
networkAclAssociationId) (\s :: NetworkAclAssociation
s@NetworkAclAssociation' {} Maybe Text
a -> NetworkAclAssociation
s {$sel:networkAclAssociationId:NetworkAclAssociation' :: Maybe Text
networkAclAssociationId = Maybe Text
a} :: NetworkAclAssociation)
networkAclAssociation_networkAclId :: Lens.Lens' NetworkAclAssociation (Prelude.Maybe Prelude.Text)
networkAclAssociation_networkAclId :: Lens' NetworkAclAssociation (Maybe Text)
networkAclAssociation_networkAclId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkAclAssociation' {Maybe Text
networkAclId :: Maybe Text
$sel:networkAclId:NetworkAclAssociation' :: NetworkAclAssociation -> Maybe Text
networkAclId} -> Maybe Text
networkAclId) (\s :: NetworkAclAssociation
s@NetworkAclAssociation' {} Maybe Text
a -> NetworkAclAssociation
s {$sel:networkAclId:NetworkAclAssociation' :: Maybe Text
networkAclId = Maybe Text
a} :: NetworkAclAssociation)
networkAclAssociation_subnetId :: Lens.Lens' NetworkAclAssociation (Prelude.Maybe Prelude.Text)
networkAclAssociation_subnetId :: Lens' NetworkAclAssociation (Maybe Text)
networkAclAssociation_subnetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkAclAssociation' {Maybe Text
subnetId :: Maybe Text
$sel:subnetId:NetworkAclAssociation' :: NetworkAclAssociation -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: NetworkAclAssociation
s@NetworkAclAssociation' {} Maybe Text
a -> NetworkAclAssociation
s {$sel:subnetId:NetworkAclAssociation' :: Maybe Text
subnetId = Maybe Text
a} :: NetworkAclAssociation)
instance Data.FromXML NetworkAclAssociation where
parseXML :: [Node] -> Either String NetworkAclAssociation
parseXML [Node]
x =
Maybe Text -> Maybe Text -> Maybe Text -> NetworkAclAssociation
NetworkAclAssociation'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"networkAclAssociationId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"networkAclId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"subnetId")
instance Prelude.Hashable NetworkAclAssociation where
hashWithSalt :: Int -> NetworkAclAssociation -> Int
hashWithSalt Int
_salt NetworkAclAssociation' {Maybe Text
subnetId :: Maybe Text
networkAclId :: Maybe Text
networkAclAssociationId :: Maybe Text
$sel:subnetId:NetworkAclAssociation' :: NetworkAclAssociation -> Maybe Text
$sel:networkAclId:NetworkAclAssociation' :: NetworkAclAssociation -> Maybe Text
$sel:networkAclAssociationId:NetworkAclAssociation' :: NetworkAclAssociation -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
networkAclAssociationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
networkAclId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subnetId
instance Prelude.NFData NetworkAclAssociation where
rnf :: NetworkAclAssociation -> ()
rnf NetworkAclAssociation' {Maybe Text
subnetId :: Maybe Text
networkAclId :: Maybe Text
networkAclAssociationId :: Maybe Text
$sel:subnetId:NetworkAclAssociation' :: NetworkAclAssociation -> Maybe Text
$sel:networkAclId:NetworkAclAssociation' :: NetworkAclAssociation -> Maybe Text
$sel:networkAclAssociationId:NetworkAclAssociation' :: NetworkAclAssociation -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
networkAclAssociationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
networkAclId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subnetId