{-# 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.SecurityHub.Types.AwsRdsEventSubscriptionDetails
-- 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.SecurityHub.Types.AwsRdsEventSubscriptionDetails where

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

-- | Details about an Amazon RDS event notification subscription. The
-- subscription allows Amazon RDS to post events to an SNS topic.
--
-- /See:/ 'newAwsRdsEventSubscriptionDetails' smart constructor.
data AwsRdsEventSubscriptionDetails = AwsRdsEventSubscriptionDetails'
  { -- | The status of the event notification subscription.
    --
    -- Valid values: @creating@ | @modifying@ | @deleting@ | @active@ |
    -- @no-permission@ | @topic-not-exist@
    AwsRdsEventSubscriptionDetails -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the event notification subscription.
    AwsRdsEventSubscriptionDetails -> Maybe Text
customerAwsId :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the account that is associated with the event
    -- notification subscription.
    AwsRdsEventSubscriptionDetails -> Maybe Text
custSubscriptionId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the SNS topic to post the event notifications to.
    AwsRdsEventSubscriptionDetails -> Maybe Text
snsTopicArn :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the event notification subscription.
    AwsRdsEventSubscriptionDetails -> Maybe Text
eventSubscriptionArn :: Prelude.Maybe Prelude.Text,
    -- | Whether the event notification subscription is enabled.
    AwsRdsEventSubscriptionDetails -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
    -- | The source type for the event notification subscription.
    AwsRdsEventSubscriptionDetails -> Maybe Text
sourceType :: Prelude.Maybe Prelude.Text,
    -- | The datetime when the event notification subscription was created.
    --
    -- Uses the @date-time@ format specified in
    -- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
    -- The value cannot contain spaces. For example,
    -- @2020-03-22T13:22:13.933Z@.
    AwsRdsEventSubscriptionDetails -> Maybe Text
subscriptionCreationTime :: Prelude.Maybe Prelude.Text,
    -- | The list of event categories for the event notification subscription.
    AwsRdsEventSubscriptionDetails -> Maybe [Text]
eventCategoriesList :: Prelude.Maybe [Prelude.Text],
    -- | A list of source identifiers for the event notification subscription.
    AwsRdsEventSubscriptionDetails -> Maybe [Text]
sourceIdsList :: Prelude.Maybe [Prelude.Text]
  }
  deriving (AwsRdsEventSubscriptionDetails
-> AwsRdsEventSubscriptionDetails -> Bool
(AwsRdsEventSubscriptionDetails
 -> AwsRdsEventSubscriptionDetails -> Bool)
-> (AwsRdsEventSubscriptionDetails
    -> AwsRdsEventSubscriptionDetails -> Bool)
-> Eq AwsRdsEventSubscriptionDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsRdsEventSubscriptionDetails
-> AwsRdsEventSubscriptionDetails -> Bool
$c/= :: AwsRdsEventSubscriptionDetails
-> AwsRdsEventSubscriptionDetails -> Bool
== :: AwsRdsEventSubscriptionDetails
-> AwsRdsEventSubscriptionDetails -> Bool
$c== :: AwsRdsEventSubscriptionDetails
-> AwsRdsEventSubscriptionDetails -> Bool
Prelude.Eq, ReadPrec [AwsRdsEventSubscriptionDetails]
ReadPrec AwsRdsEventSubscriptionDetails
Int -> ReadS AwsRdsEventSubscriptionDetails
ReadS [AwsRdsEventSubscriptionDetails]
(Int -> ReadS AwsRdsEventSubscriptionDetails)
-> ReadS [AwsRdsEventSubscriptionDetails]
-> ReadPrec AwsRdsEventSubscriptionDetails
-> ReadPrec [AwsRdsEventSubscriptionDetails]
-> Read AwsRdsEventSubscriptionDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsRdsEventSubscriptionDetails]
$creadListPrec :: ReadPrec [AwsRdsEventSubscriptionDetails]
readPrec :: ReadPrec AwsRdsEventSubscriptionDetails
$creadPrec :: ReadPrec AwsRdsEventSubscriptionDetails
readList :: ReadS [AwsRdsEventSubscriptionDetails]
$creadList :: ReadS [AwsRdsEventSubscriptionDetails]
readsPrec :: Int -> ReadS AwsRdsEventSubscriptionDetails
$creadsPrec :: Int -> ReadS AwsRdsEventSubscriptionDetails
Prelude.Read, Int -> AwsRdsEventSubscriptionDetails -> ShowS
[AwsRdsEventSubscriptionDetails] -> ShowS
AwsRdsEventSubscriptionDetails -> String
(Int -> AwsRdsEventSubscriptionDetails -> ShowS)
-> (AwsRdsEventSubscriptionDetails -> String)
-> ([AwsRdsEventSubscriptionDetails] -> ShowS)
-> Show AwsRdsEventSubscriptionDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsRdsEventSubscriptionDetails] -> ShowS
$cshowList :: [AwsRdsEventSubscriptionDetails] -> ShowS
show :: AwsRdsEventSubscriptionDetails -> String
$cshow :: AwsRdsEventSubscriptionDetails -> String
showsPrec :: Int -> AwsRdsEventSubscriptionDetails -> ShowS
$cshowsPrec :: Int -> AwsRdsEventSubscriptionDetails -> ShowS
Prelude.Show, (forall x.
 AwsRdsEventSubscriptionDetails
 -> Rep AwsRdsEventSubscriptionDetails x)
