module Stratosphere.MediaLive.Channel.InputLossFailoverSettingsProperty (
        InputLossFailoverSettingsProperty(..),
        mkInputLossFailoverSettingsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InputLossFailoverSettingsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-inputlossfailoversettings.html>
    InputLossFailoverSettingsProperty {InputLossFailoverSettingsProperty -> ()
haddock_workaround_ :: (),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-inputlossfailoversettings.html#cfn-medialive-channel-inputlossfailoversettings-inputlossthresholdmsec>
                                       InputLossFailoverSettingsProperty -> Maybe (Value Integer)
inputLossThresholdMsec :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (InputLossFailoverSettingsProperty
-> InputLossFailoverSettingsProperty -> Bool
(InputLossFailoverSettingsProperty
 -> InputLossFailoverSettingsProperty -> Bool)
-> (InputLossFailoverSettingsProperty
    -> InputLossFailoverSettingsProperty -> Bool)
-> Eq InputLossFailoverSettingsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InputLossFailoverSettingsProperty
-> InputLossFailoverSettingsProperty -> Bool
== :: InputLossFailoverSettingsProperty
-> InputLossFailoverSettingsProperty -> Bool
$c/= :: InputLossFailoverSettingsProperty
-> InputLossFailoverSettingsProperty -> Bool
/= :: InputLossFailoverSettingsProperty
-> InputLossFailoverSettingsProperty -> Bool
Prelude.Eq, Int -> InputLossFailoverSettingsProperty -> ShowS
[InputLossFailoverSettingsProperty] -> ShowS
InputLossFailoverSettingsProperty -> String
(Int -> InputLossFailoverSettingsProperty -> ShowS)
-> (InputLossFailoverSettingsProperty -> String)
-> ([InputLossFailoverSettingsProperty] -> ShowS)
-> Show InputLossFailoverSettingsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InputLossFailoverSettingsProperty -> ShowS
showsPrec :: Int -> InputLossFailoverSettingsProperty -> ShowS
$cshow :: InputLossFailoverSettingsProperty -> String
show :: InputLossFailoverSettingsProperty -> String
$cshowList :: [InputLossFailoverSettingsProperty] -> ShowS
showList :: [InputLossFailoverSettingsProperty] -> ShowS
Prelude.Show)
mkInputLossFailoverSettingsProperty ::
  InputLossFailoverSettingsProperty
mkInputLossFailoverSettingsProperty :: InputLossFailoverSettingsProperty
mkInputLossFailoverSettingsProperty
  = InputLossFailoverSettingsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       inputLossThresholdMsec :: Maybe (Value Integer)
inputLossThresholdMsec = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InputLossFailoverSettingsProperty where
  toResourceProperties :: InputLossFailoverSettingsProperty -> ResourceProperties
toResourceProperties InputLossFailoverSettingsProperty {Maybe (Value Integer)
()
haddock_workaround_ :: InputLossFailoverSettingsProperty -> ()
inputLossThresholdMsec :: InputLossFailoverSettingsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
inputLossThresholdMsec :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaLive::Channel.InputLossFailoverSettings",
         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
"InputLossThresholdMsec"
                              (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)
inputLossThresholdMsec])}
instance JSON.ToJSON InputLossFailoverSettingsProperty where
  toJSON :: InputLossFailoverSettingsProperty -> Value
toJSON InputLossFailoverSettingsProperty {Maybe (Value Integer)
()
haddock_workaround_ :: InputLossFailoverSettingsProperty -> ()
inputLossThresholdMsec :: InputLossFailoverSettingsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
inputLossThresholdMsec :: 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 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
"InputLossThresholdMsec"
                 (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)
inputLossThresholdMsec]))
instance Property "InputLossThresholdMsec" InputLossFailoverSettingsProperty where
  type PropertyType "InputLossThresholdMsec" InputLossFailoverSettingsProperty = Value Prelude.Integer
  set :: PropertyType
  "InputLossThresholdMsec" InputLossFailoverSettingsProperty
-> InputLossFailoverSettingsProperty
-> InputLossFailoverSettingsProperty
set PropertyType
  "InputLossThresholdMsec" InputLossFailoverSettingsProperty
newValue InputLossFailoverSettingsProperty {Maybe (Value Integer)
()
haddock_workaround_ :: InputLossFailoverSettingsProperty -> ()
inputLossThresholdMsec :: InputLossFailoverSettingsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
inputLossThresholdMsec :: Maybe (Value Integer)
..}
    = InputLossFailoverSettingsProperty
        {inputLossThresholdMsec :: Maybe (Value Integer)
inputLossThresholdMsec = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "InputLossThresholdMsec" InputLossFailoverSettingsProperty
Value Integer
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}