module Stratosphere.B2BI.Profile (
        Profile(..), mkProfile
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Profile
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-b2bi-profile.html>
    Profile {Profile -> ()
haddock_workaround_ :: (),
             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-b2bi-profile.html#cfn-b2bi-profile-businessname>
             Profile -> Value Text
businessName :: (Value Prelude.Text),
             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-b2bi-profile.html#cfn-b2bi-profile-email>
             Profile -> Maybe (Value Text)
email :: (Prelude.Maybe (Value Prelude.Text)),
             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-b2bi-profile.html#cfn-b2bi-profile-logging>
             Profile -> Value Text
logging :: (Value Prelude.Text),
             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-b2bi-profile.html#cfn-b2bi-profile-name>
             Profile -> Value Text
name :: (Value Prelude.Text),
             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-b2bi-profile.html#cfn-b2bi-profile-phone>
             Profile -> Value Text
phone :: (Value Prelude.Text),
             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-b2bi-profile.html#cfn-b2bi-profile-tags>
             Profile -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (Profile -> Profile -> Bool
(Profile -> Profile -> Bool)
-> (Profile -> Profile -> Bool) -> Eq Profile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Profile -> Profile -> Bool
== :: Profile -> Profile -> Bool
$c/= :: Profile -> Profile -> Bool
/= :: Profile -> Profile -> Bool
Prelude.Eq, Int -> Profile -> ShowS
[Profile] -> ShowS
Profile -> String
(Int -> Profile -> ShowS)
-> (Profile -> String) -> ([Profile] -> ShowS) -> Show Profile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Profile -> ShowS
showsPrec :: Int -> Profile -> ShowS
$cshow :: Profile -> String
show :: Profile -> String
$cshowList :: [Profile] -> ShowS
showList :: [Profile] -> ShowS
Prelude.Show)
mkProfile ::
  Value Prelude.Text
  -> Value Prelude.Text
     -> Value Prelude.Text -> Value Prelude.Text -> Profile
mkProfile :: Value Text -> Value Text -> Value Text -> Value Text -> Profile
mkProfile Value Text
businessName Value Text
logging Value Text
name Value Text
phone
  = Profile
      {haddock_workaround_ :: ()
haddock_workaround_ = (), businessName :: Value Text
businessName = Value Text
businessName,
       logging :: Value Text
logging = Value Text
logging, name :: Value Text
name = Value Text
name, phone :: Value Text
phone = Value Text
phone,
       email :: Maybe (Value Text)
email = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Profile where
  toResourceProperties :: Profile -> ResourceProperties
toResourceProperties Profile {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Profile -> ()
businessName :: Profile -> Value Text
email :: Profile -> Maybe (Value Text)
logging :: Profile -> Value Text
name :: Profile -> Value Text
phone :: Profile -> Value Text
tags :: Profile -> Maybe [Tag]
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
logging :: Value Text
name :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::B2BI::Profile", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"BusinessName" 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
businessName, Key
"Logging" 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
logging,
                            Key
"Name" 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
name, Key
"Phone" 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
phone]
                           ([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
"Email" (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)
email,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON Profile where
  toJSON :: Profile -> Value
toJSON Profile {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Profile -> ()
businessName :: Profile -> Value Text
email :: Profile -> Maybe (Value Text)
logging :: Profile -> Value Text
name :: Profile -> Value Text
phone :: Profile -> Value Text
tags :: Profile -> Maybe [Tag]
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
logging :: Value Text
name :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
..}
    = [(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
"BusinessName" 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
businessName, Key
"Logging" 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
logging,
               Key
"Name" 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
name, Key
"Phone" 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
phone]
              ([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
"Email" (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)
email,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "BusinessName" Profile where
  type PropertyType "BusinessName" Profile = Value Prelude.Text
  set :: PropertyType "BusinessName" Profile -> Profile -> Profile
set PropertyType "BusinessName" Profile
newValue Profile {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Profile -> ()
businessName :: Profile -> Value Text
email :: Profile -> Maybe (Value Text)
logging :: Profile -> Value Text
name :: Profile -> Value Text
phone :: Profile -> Value Text
tags :: Profile -> Maybe [Tag]
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
logging :: Value Text
name :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
..} = Profile {businessName :: Value Text
businessName = PropertyType "BusinessName" Profile
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
email :: Maybe (Value Text)
logging :: Value Text
name :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
email :: Maybe (Value Text)
logging :: Value Text
name :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Email" Profile where
  type PropertyType "Email" Profile = Value Prelude.Text
  set :: PropertyType "Email" Profile -> Profile -> Profile
set PropertyType "Email" Profile
newValue Profile {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Profile -> ()
businessName :: Profile -> Value Text
email :: Profile -> Maybe (Value Text)
logging :: Profile -> Value Text
name :: Profile -> Value Text
phone :: Profile -> Value Text
tags :: Profile -> Maybe [Tag]
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
logging :: Value Text
name :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
..}
    = Profile {email :: Maybe (Value Text)
email = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Email" Profile
Value Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
businessName :: Value Text
logging :: Value Text
name :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
businessName :: Value Text
logging :: Value Text
name :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Logging" Profile where
  type PropertyType "Logging" Profile = Value Prelude.Text
  set :: PropertyType "Logging" Profile -> Profile -> Profile
set PropertyType "Logging" Profile
newValue Profile {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Profile -> ()
businessName :: Profile -> Value Text
email :: Profile -> Maybe (Value Text)
logging :: Profile -> Value Text
name :: Profile -> Value Text
phone :: Profile -> Value Text
tags :: Profile -> Maybe [Tag]
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
logging :: Value Text
name :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
..} = Profile {logging :: Value Text
logging = PropertyType "Logging" Profile
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
name :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
name :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Name" Profile where
  type PropertyType "Name" Profile = Value Prelude.Text
  set :: PropertyType "Name" Profile -> Profile -> Profile
set PropertyType "Name" Profile
newValue Profile {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Profile -> ()
businessName :: Profile -> Value Text
email :: Profile -> Maybe (Value Text)
logging :: Profile -> Value Text
name :: Profile -> Value Text
phone :: Profile -> Value Text
tags :: Profile -> Maybe [Tag]
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
logging :: Value Text
name :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
..} = Profile {name :: Value Text
name = PropertyType "Name" Profile
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
logging :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
logging :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Phone" Profile where
  type PropertyType "Phone" Profile = Value Prelude.Text
  set :: PropertyType "Phone" Profile -> Profile -> Profile
set PropertyType "Phone" Profile
newValue Profile {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Profile -> ()
businessName :: Profile -> Value Text
email :: Profile -> Maybe (Value Text)
logging :: Profile -> Value Text
name :: Profile -> Value Text
phone :: Profile -> Value Text
tags :: Profile -> Maybe [Tag]
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
logging :: Value Text
name :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
..} = Profile {phone :: Value Text
phone = PropertyType "Phone" Profile
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
logging :: Value Text
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
logging :: Value Text
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" Profile where
  type PropertyType "Tags" Profile = [Tag]
  set :: PropertyType "Tags" Profile -> Profile -> Profile
set PropertyType "Tags" Profile
newValue Profile {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Profile -> ()
businessName :: Profile -> Value Text
email :: Profile -> Maybe (Value Text)
logging :: Profile -> Value Text
name :: Profile -> Value Text
phone :: Profile -> Value Text
tags :: Profile -> Maybe [Tag]
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
logging :: Value Text
name :: Value Text
phone :: Value Text
tags :: Maybe [Tag]
..}
    = Profile {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Profile
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
logging :: Value Text
name :: Value Text
phone :: Value Text
haddock_workaround_ :: ()
businessName :: Value Text
email :: Maybe (Value Text)
logging :: Value Text
name :: Value Text
phone :: Value Text
..}