{-# 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.DescribeNotificationRule
-- 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)
--
-- Returns information about a specified notification rule.
module Amazonka.CodeStarNotifications.DescribeNotificationRule
  ( -- * Creating a Request
    DescribeNotificationRule (..),
    newDescribeNotificationRule,

    -- * Request Lenses
    describeNotificationRule_arn,

    -- * Destructuring the Response
    DescribeNotificationRuleResponse (..),
    newDescribeNotificationRuleResponse,

    -- * Response Lenses
    describeNotificationRuleResponse_status,
    describeNotificationRuleResponse_eventTypes,
    describeNotificationRuleResponse_lastModifiedTimestamp,
    describeNotificationRuleResponse_createdBy,
    describeNotificationRuleResponse_detailType,
    describeNotificationRuleResponse_name,
    describeNotificationRuleResponse_targets,
    describeNotificationRuleResponse_resource,
    describeNotificationRuleResponse_createdTimestamp,
    describeNotificationRuleResponse_tags,
    describeNotificationRuleResponse_httpStatus,
    describeNotificationRuleResponse_arn,
  )
where

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

-- | /See:/ 'newDescribeNotificationRule' smart constructor.
data DescribeNotificationRule = DescribeNotificationRule'
  { -- | The Amazon Resource Name (ARN) of the notification rule.
    DescribeNotificationRule -> Text
arn :: Prelude.Text
  }
  deriving (DescribeNotificationRule -> DescribeNotificationRule -> Bool
(DescribeNotificationRule -> DescribeNotificationRule -> Bool)
-> (DescribeNotificationRule -> DescribeNotificationRule -> Bool)
-> Eq DescribeNotificationRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeNotificationRule -> DescribeNotificationRule -> Bool
$c/= :: DescribeNotificationRule -> DescribeNotificationRule -> Bool
== :: DescribeNotificationRule -> DescribeNotificationRule -> Bool
$c== :: DescribeNotificationRule -> DescribeNotificationRule -> Bool
Prelude.Eq, ReadPrec [DescribeNotificationRule]
ReadPrec DescribeNotificationRule
Int -> ReadS DescribeNotificationRule
ReadS [DescribeNotificationRule]
(Int -> ReadS DescribeNotificationRule)
-> ReadS [DescribeNotificationRule]
-> ReadPrec DescribeNotificationRule
-> ReadPrec [DescribeNotificationRule]
-> Read DescribeNotificationRule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeNotificationRule]
$creadListPrec :: ReadPrec [DescribeNotificationRule]
readPrec :: ReadPrec DescribeNotificationRule
$creadPrec :: ReadPrec DescribeNotificationRule
readList :: ReadS [DescribeNotificationRule]
$creadList :: ReadS [DescribeNotificationRule]
readsPrec :: Int -> ReadS DescribeNotificationRule
$creadsPrec :: Int -> ReadS DescribeNotificationRule
Prelude.Read, Int -> DescribeNotificationRule -> ShowS
[DescribeNotificationRule] -> ShowS
DescribeNotificationRule -> String
(Int -> DescribeNotificationRule -> ShowS)
-> (DescribeNotificationRule -> String)
-> ([DescribeNotificationRule] -> ShowS)
-> Show DescribeNotificationRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeNotificationRule] -> ShowS
$cshowList :: [DescribeNotificationRule] -> ShowS
show :: DescribeNotificationRule -> String
$cshow :: DescribeNotificationRule -> String
showsPrec :: Int -> DescribeNotificationRule -> ShowS
$cshowsPrec :: Int -> DescribeNotificationRule -> ShowS
Prelude.Show, (forall x.
 DescribeNotificationRule -> Rep DescribeNotificationRule x)
-> (forall x.
    Rep DescribeNotificationRule x -> DescribeNotificationRule)
-> Generic DescribeNotificationRule
forall x.
Rep DescribeNotificationRule x -> DescribeNotificationRule
forall x.
DescribeNotificationRule -> Rep DescribeNotificationRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeNotificationRule x -> DescribeNotificationRule
$cfrom :: forall x.
DescribeNotificationRule -> Rep DescribeNotificationRule x
Prelude.Generic)

-- |
-- Create a value of 'DescribeNotificationRule' 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:
--
-- 'arn', 'describeNotificationRule_arn' - The Amazon Resource Name (ARN) of the notification rule.
newDescribeNotificationRule ::
  -- | 'arn'
  Prelude.Text ->
  DescribeNotificationRule
newDescribeNotificationRule :: Text -> DescribeNotificationRule
newDescribeNotificationRule Text
pArn_ =
  DescribeNotificationRule' :: Text -> DescribeNotificationRule
DescribeNotificationRule' {$sel:arn:DescribeNotificationRule' :: Text
arn = Text
pArn_}

-- | The Amazon Resource Name (ARN) of the notification rule.
describeNotificationRule_arn :: Lens.Lens' DescribeNotificationRule Prelude.Text
describeNotificationRule_arn :: (Text -> f Text)
-> DescribeNotificationRule -> f DescribeNotificationRule
describeNotificationRule_arn = (DescribeNotificationRule -> Text)
-> (DescribeNotificationRule -> Text -> DescribeNotificationRule)
-> Lens DescribeNotificationRule DescribeNotificationRule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationRule' {Text
arn :: Text
$sel:arn:DescribeNotificationRule' :: DescribeNotificationRule -> Text
arn} -> Text
arn) (\s :: DescribeNotificationRule
s@DescribeNotificationRule' {} Text
a -> DescribeNotificationRule
s {$sel:arn:DescribeNotificationRule' :: Text
arn = Text
a} :: DescribeNotificationRule)

instance Core.AWSRequest DescribeNotificationRule where
  type
    AWSResponse DescribeNotificationRule =
      DescribeNotificationRuleResponse
  request :: DescribeNotificationRule -> Request DescribeNotificationRule
request = Service
-> DescribeNotificationRule -> Request DescribeNotificationRule
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeNotificationRule
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeNotificationRule)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeNotificationRule))
-> Logger
-> Service
-> Proxy DescribeNotificationRule
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeNotificationRule)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe NotificationRuleStatus
-> Maybe [EventTypeSummary]
-> Maybe POSIX
-> Maybe Text
-> Maybe DetailType
-> Maybe (Sensitive Text)
-> Maybe [TargetSummary]
-> Maybe Text
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> DescribeNotificationRuleResponse
DescribeNotificationRuleResponse'
            (Maybe NotificationRuleStatus
 -> Maybe [EventTypeSummary]
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe DetailType
 -> Maybe (Sensitive Text)
 -> Maybe [TargetSummary]
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe (HashMap Text Text)
 -> Int
 -> Text
 -> DescribeNotificationRuleResponse)
-> Either String (Maybe NotificationRuleStatus)
-> Either
     String
     (Maybe [EventTypeSummary]
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe DetailType
      -> Maybe (Sensitive Text)
      -> Maybe [TargetSummary]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> DescribeNotificationRuleResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe NotificationRuleStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe [EventTypeSummary]
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe DetailType
   -> Maybe (Sensitive Text)
   -> Maybe [TargetSummary]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> DescribeNotificationRuleResponse)
-> Either String (Maybe [EventTypeSummary])
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe DetailType
      -> Maybe (Sensitive Text)
      -> Maybe [TargetSummary]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> DescribeNotificationRuleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [EventTypeSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EventTypes" Either String (Maybe (Maybe [EventTypeSummary]))
-> Maybe [EventTypeSummary]
-> Either String (Maybe [EventTypeSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [EventTypeSummary]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe DetailType
   -> Maybe (Sensitive Text)
   -> Maybe [TargetSummary]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> DescribeNotificationRuleResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe DetailType
      -> Maybe (Sensitive Text)
      -> Maybe [TargetSummary]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> DescribeNotificationRuleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastModifiedTimestamp")
            Either
  String
  (Maybe Text
   -> Maybe DetailType
   -> Maybe (Sensitive Text)
   -> Maybe [TargetSummary]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> DescribeNotificationRuleResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe DetailType
      -> Maybe (Sensitive Text)
      -> Maybe [TargetSummary]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> DescribeNotificationRuleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedBy")
            Either
  String
  (Maybe DetailType
   -> Maybe (Sensitive Text)
   -> Maybe [TargetSummary]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> DescribeNotificationRuleResponse)
-> Either String (Maybe DetailType)
-> Either
     String
     (Maybe (Sensitive Text)
      -> Maybe [TargetSummary]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> DescribeNotificationRuleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DetailType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DetailType")
            Either
  String
  (Maybe (Sensitive Text)
   -> Maybe [TargetSummary]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> DescribeNotificationRuleResponse)
-> Either String (Maybe (Sensitive Text))
-> Either
     String
     (Maybe [TargetSummary]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> DescribeNotificationRuleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Name")
            Either
  String
  (Maybe [TargetSummary]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> DescribeNotificationRuleResponse)
-> Either String (Maybe [TargetSummary])
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> DescribeNotificationRuleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [TargetSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Targets" Either String (Maybe (Maybe [TargetSummary]))
-> Maybe [TargetSummary] -> Either String (Maybe [TargetSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [TargetSummary]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> DescribeNotificationRuleResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe (HashMap Text Text)
      -> Int
      -> Text
      -> DescribeNotificationRuleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Resource")
            Either
  String
  (Maybe POSIX
   -> Maybe (HashMap Text Text)
   -> Int
   -> Text
   -> DescribeNotificationRuleResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Int -> Text -> DescribeNotificationRuleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedTimestamp")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Int -> Text -> DescribeNotificationRuleResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> Text -> DescribeNotificationRuleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> Text -> DescribeNotificationRuleResponse)
-> Either String Int
-> Either String (Text -> DescribeNotificationRuleResponse)
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))
            Either String (Text -> DescribeNotificationRuleResponse)
-> Either String Text
-> Either String DescribeNotificationRuleResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"Arn")
      )

instance Prelude.Hashable DescribeNotificationRule

instance Prelude.NFData DescribeNotificationRule

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

instance Core.ToJSON DescribeNotificationRule where
  toJSON :: DescribeNotificationRule -> Value
toJSON DescribeNotificationRule' {Text
arn :: Text
$sel:arn:DescribeNotificationRule' :: DescribeNotificationRule -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Arn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
arn)]
      )

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

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

-- | /See:/ 'newDescribeNotificationRuleResponse' smart constructor.
data DescribeNotificationRuleResponse = DescribeNotificationRuleResponse'
  { -- | The status of the notification rule. Valid statuses are on (sending
    -- notifications) or off (not sending notifications).
    DescribeNotificationRuleResponse -> Maybe NotificationRuleStatus
status :: Prelude.Maybe NotificationRuleStatus,
    -- | A list of the event types associated with the notification rule.
    DescribeNotificationRuleResponse -> Maybe [EventTypeSummary]
eventTypes :: Prelude.Maybe [EventTypeSummary],
    -- | The date and time the notification rule was most recently updated, in
    -- timestamp format.
    DescribeNotificationRuleResponse -> Maybe POSIX
lastModifiedTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The name or email alias of the person who created the notification rule.
    DescribeNotificationRuleResponse -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | The level of detail included in the notifications for this resource.
    -- BASIC will include only the contents of the event as it would appear in
    -- AWS 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.
    DescribeNotificationRuleResponse -> Maybe DetailType
detailType :: Prelude.Maybe DetailType,
    -- | The name of the notification rule.
    DescribeNotificationRuleResponse -> Maybe (Sensitive Text)
name :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | A list of the SNS topics associated with the notification rule.
    DescribeNotificationRuleResponse -> Maybe [TargetSummary]
targets :: Prelude.Maybe [TargetSummary],
    -- | The Amazon Resource Name (ARN) of the resource associated with the
    -- notification rule.
    DescribeNotificationRuleResponse -> Maybe Text
resource :: Prelude.Maybe Prelude.Text,
    -- | The date and time the notification rule was created, in timestamp
    -- format.
    DescribeNotificationRuleResponse -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The tags associated with the notification rule.
    DescribeNotificationRuleResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeNotificationRuleResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the notification rule.
    DescribeNotificationRuleResponse -> Text
arn :: Prelude.Text
  }
  deriving (DescribeNotificationRuleResponse
-> DescribeNotificationRuleResponse -> Bool
(DescribeNotificationRuleResponse
 -> DescribeNotificationRuleResponse -> Bool)
-> (DescribeNotificationRuleResponse
    -> DescribeNotificationRuleResponse -> Bool)
-> Eq DescribeNotificationRuleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeNotificationRuleResponse
-> DescribeNotificationRuleResponse -> Bool
$c/= :: DescribeNotificationRuleResponse
-> DescribeNotificationRuleResponse -> Bool
== :: DescribeNotificationRuleResponse
-> DescribeNotificationRuleResponse -> Bool
$c== :: DescribeNotificationRuleResponse
-> DescribeNotificationRuleResponse -> Bool
Prelude.Eq, Int -> DescribeNotificationRuleResponse -> ShowS
[DescribeNotificationRuleResponse] -> ShowS
DescribeNotificationRuleResponse -> String
(Int -> DescribeNotificationRuleResponse -> ShowS)
-> (DescribeNotificationRuleResponse -> String)
-> ([DescribeNotificationRuleResponse] -> ShowS)
-> Show DescribeNotificationRuleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeNotificationRuleResponse] -> ShowS
$cshowList :: [DescribeNotificationRuleResponse] -> ShowS
show :: DescribeNotificationRuleResponse -> String
$cshow :: DescribeNotificationRuleResponse -> String
showsPrec :: Int -> DescribeNotificationRuleResponse -> ShowS
$cshowsPrec :: Int -> DescribeNotificationRuleResponse -> ShowS
Prelude.Show, (forall x.
 DescribeNotificationRuleResponse
 -> Rep DescribeNotificationRuleResponse x)
-> (forall x.
    Rep DescribeNotificationRuleResponse x
    -> DescribeNotificationRuleResponse)
-> Generic DescribeNotificationRuleResponse
forall x.
Rep DescribeNotificationRuleResponse x
-> DescribeNotificationRuleResponse
forall x.
DescribeNotificationRuleResponse
-> Rep DescribeNotificationRuleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeNotificationRuleResponse x
-> DescribeNotificationRuleResponse
$cfrom :: forall x.
DescribeNotificationRuleResponse
-> Rep DescribeNotificationRuleResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeNotificationRuleResponse' 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', 'describeNotificationRuleResponse_status' - The status of the notification rule. Valid statuses are on (sending
-- notifications) or off (not sending notifications).
--
-- 'eventTypes', 'describeNotificationRuleResponse_eventTypes' - A list of the event types associated with the notification rule.
--
-- 'lastModifiedTimestamp', 'describeNotificationRuleResponse_lastModifiedTimestamp' - The date and time the notification rule was most recently updated, in
-- timestamp format.
--
-- 'createdBy', 'describeNotificationRuleResponse_createdBy' - The name or email alias of the person who created the notification rule.
--
-- 'detailType', 'describeNotificationRuleResponse_detailType' - The level of detail included in the notifications for this resource.
-- BASIC will include only the contents of the event as it would appear in
-- AWS 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.
--
-- 'name', 'describeNotificationRuleResponse_name' - The name of the notification rule.
--
-- 'targets', 'describeNotificationRuleResponse_targets' - A list of the SNS topics associated with the notification rule.
--
-- 'resource', 'describeNotificationRuleResponse_resource' - The Amazon Resource Name (ARN) of the resource associated with the
-- notification rule.
--
-- 'createdTimestamp', 'describeNotificationRuleResponse_createdTimestamp' - The date and time the notification rule was created, in timestamp
-- format.
--
-- 'tags', 'describeNotificationRuleResponse_tags' - The tags associated with the notification rule.
--
-- 'httpStatus', 'describeNotificationRuleResponse_httpStatus' - The response's http status code.
--
-- 'arn', 'describeNotificationRuleResponse_arn' - The Amazon Resource Name (ARN) of the notification rule.
newDescribeNotificationRuleResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'arn'
  Prelude.Text ->
  DescribeNotificationRuleResponse
newDescribeNotificationRuleResponse :: Int -> Text -> DescribeNotificationRuleResponse
newDescribeNotificationRuleResponse
  Int
pHttpStatus_
  Text
pArn_ =
    DescribeNotificationRuleResponse' :: Maybe NotificationRuleStatus
-> Maybe [EventTypeSummary]
-> Maybe POSIX
-> Maybe Text
-> Maybe DetailType
-> Maybe (Sensitive Text)
-> Maybe [TargetSummary]
-> Maybe Text
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> DescribeNotificationRuleResponse
DescribeNotificationRuleResponse'
      { $sel:status:DescribeNotificationRuleResponse' :: Maybe NotificationRuleStatus
status =
          Maybe NotificationRuleStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:eventTypes:DescribeNotificationRuleResponse' :: Maybe [EventTypeSummary]
eventTypes = Maybe [EventTypeSummary]
forall a. Maybe a
Prelude.Nothing,
        $sel:lastModifiedTimestamp:DescribeNotificationRuleResponse' :: Maybe POSIX
lastModifiedTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:createdBy:DescribeNotificationRuleResponse' :: Maybe Text
createdBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:detailType:DescribeNotificationRuleResponse' :: Maybe DetailType
detailType = Maybe DetailType
forall a. Maybe a
Prelude.Nothing,
        $sel:name:DescribeNotificationRuleResponse' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:targets:DescribeNotificationRuleResponse' :: Maybe [TargetSummary]
targets = Maybe [TargetSummary]
forall a. Maybe a
Prelude.Nothing,
        $sel:resource:DescribeNotificationRuleResponse' :: Maybe Text
resource = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:createdTimestamp:DescribeNotificationRuleResponse' :: Maybe POSIX
createdTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:DescribeNotificationRuleResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeNotificationRuleResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:arn:DescribeNotificationRuleResponse' :: Text
arn = Text
pArn_
      }

-- | The status of the notification rule. Valid statuses are on (sending
-- notifications) or off (not sending notifications).
describeNotificationRuleResponse_status :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe NotificationRuleStatus)
describeNotificationRuleResponse_status :: (Maybe NotificationRuleStatus -> f (Maybe NotificationRuleStatus))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
describeNotificationRuleResponse_status = (DescribeNotificationRuleResponse -> Maybe NotificationRuleStatus)
-> (DescribeNotificationRuleResponse
    -> Maybe NotificationRuleStatus
    -> DescribeNotificationRuleResponse)
-> Lens
     DescribeNotificationRuleResponse
     DescribeNotificationRuleResponse
     (Maybe NotificationRuleStatus)
     (Maybe NotificationRuleStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationRuleResponse' {Maybe NotificationRuleStatus
status :: Maybe NotificationRuleStatus
$sel:status:DescribeNotificationRuleResponse' :: DescribeNotificationRuleResponse -> Maybe NotificationRuleStatus
status} -> Maybe NotificationRuleStatus
status) (\s :: DescribeNotificationRuleResponse
s@DescribeNotificationRuleResponse' {} Maybe NotificationRuleStatus
a -> DescribeNotificationRuleResponse
s {$sel:status:DescribeNotificationRuleResponse' :: Maybe NotificationRuleStatus
status = Maybe NotificationRuleStatus
a} :: DescribeNotificationRuleResponse)

-- | A list of the event types associated with the notification rule.
describeNotificationRuleResponse_eventTypes :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe [EventTypeSummary])
describeNotificationRuleResponse_eventTypes :: (Maybe [EventTypeSummary] -> f (Maybe [EventTypeSummary]))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
describeNotificationRuleResponse_eventTypes = (DescribeNotificationRuleResponse -> Maybe [EventTypeSummary])
-> (DescribeNotificationRuleResponse
    -> Maybe [EventTypeSummary] -> DescribeNotificationRuleResponse)
-> Lens
     DescribeNotificationRuleResponse
     DescribeNotificationRuleResponse
     (Maybe [EventTypeSummary])
     (Maybe [EventTypeSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationRuleResponse' {Maybe [EventTypeSummary]
eventTypes :: Maybe [EventTypeSummary]
$sel:eventTypes:DescribeNotificationRuleResponse' :: DescribeNotificationRuleResponse -> Maybe [EventTypeSummary]
eventTypes} -> Maybe [EventTypeSummary]
eventTypes) (\s :: DescribeNotificationRuleResponse
s@DescribeNotificationRuleResponse' {} Maybe [EventTypeSummary]
a -> DescribeNotificationRuleResponse
s {$sel:eventTypes:DescribeNotificationRuleResponse' :: Maybe [EventTypeSummary]
eventTypes = Maybe [EventTypeSummary]
a} :: DescribeNotificationRuleResponse) ((Maybe [EventTypeSummary] -> f (Maybe [EventTypeSummary]))
 -> DescribeNotificationRuleResponse
 -> f DescribeNotificationRuleResponse)
-> ((Maybe [EventTypeSummary] -> f (Maybe [EventTypeSummary]))
    -> Maybe [EventTypeSummary] -> f (Maybe [EventTypeSummary]))
-> (Maybe [EventTypeSummary] -> f (Maybe [EventTypeSummary]))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EventTypeSummary]
  [EventTypeSummary]
  [EventTypeSummary]
  [EventTypeSummary]
-> Iso
     (Maybe [EventTypeSummary])
     (Maybe [EventTypeSummary])
     (Maybe [EventTypeSummary])
     (Maybe [EventTypeSummary])
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
  [EventTypeSummary]
  [EventTypeSummary]
  [EventTypeSummary]
  [EventTypeSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The date and time the notification rule was most recently updated, in
-- timestamp format.
describeNotificationRuleResponse_lastModifiedTimestamp :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe Prelude.UTCTime)
describeNotificationRuleResponse_lastModifiedTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
describeNotificationRuleResponse_lastModifiedTimestamp = (DescribeNotificationRuleResponse -> Maybe POSIX)
-> (DescribeNotificationRuleResponse
    -> Maybe POSIX -> DescribeNotificationRuleResponse)
-> Lens
     DescribeNotificationRuleResponse
     DescribeNotificationRuleResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationRuleResponse' {Maybe POSIX
lastModifiedTimestamp :: Maybe POSIX
$sel:lastModifiedTimestamp:DescribeNotificationRuleResponse' :: DescribeNotificationRuleResponse -> Maybe POSIX
lastModifiedTimestamp} -> Maybe POSIX
lastModifiedTimestamp) (\s :: DescribeNotificationRuleResponse
s@DescribeNotificationRuleResponse' {} Maybe POSIX
a -> DescribeNotificationRuleResponse
s {$sel:lastModifiedTimestamp:DescribeNotificationRuleResponse' :: Maybe POSIX
lastModifiedTimestamp = Maybe POSIX
a} :: DescribeNotificationRuleResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeNotificationRuleResponse
 -> f DescribeNotificationRuleResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name or email alias of the person who created the notification rule.
describeNotificationRuleResponse_createdBy :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe Prelude.Text)
describeNotificationRuleResponse_createdBy :: (Maybe Text -> f (Maybe Text))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
describeNotificationRuleResponse_createdBy = (DescribeNotificationRuleResponse -> Maybe Text)
-> (DescribeNotificationRuleResponse
    -> Maybe Text -> DescribeNotificationRuleResponse)
-> Lens
     DescribeNotificationRuleResponse
     DescribeNotificationRuleResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationRuleResponse' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:DescribeNotificationRuleResponse' :: DescribeNotificationRuleResponse -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: DescribeNotificationRuleResponse
s@DescribeNotificationRuleResponse' {} Maybe Text
a -> DescribeNotificationRuleResponse
s {$sel:createdBy:DescribeNotificationRuleResponse' :: Maybe Text
createdBy = Maybe Text
a} :: DescribeNotificationRuleResponse)

-- | The level of detail included in the notifications for this resource.
-- BASIC will include only the contents of the event as it would appear in
-- AWS 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.
describeNotificationRuleResponse_detailType :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe DetailType)
describeNotificationRuleResponse_detailType :: (Maybe DetailType -> f (Maybe DetailType))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
describeNotificationRuleResponse_detailType = (DescribeNotificationRuleResponse -> Maybe DetailType)
-> (DescribeNotificationRuleResponse
    -> Maybe DetailType -> DescribeNotificationRuleResponse)
-> Lens
     DescribeNotificationRuleResponse
     DescribeNotificationRuleResponse
     (Maybe DetailType)
     (Maybe DetailType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationRuleResponse' {Maybe DetailType
detailType :: Maybe DetailType
$sel:detailType:DescribeNotificationRuleResponse' :: DescribeNotificationRuleResponse -> Maybe DetailType
detailType} -> Maybe DetailType
detailType) (\s :: DescribeNotificationRuleResponse
s@DescribeNotificationRuleResponse' {} Maybe DetailType
a -> DescribeNotificationRuleResponse
s {$sel:detailType:DescribeNotificationRuleResponse' :: Maybe DetailType
detailType = Maybe DetailType
a} :: DescribeNotificationRuleResponse)

-- | The name of the notification rule.
describeNotificationRuleResponse_name :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe Prelude.Text)
describeNotificationRuleResponse_name :: (Maybe Text -> f (Maybe Text))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
describeNotificationRuleResponse_name = (DescribeNotificationRuleResponse -> Maybe (Sensitive Text))
-> (DescribeNotificationRuleResponse
    -> Maybe (Sensitive Text) -> DescribeNotificationRuleResponse)
-> Lens
     DescribeNotificationRuleResponse
     DescribeNotificationRuleResponse
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationRuleResponse' {Maybe (Sensitive Text)
name :: Maybe (Sensitive Text)
$sel:name:DescribeNotificationRuleResponse' :: DescribeNotificationRuleResponse -> Maybe (Sensitive Text)
name} -> Maybe (Sensitive Text)
name) (\s :: DescribeNotificationRuleResponse
s@DescribeNotificationRuleResponse' {} Maybe (Sensitive Text)
a -> DescribeNotificationRuleResponse
s {$sel:name:DescribeNotificationRuleResponse' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
a} :: DescribeNotificationRuleResponse) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> DescribeNotificationRuleResponse
 -> f DescribeNotificationRuleResponse)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | A list of the SNS topics associated with the notification rule.
describeNotificationRuleResponse_targets :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe [TargetSummary])
describeNotificationRuleResponse_targets :: (Maybe [TargetSummary] -> f (Maybe [TargetSummary]))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
describeNotificationRuleResponse_targets = (DescribeNotificationRuleResponse -> Maybe [TargetSummary])
-> (DescribeNotificationRuleResponse
    -> Maybe [TargetSummary] -> DescribeNotificationRuleResponse)
-> Lens
     DescribeNotificationRuleResponse
     DescribeNotificationRuleResponse
     (Maybe [TargetSummary])
     (Maybe [TargetSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationRuleResponse' {Maybe [TargetSummary]
targets :: Maybe [TargetSummary]
$sel:targets:DescribeNotificationRuleResponse' :: DescribeNotificationRuleResponse -> Maybe [TargetSummary]
targets} -> Maybe [TargetSummary]
targets) (\s :: DescribeNotificationRuleResponse
s@DescribeNotificationRuleResponse' {} Maybe [TargetSummary]
a -> DescribeNotificationRuleResponse
s {$sel:targets:DescribeNotificationRuleResponse' :: Maybe [TargetSummary]
targets = Maybe [TargetSummary]
a} :: DescribeNotificationRuleResponse) ((Maybe [TargetSummary] -> f (Maybe [TargetSummary]))
 -> DescribeNotificationRuleResponse
 -> f DescribeNotificationRuleResponse)
-> ((Maybe [TargetSummary] -> f (Maybe [TargetSummary]))
    -> Maybe [TargetSummary] -> f (Maybe [TargetSummary]))
-> (Maybe [TargetSummary] -> f (Maybe [TargetSummary]))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [TargetSummary] [TargetSummary] [TargetSummary] [TargetSummary]
-> Iso
     (Maybe [TargetSummary])
     (Maybe [TargetSummary])
     (Maybe [TargetSummary])
     (Maybe [TargetSummary])
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
  [TargetSummary] [TargetSummary] [TargetSummary] [TargetSummary]
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 resource associated with the
-- notification rule.
describeNotificationRuleResponse_resource :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe Prelude.Text)
describeNotificationRuleResponse_resource :: (Maybe Text -> f (Maybe Text))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
describeNotificationRuleResponse_resource = (DescribeNotificationRuleResponse -> Maybe Text)
-> (DescribeNotificationRuleResponse
    -> Maybe Text -> DescribeNotificationRuleResponse)
-> Lens
     DescribeNotificationRuleResponse
     DescribeNotificationRuleResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationRuleResponse' {Maybe Text
resource :: Maybe Text
$sel:resource:DescribeNotificationRuleResponse' :: DescribeNotificationRuleResponse -> Maybe Text
resource} -> Maybe Text
resource) (\s :: DescribeNotificationRuleResponse
s@DescribeNotificationRuleResponse' {} Maybe Text
a -> DescribeNotificationRuleResponse
s {$sel:resource:DescribeNotificationRuleResponse' :: Maybe Text
resource = Maybe Text
a} :: DescribeNotificationRuleResponse)

-- | The date and time the notification rule was created, in timestamp
-- format.
describeNotificationRuleResponse_createdTimestamp :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe Prelude.UTCTime)
describeNotificationRuleResponse_createdTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
describeNotificationRuleResponse_createdTimestamp = (DescribeNotificationRuleResponse -> Maybe POSIX)
-> (DescribeNotificationRuleResponse
    -> Maybe POSIX -> DescribeNotificationRuleResponse)
-> Lens
     DescribeNotificationRuleResponse
     DescribeNotificationRuleResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationRuleResponse' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:DescribeNotificationRuleResponse' :: DescribeNotificationRuleResponse -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: DescribeNotificationRuleResponse
s@DescribeNotificationRuleResponse' {} Maybe POSIX
a -> DescribeNotificationRuleResponse
s {$sel:createdTimestamp:DescribeNotificationRuleResponse' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: DescribeNotificationRuleResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeNotificationRuleResponse
 -> f DescribeNotificationRuleResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The tags associated with the notification rule.
describeNotificationRuleResponse_tags :: Lens.Lens' DescribeNotificationRuleResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeNotificationRuleResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
describeNotificationRuleResponse_tags = (DescribeNotificationRuleResponse -> Maybe (HashMap Text Text))
-> (DescribeNotificationRuleResponse
    -> Maybe (HashMap Text Text) -> DescribeNotificationRuleResponse)
-> Lens
     DescribeNotificationRuleResponse
     DescribeNotificationRuleResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationRuleResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeNotificationRuleResponse' :: DescribeNotificationRuleResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeNotificationRuleResponse
s@DescribeNotificationRuleResponse' {} Maybe (HashMap Text Text)
a -> DescribeNotificationRuleResponse
s {$sel:tags:DescribeNotificationRuleResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeNotificationRuleResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeNotificationRuleResponse
 -> f DescribeNotificationRuleResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text 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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The Amazon Resource Name (ARN) of the notification rule.
describeNotificationRuleResponse_arn :: Lens.Lens' DescribeNotificationRuleResponse Prelude.Text
describeNotificationRuleResponse_arn :: (Text -> f Text)
-> DescribeNotificationRuleResponse
-> f DescribeNotificationRuleResponse
describeNotificationRuleResponse_arn = (DescribeNotificationRuleResponse -> Text)
-> (DescribeNotificationRuleResponse
    -> Text -> DescribeNotificationRuleResponse)
-> Lens
     DescribeNotificationRuleResponse
     DescribeNotificationRuleResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationRuleResponse' {Text
arn :: Text
$sel:arn:DescribeNotificationRuleResponse' :: DescribeNotificationRuleResponse -> Text
arn} -> Text
arn) (\s :: DescribeNotificationRuleResponse
s@DescribeNotificationRuleResponse' {} Text
a -> DescribeNotificationRuleResponse
s {$sel:arn:DescribeNotificationRuleResponse' :: Text
arn = Text
a} :: DescribeNotificationRuleResponse)

instance
  Prelude.NFData
    DescribeNotificationRuleResponse