-> (forall x.
    Rep AwsRdsEventSubscriptionDetails x
    -> AwsRdsEventSubscriptionDetails)
-> Generic AwsRdsEventSubscriptionDetails
forall x.
Rep AwsRdsEventSubscriptionDetails x
-> AwsRdsEventSubscriptionDetails
forall x.
AwsRdsEventSubscriptionDetails
-> Rep AwsRdsEventSubscriptionDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsRdsEventSubscriptionDetails x
-> AwsRdsEventSubscriptionDetails
$cfrom :: forall x.
AwsRdsEventSubscriptionDetails
-> Rep AwsRdsEventSubscriptionDetails x
Prelude.Generic)

-- |
-- Create a value of 'AwsRdsEventSubscriptionDetails' 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', 'awsRdsEventSubscriptionDetails_status' - The status of the event notification subscription.
--
-- Valid values: @creating@ | @modifying@ | @deleting@ | @active@ |
-- @no-permission@ | @topic-not-exist@
--
-- 'customerAwsId', 'awsRdsEventSubscriptionDetails_customerAwsId' - The identifier of the event notification subscription.
--
-- 'custSubscriptionId', 'awsRdsEventSubscriptionDetails_custSubscriptionId' - The identifier of the account that is associated with the event
-- notification subscription.
--
-- 'snsTopicArn', 'awsRdsEventSubscriptionDetails_snsTopicArn' - The ARN of the SNS topic to post the event notifications to.
--
-- 'eventSubscriptionArn', 'awsRdsEventSubscriptionDetails_eventSubscriptionArn' - The ARN of the event notification subscription.
--
-- 'enabled', 'awsRdsEventSubscriptionDetails_enabled' - Whether the event notification subscription is enabled.
--
-- 'sourceType', 'awsRdsEventSubscriptionDetails_sourceType' - The source type for the event notification subscription.
--
-- 'subscriptionCreationTime', 'awsRdsEventSubscriptionDetails_subscriptionCreationTime' - The datetime when the event notification subscription was created.
--
-- Uses the @date-time@ format specified in
-- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
-- The value cannot contain spaces. For example,
-- @2020-03-22T13:22:13.933Z@.
--
-- 'eventCategoriesList', 'awsRdsEventSubscriptionDetails_eventCategoriesList' - The list of event categories for the event notification subscription.
--
-- 'sourceIdsList', 'awsRdsEventSubscriptionDetails_sourceIdsList' - A list of source identifiers for the event notification subscription.
newAwsRdsEventSubscriptionDetails ::
  AwsRdsEventSubscriptionDetails
