module Stratosphere.AppFlow.ConnectorProfile.OAuthCredentialsProperty (
module Exports, OAuthCredentialsProperty(..),
mkOAuthCredentialsProperty
) 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 OAuthCredentialsProperty
=
OAuthCredentialsProperty {OAuthCredentialsProperty -> ()
haddock_workaround_ :: (),
OAuthCredentialsProperty -> Maybe (Value Text)
accessToken :: (Prelude.Maybe (Value Prelude.Text)),
OAuthCredentialsProperty -> Maybe (Value Text)
clientId :: (Prelude.Maybe (Value Prelude.Text)),
OAuthCredentialsProperty -> Maybe (Value Text)
clientSecret :: (Prelude.Maybe (Value Prelude.Text)),
OAuthCredentialsProperty -> Maybe ConnectorOAuthRequestProperty
connectorOAuthRequest :: (Prelude.Maybe ConnectorOAuthRequestProperty),
OAuthCredentialsProperty -> Maybe (Value Text)
refreshToken :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (OAuthCredentialsProperty -> OAuthCredentialsProperty -> Bool
(OAuthCredentialsProperty -> OAuthCredentialsProperty -> Bool)
-> (OAuthCredentialsProperty -> OAuthCredentialsProperty -> Bool)
-> Eq OAuthCredentialsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OAuthCredentialsProperty -> OAuthCredentialsProperty -> Bool
== :: OAuthCredentialsProperty -> OAuthCredentialsProperty -> Bool
$c/= :: OAuthCredentialsProperty -> OAuthCredentialsProperty -> Bool
/= :: OAuthCredentialsProperty -> OAuthCredentialsProperty -> Bool
Prelude.Eq, Int -> OAuthCredentialsProperty -> ShowS
[OAuthCredentialsProperty] -> ShowS
OAuthCredentialsProperty -> String
(Int -> OAuthCredentialsProperty -> ShowS)
-> (OAuthCredentialsProperty -> String)
-> ([OAuthCredentialsProperty] -> ShowS)
-> Show OAuthCredentialsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OAuthCredentialsProperty -> ShowS
showsPrec :: Int -> OAuthCredentialsProperty -> ShowS
$cshow :: OAuthCredentialsProperty -> String
show :: OAuthCredentialsProperty -> String
$cshowList :: [OAuthCredentialsProperty] -> ShowS
showList :: [OAuthCredentialsProperty] -> ShowS
Prelude.Show)
mkOAuthCredentialsProperty :: OAuthCredentialsProperty
mkOAuthCredentialsProperty :: OAuthCredentialsProperty
mkOAuthCredentialsProperty
= OAuthCredentialsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), accessToken :: Maybe (Value Text)
accessToken = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
clientId :: Maybe (Value Text)
clientId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, clientSecret :: Maybe (Value Text)
clientSecret = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
connectorOAuthRequest = Maybe ConnectorOAuthRequestProperty
forall a. Maybe a
Prelude.Nothing,
refreshToken :: Maybe (Value Text)
refreshToken = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties OAuthCredentialsProperty where
toResourceProperties :: OAuthCredentialsProperty -> ResourceProperties
toResourceProperties OAuthCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
haddock_workaround_ :: OAuthCredentialsProperty -> ()
accessToken :: OAuthCredentialsProperty -> Maybe (Value Text)
clientId :: OAuthCredentialsProperty -> Maybe (Value Text)
clientSecret :: OAuthCredentialsProperty -> Maybe (Value Text)
connectorOAuthRequest :: OAuthCredentialsProperty -> Maybe ConnectorOAuthRequestProperty
refreshToken :: OAuthCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Maybe (Value Text)
clientSecret :: Maybe (Value Text)
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
refreshToken :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AppFlow::ConnectorProfile.OAuthCredentials",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([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 -> 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
"ClientId" (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)
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..=) Key
"ClientSecret" (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)
clientSecret,
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,
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
"RefreshToken" (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)
refreshToken])}
instance JSON.ToJSON OAuthCredentialsProperty where
toJSON :: OAuthCredentialsProperty -> Value
toJSON OAuthCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
haddock_workaround_ :: OAuthCredentialsProperty -> ()
accessToken :: OAuthCredentialsProperty -> Maybe (Value Text)
clientId :: OAuthCredentialsProperty -> Maybe (Value Text)
clientSecret :: OAuthCredentialsProperty -> Maybe (Value Text)
connectorOAuthRequest :: OAuthCredentialsProperty -> Maybe ConnectorOAuthRequestProperty
refreshToken :: OAuthCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Maybe (Value Text)
clientSecret :: Maybe (Value Text)
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
refreshToken :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([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 -> 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
"ClientId" (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)
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..=) Key
"ClientSecret" (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)
clientSecret,
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,
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
"RefreshToken" (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)
refreshToken]))
instance Property "AccessToken" OAuthCredentialsProperty where
type PropertyType "AccessToken" OAuthCredentialsProperty = Value Prelude.Text
set :: PropertyType "AccessToken" OAuthCredentialsProperty
-> OAuthCredentialsProperty -> OAuthCredentialsProperty
set PropertyType "AccessToken" OAuthCredentialsProperty
newValue OAuthCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
haddock_workaround_ :: OAuthCredentialsProperty -> ()
accessToken :: OAuthCredentialsProperty -> Maybe (Value Text)
clientId :: OAuthCredentialsProperty -> Maybe (Value Text)
clientSecret :: OAuthCredentialsProperty -> Maybe (Value Text)
connectorOAuthRequest :: OAuthCredentialsProperty -> Maybe ConnectorOAuthRequestProperty
refreshToken :: OAuthCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Maybe (Value Text)
clientSecret :: Maybe (Value Text)
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
refreshToken :: Maybe (Value Text)
..}
= OAuthCredentialsProperty
{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" OAuthCredentialsProperty
Value Text
newValue, Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
haddock_workaround_ :: ()
clientId :: Maybe (Value Text)
clientSecret :: Maybe (Value Text)
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
refreshToken :: Maybe (Value Text)
haddock_workaround_ :: ()
clientId :: Maybe (Value Text)
clientSecret :: Maybe (Value Text)
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
refreshToken :: Maybe (Value Text)
..}
instance Property "ClientId" OAuthCredentialsProperty where
type PropertyType "ClientId" OAuthCredentialsProperty = Value Prelude.Text
set :: PropertyType "ClientId" OAuthCredentialsProperty
-> OAuthCredentialsProperty -> OAuthCredentialsProperty
set PropertyType "ClientId" OAuthCredentialsProperty
newValue OAuthCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
haddock_workaround_ :: OAuthCredentialsProperty -> ()
accessToken :: OAuthCredentialsProperty -> Maybe (Value Text)
clientId :: OAuthCredentialsProperty -> Maybe (Value Text)
clientSecret :: OAuthCredentialsProperty -> Maybe (Value Text)
connectorOAuthRequest :: OAuthCredentialsProperty -> Maybe ConnectorOAuthRequestProperty
refreshToken :: OAuthCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Maybe (Value Text)
clientSecret :: Maybe (Value Text)
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
refreshToken :: Maybe (Value Text)
..}
= OAuthCredentialsProperty {clientId :: Maybe (Value Text)
clientId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ClientId" OAuthCredentialsProperty
Value Text
newValue, Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientSecret :: Maybe (Value Text)
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
refreshToken :: Maybe (Value Text)
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientSecret :: Maybe (Value Text)
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
refreshToken :: Maybe (Value Text)
..}
instance Property "ClientSecret" OAuthCredentialsProperty where
type PropertyType "ClientSecret" OAuthCredentialsProperty = Value Prelude.Text
set :: PropertyType "ClientSecret" OAuthCredentialsProperty
-> OAuthCredentialsProperty -> OAuthCredentialsProperty
set PropertyType "ClientSecret" OAuthCredentialsProperty
newValue OAuthCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
haddock_workaround_ :: OAuthCredentialsProperty -> ()
accessToken :: OAuthCredentialsProperty -> Maybe (Value Text)
clientId :: OAuthCredentialsProperty -> Maybe (Value Text)
clientSecret :: OAuthCredentialsProperty -> Maybe (Value Text)
connectorOAuthRequest :: OAuthCredentialsProperty -> Maybe ConnectorOAuthRequestProperty
refreshToken :: OAuthCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Maybe (Value Text)
clientSecret :: Maybe (Value Text)
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
refreshToken :: Maybe (Value Text)
..}
= OAuthCredentialsProperty
{clientSecret :: Maybe (Value Text)
clientSecret = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ClientSecret" OAuthCredentialsProperty
Value Text
newValue, Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Maybe (Value Text)
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
refreshToken :: Maybe (Value Text)
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Maybe (Value Text)
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
refreshToken :: Maybe (Value Text)
..}
instance Property "ConnectorOAuthRequest" OAuthCredentialsProperty where
type PropertyType "ConnectorOAuthRequest" OAuthCredentialsProperty = ConnectorOAuthRequestProperty
set :: PropertyType "ConnectorOAuthRequest" OAuthCredentialsProperty
-> OAuthCredentialsProperty -> OAuthCredentialsProperty
set PropertyType "ConnectorOAuthRequest" OAuthCredentialsProperty
newValue OAuthCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
haddock_workaround_ :: OAuthCredentialsProperty -> ()
accessToken :: OAuthCredentialsProperty -> Maybe (Value Text)
clientId :: OAuthCredentialsProperty -> Maybe (Value Text)
clientSecret :: OAuthCredentialsProperty -> Maybe (Value Text)
connectorOAuthRequest :: OAuthCredentialsProperty -> Maybe ConnectorOAuthRequestProperty
refreshToken :: OAuthCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Maybe (Value Text)
clientSecret :: Maybe (Value Text)
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
refreshToken :: Maybe (Value Text)
..}
= OAuthCredentialsProperty
{connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
connectorOAuthRequest = ConnectorOAuthRequestProperty
-> Maybe ConnectorOAuthRequestProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ConnectorOAuthRequest" OAuthCredentialsProperty
ConnectorOAuthRequestProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Maybe (Value Text)
clientSecret :: Maybe (Value Text)
refreshToken :: Maybe (Value Text)
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Maybe (Value Text)
clientSecret :: Maybe (Value Text)
refreshToken :: Maybe (Value Text)
..}
instance Property "RefreshToken" OAuthCredentialsProperty where
type PropertyType "RefreshToken" OAuthCredentialsProperty = Value Prelude.Text
set :: PropertyType "RefreshToken" OAuthCredentialsProperty
-> OAuthCredentialsProperty -> OAuthCredentialsProperty
set PropertyType "RefreshToken" OAuthCredentialsProperty
newValue OAuthCredentialsProperty {Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
haddock_workaround_ :: OAuthCredentialsProperty -> ()
accessToken :: OAuthCredentialsProperty -> Maybe (Value Text)
clientId :: OAuthCredentialsProperty -> Maybe (Value Text)
clientSecret :: OAuthCredentialsProperty -> Maybe (Value Text)
connectorOAuthRequest :: OAuthCredentialsProperty -> Maybe ConnectorOAuthRequestProperty
refreshToken :: OAuthCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Maybe (Value Text)
clientSecret :: Maybe (Value Text)
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
refreshToken :: Maybe (Value Text)
..}
= OAuthCredentialsProperty
{refreshToken :: Maybe (Value Text)
refreshToken = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RefreshToken" OAuthCredentialsProperty
Value Text
newValue, Maybe (Value Text)
Maybe ConnectorOAuthRequestProperty
()
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Maybe (Value Text)
clientSecret :: Maybe (Value Text)
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
haddock_workaround_ :: ()
accessToken :: Maybe (Value Text)
clientId :: Maybe (Value Text)
clientSecret :: Maybe (Value Text)
connectorOAuthRequest :: Maybe ConnectorOAuthRequestProperty
..}