{-# 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.AddressAttribute 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 Amazonka.EC2.Types.PtrUpdateStatus
import qualified Amazonka.Prelude as Prelude
data AddressAttribute = AddressAttribute'
{
AddressAttribute -> Maybe Text
allocationId :: Prelude.Maybe Prelude.Text,
AddressAttribute -> Maybe Text
ptrRecord :: Prelude.Maybe Prelude.Text,
AddressAttribute -> Maybe PtrUpdateStatus
ptrRecordUpdate :: Prelude.Maybe PtrUpdateStatus,
AddressAttribute -> Maybe Text
publicIp :: Prelude.Maybe Prelude.Text
}
deriving (AddressAttribute -> AddressAttribute -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddressAttribute -> AddressAttribute -> Bool
$c/= :: AddressAttribute -> AddressAttribute -> Bool
== :: AddressAttribute -> AddressAttribute -> Bool
$c== :: AddressAttribute -> AddressAttribute -> Bool
Prelude.Eq, ReadPrec [AddressAttribute]
ReadPrec AddressAttribute
Int -> ReadS AddressAttribute
ReadS [AddressAttribute]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddressAttribute]
$creadListPrec :: ReadPrec [AddressAttribute]
readPrec :: ReadPrec AddressAttribute
$creadPrec :: ReadPrec AddressAttribute
readList :: ReadS [AddressAttribute]
$creadList :: ReadS [AddressAttribute]
readsPrec :: Int -> ReadS AddressAttribute
$creadsPrec :: Int -> ReadS AddressAttribute
Prelude.Read, Int -> AddressAttribute -> ShowS
[AddressAttribute] -> ShowS
AddressAttribute -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddressAttribute] -> ShowS
$cshowList :: [AddressAttribute] -> ShowS
show :: AddressAttribute -> String
$cshow :: AddressAttribute -> String
showsPrec :: Int -> AddressAttribute -> ShowS
$cshowsPrec :: Int -> AddressAttribute -> ShowS
Prelude.Show, forall x. Rep AddressAttribute x -> AddressAttribute
forall x. AddressAttribute -> Rep AddressAttribute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AddressAttribute x -> AddressAttribute
$cfrom :: forall x. AddressAttribute -> Rep AddressAttribute x
Prelude.Generic)
newAddressAttribute ::
AddressAttribute
newAddressAttribute :: AddressAttribute
newAddressAttribute =
AddressAttribute'
{ $sel:allocationId:AddressAttribute' :: Maybe Text
allocationId = forall a. Maybe a
Prelude.Nothing,
$sel:ptrRecord:AddressAttribute' :: Maybe Text
ptrRecord = forall a. Maybe a
Prelude.Nothing,
$sel:ptrRecordUpdate:AddressAttribute' :: Maybe PtrUpdateStatus
ptrRecordUpdate = forall a. Maybe a
Prelude.Nothing,
$sel:publicIp:AddressAttribute' :: Maybe Text
publicIp = forall a. Maybe a
Prelude.Nothing
}
addressAttribute_allocationId :: Lens.Lens' AddressAttribute (Prelude.Maybe Prelude.Text)
addressAttribute_allocationId :: Lens' AddressAttribute (Maybe Text)
addressAttribute_allocationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddressAttribute' {Maybe Text
allocationId :: Maybe Text
$sel:allocationId:AddressAttribute' :: AddressAttribute -> Maybe Text
allocationId} -> Maybe Text
allocationId) (\s :: AddressAttribute
s@AddressAttribute' {} Maybe Text
a -> AddressAttribute
s {$sel:allocationId:AddressAttribute' :: Maybe Text
allocationId = Maybe Text
a} :: AddressAttribute)
addressAttribute_ptrRecord :: Lens.Lens' AddressAttribute (Prelude.Maybe Prelude.Text)
addressAttribute_ptrRecord :: Lens' AddressAttribute (Maybe Text)
addressAttribute_ptrRecord = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddressAttribute' {Maybe Text
ptrRecord :: Maybe Text
$sel:ptrRecord:AddressAttribute' :: AddressAttribute -> Maybe Text
ptrRecord} -> Maybe Text
ptrRecord) (\s :: AddressAttribute
s@AddressAttribute' {} Maybe Text
a -> AddressAttribute
s {$sel:ptrRecord:AddressAttribute' :: Maybe Text
ptrRecord = Maybe Text
a} :: AddressAttribute)
addressAttribute_ptrRecordUpdate :: Lens.Lens' AddressAttribute (Prelude.Maybe PtrUpdateStatus)
addressAttribute_ptrRecordUpdate :: Lens' AddressAttribute (Maybe PtrUpdateStatus)
addressAttribute_ptrRecordUpdate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddressAttribute' {Maybe PtrUpdateStatus
ptrRecordUpdate :: Maybe PtrUpdateStatus
$sel:ptrRecordUpdate:AddressAttribute' :: AddressAttribute -> Maybe PtrUpdateStatus
ptrRecordUpdate} -> Maybe PtrUpdateStatus
ptrRecordUpdate) (\s :: AddressAttribute
s@AddressAttribute' {} Maybe PtrUpdateStatus
a -> AddressAttribute
s {$sel:ptrRecordUpdate:AddressAttribute' :: Maybe PtrUpdateStatus
ptrRecordUpdate = Maybe PtrUpdateStatus
a} :: AddressAttribute)
addressAttribute_publicIp :: Lens.Lens' AddressAttribute (Prelude.Maybe Prelude.Text)
addressAttribute_publicIp :: Lens' AddressAttribute (Maybe Text)
addressAttribute_publicIp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddressAttribute' {Maybe Text
publicIp :: Maybe Text
$sel:publicIp:AddressAttribute' :: AddressAttribute -> Maybe Text
publicIp} -> Maybe Text
publicIp) (\s :: AddressAttribute
s@AddressAttribute' {} Maybe Text
a -> AddressAttribute
s {$sel:publicIp:AddressAttribute' :: Maybe Text
publicIp = Maybe Text
a} :: AddressAttribute)
instance Data.FromXML AddressAttribute where
parseXML :: [Node] -> Either String AddressAttribute
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe PtrUpdateStatus
-> Maybe Text
-> AddressAttribute
AddressAttribute'
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
"allocationId")
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
"ptrRecord")
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
"ptrRecordUpdate")
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
"publicIp")
instance Prelude.Hashable AddressAttribute where
hashWithSalt :: Int -> AddressAttribute -> Int
hashWithSalt Int
_salt AddressAttribute' {Maybe Text
Maybe PtrUpdateStatus
publicIp :: Maybe Text
ptrRecordUpdate :: Maybe PtrUpdateStatus
ptrRecord :: Maybe Text
allocationId :: Maybe Text
$sel:publicIp:AddressAttribute' :: AddressAttribute -> Maybe Text
$sel:ptrRecordUpdate:AddressAttribute' :: AddressAttribute -> Maybe PtrUpdateStatus
$sel:ptrRecord:AddressAttribute' :: AddressAttribute -> Maybe Text
$sel:allocationId:AddressAttribute' :: AddressAttribute -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
allocationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ptrRecord
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PtrUpdateStatus
ptrRecordUpdate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
publicIp
instance Prelude.NFData AddressAttribute where
rnf :: AddressAttribute -> ()
rnf AddressAttribute' {Maybe Text
Maybe PtrUpdateStatus
publicIp :: Maybe Text
ptrRecordUpdate :: Maybe PtrUpdateStatus
ptrRecord :: Maybe Text
allocationId :: Maybe Text
$sel:publicIp:AddressAttribute' :: AddressAttribute -> Maybe Text
$sel:ptrRecordUpdate:AddressAttribute' :: AddressAttribute -> Maybe PtrUpdateStatus
$sel:ptrRecord:AddressAttribute' :: AddressAttribute -> Maybe Text
$sel:allocationId:AddressAttribute' :: AddressAttribute -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
allocationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ptrRecord
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PtrUpdateStatus
ptrRecordUpdate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
publicIp