{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AppFlow.Types.RedshiftConnectorProfileProperties
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.AppFlow.Types.RedshiftConnectorProfileProperties where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | The connector-specific profile properties when using Amazon Redshift.
--
-- /See:/ 'newRedshiftConnectorProfileProperties' smart constructor.
data RedshiftConnectorProfileProperties = RedshiftConnectorProfileProperties'
  { -- | The object key for the destination bucket in which Amazon AppFlow places
    -- the files.
    RedshiftConnectorProfileProperties -> Maybe Text
bucketPrefix :: Prelude.Maybe Prelude.Text,
    -- | The unique ID that\'s assigned to an Amazon Redshift cluster.
    RedshiftConnectorProfileProperties -> Maybe Text
clusterIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of an IAM role that permits Amazon
    -- AppFlow to access your Amazon Redshift database through the Data API.
    -- For more information, and for the polices that you attach to this role,
    -- see
    -- <https://docs.aws.amazon.com/appflow/latest/userguide/security_iam_service-role-policies.html#access-redshift Allow Amazon AppFlow to access Amazon Redshift databases with the Data API>.
    RedshiftConnectorProfileProperties -> Maybe Text
dataApiRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The name of an Amazon Redshift database.
    RedshiftConnectorProfileProperties -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
    -- | The JDBC URL of the Amazon Redshift cluster.
    RedshiftConnectorProfileProperties -> Maybe Text
databaseUrl :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether the connector profile defines a connection to an
    -- Amazon Redshift Serverless data warehouse.
    RedshiftConnectorProfileProperties -> Maybe Bool
isRedshiftServerless :: Prelude.Maybe Prelude.Bool,
    -- | The name of an Amazon Redshift workgroup.
    RedshiftConnectorProfileProperties -> Maybe Text
workgroupName :: Prelude.Maybe Prelude.Text,
    -- | A name for the associated Amazon S3 bucket.
    RedshiftConnectorProfileProperties -> Text
bucketName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of IAM role that grants Amazon Redshift
    -- read-only access to Amazon S3. For more information, and for the polices
    -- that you attach to this role, see
    -- <https://docs.aws.amazon.com/appflow/latest/userguide/security_iam_service-role-policies.html#redshift-access-s3 Allow Amazon Redshift to access your Amazon AppFlow data in Amazon S3>.
    RedshiftConnectorProfileProperties -> Text
roleArn :: Prelude.Text
  }
  deriving (RedshiftConnectorProfileProperties
-> RedshiftConnectorProfileProperties -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RedshiftConnectorProfileProperties
-> RedshiftConnectorProfileProperties -> Bool
$c/= :: RedshiftConnectorProfileProperties
-> RedshiftConnectorProfileProperties -> Bool
== :: RedshiftConnectorProfileProperties
-> RedshiftConnectorProfileProperties -> Bool
$c== :: RedshiftConnectorProfileProperties
-> RedshiftConnectorProfileProperties -> Bool
Prelude.Eq, ReadPrec [RedshiftConnectorProfileProperties]
ReadPrec RedshiftConnectorProfileProperties
Int -> ReadS RedshiftConnectorProfileProperties
ReadS [RedshiftConnectorProfileProperties]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RedshiftConnectorProfileProperties]
$creadListPrec :: ReadPrec [RedshiftConnectorProfileProperties]
readPrec :: ReadPrec RedshiftConnectorProfileProperties
$creadPrec :: ReadPrec RedshiftConnectorProfileProperties
readList :: ReadS [RedshiftConnectorProfileProperties]
$creadList :: ReadS [RedshiftConnectorProfileProperties]
readsPrec :: Int -> ReadS RedshiftConnectorProfileProperties
$creadsPrec :: Int -> ReadS RedshiftConnectorProfileProperties
Prelude.Read, Int -> RedshiftConnectorProfileProperties -> ShowS
[RedshiftConnectorProfileProperties] -> ShowS
RedshiftConnectorProfileProperties -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RedshiftConnectorProfileProperties] -> ShowS
$cshowList :: [RedshiftConnectorProfileProperties] -> ShowS
show :: RedshiftConnectorProfileProperties -> String
$cshow :: RedshiftConnectorProfileProperties -> String
showsPrec :: Int -> RedshiftConnectorProfileProperties -> ShowS
$cshowsPrec :: Int -> RedshiftConnectorProfileProperties -> ShowS
Prelude.Show, forall x.
Rep RedshiftConnectorProfileProperties x
-> RedshiftConnectorProfileProperties
forall x.
RedshiftConnectorProfileProperties
-> Rep RedshiftConnectorProfileProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RedshiftConnectorProfileProperties x
-> RedshiftConnectorProfileProperties
$cfrom :: forall x.
RedshiftConnectorProfileProperties
-> Rep RedshiftConnectorProfileProperties x
Prelude.Generic)

-- |
-- Create a value of 'RedshiftConnectorProfileProperties' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'bucketPrefix', 'redshiftConnectorProfileProperties_bucketPrefix' - The object key for the destination bucket in which Amazon AppFlow places
-- the files.
--
-- 'clusterIdentifier', 'redshiftConnectorProfileProperties_clusterIdentifier' - The unique ID that\'s assigned to an Amazon Redshift cluster.
--
-- 'dataApiRoleArn', 'redshiftConnectorProfileProperties_dataApiRoleArn' - The Amazon Resource Name (ARN) of an IAM role that permits Amazon
-- AppFlow to access your Amazon Redshift database through the Data API.
-- For more information, and for the polices that you attach to this role,
-- see
-- <https://docs.aws.amazon.com/appflow/latest/userguide/security_iam_service-role-policies.html#access-redshift Allow Amazon AppFlow to access Amazon Redshift databases with the Data API>.
--
-- 'databaseName', 'redshiftConnectorProfileProperties_databaseName' - The name of an Amazon Redshift database.
--
-- 'databaseUrl', 'redshiftConnectorProfileProperties_databaseUrl' - The JDBC URL of the Amazon Redshift cluster.
--
-- 'isRedshiftServerless', 'redshiftConnectorProfileProperties_isRedshiftServerless' - Indicates whether the connector profile defines a connection to an
-- Amazon Redshift Serverless data warehouse.
--
-- 'workgroupName', 'redshiftConnectorProfileProperties_workgroupName' - The name of an Amazon Redshift workgroup.
--
-- 'bucketName', 'redshiftConnectorProfileProperties_bucketName' - A name for the associated Amazon S3 bucket.
--
-- 'roleArn', 'redshiftConnectorProfileProperties_roleArn' - The Amazon Resource Name (ARN) of IAM role that grants Amazon Redshift
-- read-only access to Amazon S3. For more information, and for the polices
-- that you attach to this role, see
-- <https://docs.aws.amazon.com/appflow/latest/userguide/security_iam_service-role-policies.html#redshift-access-s3 Allow Amazon Redshift to access your Amazon AppFlow data in Amazon S3>.
newRedshiftConnectorProfileProperties ::
  -- | 'bucketName'
  Prelude.Text ->
  -- | 'roleArn'
  Prelude.Text ->
  RedshiftConnectorProfileProperties
newRedshiftConnectorProfileProperties :: Text -> Text -> RedshiftConnectorProfileProperties
newRedshiftConnectorProfileProperties
  Text
pBucketName_
  Text
pRoleArn_ =
    RedshiftConnectorProfileProperties'
      { $sel:bucketPrefix:RedshiftConnectorProfileProperties' :: Maybe Text
bucketPrefix =
          forall a. Maybe a
Prelude.Nothing,
        $sel:clusterIdentifier:RedshiftConnectorProfileProperties' :: Maybe Text
clusterIdentifier = forall a. Maybe a
Prelude.Nothing,
        $sel:dataApiRoleArn:RedshiftConnectorProfileProperties' :: Maybe Text
dataApiRoleArn = forall a. Maybe a
Prelude.Nothing,
        $sel:databaseName:RedshiftConnectorProfileProperties' :: Maybe Text
databaseName = forall a. Maybe a
Prelude.Nothing,
        $sel:databaseUrl:RedshiftConnectorProfileProperties' :: Maybe Text
databaseUrl = forall a. Maybe a
Prelude.Nothing,
        $sel:isRedshiftServerless:RedshiftConnectorProfileProperties' :: Maybe Bool
isRedshiftServerless = forall a. Maybe a
Prelude.Nothing,
        $sel:workgroupName:RedshiftConnectorProfileProperties' :: Maybe Text
workgroupName = forall a. Maybe a
Prelude.Nothing,
        $sel:bucketName:RedshiftConnectorProfileProperties' :: Text
bucketName = Text
pBucketName_,
        $sel:roleArn:RedshiftConnectorProfileProperties' :: Text
roleArn = Text
pRoleArn_
      }

