module Stratosphere.MediaLive.Channel.AutomaticInputFailoverSettingsProperty (
        module Exports, AutomaticInputFailoverSettingsProperty(..),
        mkAutomaticInputFailoverSettingsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MediaLive.Channel.FailoverConditionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AutomaticInputFailoverSettingsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-automaticinputfailoversettings.html>
    AutomaticInputFailoverSettingsProperty {AutomaticInputFailoverSettingsProperty -> ()
haddock_workaround_ :: (),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-automaticinputfailoversettings.html#cfn-medialive-channel-automaticinputfailoversettings-errorcleartimemsec>
                                            AutomaticInputFailoverSettingsProperty -> Maybe (Value Integer)
errorClearTimeMsec :: (Prelude.Maybe (Value Prelude.Integer)),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-automaticinputfailoversettings.html#cfn-medialive-channel-automaticinputfailoversettings-failoverconditions>
                                            AutomaticInputFailoverSettingsProperty
-> Maybe [FailoverConditionProperty]
failoverConditions :: (Prelude.Maybe [FailoverConditionProperty]),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-automaticinputfailoversettings.html#cfn-medialive-channel-automaticinputfailoversettings-inputpreference>
                                            AutomaticInputFailoverSettingsProperty -> Maybe (Value Text)
inputPreference :: (Prelude.Maybe (Value Prelude.Text)),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-automaticinputfailoversettings.html#cfn-medialive-channel-automaticinputfailoversettings-secondaryinputid>
                                            AutomaticInputFailoverSettingsProperty -> Maybe (Value Text)
secondaryInputId :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (AutomaticInputFailoverSettingsProperty
-> AutomaticInputFailoverSettingsProperty -> Bool
(AutomaticInputFailoverSettingsProperty
 -> AutomaticInputFailoverSettingsProperty -> Bool)
-> (AutomaticInputFailoverSettingsProperty
    -> AutomaticInputFailoverSettingsProperty -> Bool)
-> Eq AutomaticInputFailoverSettingsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AutomaticInputFailoverSettingsProperty
-> AutomaticInputFailoverSettingsProperty -> Bool
== :: AutomaticInputFailoverSettingsProperty
-> AutomaticInputFailoverSettingsProperty -> Bool
$c/= :: AutomaticInputFailoverSettingsProperty
-> AutomaticInputFailoverSettingsProperty -> Bool
/= :: AutomaticInputFailoverSettingsProperty
-> AutomaticInputFailoverSettingsProperty -> Bool
Prelude.Eq, Int -> AutomaticInputFailoverSettingsProperty -> ShowS
[AutomaticInputFailoverSettingsProperty] -> ShowS
AutomaticInputFailoverSettingsProperty -> String
(Int -> AutomaticInputFailoverSettingsProperty -> ShowS)
-> (AutomaticInputFailoverSettingsProperty -> String)
-> ([AutomaticInputFailoverSettingsProperty] -> ShowS)
-> Show AutomaticInputFailoverSettingsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AutomaticInputFailoverSettingsProperty -> ShowS
showsPrec :: Int -> AutomaticInputFailoverSettingsProperty -> ShowS
$cshow :: AutomaticInputFailoverSettingsProperty -> String
show :: AutomaticInputFailoverSettingsProperty -> String
$cshowList :: [AutomaticInputFailoverSettingsProperty] -> ShowS
showList :: [AutomaticInputFailoverSettingsProperty] -> ShowS
Prelude.Show)
mkAutomaticInputFailoverSettingsProperty ::
  AutomaticInputFailoverSettingsProperty
mkAutomaticInputFailoverSettingsProperty :: AutomaticInputFailoverSettingsProperty
mkAutomaticInputFailoverSettingsProperty
  = AutomaticInputFailoverSettingsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), errorClearTimeMsec :: Maybe (Value Integer)
errorClearTimeMsec = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       failoverConditions :: Maybe [FailoverConditionProperty]
failoverConditions = Maybe [FailoverConditionProperty]
forall a. Maybe a
Prelude.Nothing,
       inputPreference :: Maybe (Value Text)
inputPreference = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       secondaryInputId :: Maybe (Value Text)
secondaryInputId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AutomaticInputFailoverSettingsProperty where
  toResourceProperties :: AutomaticInputFailoverSettingsProperty -> ResourceProperties
toResourceProperties AutomaticInputFailoverSettingsProperty {Maybe [FailoverConditionProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: AutomaticInputFailoverSettingsProperty -> ()
errorClearTimeMsec :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Integer)
failoverConditions :: AutomaticInputFailoverSettingsProperty
-> Maybe [FailoverConditionProperty]
inputPreference :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Text)
secondaryInputId :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorClearTimeMsec :: Maybe (Value Integer)
failoverConditions :: Maybe [FailoverConditionProperty]
inputPreference :: Maybe (Value Text)
secondaryInputId :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaLive::Channel.AutomaticInputFailoverSettings",
         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
"ErrorClearTimeMsec" (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)
errorClearTimeMsec,
                            Key -> [FailoverConditionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FailoverConditions" ([FailoverConditionProperty] -> (Key, Value))
-> Maybe [FailoverConditionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FailoverConditionProperty]
failoverConditions,
                            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
"InputPreference" (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)
inputPreference,
                            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
"SecondaryInputId" (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)
secondaryInputId])}
instance JSON.ToJSON AutomaticInputFailoverSettingsProperty where
  toJSON :: AutomaticInputFailoverSettingsProperty -> Value
