module Stratosphere.MediaLive.Channel.KeyProviderSettingsProperty (
module Exports, KeyProviderSettingsProperty(..),
mkKeyProviderSettingsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MediaLive.Channel.StaticKeySettingsProperty as Exports
import Stratosphere.ResourceProperties
data KeyProviderSettingsProperty
=
KeyProviderSettingsProperty {KeyProviderSettingsProperty -> ()
haddock_workaround_ :: (),
KeyProviderSettingsProperty -> Maybe StaticKeySettingsProperty
staticKeySettings :: (Prelude.Maybe StaticKeySettingsProperty)}
deriving stock (KeyProviderSettingsProperty -> KeyProviderSettingsProperty -> Bool
(KeyProviderSettingsProperty
-> KeyProviderSettingsProperty -> Bool)
-> (KeyProviderSettingsProperty
-> KeyProviderSettingsProperty -> Bool)
-> Eq KeyProviderSettingsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: KeyProviderSettingsProperty -> KeyProviderSettingsProperty -> Bool
== :: KeyProviderSettingsProperty -> KeyProviderSettingsProperty -> Bool
$c/= :: KeyProviderSettingsProperty -> KeyProviderSettingsProperty -> Bool
/= :: KeyProviderSettingsProperty -> KeyProviderSettingsProperty -> Bool
Prelude.Eq, Int -> KeyProviderSettingsProperty -> ShowS
[KeyProviderSettingsProperty] -> ShowS
KeyProviderSettingsProperty -> String
(Int -> KeyProviderSettingsProperty -> ShowS)
-> (KeyProviderSettingsProperty -> String)
-> ([KeyProviderSettingsProperty] -> ShowS)
-> Show KeyProviderSettingsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> KeyProviderSettingsProperty -> ShowS
showsPrec :: Int -> KeyProviderSettingsProperty -> ShowS
$cshow :: KeyProviderSettingsProperty -> String
show :: KeyProviderSettingsProperty -> String
$cshowList :: [KeyProviderSettingsProperty] -> ShowS
showList :: [KeyProviderSettingsProperty] -> ShowS
Prelude.Show)
mkKeyProviderSettingsProperty :: KeyProviderSettingsProperty
mkKeyProviderSettingsProperty :: KeyProviderSettingsProperty
mkKeyProviderSettingsProperty
= KeyProviderSettingsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), staticKeySettings :: Maybe StaticKeySettingsProperty
staticKeySettings = Maybe StaticKeySettingsProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties KeyProviderSettingsProperty where
toResourceProperties :: KeyProviderSettingsProperty -> ResourceProperties
toResourceProperties KeyProviderSettingsProperty {Maybe StaticKeySettingsProperty
()
haddock_workaround_ :: KeyProviderSettingsProperty -> ()
staticKeySettings :: KeyProviderSettingsProperty -> Maybe StaticKeySettingsProperty
haddock_workaround_ :: ()
staticKeySettings :: Maybe StaticKeySettingsProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::MediaLive::Channel.KeyProviderSettings",
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 -> StaticKeySettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"StaticKeySettings" (StaticKeySettingsProperty -> (Key, Value))
-> Maybe StaticKeySettingsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StaticKeySettingsProperty
staticKeySettings])}
instance JSON.ToJSON KeyProviderSettingsProperty where
toJSON :: KeyProviderSettingsProperty -> Value
toJSON KeyProviderSettingsProperty {Maybe StaticKeySettingsProperty
()
haddock_workaround_ :: KeyProviderSettingsProperty -> ()
staticKeySettings :: KeyProviderSettingsProperty -> Maybe StaticKeySettingsProperty
haddock_workaround_ :: ()
staticKeySettings :: Maybe StaticKeySettingsProperty
..}
= [(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 -> StaticKeySettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"StaticKeySettings" (StaticKeySettingsProperty -> (Key, Value))
-> Maybe StaticKeySettingsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StaticKeySettingsProperty
staticKeySettings]))
instance Property "StaticKeySettings" KeyProviderSettingsProperty where
type PropertyType "StaticKeySettings" KeyProviderSettingsProperty = StaticKeySettingsProperty
set :: PropertyType "StaticKeySettings" KeyProviderSettingsProperty
-> KeyProviderSettingsProperty -> KeyProviderSettingsProperty
set PropertyType "StaticKeySettings" KeyProviderSettingsProperty
newValue KeyProviderSettingsProperty {Maybe StaticKeySettingsProperty
()
haddock_workaround_ :: KeyProviderSettingsProperty -> ()
staticKeySettings :: KeyProviderSettingsProperty -> Maybe StaticKeySettingsProperty
haddock_workaround_ :: ()
staticKeySettings :: Maybe StaticKeySettingsProperty
..}
= KeyProviderSettingsProperty
{staticKeySettings :: Maybe StaticKeySettingsProperty
staticKeySettings = StaticKeySettingsProperty -> Maybe StaticKeySettingsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "StaticKeySettings" KeyProviderSettingsProperty
StaticKeySettingsProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}