module Stratosphere.MediaLive.Channel.StaticKeySettingsProperty (
        module Exports, StaticKeySettingsProperty(..),
        mkStaticKeySettingsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MediaLive.Channel.InputLocationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data StaticKeySettingsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-statickeysettings.html>
    StaticKeySettingsProperty {StaticKeySettingsProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-statickeysettings.html#cfn-medialive-channel-statickeysettings-keyproviderserver>
                               StaticKeySettingsProperty -> Maybe InputLocationProperty
keyProviderServer :: (Prelude.Maybe InputLocationProperty),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-statickeysettings.html#cfn-medialive-channel-statickeysettings-statickeyvalue>
                               StaticKeySettingsProperty -> Maybe (Value Text)
staticKeyValue :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (StaticKeySettingsProperty -> StaticKeySettingsProperty -> Bool
(StaticKeySettingsProperty -> StaticKeySettingsProperty -> Bool)
-> (StaticKeySettingsProperty -> StaticKeySettingsProperty -> Bool)
-> Eq StaticKeySettingsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StaticKeySettingsProperty -> StaticKeySettingsProperty -> Bool
== :: StaticKeySettingsProperty -> StaticKeySettingsProperty -> Bool
$c/= :: StaticKeySettingsProperty -> StaticKeySettingsProperty -> Bool
/= :: StaticKeySettingsProperty -> StaticKeySettingsProperty -> Bool
Prelude.Eq, Int -> StaticKeySettingsProperty -> ShowS
[StaticKeySettingsProperty] -> ShowS
StaticKeySettingsProperty -> String
(Int -> StaticKeySettingsProperty -> ShowS)
-> (StaticKeySettingsProperty -> String)
-> ([StaticKeySettingsProperty] -> ShowS)
-> Show StaticKeySettingsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StaticKeySettingsProperty -> ShowS
showsPrec :: Int -> StaticKeySettingsProperty -> ShowS
$cshow :: StaticKeySettingsProperty -> String
show :: StaticKeySettingsProperty -> String
$cshowList :: [StaticKeySettingsProperty] -> ShowS
showList :: [StaticKeySettingsProperty] -> ShowS
Prelude.Show)
mkStaticKeySettingsProperty :: StaticKeySettingsProperty
mkStaticKeySettingsProperty :: StaticKeySettingsProperty
mkStaticKeySettingsProperty
  = StaticKeySettingsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), keyProviderServer :: Maybe InputLocationProperty
keyProviderServer = Maybe InputLocationProperty
forall a. Maybe a
Prelude.Nothing,
       staticKeyValue :: Maybe (Value Text)
staticKeyValue = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties StaticKeySettingsProperty where
  toResourceProperties :: StaticKeySettingsProperty -> ResourceProperties
toResourceProperties StaticKeySettingsProperty {Maybe (Value Text)
Maybe InputLocationProperty
()
haddock_workaround_ :: StaticKeySettingsProperty -> ()
keyProviderServer :: StaticKeySettingsProperty -> Maybe InputLocationProperty
staticKeyValue :: StaticKeySettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
keyProviderServer :: Maybe InputLocationProperty
staticKeyValue :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaLive::Channel.StaticKeySettings",
         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 -> InputLocationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KeyProviderServer" (InputLocationProperty -> (Key, Value))
-> Maybe InputLocationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InputLocationProperty
keyProviderServer,
                            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
"StaticKeyValue" (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)
staticKeyValue])}
instance JSON.ToJSON StaticKeySettingsProperty where
  toJSON :: StaticKeySettingsProperty -> Value
toJSON StaticKeySettingsProperty {Maybe (Value Text)
Maybe InputLocationProperty
()
haddock_workaround_ :: StaticKeySettingsProperty -> ()
keyProviderServer :: StaticKeySettingsProperty -> Maybe InputLocationProperty
staticKeyValue :: StaticKeySettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
keyProviderServer :: Maybe InputLocationProperty
staticKeyValue :: Maybe (Value 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 -> InputLocationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KeyProviderServer" (InputLocationProperty -> (Key, Value))
-> Maybe InputLocationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InputLocationProperty
keyProviderServer,
               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
"StaticKeyValue" (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)
staticKeyValue]))
instance Property "KeyProviderServer" StaticKeySettingsProperty where
  type PropertyType "KeyProviderServer" StaticKeySettingsProperty = InputLocationProperty
  set :: PropertyType "KeyProviderServer" StaticKeySettingsProperty
-> StaticKeySettingsProperty -> StaticKeySettingsProperty
set PropertyType "KeyProviderServer" StaticKeySettingsProperty
newValue StaticKeySettingsProperty {Maybe (Value Text)
Maybe InputLocationProperty
()
haddock_workaround_ :: StaticKeySettingsProperty -> ()
keyProviderServer :: StaticKeySettingsProperty -> Maybe InputLocationProperty
staticKeyValue :: StaticKeySettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
keyProviderServer :: Maybe InputLocationProperty
staticKeyValue :: Maybe (Value Text)
..}
    = StaticKeySettingsProperty
        {keyProviderServer :: Maybe InputLocationProperty
keyProviderServer = InputLocationProperty -> Maybe InputLocationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KeyProviderServer" StaticKeySettingsProperty
InputLocationProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
staticKeyValue :: Maybe (Value Text)
haddock_workaround_ :: ()
staticKeyValue :: Maybe (Value Text)
..}
instance Property "StaticKeyValue" StaticKeySettingsProperty where
  type PropertyType "StaticKeyValue" StaticKeySettingsProperty = Value Prelude.Text
  set :: PropertyType "StaticKeyValue" StaticKeySettingsProperty
-> StaticKeySettingsProperty -> StaticKeySettingsProperty
set PropertyType "StaticKeyValue" StaticKeySettingsProperty
newValue StaticKeySettingsProperty {Maybe (Value Text)
Maybe InputLocationProperty
()
haddock_workaround_ :: StaticKeySettingsProperty -> ()
keyProviderServer :: StaticKeySettingsProperty -> Maybe InputLocationProperty
staticKeyValue :: StaticKeySettingsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
keyProviderServer :: Maybe InputLocationProperty
staticKeyValue :: Maybe (Value Text)
..}
    = StaticKeySettingsProperty
        {staticKeyValue :: Maybe (Value Text)
staticKeyValue = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "StaticKeyValue" StaticKeySettingsProperty
Value Text
newValue, Maybe InputLocationProperty
()
haddock_workaround_ :: ()
keyProviderServer :: Maybe InputLocationProperty
haddock_workaround_ :: ()
keyProviderServer :: Maybe InputLocationProperty
..}