module Stratosphere.OpsWorks.Stack.ElasticIpProperty (
ElasticIpProperty(..), mkElasticIpProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ElasticIpProperty
=
ElasticIpProperty {ElasticIpProperty -> ()
haddock_workaround_ :: (),
ElasticIpProperty -> Value Text
ip :: (Value Prelude.Text),
ElasticIpProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (ElasticIpProperty -> ElasticIpProperty -> Bool
(ElasticIpProperty -> ElasticIpProperty -> Bool)
-> (ElasticIpProperty -> ElasticIpProperty -> Bool)
-> Eq ElasticIpProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ElasticIpProperty -> ElasticIpProperty -> Bool
== :: ElasticIpProperty -> ElasticIpProperty -> Bool
$c/= :: ElasticIpProperty -> ElasticIpProperty -> Bool
/= :: ElasticIpProperty -> ElasticIpProperty -> Bool
Prelude.Eq, Int -> ElasticIpProperty -> ShowS
[ElasticIpProperty] -> ShowS
ElasticIpProperty -> String
(Int -> ElasticIpProperty -> ShowS)
-> (ElasticIpProperty -> String)
-> ([ElasticIpProperty] -> ShowS)
-> Show ElasticIpProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ElasticIpProperty -> ShowS
showsPrec :: Int -> ElasticIpProperty -> ShowS
$cshow :: ElasticIpProperty -> String
show :: ElasticIpProperty -> String
$cshowList :: [ElasticIpProperty] -> ShowS
showList :: [ElasticIpProperty] -> ShowS
Prelude.Show)
mkElasticIpProperty :: Value Prelude.Text -> ElasticIpProperty
mkElasticIpProperty :: Value Text -> ElasticIpProperty
mkElasticIpProperty Value Text
ip
= ElasticIpProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), ip :: Value Text
ip = Value Text
ip, name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ElasticIpProperty where
toResourceProperties :: ElasticIpProperty -> ResourceProperties
toResourceProperties ElasticIpProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ElasticIpProperty -> ()
ip :: ElasticIpProperty -> Value Text
name :: ElasticIpProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
ip :: Value Text
name :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::OpsWorks::Stack.ElasticIp",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Ip" 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..= Value Text
ip]
([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
"Name" (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)
name]))}
instance JSON.ToJSON ElasticIpProperty where
toJSON :: ElasticIpProperty -> Value
toJSON ElasticIpProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ElasticIpProperty -> ()
ip :: ElasticIpProperty -> Value Text
name :: ElasticIpProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
ip :: Value Text
name :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Ip" 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..= Value Text
ip]
([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
"Name" (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)
name])))
instance Property "Ip" ElasticIpProperty where
type PropertyType "Ip" ElasticIpProperty = Value Prelude.Text
set :: PropertyType "Ip" ElasticIpProperty
-> ElasticIpProperty -> ElasticIpProperty
set PropertyType "Ip" ElasticIpProperty
newValue ElasticIpProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ElasticIpProperty -> ()
ip :: ElasticIpProperty -> Value Text
name :: ElasticIpProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
ip :: Value Text
name :: Maybe (Value Text)
..}
= ElasticIpProperty {ip :: Value Text
ip = PropertyType "Ip" ElasticIpProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}
instance Property "Name" ElasticIpProperty where
type PropertyType "Name" ElasticIpProperty = Value Prelude.Text
set :: PropertyType "Name" ElasticIpProperty
-> ElasticIpProperty -> ElasticIpProperty
set PropertyType "Name" ElasticIpProperty
newValue ElasticIpProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ElasticIpProperty -> ()
ip :: ElasticIpProperty -> Value Text
name :: ElasticIpProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
ip :: Value Text
name :: Maybe (Value Text)
..}
= ElasticIpProperty {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" ElasticIpProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
ip :: Value Text
haddock_workaround_ :: ()
ip :: Value Text
..}