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

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

-- |
-- Module      : Amazonka.RDS.StartActivityStream
-- 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)
--
-- Starts a database activity stream to monitor activity on the database.
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/DBActivityStreams.html Database Activity Streams>
-- in the /Amazon Aurora User Guide/.
module Amazonka.RDS.StartActivityStream
  ( -- * Creating a Request
    StartActivityStream (..),
    newStartActivityStream,

    -- * Request Lenses
    startActivityStream_engineNativeAuditFieldsIncluded,
    startActivityStream_applyImmediately,
    startActivityStream_resourceArn,
    startActivityStream_mode,
    startActivityStream_kmsKeyId,

    -- * Destructuring the Response
    StartActivityStreamResponse (..),
    newStartActivityStreamResponse,

    -- * Response Lenses
    startActivityStreamResponse_status,
    startActivityStreamResponse_kinesisStreamName,
    startActivityStreamResponse_engineNativeAuditFieldsIncluded,
    startActivityStreamResponse_mode,
    startActivityStreamResponse_kmsKeyId,
    startActivityStreamResponse_applyImmediately,
    startActivityStreamResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newStartActivityStream' smart constructor.
data StartActivityStream = StartActivityStream'
  { -- | Specifies whether the database activity stream includes engine-native
    -- audit fields. This option only applies to an Oracle DB instance. By
    -- default, no engine-native audit fields are included.
    StartActivityStream -> Maybe Bool
engineNativeAuditFieldsIncluded :: Prelude.Maybe Prelude.Bool,
    -- | Specifies whether or not the database activity stream is to start as
    -- soon as possible, regardless of the maintenance window for the database.
    StartActivityStream -> Maybe Bool
applyImmediately :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Name (ARN) of the DB cluster, for example,
    -- @arn:aws:rds:us-east-1:12345667890:cluster:das-cluster@.
    StartActivityStream -> Text
resourceArn :: Prelude.Text,
    -- | Specifies the mode of the database activity stream. Database events such
    -- as a change or access generate an activity stream event. The database
    -- session can handle these events either synchronously or asynchronously.
    StartActivityStream -> ActivityStreamMode
mode :: ActivityStreamMode,
    -- | The Amazon Web Services KMS key identifier for encrypting messages in
    -- the database activity stream. The Amazon Web Services KMS key identifier
    -- is the key ARN, key ID, alias ARN, or alias name for the Amazon Web
    -- Services KMS customer master key (CMK).
    StartActivityStream -> Text
kmsKeyId :: Prelude.Text
  }
  deriving (StartActivityStream -> StartActivityStream -> Bool
(StartActivityStream -> StartActivityStream -> Bool)
-> (StartActivityStream -> StartActivityStream -> Bool)
-> Eq StartActivityStream
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartActivityStream -> StartActivityStream -> Bool
$c/= :: StartActivityStream -> StartActivityStream -> Bool
== :: StartActivityStream -> StartActivityStream -> Bool
$c== :: StartActivityStream -> StartActivityStream -> Bool
Prelude.Eq, ReadPrec [StartActivityStream]
ReadPrec StartActivityStream
Int -> ReadS StartActivityStream
ReadS [StartActivityStream]
(Int -> ReadS StartActivityStream)
-> ReadS [StartActivityStream]
-> ReadPrec StartActivityStream
-> ReadPrec [StartActivityStream]
-> Read StartActivityStream
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartActivityStream]
$creadListPrec :: ReadPrec [StartActivityStream]
readPrec :: ReadPrec StartActivityStream
$creadPrec :: ReadPrec StartActivityStream
readList :: ReadS [StartActivityStream]
$creadList :: ReadS [StartActivityStream]
readsPrec :: Int -> ReadS StartActivityStream
$creadsPrec :: Int -> ReadS StartActivityStream
Prelude.Read, Int -> StartActivityStream -> ShowS
[StartActivityStream] -> ShowS
StartActivityStream -> String
(Int -> StartActivityStream -> ShowS)
-> (StartActivityStream -> String)
-> ([StartActivityStream] -> ShowS)
-> Show StartActivityStream
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartActivityStream] -> ShowS
$cshowList :: [StartActivityStream] -> ShowS
show :: StartActivityStream -> String
$cshow :: StartActivityStream -> String
showsPrec :: Int -> StartActivityStream -> ShowS
$cshowsPrec :: Int -> StartActivityStream -> ShowS
Prelude.Show, (forall x. StartActivityStream -> Rep StartActivityStream x)
-> (forall x. Rep StartActivityStream x -> StartActivityStream)
-> Generic StartActivityStream
forall x. Rep StartActivityStream x -> StartActivityStream
forall x. StartActivityStream -> Rep StartActivityStream x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartActivityStream x -> StartActivityStream
$cfrom :: forall x. StartActivityStream -> Rep StartActivityStream x
Prelude.Generic)

-- |
-- Create a value of 'StartActivityStream' 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:
--
-- 'engineNativeAuditFieldsIncluded', 'startActivityStream_engineNativeAuditFieldsIncluded' - Specifies whether the database activity stream includes engine-native
-- audit fields. This option only applies to an Oracle DB instance. By
-- default, no engine-native audit fields are included.
--
-- 'applyImmediately', 'startActivityStream_applyImmediately' - Specifies whether or not the database activity stream is to start as
-- soon as possible, regardless of the maintenance window for the database.
--
-- 'resourceArn', 'startActivityStream_resourceArn' - The Amazon Resource Name (ARN) of the DB cluster, for example,
-- @arn:aws:rds:us-east-1:12345667890:cluster:das-cluster@.
--
-- 'mode', 'startActivityStream_mode' - Specifies the mode of the database activity stream. Database events such
-- as a change or access generate an activity stream event. The database
-- session can handle these events either synchronously or asynchronously.
--
-- 'kmsKeyId', 'startActivityStream_kmsKeyId' - The Amazon Web Services KMS key identifier for encrypting messages in
-- the database activity stream. The Amazon Web Services KMS key identifier
-- is the key ARN, key ID, alias ARN, or alias name for the Amazon Web
-- Services KMS customer master key (CMK).
newStartActivityStream ::
  -- | 'resourceArn'
  Prelude.Text ->
  -- | 'mode'
  ActivityStreamMode ->
  -- | 'kmsKeyId'
  Prelude.Text ->
  StartActivityStream
newStartActivityStream :: Text -> ActivityStreamMode -> Text -> StartActivityStream
newStartActivityStream
  Text
pResourceArn_
  ActivityStreamMode
pMode_
  Text
pKmsKeyId_ =
    StartActivityStream' :: Maybe Bool
-> Maybe Bool
-> Text
-> ActivityStreamMode
-> Text
-> StartActivityStream
StartActivityStream'
      { $sel:engineNativeAuditFieldsIncluded:StartActivityStream' :: Maybe Bool
engineNativeAuditFieldsIncluded =
          Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:applyImmediately:StartActivityStream' :: Maybe Bool
applyImmediately = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:resourceArn:StartActivityStream' :: Text
resourceArn = Text
pResourceArn_,
        $sel:mode:StartActivityStream' :: ActivityStreamMode
mode = ActivityStreamMode
pMode_,
        $sel:kmsKeyId:StartActivityStream' :: Text
kmsKeyId = Text
pKmsKeyId_
      }

-- | Specifies whether the database activity stream includes engine-native
-- audit fields. This option only applies to an Oracle DB instance. By
-- default, no engine-native audit fields are included.
startActivityStream_engineNativeAuditFieldsIncluded :: Lens.Lens' StartActivityStream (Prelude.Maybe Prelude.Bool)
startActivityStream_engineNativeAuditFieldsIncluded :: (Maybe Bool -> f (Maybe Bool))
-> StartActivityStream -> f StartActivityStream
startActivityStream_engineNativeAuditFieldsIncluded = (StartActivityStream -> Maybe Bool)
-> (StartActivityStream -> Maybe Bool -> StartActivityStream)
-> Lens
     StartActivityStream StartActivityStream (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartActivityStream' {Maybe Bool
engineNativeAuditFieldsIncluded :: Maybe Bool
$sel:engineNativeAuditFieldsIncluded:StartActivityStream' :: StartActivityStream -> Maybe Bool
engineNativeAuditFieldsIncluded} -> Maybe Bool
engineNativeAuditFieldsIncluded) (\s :: StartActivityStream
s@StartActivityStream' {} Maybe Bool
a -> StartActivityStream
s {$sel:engineNativeAuditFieldsIncluded:StartActivityStream' :: Maybe Bool
engineNativeAuditFieldsIncluded = Maybe Bool
a} :: StartActivityStream)