newAwsRdsEventSubscriptionDetails :: AwsRdsEventSubscriptionDetails
newAwsRdsEventSubscriptionDetails =
  AwsRdsEventSubscriptionDetails' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> AwsRdsEventSubscriptionDetails
AwsRdsEventSubscriptionDetails'
    { $sel:status:AwsRdsEventSubscriptionDetails' :: Maybe Text
status =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:customerAwsId:AwsRdsEventSubscriptionDetails' :: Maybe Text
customerAwsId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:custSubscriptionId:AwsRdsEventSubscriptionDetails' :: Maybe Text
custSubscriptionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snsTopicArn:AwsRdsEventSubscriptionDetails' :: Maybe Text
snsTopicArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:eventSubscriptionArn:AwsRdsEventSubscriptionDetails' :: Maybe Text
eventSubscriptionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enabled:AwsRdsEventSubscriptionDetails' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceType:AwsRdsEventSubscriptionDetails' :: Maybe Text
sourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:subscriptionCreationTime:AwsRdsEventSubscriptionDetails' :: Maybe Text
subscriptionCreationTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:eventCategoriesList:AwsRdsEventSubscriptionDetails' :: Maybe [Text]
eventCategoriesList = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceIdsList:AwsRdsEventSubscriptionDetails' :: Maybe [Text]
sourceIdsList = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the event notification subscription.
--
-- Valid values: @creating@ | @modifying@ | @deleting@ | @active@ |
-- @no-permission@ | @topic-not-exist@
awsRdsEventSubscriptionDetails_status :: Lens.Lens' AwsRdsEventSubscriptionDetails (Prelude.Maybe Prelude.Text)
awsRdsEventSubscriptionDetails_status :: (Maybe Text -> f (Maybe Text))
-> AwsRdsEventSubscriptionDetails
-> f AwsRdsEventSubscriptionDetails
awsRdsEventSubscriptionDetails_status = (AwsRdsEventSubscriptionDetails -> Maybe Text)
-> (AwsRdsEventSubscriptionDetails
    -> Maybe Text -> AwsRdsEventSubscriptionDetails)
-> Lens
     AwsRdsEventSubscriptionDetails
     AwsRdsEventSubscriptionDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsEventSubscriptionDetails' {Maybe Text
status :: Maybe Text
$sel:status:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Text
status} -> Maybe Text
status) (\s :: AwsRdsEventSubscriptionDetails
s@AwsRdsEventSubscriptionDetails' {} Maybe Text
a -> AwsRdsEventSubscriptionDetails
s {$sel:status:AwsRdsEventSubscriptionDetails' :: Maybe Text
status = Maybe Text
a} :: AwsRdsEventSubscriptionDetails)

-- | The identifier of the event notification subscription.
awsRdsEventSubscriptionDetails_customerAwsId :: Lens.Lens' AwsRdsEventSubscriptionDetails (Prelude.Maybe Prelude.Text)
awsRdsEventSubscriptionDetails_customerAwsId :: (Maybe Text -> f (Maybe Text))
-> AwsRdsEventSubscriptionDetails
-> f AwsRdsEventSubscriptionDetails
awsRdsEventSubscriptionDetails_customerAwsId = (AwsRdsEventSubscriptionDetails -> Maybe Text)
-> (AwsRdsEventSubscriptionDetails
    -> Maybe Text -> AwsRdsEventSubscriptionDetails)
-> Lens
     AwsRdsEventSubscriptionDetails
     AwsRdsEventSubscriptionDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsEventSubscriptionDetails' {Maybe Text
customerAwsId :: Maybe Text
$sel:customerAwsId:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Text
customerAwsId} -> Maybe Text
customerAwsId) (\s :: AwsRdsEventSubscriptionDetails
s@AwsRdsEventSubscriptionDetails' {} Maybe Text
a -> AwsRdsEventSubscriptionDetails
s {$sel:customerAwsId:AwsRdsEventSubscriptionDetails' :: Maybe Text
customerAwsId = Maybe Text
a} :: AwsRdsEventSubscriptionDetails)

