module Stratosphere.AmazonMQ.Broker.UserProperty (
UserProperty(..), mkUserProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data UserProperty
=
UserProperty {UserProperty -> ()
haddock_workaround_ :: (),
UserProperty -> Maybe (Value Bool)
consoleAccess :: (Prelude.Maybe (Value Prelude.Bool)),
UserProperty -> Maybe (ValueList Text)
groups :: (Prelude.Maybe (ValueList Prelude.Text)),
UserProperty -> Value Text
password :: (Value Prelude.Text),
UserProperty -> Maybe (Value Bool)
replicationUser :: (Prelude.Maybe (Value Prelude.Bool)),
UserProperty -> Value Text
username :: (Value Prelude.Text)}
deriving stock (UserProperty -> UserProperty -> Bool
(UserProperty -> UserProperty -> Bool)
-> (UserProperty -> UserProperty -> Bool) -> Eq UserProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UserProperty -> UserProperty -> Bool
== :: UserProperty -> UserProperty -> Bool
$c/= :: UserProperty -> UserProperty -> Bool
/= :: UserProperty -> UserProperty -> Bool
Prelude.Eq, Int -> UserProperty -> ShowS
[UserProperty] -> ShowS
UserProperty -> String
(Int -> UserProperty -> ShowS)
-> (UserProperty -> String)
-> ([UserProperty] -> ShowS)
-> Show UserProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UserProperty -> ShowS
showsPrec :: Int -> UserProperty -> ShowS
$cshow :: UserProperty -> String
show :: UserProperty -> String
$cshowList :: [UserProperty] -> ShowS
showList :: [UserProperty] -> ShowS
Prelude.Show)
mkUserProperty ::
Value Prelude.Text -> Value Prelude.Text -> UserProperty
mkUserProperty :: Value Text -> Value Text -> UserProperty
mkUserProperty Value Text
password Value Text
username
= UserProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), password :: Value Text
password = Value Text
password,
username :: Value Text
username = Value Text
username, consoleAccess :: Maybe (Value Bool)
consoleAccess = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
groups :: Maybe (ValueList Text)
groups = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, replicationUser :: Maybe (Value Bool)
replicationUser = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties UserProperty where
toResourceProperties :: UserProperty -> ResourceProperties
toResourceProperties UserProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: UserProperty -> ()
consoleAccess :: UserProperty -> Maybe (Value Bool)
groups :: UserProperty -> Maybe (ValueList Text)
password :: UserProperty -> Value Text
replicationUser :: UserProperty -> Maybe (Value Bool)
username :: UserProperty -> Value Text
haddock_workaround_ :: ()
consoleAccess :: Maybe (Value Bool)
groups :: Maybe (ValueList Text)
password :: Value Text
replicationUser :: Maybe (Value Bool)
username :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AmazonMQ::Broker.User",
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
"ConsoleAccess" (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)
consoleAccess,
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
"Groups" (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)
groups,
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
"ReplicationUser" (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)
replicationUser]))}
instance JSON.ToJSON UserProperty where
toJSON :: UserProperty -> Value
toJSON UserProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: UserProperty -> ()
consoleAccess :: UserProperty -> Maybe (Value Bool)
groups :: UserProperty -> Maybe (ValueList Text)
password :: UserProperty -> Value Text
replicationUser :: UserProperty -> Maybe (Value Bool)
username :: UserProperty -> Value Text
haddock_workaround_ :: ()
consoleAccess :: Maybe (Value Bool)
groups :: Maybe (ValueList Text)
password :: Value Text
replicationUser :: Maybe (Value Bool)
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
"ConsoleAccess" (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)
consoleAccess,
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
"Groups" (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)
groups,
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
"ReplicationUser" (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)
replicationUser])))
instance Property "ConsoleAccess" UserProperty where
type PropertyType "ConsoleAccess" UserProperty = Value Prelude.Bool
set :: PropertyType "ConsoleAccess" UserProperty
-> UserProperty -> UserProperty
set PropertyType "ConsoleAccess" UserProperty
newValue UserProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: UserProperty -> ()
consoleAccess :: UserProperty -> Maybe (Value Bool)
groups :: UserProperty -> Maybe (ValueList Text)
password :: UserProperty -> Value Text
replicationUser :: UserProperty -> Maybe (Value Bool)
username :: UserProperty -> Value Text
haddock_workaround_ :: ()
consoleAccess :: Maybe (Value Bool)
groups :: Maybe (ValueList Text)
password :: Value Text
replicationUser :: Maybe (Value Bool)
username :: Value Text
..}
= UserProperty {consoleAccess :: Maybe (Value Bool)
consoleAccess = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ConsoleAccess" UserProperty
Value Bool
newValue, Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
groups :: Maybe (ValueList Text)
password :: Value Text
replicationUser :: Maybe (Value Bool)
username :: Value Text
haddock_workaround_ :: ()
groups :: Maybe (ValueList Text)
password :: Value Text
replicationUser :: Maybe (Value Bool)
username :: Value Text
..}
instance Property "Groups" UserProperty where
type PropertyType "Groups" UserProperty = ValueList Prelude.Text
set :: PropertyType "Groups" UserProperty -> UserProperty -> UserProperty
set PropertyType "Groups" UserProperty
newValue UserProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: UserProperty -> ()
consoleAccess :: UserProperty -> Maybe (Value Bool)
groups :: UserProperty -> Maybe (ValueList Text)
password :: UserProperty -> Value Text
replicationUser :: UserProperty -> Maybe (Value Bool)
username :: UserProperty -> Value Text
haddock_workaround_ :: ()
consoleAccess :: Maybe (Value Bool)
groups :: Maybe (ValueList Text)
password :: Value Text
replicationUser :: Maybe (Value Bool)
username :: Value Text
..}
= UserProperty {groups :: Maybe (ValueList Text)
groups = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Groups" UserProperty
ValueList Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
consoleAccess :: Maybe (Value Bool)
password :: Value Text
replicationUser :: Maybe (Value Bool)
username :: Value Text
haddock_workaround_ :: ()
consoleAccess :: Maybe (Value Bool)
password :: Value Text
replicationUser :: Maybe (Value Bool)
username :: Value Text
..}
instance Property "Password" UserProperty where
type PropertyType "Password" UserProperty = Value Prelude.Text
set :: PropertyType "Password" UserProperty
-> UserProperty -> UserProperty
set PropertyType "Password" UserProperty
newValue UserProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: UserProperty -> ()
consoleAccess :: UserProperty -> Maybe (Value Bool)
groups :: UserProperty -> Maybe (ValueList Text)
password :: UserProperty -> Value Text
replicationUser :: UserProperty -> Maybe (Value Bool)
username :: UserProperty -> Value Text
haddock_workaround_ :: ()
consoleAccess :: Maybe (Value Bool)
groups :: Maybe (ValueList Text)
password :: Value Text
replicationUser :: Maybe (Value Bool)
username :: Value Text
..}
= UserProperty {password :: Value Text
password = PropertyType "Password" UserProperty
Value Text
newValue, Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
consoleAccess :: Maybe (Value Bool)
groups :: Maybe (ValueList Text)
replicationUser :: Maybe (Value Bool)
username :: Value Text
haddock_workaround_ :: ()
consoleAccess :: Maybe (Value Bool)
groups :: Maybe (ValueList Text)
replicationUser :: Maybe (Value Bool)
username :: Value Text
..}
instance Property "ReplicationUser" UserProperty where
type PropertyType "ReplicationUser" UserProperty = Value Prelude.Bool
set :: PropertyType "ReplicationUser" UserProperty
-> UserProperty -> UserProperty
set PropertyType "ReplicationUser" UserProperty
newValue UserProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: UserProperty -> ()
consoleAccess :: UserProperty -> Maybe (Value Bool)
groups :: UserProperty -> Maybe (ValueList Text)
password :: UserProperty -> Value Text
replicationUser :: UserProperty -> Maybe (Value Bool)
username :: UserProperty -> Value Text
haddock_workaround_ :: ()
consoleAccess :: Maybe (Value Bool)
groups :: Maybe (ValueList Text)
password :: Value Text
replicationUser :: Maybe (Value Bool)
username :: Value Text
..}
= UserProperty {replicationUser :: Maybe (Value Bool)
replicationUser = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ReplicationUser" UserProperty
Value Bool
newValue, Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
consoleAccess :: Maybe (Value Bool)
groups :: Maybe (ValueList Text)
password :: Value Text
username :: Value Text
haddock_workaround_ :: ()
consoleAccess :: Maybe (Value Bool)
groups :: Maybe (ValueList Text)
password :: Value Text
username :: Value Text
..}
instance Property "Username" UserProperty where
type PropertyType "Username" UserProperty = Value Prelude.Text
set :: PropertyType "Username" UserProperty
-> UserProperty -> UserProperty
set PropertyType "Username" UserProperty
newValue UserProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: UserProperty -> ()
consoleAccess :: UserProperty -> Maybe (Value Bool)
groups :: UserProperty -> Maybe (ValueList Text)
password :: UserProperty -> Value Text
replicationUser :: UserProperty -> Maybe (Value Bool)
username :: UserProperty -> Value Text
haddock_workaround_ :: ()
consoleAccess :: Maybe (Value Bool)
groups :: Maybe (ValueList Text)
password :: Value Text
replicationUser :: Maybe (Value Bool)
username :: Value Text
..}
= UserProperty {username :: Value Text
username = PropertyType "Username" UserProperty
Value Text
newValue, Maybe (ValueList Text)
Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
consoleAccess :: Maybe (Value Bool)
groups :: Maybe (ValueList Text)
password :: Value Text
replicationUser :: Maybe (Value Bool)
haddock_workaround_ :: ()
consoleAccess :: Maybe (Value Bool)
groups :: Maybe (ValueList Text)
password :: Value Text
replicationUser :: Maybe (Value Bool)
..}