module Stratosphere.MediaLive.Input.InputDeviceRequestProperty (
InputDeviceRequestProperty(..), mkInputDeviceRequestProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InputDeviceRequestProperty
=
InputDeviceRequestProperty {InputDeviceRequestProperty -> ()
haddock_workaround_ :: (),
InputDeviceRequestProperty -> Maybe (Value Text)
id :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (InputDeviceRequestProperty -> InputDeviceRequestProperty -> Bool
(InputDeviceRequestProperty -> InputDeviceRequestProperty -> Bool)
-> (InputDeviceRequestProperty
-> InputDeviceRequestProperty -> Bool)
-> Eq InputDeviceRequestProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InputDeviceRequestProperty -> InputDeviceRequestProperty -> Bool
== :: InputDeviceRequestProperty -> InputDeviceRequestProperty -> Bool
$c/= :: InputDeviceRequestProperty -> InputDeviceRequestProperty -> Bool
/= :: InputDeviceRequestProperty -> InputDeviceRequestProperty -> Bool
Prelude.Eq, Int -> InputDeviceRequestProperty -> ShowS
[InputDeviceRequestProperty] -> ShowS
InputDeviceRequestProperty -> String
(Int -> InputDeviceRequestProperty -> ShowS)
-> (InputDeviceRequestProperty -> String)
-> ([InputDeviceRequestProperty] -> ShowS)
-> Show InputDeviceRequestProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InputDeviceRequestProperty -> ShowS
showsPrec :: Int -> InputDeviceRequestProperty -> ShowS
$cshow :: InputDeviceRequestProperty -> String
show :: InputDeviceRequestProperty -> String
$cshowList :: [InputDeviceRequestProperty] -> ShowS
showList :: [InputDeviceRequestProperty] -> ShowS
Prelude.Show)
mkInputDeviceRequestProperty :: InputDeviceRequestProperty
mkInputDeviceRequestProperty :: InputDeviceRequestProperty
mkInputDeviceRequestProperty
= InputDeviceRequestProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), id :: Maybe (Value Text)
id = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InputDeviceRequestProperty where
toResourceProperties :: InputDeviceRequestProperty -> ResourceProperties
toResourceProperties InputDeviceRequestProperty {Maybe (Value Text)
()
haddock_workaround_ :: InputDeviceRequestProperty -> ()
id :: InputDeviceRequestProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
id :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::MediaLive::Input.InputDeviceRequest",
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
"Id" (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)
id])}
instance JSON.ToJSON InputDeviceRequestProperty where
toJSON :: InputDeviceRequestProperty -> Value
toJSON InputDeviceRequestProperty {Maybe (Value Text)
()
haddock_workaround_ :: InputDeviceRequestProperty -> ()
id :: InputDeviceRequestProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
id :: 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
"Id" (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)
id]))
instance Property "Id" InputDeviceRequestProperty where
type PropertyType "Id" InputDeviceRequestProperty = Value Prelude.Text
set :: PropertyType "Id" InputDeviceRequestProperty
-> InputDeviceRequestProperty -> InputDeviceRequestProperty
set PropertyType "Id" InputDeviceRequestProperty
newValue InputDeviceRequestProperty {Maybe (Value Text)
()
haddock_workaround_ :: InputDeviceRequestProperty -> ()
id :: InputDeviceRequestProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
id :: Maybe (Value Text)
..}
= InputDeviceRequestProperty {id :: Maybe (Value Text)
id = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Id" InputDeviceRequestProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}