-- | The object key for the destination bucket in which Amazon AppFlow places
-- the files.
redshiftConnectorProfileProperties_bucketPrefix :: Lens.Lens' RedshiftConnectorProfileProperties (Prelude.Maybe Prelude.Text)
redshiftConnectorProfileProperties_bucketPrefix :: Lens' RedshiftConnectorProfileProperties (Maybe Text)
redshiftConnectorProfileProperties_bucketPrefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftConnectorProfileProperties' {Maybe Text
bucketPrefix :: Maybe Text
$sel:bucketPrefix:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
bucketPrefix} -> Maybe Text
bucketPrefix) (\s :: RedshiftConnectorProfileProperties
s@RedshiftConnectorProfileProperties' {} Maybe Text
a -> RedshiftConnectorProfileProperties
s {$sel:bucketPrefix:RedshiftConnectorProfileProperties' :: Maybe Text
bucketPrefix = Maybe Text
a} :: RedshiftConnectorProfileProperties)

-- | The unique ID that\'s assigned to an Amazon Redshift cluster.
redshiftConnectorProfileProperties_clusterIdentifier :: Lens.Lens' RedshiftConnectorProfileProperties (Prelude.Maybe Prelude.Text)
redshiftConnectorProfileProperties_clusterIdentifier :: Lens' RedshiftConnectorProfileProperties (Maybe Text)
redshiftConnectorProfileProperties_clusterIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftConnectorProfileProperties' {Maybe Text
clusterIdentifier :: Maybe Text
$sel:clusterIdentifier:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
clusterIdentifier} -> Maybe Text
clusterIdentifier) (\s :: RedshiftConnectorProfileProperties
s@RedshiftConnectorProfileProperties' {} Maybe Text
a -> RedshiftConnectorProfileProperties
s {$sel:clusterIdentifier:RedshiftConnectorProfileProperties' :: Maybe Text
clusterIdentifier = Maybe Text
a} :: RedshiftConnectorProfileProperties)

-- | The Amazon Resource Name (ARN) of an IAM role that permits Amazon
-- AppFlow to access your Amazon Redshift database through the Data API.
-- For more information, and for the polices that you attach to this role,
-- see
-- <https://docs.aws.amazon.com/appflow/latest/userguide/security_iam_service-role-policies.html#access-redshift Allow Amazon AppFlow to access Amazon Redshift databases with the Data API>.
redshiftConnectorProfileProperties_dataApiRoleArn :: Lens.Lens' RedshiftConnectorProfileProperties (Prelude.Maybe Prelude.Text)
redshiftConnectorProfileProperties_dataApiRoleArn :: Lens' RedshiftConnectorProfileProperties (Maybe Text)
redshiftConnectorProfileProperties_dataApiRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftConnectorProfileProperties' {Maybe Text
dataApiRoleArn :: Maybe Text
$sel:dataApiRoleArn:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
dataApiRoleArn} -> Maybe Text
dataApiRoleArn) (\s :: RedshiftConnectorProfileProperties
s@RedshiftConnectorProfileProperties' {} Maybe Text
a -> RedshiftConnectorProfileProperties
s {$sel:dataApiRoleArn:RedshiftConnectorProfileProperties' :: Maybe Text
dataApiRoleArn = Maybe Text
a} :: RedshiftConnectorProfileProperties)

-- | The name of an Amazon Redshift database.
redshiftConnectorProfileProperties_databaseName :: Lens.Lens' RedshiftConnectorProfileProperties (Prelude.Maybe Prelude.Text)
redshiftConnectorProfileProperties_databaseName :: Lens' RedshiftConnectorProfileProperties (Maybe Text)
redshiftConnectorProfileProperties_databaseName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftConnectorProfileProperties' {Maybe Text
databaseName :: Maybe Text
$sel:databaseName:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
databaseName} -> Maybe Text
databaseName) (\s :: RedshiftConnectorProfileProperties
s@RedshiftConnectorProfileProperties' {} Maybe Text
a -> RedshiftConnectorProfileProperties
s {$sel:databaseName:RedshiftConnectorProfileProperties' :: Maybe Text
databaseName = Maybe Text
a} :: RedshiftConnectorProfileProperties)

-- | The JDBC URL of the Amazon Redshift cluster.
redshiftConnectorProfileProperties_databaseUrl :: Lens.Lens' RedshiftConnectorProfileProperties (Prelude.Maybe Prelude.Text)
redshiftConnectorProfileProperties_databaseUrl :: Lens' RedshiftConnectorProfileProperties (Maybe Text)
redshiftConnectorProfileProperties_databaseUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftConnectorProfileProperties' {Maybe Text
databaseUrl :: Maybe Text
$sel:databaseUrl:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
databaseUrl} -> Maybe Text
databaseUrl) (\s :: RedshiftConnectorProfileProperties
s@RedshiftConnectorProfileProperties' {} Maybe Text
a -> RedshiftConnectorProfileProperties
s {$sel:databaseUrl:RedshiftConnectorProfileProperties' :: Maybe Text
databaseUrl = Maybe Text
a} :: RedshiftConnectorProfileProperties)

-- | Indicates whether the connector profile defines a connection to an
-- Amazon Redshift Serverless data warehouse.
redshiftConnectorProfileProperties_isRedshiftServerless :: Lens.Lens' RedshiftConnectorProfileProperties (Prelude.Maybe Prelude.Bool)
redshiftConnectorProfileProperties_isRedshiftServerless :: Lens' RedshiftConnectorProfileProperties (Maybe Bool)
redshiftConnectorProfileProperties_isRedshiftServerless = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftConnectorProfileProperties' {Maybe Bool
isRedshiftServerless :: Maybe Bool
$sel:isRedshiftServerless:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Bool
isRedshiftServerless} -> Maybe Bool
isRedshiftServerless) (\s :: RedshiftConnectorProfileProperties
s@RedshiftConnectorProfileProperties' {} Maybe Bool
a -> RedshiftConnectorProfileProperties
s {$sel:isRedshiftServerless:RedshiftConnectorProfileProperties' :: Maybe Bool
isRedshiftServerless = Maybe Bool
a} :: RedshiftConnectorProfileProperties)

-- | The name of an Amazon Redshift workgroup.
redshiftConnectorProfileProperties_workgroupName :: Lens.Lens' RedshiftConnectorProfileProperties (Prelude.Maybe Prelude.Text)
redshiftConnectorProfileProperties_workgroupName :: Lens' RedshiftConnectorProfileProperties (Maybe Text)
redshiftConnectorProfileProperties_workgroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftConnectorProfileProperties' {Maybe Text
workgroupName :: Maybe Text
$sel:workgroupName:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
workgroupName} -> Maybe Text
workgroupName) (\s :: RedshiftConnectorProfileProperties
s@RedshiftConnectorProfileProperties' {} Maybe Text
a -> RedshiftConnectorProfileProperties
s {$sel:workgroupName:RedshiftConnectorProfileProperties' :: Maybe Text
workgroupName = Maybe Text
a} :: RedshiftConnectorProfileProperties)

-- | A name for the associated Amazon S3 bucket.
redshiftConnectorProfileProperties_bucketName :: Lens.Lens' RedshiftConnectorProfileProperties Prelude.Text
redshiftConnectorProfileProperties_bucketName :: Lens' RedshiftConnectorProfileProperties Text
redshiftConnectorProfileProperties_bucketName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftConnectorProfileProperties' {Text
bucketName :: Text
$sel:bucketName:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Text
bucketName} -> Text
bucketName) (\s :: RedshiftConnectorProfileProperties
s@RedshiftConnectorProfileProperties' {} Text
a -> RedshiftConnectorProfileProperties
s {$sel:bucketName:RedshiftConnectorProfileProperties' :: Text
bucketName = Text
a} :: RedshiftConnectorProfileProperties)

-- | The Amazon Resource Name (ARN) of IAM role that grants Amazon Redshift
-- read-only access to Amazon S3. For more information, and for the polices
-- that you attach to this role, see
-- <https://docs.aws.amazon.com/appflow/latest/userguide/security_iam_service-role-policies.html#redshift-access-s3 Allow Amazon Redshift to access your Amazon AppFlow data in Amazon S3>.
redshiftConnectorProfileProperties_roleArn :: Lens.Lens' RedshiftConnectorProfileProperties Prelude.Text
redshiftConnectorProfileProperties_roleArn :: Lens' RedshiftConnectorProfileProperties Text
redshiftConnectorProfileProperties_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftConnectorProfileProperties' {Text
roleArn :: Text
$sel:roleArn:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Text
roleArn} -> Text
roleArn) (\s :: RedshiftConnectorProfileProperties
s@RedshiftConnectorProfileProperties' {} Text
a -> RedshiftConnectorProfileProperties
s {$sel:roleArn:RedshiftConnectorProfileProperties' :: Text
roleArn = Text
a} :: RedshiftConnectorProfileProperties)

