module Stratosphere.AppFlow.ConnectorProfile.ConnectorOAuthRequestProperty (
        ConnectorOAuthRequestProperty(..), mkConnectorOAuthRequestProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConnectorOAuthRequestProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-connectoroauthrequest.html>
    ConnectorOAuthRequestProperty {ConnectorOAuthRequestProperty -> ()
haddock_workaround_ :: (),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-connectoroauthrequest.html#cfn-appflow-connectorprofile-connectoroauthrequest-authcode>
                                   ConnectorOAuthRequestProperty -> Maybe (Value Text)
authCode :: (Prelude.Maybe (Value Prelude.Text)),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-connectoroauthrequest.html#cfn-appflow-connectorprofile-connectoroauthrequest-redirecturi>
                                   ConnectorOAuthRequestProperty -> Maybe (Value Text)
redirectUri :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ConnectorOAuthRequestProperty
-> ConnectorOAuthRequestProperty -> Bool
(ConnectorOAuthRequestProperty
 -> ConnectorOAuthRequestProperty -> Bool)
-> (ConnectorOAuthRequestProperty
    -> ConnectorOAuthRequestProperty -> Bool)
-> Eq ConnectorOAuthRequestProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConnectorOAuthRequestProperty
-> ConnectorOAuthRequestProperty -> Bool
== :: ConnectorOAuthRequestProperty
-> ConnectorOAuthRequestProperty -> Bool
$c/= :: ConnectorOAuthRequestProperty
-> ConnectorOAuthRequestProperty -> Bool
/= :: ConnectorOAuthRequestProperty
-> ConnectorOAuthRequestProperty -> Bool
Prelude.Eq, Int -> ConnectorOAuthRequestProperty -> ShowS
[ConnectorOAuthRequestProperty] -> ShowS
ConnectorOAuthRequestProperty -> String
(Int -> ConnectorOAuthRequestProperty -> ShowS)
-> (ConnectorOAuthRequestProperty -> String)
-> ([ConnectorOAuthRequestProperty] -> ShowS)
-> Show ConnectorOAuthRequestProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConnectorOAuthRequestProperty -> ShowS
showsPrec :: Int -> ConnectorOAuthRequestProperty -> ShowS
$cshow :: ConnectorOAuthRequestProperty -> String
show :: ConnectorOAuthRequestProperty -> String
$cshowList :: [ConnectorOAuthRequestProperty] -> ShowS
showList :: [ConnectorOAuthRequestProperty] -> ShowS
Prelude.Show)
mkConnectorOAuthRequestProperty :: ConnectorOAuthRequestProperty
mkConnectorOAuthRequestProperty :: ConnectorOAuthRequestProperty
mkConnectorOAuthRequestProperty
  = ConnectorOAuthRequestProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), authCode :: Maybe (Value Text)
authCode = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       redirectUri :: Maybe (Value Text)
redirectUri = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConnectorOAuthRequestProperty where
  toResourceProperties :: ConnectorOAuthRequestProperty -> ResourceProperties
toResourceProperties ConnectorOAuthRequestProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConnectorOAuthRequestProperty -> ()
authCode :: ConnectorOAuthRequestProperty -> Maybe (Value Text)
redirectUri :: ConnectorOAuthRequestProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
authCode :: Maybe (Value Text)
redirectUri :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppFlow::ConnectorProfile.ConnectorOAuthRequest",
         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
"AuthCode" (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)
authCode,
                            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
"RedirectUri" (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)
redirectUri])}
instance JSON.ToJSON ConnectorOAuthRequestProperty where
  toJSON :: ConnectorOAuthRequestProperty -> Value
toJSON ConnectorOAuthRequestProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConnectorOAuthRequestProperty -> ()
authCode :: ConnectorOAuthRequestProperty -> Maybe (Value Text)
redirectUri :: ConnectorOAuthRequestProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
authCode :: Maybe (Value Text)
redirectUri :: 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
"AuthCode" (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)
authCode,
               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
"RedirectUri" (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)
redirectUri]))
instance Property "AuthCode" ConnectorOAuthRequestProperty where
  type PropertyType "AuthCode" ConnectorOAuthRequestProperty = Value Prelude.Text
  set :: PropertyType "AuthCode" ConnectorOAuthRequestProperty
-> ConnectorOAuthRequestProperty -> ConnectorOAuthRequestProperty
set PropertyType "AuthCode" ConnectorOAuthRequestProperty
newValue ConnectorOAuthRequestProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConnectorOAuthRequestProperty -> ()
authCode :: ConnectorOAuthRequestProperty -> Maybe (Value Text)
redirectUri :: ConnectorOAuthRequestProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
authCode :: Maybe (Value Text)
redirectUri :: Maybe (Value Text)
..}
    = ConnectorOAuthRequestProperty
        {authCode :: Maybe (Value Text)
authCode = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AuthCode" ConnectorOAuthRequestProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
redirectUri :: Maybe (Value Text)
haddock_workaround_ :: ()
redirectUri :: Maybe (Value Text)
..}
instance Property "RedirectUri" ConnectorOAuthRequestProperty where
  type PropertyType "RedirectUri" ConnectorOAuthRequestProperty = Value Prelude.Text
  set :: PropertyType "RedirectUri" ConnectorOAuthRequestProperty
-> ConnectorOAuthRequestProperty -> ConnectorOAuthRequestProperty
set PropertyType "RedirectUri" ConnectorOAuthRequestProperty
newValue ConnectorOAuthRequestProperty {Maybe (Value Text)
()
haddock_workaround_ :: ConnectorOAuthRequestProperty -> ()
authCode :: ConnectorOAuthRequestProperty -> Maybe (Value Text)
redirectUri :: ConnectorOAuthRequestProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
authCode :: Maybe (Value Text)
redirectUri :: Maybe (Value Text)
..}
    = ConnectorOAuthRequestProperty
        {redirectUri :: Maybe (Value Text)
redirectUri = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RedirectUri" ConnectorOAuthRequestProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
authCode :: Maybe (Value Text)
haddock_workaround_ :: ()
authCode :: Maybe (Value Text)
..}