module Stratosphere.DataZone.UserProfile (
        UserProfile(..), mkUserProfile
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data UserProfile
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datazone-userprofile.html>
    UserProfile {UserProfile -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datazone-userprofile.html#cfn-datazone-userprofile-domainidentifier>
                 UserProfile -> Value Text
domainIdentifier :: (Value Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datazone-userprofile.html#cfn-datazone-userprofile-status>
                 UserProfile -> Maybe (Value Text)
status :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datazone-userprofile.html#cfn-datazone-userprofile-useridentifier>
                 UserProfile -> Value Text
userIdentifier :: (Value Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datazone-userprofile.html#cfn-datazone-userprofile-usertype>
                 UserProfile -> Maybe (Value Text)
userType :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (UserProfile -> UserProfile -> Bool
(UserProfile -> UserProfile -> Bool)
-> (UserProfile -> UserProfile -> Bool) -> Eq UserProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UserProfile -> UserProfile -> Bool
== :: UserProfile -> UserProfile -> Bool
$c/= :: UserProfile -> UserProfile -> Bool
/= :: UserProfile -> UserProfile -> Bool
Prelude.Eq, Int -> UserProfile -> ShowS
[UserProfile] -> ShowS
UserProfile -> String
(Int -> UserProfile -> ShowS)
-> (UserProfile -> String)
-> ([UserProfile] -> ShowS)
-> Show UserProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UserProfile -> ShowS
showsPrec :: Int -> UserProfile -> ShowS
$cshow :: UserProfile -> String
show :: UserProfile -> String
$cshowList :: [UserProfile] -> ShowS
showList :: [UserProfile] -> ShowS
Prelude.Show)
mkUserProfile ::
  Value Prelude.Text -> Value Prelude.Text -> UserProfile
mkUserProfile :: Value Text -> Value Text -> UserProfile
mkUserProfile Value Text
domainIdentifier Value Text
userIdentifier
  = UserProfile
      {haddock_workaround_ :: ()
haddock_workaround_ = (), domainIdentifier :: Value Text
domainIdentifier = Value Text
domainIdentifier,
       userIdentifier :: Value Text
userIdentifier = Value Text
userIdentifier, status :: Maybe (Value Text)
status = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       userType :: Maybe (Value Text)
userType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties UserProfile where
  toResourceProperties :: UserProfile -> ResourceProperties
toResourceProperties UserProfile {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: UserProfile -> ()
domainIdentifier :: UserProfile -> Value Text
status :: UserProfile -> Maybe (Value Text)
userIdentifier :: UserProfile -> Value Text
userType :: UserProfile -> Maybe (Value Text)
haddock_workaround_ :: ()
domainIdentifier :: Value Text
status :: Maybe (Value Text)
userIdentifier :: Value Text
userType :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataZone::UserProfile",
         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
"DomainIdentifier" 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
domainIdentifier,
                            Key
"UserIdentifier" 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
userIdentifier]
                           ([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
"Status" (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)
status,
                               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
"UserType" (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)
userType]))}
instance JSON.ToJSON UserProfile where
  toJSON :: UserProfile -> Value
toJSON UserProfile {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: UserProfile -> ()
domainIdentifier :: UserProfile -> Value Text
status :: UserProfile -> Maybe (Value Text)
userIdentifier :: UserProfile -> Value Text
userType :: UserProfile -> Maybe (Value Text)
haddock_workaround_ :: ()
domainIdentifier :: Value Text
status :: Maybe (Value Text)
userIdentifier :: Value Text
userType :: Maybe (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
"DomainIdentifier" 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
domainIdentifier,
               Key
"UserIdentifier" 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
userIdentifier]
              ([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
"Status" (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)
status,
                  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
"UserType" (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)
userType])))
instance Property "DomainIdentifier" UserProfile where
  type PropertyType "DomainIdentifier" UserProfile = Value Prelude.Text
  set :: PropertyType "DomainIdentifier" UserProfile
-> UserProfile -> UserProfile
set PropertyType "DomainIdentifier" UserProfile
newValue UserProfile {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: UserProfile -> ()
domainIdentifier :: UserProfile -> Value Text
status :: UserProfile -> Maybe (Value Text)
userIdentifier :: UserProfile -> Value Text
userType :: UserProfile -> Maybe (Value Text)
haddock_workaround_ :: ()
domainIdentifier :: Value Text
status :: Maybe (Value Text)
userIdentifier :: Value Text
userType :: Maybe (Value Text)
..}
    = UserProfile {domainIdentifier :: Value Text
domainIdentifier = PropertyType "DomainIdentifier" UserProfile
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
status :: Maybe (Value Text)
userIdentifier :: Value Text
userType :: Maybe (Value Text)
haddock_workaround_ :: ()
status :: Maybe (Value Text)
userIdentifier :: Value Text
userType :: Maybe (Value Text)
..}
instance Property "Status" UserProfile where
  type PropertyType "Status" UserProfile = Value Prelude.Text
  set :: PropertyType "Status" UserProfile -> UserProfile -> UserProfile
set PropertyType "Status" UserProfile
newValue UserProfile {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: UserProfile -> ()
domainIdentifier :: UserProfile -> Value Text
status :: UserProfile -> Maybe (Value Text)
userIdentifier :: UserProfile -> Value Text
userType :: UserProfile -> Maybe (Value Text)
haddock_workaround_ :: ()
domainIdentifier :: Value Text
status :: Maybe (Value Text)
userIdentifier :: Value Text
userType :: Maybe (Value Text)
..}
    = UserProfile {status :: Maybe (Value Text)
status = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Status" UserProfile
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
domainIdentifier :: Value Text
userIdentifier :: Value Text
userType :: Maybe (Value Text)
haddock_workaround_ :: ()
domainIdentifier :: Value Text
userIdentifier :: Value Text
userType :: Maybe (Value Text)
..}
instance Property "UserIdentifier" UserProfile where
  type PropertyType "UserIdentifier" UserProfile = Value Prelude.Text
  set :: PropertyType "UserIdentifier" UserProfile
-> UserProfile -> UserProfile
set PropertyType "UserIdentifier" UserProfile
newValue UserProfile {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: UserProfile -> ()
domainIdentifier :: UserProfile -> Value Text
status :: UserProfile -> Maybe (Value Text)
userIdentifier :: UserProfile -> Value Text
userType :: UserProfile -> Maybe (Value Text)
haddock_workaround_ :: ()
domainIdentifier :: Value Text
status :: Maybe (Value Text)
userIdentifier :: Value Text
userType :: Maybe (Value Text)
..}
    = UserProfile {userIdentifier :: Value Text
userIdentifier = PropertyType "UserIdentifier" UserProfile
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
domainIdentifier :: Value Text
status :: Maybe (Value Text)
userType :: Maybe (Value Text)
haddock_workaround_ :: ()
domainIdentifier :: Value Text
status :: Maybe (Value Text)
userType :: Maybe (Value Text)
..}
instance Property "UserType" UserProfile where
  type PropertyType "UserType" UserProfile = Value Prelude.Text
  set :: PropertyType "UserType" UserProfile -> UserProfile -> UserProfile
set PropertyType "UserType" UserProfile
newValue UserProfile {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: UserProfile -> ()
domainIdentifier :: UserProfile -> Value Text
status :: UserProfile -> Maybe (Value Text)
userIdentifier :: UserProfile -> Value Text
userType :: UserProfile -> Maybe (Value Text)
haddock_workaround_ :: ()
domainIdentifier :: Value Text
status :: Maybe (Value Text)
userIdentifier :: Value Text
userType :: Maybe (Value Text)
..}
    = UserProfile {userType :: Maybe (Value Text)
userType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UserType" UserProfile
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
domainIdentifier :: Value Text
status :: Maybe (Value Text)
userIdentifier :: Value Text
haddock_workaround_ :: ()
domainIdentifier :: Value Text
status :: Maybe (Value Text)
userIdentifier :: Value Text
..}