module Stratosphere.MediaTailor.SourceLocation.AccessConfigurationProperty (
        module Exports, AccessConfigurationProperty(..),
        mkAccessConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MediaTailor.SourceLocation.SecretsManagerAccessTokenConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AccessConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediatailor-sourcelocation-accessconfiguration.html>
    AccessConfigurationProperty {AccessConfigurationProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediatailor-sourcelocation-accessconfiguration.html#cfn-mediatailor-sourcelocation-accessconfiguration-accesstype>
                                 AccessConfigurationProperty -> Maybe (Value Text)
accessType :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediatailor-sourcelocation-accessconfiguration.html#cfn-mediatailor-sourcelocation-accessconfiguration-secretsmanageraccesstokenconfiguration>
                                 AccessConfigurationProperty
-> Maybe SecretsManagerAccessTokenConfigurationProperty
secretsManagerAccessTokenConfiguration :: (Prelude.Maybe SecretsManagerAccessTokenConfigurationProperty)}
  deriving stock (AccessConfigurationProperty -> AccessConfigurationProperty -> Bool
(AccessConfigurationProperty
 -> AccessConfigurationProperty -> Bool)
-> (AccessConfigurationProperty
    -> AccessConfigurationProperty -> Bool)
-> Eq AccessConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccessConfigurationProperty -> AccessConfigurationProperty -> Bool
== :: AccessConfigurationProperty -> AccessConfigurationProperty -> Bool
$c/= :: AccessConfigurationProperty -> AccessConfigurationProperty -> Bool
/= :: AccessConfigurationProperty -> AccessConfigurationProperty -> Bool
Prelude.Eq, Int -> AccessConfigurationProperty -> ShowS
[AccessConfigurationProperty] -> ShowS
AccessConfigurationProperty -> String
(Int -> AccessConfigurationProperty -> ShowS)
-> (AccessConfigurationProperty -> String)
-> ([AccessConfigurationProperty] -> ShowS)
-> Show AccessConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccessConfigurationProperty -> ShowS
showsPrec :: Int -> AccessConfigurationProperty -> ShowS
$cshow :: AccessConfigurationProperty -> String
show :: AccessConfigurationProperty -> String
$cshowList :: [AccessConfigurationProperty] -> ShowS
showList :: [AccessConfigurationProperty] -> ShowS
Prelude.Show)
mkAccessConfigurationProperty :: AccessConfigurationProperty
mkAccessConfigurationProperty :: AccessConfigurationProperty
mkAccessConfigurationProperty
  = AccessConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), accessType :: Maybe (Value Text)
accessType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       secretsManagerAccessTokenConfiguration :: Maybe SecretsManagerAccessTokenConfigurationProperty
secretsManagerAccessTokenConfiguration = Maybe SecretsManagerAccessTokenConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AccessConfigurationProperty where
  toResourceProperties :: AccessConfigurationProperty -> ResourceProperties
toResourceProperties AccessConfigurationProperty {Maybe (Value Text)
Maybe SecretsManagerAccessTokenConfigurationProperty
()
haddock_workaround_ :: AccessConfigurationProperty -> ()
accessType :: AccessConfigurationProperty -> Maybe (Value Text)
secretsManagerAccessTokenConfiguration :: AccessConfigurationProperty
-> Maybe SecretsManagerAccessTokenConfigurationProperty
haddock_workaround_ :: ()
accessType :: Maybe (Value Text)
secretsManagerAccessTokenConfiguration :: Maybe SecretsManagerAccessTokenConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaTailor::SourceLocation.AccessConfiguration",
         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 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
"AccessType" (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)
accessType,
                            Key
-> SecretsManagerAccessTokenConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SecretsManagerAccessTokenConfiguration"
                              (SecretsManagerAccessTokenConfigurationProperty -> (Key, Value))
-> Maybe SecretsManagerAccessTokenConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SecretsManagerAccessTokenConfigurationProperty
secretsManagerAccessTokenConfiguration])}
instance JSON.ToJSON AccessConfigurationProperty where
  toJSON :: AccessConfigurationProperty -> Value