toJSON AutomaticInputFailoverSettingsProperty {Maybe [FailoverConditionProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: AutomaticInputFailoverSettingsProperty -> ()
errorClearTimeMsec :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Integer)
failoverConditions :: AutomaticInputFailoverSettingsProperty
-> Maybe [FailoverConditionProperty]
inputPreference :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Text)
secondaryInputId :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorClearTimeMsec :: Maybe (Value Integer)
failoverConditions :: Maybe [FailoverConditionProperty]
inputPreference :: Maybe (Value Text)
secondaryInputId :: 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
"ErrorClearTimeMsec" (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)
errorClearTimeMsec,
               Key -> [FailoverConditionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FailoverConditions" ([FailoverConditionProperty] -> (Key, Value))
-> Maybe [FailoverConditionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FailoverConditionProperty]
failoverConditions,
               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
"InputPreference" (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)
inputPreference,
               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
"SecondaryInputId" (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)
secondaryInputId]))
instance Property "ErrorClearTimeMsec" AutomaticInputFailoverSettingsProperty where
  type PropertyType "ErrorClearTimeMsec" AutomaticInputFailoverSettingsProperty = Value Prelude.Integer
  set :: PropertyType
  "ErrorClearTimeMsec" AutomaticInputFailoverSettingsProperty
-> AutomaticInputFailoverSettingsProperty
-> AutomaticInputFailoverSettingsProperty
set PropertyType
  "ErrorClearTimeMsec" AutomaticInputFailoverSettingsProperty
