module Stratosphere.ImageBuilder.InfrastructureConfiguration.InstanceMetadataOptionsProperty (
InstanceMetadataOptionsProperty(..),
mkInstanceMetadataOptionsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InstanceMetadataOptionsProperty
=
InstanceMetadataOptionsProperty {InstanceMetadataOptionsProperty -> ()
haddock_workaround_ :: (),
InstanceMetadataOptionsProperty -> Maybe (Value Integer)
httpPutResponseHopLimit :: (Prelude.Maybe (Value Prelude.Integer)),
InstanceMetadataOptionsProperty -> Maybe (Value Text)
httpTokens :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (InstanceMetadataOptionsProperty
-> InstanceMetadataOptionsProperty -> Bool
(InstanceMetadataOptionsProperty
-> InstanceMetadataOptionsProperty -> Bool)
-> (InstanceMetadataOptionsProperty
-> InstanceMetadataOptionsProperty -> Bool)
-> Eq InstanceMetadataOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InstanceMetadataOptionsProperty
-> InstanceMetadataOptionsProperty -> Bool
== :: InstanceMetadataOptionsProperty
-> InstanceMetadataOptionsProperty -> Bool
$c/= :: InstanceMetadataOptionsProperty
-> InstanceMetadataOptionsProperty -> Bool
/= :: InstanceMetadataOptionsProperty
-> InstanceMetadataOptionsProperty -> Bool
Prelude.Eq, Int -> InstanceMetadataOptionsProperty -> ShowS
[InstanceMetadataOptionsProperty] -> ShowS
InstanceMetadataOptionsProperty -> String
(Int -> InstanceMetadataOptionsProperty -> ShowS)
-> (InstanceMetadataOptionsProperty -> String)
-> ([InstanceMetadataOptionsProperty] -> ShowS)
-> Show InstanceMetadataOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InstanceMetadataOptionsProperty -> ShowS
showsPrec :: Int -> InstanceMetadataOptionsProperty -> ShowS
$cshow :: InstanceMetadataOptionsProperty -> String
show :: InstanceMetadataOptionsProperty -> String
$cshowList :: [InstanceMetadataOptionsProperty] -> ShowS
showList :: [InstanceMetadataOptionsProperty] -> ShowS
Prelude.Show)
mkInstanceMetadataOptionsProperty ::
InstanceMetadataOptionsProperty
mkInstanceMetadataOptionsProperty :: InstanceMetadataOptionsProperty
mkInstanceMetadataOptionsProperty
= InstanceMetadataOptionsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
httpPutResponseHopLimit :: Maybe (Value Integer)
httpPutResponseHopLimit = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
httpTokens :: Maybe (Value Text)
httpTokens = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InstanceMetadataOptionsProperty where
toResourceProperties :: InstanceMetadataOptionsProperty -> ResourceProperties
toResourceProperties InstanceMetadataOptionsProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: InstanceMetadataOptionsProperty -> ()
httpPutResponseHopLimit :: InstanceMetadataOptionsProperty -> Maybe (Value Integer)
httpTokens :: InstanceMetadataOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
httpPutResponseHopLimit :: Maybe (Value Integer)
httpTokens :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ImageBuilder::InfrastructureConfiguration.InstanceMetadataOptions",
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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HttpPutResponseHopLimit"
(Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
httpPutResponseHopLimit,
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
"HttpTokens" (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)
httpTokens])}
instance JSON.ToJSON InstanceMetadataOptionsProperty where
toJSON :: InstanceMetadataOptionsProperty -> Value
toJSON InstanceMetadataOptionsProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: InstanceMetadataOptionsProperty -> ()
httpPutResponseHopLimit :: InstanceMetadataOptionsProperty -> Maybe (Value Integer)
httpTokens :: InstanceMetadataOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
httpPutResponseHopLimit :: Maybe (Value Integer)
httpTokens :: 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 Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HttpPutResponseHopLimit"
(Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
httpPutResponseHopLimit,
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
"HttpTokens" (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)
httpTokens]))
instance Property "HttpPutResponseHopLimit" InstanceMetadataOptionsProperty where
type PropertyType "HttpPutResponseHopLimit" InstanceMetadataOptionsProperty = Value Prelude.Integer
set :: PropertyType
"HttpPutResponseHopLimit" InstanceMetadataOptionsProperty
-> InstanceMetadataOptionsProperty
-> InstanceMetadataOptionsProperty
set PropertyType
"HttpPutResponseHopLimit" InstanceMetadataOptionsProperty
newValue InstanceMetadataOptionsProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: InstanceMetadataOptionsProperty -> ()
httpPutResponseHopLimit :: InstanceMetadataOptionsProperty -> Maybe (Value Integer)
httpTokens :: InstanceMetadataOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
httpPutResponseHopLimit :: Maybe (Value Integer)
httpTokens :: Maybe (Value Text)
..}
= InstanceMetadataOptionsProperty
{httpPutResponseHopLimit :: Maybe (Value Integer)
httpPutResponseHopLimit = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"HttpPutResponseHopLimit" InstanceMetadataOptionsProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
httpTokens :: Maybe (Value Text)
haddock_workaround_ :: ()
httpTokens :: Maybe (Value Text)
..}
instance Property "HttpTokens" InstanceMetadataOptionsProperty where
type PropertyType "HttpTokens" InstanceMetadataOptionsProperty = Value Prelude.Text
set :: PropertyType "HttpTokens" InstanceMetadataOptionsProperty
-> InstanceMetadataOptionsProperty
-> InstanceMetadataOptionsProperty
set PropertyType "HttpTokens" InstanceMetadataOptionsProperty
newValue InstanceMetadataOptionsProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: InstanceMetadataOptionsProperty -> ()
httpPutResponseHopLimit :: InstanceMetadataOptionsProperty -> Maybe (Value Integer)
httpTokens :: InstanceMetadataOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
httpPutResponseHopLimit :: Maybe (Value Integer)
httpTokens :: Maybe (Value Text)
..}
= InstanceMetadataOptionsProperty
{httpTokens :: Maybe (Value Text)
httpTokens = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HttpTokens" InstanceMetadataOptionsProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
httpPutResponseHopLimit :: Maybe (Value Integer)
haddock_workaround_ :: ()
httpPutResponseHopLimit :: Maybe (Value Integer)
..}