module Stratosphere.MediaPackage.OriginEndpoint.CmafEncryptionProperty (
        module Exports, CmafEncryptionProperty(..),
        mkCmafEncryptionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MediaPackage.OriginEndpoint.SpekeKeyProviderProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CmafEncryptionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafencryption.html>
    CmafEncryptionProperty {CmafEncryptionProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafencryption.html#cfn-mediapackage-originendpoint-cmafencryption-constantinitializationvector>
                            CmafEncryptionProperty -> Maybe (Value Text)
constantInitializationVector :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafencryption.html#cfn-mediapackage-originendpoint-cmafencryption-encryptionmethod>
                            CmafEncryptionProperty -> Maybe (Value Text)
encryptionMethod :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafencryption.html#cfn-mediapackage-originendpoint-cmafencryption-keyrotationintervalseconds>
                            CmafEncryptionProperty -> Maybe (Value Integer)
keyRotationIntervalSeconds :: (Prelude.Maybe (Value Prelude.Integer)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-originendpoint-cmafencryption.html#cfn-mediapackage-originendpoint-cmafencryption-spekekeyprovider>
                            CmafEncryptionProperty -> SpekeKeyProviderProperty
spekeKeyProvider :: SpekeKeyProviderProperty}
  deriving stock (CmafEncryptionProperty -> CmafEncryptionProperty -> Bool
(CmafEncryptionProperty -> CmafEncryptionProperty -> Bool)
-> (CmafEncryptionProperty -> CmafEncryptionProperty -> Bool)
-> Eq CmafEncryptionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CmafEncryptionProperty -> CmafEncryptionProperty -> Bool
== :: CmafEncryptionProperty -> CmafEncryptionProperty -> Bool
$c/= :: CmafEncryptionProperty -> CmafEncryptionProperty -> Bool
/= :: CmafEncryptionProperty -> CmafEncryptionProperty -> Bool
Prelude.Eq, Int -> CmafEncryptionProperty -> ShowS
[CmafEncryptionProperty] -> ShowS
CmafEncryptionProperty -> String
(Int -> CmafEncryptionProperty -> ShowS)
-> (CmafEncryptionProperty -> String)
-> ([CmafEncryptionProperty] -> ShowS)
-> Show CmafEncryptionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CmafEncryptionProperty -> ShowS
showsPrec :: Int -> CmafEncryptionProperty -> ShowS
$cshow :: CmafEncryptionProperty -> String
show :: CmafEncryptionProperty -> String
$cshowList :: [CmafEncryptionProperty] -> ShowS
showList :: [CmafEncryptionProperty] -> ShowS
Prelude.Show)
mkCmafEncryptionProperty ::
  SpekeKeyProviderProperty -> CmafEncryptionProperty
mkCmafEncryptionProperty :: SpekeKeyProviderProperty -> CmafEncryptionProperty
mkCmafEncryptionProperty SpekeKeyProviderProperty
spekeKeyProvider
  = CmafEncryptionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), spekeKeyProvider :: SpekeKeyProviderProperty
spekeKeyProvider = SpekeKeyProviderProperty
spekeKeyProvider,
       constantInitializationVector :: Maybe (Value Text)
constantInitializationVector = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       encryptionMethod :: Maybe (Value Text)
encryptionMethod = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       keyRotationIntervalSeconds :: Maybe (Value Integer)
keyRotationIntervalSeconds = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CmafEncryptionProperty where
  toResourceProperties :: CmafEncryptionProperty -> ResourceProperties
toResourceProperties CmafEncryptionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
SpekeKeyProviderProperty
haddock_workaround_ :: CmafEncryptionProperty -> ()
constantInitializationVector :: CmafEncryptionProperty -> Maybe (Value Text)
encryptionMethod :: CmafEncryptionProperty -> Maybe (Value Text)
keyRotationIntervalSeconds :: CmafEncryptionProperty -> Maybe (Value Integer)
spekeKeyProvider :: CmafEncryptionProperty -> SpekeKeyProviderProperty
haddock_workaround_ :: ()
constantInitializationVector :: Maybe (Value Text)
encryptionMethod :: Maybe (Value Text)
keyRotationIntervalSeconds :: Maybe (Value Integer)
spekeKeyProvider :: SpekeKeyProviderProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaPackage::OriginEndpoint.CmafEncryption",
         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
"SpekeKeyProvider" Key -> SpekeKeyProviderProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= SpekeKeyProviderProperty
spekeKeyProvider]
                           ([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
"ConstantInitializationVector"
                                 (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)
constantInitializationVector,
                               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
"EncryptionMethod" (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)
encryptionMethod,
                               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
"KeyRotationIntervalSeconds"
                                 (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)
keyRotationIntervalSeconds]))}
instance JSON.ToJSON CmafEncryptionProperty where
  toJSON :: CmafEncryptionProperty -> Value
