{-# 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.ModifyEventSubscription
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Modifies an existing RDS event notification subscription. You can\'t
-- modify the source identifiers using this call. To change source
-- identifiers for a subscription, use the
-- @AddSourceIdentifierToSubscription@ and
-- @RemoveSourceIdentifierFromSubscription@ calls.
--
-- You can see a list of the event categories for a given source type
-- (@SourceType@) in
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html Events>
-- in the /Amazon RDS User Guide/ or by using the @DescribeEventCategories@
-- operation.
module Amazonka.RDS.ModifyEventSubscription
  ( -- * Creating a Request
    ModifyEventSubscription (..),
    newModifyEventSubscription,

    -- * Request Lenses
    modifyEventSubscription_enabled,
    modifyEventSubscription_eventCategories,
    modifyEventSubscription_snsTopicArn,
    modifyEventSubscription_sourceType,
    modifyEventSubscription_subscriptionName,

    -- * Destructuring the Response
    ModifyEventSubscriptionResponse (..),
    newModifyEventSubscriptionResponse,

    -- * Response Lenses
    modifyEventSubscriptionResponse_eventSubscription,
    modifyEventSubscriptionResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newModifyEventSubscription' smart constructor.
data ModifyEventSubscription = ModifyEventSubscription'
  { -- | A value that indicates whether to activate the subscription.
    ModifyEventSubscription -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
    -- | A list of event categories for a source type (@SourceType@) that you
    -- want to subscribe to. You can see a list of the categories for a given
    -- source type in
    -- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html Events>
    -- in the /Amazon RDS User Guide/ or by using the @DescribeEventCategories@
    -- operation.
    ModifyEventSubscription -> Maybe [Text]
eventCategories :: Prelude.Maybe [Prelude.Text],
    -- | The Amazon Resource Name (ARN) of the SNS topic created for event
    -- notification. The ARN is created by Amazon SNS when you create a topic
    -- and subscribe to it.
    ModifyEventSubscription -> Maybe Text
snsTopicArn :: Prelude.Maybe Prelude.Text,
    -- | The type of source that is generating the events. For example, if you
    -- want to be notified of events generated by a DB instance, you would set
    -- this parameter to db-instance. For RDS Proxy events, specify @db-proxy@.
    -- If this value isn\'t specified, all events are returned.
    --
    -- Valid values: @db-instance@ | @db-cluster@ | @db-parameter-group@ |
    -- @db-security-group@ | @db-snapshot@ | @db-cluster-snapshot@ | @db-proxy@
    ModifyEventSubscription -> Maybe Text
sourceType :: Prelude.Maybe Prelude.Text,
    -- | The name of the RDS event notification subscription.
    ModifyEventSubscription -> Text
subscriptionName :: Prelude.Text
  }
  deriving (ModifyEventSubscription -> ModifyEventSubscription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyEventSubscription -> ModifyEventSubscription -> Bool
$c/= :: ModifyEventSubscription -> ModifyEventSubscription -> Bool
== :: ModifyEventSubscription -> ModifyEventSubscription -> Bool
$c== :: ModifyEventSubscription -> ModifyEventSubscription -> Bool
Prelude.Eq, ReadPrec [ModifyEventSubscription]
ReadPrec ModifyEventSubscription
Int -> ReadS ModifyEventSubscription
ReadS [ModifyEventSubscription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyEventSubscription]
$creadListPrec :: ReadPrec [ModifyEventSubscription]
readPrec :: ReadPrec ModifyEventSubscription
$creadPrec :: ReadPrec ModifyEventSubscription
readList :: ReadS [ModifyEventSubscription]
$creadList :: ReadS [ModifyEventSubscription]
readsPrec :: Int -> ReadS ModifyEventSubscription
$creadsPrec :: Int -> ReadS ModifyEventSubscription
Prelude.Read, Int -> ModifyEventSubscription -> ShowS
[ModifyEventSubscription] -> ShowS
ModifyEventSubscription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyEventSubscription] -> ShowS
$cshowList :: [ModifyEventSubscription] -> ShowS
show :: ModifyEventSubscription -> String
$cshow :: ModifyEventSubscription -> String
showsPrec :: Int -> ModifyEventSubscription -> ShowS
$cshowsPrec :: Int -> ModifyEventSubscription -> ShowS
Prelude.Show, forall x. Rep ModifyEventSubscription x -> ModifyEventSubscription
forall x. ModifyEventSubscription -> Rep ModifyEventSubscription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModifyEventSubscription x -> ModifyEventSubscription
$cfrom :: forall x. ModifyEventSubscription -> Rep ModifyEventSubscription x
Prelude.Generic)

-- |
-- Create a value of 'ModifyEventSubscription' 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:
--
-- 'enabled', 'modifyEventSubscription_enabled' - A value that indicates whether to activate the subscription.
--
-- 'eventCategories', 'modifyEventSubscription_eventCategories' - A list of event categories for a source type (@SourceType@) that you
-- want to subscribe to. You can see a list of the categories for a given
-- source type in
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html Events>
-- in the /Amazon RDS User Guide/ or by using the @DescribeEventCategories@
-- operation.
--
-- 'snsTopicArn', 'modifyEventSubscription_snsTopicArn' - The Amazon Resource Name (ARN) of the SNS topic created for event
-- notification. The ARN is created by Amazon SNS when you create a topic
-- and subscribe to it.
--
-- 'sourceType', 'modifyEventSubscription_sourceType' - The type of source that is generating the events. For example, if you
-- want to be notified of events generated by a DB instance, you would set
-- this parameter to db-instance. For RDS Proxy events, specify @db-proxy@.
-- If this value isn\'t specified, all events are returned.
--
-- Valid values: @db-instance@ | @db-cluster@ | @db-parameter-group@ |
-- @db-security-group@ | @db-snapshot@ | @db-cluster-snapshot@ | @db-proxy@
--
-- 'subscriptionName', 'modifyEventSubscription_subscriptionName' - The name of the RDS event notification subscription.
newModifyEventSubscription ::
  -- | 'subscriptionName'
  Prelude.Text ->
  ModifyEventSubscription
newModifyEventSubscription :: Text -> ModifyEventSubscription
newModifyEventSubscription Text
pSubscriptionName_ =
  ModifyEventSubscription'
    { $sel:enabled:ModifyEventSubscription' :: Maybe Bool
enabled = forall a. Maybe a
Prelude.Nothing,
      $sel:eventCategories:ModifyEventSubscription' :: Maybe [Text]
eventCategories = forall a. Maybe a
Prelude.Nothing,
      $sel:snsTopicArn:ModifyEventSubscription' :: Maybe Text
snsTopicArn = forall a. Maybe a
Prelude.Nothing,
      $sel:sourceType:ModifyEventSubscription' :: Maybe Text
sourceType = forall a. Maybe a
Prelude.Nothing,
      $sel:subscriptionName:ModifyEventSubscription' :: Text
subscriptionName = Text
pSubscriptionName_
    }

-- | A value that indicates whether to activate the subscription.
modifyEventSubscription_enabled :: Lens.Lens' ModifyEventSubscription (Prelude.Maybe Prelude.Bool)
modifyEventSubscription_enabled :: Lens' ModifyEventSubscription (Maybe Bool)
modifyEventSubscription_enabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyEventSubscription' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: ModifyEventSubscription
s@ModifyEventSubscription' {} Maybe Bool
a -> ModifyEventSubscription
s {$sel:enabled:ModifyEventSubscription' :: Maybe Bool
enabled = Maybe Bool
a} :: ModifyEventSubscription)

-- | A list of event categories for a source type (@SourceType@) that you
-- want to subscribe to. You can see a list of the categories for a given
-- source type in
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html Events>
-- in the /Amazon RDS User Guide/ or by using the @DescribeEventCategories@
-- operation.
modifyEventSubscription_eventCategories :: Lens.Lens' ModifyEventSubscription (Prelude.Maybe [Prelude.Text])
modifyEventSubscription_eventCategories :: Lens' ModifyEventSubscription (Maybe [Text])
modifyEventSubscription_eventCategories = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyEventSubscription' {Maybe [Text]
eventCategories :: Maybe [Text]
$sel:eventCategories:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe [Text]
eventCategories} -> Maybe [Text]
eventCategories) (\s :: ModifyEventSubscription
s@ModifyEventSubscription' {} Maybe [Text]
a -> ModifyEventSubscription
s {$sel:eventCategories:ModifyEventSubscription' :: Maybe [Text]
eventCategories = Maybe [Text]
a} :: ModifyEventSubscription) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of the SNS topic created for event
-- notification. The ARN is created by Amazon SNS when you create a topic
-- and subscribe to it.
modifyEventSubscription_snsTopicArn :: Lens.Lens' ModifyEventSubscription (Prelude.Maybe Prelude.Text)
modifyEventSubscription_snsTopicArn :: Lens' ModifyEventSubscription (Maybe Text)
modifyEventSubscription_snsTopicArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyEventSubscription' {Maybe Text
snsTopicArn :: Maybe Text
$sel:snsTopicArn:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe Text
snsTopicArn} -> Maybe Text
snsTopicArn) (\s :: ModifyEventSubscription
s@ModifyEventSubscription' {} Maybe Text
a -> ModifyEventSubscription
s {$sel:snsTopicArn:ModifyEventSubscription' :: Maybe Text
snsTopicArn = Maybe Text
a} :: ModifyEventSubscription)

