module Stratosphere.Amplify.Branch.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 -> Value Text
password :: (Value Prelude.Text),
BasicAuthConfigProperty -> Value Text
username :: (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 ::
Value Prelude.Text -> Value Prelude.Text -> BasicAuthConfigProperty
mkBasicAuthConfigProperty :: Value Text -> Value Text -> BasicAuthConfigProperty
mkBasicAuthConfigProperty Value Text
password Value Text
username
= BasicAuthConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), password :: Value Text
password = Value Text
password,
username :: Value Text
username = Value Text
username, enableBasicAuth :: Maybe (Value Bool)
enableBasicAuth = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BasicAuthConfigProperty where
toResourceProperties :: BasicAuthConfigProperty -> ResourceProperties
toResourceProperties BasicAuthConfigProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: BasicAuthConfigProperty -> ()
enableBasicAuth :: BasicAuthConfigProperty -> Maybe (Value Bool)
password :: BasicAuthConfigProperty -> Value Text
username :: BasicAuthConfigProperty -> Value Text
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
password :: Value Text
username :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Amplify::Branch.BasicAuthConfig",
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
"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..= Value Text
password, Key
"Username" 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
username]
([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]))}
instance JSON.ToJSON BasicAuthConfigProperty where
toJSON :: BasicAuthConfigProperty -> Value
toJSON BasicAuthConfigProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: BasicAuthConfigProperty -> ()
enableBasicAuth :: BasicAuthConfigProperty -> Maybe (Value Bool)
password :: BasicAuthConfigProperty -> Value Text
username :: BasicAuthConfigProperty -> Value Text
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
password :: Value Text
username :: 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
"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..= Value Text
password, Key
"Username" 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
username]
([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])))
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)
()
Value Text
haddock_workaround_ :: BasicAuthConfigProperty -> ()
enableBasicAuth :: BasicAuthConfigProperty -> Maybe (Value Bool)
password :: BasicAuthConfigProperty -> Value Text
username :: BasicAuthConfigProperty -> Value Text
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
password :: Value Text
username :: 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, ()
Value Text
haddock_workaround_ :: ()
password :: Value Text
username :: Value Text
haddock_workaround_ :: ()
password :: Value Text
username :: 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)
()
Value Text
haddock_workaround_ :: BasicAuthConfigProperty -> ()
enableBasicAuth :: BasicAuthConfigProperty -> Maybe (Value Bool)
password :: BasicAuthConfigProperty -> Value Text
username :: BasicAuthConfigProperty -> Value Text
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
password :: Value Text
username :: Value Text
..}
= BasicAuthConfigProperty {password :: Value Text
password = PropertyType "Password" BasicAuthConfigProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
username :: Value Text
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
username :: 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)
()
Value Text
haddock_workaround_ :: BasicAuthConfigProperty -> ()
enableBasicAuth :: BasicAuthConfigProperty -> Maybe (Value Bool)
password :: BasicAuthConfigProperty -> Value Text
username :: BasicAuthConfigProperty -> Value Text
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
password :: Value Text
username :: Value Text
..}
= BasicAuthConfigProperty {username :: Value Text
username = PropertyType "Username" BasicAuthConfigProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
password :: Value Text
haddock_workaround_ :: ()
enableBasicAuth :: Maybe (Value Bool)
password :: Value Text
..}