module Stratosphere.MediaConnect.Flow.FailoverConfigProperty (
        module Exports, FailoverConfigProperty(..),
        mkFailoverConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MediaConnect.Flow.SourcePriorityProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FailoverConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-flow-failoverconfig.html>
    FailoverConfigProperty {FailoverConfigProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-flow-failoverconfig.html#cfn-mediaconnect-flow-failoverconfig-failovermode>
                            FailoverConfigProperty -> Maybe (Value Text)
failoverMode :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-flow-failoverconfig.html#cfn-mediaconnect-flow-failoverconfig-recoverywindow>
                            FailoverConfigProperty -> Maybe (Value Integer)
recoveryWindow :: (Prelude.Maybe (Value Prelude.Integer)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-flow-failoverconfig.html#cfn-mediaconnect-flow-failoverconfig-sourcepriority>
                            FailoverConfigProperty -> Maybe SourcePriorityProperty
sourcePriority :: (Prelude.Maybe SourcePriorityProperty),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediaconnect-flow-failoverconfig.html#cfn-mediaconnect-flow-failoverconfig-state>
                            FailoverConfigProperty -> Maybe (Value Text)
state :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (FailoverConfigProperty -> FailoverConfigProperty -> Bool
(FailoverConfigProperty -> FailoverConfigProperty -> Bool)
-> (FailoverConfigProperty -> FailoverConfigProperty -> Bool)
-> Eq FailoverConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FailoverConfigProperty -> FailoverConfigProperty -> Bool
== :: FailoverConfigProperty -> FailoverConfigProperty -> Bool
$c/= :: FailoverConfigProperty -> FailoverConfigProperty -> Bool
/= :: FailoverConfigProperty -> FailoverConfigProperty -> Bool
Prelude.Eq, Int -> FailoverConfigProperty -> ShowS
[FailoverConfigProperty] -> ShowS
FailoverConfigProperty -> String
(Int -> FailoverConfigProperty -> ShowS)
-> (FailoverConfigProperty -> String)
-> ([FailoverConfigProperty] -> ShowS)
-> Show FailoverConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FailoverConfigProperty -> ShowS
showsPrec :: Int -> FailoverConfigProperty -> ShowS
$cshow :: FailoverConfigProperty -> String
show :: FailoverConfigProperty -> String
$cshowList :: [FailoverConfigProperty] -> ShowS
showList :: [FailoverConfigProperty] -> ShowS
Prelude.Show)
mkFailoverConfigProperty :: FailoverConfigProperty
mkFailoverConfigProperty :: FailoverConfigProperty
mkFailoverConfigProperty
  = FailoverConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), failoverMode :: Maybe (Value Text)
failoverMode = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       recoveryWindow :: Maybe (Value Integer)
recoveryWindow = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing, sourcePriority :: Maybe SourcePriorityProperty
sourcePriority = Maybe SourcePriorityProperty
forall a. Maybe a
Prelude.Nothing,
       state :: Maybe (Value Text)
state = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FailoverConfigProperty where
  toResourceProperties :: FailoverConfigProperty -> ResourceProperties
toResourceProperties FailoverConfigProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe SourcePriorityProperty
()
haddock_workaround_ :: FailoverConfigProperty -> ()
failoverMode :: FailoverConfigProperty -> Maybe (Value Text)
recoveryWindow :: FailoverConfigProperty -> Maybe (Value Integer)
sourcePriority :: FailoverConfigProperty -> Maybe SourcePriorityProperty
state :: FailoverConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
failoverMode :: Maybe (Value Text)
recoveryWindow :: Maybe (Value Integer)
sourcePriority :: Maybe SourcePriorityProperty
state :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaConnect::Flow.FailoverConfig",
         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
"FailoverMode" (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)
failoverMode,
                            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
"RecoveryWindow" (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)
recoveryWindow,
                            Key -> SourcePriorityProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourcePriority" (SourcePriorityProperty -> (Key, Value))
-> Maybe SourcePriorityProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourcePriorityProperty
sourcePriority,
                            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])}
instance JSON.ToJSON FailoverConfigProperty where
  toJSON :: FailoverConfigProperty -> Value
toJSON FailoverConfigProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe SourcePriorityProperty
()
haddock_workaround_ :: FailoverConfigProperty -> ()
failoverMode :: FailoverConfigProperty -> Maybe (Value Text)
recoveryWindow :: FailoverConfigProperty -> Maybe (Value Integer)
sourcePriority :: FailoverConfigProperty -> Maybe SourcePriorityProperty
state :: FailoverConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
failoverMode :: Maybe (Value Text)
recoveryWindow :: Maybe (Value Integer)
sourcePriority :: Maybe SourcePriorityProperty
state :: 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
"FailoverMode" (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)
failoverMode,
               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
"RecoveryWindow" (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)
recoveryWindow,
               Key -> SourcePriorityProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourcePriority" (SourcePriorityProperty -> (Key, Value))
-> Maybe SourcePriorityProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourcePriorityProperty
sourcePriority,
               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]))
instance Property "FailoverMode" FailoverConfigProperty where
  type PropertyType "FailoverMode" FailoverConfigProperty = Value Prelude.Text
  set :: PropertyType "FailoverMode" FailoverConfigProperty
