module Stratosphere.AppFlow.ConnectorProfile.SlackConnectorProfileCredentialsProperty (
        module Exports, SlackConnectorProfileCredentialsProperty(..),
        mkSlackConnectorProfileCredentialsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppFlow.ConnectorProfile.ConnectorOAuthRequestProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SlackConnectorProfileCredentialsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-slackconnectorprofilecredentials.html>
    SlackConnectorProfileCredentialsProperty {SlackConnectorProfileCredentialsProperty -> ()
haddock_workaround_ :: (),
                                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-slackconnectorprofilecredentials.html#cfn-appflow-connectorprofile-slackconnectorprofilecredentials-accesstoken>
                                              SlackConnectorProfileCredentialsProperty -> Maybe (Value Text)
accessToken :: (Prelude.Maybe (Value Prelude.Text)),
                                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-slackconnectorprofilecredentials.html#cfn-appflow-connectorprofile-slackconnectorprofilecredentials-clientid>
                                              SlackConnectorProfileCredentialsProperty -> Value Text
clientId :: (Value Prelude.Text),
                                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-slackconnectorprofilecredentials.html#cfn-appflow-connectorprofile-slackconnectorprofilecredentials-clientsecret>
                                              SlackConnectorProfileCredentialsProperty -> Value Text
clientSecret :: (Value Prelude.Text),
                                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-slackconnectorprofilecredentials.html#cfn-appflow-connectorprofile-slackconnectorprofilecredentials-connectoroauthrequest>
                                              SlackConnectorProfileCredentialsProperty
-> Maybe ConnectorOAuthRequestProperty
connectorOAuthRequest :: (Prelude.Maybe ConnectorOAuthRequestProperty)}
  deriving stock (SlackConnectorProfileCredentialsProperty
-> SlackConnectorProfileCredentialsProperty -> Bool
(SlackConnectorProfileCredentialsProperty
 -> SlackConnectorProfileCredentialsProperty -> Bool)
-> (SlackConnectorProfileCredentialsProperty
    -> SlackConnectorProfileCredentialsProperty -> Bool)
-> Eq SlackConnectorProfileCredentialsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SlackConnectorProfileCredentialsProperty
-> SlackConnectorProfileCredentialsProperty -> Bool
== :: SlackConnectorProfileCredentialsProperty
-> SlackConnectorProfileCredentialsProperty -> Bool
$c/= :: SlackConnectorProfileCredentialsProperty
-> SlackConnectorProfileCredentialsProperty -> Bool
/= :: SlackConnectorProfileCredentialsProperty
-> SlackConnectorProfileCredentialsProperty -> Bool
Prelude.Eq, Int -> SlackConnectorProfileCredentialsProperty -> ShowS
[SlackConnectorProfileCredentialsProperty] -> ShowS
SlackConnectorProfileCredentialsProperty -> String
(Int -> SlackConnectorProfileCredentialsProperty -> ShowS)
-> (SlackConnectorProfileCredentialsProperty -> String)
-> ([SlackConnectorProfileCredentialsProperty] -> ShowS)
-> Show SlackConnectorProfileCredentialsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SlackConnectorProfileCredentialsProperty -> ShowS
showsPrec :: Int -> SlackConnectorProfileCredentialsProperty -> ShowS
$cshow :: SlackConnectorProfileCredentialsProperty -> String
show :: SlackConnectorProfileCredentialsProperty -> String
$cshowList :: [SlackConnectorProfileCredentialsProperty] -> ShowS
showList :: [SlackConnectorProfileCredentialsProperty] -> ShowS
Prelude.Show)
mkSlackConnectorProfileCredentialsProperty ::
  Value Prelude.Text
  -> Value Prelude.Text -> SlackConnectorProfileCredentialsProperty
mkSlackConnectorProfileCredentialsProperty :: Value Text
-> Value Text -> SlackConnectorProfileCredentialsProperty
mkSlackConnectorProfileCredentialsProperty Value Text
clientId Value Text
clientSecret
  = SlackConnectorProfileCredentialsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), clientId :: Value Text
