module Stratosphere.MediaPackageV2.Channel.InputSwitchConfigurationProperty (
        InputSwitchConfigurationProperty(..),
        mkInputSwitchConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InputSwitchConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-channel-inputswitchconfiguration.html>
    InputSwitchConfigurationProperty {InputSwitchConfigurationProperty -> ()
haddock_workaround_ :: (),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-channel-inputswitchconfiguration.html#cfn-mediapackagev2-channel-inputswitchconfiguration-mqcsinputswitching>
                                      InputSwitchConfigurationProperty -> Maybe (Value Bool)
mQCSInputSwitching :: (Prelude.Maybe (Value Prelude.Bool)),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-channel-inputswitchconfiguration.html#cfn-mediapackagev2-channel-inputswitchconfiguration-preferredinput>
                                      InputSwitchConfigurationProperty -> Maybe (Value Integer)
preferredInput :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (InputSwitchConfigurationProperty
-> InputSwitchConfigurationProperty -> Bool
(InputSwitchConfigurationProperty
 -> InputSwitchConfigurationProperty -> Bool)
-> (InputSwitchConfigurationProperty
    -> InputSwitchConfigurationProperty -> Bool)
-> Eq InputSwitchConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InputSwitchConfigurationProperty
-> InputSwitchConfigurationProperty -> Bool
== :: InputSwitchConfigurationProperty
-> InputSwitchConfigurationProperty -> Bool
$c/= :: InputSwitchConfigurationProperty
-> InputSwitchConfigurationProperty -> Bool
/= :: InputSwitchConfigurationProperty
-> InputSwitchConfigurationProperty -> Bool
Prelude.Eq, Int -> InputSwitchConfigurationProperty -> ShowS
[InputSwitchConfigurationProperty] -> ShowS
InputSwitchConfigurationProperty -> String
(Int -> InputSwitchConfigurationProperty -> ShowS)
-> (InputSwitchConfigurationProperty -> String)
-> ([InputSwitchConfigurationProperty] -> ShowS)
-> Show InputSwitchConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InputSwitchConfigurationProperty -> ShowS
showsPrec :: Int -> InputSwitchConfigurationProperty -> ShowS
$cshow :: InputSwitchConfigurationProperty -> String
show :: InputSwitchConfigurationProperty -> String
$cshowList :: [InputSwitchConfigurationProperty] -> ShowS
showList :: [InputSwitchConfigurationProperty] -> ShowS
Prelude.Show)
mkInputSwitchConfigurationProperty ::
  InputSwitchConfigurationProperty
mkInputSwitchConfigurationProperty :: InputSwitchConfigurationProperty
mkInputSwitchConfigurationProperty
  = InputSwitchConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), mQCSInputSwitching :: Maybe (Value Bool)
mQCSInputSwitching = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       preferredInput :: Maybe (Value Integer)
preferredInput = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InputSwitchConfigurationProperty where
  toResourceProperties :: InputSwitchConfigurationProperty -> ResourceProperties
toResourceProperties InputSwitchConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: InputSwitchConfigurationProperty -> ()
mQCSInputSwitching :: InputSwitchConfigurationProperty -> Maybe (Value Bool)
preferredInput :: InputSwitchConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
mQCSInputSwitching :: Maybe (Value Bool)
preferredInput :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaPackageV2::Channel.InputSwitchConfiguration",
         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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MQCSInputSwitching" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
mQCSInputSwitching,
                            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
"PreferredInput" (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)
preferredInput])}
instance JSON.ToJSON InputSwitchConfigurationProperty where
  toJSON :: InputSwitchConfigurationProperty -> Value
toJSON InputSwitchConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: InputSwitchConfigurationProperty -> ()
mQCSInputSwitching :: InputSwitchConfigurationProperty -> Maybe (Value Bool)
preferredInput :: InputSwitchConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
mQCSInputSwitching :: Maybe (Value Bool)
preferredInput :: 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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MQCSInputSwitching" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
mQCSInputSwitching,
               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
"PreferredInput" (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)
preferredInput]))
instance Property "MQCSInputSwitching" InputSwitchConfigurationProperty where
  type PropertyType "MQCSInputSwitching" InputSwitchConfigurationProperty = Value Prelude.Bool
  set :: PropertyType "MQCSInputSwitching" InputSwitchConfigurationProperty
-> InputSwitchConfigurationProperty
-> InputSwitchConfigurationProperty
set PropertyType "MQCSInputSwitching" InputSwitchConfigurationProperty
newValue InputSwitchConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: InputSwitchConfigurationProperty -> ()
mQCSInputSwitching :: InputSwitchConfigurationProperty -> Maybe (Value Bool)
preferredInput :: InputSwitchConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
mQCSInputSwitching :: Maybe (Value Bool)
preferredInput :: Maybe (Value Integer)
..}
    = InputSwitchConfigurationProperty
        {mQCSInputSwitching :: Maybe (Value Bool)
mQCSInputSwitching = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MQCSInputSwitching" InputSwitchConfigurationProperty
Value Bool
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
preferredInput :: Maybe (Value Integer)
haddock_workaround_ :: ()
preferredInput :: Maybe (Value Integer)
..}
instance Property "PreferredInput" InputSwitchConfigurationProperty where
  type PropertyType "PreferredInput" InputSwitchConfigurationProperty = Value Prelude.Integer
  set :: PropertyType "PreferredInput" InputSwitchConfigurationProperty
-> InputSwitchConfigurationProperty
-> InputSwitchConfigurationProperty
set PropertyType "PreferredInput" InputSwitchConfigurationProperty
newValue InputSwitchConfigurationProperty {Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: InputSwitchConfigurationProperty -> ()
mQCSInputSwitching :: InputSwitchConfigurationProperty -> Maybe (Value Bool)
preferredInput :: InputSwitchConfigurationProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
mQCSInputSwitching :: Maybe (Value Bool)
preferredInput :: Maybe (Value Integer)
..}
    = InputSwitchConfigurationProperty
        {preferredInput :: Maybe (Value Integer)
preferredInput = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PreferredInput" InputSwitchConfigurationProperty
Value Integer
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
mQCSInputSwitching :: Maybe (Value Bool)
haddock_workaround_ :: ()
mQCSInputSwitching :: Maybe (Value Bool)
..}