{-# 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.IpamPoolAllocation 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.IpamPoolAllocationResourceType
import qualified Amazonka.Prelude as Prelude
data IpamPoolAllocation = IpamPoolAllocation'
{
IpamPoolAllocation -> Maybe Text
cidr :: Prelude.Maybe Prelude.Text,
IpamPoolAllocation -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
IpamPoolAllocation -> Maybe Text
ipamPoolAllocationId :: Prelude.Maybe Prelude.Text,
IpamPoolAllocation -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
IpamPoolAllocation -> Maybe Text
resourceOwner :: Prelude.Maybe Prelude.Text,
IpamPoolAllocation -> Maybe Text
resourceRegion :: Prelude.Maybe Prelude.Text,
IpamPoolAllocation -> Maybe IpamPoolAllocationResourceType
resourceType :: Prelude.Maybe IpamPoolAllocationResourceType
}
deriving (IpamPoolAllocation -> IpamPoolAllocation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IpamPoolAllocation -> IpamPoolAllocation -> Bool
$c/= :: IpamPoolAllocation -> IpamPoolAllocation -> Bool
== :: IpamPoolAllocation -> IpamPoolAllocation -> Bool
$c== :: IpamPoolAllocation -> IpamPoolAllocation -> Bool
Prelude.Eq, ReadPrec [IpamPoolAllocation]
ReadPrec IpamPoolAllocation
Int -> ReadS IpamPoolAllocation
ReadS [IpamPoolAllocation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IpamPoolAllocation]
$creadListPrec :: ReadPrec [IpamPoolAllocation]
readPrec :: ReadPrec IpamPoolAllocation
$creadPrec :: ReadPrec IpamPoolAllocation
readList :: ReadS [IpamPoolAllocation]
$creadList :: ReadS [IpamPoolAllocation]
readsPrec :: Int -> ReadS IpamPoolAllocation
$creadsPrec :: Int -> ReadS IpamPoolAllocation
Prelude.Read, Int -> IpamPoolAllocation -> ShowS
[IpamPoolAllocation] -> ShowS
IpamPoolAllocation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IpamPoolAllocation] -> ShowS
$cshowList :: [IpamPoolAllocation] -> ShowS
show :: IpamPoolAllocation -> String
$cshow :: IpamPoolAllocation -> String
showsPrec :: Int -> IpamPoolAllocation -> ShowS
$cshowsPrec :: Int -> IpamPoolAllocation -> ShowS
Prelude.Show, forall x. Rep IpamPoolAllocation x -> IpamPoolAllocation
forall x. IpamPoolAllocation -> Rep IpamPoolAllocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IpamPoolAllocation x -> IpamPoolAllocation
$cfrom :: forall x. IpamPoolAllocation -> Rep IpamPoolAllocation x
Prelude.Generic)
newIpamPoolAllocation ::
IpamPoolAllocation
newIpamPoolAllocation :: IpamPoolAllocation
newIpamPoolAllocation =
IpamPoolAllocation'
{ $sel:cidr:IpamPoolAllocation' :: Maybe Text
cidr = forall a. Maybe a
Prelude.Nothing,
$sel:description:IpamPoolAllocation' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:ipamPoolAllocationId:IpamPoolAllocation' :: Maybe Text
ipamPoolAllocationId = forall a. Maybe a
Prelude.Nothing,
$sel:resourceId:IpamPoolAllocation' :: Maybe Text
resourceId = forall a. Maybe a
Prelude.Nothing,
$sel:resourceOwner:IpamPoolAllocation' :: Maybe Text
resourceOwner = forall a. Maybe a
Prelude.Nothing,
$sel:resourceRegion:IpamPoolAllocation' :: Maybe Text
resourceRegion = forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:IpamPoolAllocation' :: Maybe IpamPoolAllocationResourceType
resourceType = forall a. Maybe a
Prelude.Nothing
}
ipamPoolAllocation_cidr :: Lens.Lens' IpamPoolAllocation (Prelude.Maybe Prelude.Text)
ipamPoolAllocation_cidr :: Lens' IpamPoolAllocation (Maybe Text)
ipamPoolAllocation_cidr = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpamPoolAllocation' {Maybe Text
cidr :: Maybe Text
$sel:cidr:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
cidr} -> Maybe Text
cidr) (\s :: IpamPoolAllocation
s@IpamPoolAllocation' {} Maybe Text
a -> IpamPoolAllocation
s {$sel:cidr:IpamPoolAllocation' :: Maybe Text
cidr = Maybe Text
a} :: IpamPoolAllocation)
ipamPoolAllocation_description :: Lens.Lens' IpamPoolAllocation (Prelude.Maybe Prelude.Text)
ipamPoolAllocation_description :: Lens' IpamPoolAllocation (Maybe Text)
ipamPoolAllocation_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpamPoolAllocation' {Maybe Text
description :: Maybe Text
$sel:description:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
description} -> Maybe Text
description) (\s :: IpamPoolAllocation
s@IpamPoolAllocation' {} Maybe Text
a -> IpamPoolAllocation
s {$sel:description:IpamPoolAllocation' :: Maybe Text
description = Maybe Text
a} :: IpamPoolAllocation)
ipamPoolAllocation_ipamPoolAllocationId :: Lens.Lens' IpamPoolAllocation (Prelude.Maybe Prelude.Text)
ipamPoolAllocation_ipamPoolAllocationId :: Lens' IpamPoolAllocation (Maybe Text)
ipamPoolAllocation_ipamPoolAllocationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpamPoolAllocation' {Maybe Text
ipamPoolAllocationId :: Maybe Text
$sel:ipamPoolAllocationId:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
ipamPoolAllocationId} -> Maybe Text
ipamPoolAllocationId) (\s :: IpamPoolAllocation
s@IpamPoolAllocation' {} Maybe Text
a -> IpamPoolAllocation
s {$sel:ipamPoolAllocationId:IpamPoolAllocation' :: Maybe Text
ipamPoolAllocationId = Maybe Text
a} :: IpamPoolAllocation)
ipamPoolAllocation_resourceId :: Lens.Lens' IpamPoolAllocation (Prelude.Maybe Prelude.Text)
ipamPoolAllocation_resourceId :: Lens' IpamPoolAllocation (Maybe Text)
ipamPoolAllocation_resourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpamPoolAllocation' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: IpamPoolAllocation
s@IpamPoolAllocation' {} Maybe Text
a -> IpamPoolAllocation
s {$sel:resourceId:IpamPoolAllocation' :: Maybe Text
resourceId = Maybe Text
a} :: IpamPoolAllocation)
ipamPoolAllocation_resourceOwner :: Lens.Lens' IpamPoolAllocation (Prelude.Maybe Prelude.Text)
ipamPoolAllocation_resourceOwner :: Lens' IpamPoolAllocation (Maybe Text)
ipamPoolAllocation_resourceOwner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpamPoolAllocation' {Maybe Text
resourceOwner :: Maybe Text
$sel:resourceOwner:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
resourceOwner} -> Maybe Text
resourceOwner) (\s :: IpamPoolAllocation
s@IpamPoolAllocation' {} Maybe Text
a -> IpamPoolAllocation
s {$sel:resourceOwner:IpamPoolAllocation' :: Maybe Text
resourceOwner = Maybe Text
a} :: IpamPoolAllocation)
ipamPoolAllocation_resourceRegion :: Lens.Lens' IpamPoolAllocation (Prelude.Maybe Prelude.Text)
ipamPoolAllocation_resourceRegion :: Lens' IpamPoolAllocation (Maybe Text)
ipamPoolAllocation_resourceRegion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpamPoolAllocation' {Maybe Text
resourceRegion :: Maybe Text
$sel:resourceRegion:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
resourceRegion} -> Maybe Text
resourceRegion) (\s :: IpamPoolAllocation
s@IpamPoolAllocation' {} Maybe Text
a -> IpamPoolAllocation
s {$sel:resourceRegion:IpamPoolAllocation' :: Maybe Text
resourceRegion = Maybe Text
a} :: IpamPoolAllocation)
ipamPoolAllocation_resourceType :: Lens.Lens' IpamPoolAllocation (Prelude.Maybe IpamPoolAllocationResourceType)
ipamPoolAllocation_resourceType :: Lens' IpamPoolAllocation (Maybe IpamPoolAllocationResourceType)
ipamPoolAllocation_resourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IpamPoolAllocation' {Maybe IpamPoolAllocationResourceType
resourceType :: Maybe IpamPoolAllocationResourceType
$sel:resourceType:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe IpamPoolAllocationResourceType
resourceType} -> Maybe IpamPoolAllocationResourceType
resourceType) (\s :: IpamPoolAllocation
s@IpamPoolAllocation' {} Maybe IpamPoolAllocationResourceType
a -> IpamPoolAllocation
s {$sel:resourceType:IpamPoolAllocation' :: Maybe IpamPoolAllocationResourceType
resourceType = Maybe IpamPoolAllocationResourceType
a} :: IpamPoolAllocation)
instance Data.FromXML IpamPoolAllocation where
parseXML :: [Node] -> Either String IpamPoolAllocation
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe IpamPoolAllocationResourceType
-> IpamPoolAllocation
IpamPoolAllocation'
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
"cidr")
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
"description")
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
"ipamPoolAllocationId")
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
"resourceId")
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
"resourceOwner")
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
"resourceRegion")
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
"resourceType")
instance Prelude.Hashable IpamPoolAllocation where
hashWithSalt :: Int -> IpamPoolAllocation -> Int
hashWithSalt Int
_salt IpamPoolAllocation' {Maybe Text
Maybe IpamPoolAllocationResourceType
resourceType :: Maybe IpamPoolAllocationResourceType
resourceRegion :: Maybe Text
resourceOwner :: Maybe Text
resourceId :: Maybe Text
ipamPoolAllocationId :: Maybe Text
description :: Maybe Text
cidr :: Maybe Text
$sel:resourceType:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe IpamPoolAllocationResourceType
$sel:resourceRegion:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
$sel:resourceOwner:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
$sel:resourceId:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
$sel:ipamPoolAllocationId:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
$sel:description:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
$sel:cidr:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cidr
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ipamPoolAllocationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceOwner
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceRegion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IpamPoolAllocationResourceType
resourceType
instance Prelude.NFData IpamPoolAllocation where
rnf :: IpamPoolAllocation -> ()
rnf IpamPoolAllocation' {Maybe Text
Maybe IpamPoolAllocationResourceType
resourceType :: Maybe IpamPoolAllocationResourceType
resourceRegion :: Maybe Text
resourceOwner :: Maybe Text
resourceId :: Maybe Text
ipamPoolAllocationId :: Maybe Text
description :: Maybe Text
cidr :: Maybe Text
$sel:resourceType:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe IpamPoolAllocationResourceType
$sel:resourceRegion:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
$sel:resourceOwner:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
$sel:resourceId:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
$sel:ipamPoolAllocationId:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
$sel:description:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
$sel:cidr:IpamPoolAllocation' :: IpamPoolAllocation -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cidr
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ipamPoolAllocationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceOwner
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceRegion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IpamPoolAllocationResourceType
resourceType