module Stratosphere.AppFlow.ConnectorProfile.ServiceNowConnectorProfileCredentialsProperty (
        module Exports, ServiceNowConnectorProfileCredentialsProperty(..),
        mkServiceNowConnectorProfileCredentialsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppFlow.ConnectorProfile.OAuth2CredentialsProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ServiceNowConnectorProfileCredentialsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-servicenowconnectorprofilecredentials.html>
    ServiceNowConnectorProfileCredentialsProperty {ServiceNowConnectorProfileCredentialsProperty -> ()
haddock_workaround_ :: (),
                                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-servicenowconnectorprofilecredentials.html#cfn-appflow-connectorprofile-servicenowconnectorprofilecredentials-oauth2credentials>
                                                   ServiceNowConnectorProfileCredentialsProperty
-> Maybe OAuth2CredentialsProperty
oAuth2Credentials :: (Prelude.Maybe OAuth2CredentialsProperty),
                                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-servicenowconnectorprofilecredentials.html#cfn-appflow-connectorprofile-servicenowconnectorprofilecredentials-password>
                                                   ServiceNowConnectorProfileCredentialsProperty -> Maybe (Value Text)
password :: (Prelude.Maybe (Value Prelude.Text)),
                                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-servicenowconnectorprofilecredentials.html#cfn-appflow-connectorprofile-servicenowconnectorprofilecredentials-username>
                                                   ServiceNowConnectorProfileCredentialsProperty -> Maybe (Value Text)
username :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ServiceNowConnectorProfileCredentialsProperty
-> ServiceNowConnectorProfileCredentialsProperty -> Bool
(ServiceNowConnectorProfileCredentialsProperty
 -> ServiceNowConnectorProfileCredentialsProperty -> Bool)
-> (ServiceNowConnectorProfileCredentialsProperty
    -> ServiceNowConnectorProfileCredentialsProperty -> Bool)
-> Eq ServiceNowConnectorProfileCredentialsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ServiceNowConnectorProfileCredentialsProperty
-> ServiceNowConnectorProfileCredentialsProperty -> Bool
== :: ServiceNowConnectorProfileCredentialsProperty
-> ServiceNowConnectorProfileCredentialsProperty -> Bool
$c/= :: ServiceNowConnectorProfileCredentialsProperty
-> ServiceNowConnectorProfileCredentialsProperty -> Bool
/= :: ServiceNowConnectorProfileCredentialsProperty
-> ServiceNowConnectorProfileCredentialsProperty -> Bool
Prelude.Eq, Int -> ServiceNowConnectorProfileCredentialsProperty -> ShowS
[ServiceNowConnectorProfileCredentialsProperty] -> ShowS
ServiceNowConnectorProfileCredentialsProperty -> String
(Int -> ServiceNowConnectorProfileCredentialsProperty -> ShowS)
-> (ServiceNowConnectorProfileCredentialsProperty -> String)
-> ([ServiceNowConnectorProfileCredentialsProperty] -> ShowS)
-> Show ServiceNowConnectorProfileCredentialsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ServiceNowConnectorProfileCredentialsProperty -> ShowS
showsPrec :: Int -> ServiceNowConnectorProfileCredentialsProperty -> ShowS
$cshow :: ServiceNowConnectorProfileCredentialsProperty -> String
show :: ServiceNowConnectorProfileCredentialsProperty -> String
$cshowList :: [ServiceNowConnectorProfileCredentialsProperty] -> ShowS
showList :: [ServiceNowConnectorProfileCredentialsProperty] -> ShowS
Prelude.Show)
mkServiceNowConnectorProfileCredentialsProperty ::
  ServiceNowConnectorProfileCredentialsProperty
mkServiceNowConnectorProfileCredentialsProperty :: ServiceNowConnectorProfileCredentialsProperty
mkServiceNowConnectorProfileCredentialsProperty
  = ServiceNowConnectorProfileCredentialsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), oAuth2Credentials :: Maybe OAuth2CredentialsProperty
oAuth2Credentials = Maybe OAuth2CredentialsProperty
forall a. Maybe a
Prelude.Nothing,
       password :: Maybe (Value Text)
password = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, username :: Maybe (Value Text)
username = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ServiceNowConnectorProfileCredentialsProperty where
  toResourceProperties :: ServiceNowConnectorProfileCredentialsProperty -> ResourceProperties
toResourceProperties
    ServiceNowConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe OAuth2CredentialsProperty
()
haddock_workaround_ :: ServiceNowConnectorProfileCredentialsProperty -> ()
oAuth2Credentials :: ServiceNowConnectorProfileCredentialsProperty
-> Maybe OAuth2CredentialsProperty
password :: ServiceNowConnectorProfileCredentialsProperty -> Maybe (Value Text)
username :: ServiceNowConnectorProfileCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
oAuth2Credentials :: Maybe OAuth2CredentialsProperty
password :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppFlow::ConnectorProfile.ServiceNowConnectorProfileCredentials",
         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 -> OAuth2CredentialsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OAuth2Credentials" (OAuth2CredentialsProperty -> (Key, Value))
-> Maybe OAuth2CredentialsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OAuth2CredentialsProperty
oAuth2Credentials,
                            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
"Password" (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)
password,
                            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
"Username" (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)
username])}
instance JSON.ToJSON ServiceNowConnectorProfileCredentialsProperty where
  toJSON :: ServiceNowConnectorProfileCredentialsProperty -> Value
