{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.MachineLearning.Types.RDSDatabaseCredentials where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RDSDatabaseCredentials = RDSDatabaseCredentials'
{ RDSDatabaseCredentials -> Text
username :: Prelude.Text,
RDSDatabaseCredentials -> Text
password :: Prelude.Text
}
deriving (RDSDatabaseCredentials -> RDSDatabaseCredentials -> Bool
(RDSDatabaseCredentials -> RDSDatabaseCredentials -> Bool)
-> (RDSDatabaseCredentials -> RDSDatabaseCredentials -> Bool)
-> Eq RDSDatabaseCredentials
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RDSDatabaseCredentials -> RDSDatabaseCredentials -> Bool
$c/= :: RDSDatabaseCredentials -> RDSDatabaseCredentials -> Bool
== :: RDSDatabaseCredentials -> RDSDatabaseCredentials -> Bool
$c== :: RDSDatabaseCredentials -> RDSDatabaseCredentials -> Bool
Prelude.Eq, ReadPrec [RDSDatabaseCredentials]
ReadPrec RDSDatabaseCredentials
Int -> ReadS RDSDatabaseCredentials
ReadS [RDSDatabaseCredentials]
(Int -> ReadS RDSDatabaseCredentials)
-> ReadS [RDSDatabaseCredentials]
-> ReadPrec RDSDatabaseCredentials
-> ReadPrec [RDSDatabaseCredentials]
-> Read RDSDatabaseCredentials
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RDSDatabaseCredentials]
$creadListPrec :: ReadPrec [RDSDatabaseCredentials]
readPrec :: ReadPrec RDSDatabaseCredentials
$creadPrec :: ReadPrec RDSDatabaseCredentials
readList :: ReadS [RDSDatabaseCredentials]
$creadList :: ReadS [RDSDatabaseCredentials]
readsPrec :: Int -> ReadS RDSDatabaseCredentials
$creadsPrec :: Int -> ReadS RDSDatabaseCredentials
Prelude.Read, Int -> RDSDatabaseCredentials -> ShowS
[RDSDatabaseCredentials] -> ShowS
RDSDatabaseCredentials -> String
(Int -> RDSDatabaseCredentials -> ShowS)
-> (RDSDatabaseCredentials -> String)
-> ([RDSDatabaseCredentials] -> ShowS)
-> Show RDSDatabaseCredentials
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RDSDatabaseCredentials] -> ShowS
$cshowList :: [RDSDatabaseCredentials] -> ShowS
show :: RDSDatabaseCredentials -> String
$cshow :: RDSDatabaseCredentials -> String
showsPrec :: Int -> RDSDatabaseCredentials -> ShowS
$cshowsPrec :: Int -> RDSDatabaseCredentials -> ShowS
Prelude.Show, (forall x. RDSDatabaseCredentials -> Rep RDSDatabaseCredentials x)
-> (forall x.
Rep RDSDatabaseCredentials x -> RDSDatabaseCredentials)
-> Generic RDSDatabaseCredentials
forall x. Rep RDSDatabaseCredentials x -> RDSDatabaseCredentials
forall x. RDSDatabaseCredentials -> Rep RDSDatabaseCredentials x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RDSDatabaseCredentials x -> RDSDatabaseCredentials
$cfrom :: forall x. RDSDatabaseCredentials -> Rep RDSDatabaseCredentials x
Prelude.Generic)
newRDSDatabaseCredentials ::
Prelude.Text ->
Prelude.Text ->
RDSDatabaseCredentials
newRDSDatabaseCredentials :: Text -> Text -> RDSDatabaseCredentials
newRDSDatabaseCredentials Text
pUsername_ Text
pPassword_ =
RDSDatabaseCredentials' :: Text -> Text -> RDSDatabaseCredentials
RDSDatabaseCredentials'
{ $sel:username:RDSDatabaseCredentials' :: Text
username = Text
pUsername_,
$sel:password:RDSDatabaseCredentials' :: Text
password = Text
pPassword_
}
rDSDatabaseCredentials_username :: Lens.Lens' RDSDatabaseCredentials Prelude.Text
rDSDatabaseCredentials_username :: (Text -> f Text)
-> RDSDatabaseCredentials -> f RDSDatabaseCredentials
rDSDatabaseCredentials_username = (RDSDatabaseCredentials -> Text)
-> (RDSDatabaseCredentials -> Text -> RDSDatabaseCredentials)
-> Lens RDSDatabaseCredentials RDSDatabaseCredentials Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSDatabaseCredentials' {Text
username :: Text
$sel:username:RDSDatabaseCredentials' :: RDSDatabaseCredentials -> Text
username} -> Text
username) (\s :: RDSDatabaseCredentials
s@RDSDatabaseCredentials' {} Text
a -> RDSDatabaseCredentials
s {$sel:username:RDSDatabaseCredentials' :: Text
username = Text
a} :: RDSDatabaseCredentials)
rDSDatabaseCredentials_password :: Lens.Lens' RDSDatabaseCredentials Prelude.Text
rDSDatabaseCredentials_password :: (Text -> f Text)
-> RDSDatabaseCredentials -> f RDSDatabaseCredentials
rDSDatabaseCredentials_password = (RDSDatabaseCredentials -> Text)
-> (RDSDatabaseCredentials -> Text -> RDSDatabaseCredentials)
-> Lens RDSDatabaseCredentials RDSDatabaseCredentials Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSDatabaseCredentials' {Text
password :: Text
$sel:password:RDSDatabaseCredentials' :: RDSDatabaseCredentials -> Text
password} -> Text
password) (\s :: RDSDatabaseCredentials
s@RDSDatabaseCredentials' {} Text
a -> RDSDatabaseCredentials
s {$sel:password:RDSDatabaseCredentials' :: Text
password = Text
a} :: RDSDatabaseCredentials)
instance Prelude.Hashable RDSDatabaseCredentials
instance Prelude.NFData RDSDatabaseCredentials
instance Core.ToJSON RDSDatabaseCredentials where
toJSON :: RDSDatabaseCredentials -> Value
toJSON RDSDatabaseCredentials' {Text
password :: Text
username :: Text
$sel:password:RDSDatabaseCredentials' :: RDSDatabaseCredentials -> Text
$sel:username:RDSDatabaseCredentials' :: RDSDatabaseCredentials -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Username" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
username),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Password" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
password)
]
)