{-# 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.Neptune.ModifyEventSubscription
-- 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)
--
-- Modifies an existing event notification subscription. Note that 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 SourceType by
-- using the __DescribeEventCategories__ action.
module Amazonka.Neptune.ModifyEventSubscription
  ( -- * Creating a Request
    ModifyEventSubscription (..),
    newModifyEventSubscription,

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

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

    -- * Response Lenses
    modifyEventSubscriptionResponse_eventSubscription,
    modifyEventSubscriptionResponse_httpStatus,
  )
where

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

-- | /See:/ 'newModifyEventSubscription' smart constructor.
data ModifyEventSubscription = ModifyEventSubscription'
  { -- | 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,
    -- | A Boolean value; set to __true__ to activate the subscription.
    ModifyEventSubscription -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
    -- | 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. if this value is not specified, all
    -- events are returned.
    --
    -- Valid values: db-instance | db-parameter-group | db-security-group |
    -- db-snapshot
    ModifyEventSubscription -> Maybe Text
sourceType :: Prelude.Maybe Prelude.Text,
    -- | A list of event categories for a SourceType that you want to subscribe
    -- to. You can see a list of the categories for a given SourceType by using
    -- the __DescribeEventCategories__ action.
    ModifyEventSubscription -> Maybe [Text]
eventCategories :: Prelude.Maybe [Prelude.Text],
    -- | The name of the event notification subscription.
    ModifyEventSubscription -> Text
subscriptionName :: Prelude.Text
  }
  deriving (ModifyEventSubscription -> ModifyEventSubscription -> Bool
(ModifyEventSubscription -> ModifyEventSubscription -> Bool)
-> (ModifyEventSubscription -> ModifyEventSubscription -> Bool)
-> Eq ModifyEventSubscription
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]
(Int -> ReadS ModifyEventSubscription)
-> ReadS [ModifyEventSubscription]
-> ReadPrec ModifyEventSubscription
-> ReadPrec [ModifyEventSubscription]
-> Read 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
(Int -> ModifyEventSubscription -> ShowS)
-> (ModifyEventSubscription -> String)
-> ([ModifyEventSubscription] -> ShowS)
-> Show ModifyEventSubscription
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.
 ModifyEventSubscription -> Rep ModifyEventSubscription x)
-> (forall x.
    Rep ModifyEventSubscription x -> ModifyEventSubscription)
-> Generic ModifyEventSubscription
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:
--
-- '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.
--
-- 'enabled', 'modifyEventSubscription_enabled' - A Boolean value; set to __true__ to activate the subscription.
--
-- '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. if this value is not specified, all
-- events are returned.
--
-- Valid values: db-instance | db-parameter-group | db-security-group |
-- db-snapshot
--
-- 'eventCategories', 'modifyEventSubscription_eventCategories' - A list of event categories for a SourceType that you want to subscribe
-- to. You can see a list of the categories for a given SourceType by using
-- the __DescribeEventCategories__ action.
--
-- 'subscriptionName', 'modifyEventSubscription_subscriptionName' - The name of the event notification subscription.
newModifyEventSubscription ::
  -- | 'subscriptionName'
  Prelude.Text ->
  ModifyEventSubscription
newModifyEventSubscription :: Text -> ModifyEventSubscription
newModifyEventSubscription Text
pSubscriptionName_ =
  ModifyEventSubscription' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Text
-> ModifyEventSubscription
ModifyEventSubscription'
    { $sel:snsTopicArn:ModifyEventSubscription' :: Maybe Text
snsTopicArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enabled:ModifyEventSubscription' :: Maybe Bool
enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceType:ModifyEventSubscription' :: Maybe Text
sourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:eventCategories:ModifyEventSubscription' :: Maybe [Text]
eventCategories = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:subscriptionName:ModifyEventSubscription' :: Text
subscriptionName = Text
pSubscriptionName_
    }

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

-- | A Boolean value; set to __true__ to activate the subscription.
modifyEventSubscription_enabled :: Lens.Lens' ModifyEventSubscription (Prelude.Maybe Prelude.Bool)
modifyEventSubscription_enabled :: (Maybe Bool -> f (Maybe Bool))
-> ModifyEventSubscription -> f ModifyEventSubscription
modifyEventSubscription_enabled = (ModifyEventSubscription -> Maybe Bool)
-> (ModifyEventSubscription
    -> Maybe Bool -> ModifyEventSubscription)
-> Lens
     ModifyEventSubscription
     ModifyEventSubscription
     (Maybe Bool)
     (Maybe Bool)
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)

-- | 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. if this value is not specified, all
-- events are returned.
--
-- Valid values: db-instance | db-parameter-group | db-security-group |
-- db-snapshot
modifyEventSubscription_sourceType :: Lens.Lens' ModifyEventSubscription (Prelude.Maybe Prelude.Text)
modifyEventSubscription_sourceType :: (Maybe Text -> f (Maybe Text))
-> ModifyEventSubscription -> f ModifyEventSubscription
modifyEventSubscription_sourceType = (ModifyEventSubscription -> Maybe Text)
-> (ModifyEventSubscription
    -> Maybe Text -> ModifyEventSubscription)
-> Lens
     ModifyEventSubscription
     ModifyEventSubscription
     (Maybe Text)
     (Maybe Text)
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)

-- | A list of event categories for a SourceType that you want to subscribe
-- to. You can see a list of the categories for a given SourceType by using
-- the __DescribeEventCategories__ action.
modifyEventSubscription_eventCategories :: Lens.Lens' ModifyEventSubscription (Prelude.Maybe [Prelude.Text])
modifyEventSubscription_eventCategories :: (Maybe [Text] -> f (Maybe [Text]))
-> ModifyEventSubscription -> f ModifyEventSubscription
modifyEventSubscription_eventCategories = (ModifyEventSubscription -> Maybe [Text])
-> (ModifyEventSubscription
    -> Maybe [Text] -> ModifyEventSubscription)
-> Lens
     ModifyEventSubscription
     ModifyEventSubscription
     (Maybe [Text])
     (Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
 -> ModifyEventSubscription -> f ModifyEventSubscription)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ModifyEventSubscription
-> f ModifyEventSubscription
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

-- | The name of the event notification subscription.
modifyEventSubscription_subscriptionName :: Lens.Lens' ModifyEventSubscription Prelude.Text
modifyEventSubscription_subscriptionName :: (Text -> f Text)
-> ModifyEventSubscription -> f ModifyEventSubscription
modifyEventSubscription_subscriptionName = (ModifyEventSubscription -> Text)
-> (ModifyEventSubscription -> Text -> ModifyEventSubscription)
-> Lens ModifyEventSubscription ModifyEventSubscription Text Text
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 :: ModifyEventSubscription -> Request ModifyEventSubscription
request = Service
-> ModifyEventSubscription -> Request ModifyEventSubscription
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ModifyEventSubscription
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyEventSubscription)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ModifyEventSubscription))
-> Logger
-> Service
-> Proxy ModifyEventSubscription
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyEventSubscription)))
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
"ModifyEventSubscriptionResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe EventSubscription -> Int -> ModifyEventSubscriptionResponse
ModifyEventSubscriptionResponse'
            (Maybe EventSubscription -> Int -> ModifyEventSubscriptionResponse)
-> Either String (Maybe EventSubscription)
-> Either String (Int -> ModifyEventSubscriptionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe EventSubscription)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EventSubscription")
            Either String (Int -> ModifyEventSubscriptionResponse)
-> Either String Int
-> Either String ModifyEventSubscriptionResponse
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 ModifyEventSubscription

instance Prelude.NFData ModifyEventSubscription

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

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

instance Core.ToQuery ModifyEventSubscription where
  toQuery :: ModifyEventSubscription -> QueryString
toQuery ModifyEventSubscription' {Maybe Bool
Maybe [Text]
Maybe Text
Text
subscriptionName :: Text
eventCategories :: Maybe [Text]
sourceType :: Maybe Text
enabled :: Maybe Bool
snsTopicArn :: Maybe Text
$sel:subscriptionName:ModifyEventSubscription' :: ModifyEventSubscription -> Text
$sel:eventCategories:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe [Text]
$sel:sourceType:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe Text
$sel:enabled:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe Bool
$sel:snsTopicArn:ModifyEventSubscription' :: ModifyEventSubscription -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ModifyEventSubscription" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"SnsTopicArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
snsTopicArn,
        ByteString
"Enabled" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
enabled,
        ByteString
"SourceType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
sourceType,
        ByteString
"EventCategories"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"EventCategory"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
eventCategories
            ),
        ByteString
"SubscriptionName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: 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
(ModifyEventSubscriptionResponse
 -> ModifyEventSubscriptionResponse -> Bool)
-> (ModifyEventSubscriptionResponse
    -> ModifyEventSubscriptionResponse -> Bool)
-> Eq ModifyEventSubscriptionResponse
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]
(Int -> ReadS ModifyEventSubscriptionResponse)
-> ReadS [ModifyEventSubscriptionResponse]
-> ReadPrec ModifyEventSubscriptionResponse
-> ReadPrec [ModifyEventSubscriptionResponse]
-> Read 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
(Int -> ModifyEventSubscriptionResponse -> ShowS)
-> (ModifyEventSubscriptionResponse -> String)
-> ([ModifyEventSubscriptionResponse] -> ShowS)
-> Show ModifyEventSubscriptionResponse
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.
 ModifyEventSubscriptionResponse
 -> Rep ModifyEventSubscriptionResponse x)
-> (forall x.
    Rep ModifyEventSubscriptionResponse x
    -> ModifyEventSubscriptionResponse)
-> Generic ModifyEventSubscriptionResponse
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' :: Maybe EventSubscription -> Int -> ModifyEventSubscriptionResponse
ModifyEventSubscriptionResponse'
    { $sel:eventSubscription:ModifyEventSubscriptionResponse' :: Maybe EventSubscription
eventSubscription =
        Maybe 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 :: (Maybe EventSubscription -> f (Maybe EventSubscription))
-> ModifyEventSubscriptionResponse
-> f ModifyEventSubscriptionResponse
modifyEventSubscriptionResponse_eventSubscription = (ModifyEventSubscriptionResponse -> Maybe EventSubscription)
-> (ModifyEventSubscriptionResponse
    -> Maybe EventSubscription -> ModifyEventSubscriptionResponse)
-> Lens
     ModifyEventSubscriptionResponse
     ModifyEventSubscriptionResponse
     (Maybe EventSubscription)
     (Maybe 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 :: (Int -> f Int)
-> ModifyEventSubscriptionResponse
-> f ModifyEventSubscriptionResponse
modifyEventSubscriptionResponse_httpStatus = (ModifyEventSubscriptionResponse -> Int)
-> (ModifyEventSubscriptionResponse
    -> Int -> ModifyEventSubscriptionResponse)
-> Lens
     ModifyEventSubscriptionResponse
     ModifyEventSubscriptionResponse
     Int
     Int
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