toJSON ServiceNowConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe OAuth2CredentialsProperty
()
haddock_workaround_ :: ServiceNowConnectorProfileCredentialsProperty -> ()
oAuth2Credentials :: ServiceNowConnectorProfileCredentialsProperty
-> Maybe OAuth2CredentialsProperty
password :: ServiceNowConnectorProfileCredentialsProperty -> Maybe (Value Text)
username :: ServiceNowConnectorProfileCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
oAuth2Credentials :: Maybe OAuth2CredentialsProperty
password :: Maybe (Value Text)
username :: 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 -> OAuth2CredentialsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"OAuth2Credentials" (OAuth2CredentialsProperty -> (Key, Value))
-> Maybe OAuth2CredentialsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OAuth2CredentialsProperty
oAuth2Credentials,
               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
"Password" (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)
password,
               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
"Username" (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)
username]))
instance Property "OAuth2Credentials" ServiceNowConnectorProfileCredentialsProperty where
  type PropertyType "OAuth2Credentials" ServiceNowConnectorProfileCredentialsProperty = OAuth2CredentialsProperty
  set :: PropertyType
  "OAuth2Credentials" ServiceNowConnectorProfileCredentialsProperty
-> ServiceNowConnectorProfileCredentialsProperty
-> ServiceNowConnectorProfileCredentialsProperty
set PropertyType
  "OAuth2Credentials" ServiceNowConnectorProfileCredentialsProperty
newValue ServiceNowConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe OAuth2CredentialsProperty
()
haddock_workaround_ :: ServiceNowConnectorProfileCredentialsProperty -> ()
oAuth2Credentials :: ServiceNowConnectorProfileCredentialsProperty
-> Maybe OAuth2CredentialsProperty
password :: ServiceNowConnectorProfileCredentialsProperty -> Maybe (Value Text)
username :: ServiceNowConnectorProfileCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
oAuth2Credentials :: Maybe OAuth2CredentialsProperty
password :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
    = ServiceNowConnectorProfileCredentialsProperty
        {oAuth2Credentials :: Maybe OAuth2CredentialsProperty
oAuth2Credentials = OAuth2CredentialsProperty -> Maybe OAuth2CredentialsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "OAuth2Credentials" ServiceNowConnectorProfileCredentialsProperty
OAuth2CredentialsProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
password :: Maybe (Value Text)
username :: Maybe (Value Text)
haddock_workaround_ :: ()
password :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
instance Property "Password" ServiceNowConnectorProfileCredentialsProperty where
  type PropertyType "Password" ServiceNowConnectorProfileCredentialsProperty = Value Prelude.Text
  set :: PropertyType
  "Password" ServiceNowConnectorProfileCredentialsProperty
-> ServiceNowConnectorProfileCredentialsProperty
-> ServiceNowConnectorProfileCredentialsProperty
set PropertyType
  "Password" ServiceNowConnectorProfileCredentialsProperty
newValue ServiceNowConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe OAuth2CredentialsProperty
()
haddock_workaround_ :: ServiceNowConnectorProfileCredentialsProperty -> ()
oAuth2Credentials :: ServiceNowConnectorProfileCredentialsProperty
-> Maybe OAuth2CredentialsProperty
password :: ServiceNowConnectorProfileCredentialsProperty -> Maybe (Value Text)
username :: ServiceNowConnectorProfileCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
oAuth2Credentials :: Maybe OAuth2CredentialsProperty
password :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
    = ServiceNowConnectorProfileCredentialsProperty
        {password :: Maybe (Value Text)
password = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "Password" ServiceNowConnectorProfileCredentialsProperty
Value Text
newValue, Maybe (Value Text)
Maybe OAuth2CredentialsProperty
()
haddock_workaround_ :: ()
oAuth2Credentials :: Maybe OAuth2CredentialsProperty
username :: Maybe (Value Text)
haddock_workaround_ :: ()
oAuth2Credentials :: Maybe OAuth2CredentialsProperty
username :: Maybe (Value Text)
..}
instance Property "Username" ServiceNowConnectorProfileCredentialsProperty where
  type PropertyType "Username" ServiceNowConnectorProfileCredentialsProperty = Value Prelude.Text
  set :: PropertyType
  "Username" ServiceNowConnectorProfileCredentialsProperty
-> ServiceNowConnectorProfileCredentialsProperty
-> ServiceNowConnectorProfileCredentialsProperty
set PropertyType
  "Username" ServiceNowConnectorProfileCredentialsProperty
newValue ServiceNowConnectorProfileCredentialsProperty {Maybe (Value Text)
Maybe OAuth2CredentialsProperty
()
haddock_workaround_ :: ServiceNowConnectorProfileCredentialsProperty -> ()
oAuth2Credentials :: ServiceNowConnectorProfileCredentialsProperty
-> Maybe OAuth2CredentialsProperty
password :: ServiceNowConnectorProfileCredentialsProperty -> Maybe (Value Text)
username :: ServiceNowConnectorProfileCredentialsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
oAuth2Credentials :: Maybe OAuth2CredentialsProperty
password :: Maybe (Value Text)
username :: Maybe (Value Text)
..}
    = ServiceNowConnectorProfileCredentialsProperty
        {username :: Maybe (Value Text)
username = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "Username" ServiceNowConnectorProfileCredentialsProperty
Value Text
newValue, Maybe (Value Text)
Maybe OAuth2CredentialsProperty
()
haddock_workaround_ :: ()
oAuth2Credentials :: Maybe OAuth2CredentialsProperty
password :: Maybe (Value Text)
haddock_workaround_ :: ()
oAuth2Credentials :: Maybe OAuth2CredentialsProperty
password :: Maybe (Value Text)
..}