{-# 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.CodeStarNotifications.UpdateNotificationRule
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a notification rule for a resource. You can change the events
-- that trigger the notification rule, the status of the rule, and the
-- targets that receive the notifications.
--
-- To add or remove tags for a notification rule, you must use TagResource
-- and UntagResource.
module Amazonka.CodeStarNotifications.UpdateNotificationRule
  ( -- * Creating a Request
    UpdateNotificationRule (..),
    newUpdateNotificationRule,

    -- * Request Lenses
    updateNotificationRule_detailType,
    updateNotificationRule_eventTypeIds,
    updateNotificationRule_name,
    updateNotificationRule_status,
    updateNotificationRule_targets,
    updateNotificationRule_arn,

    -- * Destructuring the Response
    UpdateNotificationRuleResponse (..),
    newUpdateNotificationRuleResponse,

    -- * Response Lenses
    updateNotificationRuleResponse_httpStatus,
  )
where

import Amazonka.CodeStarNotifications.Types
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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateNotificationRule' smart constructor.
data UpdateNotificationRule = UpdateNotificationRule'
  { -- | The level of detail to include in the notifications for this resource.
    -- BASIC will include only the contents of the event as it would appear in
    -- Amazon CloudWatch. FULL will include any supplemental information
    -- provided by AWS CodeStar Notifications and\/or the service for the
    -- resource for which the notification is created.
    UpdateNotificationRule -> Maybe DetailType
detailType :: Prelude.Maybe DetailType,
    -- | A list of event types associated with this notification rule. For a
    -- complete list of event types and IDs, see
    -- <https://docs.aws.amazon.com/codestar-notifications/latest/userguide/concepts.html#concepts-api Notification concepts>
    -- in the /Developer Tools Console User Guide/.
    UpdateNotificationRule -> Maybe [Text]
eventTypeIds :: Prelude.Maybe [Prelude.Text],
    -- | The name of the notification rule.
    UpdateNotificationRule -> Maybe (Sensitive Text)
name :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The status of the notification rule. Valid statuses include enabled
    -- (sending notifications) or disabled (not sending notifications).
    UpdateNotificationRule -> Maybe NotificationRuleStatus
status :: Prelude.Maybe NotificationRuleStatus,
    -- | The address and type of the targets to receive notifications from this
    -- notification rule.
    UpdateNotificationRule -> Maybe [Target]
targets :: Prelude.Maybe [Target],
    -- | The Amazon Resource Name (ARN) of the notification rule.
    UpdateNotificationRule -> Text
arn :: Prelude.Text
  }
  deriving (UpdateNotificationRule -> UpdateNotificationRule -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateNotificationRule -> UpdateNotificationRule -> Bool
$c/= :: UpdateNotificationRule -> UpdateNotificationRule -> Bool
== :: UpdateNotificationRule -> UpdateNotificationRule -> Bool
$c== :: UpdateNotificationRule -> UpdateNotificationRule -> Bool
Prelude.Eq, Int -> UpdateNotificationRule -> ShowS
[UpdateNotificationRule] -> ShowS
UpdateNotificationRule -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateNotificationRule] -> ShowS
$cshowList :: [UpdateNotificationRule] -> ShowS
show :: UpdateNotificationRule -> String
$cshow :: UpdateNotificationRule -> String
showsPrec :: Int -> UpdateNotificationRule -> ShowS
$cshowsPrec :: Int -> UpdateNotificationRule -> ShowS
Prelude.Show, forall x. Rep UpdateNotificationRule x -> UpdateNotificationRule
forall x. UpdateNotificationRule -> Rep UpdateNotificationRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateNotificationRule x -> UpdateNotificationRule
$cfrom :: forall x. UpdateNotificationRule -> Rep UpdateNotificationRule x
Prelude.Generic)

-- |
-- Create a value of 'UpdateNotificationRule' 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:
--
-- 'detailType', 'updateNotificationRule_detailType' - The level of detail to include in the notifications for this resource.
-- BASIC will include only the contents of the event as it would appear in
-- Amazon CloudWatch. FULL will include any supplemental information
-- provided by AWS CodeStar Notifications and\/or the service for the
-- resource for which the notification is created.
--
-- 'eventTypeIds', 'updateNotificationRule_eventTypeIds' - A list of event types associated with this notification rule. For a
-- complete list of event types and IDs, see
-- <https://docs.aws.amazon.com/codestar-notifications/latest/userguide/concepts.html#concepts-api Notification concepts>
-- in the /Developer Tools Console User Guide/.
--
-- 'name', 'updateNotificationRule_name' - The name of the notification rule.
--
-- 'status', 'updateNotificationRule_status' - The status of the notification rule. Valid statuses include enabled
-- (sending notifications) or disabled (not sending notifications).
--
-- 'targets', 'updateNotificationRule_targets' - The address and type of the targets to receive notifications from this
-- notification rule.
--
-- 'arn', 'updateNotificationRule_arn' - The Amazon Resource Name (ARN) of the notification rule.
newUpdateNotificationRule ::
  -- | 'arn'
  Prelude.Text ->
  UpdateNotificationRule
newUpdateNotificationRule :: Text -> UpdateNotificationRule
newUpdateNotificationRule Text
pArn_ =
  UpdateNotificationRule'
    { $sel:detailType:UpdateNotificationRule' :: Maybe DetailType
detailType =
        forall a. Maybe a
Prelude.Nothing,
      $sel:eventTypeIds:UpdateNotificationRule' :: Maybe [Text]
eventTypeIds = forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateNotificationRule' :: Maybe (Sensitive Text)
name = forall a. Maybe a
Prelude.Nothing,
      $sel:status:UpdateNotificationRule' :: Maybe NotificationRuleStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:targets:UpdateNotificationRule' :: Maybe [Target]
targets = forall a. Maybe a
Prelude.Nothing,
      $sel:arn:UpdateNotificationRule' :: Text
arn = Text
pArn_
    }

-- | The level of detail to include in the notifications for this resource.
-- BASIC will include only the contents of the event as it would appear in
-- Amazon CloudWatch. FULL will include any supplemental information
-- provided by AWS CodeStar Notifications and\/or the service for the
-- resource for which the notification is created.
updateNotificationRule_detailType :: Lens.Lens' UpdateNotificationRule (Prelude.Maybe DetailType)
updateNotificationRule_detailType :: Lens' UpdateNotificationRule (Maybe DetailType)
updateNotificationRule_detailType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotificationRule' {Maybe DetailType
detailType :: Maybe DetailType
$sel:detailType:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe DetailType
detailType} -> Maybe DetailType
detailType) (\s :: UpdateNotificationRule
s@UpdateNotificationRule' {} Maybe DetailType
a -> UpdateNotificationRule
s {$sel:detailType:UpdateNotificationRule' :: Maybe DetailType
detailType = Maybe DetailType
a} :: UpdateNotificationRule)

-- | A list of event types associated with this notification rule. For a
-- complete list of event types and IDs, see
-- <https://docs.aws.amazon.com/codestar-notifications/latest/userguide/concepts.html#concepts-api Notification concepts>
-- in the /Developer Tools Console User Guide/.
updateNotificationRule_eventTypeIds :: Lens.Lens' UpdateNotificationRule (Prelude.Maybe [Prelude.Text])
updateNotificationRule_eventTypeIds :: Lens' UpdateNotificationRule (Maybe [Text])
updateNotificationRule_eventTypeIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotificationRule' {Maybe [Text]
eventTypeIds :: Maybe [Text]
$sel:eventTypeIds:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe [Text]
eventTypeIds} -> Maybe [Text]
eventTypeIds) (\s :: UpdateNotificationRule
s@UpdateNotificationRule' {} Maybe [Text]
a -> UpdateNotificationRule
s {$sel:eventTypeIds:UpdateNotificationRule' :: Maybe [Text]
eventTypeIds = Maybe [Text]
a} :: UpdateNotificationRule) 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 name of the notification rule.
updateNotificationRule_name :: Lens.Lens' UpdateNotificationRule (Prelude.Maybe Prelude.Text)
updateNotificationRule_name :: Lens' UpdateNotificationRule (Maybe Text)
updateNotificationRule_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotificationRule' {Maybe (Sensitive Text)
name :: Maybe (Sensitive Text)
$sel:name:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe (Sensitive Text)
name} -> Maybe (Sensitive Text)
name) (\s :: UpdateNotificationRule
s@UpdateNotificationRule' {} Maybe (Sensitive Text)
a -> UpdateNotificationRule
s {$sel:name:UpdateNotificationRule' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
a} :: UpdateNotificationRule) 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 a. Iso' (Sensitive a) a
Data._Sensitive

-- | The status of the notification rule. Valid statuses include enabled
-- (sending notifications) or disabled (not sending notifications).
updateNotificationRule_status :: Lens.Lens' UpdateNotificationRule (Prelude.Maybe NotificationRuleStatus)
updateNotificationRule_status :: Lens' UpdateNotificationRule (Maybe NotificationRuleStatus)
updateNotificationRule_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotificationRule' {Maybe NotificationRuleStatus
status :: Maybe NotificationRuleStatus
$sel:status:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe NotificationRuleStatus
status} -> Maybe NotificationRuleStatus
status) (\s :: UpdateNotificationRule
s@UpdateNotificationRule' {} Maybe NotificationRuleStatus
a -> UpdateNotificationRule
s {$sel:status:UpdateNotificationRule' :: Maybe NotificationRuleStatus
status = Maybe NotificationRuleStatus
a} :: UpdateNotificationRule)

-- | The address and type of the targets to receive notifications from this
-- notification rule.
updateNotificationRule_targets :: Lens.Lens' UpdateNotificationRule (Prelude.Maybe [Target])
updateNotificationRule_targets :: Lens' UpdateNotificationRule (Maybe [Target])
updateNotificationRule_targets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotificationRule' {Maybe [Target]
targets :: Maybe [Target]
$sel:targets:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe [Target]
targets} -> Maybe [Target]
targets) (\s :: UpdateNotificationRule
s@UpdateNotificationRule' {} Maybe [Target]
a -> UpdateNotificationRule
s {$sel:targets:UpdateNotificationRule' :: Maybe [Target]
targets = Maybe [Target]
a} :: UpdateNotificationRule) 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 notification rule.
updateNotificationRule_arn :: Lens.Lens' UpdateNotificationRule Prelude.Text
updateNotificationRule_arn :: Lens' UpdateNotificationRule Text
updateNotificationRule_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotificationRule' {Text
arn :: Text
$sel:arn:UpdateNotificationRule' :: UpdateNotificationRule -> Text
arn} -> Text
arn) (\s :: UpdateNotificationRule
s@UpdateNotificationRule' {} Text
a -> UpdateNotificationRule
s {$sel:arn:UpdateNotificationRule' :: Text
arn = Text
a} :: UpdateNotificationRule)

instance Core.AWSRequest UpdateNotificationRule where
  type
    AWSResponse UpdateNotificationRule =
      UpdateNotificationRuleResponse
  request :: (Service -> Service)
-> UpdateNotificationRule -> Request UpdateNotificationRule
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateNotificationRule
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateNotificationRule)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> UpdateNotificationRuleResponse
UpdateNotificationRuleResponse'
            forall (f :: * -> *) a b. Functor 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 UpdateNotificationRule where
  hashWithSalt :: Int -> UpdateNotificationRule -> Int
hashWithSalt Int
_salt UpdateNotificationRule' {Maybe [Text]
Maybe [Target]
Maybe (Sensitive Text)
Maybe DetailType
Maybe NotificationRuleStatus
Text
arn :: Text
targets :: Maybe [Target]
status :: Maybe NotificationRuleStatus
name :: Maybe (Sensitive Text)
eventTypeIds :: Maybe [Text]
detailType :: Maybe DetailType
$sel:arn:UpdateNotificationRule' :: UpdateNotificationRule -> Text
$sel:targets:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe [Target]
$sel:status:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe NotificationRuleStatus
$sel:name:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe (Sensitive Text)
$sel:eventTypeIds:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe [Text]
$sel:detailType:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe DetailType
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DetailType
detailType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
eventTypeIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NotificationRuleStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Target]
targets
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn

instance Prelude.NFData UpdateNotificationRule where
  rnf :: UpdateNotificationRule -> ()
rnf UpdateNotificationRule' {Maybe [Text]
Maybe [Target]
Maybe (Sensitive Text)
Maybe DetailType
Maybe NotificationRuleStatus
Text
arn :: Text
targets :: Maybe [Target]
status :: Maybe NotificationRuleStatus
name :: Maybe (Sensitive Text)
eventTypeIds :: Maybe [Text]
detailType :: Maybe DetailType
$sel:arn:UpdateNotificationRule' :: UpdateNotificationRule -> Text
$sel:targets:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe [Target]
$sel:status:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe NotificationRuleStatus
$sel:name:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe (Sensitive Text)
$sel:eventTypeIds:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe [Text]
$sel:detailType:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe DetailType
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe DetailType
detailType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
eventTypeIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NotificationRuleStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Target]
targets
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn

instance Data.ToHeaders UpdateNotificationRule where
  toHeaders :: UpdateNotificationRule -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON UpdateNotificationRule where
  toJSON :: UpdateNotificationRule -> Value
toJSON UpdateNotificationRule' {Maybe [Text]
Maybe [Target]
Maybe (Sensitive Text)
Maybe DetailType
Maybe NotificationRuleStatus
Text
arn :: Text
targets :: Maybe [Target]
status :: Maybe NotificationRuleStatus
name :: Maybe (Sensitive Text)
eventTypeIds :: Maybe [Text]
detailType :: Maybe DetailType
$sel:arn:UpdateNotificationRule' :: UpdateNotificationRule -> Text
$sel:targets:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe [Target]
$sel:status:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe NotificationRuleStatus
$sel:name:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe (Sensitive Text)
$sel:eventTypeIds:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe [Text]
$sel:detailType:UpdateNotificationRule' :: UpdateNotificationRule -> Maybe DetailType
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"DetailType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DetailType
detailType,
            (Key
"EventTypeIds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
eventTypeIds,
            (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
name,
            (Key
"Status" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NotificationRuleStatus
status,
            (Key
"Targets" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Target]
targets,
            forall a. a -> Maybe a
Prelude.Just (Key
"Arn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
arn)
          ]
      )

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

instance Data.ToQuery UpdateNotificationRule where
  toQuery :: UpdateNotificationRule -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

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

-- |
-- Create a value of 'UpdateNotificationRuleResponse' 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:
--
-- 'httpStatus', 'updateNotificationRuleResponse_httpStatus' - The response's http status code.
newUpdateNotificationRuleResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateNotificationRuleResponse
newUpdateNotificationRuleResponse :: Int -> UpdateNotificationRuleResponse
newUpdateNotificationRuleResponse Int
pHttpStatus_ =
  UpdateNotificationRuleResponse'
    { $sel:httpStatus:UpdateNotificationRuleResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance
  Prelude.NFData
    UpdateNotificationRuleResponse
  where
  rnf :: UpdateNotificationRuleResponse -> ()
rnf UpdateNotificationRuleResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateNotificationRuleResponse' :: UpdateNotificationRuleResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus