{-# 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.KinesisSettings
-- 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.KinesisSettings where

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

-- | Provides information that describes an Amazon Kinesis Data Stream
-- endpoint. This information includes the output format of records applied
-- to the endpoint and details of transaction and control table data
-- information.
--
-- /See:/ 'newKinesisSettings' smart constructor.
data KinesisSettings = KinesisSettings'
  { -- | Shows detailed control information for table definition, column
    -- definition, and table and column changes in the Kinesis message output.
    -- The default is @false@.
    KinesisSettings -> Maybe Bool
includeControlDetails :: Prelude.Maybe Prelude.Bool,
    -- | Include NULL and empty columns for records migrated to the endpoint. The
    -- default is @false@.
    KinesisSettings -> Maybe Bool
includeNullAndEmpty :: Prelude.Maybe Prelude.Bool,
    -- | Shows the partition value within the Kinesis message output, unless the
    -- partition type is @schema-table-type@. The default is @false@.
    KinesisSettings -> 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@.
    KinesisSettings -> 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@.
    KinesisSettings -> 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).
    KinesisSettings -> Maybe MessageFormatValue
messageFormat :: Prelude.Maybe MessageFormatValue,
    -- | 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 an Amazon Kinesis target. Use the @NoHexPrefix@
    -- endpoint setting to enable migration of RAW data type columns without
    -- adding the \'0x\' prefix.
    KinesisSettings -> 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
    -- Kinesis shards. 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 shard, which causes throttling. The default is @false@.
    KinesisSettings -> Maybe Bool
partitionIncludeSchemaTable :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Name (ARN) for the IAM role that DMS uses to write
    -- to the Kinesis data stream. The role must allow the @iam:PassRole@
    -- action.
    KinesisSettings -> Maybe Text
serviceAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the Amazon Kinesis Data Streams
    -- endpoint.
    KinesisSettings -> Maybe Text
streamArn :: Prelude.Maybe Prelude.Text
  }
  deriving (KinesisSettings -> KinesisSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KinesisSettings -> KinesisSettings -> Bool
$c/= :: KinesisSettings -> KinesisSettings -> Bool
== :: KinesisSettings -> KinesisSettings -> Bool
$c== :: KinesisSettings -> KinesisSettings -> Bool
Prelude.Eq, ReadPrec [KinesisSettings]
ReadPrec KinesisSettings
Int -> ReadS KinesisSettings
ReadS [KinesisSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [KinesisSettings]
$creadListPrec :: ReadPrec [KinesisSettings]
readPrec :: ReadPrec KinesisSettings
$creadPrec :: ReadPrec KinesisSettings
readList :: ReadS [KinesisSettings]
$creadList :: ReadS [KinesisSettings]
readsPrec :: Int -> ReadS KinesisSettings
$creadsPrec :: Int -> ReadS KinesisSettings
Prelude.Read, Int -> KinesisSettings -> ShowS
[KinesisSettings] -> ShowS
KinesisSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KinesisSettings] -> ShowS
$cshowList :: [KinesisSettings] -> ShowS
show :: KinesisSettings -> String
$cshow :: KinesisSettings -> String
showsPrec :: Int -> KinesisSettings -> ShowS
$cshowsPrec :: Int -> KinesisSettings -> ShowS
Prelude.Show, forall x. Rep KinesisSettings x -> KinesisSettings
forall x. KinesisSettings -> Rep KinesisSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep KinesisSettings x -> KinesisSettings
$cfrom :: forall x. KinesisSettings -> Rep KinesisSettings x
Prelude.Generic)

-- |
-- Create a value of 'KinesisSettings' 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:
--
-- 'includeControlDetails', 'kinesisSettings_includeControlDetails' - Shows detailed control information for table definition, column
-- definition, and table and column changes in the Kinesis message output.
-- The default is @false@.
--
-- 'includeNullAndEmpty', 'kinesisSettings_includeNullAndEmpty' - Include NULL and empty columns for records migrated to the endpoint. The
-- default is @false@.
--
-- 'includePartitionValue', 'kinesisSettings_includePartitionValue' - Shows the partition value within the Kinesis message output, unless the
-- partition type is @schema-table-type@. The default is @false@.
--
-- 'includeTableAlterOperations', 'kinesisSettings_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', 'kinesisSettings_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', 'kinesisSettings_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).
--
-- 'noHexPrefix', 'kinesisSettings_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 an Amazon Kinesis target. Use the @NoHexPrefix@
-- endpoint setting to enable migration of RAW data type columns without
-- adding the \'0x\' prefix.
--
-- 'partitionIncludeSchemaTable', 'kinesisSettings_partitionIncludeSchemaTable' - Prefixes schema and table names to partition values, when the partition
-- type is @primary-key-type@. Doing this increases data distribution among
-- Kinesis shards. 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 shard, which causes throttling. The default is @false@.
--
-- 'serviceAccessRoleArn', 'kinesisSettings_serviceAccessRoleArn' - The Amazon Resource Name (ARN) for the IAM role that DMS uses to write
-- to the Kinesis data stream. The role must allow the @iam:PassRole@
-- action.
--
-- 'streamArn', 'kinesisSettings_streamArn' - The Amazon Resource Name (ARN) for the Amazon Kinesis Data Streams
-- endpoint.
newKinesisSettings ::
  KinesisSettings
