module Stratosphere.Redshift.Integration (
        Integration(..), mkIntegration
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Integration
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-integration.html>
    Integration {Integration -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-integration.html#cfn-redshift-integration-additionalencryptioncontext>
                 Integration -> Maybe (Map Text (Value Text))
additionalEncryptionContext :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text))),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-integration.html#cfn-redshift-integration-integrationname>
                 Integration -> Maybe (Value Text)
integrationName :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-integration.html#cfn-redshift-integration-kmskeyid>
                 Integration -> Maybe (Value Text)
kMSKeyId :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-integration.html#cfn-redshift-integration-sourcearn>
                 Integration -> Value Text
sourceArn :: (Value Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-integration.html#cfn-redshift-integration-tags>
                 Integration -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-integration.html#cfn-redshift-integration-targetarn>
                 Integration -> Value Text
targetArn :: (Value Prelude.Text)}
  deriving stock (Integration -> Integration -> Bool
(Integration -> Integration -> Bool)
-> (Integration -> Integration -> Bool) -> Eq Integration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Integration -> Integration -> Bool
== :: Integration -> Integration -> Bool
$c/= :: Integration -> Integration -> Bool
/= :: Integration -> Integration -> Bool
Prelude.Eq, Int -> Integration -> ShowS
[Integration] -> ShowS
Integration -> String
(Int -> Integration -> ShowS)
-> (Integration -> String)
-> ([Integration] -> ShowS)
-> Show Integration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Integration -> ShowS
showsPrec :: Int -> Integration -> ShowS
$cshow :: Integration -> String
show :: Integration -> String
$cshowList :: [Integration] -> ShowS
showList :: [Integration] -> ShowS
Prelude.Show)
mkIntegration ::
  Value Prelude.Text -> Value Prelude.Text -> Integration