toJSON CmafEncryptionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
SpekeKeyProviderProperty
haddock_workaround_ :: CmafEncryptionProperty -> ()
constantInitializationVector :: CmafEncryptionProperty -> Maybe (Value Text)
encryptionMethod :: CmafEncryptionProperty -> Maybe (Value Text)
keyRotationIntervalSeconds :: CmafEncryptionProperty -> Maybe (Value Integer)
spekeKeyProvider :: CmafEncryptionProperty -> SpekeKeyProviderProperty
haddock_workaround_ :: ()
constantInitializationVector :: Maybe (Value Text)
encryptionMethod :: Maybe (Value Text)
keyRotationIntervalSeconds :: Maybe (Value Integer)
spekeKeyProvider :: SpekeKeyProviderProperty
..}
    = [(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
"SpekeKeyProvider" Key -> SpekeKeyProviderProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= SpekeKeyProviderProperty
spekeKeyProvider]
              ([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
"ConstantInitializationVector"
                    (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)
constantInitializationVector,
                  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
"EncryptionMethod" (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)
encryptionMethod,
                  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
"KeyRotationIntervalSeconds"
                    (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)
keyRotationIntervalSeconds])))
instance Property "ConstantInitializationVector" CmafEncryptionProperty where
  type PropertyType "ConstantInitializationVector" CmafEncryptionProperty = Value Prelude.Text
  set :: PropertyType "ConstantInitializationVector" CmafEncryptionProperty
-> CmafEncryptionProperty -> CmafEncryptionProperty
set PropertyType "ConstantInitializationVector" CmafEncryptionProperty
newValue CmafEncryptionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
SpekeKeyProviderProperty
haddock_workaround_ :: CmafEncryptionProperty -> ()
constantInitializationVector :: CmafEncryptionProperty -> Maybe (Value Text)
encryptionMethod :: CmafEncryptionProperty -> Maybe (Value Text)
keyRotationIntervalSeconds :: CmafEncryptionProperty -> Maybe (Value Integer)
spekeKeyProvider :: CmafEncryptionProperty -> SpekeKeyProviderProperty
haddock_workaround_ :: ()
constantInitializationVector :: Maybe (Value Text)
encryptionMethod :: Maybe (Value Text)
keyRotationIntervalSeconds :: Maybe (Value Integer)
spekeKeyProvider :: SpekeKeyProviderProperty
..}
    = CmafEncryptionProperty
        {constantInitializationVector :: Maybe (Value Text)
constantInitializationVector = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ConstantInitializationVector" CmafEncryptionProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
SpekeKeyProviderProperty
haddock_workaround_ :: ()
encryptionMethod :: Maybe (Value Text)
keyRotationIntervalSeconds :: Maybe (Value Integer)
spekeKeyProvider :: SpekeKeyProviderProperty
haddock_workaround_ :: ()
encryptionMethod :: Maybe (Value Text)
keyRotationIntervalSeconds :: Maybe (Value Integer)
spekeKeyProvider :: SpekeKeyProviderProperty
..}
instance Property "EncryptionMethod" CmafEncryptionProperty where
  type PropertyType "EncryptionMethod" CmafEncryptionProperty = Value Prelude.Text
  set :: PropertyType "EncryptionMethod" CmafEncryptionProperty
-> CmafEncryptionProperty -> CmafEncryptionProperty
set PropertyType "EncryptionMethod" CmafEncryptionProperty
newValue CmafEncryptionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
SpekeKeyProviderProperty
haddock_workaround_ :: CmafEncryptionProperty -> ()
constantInitializationVector :: CmafEncryptionProperty -> Maybe (Value Text)
encryptionMethod :: CmafEncryptionProperty -> Maybe (Value Text)
keyRotationIntervalSeconds :: CmafEncryptionProperty -> Maybe (Value Integer)
spekeKeyProvider :: CmafEncryptionProperty -> SpekeKeyProviderProperty
haddock_workaround_ :: ()
constantInitializationVector :: Maybe (Value Text)
encryptionMethod :: Maybe (Value Text)
keyRotationIntervalSeconds :: Maybe (Value Integer)
spekeKeyProvider :: SpekeKeyProviderProperty
..}
    = CmafEncryptionProperty
        {encryptionMethod :: Maybe (Value Text)
encryptionMethod = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EncryptionMethod" CmafEncryptionProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
SpekeKeyProviderProperty
haddock_workaround_ :: ()
constantInitializationVector :: Maybe (Value Text)
keyRotationIntervalSeconds :: Maybe (Value Integer)
spekeKeyProvider :: SpekeKeyProviderProperty
haddock_workaround_ :: ()
constantInitializationVector :: Maybe (Value Text)
keyRotationIntervalSeconds :: Maybe (Value Integer)
spekeKeyProvider :: SpekeKeyProviderProperty
..}
instance Property "KeyRotationIntervalSeconds" CmafEncryptionProperty where
  type PropertyType "KeyRotationIntervalSeconds" CmafEncryptionProperty = Value Prelude.Integer
  set :: PropertyType "KeyRotationIntervalSeconds" CmafEncryptionProperty
-> CmafEncryptionProperty -> CmafEncryptionProperty
set PropertyType "KeyRotationIntervalSeconds" CmafEncryptionProperty
newValue CmafEncryptionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
SpekeKeyProviderProperty
haddock_workaround_ :: CmafEncryptionProperty -> ()
constantInitializationVector :: CmafEncryptionProperty -> Maybe (Value Text)
encryptionMethod :: CmafEncryptionProperty -> Maybe (Value Text)
keyRotationIntervalSeconds :: CmafEncryptionProperty -> Maybe (Value Integer)
spekeKeyProvider :: CmafEncryptionProperty -> SpekeKeyProviderProperty
haddock_workaround_ :: ()
constantInitializationVector :: Maybe (Value Text)
encryptionMethod :: Maybe (Value Text)
keyRotationIntervalSeconds :: Maybe (Value Integer)
spekeKeyProvider :: SpekeKeyProviderProperty
..}
    = CmafEncryptionProperty
        {keyRotationIntervalSeconds :: Maybe (Value Integer)
keyRotationIntervalSeconds = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KeyRotationIntervalSeconds" CmafEncryptionProperty
Value Integer
newValue, Maybe (Value Text)
()
SpekeKeyProviderProperty
haddock_workaround_ :: ()
constantInitializationVector :: Maybe (Value Text)
encryptionMethod :: Maybe (Value Text)
spekeKeyProvider :: SpekeKeyProviderProperty
haddock_workaround_ :: ()
constantInitializationVector :: Maybe (Value Text)
encryptionMethod :: Maybe (Value Text)
spekeKeyProvider :: SpekeKeyProviderProperty
..}
instance Property "SpekeKeyProvider" CmafEncryptionProperty where
  type PropertyType "SpekeKeyProvider" CmafEncryptionProperty = SpekeKeyProviderProperty
  set :: PropertyType "SpekeKeyProvider" CmafEncryptionProperty
-> CmafEncryptionProperty -> CmafEncryptionProperty
set PropertyType "SpekeKeyProvider" CmafEncryptionProperty
newValue CmafEncryptionProperty {Maybe (Value Integer)
Maybe (Value Text)
()
SpekeKeyProviderProperty
haddock_workaround_ :: CmafEncryptionProperty -> ()
constantInitializationVector :: CmafEncryptionProperty -> Maybe (Value Text)
encryptionMethod :: CmafEncryptionProperty -> Maybe (Value Text)
keyRotationIntervalSeconds :: CmafEncryptionProperty -> Maybe (Value Integer)
spekeKeyProvider :: CmafEncryptionProperty -> SpekeKeyProviderProperty
haddock_workaround_ :: ()
constantInitializationVector :: Maybe (Value Text)
encryptionMethod :: Maybe (Value Text)
keyRotationIntervalSeconds :: Maybe (Value Integer)
spekeKeyProvider :: SpekeKeyProviderProperty
..}
    = CmafEncryptionProperty {spekeKeyProvider :: SpekeKeyProviderProperty
spekeKeyProvider = PropertyType "SpekeKeyProvider" CmafEncryptionProperty
SpekeKeyProviderProperty
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
constantInitializationVector :: Maybe (Value Text)
encryptionMethod :: Maybe (Value Text)
keyRotationIntervalSeconds :: Maybe (Value Integer)
haddock_workaround_ :: ()
constantInitializationVector :: Maybe (Value Text)
encryptionMethod :: Maybe (Value Text)
keyRotationIntervalSeconds :: Maybe (Value Integer)
..}