newValue AutomaticInputFailoverSettingsProperty {Maybe [FailoverConditionProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: AutomaticInputFailoverSettingsProperty -> ()
errorClearTimeMsec :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Integer)
failoverConditions :: AutomaticInputFailoverSettingsProperty
-> Maybe [FailoverConditionProperty]
inputPreference :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Text)
secondaryInputId :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorClearTimeMsec :: Maybe (Value Integer)
failoverConditions :: Maybe [FailoverConditionProperty]
inputPreference :: Maybe (Value Text)
secondaryInputId :: Maybe (Value Text)
..}
    = AutomaticInputFailoverSettingsProperty
        {errorClearTimeMsec :: Maybe (Value Integer)
errorClearTimeMsec = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ErrorClearTimeMsec" AutomaticInputFailoverSettingsProperty
Value Integer
newValue, Maybe [FailoverConditionProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
failoverConditions :: Maybe [FailoverConditionProperty]
inputPreference :: Maybe (Value Text)
secondaryInputId :: Maybe (Value Text)
haddock_workaround_ :: ()
failoverConditions :: Maybe [FailoverConditionProperty]
inputPreference :: Maybe (Value Text)
secondaryInputId :: Maybe (Value Text)
..}
instance Property "FailoverConditions" AutomaticInputFailoverSettingsProperty where
  type PropertyType "FailoverConditions" AutomaticInputFailoverSettingsProperty = [FailoverConditionProperty]
  set :: PropertyType
  "FailoverConditions" AutomaticInputFailoverSettingsProperty
-> AutomaticInputFailoverSettingsProperty
-> AutomaticInputFailoverSettingsProperty
set PropertyType
  "FailoverConditions" AutomaticInputFailoverSettingsProperty
newValue AutomaticInputFailoverSettingsProperty {Maybe [FailoverConditionProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: AutomaticInputFailoverSettingsProperty -> ()
errorClearTimeMsec :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Integer)
failoverConditions :: AutomaticInputFailoverSettingsProperty
-> Maybe [FailoverConditionProperty]
inputPreference :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Text)
secondaryInputId :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorClearTimeMsec :: Maybe (Value Integer)
failoverConditions :: Maybe [FailoverConditionProperty]
inputPreference :: Maybe (Value Text)
secondaryInputId :: Maybe (Value Text)
..}
    = AutomaticInputFailoverSettingsProperty
        {failoverConditions :: Maybe [FailoverConditionProperty]
failoverConditions = [FailoverConditionProperty] -> Maybe [FailoverConditionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [FailoverConditionProperty]
PropertyType
  "FailoverConditions" AutomaticInputFailoverSettingsProperty
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
errorClearTimeMsec :: Maybe (Value Integer)
inputPreference :: Maybe (Value Text)
secondaryInputId :: Maybe (Value Text)
haddock_workaround_ :: ()
errorClearTimeMsec :: Maybe (Value Integer)
inputPreference :: Maybe (Value Text)
secondaryInputId :: Maybe (Value Text)
..}
instance Property "InputPreference" AutomaticInputFailoverSettingsProperty where
  type PropertyType "InputPreference" AutomaticInputFailoverSettingsProperty = Value Prelude.Text
  set :: PropertyType
  "InputPreference" AutomaticInputFailoverSettingsProperty
-> AutomaticInputFailoverSettingsProperty
-> AutomaticInputFailoverSettingsProperty
set PropertyType
  "InputPreference" AutomaticInputFailoverSettingsProperty
newValue AutomaticInputFailoverSettingsProperty {Maybe [FailoverConditionProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: AutomaticInputFailoverSettingsProperty -> ()
errorClearTimeMsec :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Integer)
failoverConditions :: AutomaticInputFailoverSettingsProperty
-> Maybe [FailoverConditionProperty]
inputPreference :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Text)
secondaryInputId :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorClearTimeMsec :: Maybe (Value Integer)
failoverConditions :: Maybe [FailoverConditionProperty]
inputPreference :: Maybe (Value Text)
secondaryInputId :: Maybe (Value Text)
..}
    = AutomaticInputFailoverSettingsProperty
        {inputPreference :: Maybe (Value Text)
inputPreference = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "InputPreference" AutomaticInputFailoverSettingsProperty
Value Text
newValue, Maybe [FailoverConditionProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
errorClearTimeMsec :: Maybe (Value Integer)
failoverConditions :: Maybe [FailoverConditionProperty]
secondaryInputId :: Maybe (Value Text)
haddock_workaround_ :: ()
errorClearTimeMsec :: Maybe (Value Integer)
failoverConditions :: Maybe [FailoverConditionProperty]
secondaryInputId :: Maybe (Value Text)
..}
instance Property "SecondaryInputId" AutomaticInputFailoverSettingsProperty where
  type PropertyType "SecondaryInputId" AutomaticInputFailoverSettingsProperty = Value Prelude.Text
  set :: PropertyType
  "SecondaryInputId" AutomaticInputFailoverSettingsProperty
-> AutomaticInputFailoverSettingsProperty
-> AutomaticInputFailoverSettingsProperty
set PropertyType
  "SecondaryInputId" AutomaticInputFailoverSettingsProperty
newValue AutomaticInputFailoverSettingsProperty {Maybe [FailoverConditionProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: AutomaticInputFailoverSettingsProperty -> ()
errorClearTimeMsec :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Integer)
failoverConditions :: AutomaticInputFailoverSettingsProperty
-> Maybe [FailoverConditionProperty]
inputPreference :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Text)
secondaryInputId :: AutomaticInputFailoverSettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
errorClearTimeMsec :: Maybe (Value Integer)
failoverConditions :: Maybe [FailoverConditionProperty]
inputPreference :: Maybe (Value Text)
secondaryInputId :: Maybe (Value Text)
..}
    = AutomaticInputFailoverSettingsProperty
        {secondaryInputId :: Maybe (Value Text)
secondaryInputId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "SecondaryInputId" AutomaticInputFailoverSettingsProperty
Value Text
newValue, Maybe [FailoverConditionProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
errorClearTimeMsec :: Maybe (Value Integer)
failoverConditions :: Maybe [FailoverConditionProperty]
inputPreference :: Maybe (Value Text)
haddock_workaround_ :: ()
errorClearTimeMsec :: Maybe (Value Integer)
failoverConditions :: Maybe [FailoverConditionProperty]
inputPreference :: Maybe (Value Text)
..}