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