toJSON AccessConfigurationProperty {Maybe (Value Text)
Maybe SecretsManagerAccessTokenConfigurationProperty
()
haddock_workaround_ :: AccessConfigurationProperty -> ()
accessType :: AccessConfigurationProperty -> Maybe (Value Text)
secretsManagerAccessTokenConfiguration :: AccessConfigurationProperty
-> Maybe SecretsManagerAccessTokenConfigurationProperty
haddock_workaround_ :: ()
accessType :: Maybe (Value Text)
secretsManagerAccessTokenConfiguration :: Maybe SecretsManagerAccessTokenConfigurationProperty
..}
    = [(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 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
"AccessType" (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)
accessType,
               Key
-> SecretsManagerAccessTokenConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SecretsManagerAccessTokenConfiguration"
                 (SecretsManagerAccessTokenConfigurationProperty -> (Key, Value))
-> Maybe SecretsManagerAccessTokenConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SecretsManagerAccessTokenConfigurationProperty
secretsManagerAccessTokenConfiguration]))
instance Property "AccessType" AccessConfigurationProperty where
  type PropertyType "AccessType" AccessConfigurationProperty = Value Prelude.Text
  set :: PropertyType "AccessType" AccessConfigurationProperty
-> AccessConfigurationProperty -> AccessConfigurationProperty
set PropertyType "AccessType" AccessConfigurationProperty
newValue AccessConfigurationProperty {Maybe (Value Text)
Maybe SecretsManagerAccessTokenConfigurationProperty
()
haddock_workaround_ :: AccessConfigurationProperty -> ()
accessType :: AccessConfigurationProperty -> Maybe (Value Text)
secretsManagerAccessTokenConfiguration :: AccessConfigurationProperty
-> Maybe SecretsManagerAccessTokenConfigurationProperty
haddock_workaround_ :: ()
accessType :: Maybe (Value Text)
secretsManagerAccessTokenConfiguration :: Maybe SecretsManagerAccessTokenConfigurationProperty
..}
    = AccessConfigurationProperty
        {accessType :: Maybe (Value Text)
accessType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AccessType" AccessConfigurationProperty
Value Text
newValue, Maybe SecretsManagerAccessTokenConfigurationProperty
()
haddock_workaround_ :: ()
secretsManagerAccessTokenConfiguration :: Maybe SecretsManagerAccessTokenConfigurationProperty
haddock_workaround_ :: ()
secretsManagerAccessTokenConfiguration :: Maybe SecretsManagerAccessTokenConfigurationProperty
..}
instance Property "SecretsManagerAccessTokenConfiguration" AccessConfigurationProperty where
  type PropertyType "SecretsManagerAccessTokenConfiguration" AccessConfigurationProperty = SecretsManagerAccessTokenConfigurationProperty
  set :: PropertyType
  "SecretsManagerAccessTokenConfiguration"
  AccessConfigurationProperty
-> AccessConfigurationProperty -> AccessConfigurationProperty
set PropertyType
  "SecretsManagerAccessTokenConfiguration"
  AccessConfigurationProperty
newValue AccessConfigurationProperty {Maybe (Value Text)
Maybe SecretsManagerAccessTokenConfigurationProperty
()
haddock_workaround_ :: AccessConfigurationProperty -> ()
accessType :: AccessConfigurationProperty -> Maybe (Value Text)
secretsManagerAccessTokenConfiguration :: AccessConfigurationProperty
-> Maybe SecretsManagerAccessTokenConfigurationProperty
haddock_workaround_ :: ()
accessType :: Maybe (Value Text)
secretsManagerAccessTokenConfiguration :: Maybe SecretsManagerAccessTokenConfigurationProperty
..}
    = AccessConfigurationProperty
        {secretsManagerAccessTokenConfiguration :: Maybe SecretsManagerAccessTokenConfigurationProperty
secretsManagerAccessTokenConfiguration = SecretsManagerAccessTokenConfigurationProperty
-> Maybe SecretsManagerAccessTokenConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "SecretsManagerAccessTokenConfiguration"
  AccessConfigurationProperty
SecretsManagerAccessTokenConfigurationProperty
newValue,
         Maybe (Value Text)
()
haddock_workaround_ :: ()
accessType :: Maybe (Value Text)
haddock_workaround_ :: ()
accessType :: Maybe (Value Text)
..}