module Stratosphere.EC2.EIPAssociation (
EIPAssociation(..), mkEIPAssociation
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EIPAssociation
=
EIPAssociation {EIPAssociation -> ()
haddock_workaround_ :: (),
EIPAssociation -> Maybe (Value Text)
allocationId :: (Prelude.Maybe (Value Prelude.Text)),
EIPAssociation -> Maybe (Value Text)
instanceId :: (Prelude.Maybe (Value Prelude.Text)),
EIPAssociation -> Maybe (Value Text)
networkInterfaceId :: (Prelude.Maybe (Value Prelude.Text)),
EIPAssociation -> Maybe (Value Text)
privateIpAddress :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (EIPAssociation -> EIPAssociation -> Bool
(EIPAssociation -> EIPAssociation -> Bool)
-> (EIPAssociation -> EIPAssociation -> Bool) -> Eq EIPAssociation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EIPAssociation -> EIPAssociation -> Bool
== :: EIPAssociation -> EIPAssociation -> Bool
$c/= :: EIPAssociation -> EIPAssociation -> Bool
/= :: EIPAssociation -> EIPAssociation -> Bool
Prelude.Eq, Int -> EIPAssociation -> ShowS
[EIPAssociation] -> ShowS
EIPAssociation -> String
(Int -> EIPAssociation -> ShowS)
-> (EIPAssociation -> String)
-> ([EIPAssociation] -> ShowS)
-> Show EIPAssociation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EIPAssociation -> ShowS
showsPrec :: Int -> EIPAssociation -> ShowS
$cshow :: EIPAssociation -> String
show :: EIPAssociation -> String
$cshowList :: [EIPAssociation] -> ShowS
showList :: [EIPAssociation] -> ShowS
Prelude.Show)
mkEIPAssociation :: EIPAssociation
mkEIPAssociation :: EIPAssociation
mkEIPAssociation
= EIPAssociation
{haddock_workaround_ :: ()
haddock_workaround_ = (), allocationId :: Maybe (Value Text)
allocationId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
instanceId :: Maybe (Value Text)
instanceId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, networkInterfaceId :: Maybe (Value Text)
networkInterfaceId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
privateIpAddress :: Maybe (Value Text)
privateIpAddress = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EIPAssociation where
toResourceProperties :: EIPAssociation -> ResourceProperties
toResourceProperties EIPAssociation {Maybe (Value Text)
()
haddock_workaround_ :: EIPAssociation -> ()
allocationId :: EIPAssociation -> Maybe (Value Text)
instanceId :: EIPAssociation -> Maybe (Value Text)
networkInterfaceId :: EIPAssociation -> Maybe (Value Text)
privateIpAddress :: EIPAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
allocationId :: Maybe (Value Text)
instanceId :: Maybe (Value Text)
networkInterfaceId :: Maybe (Value Text)
privateIpAddress :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::EIPAssociation",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllocationId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
allocationId,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InstanceId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
instanceId,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NetworkInterfaceId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
networkInterfaceId,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PrivateIpAddress" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
privateIpAddress])}
instance JSON.ToJSON EIPAssociation where
toJSON :: EIPAssociation -> Value
toJSON EIPAssociation {Maybe (Value Text)
()
haddock_workaround_ :: EIPAssociation -> ()
allocationId :: EIPAssociation -> Maybe (Value Text)
instanceId :: EIPAssociation -> Maybe (Value Text)
networkInterfaceId :: EIPAssociation -> Maybe (Value Text)
privateIpAddress :: EIPAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
allocationId :: Maybe (Value Text)
instanceId :: Maybe (Value Text)
networkInterfaceId :: Maybe (Value Text)
privateIpAddress :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllocationId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
allocationId,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InstanceId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
instanceId,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NetworkInterfaceId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
networkInterfaceId,
Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PrivateIpAddress" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
privateIpAddress]))
instance Property "AllocationId" EIPAssociation where
type PropertyType "AllocationId" EIPAssociation = Value Prelude.Text
set :: PropertyType "AllocationId" EIPAssociation
-> EIPAssociation -> EIPAssociation
set PropertyType "AllocationId" EIPAssociation
newValue EIPAssociation {Maybe (Value Text)
()
haddock_workaround_ :: EIPAssociation -> ()
allocationId :: EIPAssociation -> Maybe (Value Text)
instanceId :: EIPAssociation -> Maybe (Value Text)
networkInterfaceId :: EIPAssociation -> Maybe (Value Text)
privateIpAddress :: EIPAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
allocationId :: Maybe (Value Text)
instanceId :: Maybe (Value Text)
networkInterfaceId :: Maybe (Value Text)
privateIpAddress :: Maybe (Value Text)
..}
= EIPAssociation {allocationId :: Maybe (Value Text)
allocationId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AllocationId" EIPAssociation
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
instanceId :: Maybe (Value Text)
networkInterfaceId :: Maybe (Value Text)
privateIpAddress :: Maybe (Value Text)
haddock_workaround_ :: ()
instanceId :: Maybe (Value Text)
networkInterfaceId :: Maybe (Value Text)
privateIpAddress :: Maybe (Value Text)
..}
instance Property "InstanceId" EIPAssociation where
type PropertyType "InstanceId" EIPAssociation = Value Prelude.Text
set :: PropertyType "InstanceId" EIPAssociation
-> EIPAssociation -> EIPAssociation
set PropertyType "InstanceId" EIPAssociation
newValue EIPAssociation {Maybe (Value Text)
()
haddock_workaround_ :: EIPAssociation -> ()
allocationId :: EIPAssociation -> Maybe (Value Text)
instanceId :: EIPAssociation -> Maybe (Value Text)
networkInterfaceId :: EIPAssociation -> Maybe (Value Text)
privateIpAddress :: EIPAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
allocationId :: Maybe (Value Text)
instanceId :: Maybe (Value Text)
networkInterfaceId :: Maybe (Value Text)
privateIpAddress :: Maybe (Value Text)
..}
= EIPAssociation {instanceId :: Maybe (Value Text)
instanceId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InstanceId" EIPAssociation
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
allocationId :: Maybe (Value Text)
networkInterfaceId :: Maybe (Value Text)
privateIpAddress :: Maybe (Value Text)
haddock_workaround_ :: ()
allocationId :: Maybe (Value Text)
networkInterfaceId :: Maybe (Value Text)
privateIpAddress :: Maybe (Value Text)
..}
instance Property "NetworkInterfaceId" EIPAssociation where
type PropertyType "NetworkInterfaceId" EIPAssociation = Value Prelude.Text
set :: PropertyType "NetworkInterfaceId" EIPAssociation
-> EIPAssociation -> EIPAssociation
set PropertyType "NetworkInterfaceId" EIPAssociation
newValue EIPAssociation {Maybe (Value Text)
()
haddock_workaround_ :: EIPAssociation -> ()
allocationId :: EIPAssociation -> Maybe (Value Text)
instanceId :: EIPAssociation -> Maybe (Value Text)
networkInterfaceId :: EIPAssociation -> Maybe (Value Text)
privateIpAddress :: EIPAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
allocationId :: Maybe (Value Text)
instanceId :: Maybe (Value Text)
networkInterfaceId :: Maybe (Value Text)
privateIpAddress :: Maybe (Value Text)
..}
= EIPAssociation {networkInterfaceId :: Maybe (Value Text)
networkInterfaceId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NetworkInterfaceId" EIPAssociation
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
allocationId :: Maybe (Value Text)
instanceId :: Maybe (Value Text)
privateIpAddress :: Maybe (Value Text)
haddock_workaround_ :: ()
allocationId :: Maybe (Value Text)
instanceId :: Maybe (Value Text)
privateIpAddress :: Maybe (Value Text)
..}
instance Property "PrivateIpAddress" EIPAssociation where
type PropertyType "PrivateIpAddress" EIPAssociation = Value Prelude.Text
set :: PropertyType "PrivateIpAddress" EIPAssociation
-> EIPAssociation -> EIPAssociation
set PropertyType "PrivateIpAddress" EIPAssociation
newValue EIPAssociation {Maybe (Value Text)
()
haddock_workaround_ :: EIPAssociation -> ()
allocationId :: EIPAssociation -> Maybe (Value Text)
instanceId :: EIPAssociation -> Maybe (Value Text)
networkInterfaceId :: EIPAssociation -> Maybe (Value Text)
privateIpAddress :: EIPAssociation -> Maybe (Value Text)
haddock_workaround_ :: ()
allocationId :: Maybe (Value Text)
instanceId :: Maybe (Value Text)
networkInterfaceId :: Maybe (Value Text)
privateIpAddress :: Maybe (Value Text)
..}
= EIPAssociation {privateIpAddress :: Maybe (Value Text)
privateIpAddress = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PrivateIpAddress" EIPAssociation
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
allocationId :: Maybe (Value Text)
instanceId :: Maybe (Value Text)
networkInterfaceId :: Maybe (Value Text)
haddock_workaround_ :: ()
allocationId :: Maybe (Value Text)
instanceId :: Maybe (Value Text)
networkInterfaceId :: Maybe (Value Text)
..}