instance
  Data.FromJSON
    RedshiftConnectorProfileProperties
  where
  parseJSON :: Value -> Parser RedshiftConnectorProfileProperties
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"RedshiftConnectorProfileProperties"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Text
-> Text
-> RedshiftConnectorProfileProperties
RedshiftConnectorProfileProperties'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"bucketPrefix")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"clusterIdentifier")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"dataApiRoleArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"databaseName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"databaseUrl")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"isRedshiftServerless")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"workgroupName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"bucketName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"roleArn")
      )

instance
  Prelude.Hashable
    RedshiftConnectorProfileProperties
  where
  hashWithSalt :: Int -> RedshiftConnectorProfileProperties -> Int
hashWithSalt
    Int
_salt
    RedshiftConnectorProfileProperties' {Maybe Bool
Maybe Text
Text
roleArn :: Text
bucketName :: Text
workgroupName :: Maybe Text
isRedshiftServerless :: Maybe Bool
databaseUrl :: Maybe Text
databaseName :: Maybe Text
dataApiRoleArn :: Maybe Text
clusterIdentifier :: Maybe Text
bucketPrefix :: Maybe Text
$sel:roleArn:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Text
$sel:bucketName:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Text
$sel:workgroupName:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
$sel:isRedshiftServerless:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Bool
$sel:databaseUrl:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
$sel:databaseName:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
$sel:dataApiRoleArn:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
$sel:clusterIdentifier:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
$sel:bucketPrefix:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
bucketPrefix
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clusterIdentifier
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dataApiRoleArn
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
databaseName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
databaseUrl
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isRedshiftServerless
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
workgroupName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
bucketName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleArn

instance
  Prelude.NFData
    RedshiftConnectorProfileProperties
  where
  rnf :: RedshiftConnectorProfileProperties -> ()
rnf RedshiftConnectorProfileProperties' {Maybe Bool
Maybe Text
Text
roleArn :: Text
bucketName :: Text
workgroupName :: Maybe Text
isRedshiftServerless :: Maybe Bool
databaseUrl :: Maybe Text
databaseName :: Maybe Text
dataApiRoleArn :: Maybe Text
clusterIdentifier :: Maybe Text
bucketPrefix :: Maybe Text
$sel:roleArn:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Text
$sel:bucketName:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Text
$sel:workgroupName:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
$sel:isRedshiftServerless:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Bool
$sel:databaseUrl:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
$sel:databaseName:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
$sel:dataApiRoleArn:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
$sel:clusterIdentifier:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
$sel:bucketPrefix:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
bucketPrefix
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clusterIdentifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dataApiRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
databaseName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
databaseUrl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isRedshiftServerless
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
workgroupName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
bucketName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleArn

instance
  Data.ToJSON
    RedshiftConnectorProfileProperties
  where
  toJSON :: RedshiftConnectorProfileProperties -> Value
toJSON RedshiftConnectorProfileProperties' {Maybe Bool
Maybe Text
Text
roleArn :: Text
bucketName :: Text
workgroupName :: Maybe Text
isRedshiftServerless :: Maybe Bool
databaseUrl :: Maybe Text
databaseName :: Maybe Text
dataApiRoleArn :: Maybe Text
clusterIdentifier :: Maybe Text
bucketPrefix :: Maybe Text
$sel:roleArn:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Text
$sel:bucketName:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Text
$sel:workgroupName:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
$sel:isRedshiftServerless:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Bool
$sel:databaseUrl:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
$sel:databaseName:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
$sel:dataApiRoleArn:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
$sel:clusterIdentifier:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
$sel:bucketPrefix:RedshiftConnectorProfileProperties' :: RedshiftConnectorProfileProperties -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"bucketPrefix" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
bucketPrefix,
            (Key
"clusterIdentifier" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clusterIdentifier,
            (Key
"dataApiRoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
dataApiRoleArn,
            (Key
"databaseName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
databaseName,
            (Key
"databaseUrl" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
databaseUrl,
            (Key
"isRedshiftServerless" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
isRedshiftServerless,
            (Key
"workgroupName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
workgroupName,
            forall a. a -> Maybe a
Prelude.Just (Key
"bucketName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
bucketName),
            forall a. a -> Maybe a
Prelude.Just (Key
"roleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
roleArn)
          ]
      )