-- | The type of source that is generating the events. For example, if you
-- want to be notified of events generated by a DB instance, you would set
-- this parameter to db-instance. For RDS Proxy events, specify @db-proxy@.
-- If this value isn\'t specified, all events are returned.
--
-- Valid values: @db-instance@ | @db-cluster@ | @db-parameter-group@ |
-- @db-security-group@ | @db-snapshot@ | @db-cluster-snapshot@ | @db-proxy@
modifyEventSubscription_sourceType :: Lens.Lens' ModifyEventSubscription (Prelude.Maybe Prelude.Text)
modifyEventSubscription_sourceType :: Lens' ModifyEventSubscription (Maybe Text)
modifyEventSubscription_sourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyEventSubscription' {Maybe Text
sourceType :: Maybe Text
$sel:sourceType:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe Text
sourceType} -> Maybe Text
sourceType) (\s :: ModifyEventSubscription
s@ModifyEventSubscription' {} Maybe Text
a -> ModifyEventSubscription
s {$sel:sourceType:ModifyEventSubscription' :: Maybe Text
sourceType = Maybe Text
a} :: ModifyEventSubscription)

-- | The name of the RDS event notification subscription.
modifyEventSubscription_subscriptionName :: Lens.Lens' ModifyEventSubscription Prelude.Text
modifyEventSubscription_subscriptionName :: Lens' ModifyEventSubscription Text
modifyEventSubscription_subscriptionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyEventSubscription' {Text
subscriptionName :: Text
$sel:subscriptionName:ModifyEventSubscription' :: ModifyEventSubscription -> Text
subscriptionName} -> Text
subscriptionName) (\s :: ModifyEventSubscription
s@ModifyEventSubscription' {} Text
a -> ModifyEventSubscription
s {$sel:subscriptionName:ModifyEventSubscription' :: Text
subscriptionName = Text
a} :: ModifyEventSubscription)

instance Core.AWSRequest ModifyEventSubscription where
  type
    AWSResponse ModifyEventSubscription =
      ModifyEventSubscriptionResponse
  request :: (Service -> Service)