-- | The identifier of the account that is associated with the event
-- notification subscription.
awsRdsEventSubscriptionDetails_custSubscriptionId :: Lens.Lens' AwsRdsEventSubscriptionDetails (Prelude.Maybe Prelude.Text)
awsRdsEventSubscriptionDetails_custSubscriptionId :: (Maybe Text -> f (Maybe Text))
-> AwsRdsEventSubscriptionDetails
-> f AwsRdsEventSubscriptionDetails
awsRdsEventSubscriptionDetails_custSubscriptionId = (AwsRdsEventSubscriptionDetails -> Maybe Text)
-> (AwsRdsEventSubscriptionDetails
    -> Maybe Text -> AwsRdsEventSubscriptionDetails)
-> Lens
     AwsRdsEventSubscriptionDetails
     AwsRdsEventSubscriptionDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsEventSubscriptionDetails' {Maybe Text
custSubscriptionId :: Maybe Text
$sel:custSubscriptionId:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Text
custSubscriptionId} -> Maybe Text
custSubscriptionId) (\s :: AwsRdsEventSubscriptionDetails
s@AwsRdsEventSubscriptionDetails' {} Maybe Text
a -> AwsRdsEventSubscriptionDetails
s {$sel:custSubscriptionId:AwsRdsEventSubscriptionDetails' :: Maybe Text
custSubscriptionId = Maybe Text
a} :: AwsRdsEventSubscriptionDetails)

-- | The ARN of the SNS topic to post the event notifications to.
awsRdsEventSubscriptionDetails_snsTopicArn :: Lens.Lens' AwsRdsEventSubscriptionDetails (Prelude.Maybe Prelude.Text)
awsRdsEventSubscriptionDetails_snsTopicArn :: (Maybe Text -> f (Maybe Text))
-> AwsRdsEventSubscriptionDetails
-> f AwsRdsEventSubscriptionDetails
awsRdsEventSubscriptionDetails_snsTopicArn = (AwsRdsEventSubscriptionDetails -> Maybe Text)
-> (AwsRdsEventSubscriptionDetails
    -> Maybe Text -> AwsRdsEventSubscriptionDetails)
-> Lens
     AwsRdsEventSubscriptionDetails
     AwsRdsEventSubscriptionDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsEventSubscriptionDetails' {Maybe Text
snsTopicArn :: Maybe Text
$sel:snsTopicArn:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Text
snsTopicArn} -> Maybe Text
snsTopicArn) (\s :: AwsRdsEventSubscriptionDetails
s@AwsRdsEventSubscriptionDetails' {} Maybe Text
a -> AwsRdsEventSubscriptionDetails
s {$sel:snsTopicArn:AwsRdsEventSubscriptionDetails' :: Maybe Text
snsTopicArn = Maybe Text
a} :: AwsRdsEventSubscriptionDetails)

-- | The ARN of the event notification subscription.
awsRdsEventSubscriptionDetails_eventSubscriptionArn :: Lens.Lens' AwsRdsEventSubscriptionDetails (Prelude.Maybe Prelude.Text)
awsRdsEventSubscriptionDetails_eventSubscriptionArn :: (Maybe Text -> f (Maybe Text))
-> AwsRdsEventSubscriptionDetails
-> f AwsRdsEventSubscriptionDetails
awsRdsEventSubscriptionDetails_eventSubscriptionArn = (AwsRdsEventSubscriptionDetails -> Maybe Text)
-> (AwsRdsEventSubscriptionDetails
    -> Maybe Text -> AwsRdsEventSubscriptionDetails)
-> Lens
     AwsRdsEventSubscriptionDetails
     AwsRdsEventSubscriptionDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsEventSubscriptionDetails' {Maybe Text
eventSubscriptionArn :: Maybe Text
$sel:eventSubscriptionArn:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Text
eventSubscriptionArn} -> Maybe Text
eventSubscriptionArn) (\s :: AwsRdsEventSubscriptionDetails
s@AwsRdsEventSubscriptionDetails' {} Maybe Text
a -> AwsRdsEventSubscriptionDetails
s {$sel:eventSubscriptionArn:AwsRdsEventSubscriptionDetails' :: Maybe Text
eventSubscriptionArn = Maybe Text
a} :: AwsRdsEventSubscriptionDetails)

-- | Whether the event notification subscription is enabled.
awsRdsEventSubscriptionDetails_enabled :: Lens.Lens' AwsRdsEventSubscriptionDetails (Prelude.Maybe Prelude.Bool)
awsRdsEventSubscriptionDetails_enabled :: (Maybe Bool -> f (Maybe Bool))
-> AwsRdsEventSubscriptionDetails
-> f AwsRdsEventSubscriptionDetails
awsRdsEventSubscriptionDetails_enabled = (AwsRdsEventSubscriptionDetails -> Maybe Bool)
-> (AwsRdsEventSubscriptionDetails
    -> Maybe Bool -> AwsRdsEventSubscriptionDetails)
-> Lens
     AwsRdsEventSubscriptionDetails
     AwsRdsEventSubscriptionDetails
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsEventSubscriptionDetails' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: AwsRdsEventSubscriptionDetails
s@AwsRdsEventSubscriptionDetails' {} Maybe Bool
a -> AwsRdsEventSubscriptionDetails
s {$sel:enabled:AwsRdsEventSubscriptionDetails' :: Maybe Bool
enabled = Maybe Bool
a} :: AwsRdsEventSubscriptionDetails)

-- | The source type for the event notification subscription.
awsRdsEventSubscriptionDetails_sourceType :: Lens.Lens' AwsRdsEventSubscriptionDetails (Prelude.Maybe Prelude.Text)
awsRdsEventSubscriptionDetails_sourceType :: (Maybe Text -> f (Maybe Text))
-> AwsRdsEventSubscriptionDetails
-> f AwsRdsEventSubscriptionDetails
awsRdsEventSubscriptionDetails_sourceType = (AwsRdsEventSubscriptionDetails -> Maybe Text)
-> (AwsRdsEventSubscriptionDetails
    -> Maybe Text -> AwsRdsEventSubscriptionDetails)
-> Lens
     AwsRdsEventSubscriptionDetails
     AwsRdsEventSubscriptionDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsEventSubscriptionDetails' {Maybe Text
sourceType :: Maybe Text
$sel:sourceType:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Text
sourceType} -> Maybe Text
sourceType) (\s :: AwsRdsEventSubscriptionDetails
s@AwsRdsEventSubscriptionDetails' {} Maybe Text
a -> AwsRdsEventSubscriptionDetails
s {$sel:sourceType:AwsRdsEventSubscriptionDetails' :: Maybe Text
sourceType = Maybe Text
a} :: AwsRdsEventSubscriptionDetails)

-- | The datetime when the event notification subscription was created.
--
-- Uses the @date-time@ format specified in
-- <https://tools.ietf.org/html/rfc3339#section-5.6 RFC 3339 section 5.6, Internet Date\/Time Format>.
-- The value cannot contain spaces. For example,
-- @2020-03-22T13:22:13.933Z@.
awsRdsEventSubscriptionDetails_subscriptionCreationTime :: Lens.Lens' AwsRdsEventSubscriptionDetails (Prelude.Maybe Prelude.Text)
awsRdsEventSubscriptionDetails_subscriptionCreationTime :: (Maybe Text -> f (Maybe Text))
-> AwsRdsEventSubscriptionDetails
-> f AwsRdsEventSubscriptionDetails
awsRdsEventSubscriptionDetails_subscriptionCreationTime = (AwsRdsEventSubscriptionDetails -> Maybe Text)
-> (AwsRdsEventSubscriptionDetails
    -> Maybe Text -> AwsRdsEventSubscriptionDetails)
-> Lens
     AwsRdsEventSubscriptionDetails
     AwsRdsEventSubscriptionDetails
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsEventSubscriptionDetails' {Maybe Text
subscriptionCreationTime :: Maybe Text
$sel:subscriptionCreationTime:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Text
subscriptionCreationTime} -> Maybe Text
subscriptionCreationTime) (\s :: AwsRdsEventSubscriptionDetails
s@AwsRdsEventSubscriptionDetails' {} Maybe Text
a -> AwsRdsEventSubscriptionDetails
s {$sel:subscriptionCreationTime:AwsRdsEventSubscriptionDetails' :: Maybe Text
subscriptionCreationTime = Maybe Text
a} :: AwsRdsEventSubscriptionDetails)

-- | The list of event categories for the event notification subscription.
awsRdsEventSubscriptionDetails_eventCategoriesList :: Lens.Lens' AwsRdsEventSubscriptionDetails (Prelude.Maybe [Prelude.Text])
awsRdsEventSubscriptionDetails_eventCategoriesList :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsRdsEventSubscriptionDetails
-> f AwsRdsEventSubscriptionDetails
awsRdsEventSubscriptionDetails_eventCategoriesList = (AwsRdsEventSubscriptionDetails -> Maybe [Text])
-> (AwsRdsEventSubscriptionDetails
    -> Maybe [Text] -> AwsRdsEventSubscriptionDetails)
-> Lens
     AwsRdsEventSubscriptionDetails
     AwsRdsEventSubscriptionDetails
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsEventSubscriptionDetails' {Maybe [Text]
eventCategoriesList :: Maybe [Text]
$sel:eventCategoriesList:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe [Text]
eventCategoriesList} -> Maybe [Text]
eventCategoriesList) (\s :: AwsRdsEventSubscriptionDetails
s@AwsRdsEventSubscriptionDetails' {} Maybe [Text]
a -> AwsRdsEventSubscriptionDetails
s {$sel:eventCategoriesList:AwsRdsEventSubscriptionDetails' :: Maybe [Text]
eventCategoriesList = Maybe [Text]
a} :: AwsRdsEventSubscriptionDetails) ((Maybe [Text] -> f (Maybe [Text]))
 -> AwsRdsEventSubscriptionDetails
 -> f AwsRdsEventSubscriptionDetails)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsRdsEventSubscriptionDetails
-> f AwsRdsEventSubscriptionDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of source identifiers for the event notification subscription.
awsRdsEventSubscriptionDetails_sourceIdsList :: Lens.Lens' AwsRdsEventSubscriptionDetails (Prelude.Maybe [Prelude.Text])
awsRdsEventSubscriptionDetails_sourceIdsList :: (Maybe [Text] -> f (Maybe [Text]))
-> AwsRdsEventSubscriptionDetails
-> f AwsRdsEventSubscriptionDetails
awsRdsEventSubscriptionDetails_sourceIdsList = (AwsRdsEventSubscriptionDetails -> Maybe [Text])
-> (AwsRdsEventSubscriptionDetails
    -> Maybe [Text] -> AwsRdsEventSubscriptionDetails)
-> Lens
     AwsRdsEventSubscriptionDetails
     AwsRdsEventSubscriptionDetails
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsRdsEventSubscriptionDetails' {Maybe [Text]
sourceIdsList :: Maybe [Text]
$sel:sourceIdsList:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe [Text]
sourceIdsList} -> Maybe [Text]
sourceIdsList) (\s :: AwsRdsEventSubscriptionDetails
s@AwsRdsEventSubscriptionDetails' {} Maybe [Text]
a -> AwsRdsEventSubscriptionDetails
s {$sel:sourceIdsList:AwsRdsEventSubscriptionDetails' :: Maybe [Text]
sourceIdsList = Maybe [Text]
a} :: AwsRdsEventSubscriptionDetails) ((Maybe [Text] -> f (Maybe [Text]))
 -> AwsRdsEventSubscriptionDetails
 -> f AwsRdsEventSubscriptionDetails)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AwsRdsEventSubscriptionDetails
-> f AwsRdsEventSubscriptionDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON AwsRdsEventSubscriptionDetails where
  parseJSON :: Value -> Parser AwsRdsEventSubscriptionDetails
parseJSON =
    String
-> (Object -> Parser AwsRdsEventSubscriptionDetails)
-> Value
-> Parser AwsRdsEventSubscriptionDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AwsRdsEventSubscriptionDetails"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> AwsRdsEventSubscriptionDetails
AwsRdsEventSubscriptionDetails'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe [Text]
 -> AwsRdsEventSubscriptionDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Text]
      -> AwsRdsEventSubscriptionDetails)
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
"Status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Text]
   -> AwsRdsEventSubscriptionDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Text]
      -> AwsRdsEventSubscriptionDetails)
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
"CustomerAwsId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Text]
   -> AwsRdsEventSubscriptionDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Text]
      -> AwsRdsEventSubscriptionDetails)
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
"CustSubscriptionId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Text]
   -> AwsRdsEventSubscriptionDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Text]
      -> AwsRdsEventSubscriptionDetails)
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
"SnsTopicArn")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Text]
   -> AwsRdsEventSubscriptionDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Text]
      -> AwsRdsEventSubscriptionDetails)
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
"EventSubscriptionArn")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Text]
   -> AwsRdsEventSubscriptionDetails)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [Text]
      -> AwsRdsEventSubscriptionDetails)
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
"Enabled")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [Text]
   -> AwsRdsEventSubscriptionDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Text] -> Maybe [Text] -> AwsRdsEventSubscriptionDetails)
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
"SourceType")
            Parser
  (Maybe Text
   -> Maybe [Text] -> Maybe [Text] -> AwsRdsEventSubscriptionDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text] -> Maybe [Text] -> AwsRdsEventSubscriptionDetails)
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
"SubscriptionCreationTime")
            Parser
  (Maybe [Text] -> Maybe [Text] -> AwsRdsEventSubscriptionDetails)
-> Parser (Maybe [Text])
-> Parser (Maybe [Text] -> AwsRdsEventSubscriptionDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventCategoriesList"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser (Maybe [Text] -> AwsRdsEventSubscriptionDetails)
-> Parser (Maybe [Text]) -> Parser AwsRdsEventSubscriptionDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SourceIdsList" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
      )

instance
  Prelude.Hashable
    AwsRdsEventSubscriptionDetails

instance
  Prelude.NFData
    AwsRdsEventSubscriptionDetails

instance Core.ToJSON AwsRdsEventSubscriptionDetails where
  toJSON :: AwsRdsEventSubscriptionDetails -> Value
toJSON AwsRdsEventSubscriptionDetails' {Maybe Bool
Maybe [Text]
Maybe Text
sourceIdsList :: Maybe [Text]
eventCategoriesList :: Maybe [Text]
subscriptionCreationTime :: Maybe Text
sourceType :: Maybe Text
enabled :: Maybe Bool
eventSubscriptionArn :: Maybe Text
snsTopicArn :: Maybe Text
custSubscriptionId :: Maybe Text
customerAwsId :: Maybe Text
status :: Maybe Text
$sel:sourceIdsList:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe [Text]
$sel:eventCategoriesList:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe [Text]
$sel:subscriptionCreationTime:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Text
$sel:sourceType:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Text
$sel:enabled:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Bool
$sel:eventSubscriptionArn:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Text
$sel:snsTopicArn:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Text
$sel:custSubscriptionId:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Text
$sel:customerAwsId:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Text
$sel:status:AwsRdsEventSubscriptionDetails' :: AwsRdsEventSubscriptionDetails -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Status" 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
status,
            (Text
"CustomerAwsId" 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
customerAwsId,
            (Text
"CustSubscriptionId" 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
custSubscriptionId,
            (Text
"SnsTopicArn" 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
snsTopicArn,
            (Text
"EventSubscriptionArn" 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
eventSubscriptionArn,
            (Text
"Enabled" 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
enabled,
            (Text
"SourceType" 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
sourceType,
            (Text
"SubscriptionCreationTime" 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
subscriptionCreationTime,
            (Text
"EventCategoriesList" 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]
eventCategoriesList,
            (Text
"SourceIdsList" 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]
sourceIdsList
          ]
      )