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