mkIntegration :: Value Text -> Value Text -> Integration
mkIntegration Value Text
sourceArn Value Text
targetArn
  = Integration
      {haddock_workaround_ :: ()
haddock_workaround_ = (), sourceArn :: Value Text
sourceArn = Value Text
sourceArn,
       targetArn :: Value Text
targetArn = Value Text
targetArn,
       additionalEncryptionContext :: Maybe (Map Text (Value Text))
additionalEncryptionContext = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing,
       integrationName :: Maybe (Value Text)
integrationName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, kMSKeyId :: Maybe (Value Text)
kMSKeyId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Integration where
  toResourceProperties :: Integration -> ResourceProperties
toResourceProperties Integration {Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Integration -> ()
additionalEncryptionContext :: Integration -> Maybe (Map Text (Value Text))
integrationName :: Integration -> Maybe (Value Text)
kMSKeyId :: Integration -> Maybe (Value Text)
sourceArn :: Integration -> Value Text
tags :: Integration -> Maybe [Tag]
targetArn :: Integration -> Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
targetArn :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Redshift::Integration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"SourceArn" 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
sourceArn, Key
"TargetArn" 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
targetArn]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Map Text (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
"AdditionalEncryptionContext"
                                 (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
additionalEncryptionContext,
                               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
"IntegrationName" (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)
integrationName,
                               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
"KMSKeyId" (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)
kMSKeyId,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON Integration where
  toJSON :: Integration -> Value
toJSON Integration {Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Integration -> ()
additionalEncryptionContext :: Integration -> Maybe (Map Text (Value Text))
integrationName :: Integration -> Maybe (Value Text)
kMSKeyId :: Integration -> Maybe (Value Text)
sourceArn :: Integration -> Value Text
tags :: Integration -> Maybe [Tag]
targetArn :: Integration -> Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
targetArn :: 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
"SourceArn" 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
sourceArn, Key
"TargetArn" 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
targetArn]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Map Text (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
"AdditionalEncryptionContext"
                    (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
additionalEncryptionContext,
                  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
"IntegrationName" (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)
integrationName,
                  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
"KMSKeyId" (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)
kMSKeyId,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "AdditionalEncryptionContext" Integration where
  type PropertyType "AdditionalEncryptionContext" Integration = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "AdditionalEncryptionContext" Integration
-> Integration -> Integration
set PropertyType "AdditionalEncryptionContext" Integration
newValue Integration {Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Integration -> ()
additionalEncryptionContext :: Integration -> Maybe (Map Text (Value Text))
integrationName :: Integration -> Maybe (Value Text)
kMSKeyId :: Integration -> Maybe (Value Text)
sourceArn :: Integration -> Value Text
tags :: Integration -> Maybe [Tag]
targetArn :: Integration -> Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
targetArn :: Value Text
..}
    = Integration
        {additionalEncryptionContext :: Maybe (Map Text (Value Text))
additionalEncryptionContext = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "AdditionalEncryptionContext" Integration
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
targetArn :: Value Text
haddock_workaround_ :: ()
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
targetArn :: Value Text
..}
instance Property "IntegrationName" Integration where
  type PropertyType "IntegrationName" Integration = Value Prelude.Text
  set :: PropertyType "IntegrationName" Integration
-> Integration -> Integration
set PropertyType "IntegrationName" Integration
newValue Integration {Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Integration -> ()
additionalEncryptionContext :: Integration -> Maybe (Map Text (Value Text))
integrationName :: Integration -> Maybe (Value Text)
kMSKeyId :: Integration -> Maybe (Value Text)
sourceArn :: Integration -> Value Text
tags :: Integration -> Maybe [Tag]
targetArn :: Integration -> Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
targetArn :: Value Text
..}
    = Integration {integrationName :: Maybe (Value Text)
integrationName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IntegrationName" Integration
Value Text
newValue, Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
targetArn :: Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
targetArn :: Value Text
..}
instance Property "KMSKeyId" Integration where
  type PropertyType "KMSKeyId" Integration = Value Prelude.Text
  set :: PropertyType "KMSKeyId" Integration -> Integration -> Integration
set PropertyType "KMSKeyId" Integration
newValue Integration {Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Integration -> ()
additionalEncryptionContext :: Integration -> Maybe (Map Text (Value Text))
integrationName :: Integration -> Maybe (Value Text)
kMSKeyId :: Integration -> Maybe (Value Text)
sourceArn :: Integration -> Value Text
tags :: Integration -> Maybe [Tag]
targetArn :: Integration -> Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
targetArn :: Value Text
..}
    = Integration {kMSKeyId :: Maybe (Value Text)
kMSKeyId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KMSKeyId" Integration
Value Text
newValue, Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
targetArn :: Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
targetArn :: Value Text
..}
instance Property "SourceArn" Integration where
  type PropertyType "SourceArn" Integration = Value Prelude.Text
  set :: PropertyType "SourceArn" Integration -> Integration -> Integration
set PropertyType "SourceArn" Integration
newValue Integration {Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Integration -> ()
additionalEncryptionContext :: Integration -> Maybe (Map Text (Value Text))
integrationName :: Integration -> Maybe (Value Text)
kMSKeyId :: Integration -> Maybe (Value Text)
sourceArn :: Integration -> Value Text
tags :: Integration -> Maybe [Tag]
targetArn :: Integration -> Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
targetArn :: Value Text
..}
    = Integration {sourceArn :: Value Text
sourceArn = PropertyType "SourceArn" Integration
Value Text
newValue, Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
tags :: Maybe [Tag]
targetArn :: Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
tags :: Maybe [Tag]
targetArn :: Value Text
..}
instance Property "Tags" Integration where
  type PropertyType "Tags" Integration = [Tag]
  set :: PropertyType "Tags" Integration -> Integration -> Integration
set PropertyType "Tags" Integration
newValue Integration {Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Integration -> ()
additionalEncryptionContext :: Integration -> Maybe (Map Text (Value Text))
integrationName :: Integration -> Maybe (Value Text)
kMSKeyId :: Integration -> Maybe (Value Text)
sourceArn :: Integration -> Value Text
tags :: Integration -> Maybe [Tag]
targetArn :: Integration -> Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
targetArn :: Value Text
..}
    = Integration {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Integration
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
targetArn :: Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
targetArn :: Value Text
..}
instance Property "TargetArn" Integration where
  type PropertyType "TargetArn" Integration = Value Prelude.Text
  set :: PropertyType "TargetArn" Integration -> Integration -> Integration
set PropertyType "TargetArn" Integration
newValue Integration {Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Integration -> ()
additionalEncryptionContext :: Integration -> Maybe (Map Text (Value Text))
integrationName :: Integration -> Maybe (Value Text)
kMSKeyId :: Integration -> Maybe (Value Text)
sourceArn :: Integration -> Value Text
tags :: Integration -> Maybe [Tag]
targetArn :: Integration -> Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
targetArn :: Value Text
..}
    = Integration {targetArn :: Value Text
targetArn = PropertyType "TargetArn" Integration
Value Text
newValue, Maybe [Tag]
Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
additionalEncryptionContext :: Maybe (Map Text (Value Text))
integrationName :: Maybe (Value Text)
kMSKeyId :: Maybe (Value Text)
sourceArn :: Value Text
tags :: Maybe [Tag]
..}