-> ModifyEventSubscription -> Request ModifyEventSubscription
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ModifyEventSubscription
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyEventSubscription)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"ModifyEventSubscriptionResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe EventSubscription -> Int -> ModifyEventSubscriptionResponse
ModifyEventSubscriptionResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"EventSubscription")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ModifyEventSubscription where
  hashWithSalt :: Int -> ModifyEventSubscription -> Int
hashWithSalt Int
_salt ModifyEventSubscription' {Maybe Bool
Maybe [Text]
Maybe Text
Text
subscriptionName :: Text
sourceType :: Maybe Text
snsTopicArn :: Maybe Text
eventCategories :: Maybe [Text]
enabled :: Maybe Bool
$sel:subscriptionName:ModifyEventSubscription' :: ModifyEventSubscription -> Text
$sel:sourceType:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe Text
$sel:snsTopicArn:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe Text
$sel:eventCategories:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe [Text]
$sel:enabled:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
eventCategories
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snsTopicArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
subscriptionName

instance Prelude.NFData ModifyEventSubscription where
  rnf :: ModifyEventSubscription -> ()
rnf ModifyEventSubscription' {Maybe Bool
Maybe [Text]
Maybe Text
Text
subscriptionName :: Text
sourceType :: Maybe Text
snsTopicArn :: Maybe Text
eventCategories :: Maybe [Text]
enabled :: Maybe Bool
$sel:subscriptionName:ModifyEventSubscription' :: ModifyEventSubscription -> Text
$sel:sourceType:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe Text
$sel:snsTopicArn:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe Text
$sel:eventCategories:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe [Text]
$sel:enabled:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
eventCategories
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
snsTopicArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
subscriptionName

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

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

instance Data.ToQuery ModifyEventSubscription where
  toQuery :: ModifyEventSubscription -> QueryString
toQuery ModifyEventSubscription' {Maybe Bool
Maybe [Text]
Maybe Text
Text
subscriptionName :: Text
sourceType :: Maybe Text
snsTopicArn :: Maybe Text
eventCategories :: Maybe [Text]
enabled :: Maybe Bool
$sel:subscriptionName:ModifyEventSubscription' :: ModifyEventSubscription -> Text
$sel:sourceType:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe Text
$sel:snsTopicArn:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe Text
$sel:eventCategories:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe [Text]
$sel:enabled:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ModifyEventSubscription" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"Enabled" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
enabled,
        ByteString
"EventCategories"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"EventCategory"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
eventCategories
            ),
        ByteString
"SnsTopicArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
snsTopicArn,
        ByteString
"SourceType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
sourceType,
        ByteString
"SubscriptionName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
subscriptionName
      ]

