{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DMS.Types.KafkaSettings where

import qualified Amazonka.Core as Core
import Amazonka.DMS.Types.KafkaSecurityProtocol
import Amazonka.DMS.Types.MessageFormatValue
import qualified Amazonka.Lens as Lens
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'
  { -- | 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,
    -- | 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,
    -- | 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,
    -- | 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 private certificate authority
    -- (CA) cert that DMS uses to securely connect to your Kafka target
    -- endpoint.
    KafkaSettings -> Maybe Text
sslCaCertificateArn :: Prelude.Maybe Prelude.Text,
    -- | 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 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,
    -- | 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,
    -- | 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,
    -- | 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 (Core.Sensitive 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 (Core.Sensitive Prelude.Text),
    -- | 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,
    -- | 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,
    -- | 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 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,
    -- | 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,
    -- | 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,
    -- | Include NULL and empty columns for records migrated to the endpoint. The
    -- default is @false@.
    KafkaSettings -> Maybe Bool
includeNullAndEmpty :: Prelude.Maybe Prelude.Bool
  }
  deriving (KafkaSettings -> KafkaSettings -> Bool
(KafkaSettings -> KafkaSettings -> Bool)
-> (KafkaSettings -> KafkaSettings -> Bool) -> Eq KafkaSettings
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
(Int -> KafkaSettings -> ShowS)
-> (KafkaSettings -> String)
-> ([KafkaSettings] -> ShowS)
-> Show KafkaSettings
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. KafkaSettings -> Rep KafkaSettings x)
-> (forall x. Rep KafkaSettings x -> KafkaSettings)
-> Generic KafkaSettings
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:
--
-- 'sslClientKeyArn', 'kafkaSettings_sslClientKeyArn' - The Amazon Resource Name (ARN) for the client private key used to
-- securely connect to a Kafka target endpoint.
--
-- '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@.
--
-- '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@.
--
-- 'sslClientCertificateArn', 'kafkaSettings_sslClientCertificateArn' - The Amazon Resource Name (ARN) of the client certificate used to
-- securely connect to a Kafka target endpoint.
--
-- '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.
--
-- '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@.
--
-- '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.
--
-- '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@.
--
-- '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.
--
-- '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.
--
-- 'sslClientKeyPassword', 'kafkaSettings_sslClientKeyPassword' - The password for the client private key used to securely connect to a
-- Kafka target endpoint.
--
-- 'includePartitionValue', 'kafkaSettings_includePartitionValue' - Shows the partition value within the Kafka message output unless the
-- partition type is @schema-table-type@. 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).
--
-- '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@.
--
-- '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.
--
-- '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/.
--
-- 'messageMaxBytes', 'kafkaSettings_messageMaxBytes' - The maximum size in bytes for records created on the endpoint The
-- default is 1,000,000.
--
-- 'includeNullAndEmpty', 'kafkaSettings_includeNullAndEmpty' - Include NULL and empty columns for records migrated to the endpoint. The
-- default is @false@.
newKafkaSettings ::
  KafkaSettings
newKafkaSettings :: KafkaSettings
newKafkaSettings =
  KafkaSettings' :: Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe MessageFormatValue
-> Maybe KafkaSecurityProtocol
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> KafkaSettings
KafkaSettings'
    { $sel:sslClientKeyArn:KafkaSettings' :: Maybe Text
sslClientKeyArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:includeTransactionDetails:KafkaSettings' :: Maybe Bool
includeTransactionDetails = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:includeTableAlterOperations:KafkaSettings' :: Maybe Bool
includeTableAlterOperations = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:sslClientCertificateArn:KafkaSettings' :: Maybe Text
sslClientCertificateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sslCaCertificateArn:KafkaSettings' :: Maybe Text
sslCaCertificateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:partitionIncludeSchemaTable:KafkaSettings' :: Maybe Bool
partitionIncludeSchemaTable = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:topic:KafkaSettings' :: Maybe Text
topic = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:includeControlDetails:KafkaSettings' :: Maybe Bool
includeControlDetails = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:noHexPrefix:KafkaSettings' :: Maybe Bool
noHexPrefix = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:saslPassword:KafkaSettings' :: Maybe (Sensitive Text)
saslPassword = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:sslClientKeyPassword:KafkaSettings' :: Maybe (Sensitive Text)
sslClientKeyPassword = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:includePartitionValue:KafkaSettings' :: Maybe Bool
includePartitionValue = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:messageFormat:KafkaSettings' :: Maybe MessageFormatValue
messageFormat = Maybe MessageFormatValue
forall a. Maybe a
Prelude.Nothing,
      $sel:securityProtocol:KafkaSettings' :: Maybe KafkaSecurityProtocol
securityProtocol = Maybe KafkaSecurityProtocol
forall a. Maybe a
Prelude.Nothing,
      $sel:saslUsername:KafkaSettings' :: Maybe Text
saslUsername = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:broker:KafkaSettings' :: Maybe Text
broker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:messageMaxBytes:KafkaSettings' :: Maybe Int
messageMaxBytes = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:includeNullAndEmpty:KafkaSettings' :: Maybe Bool
includeNullAndEmpty = Maybe Bool
forall a. Maybe a
Prelude.Nothing
    }

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_sslClientKeyArn = (KafkaSettings -> Maybe Text)
-> (KafkaSettings -> Maybe Text -> KafkaSettings)
-> Lens KafkaSettings KafkaSettings (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_includeTransactionDetails = (KafkaSettings -> Maybe Bool)
-> (KafkaSettings -> Maybe Bool -> KafkaSettings)
-> Lens KafkaSettings KafkaSettings (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_includeTableAlterOperations = (KafkaSettings -> Maybe Bool)
-> (KafkaSettings -> Maybe Bool -> KafkaSettings)
-> Lens KafkaSettings KafkaSettings (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_sslClientCertificateArn = (KafkaSettings -> Maybe Text)
-> (KafkaSettings -> Maybe Text -> KafkaSettings)
-> Lens KafkaSettings KafkaSettings (Maybe Text) (Maybe Text)
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 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 :: (Maybe Text -> f (Maybe Text)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_sslCaCertificateArn = (KafkaSettings -> Maybe Text)
-> (KafkaSettings -> Maybe Text -> KafkaSettings)
-> Lens KafkaSettings KafkaSettings (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_partitionIncludeSchemaTable = (KafkaSettings -> Maybe Bool)
-> (KafkaSettings -> Maybe Bool -> KafkaSettings)
-> Lens KafkaSettings KafkaSettings (Maybe Bool) (Maybe Bool)
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 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 :: (Maybe Text -> f (Maybe Text)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_topic = (KafkaSettings -> Maybe Text)
-> (KafkaSettings -> Maybe Text -> KafkaSettings)
-> Lens KafkaSettings KafkaSettings (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_includeControlDetails = (KafkaSettings -> Maybe Bool)
-> (KafkaSettings -> Maybe Bool -> KafkaSettings)
-> Lens KafkaSettings KafkaSettings (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_noHexPrefix = (KafkaSettings -> Maybe Bool)
-> (KafkaSettings -> Maybe Bool -> KafkaSettings)
-> Lens KafkaSettings KafkaSettings (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_saslPassword = (KafkaSettings -> Maybe (Sensitive Text))
-> (KafkaSettings -> Maybe (Sensitive Text) -> KafkaSettings)
-> Lens
     KafkaSettings
     KafkaSettings
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> KafkaSettings -> f KafkaSettings)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> KafkaSettings
-> f KafkaSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_sslClientKeyPassword = (KafkaSettings -> Maybe (Sensitive Text))
-> (KafkaSettings -> Maybe (Sensitive Text) -> KafkaSettings)
-> Lens
     KafkaSettings
     KafkaSettings
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> KafkaSettings -> f KafkaSettings)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> KafkaSettings
-> f KafkaSettings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | 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 :: (Maybe Bool -> f (Maybe Bool)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_includePartitionValue = (KafkaSettings -> Maybe Bool)
-> (KafkaSettings -> Maybe Bool -> KafkaSettings)
-> Lens KafkaSettings KafkaSettings (Maybe Bool) (Maybe Bool)
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)

-- | 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 :: (Maybe MessageFormatValue -> f (Maybe MessageFormatValue))
-> KafkaSettings -> f KafkaSettings
kafkaSettings_messageFormat = (KafkaSettings -> Maybe MessageFormatValue)
-> (KafkaSettings -> Maybe MessageFormatValue -> KafkaSettings)
-> Lens
     KafkaSettings
     KafkaSettings
     (Maybe MessageFormatValue)
     (Maybe MessageFormatValue)
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)

-- | 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 :: (Maybe KafkaSecurityProtocol -> f (Maybe KafkaSecurityProtocol))
-> KafkaSettings -> f KafkaSettings
kafkaSettings_securityProtocol = (KafkaSettings -> Maybe KafkaSecurityProtocol)
-> (KafkaSettings -> Maybe KafkaSecurityProtocol -> KafkaSettings)
-> Lens
     KafkaSettings
     KafkaSettings
     (Maybe KafkaSecurityProtocol)
     (Maybe KafkaSecurityProtocol)
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 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 :: (Maybe Text -> f (Maybe Text)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_saslUsername = (KafkaSettings -> Maybe Text)
-> (KafkaSettings -> Maybe Text -> KafkaSettings)
-> Lens KafkaSettings KafkaSettings (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_broker = (KafkaSettings -> Maybe Text)
-> (KafkaSettings -> Maybe Text -> KafkaSettings)
-> Lens KafkaSettings KafkaSettings (Maybe Text) (Maybe Text)
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)

-- | 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 :: (Maybe Int -> f (Maybe Int)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_messageMaxBytes = (KafkaSettings -> Maybe Int)
-> (KafkaSettings -> Maybe Int -> KafkaSettings)
-> Lens KafkaSettings KafkaSettings (Maybe Int) (Maybe Int)
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)

-- | 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 :: (Maybe Bool -> f (Maybe Bool)) -> KafkaSettings -> f KafkaSettings
kafkaSettings_includeNullAndEmpty = (KafkaSettings -> Maybe Bool)
-> (KafkaSettings -> Maybe Bool -> KafkaSettings)
-> Lens KafkaSettings KafkaSettings (Maybe Bool) (Maybe Bool)
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)

instance Core.FromJSON KafkaSettings where
  parseJSON :: Value -> Parser KafkaSettings
parseJSON =
    String
-> (Object -> Parser KafkaSettings)
-> Value
-> Parser KafkaSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"KafkaSettings"
      ( \Object
x ->
          Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Bool
-> Maybe MessageFormatValue
-> Maybe KafkaSecurityProtocol
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> KafkaSettings
KafkaSettings'
            (Maybe Text
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe (Sensitive Text)
 -> Maybe (Sensitive Text)
 -> Maybe Bool
 -> Maybe MessageFormatValue
 -> Maybe KafkaSecurityProtocol
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Bool
 -> KafkaSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> Maybe MessageFormatValue
      -> Maybe KafkaSecurityProtocol
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> KafkaSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SslClientKeyArn")
            Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> Maybe MessageFormatValue
   -> Maybe KafkaSecurityProtocol
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> KafkaSettings)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> Maybe MessageFormatValue
      -> Maybe KafkaSecurityProtocol
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncludeTransactionDetails")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> Maybe MessageFormatValue
   -> Maybe KafkaSecurityProtocol
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> KafkaSettings)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> Maybe MessageFormatValue
      -> Maybe KafkaSecurityProtocol
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncludeTableAlterOperations")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> Maybe MessageFormatValue
   -> Maybe KafkaSecurityProtocol
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> KafkaSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> Maybe MessageFormatValue
      -> Maybe KafkaSecurityProtocol
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SslClientCertificateArn")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> Maybe MessageFormatValue
   -> Maybe KafkaSecurityProtocol
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> KafkaSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> Maybe MessageFormatValue
      -> Maybe KafkaSecurityProtocol
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SslCaCertificateArn")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> Maybe MessageFormatValue
   -> Maybe KafkaSecurityProtocol
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> KafkaSettings)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> Maybe MessageFormatValue
      -> Maybe KafkaSecurityProtocol
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PartitionIncludeSchemaTable")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> Maybe MessageFormatValue
   -> Maybe KafkaSecurityProtocol
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> KafkaSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> Maybe MessageFormatValue
      -> Maybe KafkaSecurityProtocol
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Topic")
            Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> Maybe MessageFormatValue
   -> Maybe KafkaSecurityProtocol
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> KafkaSettings)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> Maybe MessageFormatValue
      -> Maybe KafkaSecurityProtocol
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncludeControlDetails")
            Parser
  (Maybe Bool
   -> Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> Maybe MessageFormatValue
   -> Maybe KafkaSecurityProtocol
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> KafkaSettings)
-> Parser (Maybe Bool)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe (Sensitive Text)
      -> Maybe Bool
      -> Maybe MessageFormatValue
      -> Maybe KafkaSecurityProtocol
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NoHexPrefix")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe (Sensitive Text)
   -> Maybe Bool
   -> Maybe MessageFormatValue
   -> Maybe KafkaSecurityProtocol
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> KafkaSettings)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe Bool
      -> Maybe MessageFormatValue
      -> Maybe KafkaSecurityProtocol
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SaslPassword")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe Bool
   -> Maybe MessageFormatValue
   -> Maybe KafkaSecurityProtocol
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> KafkaSettings)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe Bool
      -> Maybe MessageFormatValue
      -> Maybe KafkaSecurityProtocol
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SslClientKeyPassword")
            Parser
  (Maybe Bool
   -> Maybe MessageFormatValue
   -> Maybe KafkaSecurityProtocol
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> KafkaSettings)
-> Parser (Maybe Bool)
-> Parser
     (Maybe MessageFormatValue
      -> Maybe KafkaSecurityProtocol
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncludePartitionValue")
            Parser
  (Maybe MessageFormatValue
   -> Maybe KafkaSecurityProtocol
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> KafkaSettings)
-> Parser (Maybe MessageFormatValue)
-> Parser
     (Maybe KafkaSecurityProtocol
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Bool
      -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MessageFormatValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MessageFormat")
            Parser
  (Maybe KafkaSecurityProtocol
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Bool
   -> KafkaSettings)
-> Parser (Maybe KafkaSecurityProtocol)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Int -> Maybe Bool -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe KafkaSecurityProtocol)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SecurityProtocol")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Int -> Maybe Bool -> KafkaSettings)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Int -> Maybe Bool -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SaslUsername")
            Parser (Maybe Text -> Maybe Int -> Maybe Bool -> KafkaSettings)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> Maybe Bool -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Broker")
            Parser (Maybe Int -> Maybe Bool -> KafkaSettings)
-> Parser (Maybe Int) -> Parser (Maybe Bool -> KafkaSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MessageMaxBytes")
            Parser (Maybe Bool -> KafkaSettings)
-> Parser (Maybe Bool) -> Parser KafkaSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IncludeNullAndEmpty")
      )

instance Prelude.Hashable KafkaSettings

instance Prelude.NFData KafkaSettings

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