newKinesisSettings :: KinesisSettings
newKinesisSettings =
  KinesisSettings'
    { $sel:includeControlDetails:KinesisSettings' :: Maybe Bool
includeControlDetails =
        forall a. Maybe a
Prelude.Nothing,
      $sel:includeNullAndEmpty:KinesisSettings' :: Maybe Bool
includeNullAndEmpty = forall a. Maybe a
Prelude.Nothing,
      $sel:includePartitionValue:KinesisSettings' :: Maybe Bool
includePartitionValue = forall a. Maybe a
Prelude.Nothing,
      $sel:includeTableAlterOperations:KinesisSettings' :: Maybe Bool
includeTableAlterOperations = forall a. Maybe a
Prelude.Nothing,
      $sel:includeTransactionDetails:KinesisSettings' :: Maybe Bool
includeTransactionDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:messageFormat:KinesisSettings' :: Maybe MessageFormatValue
messageFormat = forall a. Maybe a
Prelude.Nothing,
      $sel:noHexPrefix:KinesisSettings' :: Maybe Bool
noHexPrefix = forall a. Maybe a
Prelude.Nothing,
      $sel:partitionIncludeSchemaTable:KinesisSettings' :: Maybe Bool
partitionIncludeSchemaTable = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceAccessRoleArn:KinesisSettings' :: Maybe Text
serviceAccessRoleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:streamArn:KinesisSettings' :: Maybe Text
streamArn = forall a. Maybe a
Prelude.Nothing
    }

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

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

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

-- | 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@.
kinesisSettings_includeTableAlterOperations :: Lens.Lens' KinesisSettings (Prelude.Maybe Prelude.Bool)
kinesisSettings_includeTableAlterOperations :: Lens' KinesisSettings (Maybe Bool)
kinesisSettings_includeTableAlterOperations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisSettings' {Maybe Bool
includeTableAlterOperations :: Maybe Bool
$sel:includeTableAlterOperations:KinesisSettings' :: KinesisSettings -> Maybe Bool
includeTableAlterOperations} -> Maybe Bool
includeTableAlterOperations) (\s :: KinesisSettings
s@KinesisSettings' {} Maybe Bool
a -> KinesisSettings
s {$sel:includeTableAlterOperations:KinesisSettings' :: Maybe Bool
includeTableAlterOperations = Maybe Bool
a} :: KinesisSettings)

-- | 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@.
kinesisSettings_includeTransactionDetails :: Lens.Lens' KinesisSettings (Prelude.Maybe Prelude.Bool)
kinesisSettings_includeTransactionDetails :: Lens' KinesisSettings (Maybe Bool)
kinesisSettings_includeTransactionDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisSettings' {Maybe Bool
includeTransactionDetails :: Maybe Bool
$sel:includeTransactionDetails:KinesisSettings' :: KinesisSettings -> Maybe Bool
includeTransactionDetails} -> Maybe Bool
includeTransactionDetails) (\s :: KinesisSettings
s@KinesisSettings' {} Maybe Bool
a -> KinesisSettings
s {$sel:includeTransactionDetails:KinesisSettings' :: Maybe Bool
includeTransactionDetails = Maybe Bool
a} :: KinesisSettings)