-> FailoverConfigProperty -> FailoverConfigProperty
set PropertyType "FailoverMode" FailoverConfigProperty
newValue FailoverConfigProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe SourcePriorityProperty
()
haddock_workaround_ :: FailoverConfigProperty -> ()
failoverMode :: FailoverConfigProperty -> Maybe (Value Text)
recoveryWindow :: FailoverConfigProperty -> Maybe (Value Integer)
sourcePriority :: FailoverConfigProperty -> Maybe SourcePriorityProperty
state :: FailoverConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
failoverMode :: Maybe (Value Text)
recoveryWindow :: Maybe (Value Integer)
sourcePriority :: Maybe SourcePriorityProperty
state :: Maybe (Value Text)
..}
    = FailoverConfigProperty {failoverMode :: Maybe (Value Text)
failoverMode = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FailoverMode" FailoverConfigProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
Maybe SourcePriorityProperty
()
haddock_workaround_ :: ()
recoveryWindow :: Maybe (Value Integer)
sourcePriority :: Maybe SourcePriorityProperty
state :: Maybe (Value Text)
haddock_workaround_ :: ()
recoveryWindow :: Maybe (Value Integer)
sourcePriority :: Maybe SourcePriorityProperty
state :: Maybe (Value Text)
..}
instance Property "RecoveryWindow" FailoverConfigProperty where
  type PropertyType "RecoveryWindow" FailoverConfigProperty = Value Prelude.Integer
  set :: PropertyType "RecoveryWindow" FailoverConfigProperty
-> FailoverConfigProperty -> FailoverConfigProperty
set PropertyType "RecoveryWindow" FailoverConfigProperty
newValue FailoverConfigProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe SourcePriorityProperty
()
haddock_workaround_ :: FailoverConfigProperty -> ()
failoverMode :: FailoverConfigProperty -> Maybe (Value Text)
recoveryWindow :: FailoverConfigProperty -> Maybe (Value Integer)
sourcePriority :: FailoverConfigProperty -> Maybe SourcePriorityProperty
state :: FailoverConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
failoverMode :: Maybe (Value Text)
recoveryWindow :: Maybe (Value Integer)
sourcePriority :: Maybe SourcePriorityProperty
state :: Maybe (Value Text)
..}
    = FailoverConfigProperty
        {recoveryWindow :: Maybe (Value Integer)
recoveryWindow = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RecoveryWindow" FailoverConfigProperty
Value Integer
newValue, Maybe (Value Text)
Maybe SourcePriorityProperty
()
haddock_workaround_ :: ()
failoverMode :: Maybe (Value Text)
sourcePriority :: Maybe SourcePriorityProperty
state :: Maybe (Value Text)
haddock_workaround_ :: ()
failoverMode :: Maybe (Value Text)
sourcePriority :: Maybe SourcePriorityProperty
state :: Maybe (Value Text)
..}
instance Property "SourcePriority" FailoverConfigProperty where
  type PropertyType "SourcePriority" FailoverConfigProperty = SourcePriorityProperty
  set :: PropertyType "SourcePriority" FailoverConfigProperty
-> FailoverConfigProperty -> FailoverConfigProperty
set PropertyType "SourcePriority" FailoverConfigProperty
newValue FailoverConfigProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe SourcePriorityProperty
()
haddock_workaround_ :: FailoverConfigProperty -> ()
failoverMode :: FailoverConfigProperty -> Maybe (Value Text)
recoveryWindow :: FailoverConfigProperty -> Maybe (Value Integer)
sourcePriority :: FailoverConfigProperty -> Maybe SourcePriorityProperty
state :: FailoverConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
failoverMode :: Maybe (Value Text)
recoveryWindow :: Maybe (Value Integer)
sourcePriority :: Maybe SourcePriorityProperty
state :: Maybe (Value Text)
..}
    = FailoverConfigProperty
        {sourcePriority :: Maybe SourcePriorityProperty
sourcePriority = SourcePriorityProperty -> Maybe SourcePriorityProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SourcePriority" FailoverConfigProperty
SourcePriorityProperty
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
failoverMode :: Maybe (Value Text)
recoveryWindow :: Maybe (Value Integer)
state :: Maybe (Value Text)
haddock_workaround_ :: ()
failoverMode :: Maybe (Value Text)
recoveryWindow :: Maybe (Value Integer)
state :: Maybe (Value Text)
..}
instance Property "State" FailoverConfigProperty where
  type PropertyType "State" FailoverConfigProperty = Value Prelude.Text
  set :: PropertyType "State" FailoverConfigProperty
-> FailoverConfigProperty -> FailoverConfigProperty
set PropertyType "State" FailoverConfigProperty
newValue FailoverConfigProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe SourcePriorityProperty
()
haddock_workaround_ :: FailoverConfigProperty -> ()
failoverMode :: FailoverConfigProperty -> Maybe (Value Text)
recoveryWindow :: FailoverConfigProperty -> Maybe (Value Integer)
sourcePriority :: FailoverConfigProperty -> Maybe SourcePriorityProperty
state :: FailoverConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
failoverMode :: Maybe (Value Text)
recoveryWindow :: Maybe (Value Integer)
sourcePriority :: Maybe SourcePriorityProperty
state :: Maybe (Value Text)
..}
    = FailoverConfigProperty {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" FailoverConfigProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
Maybe SourcePriorityProperty
()
haddock_workaround_ :: ()
failoverMode :: Maybe (Value Text)
recoveryWindow :: Maybe (Value Integer)
sourcePriority :: Maybe SourcePriorityProperty
haddock_workaround_ :: ()
failoverMode :: Maybe (Value Text)
recoveryWindow :: Maybe (Value Integer)
sourcePriority :: Maybe SourcePriorityProperty
..}