-- | /See:/ 'newModifyEventSubscriptionResponse' smart constructor.
data ModifyEventSubscriptionResponse = ModifyEventSubscriptionResponse'
  { ModifyEventSubscriptionResponse -> Maybe EventSubscription
eventSubscription :: Prelude.Maybe EventSubscription,
    -- | The response's http status code.
    ModifyEventSubscriptionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ModifyEventSubscriptionResponse
-> ModifyEventSubscriptionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyEventSubscriptionResponse
-> ModifyEventSubscriptionResponse -> Bool
$c/= :: ModifyEventSubscriptionResponse
-> ModifyEventSubscriptionResponse -> Bool
== :: ModifyEventSubscriptionResponse
-> ModifyEventSubscriptionResponse -> Bool
$c== :: ModifyEventSubscriptionResponse
-> ModifyEventSubscriptionResponse -> Bool
Prelude.Eq, ReadPrec [ModifyEventSubscriptionResponse]
ReadPrec ModifyEventSubscriptionResponse
Int -> ReadS ModifyEventSubscriptionResponse
ReadS [ModifyEventSubscriptionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyEventSubscriptionResponse]
$creadListPrec :: ReadPrec [ModifyEventSubscriptionResponse]
readPrec :: ReadPrec ModifyEventSubscriptionResponse
$creadPrec :: ReadPrec ModifyEventSubscriptionResponse
readList :: ReadS [ModifyEventSubscriptionResponse]
$creadList :: ReadS [ModifyEventSubscriptionResponse]
readsPrec :: Int -> ReadS ModifyEventSubscriptionResponse
$creadsPrec :: Int -> ReadS ModifyEventSubscriptionResponse
Prelude.Read, Int -> ModifyEventSubscriptionResponse -> ShowS
[ModifyEventSubscriptionResponse] -> ShowS
ModifyEventSubscriptionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyEventSubscriptionResponse] -> ShowS
$cshowList :: [ModifyEventSubscriptionResponse] -> ShowS
show :: ModifyEventSubscriptionResponse -> String
$cshow :: ModifyEventSubscriptionResponse -> String
showsPrec :: Int -> ModifyEventSubscriptionResponse -> ShowS
$cshowsPrec :: Int -> ModifyEventSubscriptionResponse -> ShowS
Prelude.Show, forall x.
Rep ModifyEventSubscriptionResponse x
-> ModifyEventSubscriptionResponse
forall x.
ModifyEventSubscriptionResponse
-> Rep ModifyEventSubscriptionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyEventSubscriptionResponse x
-> ModifyEventSubscriptionResponse
$cfrom :: forall x.
ModifyEventSubscriptionResponse
-> Rep ModifyEventSubscriptionResponse x
Prelude.Generic)

-- |
-- Create a value of 'ModifyEventSubscriptionResponse' 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:
--
-- 'eventSubscription', 'modifyEventSubscriptionResponse_eventSubscription' - Undocumented member.
--
-- 'httpStatus', 'modifyEventSubscriptionResponse_httpStatus' - The response's http status code.
newModifyEventSubscriptionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ModifyEventSubscriptionResponse
newModifyEventSubscriptionResponse :: Int -> ModifyEventSubscriptionResponse
newModifyEventSubscriptionResponse Int
pHttpStatus_ =
  ModifyEventSubscriptionResponse'
    { $sel:eventSubscription:ModifyEventSubscriptionResponse' :: Maybe EventSubscription
eventSubscription =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ModifyEventSubscriptionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
modifyEventSubscriptionResponse_eventSubscription :: Lens.Lens' ModifyEventSubscriptionResponse (Prelude.Maybe EventSubscription)
modifyEventSubscriptionResponse_eventSubscription :: Lens' ModifyEventSubscriptionResponse (Maybe EventSubscription)
modifyEventSubscriptionResponse_eventSubscription = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyEventSubscriptionResponse' {Maybe EventSubscription
eventSubscription :: Maybe EventSubscription
$sel:eventSubscription:ModifyEventSubscriptionResponse' :: ModifyEventSubscriptionResponse -> Maybe EventSubscription
eventSubscription} -> Maybe EventSubscription
eventSubscription) (\s :: ModifyEventSubscriptionResponse
s@ModifyEventSubscriptionResponse' {} Maybe EventSubscription
a -> ModifyEventSubscriptionResponse
s {$sel:eventSubscription:ModifyEventSubscriptionResponse' :: Maybe EventSubscription
eventSubscription = Maybe EventSubscription
a} :: ModifyEventSubscriptionResponse)

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

instance
  Prelude.NFData
    ModifyEventSubscriptionResponse
  where
  rnf :: ModifyEventSubscriptionResponse -> ()
rnf ModifyEventSubscriptionResponse' {Int
Maybe EventSubscription
httpStatus :: Int
eventSubscription :: Maybe EventSubscription
$sel:httpStatus:ModifyEventSubscriptionResponse' :: ModifyEventSubscriptionResponse -> Int
$sel:eventSubscription:ModifyEventSubscriptionResponse' :: ModifyEventSubscriptionResponse -> Maybe EventSubscription
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe EventSubscription
eventSubscription
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus