module Stratosphere.AppFlow.ConnectorProfile.ZendeskConnectorProfileCredentialsProperty (
        module Exports, ZendeskConnectorProfileCredentialsProperty(..),
        mkZendeskConnectorProfileCredentialsProperty
    ) 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 ZendeskConnectorProfileCredentialsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-zendeskconnectorprofilecredentials.html>
    ZendeskConnectorProfileCredentialsProperty {ZendeskConnectorProfileCredentialsProperty -> ()
haddock_workaround_ :: (),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-zendeskconnectorprofilecredentials.html#cfn-appflow-connectorprofile-zendeskconnectorprofilecredentials-accesstoken>
                                                ZendeskConnectorProfileCredentialsProperty -> Maybe (Value Text)
accessToken :: (Prelude.Maybe (Value Prelude.Text)),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-zendeskconnectorprofilecredentials.html#cfn-appflow-connectorprofile-zendeskconnectorprofilecredentials-clientid>
                                                ZendeskConnectorProfileCredentialsProperty -> Value Text
clientId :: (Value Prelude.Text),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-zendeskconnectorprofilecredentials.html#cfn-appflow-connectorprofile-zendeskconnectorprofilecredentials-clientsecret>
                                                ZendeskConnectorProfileCredentialsProperty -> Value Text
clientSecret :: (Value Prelude.Text),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-zendeskconnectorprofilecredentials.html#cfn-appflow-connectorprofile-zendeskconnectorprofilecredentials-connectoroauthrequest>
                                                ZendeskConnectorProfileCredentialsProperty
-> Maybe ConnectorOAuthRequestProperty
connectorOAuthRequest :: (Prelude.Maybe ConnectorOAuthRequestProperty)}
  deriving stock (ZendeskConnectorProfileCredentialsProperty
-> ZendeskConnectorProfileCredentialsProperty -> Bool
(ZendeskConnectorProfileCredentialsProperty
 -> ZendeskConnectorProfileCredentialsProperty -> Bool)
-> (ZendeskConnectorProfileCredentialsProperty
    -> ZendeskConnectorProfileCredentialsProperty -> Bool)
-> Eq ZendeskConnectorProfileCredentialsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ZendeskConnectorProfileCredentialsProperty
-> ZendeskConnectorProfileCredentialsProperty -> Bool
== :: ZendeskConnectorProfileCredentialsProperty
-> ZendeskConnectorProfileCredentialsProperty -> Bool
$c/= :: ZendeskConnectorProfileCredentialsProperty
-> ZendeskConnectorProfileCredentialsProperty -> Bool
/= :: ZendeskConnectorProfileCredentialsProperty
-> ZendeskConnectorProfileCredentialsProperty -> Bool
Prelude.Eq, Int -> ZendeskConnectorProfileCredentialsProperty -> ShowS
[ZendeskConnectorProfileCredentialsProperty] -> ShowS
ZendeskConnectorProfileCredentialsProperty -> String
(Int -> ZendeskConnectorProfileCredentialsProperty -> ShowS)
-> (ZendeskConnectorProfileCredentialsProperty -> String)
-> ([ZendeskConnectorProfileCredentialsProperty] -> ShowS)
-> Show ZendeskConnectorProfileCredentialsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ZendeskConnectorProfileCredentialsProperty -> ShowS
showsPrec :: Int -> ZendeskConnectorProfileCredentialsProperty -> ShowS
$cshow :: ZendeskConnectorProfileCredentialsProperty -> String
show :: ZendeskConnectorProfileCredentialsProperty -> String
$cshowList :: [ZendeskConnectorProfileCredentialsProperty] -> ShowS
showList :: [ZendeskConnectorProfileCredentialsProperty] -> ShowS
Prelude.Show)
mkZendeskConnectorProfileCredentialsProperty ::
  Value Prelude.Text
  -> Value Prelude.Text -> ZendeskConnectorProfileCredentialsProperty
mkZendeskConnectorProfileCredentialsProperty :: Value Text
-> Value Text -> ZendeskConnectorProfileCredentialsProperty
mkZendeskConnectorProfileCredentialsProperty Value Text
clientId Value Text
clientSecret
  = ZendeskConnectorProfileCredentialsProperty
      {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 ZendeskConnectorProfileCredentialsProperty where
  toResourceProperties :: ZendeskConnectorProfileCredentialsProperty -> ResourceProperties
toResourceProperties
    ZendeskConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
Value Text
haddock_workaround_ :: ZendeskConnectorProfileCredentialsProperty -> ()
accessToken :: ZendeskConnectorProfileCredentialsProperty -> Maybe (Value Text)
clientId :: ZendeskConnectorProfileCredentialsProperty -> Value Text
clientSecret :: ZendeskConnectorProfileCredentialsProperty -> Value Text
connectorOAuthRequest :: ZendeskConnectorProfileCredentialsProperty
-> 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.ZendeskConnectorProfileCredentials",
         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 ZendeskConnectorProfileCredentialsProperty where
  toJSON :: ZendeskConnectorProfileCredentialsProperty -> Value
toJSON ZendeskConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
Value Text
haddock_workaround_ :: ZendeskConnectorProfileCredentialsProperty -> ()
accessToken :: ZendeskConnectorProfileCredentialsProperty -> Maybe (Value Text)
clientId :: ZendeskConnectorProfileCredentialsProperty -> Value Text
clientSecret :: ZendeskConnectorProfileCredentialsProperty -> Value Text
connectorOAuthRequest :: ZendeskConnectorProfileCredentialsProperty
-> 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" ZendeskConnectorProfileCredentialsProperty where
  type PropertyType "AccessToken" ZendeskConnectorProfileCredentialsProperty = Value Prelude.Text
  set :: PropertyType
  "AccessToken" ZendeskConnectorProfileCredentialsProperty
-> ZendeskConnectorProfileCredentialsProperty
-> ZendeskConnectorProfileCredentialsProperty
set PropertyType
  "AccessToken" ZendeskConnectorProfileCredentialsProperty
newValue ZendeskConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
Value Text
haddock_workaround_ :: ZendeskConnectorProfileCredentialsProperty -> ()
accessToken :: ZendeskConnectorProfileCredentialsProperty -> Maybe (Value Text)
clientId :: ZendeskConnectorProfileCredentialsProperty -> Value Text
clientSecret :: ZendeskConnectorProfileCredentialsProperty -> Value Text
connectorOAuthRequest :: ZendeskConnectorProfileCredentialsProperty
-> Maybe ConnectorOAuthRequestProperty
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Value Text
clientSecret :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
..}
    = ZendeskConnectorProfileCredentialsProperty
        {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" ZendeskConnectorProfileCredentialsProperty
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" ZendeskConnectorProfileCredentialsProperty where
  type PropertyType "ClientId" ZendeskConnectorProfileCredentialsProperty = Value Prelude.Text
  set :: PropertyType "ClientId" ZendeskConnectorProfileCredentialsProperty
-> ZendeskConnectorProfileCredentialsProperty
-> ZendeskConnectorProfileCredentialsProperty
set PropertyType "ClientId" ZendeskConnectorProfileCredentialsProperty
newValue ZendeskConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
Value Text
haddock_workaround_ :: ZendeskConnectorProfileCredentialsProperty -> ()
accessToken :: ZendeskConnectorProfileCredentialsProperty -> Maybe (Value Text)
clientId :: ZendeskConnectorProfileCredentialsProperty -> Value Text
clientSecret :: ZendeskConnectorProfileCredentialsProperty -> Value Text
connectorOAuthRequest :: ZendeskConnectorProfileCredentialsProperty
-> Maybe ConnectorOAuthRequestProperty
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Value Text
clientSecret :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
..}
    = ZendeskConnectorProfileCredentialsProperty
        {clientId :: Value Text
clientId = PropertyType "ClientId" ZendeskConnectorProfileCredentialsProperty
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" ZendeskConnectorProfileCredentialsProperty where
  type PropertyType "ClientSecret" ZendeskConnectorProfileCredentialsProperty = Value Prelude.Text
  set :: PropertyType
  "ClientSecret" ZendeskConnectorProfileCredentialsProperty
-> ZendeskConnectorProfileCredentialsProperty
-> ZendeskConnectorProfileCredentialsProperty
set PropertyType
  "ClientSecret" ZendeskConnectorProfileCredentialsProperty
newValue ZendeskConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
Value Text
haddock_workaround_ :: ZendeskConnectorProfileCredentialsProperty -> ()
accessToken :: ZendeskConnectorProfileCredentialsProperty -> Maybe (Value Text)
clientId :: ZendeskConnectorProfileCredentialsProperty -> Value Text
clientSecret :: ZendeskConnectorProfileCredentialsProperty -> Value Text
connectorOAuthRequest :: ZendeskConnectorProfileCredentialsProperty
-> Maybe ConnectorOAuthRequestProperty
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Value Text
clientSecret :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
..}
    = ZendeskConnectorProfileCredentialsProperty
        {clientSecret :: Value Text
clientSecret = PropertyType
  "ClientSecret" ZendeskConnectorProfileCredentialsProperty
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" ZendeskConnectorProfileCredentialsProperty where
  type PropertyType "ConnectorOAuthRequest" ZendeskConnectorProfileCredentialsProperty = ConnectorOAuthRequestProperty
  set :: PropertyType
  "ConnectorOAuthRequest" ZendeskConnectorProfileCredentialsProperty
-> ZendeskConnectorProfileCredentialsProperty
-> ZendeskConnectorProfileCredentialsProperty
set PropertyType
  "ConnectorOAuthRequest" ZendeskConnectorProfileCredentialsProperty
newValue ZendeskConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
Value Text
haddock_workaround_ :: ZendeskConnectorProfileCredentialsProperty -> ()
accessToken :: ZendeskConnectorProfileCredentialsProperty -> Maybe (Value Text)
clientId :: ZendeskConnectorProfileCredentialsProperty -> Value Text
clientSecret :: ZendeskConnectorProfileCredentialsProperty -> Value Text
connectorOAuthRequest :: ZendeskConnectorProfileCredentialsProperty
-> Maybe ConnectorOAuthRequestProperty
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Value Text
clientSecret :: Value Text
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
..}
    = ZendeskConnectorProfileCredentialsProperty
        {connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
connectorOAuthRequest = ConnectorOAuthRequestProperty
-> Maybe ConnectorOAuthRequestProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ConnectorOAuthRequest" ZendeskConnectorProfileCredentialsProperty
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
..}