module Stratosphere.MediaConnect.Bridge.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.Bridge.SourcePriorityProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FailoverConfigProperty
=
FailoverConfigProperty {FailoverConfigProperty -> ()
haddock_workaround_ :: (),
FailoverConfigProperty -> Value Text
failoverMode :: (Value Prelude.Text),
FailoverConfigProperty -> Maybe SourcePriorityProperty
sourcePriority :: (Prelude.Maybe SourcePriorityProperty),
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 ::
Value Prelude.Text -> FailoverConfigProperty
mkFailoverConfigProperty :: Value Text -> FailoverConfigProperty
mkFailoverConfigProperty Value Text
failoverMode
= FailoverConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), failoverMode :: Value Text
failoverMode = Value Text
failoverMode,
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 Text)
Maybe SourcePriorityProperty
()
Value Text
haddock_workaround_ :: FailoverConfigProperty -> ()
failoverMode :: FailoverConfigProperty -> Value Text
sourcePriority :: FailoverConfigProperty -> Maybe SourcePriorityProperty
state :: FailoverConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
failoverMode :: Value Text
sourcePriority :: Maybe SourcePriorityProperty
state :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::MediaConnect::Bridge.FailoverConfig",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"FailoverMode" 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..= Value Text
failoverMode]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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 Text)
Maybe SourcePriorityProperty
()
Value Text
haddock_workaround_ :: FailoverConfigProperty -> ()
failoverMode :: FailoverConfigProperty -> Value Text
sourcePriority :: FailoverConfigProperty -> Maybe SourcePriorityProperty
state :: FailoverConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
failoverMode :: Value Text
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
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"FailoverMode" 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..= Value Text
failoverMode]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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 Text)
Maybe SourcePriorityProperty
()
Value Text
haddock_workaround_ :: FailoverConfigProperty -> ()
failoverMode :: FailoverConfigProperty -> Value Text
sourcePriority :: FailoverConfigProperty -> Maybe SourcePriorityProperty
state :: FailoverConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
failoverMode :: Value Text
sourcePriority :: Maybe SourcePriorityProperty
state :: Maybe (Value Text)
..}
= FailoverConfigProperty {failoverMode :: Value Text
failoverMode = PropertyType "FailoverMode" FailoverConfigProperty
Value Text
newValue, Maybe (Value Text)
Maybe SourcePriorityProperty
()
haddock_workaround_ :: ()
sourcePriority :: Maybe SourcePriorityProperty
state :: Maybe (Value Text)
haddock_workaround_ :: ()
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 Text)
Maybe SourcePriorityProperty
()
Value Text
haddock_workaround_ :: FailoverConfigProperty -> ()
failoverMode :: FailoverConfigProperty -> Value Text
sourcePriority :: FailoverConfigProperty -> Maybe SourcePriorityProperty
state :: FailoverConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
failoverMode :: Value Text
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 Text)
()
Value Text
haddock_workaround_ :: ()
failoverMode :: Value Text
state :: Maybe (Value Text)
haddock_workaround_ :: ()
failoverMode :: Value Text
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 Text)
Maybe SourcePriorityProperty
()
Value Text
haddock_workaround_ :: FailoverConfigProperty -> ()
failoverMode :: FailoverConfigProperty -> Value Text
sourcePriority :: FailoverConfigProperty -> Maybe SourcePriorityProperty
state :: FailoverConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
failoverMode :: Value Text
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 SourcePriorityProperty
()
Value Text
haddock_workaround_ :: ()
failoverMode :: Value Text
sourcePriority :: Maybe SourcePriorityProperty
haddock_workaround_ :: ()
failoverMode :: Value Text
sourcePriority :: Maybe SourcePriorityProperty
..}