module Stratosphere.DataZone.Connection.AuthorizationCodePropertiesProperty (
        AuthorizationCodePropertiesProperty(..),
        mkAuthorizationCodePropertiesProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AuthorizationCodePropertiesProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datazone-connection-authorizationcodeproperties.html>
    AuthorizationCodePropertiesProperty {AuthorizationCodePropertiesProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datazone-connection-authorizationcodeproperties.html#cfn-datazone-connection-authorizationcodeproperties-authorizationcode>
                                         AuthorizationCodePropertiesProperty -> Maybe (Value Text)
authorizationCode :: (Prelude.Maybe (Value Prelude.Text)),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datazone-connection-authorizationcodeproperties.html#cfn-datazone-connection-authorizationcodeproperties-redirecturi>
                                         AuthorizationCodePropertiesProperty -> Maybe (Value Text)
redirectUri :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (AuthorizationCodePropertiesProperty
-> AuthorizationCodePropertiesProperty -> Bool
(AuthorizationCodePropertiesProperty
 -> AuthorizationCodePropertiesProperty -> Bool)
-> (AuthorizationCodePropertiesProperty
    -> AuthorizationCodePropertiesProperty -> Bool)
-> Eq AuthorizationCodePropertiesProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AuthorizationCodePropertiesProperty
-> AuthorizationCodePropertiesProperty -> Bool
== :: AuthorizationCodePropertiesProperty
-> AuthorizationCodePropertiesProperty -> Bool
$c/= :: AuthorizationCodePropertiesProperty
-> AuthorizationCodePropertiesProperty -> Bool
/= :: AuthorizationCodePropertiesProperty
-> AuthorizationCodePropertiesProperty -> Bool
Prelude.Eq, Int -> AuthorizationCodePropertiesProperty -> ShowS
[AuthorizationCodePropertiesProperty] -> ShowS
AuthorizationCodePropertiesProperty -> String
(Int -> AuthorizationCodePropertiesProperty -> ShowS)
-> (AuthorizationCodePropertiesProperty -> String)
-> ([AuthorizationCodePropertiesProperty] -> ShowS)
-> Show AuthorizationCodePropertiesProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AuthorizationCodePropertiesProperty -> ShowS
showsPrec :: Int -> AuthorizationCodePropertiesProperty -> ShowS
$cshow :: AuthorizationCodePropertiesProperty -> String
show :: AuthorizationCodePropertiesProperty -> String
$cshowList :: [AuthorizationCodePropertiesProperty] -> ShowS
showList :: [AuthorizationCodePropertiesProperty] -> ShowS
Prelude.Show)
mkAuthorizationCodePropertiesProperty ::
  AuthorizationCodePropertiesProperty
mkAuthorizationCodePropertiesProperty :: AuthorizationCodePropertiesProperty
mkAuthorizationCodePropertiesProperty
  = AuthorizationCodePropertiesProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), authorizationCode :: Maybe (Value Text)
authorizationCode = 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 AuthorizationCodePropertiesProperty where
  toResourceProperties :: AuthorizationCodePropertiesProperty -> ResourceProperties
toResourceProperties AuthorizationCodePropertiesProperty {Maybe (Value Text)
()
haddock_workaround_ :: AuthorizationCodePropertiesProperty -> ()
authorizationCode :: AuthorizationCodePropertiesProperty -> Maybe (Value Text)
redirectUri :: AuthorizationCodePropertiesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
authorizationCode :: Maybe (Value Text)
redirectUri :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataZone::Connection.AuthorizationCodeProperties",
         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
"AuthorizationCode" (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)
authorizationCode,
                            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 AuthorizationCodePropertiesProperty where
  toJSON :: AuthorizationCodePropertiesProperty -> Value
toJSON AuthorizationCodePropertiesProperty {Maybe (Value Text)
()
haddock_workaround_ :: AuthorizationCodePropertiesProperty -> ()
authorizationCode :: AuthorizationCodePropertiesProperty -> Maybe (Value Text)
redirectUri :: AuthorizationCodePropertiesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
authorizationCode :: 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
"AuthorizationCode" (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)
authorizationCode,
               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 "AuthorizationCode" AuthorizationCodePropertiesProperty where
  type PropertyType "AuthorizationCode" AuthorizationCodePropertiesProperty = Value Prelude.Text
  set :: PropertyType
  "AuthorizationCode" AuthorizationCodePropertiesProperty
-> AuthorizationCodePropertiesProperty
-> AuthorizationCodePropertiesProperty
set PropertyType
  "AuthorizationCode" AuthorizationCodePropertiesProperty
newValue AuthorizationCodePropertiesProperty {Maybe (Value Text)
()
haddock_workaround_ :: AuthorizationCodePropertiesProperty -> ()
authorizationCode :: AuthorizationCodePropertiesProperty -> Maybe (Value Text)
redirectUri :: AuthorizationCodePropertiesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
authorizationCode :: Maybe (Value Text)
redirectUri :: Maybe (Value Text)
..}
    = AuthorizationCodePropertiesProperty
        {authorizationCode :: Maybe (Value Text)
authorizationCode = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "AuthorizationCode" AuthorizationCodePropertiesProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
redirectUri :: Maybe (Value Text)
haddock_workaround_ :: ()
redirectUri :: Maybe (Value Text)
..}
instance Property "RedirectUri" AuthorizationCodePropertiesProperty where
  type PropertyType "RedirectUri" AuthorizationCodePropertiesProperty = Value Prelude.Text
  set :: PropertyType "RedirectUri" AuthorizationCodePropertiesProperty
-> AuthorizationCodePropertiesProperty
-> AuthorizationCodePropertiesProperty
set PropertyType "RedirectUri" AuthorizationCodePropertiesProperty
newValue AuthorizationCodePropertiesProperty {Maybe (Value Text)
()
haddock_workaround_ :: AuthorizationCodePropertiesProperty -> ()
authorizationCode :: AuthorizationCodePropertiesProperty -> Maybe (Value Text)
redirectUri :: AuthorizationCodePropertiesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
authorizationCode :: Maybe (Value Text)
redirectUri :: Maybe (Value Text)
..}
    = AuthorizationCodePropertiesProperty
        {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" AuthorizationCodePropertiesProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
authorizationCode :: Maybe (Value Text)
haddock_workaround_ :: ()
authorizationCode :: Maybe (Value Text)
..}