-- | 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).
kinesisSettings_messageFormat :: Lens.Lens' KinesisSettings (Prelude.Maybe MessageFormatValue)
kinesisSettings_messageFormat :: Lens' KinesisSettings (Maybe MessageFormatValue)
kinesisSettings_messageFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisSettings' {Maybe MessageFormatValue
messageFormat :: Maybe MessageFormatValue
$sel:messageFormat:KinesisSettings' :: KinesisSettings -> Maybe MessageFormatValue
messageFormat} -> Maybe MessageFormatValue
messageFormat) (\s :: KinesisSettings
s@KinesisSettings' {} Maybe MessageFormatValue
a -> KinesisSettings
s {$sel:messageFormat:KinesisSettings' :: Maybe MessageFormatValue
messageFormat = Maybe MessageFormatValue
a} :: KinesisSettings)

-- | 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 an Amazon Kinesis target. Use the @NoHexPrefix@
-- endpoint setting to enable migration of RAW data type columns without
-- adding the \'0x\' prefix.
kinesisSettings_noHexPrefix :: Lens.Lens' KinesisSettings (Prelude.Maybe Prelude.Bool)
kinesisSettings_noHexPrefix :: Lens' KinesisSettings (Maybe Bool)
kinesisSettings_noHexPrefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisSettings' {Maybe Bool
noHexPrefix :: Maybe Bool
$sel:noHexPrefix:KinesisSettings' :: KinesisSettings -> Maybe Bool
noHexPrefix} -> Maybe Bool
noHexPrefix) (\s :: KinesisSettings
s@KinesisSettings' {} Maybe Bool
a -> KinesisSettings
s {$sel:noHexPrefix:KinesisSettings' :: Maybe Bool
noHexPrefix = Maybe Bool
a} :: KinesisSettings)

-- | Prefixes schema and table names to partition values, when the partition
-- type is @primary-key-type@. Doing this increases data distribution among
-- Kinesis shards. 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 shard, which causes throttling. The default is @false@.
kinesisSettings_partitionIncludeSchemaTable :: Lens.Lens' KinesisSettings (Prelude.Maybe Prelude.Bool)
kinesisSettings_partitionIncludeSchemaTable :: Lens' KinesisSettings (Maybe Bool)
kinesisSettings_partitionIncludeSchemaTable = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisSettings' {Maybe Bool
partitionIncludeSchemaTable :: Maybe Bool
$sel:partitionIncludeSchemaTable:KinesisSettings' :: KinesisSettings -> Maybe Bool
partitionIncludeSchemaTable} -> Maybe Bool
partitionIncludeSchemaTable) (\s :: KinesisSettings
s@KinesisSettings' {} Maybe Bool
a -> KinesisSettings
s {$sel:partitionIncludeSchemaTable:KinesisSettings' :: Maybe Bool
partitionIncludeSchemaTable = Maybe Bool
a} :: KinesisSettings)

-- | The Amazon Resource Name (ARN) for the IAM role that DMS uses to write
-- to the Kinesis data stream. The role must allow the @iam:PassRole@
-- action.
kinesisSettings_serviceAccessRoleArn :: Lens.Lens' KinesisSettings (Prelude.Maybe Prelude.Text)
kinesisSettings_serviceAccessRoleArn :: Lens' KinesisSettings (Maybe Text)
kinesisSettings_serviceAccessRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisSettings' {Maybe Text
serviceAccessRoleArn :: Maybe Text
$sel:serviceAccessRoleArn:KinesisSettings' :: KinesisSettings -> Maybe Text
serviceAccessRoleArn} -> Maybe Text
serviceAccessRoleArn) (\s :: KinesisSettings
s@KinesisSettings' {} Maybe Text
a -> KinesisSettings
s {$sel:serviceAccessRoleArn:KinesisSettings' :: Maybe Text
serviceAccessRoleArn = Maybe Text
a} :: KinesisSettings)

-- | The Amazon Resource Name (ARN) for the Amazon Kinesis Data Streams
-- endpoint.
kinesisSettings_streamArn :: Lens.Lens' KinesisSettings (Prelude.Maybe Prelude.Text)
kinesisSettings_streamArn :: Lens' KinesisSettings (Maybe Text)
kinesisSettings_streamArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\KinesisSettings' {Maybe Text
streamArn :: Maybe Text
$sel:streamArn:KinesisSettings' :: KinesisSettings -> Maybe Text
streamArn} -> Maybe Text
streamArn) (\s :: KinesisSettings
s@KinesisSettings' {} Maybe Text
a -> KinesisSettings
s {$sel:streamArn:KinesisSettings' :: Maybe Text
streamArn = Maybe Text
a} :: KinesisSettings)

instance Data.FromJSON KinesisSettings where
  parseJSON :: Value -> Parser KinesisSettings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"KinesisSettings"
      ( \Object
x ->
          Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe MessageFormatValue
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> KinesisSettings
KinesisSettings'
            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
"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
"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
"ServiceAccessRoleArn")
            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
"StreamArn")
      )

instance Prelude.Hashable KinesisSettings where
  hashWithSalt :: Int -> KinesisSettings -> Int
hashWithSalt Int
_salt KinesisSettings' {Maybe Bool
Maybe Text
Maybe MessageFormatValue
streamArn :: Maybe Text
serviceAccessRoleArn :: Maybe Text
partitionIncludeSchemaTable :: Maybe Bool
noHexPrefix :: Maybe Bool
messageFormat :: Maybe MessageFormatValue
includeTransactionDetails :: Maybe Bool
includeTableAlterOperations :: Maybe Bool
includePartitionValue :: Maybe Bool
includeNullAndEmpty :: Maybe Bool
includeControlDetails :: Maybe Bool
$sel:streamArn:KinesisSettings' :: KinesisSettings -> Maybe Text
$sel:serviceAccessRoleArn:KinesisSettings' :: KinesisSettings -> Maybe Text
$sel:partitionIncludeSchemaTable:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:noHexPrefix:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:messageFormat:KinesisSettings' :: KinesisSettings -> Maybe MessageFormatValue
$sel:includeTransactionDetails:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:includeTableAlterOperations:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:includePartitionValue:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:includeNullAndEmpty:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:includeControlDetails:KinesisSettings' :: KinesisSettings -> Maybe Bool
..} =
    Int
_salt
      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 Bool
noHexPrefix
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
partitionIncludeSchemaTable
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serviceAccessRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
streamArn

instance Prelude.NFData KinesisSettings where
  rnf :: KinesisSettings -> ()
rnf KinesisSettings' {Maybe Bool
Maybe Text
Maybe MessageFormatValue
streamArn :: Maybe Text
serviceAccessRoleArn :: Maybe Text
partitionIncludeSchemaTable :: Maybe Bool
noHexPrefix :: Maybe Bool
messageFormat :: Maybe MessageFormatValue
includeTransactionDetails :: Maybe Bool
includeTableAlterOperations :: Maybe Bool
includePartitionValue :: Maybe Bool
includeNullAndEmpty :: Maybe Bool
includeControlDetails :: Maybe Bool
$sel:streamArn:KinesisSettings' :: KinesisSettings -> Maybe Text
$sel:serviceAccessRoleArn:KinesisSettings' :: KinesisSettings -> Maybe Text
$sel:partitionIncludeSchemaTable:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:noHexPrefix:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:messageFormat:KinesisSettings' :: KinesisSettings -> Maybe MessageFormatValue
$sel:includeTransactionDetails:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:includeTableAlterOperations:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:includePartitionValue:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:includeNullAndEmpty:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:includeControlDetails:KinesisSettings' :: KinesisSettings -> Maybe Bool
..} =
    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 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 Text
serviceAccessRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
streamArn

instance Data.ToJSON KinesisSettings where
  toJSON :: KinesisSettings -> Value
toJSON KinesisSettings' {Maybe Bool
Maybe Text
Maybe MessageFormatValue
streamArn :: Maybe Text
serviceAccessRoleArn :: Maybe Text
partitionIncludeSchemaTable :: Maybe Bool
noHexPrefix :: Maybe Bool
messageFormat :: Maybe MessageFormatValue
includeTransactionDetails :: Maybe Bool
includeTableAlterOperations :: Maybe Bool
includePartitionValue :: Maybe Bool
includeNullAndEmpty :: Maybe Bool
includeControlDetails :: Maybe Bool
$sel:streamArn:KinesisSettings' :: KinesisSettings -> Maybe Text
$sel:serviceAccessRoleArn:KinesisSettings' :: KinesisSettings -> Maybe Text
$sel:partitionIncludeSchemaTable:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:noHexPrefix:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:messageFormat:KinesisSettings' :: KinesisSettings -> Maybe MessageFormatValue
$sel:includeTransactionDetails:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:includeTableAlterOperations:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:includePartitionValue:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:includeNullAndEmpty:KinesisSettings' :: KinesisSettings -> Maybe Bool
$sel:includeControlDetails:KinesisSettings' :: KinesisSettings -> Maybe Bool
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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
"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
"ServiceAccessRoleArn" 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
serviceAccessRoleArn,
            (Key
"StreamArn" 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
streamArn
          ]
      )