clientId = Value Text
clientId,
       clientSecret :: Value Text
clientSecret = Value Text
clientSecret, accessToken :: Maybe (Value Text)
accessToken = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
connectorOAuthRequest = Maybe ConnectorOAuthRequestProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SlackConnectorProfileCredentialsProperty where
  toResourceProperties :: SlackConnectorProfileCredentialsProperty -> ResourceProperties
toResourceProperties SlackConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
Value Text
haddock_workaround_ :: SlackConnectorProfileCredentialsProperty -> ()
accessToken :: SlackConnectorProfileCredentialsProperty -> Maybe (Value Text)
clientId :: SlackConnectorProfileCredentialsProperty -> Value Text
clientSecret :: SlackConnectorProfileCredentialsProperty -> Value Text
connectorOAuthRequest :: SlackConnectorProfileCredentialsProperty
-> Maybe ConnectorOAuthRequestProperty
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Value Text
clientSecret :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppFlow::ConnectorProfile.SlackConnectorProfileCredentials",
         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
"ClientId" 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
clientId, Key
"ClientSecret" 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
clientSecret]
                           ([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
"AccessToken" (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)
accessToken,
                               Key -> ConnectorOAuthRequestProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConnectorOAuthRequest"
                                 (ConnectorOAuthRequestProperty -> (Key, Value))
-> Maybe ConnectorOAuthRequestProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectorOAuthRequestProperty
connectorOAuthRequest]))}
instance JSON.ToJSON SlackConnectorProfileCredentialsProperty where
  toJSON :: SlackConnectorProfileCredentialsProperty -> Value
toJSON SlackConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
Value Text
haddock_workaround_ :: SlackConnectorProfileCredentialsProperty -> ()
accessToken :: SlackConnectorProfileCredentialsProperty -> Maybe (Value Text)
clientId :: SlackConnectorProfileCredentialsProperty -> Value Text
clientSecret :: SlackConnectorProfileCredentialsProperty -> Value Text
connectorOAuthRequest :: SlackConnectorProfileCredentialsProperty
-> Maybe ConnectorOAuthRequestProperty
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Value Text
clientSecret :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
..}
    = [(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
"ClientId" 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
clientId, Key
"ClientSecret" 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
clientSecret]
              ([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
"AccessToken" (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)
accessToken,
                  Key -> ConnectorOAuthRequestProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConnectorOAuthRequest"
                    (ConnectorOAuthRequestProperty -> (Key, Value))
-> Maybe ConnectorOAuthRequestProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectorOAuthRequestProperty
connectorOAuthRequest])))
instance Property "AccessToken" SlackConnectorProfileCredentialsProperty where
  type PropertyType "AccessToken" SlackConnectorProfileCredentialsProperty = Value Prelude.Text
  set :: PropertyType "AccessToken" SlackConnectorProfileCredentialsProperty
-> SlackConnectorProfileCredentialsProperty
-> SlackConnectorProfileCredentialsProperty
set PropertyType "AccessToken" SlackConnectorProfileCredentialsProperty
newValue SlackConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
Value Text
haddock_workaround_ :: SlackConnectorProfileCredentialsProperty -> ()
accessToken :: SlackConnectorProfileCredentialsProperty -> Maybe (Value Text)
clientId :: SlackConnectorProfileCredentialsProperty -> Value Text
clientSecret :: SlackConnectorProfileCredentialsProperty -> Value Text
connectorOAuthRequest :: SlackConnectorProfileCredentialsProperty
-> Maybe ConnectorOAuthRequestProperty
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Value Text
clientSecret :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
..}
    = SlackConnectorProfileCredentialsProperty
        {accessToken :: Maybe (Value Text)
accessToken = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AccessToken" SlackConnectorProfileCredentialsProperty
Value Text
newValue, Maybe ConnectorOAuthRequestProperty
()
Value Text
haddock_workaround_ :: ()
clientId :: Value Text
clientSecret :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
haddock_workaround_ :: ()
clientId :: Value Text
clientSecret :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
..}
instance Property "ClientId" SlackConnectorProfileCredentialsProperty where
  type PropertyType "ClientId" SlackConnectorProfileCredentialsProperty = Value Prelude.Text
  set :: PropertyType "ClientId" SlackConnectorProfileCredentialsProperty
