{-# 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.DMS.Types.KafkaSettings
-- 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.DMS.Types.KafkaSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.DMS.Types.KafkaSecurityProtocol
import Amazonka.DMS.Types.MessageFormatValue
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Provides information that describes an Apache Kafka endpoint. This
-- information includes the output format of records applied to the
-- endpoint and details of transaction and control table data information.
--
-- /See:/ 'newKafkaSettings' smart constructor.
data KafkaSettings = KafkaSettings'
  { -- | A comma-separated list of one or more broker locations in your Kafka
    -- cluster that host your Kafka instance. Specify each broker location in
    -- the form @ @/@broker-hostname-or-ip@/@:@/@port@/@ @. For example,
    -- @\"ec2-12-345-678-901.compute-1.amazonaws.com:2345\"@. For more
    -- information and examples of specifying a list of broker locations, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kafka.html Using Apache Kafka as a target for Database Migration Service>
    -- in the /Database Migration Service User Guide/.
    KafkaSettings -> Maybe Text
broker :: Prelude.Maybe Prelude.Text,
    -- | Shows detailed control information for table definition, column
    -- definition, and table and column changes in the Kafka message output.
    -- The default is @false@.
    KafkaSettings -> Maybe Bool
includeControlDetails :: Prelude.Maybe Prelude.Bool,
    -- | Include NULL and empty columns for records migrated to the endpoint. The
    -- default is @false@.
    KafkaSettings -> Maybe Bool
includeNullAndEmpty :: Prelude.Maybe Prelude.Bool,
    -- | Shows the partition value within the Kafka message output unless the
    -- partition type is @schema-table-type@. The default is @false@.
    KafkaSettings -> Maybe Bool
includePartitionValue :: Prelude.Maybe Prelude.Bool,
    -- | Includes any data definition language (DDL) operations that change the
    -- table in the control data, such as @rename-table@, @drop-table@,
    -- @add-column@, @drop-column@, and @rename-column@. The default is
    -- @false@.
    KafkaSettings -> Maybe Bool
includeTableAlterOperations :: Prelude.Maybe Prelude.Bool,
    -- | Provides detailed transaction information from the source database. This
    -- information includes a commit timestamp, a log position, and values for
    -- @transaction_id@, previous @transaction_id@, and @transaction_record_id@
    -- (the record offset within a transaction). The default is @false@.
    KafkaSettings -> Maybe Bool
includeTransactionDetails :: Prelude.Maybe Prelude.Bool,
    -- | The output format for the records created on the endpoint. The message
    -- format is @JSON@ (default) or @JSON_UNFORMATTED@ (a single line with no
    -- tab).
    KafkaSettings -> Maybe MessageFormatValue
messageFormat :: Prelude.Maybe MessageFormatValue,
    -- | The maximum size in bytes for records created on the endpoint The
    -- default is 1,000,000.
    KafkaSettings -> Maybe Int
messageMaxBytes :: Prelude.Maybe Prelude.Int,
    -- | Set this optional parameter to @true@ to avoid adding a \'0x\' prefix to
    -- raw data in hexadecimal format. For example, by default, DMS adds a
    -- \'0x\' prefix to the LOB column type in hexadecimal format moving from
    -- an Oracle source to a Kafka target. Use the @NoHexPrefix@ endpoint
    -- setting to enable migration of RAW data type columns without adding the
    -- \'0x\' prefix.
    KafkaSettings -> Maybe Bool
noHexPrefix :: Prelude.Maybe Prelude.Bool,
    -- | Prefixes schema and table names to partition values, when the partition
    -- type is @primary-key-type@. Doing this increases data distribution among
    -- Kafka partitions. For example, suppose that a SysBench schema has
    -- thousands of tables and each table has only limited range for a primary
    -- key. In this case, the same primary key is sent from thousands of tables
    -- to the same partition, which causes throttling. The default is @false@.
    KafkaSettings -> Maybe Bool
partitionIncludeSchemaTable :: Prelude.Maybe Prelude.Bool,
    -- | The secure password you created when you first set up your MSK cluster
    -- to validate a client identity and make an encrypted connection between
    -- server and client using SASL-SSL authentication.
    KafkaSettings -> Maybe (Sensitive Text)
saslPassword :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The secure user name you created when you first set up your MSK cluster
    -- to validate a client identity and make an encrypted connection between
    -- server and client using SASL-SSL authentication.
    KafkaSettings -> Maybe Text
saslUsername :: Prelude.Maybe Prelude.Text,
    -- | Set secure connection to a Kafka target endpoint using Transport Layer
    -- Security (TLS). Options include @ssl-encryption@, @ssl-authentication@,
    -- and @sasl-ssl@. @sasl-ssl@ requires @SaslUsername@ and @SaslPassword@.
    KafkaSettings -> Maybe KafkaSecurityProtocol
securityProtocol :: Prelude.Maybe KafkaSecurityProtocol,
    -- | The Amazon Resource Name (ARN) for the private certificate authority
    -- (CA) cert that DMS uses to securely connect to your Kafka target
    -- endpoint.
    KafkaSettings -> Maybe Text
sslCaCertificateArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the client certificate used to
    -- securely connect to a Kafka target endpoint.
    KafkaSettings -> Maybe Text
sslClientCertificateArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the client private key used to
    -- securely connect to a Kafka target endpoint.
    KafkaSettings -> Maybe Text
sslClientKeyArn :: Prelude.Maybe Prelude.Text,
    -- | The password for the client private key used to securely connect to a
    -- Kafka target endpoint.
    KafkaSettings -> Maybe (Sensitive Text)
sslClientKeyPassword :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The topic to which you migrate the data. If you don\'t specify a topic,
    -- DMS specifies @\"kafka-default-topic\"@ as the migration topic.
    KafkaSettings -> Maybe Text
topic :: Prelude.Maybe Prelude.Text
  }
  deriving (KafkaSettings -> KafkaSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KafkaSettings -> KafkaSettings -> Bool
$c/= :: KafkaSettings -> KafkaSettings -> Bool
== :: KafkaSettings -> KafkaSettings -> Bool
$c== :: KafkaSettings -> KafkaSettings -> Bool
Prelude.Eq, Int -> KafkaSettings -> ShowS
[KafkaSettings] -> ShowS
KafkaSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KafkaSettings] -> ShowS
$cshowList :: [KafkaSettings] -> ShowS
show :: KafkaSettings -> String
$cshow :: KafkaSettings -> String
showsPrec :: Int -> KafkaSettings -> ShowS
$cshowsPrec :: Int -> KafkaSettings -> ShowS
Prelude.Show, forall x. Rep KafkaSettings x -> KafkaSettings
forall x. KafkaSettings -> Rep KafkaSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep KafkaSettings x -> KafkaSettings
$cfrom :: forall x. KafkaSettings -> Rep KafkaSettings x
Prelude.Generic)