-- | Specifies whether or not the database activity stream is to start as
-- soon as possible, regardless of the maintenance window for the database.
startActivityStream_applyImmediately :: Lens.Lens' StartActivityStream (Prelude.Maybe Prelude.Bool)
startActivityStream_applyImmediately :: (Maybe Bool -> f (Maybe Bool))
-> StartActivityStream -> f StartActivityStream
startActivityStream_applyImmediately = (StartActivityStream -> Maybe Bool)
-> (StartActivityStream -> Maybe Bool -> StartActivityStream)
-> Lens
     StartActivityStream StartActivityStream (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartActivityStream' {Maybe Bool
applyImmediately :: Maybe Bool
$sel:applyImmediately:StartActivityStream' :: StartActivityStream -> Maybe Bool
applyImmediately} -> Maybe Bool
applyImmediately) (\s :: StartActivityStream
s@StartActivityStream' {} Maybe Bool
a -> StartActivityStream
s {$sel:applyImmediately:StartActivityStream' :: Maybe Bool
applyImmediately = Maybe Bool
a} :: StartActivityStream)

-- | The Amazon Resource Name (ARN) of the DB cluster, for example,
-- @arn:aws:rds:us-east-1:12345667890:cluster:das-cluster@.
startActivityStream_resourceArn :: Lens.Lens' StartActivityStream Prelude.Text
startActivityStream_resourceArn :: (Text -> f Text) -> StartActivityStream -> f StartActivityStream
startActivityStream_resourceArn = (StartActivityStream -> Text)
-> (StartActivityStream -> Text -> StartActivityStream)
-> Lens StartActivityStream StartActivityStream Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartActivityStream' {Text
resourceArn :: Text
$sel:resourceArn:StartActivityStream' :: StartActivityStream -> Text
resourceArn} -> Text
resourceArn) (\s :: StartActivityStream
s@StartActivityStream' {} Text
a -> StartActivityStream
s {$sel:resourceArn:StartActivityStream' :: Text
resourceArn = Text
a} :: StartActivityStream)

-- | Specifies the mode of the database activity stream. Database events such
-- as a change or access generate an activity stream event. The database
-- session can handle these events either synchronously or asynchronously.
startActivityStream_mode :: Lens.Lens' StartActivityStream ActivityStreamMode
startActivityStream_mode :: (ActivityStreamMode -> f ActivityStreamMode)
-> StartActivityStream -> f StartActivityStream
startActivityStream_mode = (StartActivityStream -> ActivityStreamMode)
-> (StartActivityStream
    -> ActivityStreamMode -> StartActivityStream)
-> Lens
     StartActivityStream
     StartActivityStream
     ActivityStreamMode
     ActivityStreamMode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartActivityStream' {ActivityStreamMode
mode :: ActivityStreamMode
$sel:mode:StartActivityStream' :: StartActivityStream -> ActivityStreamMode
mode} -> ActivityStreamMode
mode) (\s :: StartActivityStream
s@StartActivityStream' {} ActivityStreamMode
a -> StartActivityStream
s {$sel:mode:StartActivityStream' :: ActivityStreamMode
mode = ActivityStreamMode
a} :: StartActivityStream)

-- | The Amazon Web Services KMS key identifier for encrypting messages in
-- the database activity stream. The Amazon Web Services KMS key identifier
-- is the key ARN, key ID, alias ARN, or alias name for the Amazon Web
-- Services KMS customer master key (CMK).
startActivityStream_kmsKeyId :: Lens.Lens' StartActivityStream Prelude.Text
startActivityStream_kmsKeyId :: (Text -> f Text) -> StartActivityStream -> f StartActivityStream
startActivityStream_kmsKeyId = (StartActivityStream -> Text)
-> (StartActivityStream -> Text -> StartActivityStream)
-> Lens StartActivityStream StartActivityStream Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartActivityStream' {Text
kmsKeyId :: Text
$sel:kmsKeyId:StartActivityStream' :: StartActivityStream -> Text
kmsKeyId} -> Text
kmsKeyId) (\s :: StartActivityStream
s@StartActivityStream' {} Text
a -> StartActivityStream
s {$sel:kmsKeyId:StartActivityStream' :: Text
kmsKeyId = Text
a} :: StartActivityStream)

instance Core.AWSRequest StartActivityStream where
  type
    AWSResponse StartActivityStream =
      StartActivityStreamResponse
  request :: StartActivityStream -> Request StartActivityStream
request = Service -> StartActivityStream -> Request StartActivityStream
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy StartActivityStream
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartActivityStream)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse StartActivityStream))
-> Logger
-> Service
-> Proxy StartActivityStream
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartActivityStream)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"StartActivityStreamResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe ActivityStreamStatus
-> Maybe Text
-> Maybe Bool
-> Maybe ActivityStreamMode
-> Maybe Text
-> Maybe Bool
-> Int
-> StartActivityStreamResponse
StartActivityStreamResponse'
            (Maybe ActivityStreamStatus
 -> Maybe Text
 -> Maybe Bool
 -> Maybe ActivityStreamMode
 -> Maybe Text
 -> Maybe Bool
 -> Int
 -> StartActivityStreamResponse)
-> Either String (Maybe ActivityStreamStatus)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe ActivityStreamMode
      -> Maybe Text
      -> Maybe Bool
      -> Int
      -> StartActivityStreamResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ActivityStreamStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status")
            Either
  String
  (Maybe Text
   -> Maybe Bool
   -> Maybe ActivityStreamMode
   -> Maybe Text
   -> Maybe Bool
   -> Int
   -> StartActivityStreamResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe ActivityStreamMode
      -> Maybe Text
      -> Maybe Bool
      -> Int
      -> StartActivityStreamResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"KinesisStreamName")
            Either
  String
  (Maybe Bool
   -> Maybe ActivityStreamMode
   -> Maybe Text
   -> Maybe Bool
   -> Int
   -> StartActivityStreamResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe ActivityStreamMode
      -> Maybe Text -> Maybe Bool -> Int -> StartActivityStreamResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EngineNativeAuditFieldsIncluded")
            Either
  String
  (Maybe ActivityStreamMode
   -> Maybe Text -> Maybe Bool -> Int -> StartActivityStreamResponse)
-> Either String (Maybe ActivityStreamMode)
-> Either
     String
     (Maybe Text -> Maybe Bool -> Int -> StartActivityStreamResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ActivityStreamMode)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Mode")
            Either
  String
  (Maybe Text -> Maybe Bool -> Int -> StartActivityStreamResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Bool -> Int -> StartActivityStreamResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"KmsKeyId")
            Either String (Maybe Bool -> Int -> StartActivityStreamResponse)
-> Either String (Maybe Bool)
-> Either String (Int -> StartActivityStreamResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ApplyImmediately")
            Either String (Int -> StartActivityStreamResponse)
-> Either String Int -> Either String StartActivityStreamResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable StartActivityStream

instance Prelude.NFData StartActivityStream

instance Core.ToHeaders StartActivityStream where
  toHeaders :: StartActivityStream -> ResponseHeaders
toHeaders = ResponseHeaders -> StartActivityStream -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath StartActivityStream where
  toPath :: StartActivityStream -> ByteString
toPath = ByteString -> StartActivityStream -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery StartActivityStream where
  toQuery :: StartActivityStream -> QueryString
toQuery StartActivityStream' {Maybe Bool
Text
ActivityStreamMode
kmsKeyId :: Text
mode :: ActivityStreamMode
resourceArn :: Text
applyImmediately :: Maybe Bool
engineNativeAuditFieldsIncluded :: Maybe Bool
$sel:kmsKeyId:StartActivityStream' :: StartActivityStream -> Text
$sel:mode:StartActivityStream' :: StartActivityStream -> ActivityStreamMode
$sel:resourceArn:StartActivityStream' :: StartActivityStream -> Text
$sel:applyImmediately:StartActivityStream' :: StartActivityStream -> Maybe Bool
$sel:engineNativeAuditFieldsIncluded:StartActivityStream' :: StartActivityStream -> Maybe Bool
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"StartActivityStream" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"EngineNativeAuditFieldsIncluded"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
engineNativeAuditFieldsIncluded,
        ByteString
"ApplyImmediately" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
applyImmediately,
        ByteString
"ResourceArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
resourceArn,
        ByteString
"Mode" ByteString -> ActivityStreamMode -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ActivityStreamMode
mode,
        ByteString
"KmsKeyId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
kmsKeyId
      ]

-- | /See:/ 'newStartActivityStreamResponse' smart constructor.
data StartActivityStreamResponse = StartActivityStreamResponse'
  { -- | The status of the database activity stream.
    StartActivityStreamResponse -> Maybe ActivityStreamStatus
status :: Prelude.Maybe ActivityStreamStatus,
    -- | The name of the Amazon Kinesis data stream to be used for the database
    -- activity stream.
    StartActivityStreamResponse -> Maybe Text
kinesisStreamName :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether engine-native audit fields are included in the
    -- database activity stream.
    StartActivityStreamResponse -> Maybe Bool
engineNativeAuditFieldsIncluded :: Prelude.Maybe Prelude.Bool,
    -- | The mode of the database activity stream.
    StartActivityStreamResponse -> Maybe ActivityStreamMode
mode :: Prelude.Maybe ActivityStreamMode,
    -- | The Amazon Web Services KMS key identifier for encryption of messages in
    -- the database activity stream.
    StartActivityStreamResponse -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether or not the database activity stream will start as soon
    -- as possible, regardless of the maintenance window for the database.
    StartActivityStreamResponse -> Maybe Bool
applyImmediately :: Prelude.Maybe Prelude.Bool,
    -- | The response's http status code.
    StartActivityStreamResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartActivityStreamResponse -> StartActivityStreamResponse -> Bool
(StartActivityStreamResponse
 -> StartActivityStreamResponse -> Bool)
-> (StartActivityStreamResponse
    -> StartActivityStreamResponse -> Bool)
-> Eq StartActivityStreamResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartActivityStreamResponse -> StartActivityStreamResponse -> Bool
$c/= :: StartActivityStreamResponse -> StartActivityStreamResponse -> Bool
== :: StartActivityStreamResponse -> StartActivityStreamResponse -> Bool
$c== :: StartActivityStreamResponse -> StartActivityStreamResponse -> Bool
Prelude.Eq, ReadPrec [StartActivityStreamResponse]
ReadPrec StartActivityStreamResponse
Int -> ReadS StartActivityStreamResponse
ReadS [StartActivityStreamResponse]
(Int -> ReadS StartActivityStreamResponse)
-> ReadS [StartActivityStreamResponse]
-> ReadPrec StartActivityStreamResponse
-> ReadPrec [StartActivityStreamResponse]
-> Read StartActivityStreamResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartActivityStreamResponse]
$creadListPrec :: ReadPrec [StartActivityStreamResponse]
readPrec :: ReadPrec StartActivityStreamResponse
$creadPrec :: ReadPrec StartActivityStreamResponse
readList :: ReadS [StartActivityStreamResponse]
$creadList :: ReadS [StartActivityStreamResponse]
readsPrec :: Int -> ReadS StartActivityStreamResponse
$creadsPrec :: Int -> ReadS StartActivityStreamResponse
Prelude.Read, Int -> StartActivityStreamResponse -> ShowS
[StartActivityStreamResponse] -> ShowS
StartActivityStreamResponse -> String
(Int -> StartActivityStreamResponse -> ShowS)
-> (StartActivityStreamResponse -> String)
-> ([StartActivityStreamResponse] -> ShowS)
-> Show StartActivityStreamResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartActivityStreamResponse] -> ShowS
$cshowList :: [StartActivityStreamResponse] -> ShowS
show :: StartActivityStreamResponse -> String
$cshow :: StartActivityStreamResponse -> String
showsPrec :: Int -> StartActivityStreamResponse -> ShowS
$cshowsPrec :: Int -> StartActivityStreamResponse -> ShowS
Prelude.Show, (forall x.
 StartActivityStreamResponse -> Rep StartActivityStreamResponse x)
-> (forall x.
    Rep StartActivityStreamResponse x -> StartActivityStreamResponse)
-> Generic StartActivityStreamResponse
forall x.
Rep StartActivityStreamResponse x -> StartActivityStreamResponse
forall x.
StartActivityStreamResponse -> Rep StartActivityStreamResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartActivityStreamResponse x -> StartActivityStreamResponse
$cfrom :: forall x.
StartActivityStreamResponse -> Rep StartActivityStreamResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartActivityStreamResponse' 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:
--
-- 'status', 'startActivityStreamResponse_status' - The status of the database activity stream.
--
-- 'kinesisStreamName', 'startActivityStreamResponse_kinesisStreamName' - The name of the Amazon Kinesis data stream to be used for the database
-- activity stream.
--
-- 'engineNativeAuditFieldsIncluded', 'startActivityStreamResponse_engineNativeAuditFieldsIncluded' - Indicates whether engine-native audit fields are included in the
-- database activity stream.
--
-- 'mode', 'startActivityStreamResponse_mode' - The mode of the database activity stream.
--
-- 'kmsKeyId', 'startActivityStreamResponse_kmsKeyId' - The Amazon Web Services KMS key identifier for encryption of messages in
-- the database activity stream.
--
-- 'applyImmediately', 'startActivityStreamResponse_applyImmediately' - Indicates whether or not the database activity stream will start as soon
-- as possible, regardless of the maintenance window for the database.
--
-- 'httpStatus', 'startActivityStreamResponse_httpStatus' - The response's http status code.
newStartActivityStreamResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartActivityStreamResponse
newStartActivityStreamResponse :: Int -> StartActivityStreamResponse
newStartActivityStreamResponse Int
pHttpStatus_ =
  StartActivityStreamResponse' :: Maybe ActivityStreamStatus
-> Maybe Text
-> Maybe Bool
-> Maybe ActivityStreamMode
-> Maybe Text
-> Maybe Bool
-> Int
-> StartActivityStreamResponse
StartActivityStreamResponse'
    { $sel:status:StartActivityStreamResponse' :: Maybe ActivityStreamStatus
status =
        Maybe ActivityStreamStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:kinesisStreamName:StartActivityStreamResponse' :: Maybe Text
kinesisStreamName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:engineNativeAuditFieldsIncluded:StartActivityStreamResponse' :: Maybe Bool
engineNativeAuditFieldsIncluded =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:mode:StartActivityStreamResponse' :: Maybe ActivityStreamMode
mode = Maybe ActivityStreamMode
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:StartActivityStreamResponse' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:applyImmediately:StartActivityStreamResponse' :: Maybe Bool
applyImmediately = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartActivityStreamResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The status of the database activity stream.
startActivityStreamResponse_status :: Lens.Lens' StartActivityStreamResponse (Prelude.Maybe ActivityStreamStatus)
startActivityStreamResponse_status :: (Maybe ActivityStreamStatus -> f (Maybe ActivityStreamStatus))
-> StartActivityStreamResponse -> f StartActivityStreamResponse
startActivityStreamResponse_status = (StartActivityStreamResponse -> Maybe ActivityStreamStatus)
-> (StartActivityStreamResponse
    -> Maybe ActivityStreamStatus -> StartActivityStreamResponse)
-> Lens
     StartActivityStreamResponse
     StartActivityStreamResponse
     (Maybe ActivityStreamStatus)
     (Maybe ActivityStreamStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartActivityStreamResponse' {Maybe ActivityStreamStatus
status :: Maybe ActivityStreamStatus
$sel:status:StartActivityStreamResponse' :: StartActivityStreamResponse -> Maybe ActivityStreamStatus
status} -> Maybe ActivityStreamStatus
status) (\s :: StartActivityStreamResponse
s@StartActivityStreamResponse' {} Maybe ActivityStreamStatus
a -> StartActivityStreamResponse
s {$sel:status:StartActivityStreamResponse' :: Maybe ActivityStreamStatus
status = Maybe ActivityStreamStatus
a} :: StartActivityStreamResponse)

-- | The name of the Amazon Kinesis data stream to be used for the database
-- activity stream.
startActivityStreamResponse_kinesisStreamName :: Lens.Lens' StartActivityStreamResponse (Prelude.Maybe Prelude.Text)
startActivityStreamResponse_kinesisStreamName :: (Maybe Text -> f (Maybe Text))
-> StartActivityStreamResponse -> f StartActivityStreamResponse
startActivityStreamResponse_kinesisStreamName = (StartActivityStreamResponse -> Maybe Text)
-> (StartActivityStreamResponse
    -> Maybe Text -> StartActivityStreamResponse)
-> Lens
     StartActivityStreamResponse
     StartActivityStreamResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartActivityStreamResponse' {Maybe Text
kinesisStreamName :: Maybe Text
$sel:kinesisStreamName:StartActivityStreamResponse' :: StartActivityStreamResponse -> Maybe Text
kinesisStreamName} -> Maybe Text
kinesisStreamName) (\s :: StartActivityStreamResponse
s@StartActivityStreamResponse' {} Maybe Text
a -> StartActivityStreamResponse
s {$sel:kinesisStreamName:StartActivityStreamResponse' :: Maybe Text
kinesisStreamName = Maybe Text
a} :: StartActivityStreamResponse)

-- | Indicates whether engine-native audit fields are included in the
-- database activity stream.
startActivityStreamResponse_engineNativeAuditFieldsIncluded :: Lens.Lens' StartActivityStreamResponse (Prelude.Maybe Prelude.Bool)
startActivityStreamResponse_engineNativeAuditFieldsIncluded :: (Maybe Bool -> f (Maybe Bool))
-> StartActivityStreamResponse -> f StartActivityStreamResponse
startActivityStreamResponse_engineNativeAuditFieldsIncluded = (StartActivityStreamResponse -> Maybe Bool)
-> (StartActivityStreamResponse
    -> Maybe Bool -> StartActivityStreamResponse)
-> Lens
     StartActivityStreamResponse
     StartActivityStreamResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartActivityStreamResponse' {Maybe Bool
engineNativeAuditFieldsIncluded :: Maybe Bool
$sel:engineNativeAuditFieldsIncluded:StartActivityStreamResponse' :: StartActivityStreamResponse -> Maybe Bool
engineNativeAuditFieldsIncluded} -> Maybe Bool
engineNativeAuditFieldsIncluded) (\s :: StartActivityStreamResponse
s@StartActivityStreamResponse' {} Maybe Bool
a -> StartActivityStreamResponse
s {$sel:engineNativeAuditFieldsIncluded:StartActivityStreamResponse' :: Maybe Bool
engineNativeAuditFieldsIncluded = Maybe Bool
a} :: StartActivityStreamResponse)

-- | The mode of the database activity stream.
startActivityStreamResponse_mode :: Lens.Lens' StartActivityStreamResponse (Prelude.Maybe ActivityStreamMode)
startActivityStreamResponse_mode :: (Maybe ActivityStreamMode -> f (Maybe ActivityStreamMode))
-> StartActivityStreamResponse -> f StartActivityStreamResponse
startActivityStreamResponse_mode = (StartActivityStreamResponse -> Maybe ActivityStreamMode)
-> (StartActivityStreamResponse
    -> Maybe ActivityStreamMode -> StartActivityStreamResponse)
-> Lens
     StartActivityStreamResponse
     StartActivityStreamResponse
     (Maybe ActivityStreamMode)
     (Maybe ActivityStreamMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartActivityStreamResponse' {Maybe ActivityStreamMode
mode :: Maybe ActivityStreamMode
$sel:mode:StartActivityStreamResponse' :: StartActivityStreamResponse -> Maybe ActivityStreamMode
mode} -> Maybe ActivityStreamMode
mode) (\s :: StartActivityStreamResponse
s@StartActivityStreamResponse' {} Maybe ActivityStreamMode
a -> StartActivityStreamResponse
s {$sel:mode:StartActivityStreamResponse' :: Maybe ActivityStreamMode
mode = Maybe ActivityStreamMode
a} :: StartActivityStreamResponse)

-- | The Amazon Web Services KMS key identifier for encryption of messages in
-- the database activity stream.
startActivityStreamResponse_kmsKeyId :: Lens.Lens' StartActivityStreamResponse (Prelude.Maybe Prelude.Text)
startActivityStreamResponse_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> StartActivityStreamResponse -> f StartActivityStreamResponse
startActivityStreamResponse_kmsKeyId = (StartActivityStreamResponse -> Maybe Text)
-> (StartActivityStreamResponse
    -> Maybe Text -> StartActivityStreamResponse)
-> Lens
     StartActivityStreamResponse
     StartActivityStreamResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartActivityStreamResponse' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:StartActivityStreamResponse' :: StartActivityStreamResponse -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: StartActivityStreamResponse
s@StartActivityStreamResponse' {} Maybe Text
a -> StartActivityStreamResponse
s {$sel:kmsKeyId:StartActivityStreamResponse' :: Maybe Text
kmsKeyId = Maybe Text
a} :: StartActivityStreamResponse)

-- | Indicates whether or not the database activity stream will start as soon
-- as possible, regardless of the maintenance window for the database.
startActivityStreamResponse_applyImmediately :: Lens.Lens' StartActivityStreamResponse (Prelude.Maybe Prelude.Bool)
startActivityStreamResponse_applyImmediately :: (Maybe Bool -> f (Maybe Bool))
-> StartActivityStreamResponse -> f StartActivityStreamResponse
startActivityStreamResponse_applyImmediately = (StartActivityStreamResponse -> Maybe Bool)
-> (StartActivityStreamResponse
    -> Maybe Bool -> StartActivityStreamResponse)
-> Lens
     StartActivityStreamResponse
     StartActivityStreamResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartActivityStreamResponse' {Maybe Bool
applyImmediately :: Maybe Bool
$sel:applyImmediately:StartActivityStreamResponse' :: StartActivityStreamResponse -> Maybe Bool
applyImmediately} -> Maybe Bool
applyImmediately) (\s :: StartActivityStreamResponse
s@StartActivityStreamResponse' {} Maybe Bool
a -> StartActivityStreamResponse
s {$sel:applyImmediately:StartActivityStreamResponse' :: Maybe Bool
applyImmediately = Maybe Bool
a} :: StartActivityStreamResponse)

-- | The response's http status code.
startActivityStreamResponse_httpStatus :: Lens.Lens' StartActivityStreamResponse Prelude.Int
startActivityStreamResponse_httpStatus :: (Int -> f Int)
-> StartActivityStreamResponse -> f StartActivityStreamResponse
startActivityStreamResponse_httpStatus = (StartActivityStreamResponse -> Int)
-> (StartActivityStreamResponse
    -> Int -> StartActivityStreamResponse)
-> Lens
     StartActivityStreamResponse StartActivityStreamResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartActivityStreamResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartActivityStreamResponse' :: StartActivityStreamResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartActivityStreamResponse
s@StartActivityStreamResponse' {} Int
a -> StartActivityStreamResponse
s {$sel:httpStatus:StartActivityStreamResponse' :: Int
httpStatus = Int
a} :: StartActivityStreamResponse)

instance Prelude.NFData StartActivityStreamResponse