module Stratosphere.MediaPackageV2.OriginEndpoint.ScteProperty (
        ScteProperty(..), mkScteProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ScteProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-originendpoint-scte.html>
    ScteProperty {ScteProperty -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackagev2-originendpoint-scte.html#cfn-mediapackagev2-originendpoint-scte-sctefilter>
                  ScteProperty -> Maybe (ValueList Text)
scteFilter :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (ScteProperty -> ScteProperty -> Bool
(ScteProperty -> ScteProperty -> Bool)
-> (ScteProperty -> ScteProperty -> Bool) -> Eq ScteProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ScteProperty -> ScteProperty -> Bool
== :: ScteProperty -> ScteProperty -> Bool
$c/= :: ScteProperty -> ScteProperty -> Bool
/= :: ScteProperty -> ScteProperty -> Bool
Prelude.Eq, Int -> ScteProperty -> ShowS
[ScteProperty] -> ShowS
ScteProperty -> String
(Int -> ScteProperty -> ShowS)
-> (ScteProperty -> String)
-> ([ScteProperty] -> ShowS)
-> Show ScteProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ScteProperty -> ShowS
showsPrec :: Int -> ScteProperty -> ShowS
$cshow :: ScteProperty -> String
show :: ScteProperty -> String
$cshowList :: [ScteProperty] -> ShowS
showList :: [ScteProperty] -> ShowS
Prelude.Show)
mkScteProperty :: ScteProperty
mkScteProperty :: ScteProperty
mkScteProperty
  = ScteProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), scteFilter :: Maybe (ValueList Text)
scteFilter = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ScteProperty where
  toResourceProperties :: ScteProperty -> ResourceProperties
toResourceProperties ScteProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: ScteProperty -> ()
scteFilter :: ScteProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
scteFilter :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaPackageV2::OriginEndpoint.Scte",
         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 -> ValueList 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
"ScteFilter" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
scteFilter])}
instance JSON.ToJSON ScteProperty where
  toJSON :: ScteProperty -> Value
toJSON ScteProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: ScteProperty -> ()
scteFilter :: ScteProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
scteFilter :: Maybe (ValueList 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 -> ValueList 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
"ScteFilter" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
scteFilter]))
instance Property "ScteFilter" ScteProperty where
  type PropertyType "ScteFilter" ScteProperty = ValueList Prelude.Text
  set :: PropertyType "ScteFilter" ScteProperty
-> ScteProperty -> ScteProperty
set PropertyType "ScteFilter" ScteProperty
newValue ScteProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: ScteProperty -> ()
scteFilter :: ScteProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
scteFilter :: Maybe (ValueList Text)
..}
    = ScteProperty {scteFilter :: Maybe (ValueList Text)
scteFilter = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ScteFilter" ScteProperty
ValueList Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}