module Stratosphere.ElastiCache.User.AuthenticationModeProperty (
        AuthenticationModeProperty(..), mkAuthenticationModeProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AuthenticationModeProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-user-authenticationmode.html>
    AuthenticationModeProperty {AuthenticationModeProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-user-authenticationmode.html#cfn-elasticache-user-authenticationmode-passwords>
                                AuthenticationModeProperty -> Maybe (ValueList Text)
passwords :: (Prelude.Maybe (ValueList Prelude.Text)),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-user-authenticationmode.html#cfn-elasticache-user-authenticationmode-type>
                                AuthenticationModeProperty -> Value Text
type' :: (Value Prelude.Text)}
  deriving stock (AuthenticationModeProperty -> AuthenticationModeProperty -> Bool
(AuthenticationModeProperty -> AuthenticationModeProperty -> Bool)
-> (AuthenticationModeProperty
    -> AuthenticationModeProperty -> Bool)
-> Eq AuthenticationModeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AuthenticationModeProperty -> AuthenticationModeProperty -> Bool
== :: AuthenticationModeProperty -> AuthenticationModeProperty -> Bool
$c/= :: AuthenticationModeProperty -> AuthenticationModeProperty -> Bool
/= :: AuthenticationModeProperty -> AuthenticationModeProperty -> Bool
Prelude.Eq, Int -> AuthenticationModeProperty -> ShowS
[AuthenticationModeProperty] -> ShowS
AuthenticationModeProperty -> String
(Int -> AuthenticationModeProperty -> ShowS)
-> (AuthenticationModeProperty -> String)
-> ([AuthenticationModeProperty] -> ShowS)
-> Show AuthenticationModeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AuthenticationModeProperty -> ShowS
showsPrec :: Int -> AuthenticationModeProperty -> ShowS
$cshow :: AuthenticationModeProperty -> String
show :: AuthenticationModeProperty -> String
$cshowList :: [AuthenticationModeProperty] -> ShowS
showList :: [AuthenticationModeProperty] -> ShowS
Prelude.Show)
mkAuthenticationModeProperty ::
  Value Prelude.Text -> AuthenticationModeProperty
mkAuthenticationModeProperty :: Value Text -> AuthenticationModeProperty
mkAuthenticationModeProperty Value Text
type'
  = AuthenticationModeProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Value Text
type' = Value Text
type',
       passwords :: Maybe (ValueList Text)
passwords = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AuthenticationModeProperty where
  toResourceProperties :: AuthenticationModeProperty -> ResourceProperties
toResourceProperties AuthenticationModeProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: AuthenticationModeProperty -> ()
passwords :: AuthenticationModeProperty -> Maybe (ValueList Text)
type' :: AuthenticationModeProperty -> Value Text
haddock_workaround_ :: ()
passwords :: Maybe (ValueList Text)
type' :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ElastiCache::User.AuthenticationMode",
         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
"Type" 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..= Value Text
type']
                           ([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
"Passwords" (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)
passwords]))}
instance JSON.ToJSON AuthenticationModeProperty where
  toJSON :: AuthenticationModeProperty -> Value
toJSON AuthenticationModeProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: AuthenticationModeProperty -> ()
passwords :: AuthenticationModeProperty -> Maybe (ValueList Text)
type' :: AuthenticationModeProperty -> Value Text
haddock_workaround_ :: ()
passwords :: Maybe (ValueList Text)
type' :: Value Text
..}
    = [(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
"Type" 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..= Value Text
type']
              ([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
"Passwords" (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)
passwords])))
instance Property "Passwords" AuthenticationModeProperty where
  type PropertyType "Passwords" AuthenticationModeProperty = ValueList Prelude.Text
  set :: PropertyType "Passwords" AuthenticationModeProperty
-> AuthenticationModeProperty -> AuthenticationModeProperty
set PropertyType "Passwords" AuthenticationModeProperty
newValue AuthenticationModeProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: AuthenticationModeProperty -> ()
passwords :: AuthenticationModeProperty -> Maybe (ValueList Text)
type' :: AuthenticationModeProperty -> Value Text
haddock_workaround_ :: ()
passwords :: Maybe (ValueList Text)
type' :: Value Text
..}
    = AuthenticationModeProperty
        {passwords :: Maybe (ValueList Text)
passwords = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Passwords" AuthenticationModeProperty
ValueList Text
newValue, ()
Value Text
haddock_workaround_ :: ()
type' :: Value Text
haddock_workaround_ :: ()
type' :: Value Text
..}
instance Property "Type" AuthenticationModeProperty where
  type PropertyType "Type" AuthenticationModeProperty = Value Prelude.Text
  set :: PropertyType "Type" AuthenticationModeProperty
-> AuthenticationModeProperty -> AuthenticationModeProperty
set PropertyType "Type" AuthenticationModeProperty
newValue AuthenticationModeProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: AuthenticationModeProperty -> ()
passwords :: AuthenticationModeProperty -> Maybe (ValueList Text)
type' :: AuthenticationModeProperty -> Value Text
haddock_workaround_ :: ()
passwords :: Maybe (ValueList Text)
type' :: Value Text
..}
    = AuthenticationModeProperty {type' :: Value Text
type' = PropertyType "Type" AuthenticationModeProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
passwords :: Maybe (ValueList Text)
haddock_workaround_ :: ()
passwords :: Maybe (ValueList Text)
..}