-- |
-- Create a value of 'KafkaSettings' 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:
--
-- 'broker', 'kafkaSettings_broker' - A comma-separated list of one or more broker locations in your Kafka
-- cluster that host your Kafka instance. Specify each broker location in
-- the form @ @/@broker-hostname-or-ip@/@:@/@port@/@ @. For example,
-- @\"ec2-12-345-678-901.compute-1.amazonaws.com:2345\"@. For more
-- information and examples of specifying a list of broker locations, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kafka.html Using Apache Kafka as a target for Database Migration Service>
-- in the /Database Migration Service User Guide/.
--
-- 'includeControlDetails', 'kafkaSettings_includeControlDetails' - Shows detailed control information for table definition, column
-- definition, and table and column changes in the Kafka message output.
-- The default is @false@.
--
-- 'includeNullAndEmpty', 'kafkaSettings_includeNullAndEmpty' - Include NULL and empty columns for records migrated to the endpoint. The
-- default is @false@.
--
-- 'includePartitionValue', 'kafkaSettings_includePartitionValue' - Shows the partition value within the Kafka message output unless the
-- partition type is @schema-table-type@. The default is @false@.
--
-- 'includeTableAlterOperations', 'kafkaSettings_includeTableAlterOperations' - Includes any data definition language (DDL) operations that change the
-- table in the control data, such as @rename-table@, @drop-table@,
-- @add-column@, @drop-column@, and @rename-column@. The default is
-- @false@.
--
-- 'includeTransactionDetails', 'kafkaSettings_includeTransactionDetails' - Provides detailed transaction information from the source database. This
-- information includes a commit timestamp, a log position, and values for
-- @transaction_id@, previous @transaction_id@, and @transaction_record_id@
-- (the record offset within a transaction). The default is @false@.
--
-- 'messageFormat', 'kafkaSettings_messageFormat' - The output format for the records created on the endpoint. The message
-- format is @JSON@ (default) or @JSON_UNFORMATTED@ (a single line with no
-- tab).
--
-- 'messageMaxBytes', 'kafkaSettings_messageMaxBytes' - The maximum size in bytes for records created on the endpoint The
-- default is 1,000,000.
--
-- 'noHexPrefix', 'kafkaSettings_noHexPrefix' - Set this optional parameter to @true@ to avoid adding a \'0x\' prefix to
-- raw data in hexadecimal format. For example, by default, DMS adds a
-- \'0x\' prefix to the LOB column type in hexadecimal format moving from
-- an Oracle source to a Kafka target. Use the @NoHexPrefix@ endpoint
-- setting to enable migration of RAW data type columns without adding the
-- \'0x\' prefix.
--
-- 'partitionIncludeSchemaTable', 'kafkaSettings_partitionIncludeSchemaTable' - Prefixes schema and table names to partition values, when the partition
-- type is @primary-key-type@. Doing this increases data distribution among
-- Kafka partitions. For example, suppose that a SysBench schema has
-- thousands of tables and each table has only limited range for a primary
-- key. In this case, the same primary key is sent from thousands of tables
-- to the same partition, which causes throttling. The default is @false@.
--
-- 'saslPassword', 'kafkaSettings_saslPassword' - The secure password you created when you first set up your MSK cluster
-- to validate a client identity and make an encrypted connection between
-- server and client using SASL-SSL authentication.
--
-- 'saslUsername', 'kafkaSettings_saslUsername' - The secure user name you created when you first set up your MSK cluster
-- to validate a client identity and make an encrypted connection between
-- server and client using SASL-SSL authentication.
--
-- 'securityProtocol', 'kafkaSettings_securityProtocol' - Set secure connection to a Kafka target endpoint using Transport Layer
-- Security (TLS). Options include @ssl-encryption@, @ssl-authentication@,
-- and @sasl-ssl@. @sasl-ssl@ requires @SaslUsername@ and @SaslPassword@.
--
-- 'sslCaCertificateArn', 'kafkaSettings_sslCaCertificateArn' - The Amazon Resource Name (ARN) for the private certificate authority
-- (CA) cert that DMS uses to securely connect to your Kafka target
-- endpoint.
--
-- 'sslClientCertificateArn', 'kafkaSettings_sslClientCertificateArn' - The Amazon Resource Name (ARN) of the client certificate used to
-- securely connect to a Kafka target endpoint.
--
-- 'sslClientKeyArn', 'kafkaSettings_sslClientKeyArn' - The Amazon Resource Name (ARN) for the client private key used to
-- securely connect to a Kafka target endpoint.
--
-- 'sslClientKeyPassword', 'kafkaSettings_sslClientKeyPassword' - The password for the client private key used to securely connect to a
-- Kafka target endpoint.
--
-- 'topic', 'kafkaSettings_topic' - The topic to which you migrate the data. If you don\'t specify a topic,
-- DMS specifies @\"kafka-default-topic\"@ as the migration topic.
newKafkaSettings ::
  KafkaSettings
