{-# 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.AddressTransfer 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.AddressTransferStatus
import qualified Amazonka.Prelude as Prelude
data AddressTransfer = AddressTransfer'
{
AddressTransfer -> Maybe AddressTransferStatus
addressTransferStatus :: Prelude.Maybe AddressTransferStatus,
AddressTransfer -> Maybe Text
allocationId :: Prelude.Maybe Prelude.Text,
AddressTransfer -> Maybe Text
publicIp :: Prelude.Maybe Prelude.Text,
AddressTransfer -> Maybe Text
transferAccountId :: Prelude.Maybe Prelude.Text,
AddressTransfer -> Maybe ISO8601
transferOfferAcceptedTimestamp :: Prelude.Maybe Data.ISO8601,
AddressTransfer -> Maybe ISO8601
transferOfferExpirationTimestamp :: Prelude.Maybe Data.ISO8601
}
deriving (AddressTransfer -> AddressTransfer -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddressTransfer -> AddressTransfer -> Bool
$c/= :: AddressTransfer -> AddressTransfer -> Bool
== :: AddressTransfer -> AddressTransfer -> Bool
$c== :: AddressTransfer -> AddressTransfer -> Bool
Prelude.Eq, ReadPrec [AddressTransfer]
ReadPrec AddressTransfer
Int -> ReadS AddressTransfer
ReadS [AddressTransfer]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddressTransfer]
$creadListPrec :: ReadPrec [AddressTransfer]
readPrec :: ReadPrec AddressTransfer
$creadPrec :: ReadPrec AddressTransfer
readList :: ReadS [AddressTransfer]
$creadList :: ReadS [AddressTransfer]
readsPrec :: Int -> ReadS AddressTransfer
$creadsPrec :: Int -> ReadS AddressTransfer
Prelude.Read, Int -> AddressTransfer -> ShowS
[AddressTransfer] -> ShowS
AddressTransfer -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddressTransfer] -> ShowS
$cshowList :: [AddressTransfer] -> ShowS
show :: AddressTransfer -> String
$cshow :: AddressTransfer -> String
showsPrec :: Int -> AddressTransfer -> ShowS
$cshowsPrec :: Int -> AddressTransfer -> ShowS
Prelude.Show, forall x. Rep AddressTransfer x -> AddressTransfer
forall x. AddressTransfer -> Rep AddressTransfer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AddressTransfer x -> AddressTransfer
$cfrom :: forall x. AddressTransfer -> Rep AddressTransfer x
Prelude.Generic)
newAddressTransfer ::
AddressTransfer
newAddressTransfer :: AddressTransfer
newAddressTransfer =
AddressTransfer'
{ $sel:addressTransferStatus:AddressTransfer' :: Maybe AddressTransferStatus
addressTransferStatus =
forall a. Maybe a
Prelude.Nothing,
$sel:allocationId:AddressTransfer' :: Maybe Text
allocationId = forall a. Maybe a
Prelude.Nothing,
$sel:publicIp:AddressTransfer' :: Maybe Text
publicIp = forall a. Maybe a
Prelude.Nothing,
$sel:transferAccountId:AddressTransfer' :: Maybe Text
transferAccountId = forall a. Maybe a
Prelude.Nothing,
$sel:transferOfferAcceptedTimestamp:AddressTransfer' :: Maybe ISO8601
transferOfferAcceptedTimestamp = forall a. Maybe a
Prelude.Nothing,
$sel:transferOfferExpirationTimestamp:AddressTransfer' :: Maybe ISO8601
transferOfferExpirationTimestamp = forall a. Maybe a
Prelude.Nothing
}
addressTransfer_addressTransferStatus :: Lens.Lens' AddressTransfer (Prelude.Maybe AddressTransferStatus)
addressTransfer_addressTransferStatus :: Lens' AddressTransfer (Maybe AddressTransferStatus)
addressTransfer_addressTransferStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddressTransfer' {Maybe AddressTransferStatus
addressTransferStatus :: Maybe AddressTransferStatus
$sel:addressTransferStatus:AddressTransfer' :: AddressTransfer -> Maybe AddressTransferStatus
addressTransferStatus} -> Maybe AddressTransferStatus
addressTransferStatus) (\s :: AddressTransfer
s@AddressTransfer' {} Maybe AddressTransferStatus
a -> AddressTransfer
s {$sel:addressTransferStatus:AddressTransfer' :: Maybe AddressTransferStatus
addressTransferStatus = Maybe AddressTransferStatus
a} :: AddressTransfer)
addressTransfer_allocationId :: Lens.Lens' AddressTransfer (Prelude.Maybe Prelude.Text)
addressTransfer_allocationId :: Lens' AddressTransfer (Maybe Text)
addressTransfer_allocationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddressTransfer' {Maybe Text
allocationId :: Maybe Text
$sel:allocationId:AddressTransfer' :: AddressTransfer -> Maybe Text
allocationId} -> Maybe Text
allocationId) (\s :: AddressTransfer
s@AddressTransfer' {} Maybe Text
a -> AddressTransfer
s {$sel:allocationId:AddressTransfer' :: Maybe Text
allocationId = Maybe Text
a} :: AddressTransfer)
addressTransfer_publicIp :: Lens.Lens' AddressTransfer (Prelude.Maybe Prelude.Text)
addressTransfer_publicIp :: Lens' AddressTransfer (Maybe Text)
addressTransfer_publicIp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddressTransfer' {Maybe Text
publicIp :: Maybe Text
$sel:publicIp:AddressTransfer' :: AddressTransfer -> Maybe Text
publicIp} -> Maybe Text
publicIp) (\s :: AddressTransfer
s@AddressTransfer' {} Maybe Text
a -> AddressTransfer
s {$sel:publicIp:AddressTransfer' :: Maybe Text
publicIp = Maybe Text
a} :: AddressTransfer)
addressTransfer_transferAccountId :: Lens.Lens' AddressTransfer (Prelude.Maybe Prelude.Text)
addressTransfer_transferAccountId :: Lens' AddressTransfer (Maybe Text)
addressTransfer_transferAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddressTransfer' {Maybe Text
transferAccountId :: Maybe Text
$sel:transferAccountId:AddressTransfer' :: AddressTransfer -> Maybe Text
transferAccountId} -> Maybe Text
transferAccountId) (\s :: AddressTransfer
s@AddressTransfer' {} Maybe Text
a -> AddressTransfer
s {$sel:transferAccountId:AddressTransfer' :: Maybe Text
transferAccountId = Maybe Text
a} :: AddressTransfer)
addressTransfer_transferOfferAcceptedTimestamp :: Lens.Lens' AddressTransfer (Prelude.Maybe Prelude.UTCTime)
addressTransfer_transferOfferAcceptedTimestamp :: Lens' AddressTransfer (Maybe UTCTime)
addressTransfer_transferOfferAcceptedTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddressTransfer' {Maybe ISO8601
transferOfferAcceptedTimestamp :: Maybe ISO8601
$sel:transferOfferAcceptedTimestamp:AddressTransfer' :: AddressTransfer -> Maybe ISO8601
transferOfferAcceptedTimestamp} -> Maybe ISO8601
transferOfferAcceptedTimestamp) (\s :: AddressTransfer
s@AddressTransfer' {} Maybe ISO8601
a -> AddressTransfer
s {$sel:transferOfferAcceptedTimestamp:AddressTransfer' :: Maybe ISO8601
transferOfferAcceptedTimestamp = Maybe ISO8601
a} :: AddressTransfer) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
addressTransfer_transferOfferExpirationTimestamp :: Lens.Lens' AddressTransfer (Prelude.Maybe Prelude.UTCTime)
addressTransfer_transferOfferExpirationTimestamp :: Lens' AddressTransfer (Maybe UTCTime)
addressTransfer_transferOfferExpirationTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddressTransfer' {Maybe ISO8601
transferOfferExpirationTimestamp :: Maybe ISO8601
$sel:transferOfferExpirationTimestamp:AddressTransfer' :: AddressTransfer -> Maybe ISO8601
transferOfferExpirationTimestamp} -> Maybe ISO8601
transferOfferExpirationTimestamp) (\s :: AddressTransfer
s@AddressTransfer' {} Maybe ISO8601
a -> AddressTransfer
s {$sel:transferOfferExpirationTimestamp:AddressTransfer' :: Maybe ISO8601
transferOfferExpirationTimestamp = Maybe ISO8601
a} :: AddressTransfer) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromXML AddressTransfer where
parseXML :: [Node] -> Either String AddressTransfer
parseXML [Node]
x =
Maybe AddressTransferStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe ISO8601
-> AddressTransfer
AddressTransfer'
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
"addressTransferStatus")
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
"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
"publicIp")
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
"transferAccountId")
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
"transferOfferAcceptedTimestamp")
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
"transferOfferExpirationTimestamp")
instance Prelude.Hashable AddressTransfer where
hashWithSalt :: Int -> AddressTransfer -> Int
hashWithSalt Int
_salt AddressTransfer' {Maybe Text
Maybe ISO8601
Maybe AddressTransferStatus
transferOfferExpirationTimestamp :: Maybe ISO8601
transferOfferAcceptedTimestamp :: Maybe ISO8601
transferAccountId :: Maybe Text
publicIp :: Maybe Text
allocationId :: Maybe Text
addressTransferStatus :: Maybe AddressTransferStatus
$sel:transferOfferExpirationTimestamp:AddressTransfer' :: AddressTransfer -> Maybe ISO8601
$sel:transferOfferAcceptedTimestamp:AddressTransfer' :: AddressTransfer -> Maybe ISO8601
$sel:transferAccountId:AddressTransfer' :: AddressTransfer -> Maybe Text
$sel:publicIp:AddressTransfer' :: AddressTransfer -> Maybe Text
$sel:allocationId:AddressTransfer' :: AddressTransfer -> Maybe Text
$sel:addressTransferStatus:AddressTransfer' :: AddressTransfer -> Maybe AddressTransferStatus
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AddressTransferStatus
addressTransferStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
allocationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
publicIp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
transferAccountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
transferOfferAcceptedTimestamp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
transferOfferExpirationTimestamp
instance Prelude.NFData AddressTransfer where
rnf :: AddressTransfer -> ()
rnf AddressTransfer' {Maybe Text
Maybe ISO8601
Maybe AddressTransferStatus
transferOfferExpirationTimestamp :: Maybe ISO8601
transferOfferAcceptedTimestamp :: Maybe ISO8601
transferAccountId :: Maybe Text
publicIp :: Maybe Text
allocationId :: Maybe Text
addressTransferStatus :: Maybe AddressTransferStatus
$sel:transferOfferExpirationTimestamp:AddressTransfer' :: AddressTransfer -> Maybe ISO8601
$sel:transferOfferAcceptedTimestamp:AddressTransfer' :: AddressTransfer -> Maybe ISO8601
$sel:transferAccountId:AddressTransfer' :: AddressTransfer -> Maybe Text
$sel:publicIp:AddressTransfer' :: AddressTransfer -> Maybe Text
$sel:allocationId:AddressTransfer' :: AddressTransfer -> Maybe Text
$sel:addressTransferStatus:AddressTransfer' :: AddressTransfer -> Maybe AddressTransferStatus
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe AddressTransferStatus
addressTransferStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` 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
publicIp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
transferAccountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
transferOfferAcceptedTimestamp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
transferOfferExpirationTimestamp