module Stratosphere.DataZone.Connection.BasicAuthenticationCredentialsProperty (
BasicAuthenticationCredentialsProperty(..),
mkBasicAuthenticationCredentialsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data BasicAuthenticationCredentialsProperty
=
BasicAuthenticationCredentialsProperty {BasicAuthenticationCredentialsProperty -> ()
haddock_workaround_ :: (),
BasicAuthenticationCredentialsProperty -> Maybe (Value Text)
password :: (Prelude.Maybe (Value Prelude.Text)),
BasicAuthenticationCredentialsProperty -> Maybe (Value Text)
userName :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (BasicAuthenticationCredentialsProperty
-> BasicAuthenticationCredentialsProperty -> Bool
(BasicAuthenticationCredentialsProperty
-> BasicAuthenticationCredentialsProperty -> Bool)
-> (BasicAuthenticationCredentialsProperty
-> BasicAuthenticationCredentialsProperty -> Bool)
-> Eq BasicAuthenticationCredentialsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BasicAuthenticationCredentialsProperty
-> BasicAuthenticationCredentialsProperty -> Bool
== :: BasicAuthenticationCredentialsProperty
-> BasicAuthenticationCredentialsProperty -> Bool
$c/= :: BasicAuthenticationCredentialsProperty
-> BasicAuthenticationCredentialsProperty -> Bool
/= :: BasicAuthenticationCredentialsProperty
-> BasicAuthenticationCredentialsProperty -> Bool
Prelude.Eq, Int -> BasicAuthenticationCredentialsProperty -> ShowS
[BasicAuthenticationCredentialsProperty] -> ShowS
BasicAuthenticationCredentialsProperty -> String
(Int -> BasicAuthenticationCredentialsProperty -> ShowS)
-> (BasicAuthenticationCredentialsProperty -> String)
-> ([BasicAuthenticationCredentialsProperty] -> ShowS)
-> Show BasicAuthenticationCredentialsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BasicAuthenticationCredentialsProperty -> ShowS
showsPrec :: Int -> BasicAuthenticationCredentialsProperty -> ShowS
$cshow :: BasicAuthenticationCredentialsProperty -> String
show :: BasicAuthenticationCredentialsProperty -> String
$cshowList :: [BasicAuthenticationCredentialsProperty] -> ShowS
showList :: [BasicAuthenticationCredentialsProperty] -> ShowS
Prelude.Show)
mkBasicAuthenticationCredentialsProperty ::
BasicAuthenticationCredentialsProperty
mkBasicAuthenticationCredentialsProperty :: BasicAuthenticationCredentialsProperty
mkBasicAuthenticationCredentialsProperty
= BasicAuthenticationCredentialsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), password :: Maybe (Value Text)
password = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
userName :: Maybe (Value Text)
userName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BasicAuthenticationCredentialsProperty where
toResourceProperties :: BasicAuthenticationCredentialsProperty -> ResourceProperties
toResourceProperties BasicAuthenticationCredentialsProperty {Maybe (Value Text)
()
haddock_workaround_ :: BasicAuthenticationCredentialsProperty -> ()
password :: BasicAuthenticationCredentialsProperty -> Maybe (Value Text)
userName :: BasicAuthenticationCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
userName :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::DataZone::Connection.BasicAuthenticationCredentials",
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
"Password" (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)
password,
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
"UserName" (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)
userName])}
instance JSON.ToJSON BasicAuthenticationCredentialsProperty where
toJSON :: BasicAuthenticationCredentialsProperty -> Value
toJSON BasicAuthenticationCredentialsProperty {Maybe (Value Text)
()
haddock_workaround_ :: BasicAuthenticationCredentialsProperty -> ()
password :: BasicAuthenticationCredentialsProperty -> Maybe (Value Text)
userName :: BasicAuthenticationCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
userName :: 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 -> 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
"Password" (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)
password,
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
"UserName" (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)
userName]))
instance Property "Password" BasicAuthenticationCredentialsProperty where
type PropertyType "Password" BasicAuthenticationCredentialsProperty = Value Prelude.Text
set :: PropertyType "Password" BasicAuthenticationCredentialsProperty
-> BasicAuthenticationCredentialsProperty
-> BasicAuthenticationCredentialsProperty
set PropertyType "Password" BasicAuthenticationCredentialsProperty
newValue BasicAuthenticationCredentialsProperty {Maybe (Value Text)
()
haddock_workaround_ :: BasicAuthenticationCredentialsProperty -> ()
password :: BasicAuthenticationCredentialsProperty -> Maybe (Value Text)
userName :: BasicAuthenticationCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
userName :: Maybe (Value Text)
..}
= BasicAuthenticationCredentialsProperty
{password :: Maybe (Value Text)
password = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Password" BasicAuthenticationCredentialsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
userName :: Maybe (Value Text)
haddock_workaround_ :: ()
userName :: Maybe (Value Text)
..}
instance Property "UserName" BasicAuthenticationCredentialsProperty where
type PropertyType "UserName" BasicAuthenticationCredentialsProperty = Value Prelude.Text
set :: PropertyType "UserName" BasicAuthenticationCredentialsProperty
-> BasicAuthenticationCredentialsProperty
-> BasicAuthenticationCredentialsProperty
set PropertyType "UserName" BasicAuthenticationCredentialsProperty
newValue BasicAuthenticationCredentialsProperty {Maybe (Value Text)
()
haddock_workaround_ :: BasicAuthenticationCredentialsProperty -> ()
password :: BasicAuthenticationCredentialsProperty -> Maybe (Value Text)
userName :: BasicAuthenticationCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
userName :: Maybe (Value Text)
..}
= BasicAuthenticationCredentialsProperty
{userName :: Maybe (Value Text)
userName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UserName" BasicAuthenticationCredentialsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
password :: Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
..}