newKafkaSettings :: KafkaSettings
newKafkaSettings =
  KafkaSettings'
    { $sel:broker:KafkaSettings' :: Maybe Text
broker = forall a. Maybe a
Prelude.Nothing,
      $sel:includeControlDetails:KafkaSettings' :: Maybe Bool
includeControlDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:includeNullAndEmpty:KafkaSettings' :: Maybe Bool
includeNullAndEmpty = forall a. Maybe a
Prelude.Nothing,
      $sel:includePartitionValue:KafkaSettings' :: Maybe Bool
includePartitionValue = forall a. Maybe a
Prelude.Nothing,
      $sel:includeTableAlterOperations:KafkaSettings' :: Maybe Bool
includeTableAlterOperations = forall a. Maybe a
Prelude.Nothing,
      $sel:includeTransactionDetails:KafkaSettings' :: Maybe Bool
includeTransactionDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:messageFormat:KafkaSettings' :: Maybe MessageFormatValue
messageFormat = forall a. Maybe a
Prelude.Nothing,
      $sel:messageMaxBytes:KafkaSettings' :: Maybe Int
messageMaxBytes = forall a. Maybe a
Prelude.Nothing,
      $sel:noHexPrefix:KafkaSettings' :: Maybe Bool
noHexPrefix = forall a. Maybe a
Prelude.Nothing,
      $sel:partitionIncludeSchemaTable:KafkaSettings' :: Maybe Bool
partitionIncludeSchemaTable = forall a. Maybe a
Prelude.Nothing,
      $sel:saslPassword:KafkaSettings' :: Maybe (Sensitive Text)
saslPassword = forall a. Maybe a
Prelude.Nothing,
      $sel:saslUsername:KafkaSettings' :: Maybe Text
saslUsername = forall a. Maybe a
Prelude.Nothing,
      $sel:securityProtocol:KafkaSettings' :: Maybe KafkaSecurityProtocol
securityProtocol = forall a. Maybe a
Prelude.Nothing,
      $sel:sslCaCertificateArn:KafkaSettings' :: Maybe Text
sslCaCertificateArn = forall a. Maybe a
Prelude.Nothing,
      $sel:sslClientCertificateArn:KafkaSettings' :: Maybe Text
sslClientCertificateArn = forall a. Maybe a
Prelude.Nothing,
      $sel:sslClientKeyArn:KafkaSettings' :: Maybe Text
sslClientKeyArn = forall a. Maybe a
Prelude.Nothing,
      $sel:sslClientKeyPassword:KafkaSettings' :: Maybe (Sensitive Text)
sslClientKeyPassword = forall a. Maybe a
Prelude.Nothing,
      $sel:topic:KafkaSettings' :: Maybe Text
topic = forall a. Maybe a
Prelude.Nothing
    }

-- | A comma-separated list of one or more broker locations in your Kafka
-- cluster that host your Kafka instance. Specify each broker location in
-- the form @ @/@broker-hostname-or-ip@/@:@/@port@/@ @. For example,
-- @\"ec2-12-345-678-901.compute-1.amazonaws.com:2345\"@. For more
-- information and examples of specifying a list of broker locations, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kafka.html Using Apache Kafka as a target for Database Migration Service>
-- in the /Database Migration Service User Guide/.
kafkaSettings_broker :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Text)
kafkaSettings_broker :: Lens' KafkaSettings (Maybe Text)
kafkaSettings_broker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe Text
broker :: Maybe Text
$sel:broker:KafkaSettings' :: KafkaSettings -> Maybe Text
broker} -> Maybe Text
broker) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe Text
a -> KafkaSettings
s {$sel:broker:KafkaSettings' :: Maybe Text
broker = Maybe Text
a} :: KafkaSettings)