-> SlackConnectorProfileCredentialsProperty
-> SlackConnectorProfileCredentialsProperty
set PropertyType "ClientId" SlackConnectorProfileCredentialsProperty
newValue SlackConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
Value Text
haddock_workaround_ :: SlackConnectorProfileCredentialsProperty -> ()
accessToken :: SlackConnectorProfileCredentialsProperty -> Maybe (Value Text)
clientId :: SlackConnectorProfileCredentialsProperty -> Value Text
clientSecret :: SlackConnectorProfileCredentialsProperty -> Value Text
connectorOAuthRequest :: SlackConnectorProfileCredentialsProperty
-> Maybe ConnectorOAuthRequestProperty
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Value Text
clientSecret :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
..}
    = SlackConnectorProfileCredentialsProperty
        {clientId :: Value Text
clientId = PropertyType "ClientId" SlackConnectorProfileCredentialsProperty
Value Text
newValue, Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
Value Text
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientSecret :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientSecret :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
..}
instance Property "ClientSecret" SlackConnectorProfileCredentialsProperty where
  type PropertyType "ClientSecret" SlackConnectorProfileCredentialsProperty = Value Prelude.Text
  set :: PropertyType
  "ClientSecret" SlackConnectorProfileCredentialsProperty
-> SlackConnectorProfileCredentialsProperty
-> SlackConnectorProfileCredentialsProperty
set PropertyType
  "ClientSecret" SlackConnectorProfileCredentialsProperty
newValue SlackConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
Value Text
haddock_workaround_ :: SlackConnectorProfileCredentialsProperty -> ()
accessToken :: SlackConnectorProfileCredentialsProperty -> Maybe (Value Text)
clientId :: SlackConnectorProfileCredentialsProperty -> Value Text
clientSecret :: SlackConnectorProfileCredentialsProperty -> Value Text
connectorOAuthRequest :: SlackConnectorProfileCredentialsProperty
-> Maybe ConnectorOAuthRequestProperty
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Value Text
clientSecret :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
..}
    = SlackConnectorProfileCredentialsProperty
        {clientSecret :: Value Text
clientSecret = PropertyType
  "ClientSecret" SlackConnectorProfileCredentialsProperty
Value Text
newValue, Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
Value Text
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
..}
instance Property "ConnectorOAuthRequest" SlackConnectorProfileCredentialsProperty where
  type PropertyType "ConnectorOAuthRequest" SlackConnectorProfileCredentialsProperty = ConnectorOAuthRequestProperty
  set :: PropertyType
  "ConnectorOAuthRequest" SlackConnectorProfileCredentialsProperty
-> SlackConnectorProfileCredentialsProperty
-> SlackConnectorProfileCredentialsProperty
set PropertyType
  "ConnectorOAuthRequest" SlackConnectorProfileCredentialsProperty
newValue SlackConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
Value Text
haddock_workaround_ :: SlackConnectorProfileCredentialsProperty -> ()
accessToken :: SlackConnectorProfileCredentialsProperty -> Maybe (Value Text)
clientId :: SlackConnectorProfileCredentialsProperty -> Value Text
clientSecret :: SlackConnectorProfileCredentialsProperty -> Value Text
connectorOAuthRequest :: SlackConnectorProfileCredentialsProperty
-> Maybe ConnectorOAuthRequestProperty
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Value Text
clientSecret :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
..}
    = SlackConnectorProfileCredentialsProperty
        {connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
connectorOAuthRequest = ConnectorOAuthRequestProperty
-> Maybe ConnectorOAuthRequestProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ConnectorOAuthRequest" SlackConnectorProfileCredentialsProperty
ConnectorOAuthRequestProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Value Text
clientSecret :: Value Text
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Value Text
clientSecret :: Value Text
..}