module Stratosphere.Amplify.App.BasicAuthConfigProperty (
BasicAuthConfigProperty(..), mkBasicAuthConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data BasicAuthConfigProperty
=
BasicAuthConfigProperty {BasicAuthConfigProperty -> ()
haddock_workaround_ :: (),
BasicAuthConfigProperty -> Maybe (Value Bool)
enableBasicAuth :: (Prelude.Maybe (Value Prelude.Bool)),
BasicAuthConfigProperty -> Maybe (Value Text)
password :: (Prelude.Maybe (Value Prelude.Text)),
BasicAuthConfigProperty -> Maybe (Value Text)
username :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (BasicAuthConfigProperty -> BasicAuthConfigProperty -> Bool
(BasicAuthConfigProperty -> BasicAuthConfigProperty -> Bool)
-> (BasicAuthConfigProperty -> BasicAuthConfigProperty -> Bool)
-> Eq BasicAuthConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BasicAuthConfigProperty -> BasicAuthConfigProperty -> Bool
== :: BasicAuthConfigProperty -> BasicAuthConfigProperty -> Bool
$c/= :: BasicAuthConfigProperty -> BasicAuthConfigProperty -> Bool
/= :: BasicAuthConfigProperty -> BasicAuthConfigProperty -> Bool
Prelude.Eq, Int -> BasicAuthConfigProperty -> ShowS
[BasicAuthConfigProperty] -> ShowS
BasicAuthConfigProperty -> String
(Int -> BasicAuthConfigProperty -> ShowS)
-> (BasicAuthConfigProperty -> String)
-> ([BasicAuthConfigProperty] -> ShowS)
-> Show BasicAuthConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BasicAuthConfigProperty -> ShowS
showsPrec :: Int -> BasicAuthConfigProperty -> ShowS
$cshow :: BasicAuthConfigProperty -> String
show :: BasicAuthConfigProperty -> String
$cshowList :: [BasicAuthConfigProperty] -> ShowS
showList :: [BasicAuthConfigProperty] -> ShowS
Prelude.Show)
mkBasicAuthConfigProperty :: BasicAuthConfigProperty
mkBasicAuthConfigProperty :: BasicAuthConfigProperty
mkBasicAuthConfigProperty
= BasicAuthConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), enableBasicAuth :: Maybe (Value Bool)
enableBasicAuth = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
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 BasicAuthConfigProperty where
toResourceProperties :: BasicAuthConfigProperty -> ResourceProperties
toResourceProperties BasicAuthConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: BasicAuthConfigProperty -> ()
enableBasicAuth :: BasicAuthConfigProperty -> Maybe (Value Bool)
password :: BasicAuthConfigProperty -> Maybe (Value Text)
username :: BasicAuthConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
password :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Amplify::App.BasicAuthConfig",
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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EnableBasicAuth" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enableBasicAuth,
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 BasicAuthConfigProperty where
toJSON :: BasicAuthConfigProperty -> Value
toJSON BasicAuthConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: BasicAuthConfigProperty -> ()
enableBasicAuth :: BasicAuthConfigProperty -> Maybe (Value Bool)
password :: BasicAuthConfigProperty -> Maybe (Value Text)
username :: BasicAuthConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EnableBasicAuth" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enableBasicAuth,
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 "EnableBasicAuth" BasicAuthConfigProperty where
type PropertyType "EnableBasicAuth" BasicAuthConfigProperty = Value Prelude.Bool
set :: PropertyType "EnableBasicAuth" BasicAuthConfigProperty
-> BasicAuthConfigProperty -> BasicAuthConfigProperty
set PropertyType "EnableBasicAuth" BasicAuthConfigProperty
newValue BasicAuthConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: BasicAuthConfigProperty -> ()
enableBasicAuth :: BasicAuthConfigProperty -> Maybe (Value Bool)
password :: BasicAuthConfigProperty -> Maybe (Value Text)
username :: BasicAuthConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
password :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
= BasicAuthConfigProperty
{enableBasicAuth :: Maybe (Value Bool)
enableBasicAuth = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EnableBasicAuth" BasicAuthConfigProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
password :: Maybe (Value Text)
username :: Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
instance Property "Password" BasicAuthConfigProperty where
type PropertyType "Password" BasicAuthConfigProperty = Value Prelude.Text
set :: PropertyType "Password" BasicAuthConfigProperty
-> BasicAuthConfigProperty -> BasicAuthConfigProperty
set PropertyType "Password" BasicAuthConfigProperty
newValue BasicAuthConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: BasicAuthConfigProperty -> ()
enableBasicAuth :: BasicAuthConfigProperty -> Maybe (Value Bool)
password :: BasicAuthConfigProperty -> Maybe (Value Text)
username :: BasicAuthConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
password :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
= BasicAuthConfigProperty {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" BasicAuthConfigProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
username :: Maybe (Value Text)
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
username :: Maybe (Value Text)
..}
instance Property "Username" BasicAuthConfigProperty where
type PropertyType "Username" BasicAuthConfigProperty = Value Prelude.Text
set :: PropertyType "Username" BasicAuthConfigProperty
-> BasicAuthConfigProperty -> BasicAuthConfigProperty
set PropertyType "Username" BasicAuthConfigProperty
newValue BasicAuthConfigProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: BasicAuthConfigProperty -> ()
enableBasicAuth :: BasicAuthConfigProperty -> Maybe (Value Bool)
password :: BasicAuthConfigProperty -> Maybe (Value Text)
username :: BasicAuthConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
password :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
= BasicAuthConfigProperty {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" BasicAuthConfigProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
password :: Maybe (Value Text)
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
password :: Maybe (Value Text)
..}