-- | Shows detailed control information for table definition, column
-- definition, and table and column changes in the Kafka message output.
-- The default is @false@.
kafkaSettings_includeControlDetails :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Bool)
kafkaSettings_includeControlDetails :: Lens' KafkaSettings (Maybe Bool)
kafkaSettings_includeControlDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe Bool
includeControlDetails :: Maybe Bool
$sel:includeControlDetails:KafkaSettings' :: KafkaSettings -> Maybe Bool
includeControlDetails} -> Maybe Bool
includeControlDetails) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe Bool
a -> KafkaSettings
s {$sel:includeControlDetails:KafkaSettings' :: Maybe Bool
includeControlDetails = Maybe Bool
a} :: KafkaSettings)

-- | Include NULL and empty columns for records migrated to the endpoint. The
-- default is @false@.
kafkaSettings_includeNullAndEmpty :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Bool)
kafkaSettings_includeNullAndEmpty :: Lens' KafkaSettings (Maybe Bool)
kafkaSettings_includeNullAndEmpty = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe Bool
includeNullAndEmpty :: Maybe Bool
$sel:includeNullAndEmpty:KafkaSettings' :: KafkaSettings -> Maybe Bool
includeNullAndEmpty} -> Maybe Bool
includeNullAndEmpty) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe Bool
a -> KafkaSettings
s {$sel:includeNullAndEmpty:KafkaSettings' :: Maybe Bool
includeNullAndEmpty = Maybe Bool
a} :: KafkaSettings)

-- | Shows the partition value within the Kafka message output unless the
-- partition type is @schema-table-type@. The default is @false@.
kafkaSettings_includePartitionValue :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Bool)
kafkaSettings_includePartitionValue :: Lens' KafkaSettings (Maybe Bool)
kafkaSettings_includePartitionValue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe Bool
includePartitionValue :: Maybe Bool
$sel:includePartitionValue:KafkaSettings' :: KafkaSettings -> Maybe Bool
includePartitionValue} -> Maybe Bool
includePartitionValue) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe Bool
a -> KafkaSettings
s {$sel:includePartitionValue:KafkaSettings' :: Maybe Bool
includePartitionValue = Maybe Bool
a} :: KafkaSettings)

-- | Includes any data definition language (DDL) operations that change the
-- table in the control data, such as @rename-table@, @drop-table@,
-- @add-column@, @drop-column@, and @rename-column@. The default is
-- @false@.
kafkaSettings_includeTableAlterOperations :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Bool)
kafkaSettings_includeTableAlterOperations :: Lens' KafkaSettings (Maybe Bool)
kafkaSettings_includeTableAlterOperations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe Bool
includeTableAlterOperations :: Maybe Bool
$sel:includeTableAlterOperations:KafkaSettings' :: KafkaSettings -> Maybe Bool
includeTableAlterOperations} -> Maybe Bool
includeTableAlterOperations) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe Bool
a -> KafkaSettings
s {$sel:includeTableAlterOperations:KafkaSettings' :: Maybe Bool
includeTableAlterOperations = Maybe Bool
a} :: KafkaSettings)

-- | Provides detailed transaction information from the source database. This
-- information includes a commit timestamp, a log position, and values for
-- @transaction_id@, previous @transaction_id@, and @transaction_record_id@
-- (the record offset within a transaction). The default is @false@.
kafkaSettings_includeTransactionDetails :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Bool)
kafkaSettings_includeTransactionDetails :: Lens' KafkaSettings (Maybe Bool)
kafkaSettings_includeTransactionDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe Bool
includeTransactionDetails :: Maybe Bool
$sel:includeTransactionDetails:KafkaSettings' :: KafkaSettings -> Maybe Bool
includeTransactionDetails} -> Maybe Bool
includeTransactionDetails) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe Bool
a -> KafkaSettings
s {$sel:includeTransactionDetails:KafkaSettings' :: Maybe Bool
includeTransactionDetails = Maybe Bool
a} :: KafkaSettings)

-- | The output format for the records created on the endpoint. The message
-- format is @JSON@ (default) or @JSON_UNFORMATTED@ (a single line with no
-- tab).
kafkaSettings_messageFormat :: Lens.Lens' KafkaSettings (Prelude.Maybe MessageFormatValue)
kafkaSettings_messageFormat :: Lens' KafkaSettings (Maybe MessageFormatValue)
kafkaSettings_messageFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe MessageFormatValue
messageFormat :: Maybe MessageFormatValue
$sel:messageFormat:KafkaSettings' :: KafkaSettings -> Maybe MessageFormatValue
messageFormat} -> Maybe MessageFormatValue
messageFormat) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe MessageFormatValue
a -> KafkaSettings
s {$sel:messageFormat:KafkaSettings' :: Maybe MessageFormatValue
messageFormat = Maybe MessageFormatValue
a} :: KafkaSettings)

-- | The maximum size in bytes for records created on the endpoint The
-- default is 1,000,000.
kafkaSettings_messageMaxBytes :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Int)
kafkaSettings_messageMaxBytes :: Lens' KafkaSettings (Maybe Int)
kafkaSettings_messageMaxBytes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe Int
messageMaxBytes :: Maybe Int
$sel:messageMaxBytes:KafkaSettings' :: KafkaSettings -> Maybe Int
messageMaxBytes} -> Maybe Int
messageMaxBytes) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe Int
a -> KafkaSettings
s {$sel:messageMaxBytes:KafkaSettings' :: Maybe Int
messageMaxBytes = Maybe Int
a} :: KafkaSettings)

-- | Set this optional parameter to @true@ to avoid adding a \'0x\' prefix to
-- raw data in hexadecimal format. For example, by default, DMS adds a
-- \'0x\' prefix to the LOB column type in hexadecimal format moving from
-- an Oracle source to a Kafka target. Use the @NoHexPrefix@ endpoint
-- setting to enable migration of RAW data type columns without adding the
-- \'0x\' prefix.
kafkaSettings_noHexPrefix :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Bool)
kafkaSettings_noHexPrefix :: Lens' KafkaSettings (Maybe Bool)
kafkaSettings_noHexPrefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe Bool
noHexPrefix :: Maybe Bool
$sel:noHexPrefix:KafkaSettings' :: KafkaSettings -> Maybe Bool
noHexPrefix} -> Maybe Bool
noHexPrefix) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe Bool
a -> KafkaSettings
s {$sel:noHexPrefix:KafkaSettings' :: Maybe Bool
noHexPrefix = Maybe Bool
a} :: KafkaSettings)

-- | Prefixes schema and table names to partition values, when the partition
-- type is @primary-key-type@. Doing this increases data distribution among
-- Kafka partitions. For example, suppose that a SysBench schema has
-- thousands of tables and each table has only limited range for a primary
-- key. In this case, the same primary key is sent from thousands of tables
-- to the same partition, which causes throttling. The default is @false@.
kafkaSettings_partitionIncludeSchemaTable :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Bool)
kafkaSettings_partitionIncludeSchemaTable :: Lens' KafkaSettings (Maybe Bool)
kafkaSettings_partitionIncludeSchemaTable = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe Bool
partitionIncludeSchemaTable :: Maybe Bool
$sel:partitionIncludeSchemaTable:KafkaSettings' :: KafkaSettings -> Maybe Bool
partitionIncludeSchemaTable} -> Maybe Bool
partitionIncludeSchemaTable) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe Bool
a -> KafkaSettings
s {$sel:partitionIncludeSchemaTable:KafkaSettings' :: Maybe Bool
partitionIncludeSchemaTable = Maybe Bool
a} :: KafkaSettings)

-- | The secure password you created when you first set up your MSK cluster
-- to validate a client identity and make an encrypted connection between
-- server and client using SASL-SSL authentication.
kafkaSettings_saslPassword :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Text)
kafkaSettings_saslPassword :: Lens' KafkaSettings (Maybe Text)
kafkaSettings_saslPassword = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe (Sensitive Text)
saslPassword :: Maybe (Sensitive Text)
$sel:saslPassword:KafkaSettings' :: KafkaSettings -> Maybe (Sensitive Text)
saslPassword} -> Maybe (Sensitive Text)
saslPassword) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe (Sensitive Text)
a -> KafkaSettings
s {$sel:saslPassword:KafkaSettings' :: Maybe (Sensitive Text)
saslPassword = Maybe (Sensitive Text)
a} :: KafkaSettings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The secure user name you created when you first set up your MSK cluster
-- to validate a client identity and make an encrypted connection between
-- server and client using SASL-SSL authentication.
kafkaSettings_saslUsername :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Text)
kafkaSettings_saslUsername :: Lens' KafkaSettings (Maybe Text)
kafkaSettings_saslUsername = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe Text
saslUsername :: Maybe Text
$sel:saslUsername:KafkaSettings' :: KafkaSettings -> Maybe Text
saslUsername} -> Maybe Text
saslUsername) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe Text
a -> KafkaSettings
s {$sel:saslUsername:KafkaSettings' :: Maybe Text
saslUsername = Maybe Text
a} :: KafkaSettings)

-- | Set secure connection to a Kafka target endpoint using Transport Layer
-- Security (TLS). Options include @ssl-encryption@, @ssl-authentication@,
-- and @sasl-ssl@. @sasl-ssl@ requires @SaslUsername@ and @SaslPassword@.
kafkaSettings_securityProtocol :: Lens.Lens' KafkaSettings (Prelude.Maybe KafkaSecurityProtocol)
kafkaSettings_securityProtocol :: Lens' KafkaSettings (Maybe KafkaSecurityProtocol)
kafkaSettings_securityProtocol = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe KafkaSecurityProtocol
securityProtocol :: Maybe KafkaSecurityProtocol
$sel:securityProtocol:KafkaSettings' :: KafkaSettings -> Maybe KafkaSecurityProtocol
securityProtocol} -> Maybe KafkaSecurityProtocol
securityProtocol) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe KafkaSecurityProtocol
a -> KafkaSettings
s {$sel:securityProtocol:KafkaSettings' :: Maybe KafkaSecurityProtocol
securityProtocol = Maybe KafkaSecurityProtocol
a} :: KafkaSettings)

-- | The Amazon Resource Name (ARN) for the private certificate authority
-- (CA) cert that DMS uses to securely connect to your Kafka target
-- endpoint.
kafkaSettings_sslCaCertificateArn :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Text)
kafkaSettings_sslCaCertificateArn :: Lens' KafkaSettings (Maybe Text)
kafkaSettings_sslCaCertificateArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe Text
sslCaCertificateArn :: Maybe Text
$sel:sslCaCertificateArn:KafkaSettings' :: KafkaSettings -> Maybe Text
sslCaCertificateArn} -> Maybe Text
sslCaCertificateArn) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe Text
a -> KafkaSettings
s {$sel:sslCaCertificateArn:KafkaSettings' :: Maybe Text
sslCaCertificateArn = Maybe Text
a} :: KafkaSettings)

-- | The Amazon Resource Name (ARN) of the client certificate used to
-- securely connect to a Kafka target endpoint.
kafkaSettings_sslClientCertificateArn :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Text)
kafkaSettings_sslClientCertificateArn :: Lens' KafkaSettings (Maybe Text)
kafkaSettings_sslClientCertificateArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe Text
sslClientCertificateArn :: Maybe Text
$sel:sslClientCertificateArn:KafkaSettings' :: KafkaSettings -> Maybe Text
sslClientCertificateArn} -> Maybe Text
sslClientCertificateArn) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe Text
a -> KafkaSettings
s {$sel:sslClientCertificateArn:KafkaSettings' :: Maybe Text
sslClientCertificateArn = Maybe Text
a} :: KafkaSettings)

-- | The Amazon Resource Name (ARN) for the client private key used to
-- securely connect to a Kafka target endpoint.
kafkaSettings_sslClientKeyArn :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Text)
kafkaSettings_sslClientKeyArn :: Lens' KafkaSettings (Maybe Text)
kafkaSettings_sslClientKeyArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe Text
sslClientKeyArn :: Maybe Text
$sel:sslClientKeyArn:KafkaSettings' :: KafkaSettings -> Maybe Text
sslClientKeyArn} -> Maybe Text
sslClientKeyArn) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe Text
a -> KafkaSettings
s {$sel:sslClientKeyArn:KafkaSettings' :: Maybe Text
sslClientKeyArn = Maybe Text
a} :: KafkaSettings)

-- | The password for the client private key used to securely connect to a
-- Kafka target endpoint.
kafkaSettings_sslClientKeyPassword :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Text)
kafkaSettings_sslClientKeyPassword :: Lens' KafkaSettings (Maybe Text)
kafkaSettings_sslClientKeyPassword = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe (Sensitive Text)
sslClientKeyPassword :: Maybe (Sensitive Text)
$sel:sslClientKeyPassword:KafkaSettings' :: KafkaSettings -> Maybe (Sensitive Text)
sslClientKeyPassword} -> Maybe (Sensitive Text)
sslClientKeyPassword) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe (Sensitive Text)
a -> KafkaSettings
s {$sel:sslClientKeyPassword:KafkaSettings' :: Maybe (Sensitive Text)
sslClientKeyPassword = Maybe (Sensitive Text)
a} :: KafkaSettings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The topic to which you migrate the data. If you don\'t specify a topic,
-- DMS specifies @\"kafka-default-topic\"@ as the migration topic.
kafkaSettings_topic :: Lens.Lens' KafkaSettings (Prelude.Maybe Prelude.Text)
kafkaSettings_topic :: Lens' KafkaSettings (Maybe Text)
kafkaSettings_topic = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KafkaSettings' {Maybe Text
topic :: Maybe Text
$sel:topic:KafkaSettings' :: KafkaSettings -> Maybe Text
topic} -> Maybe Text
topic) (\s :: KafkaSettings
s@KafkaSettings' {} Maybe Text
a -> KafkaSettings
s {$sel:topic:KafkaSettings' :: Maybe Text
topic = Maybe Text
a} :: KafkaSettings)

instance Data.FromJSON KafkaSettings where
  parseJSON :: Value -> Parser KafkaSettings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"KafkaSettings"
      ( \Object
x ->
          Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe MessageFormatValue
-> Maybe Int
-> Maybe Bool
-> Maybe Bool
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe KafkaSecurityProtocol
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Text
-> KafkaSettings
KafkaSettings'
            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
"Broker")
            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
"IncludeControlDetails")
            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
"IncludeNullAndEmpty")
            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
"IncludePartitionValue")
            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
"IncludeTableAlterOperations")
            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
"IncludeTransactionDetails")
            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
"MessageFormat")
            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
"MessageMaxBytes")
            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
"NoHexPrefix")
            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
"PartitionIncludeSchemaTable")
            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
"SaslPassword")
            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
"SaslUsername")
            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
"SecurityProtocol")
            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
"SslCaCertificateArn")
            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
"SslClientCertificateArn")
            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
"SslClientKeyArn")
            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
"SslClientKeyPassword")
            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
"Topic")
      )

instance Prelude.Hashable KafkaSettings where
  hashWithSalt :: Int -> KafkaSettings -> Int
hashWithSalt Int
_salt KafkaSettings' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe KafkaSecurityProtocol
Maybe MessageFormatValue
topic :: Maybe Text
sslClientKeyPassword :: Maybe (Sensitive Text)
sslClientKeyArn :: Maybe Text
sslClientCertificateArn :: Maybe Text
sslCaCertificateArn :: Maybe Text
securityProtocol :: Maybe KafkaSecurityProtocol
saslUsername :: Maybe Text
saslPassword :: Maybe (Sensitive Text)
partitionIncludeSchemaTable :: Maybe Bool
noHexPrefix :: Maybe Bool
messageMaxBytes :: Maybe Int
messageFormat :: Maybe MessageFormatValue
includeTransactionDetails :: Maybe Bool
includeTableAlterOperations :: Maybe Bool
includePartitionValue :: Maybe Bool
includeNullAndEmpty :: Maybe Bool
includeControlDetails :: Maybe Bool
broker :: Maybe Text
$sel:topic:KafkaSettings' :: KafkaSettings -> Maybe Text
$sel:sslClientKeyPassword:KafkaSettings' :: KafkaSettings -> Maybe (Sensitive Text)
$sel:sslClientKeyArn:KafkaSettings' :: KafkaSettings -> Maybe Text
$sel:sslClientCertificateArn:KafkaSettings' :: KafkaSettings -> Maybe Text
$sel:sslCaCertificateArn:KafkaSettings' :: KafkaSettings -> Maybe Text
$sel:securityProtocol:KafkaSettings' :: KafkaSettings -> Maybe KafkaSecurityProtocol
$sel:saslUsername:KafkaSettings' :: KafkaSettings -> Maybe Text
$sel:saslPassword:KafkaSettings' :: KafkaSettings -> Maybe (Sensitive Text)
$sel:partitionIncludeSchemaTable:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:noHexPrefix:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:messageMaxBytes:KafkaSettings' :: KafkaSettings -> Maybe Int
$sel:messageFormat:KafkaSettings' :: KafkaSettings -> Maybe MessageFormatValue
$sel:includeTransactionDetails:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:includeTableAlterOperations:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:includePartitionValue:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:includeNullAndEmpty:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:includeControlDetails:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:broker:KafkaSettings' :: KafkaSettings -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
broker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
includeControlDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
includeNullAndEmpty
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
includePartitionValue
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
includeTableAlterOperations
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
includeTransactionDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MessageFormatValue
messageFormat
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
messageMaxBytes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
noHexPrefix
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
partitionIncludeSchemaTable
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
saslPassword
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
saslUsername
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe KafkaSecurityProtocol
securityProtocol
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sslCaCertificateArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sslClientCertificateArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sslClientKeyArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
sslClientKeyPassword
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
topic

instance Prelude.NFData KafkaSettings where
  rnf :: KafkaSettings -> ()
rnf KafkaSettings' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe KafkaSecurityProtocol
Maybe MessageFormatValue
topic :: Maybe Text
sslClientKeyPassword :: Maybe (Sensitive Text)
sslClientKeyArn :: Maybe Text
sslClientCertificateArn :: Maybe Text
sslCaCertificateArn :: Maybe Text
securityProtocol :: Maybe KafkaSecurityProtocol
saslUsername :: Maybe Text
saslPassword :: Maybe (Sensitive Text)
partitionIncludeSchemaTable :: Maybe Bool
noHexPrefix :: Maybe Bool
messageMaxBytes :: Maybe Int
messageFormat :: Maybe MessageFormatValue
includeTransactionDetails :: Maybe Bool
includeTableAlterOperations :: Maybe Bool
includePartitionValue :: Maybe Bool
includeNullAndEmpty :: Maybe Bool
includeControlDetails :: Maybe Bool
broker :: Maybe Text
$sel:topic:KafkaSettings' :: KafkaSettings -> Maybe Text
$sel:sslClientKeyPassword:KafkaSettings' :: KafkaSettings -> Maybe (Sensitive Text)
$sel:sslClientKeyArn:KafkaSettings' :: KafkaSettings -> Maybe Text
$sel:sslClientCertificateArn:KafkaSettings' :: KafkaSettings -> Maybe Text
$sel:sslCaCertificateArn:KafkaSettings' :: KafkaSettings -> Maybe Text
$sel:securityProtocol:KafkaSettings' :: KafkaSettings -> Maybe KafkaSecurityProtocol
$sel:saslUsername:KafkaSettings' :: KafkaSettings -> Maybe Text
$sel:saslPassword:KafkaSettings' :: KafkaSettings -> Maybe (Sensitive Text)
$sel:partitionIncludeSchemaTable:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:noHexPrefix:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:messageMaxBytes:KafkaSettings' :: KafkaSettings -> Maybe Int
$sel:messageFormat:KafkaSettings' :: KafkaSettings -> Maybe MessageFormatValue
$sel:includeTransactionDetails:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:includeTableAlterOperations:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:includePartitionValue:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:includeNullAndEmpty:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:includeControlDetails:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:broker:KafkaSettings' :: KafkaSettings -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
broker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
includeControlDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
includeNullAndEmpty
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
includePartitionValue
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
includeTableAlterOperations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
includeTransactionDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MessageFormatValue
messageFormat
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
messageMaxBytes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
noHexPrefix
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
partitionIncludeSchemaTable
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
saslPassword
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
saslUsername
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe KafkaSecurityProtocol
securityProtocol
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sslCaCertificateArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sslClientCertificateArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sslClientKeyArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
sslClientKeyPassword
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
topic

instance Data.ToJSON KafkaSettings where
  toJSON :: KafkaSettings -> Value
toJSON KafkaSettings' {Maybe Bool
Maybe Int
Maybe Text
Maybe (Sensitive Text)
Maybe KafkaSecurityProtocol
Maybe MessageFormatValue
topic :: Maybe Text
sslClientKeyPassword :: Maybe (Sensitive Text)
sslClientKeyArn :: Maybe Text
sslClientCertificateArn :: Maybe Text
sslCaCertificateArn :: Maybe Text
securityProtocol :: Maybe KafkaSecurityProtocol
saslUsername :: Maybe Text
saslPassword :: Maybe (Sensitive Text)
partitionIncludeSchemaTable :: Maybe Bool
noHexPrefix :: Maybe Bool
messageMaxBytes :: Maybe Int
messageFormat :: Maybe MessageFormatValue
includeTransactionDetails :: Maybe Bool
includeTableAlterOperations :: Maybe Bool
includePartitionValue :: Maybe Bool
includeNullAndEmpty :: Maybe Bool
includeControlDetails :: Maybe Bool
broker :: Maybe Text
$sel:topic:KafkaSettings' :: KafkaSettings -> Maybe Text
$sel:sslClientKeyPassword:KafkaSettings' :: KafkaSettings -> Maybe (Sensitive Text)
$sel:sslClientKeyArn:KafkaSettings' :: KafkaSettings -> Maybe Text
$sel:sslClientCertificateArn:KafkaSettings' :: KafkaSettings -> Maybe Text
$sel:sslCaCertificateArn:KafkaSettings' :: KafkaSettings -> Maybe Text
$sel:securityProtocol:KafkaSettings' :: KafkaSettings -> Maybe KafkaSecurityProtocol
$sel:saslUsername:KafkaSettings' :: KafkaSettings -> Maybe Text
$sel:saslPassword:KafkaSettings' :: KafkaSettings -> Maybe (Sensitive Text)
$sel:partitionIncludeSchemaTable:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:noHexPrefix:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:messageMaxBytes:KafkaSettings' :: KafkaSettings -> Maybe Int
$sel:messageFormat:KafkaSettings' :: KafkaSettings -> Maybe MessageFormatValue
$sel:includeTransactionDetails:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:includeTableAlterOperations:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:includePartitionValue:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:includeNullAndEmpty:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:includeControlDetails:KafkaSettings' :: KafkaSettings -> Maybe Bool
$sel:broker:KafkaSettings' :: KafkaSettings -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Broker" 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
broker,
            (Key
"IncludeControlDetails" 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
includeControlDetails,
            (Key
"IncludeNullAndEmpty" 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
includeNullAndEmpty,
            (Key
"IncludePartitionValue" 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
includePartitionValue,
            (Key
"IncludeTableAlterOperations" 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
includeTableAlterOperations,
            (Key
"IncludeTransactionDetails" 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
includeTransactionDetails,
            (Key
"MessageFormat" 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 MessageFormatValue
messageFormat,
            (Key
"MessageMaxBytes" 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 Int
messageMaxBytes,
            (Key
"NoHexPrefix" 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
noHexPrefix,
            (Key
"PartitionIncludeSchemaTable" 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
partitionIncludeSchemaTable,
            (Key
"SaslPassword" 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 (Sensitive Text)
saslPassword,
            (Key
"SaslUsername" 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
saslUsername,
            (Key
"SecurityProtocol" 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 KafkaSecurityProtocol
securityProtocol,
            (Key
"SslCaCertificateArn" 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
sslCaCertificateArn,
            (Key
"SslClientCertificateArn" 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
sslClientCertificateArn,
            (Key
"SslClientKeyArn" 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
sslClientKeyArn,
            (Key
"SslClientKeyPassword" 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 (Sensitive Text)
sslClientKeyPassword,
            (Key
"Topic" 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
topic
          ]
      )