{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.RDS.DescribeEvents
-- 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 events related to DB instances, DB clusters, DB parameter
-- groups, DB security groups, DB snapshots, and DB cluster snapshots for
-- the past 14 days. Events specific to a particular DB instances, DB
-- clusters, DB parameter groups, DB security groups, DB snapshots, and DB
-- cluster snapshots group can be obtained by providing the name as a
-- parameter.
--
-- By default, the past hour of events are returned.
--
-- This operation returns paginated results.
module Amazonka.RDS.DescribeEvents
  ( -- * Creating a Request
    DescribeEvents (..),
    newDescribeEvents,

    -- * Request Lenses
    describeEvents_startTime,
    describeEvents_sourceType,
    describeEvents_filters,
    describeEvents_sourceIdentifier,
    describeEvents_eventCategories,
    describeEvents_marker,
    describeEvents_maxRecords,
    describeEvents_endTime,
    describeEvents_duration,

    -- * Destructuring the Response
    DescribeEventsResponse (..),
    newDescribeEventsResponse,

    -- * Response Lenses
    describeEventsResponse_events,
    describeEventsResponse_marker,
    describeEventsResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newDescribeEvents' smart constructor.
data DescribeEvents = DescribeEvents'
  { -- | The beginning of the time interval to retrieve events for, specified in
    -- ISO 8601 format. For more information about ISO 8601, go to the
    -- <http://en.wikipedia.org/wiki/ISO_8601 ISO8601 Wikipedia page.>
    --
    -- Example: 2009-07-08T18:00Z
    DescribeEvents -> Maybe ISO8601
startTime :: Prelude.Maybe Core.ISO8601,
    -- | The event source to retrieve events for. If no value is specified, all
    -- events are returned.
    DescribeEvents -> Maybe SourceType
sourceType :: Prelude.Maybe SourceType,
    -- | This parameter isn\'t currently supported.
    DescribeEvents -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The identifier of the event source for which events are returned. If not
    -- specified, then all sources are included in the response.
    --
    -- Constraints:
    --
    -- -   If @SourceIdentifier@ is supplied, @SourceType@ must also be
    --     provided.
    --
    -- -   If the source type is a DB instance, a @DBInstanceIdentifier@ value
    --     must be supplied.
    --
    -- -   If the source type is a DB cluster, a @DBClusterIdentifier@ value
    --     must be supplied.
    --
    -- -   If the source type is a DB parameter group, a @DBParameterGroupName@
    --     value must be supplied.
    --
    -- -   If the source type is a DB security group, a @DBSecurityGroupName@
    --     value must be supplied.
    --
    -- -   If the source type is a DB snapshot, a @DBSnapshotIdentifier@ value
    --     must be supplied.
    --
    -- -   If the source type is a DB cluster snapshot, a
    --     @DBClusterSnapshotIdentifier@ value must be supplied.
    --
    -- -   Can\'t end with a hyphen or contain two consecutive hyphens.
    DescribeEvents -> Maybe Text
sourceIdentifier :: Prelude.Maybe Prelude.Text,
    -- | A list of event categories that trigger notifications for a event
    -- notification subscription.
    DescribeEvents -> Maybe [Text]
eventCategories :: Prelude.Maybe [Prelude.Text],
    -- | An optional pagination token provided by a previous DescribeEvents
    -- request. If this parameter is specified, the response includes only
    -- records beyond the marker, up to the value specified by @MaxRecords@.
    DescribeEvents -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of records to include in the response. If more
    -- records exist than the specified @MaxRecords@ value, a pagination token
    -- called a marker is included in the response so that you can retrieve the
    -- remaining results.
    --
    -- Default: 100
    --
    -- Constraints: Minimum 20, maximum 100.
    DescribeEvents -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | The end of the time interval for which to retrieve events, specified in
    -- ISO 8601 format. For more information about ISO 8601, go to the
    -- <http://en.wikipedia.org/wiki/ISO_8601 ISO8601 Wikipedia page.>
    --
    -- Example: 2009-07-08T18:00Z
    DescribeEvents -> Maybe ISO8601
endTime :: Prelude.Maybe Core.ISO8601,
    -- | The number of minutes to retrieve events for.
    --
    -- Default: 60
    DescribeEvents -> Maybe Int
duration :: Prelude.Maybe Prelude.Int
  }
  deriving (DescribeEvents -> DescribeEvents -> Bool
(DescribeEvents -> DescribeEvents -> Bool)
-> (DescribeEvents -> DescribeEvents -> Bool) -> Eq DescribeEvents
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEvents -> DescribeEvents -> Bool
$c/= :: DescribeEvents -> DescribeEvents -> Bool
== :: DescribeEvents -> DescribeEvents -> Bool
$c== :: DescribeEvents -> DescribeEvents -> Bool
Prelude.Eq, ReadPrec [DescribeEvents]
ReadPrec DescribeEvents
Int -> ReadS DescribeEvents
ReadS [DescribeEvents]
(Int -> ReadS DescribeEvents)
-> ReadS [DescribeEvents]
-> ReadPrec DescribeEvents
-> ReadPrec [DescribeEvents]
-> Read DescribeEvents
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEvents]
$creadListPrec :: ReadPrec [DescribeEvents]
readPrec :: ReadPrec DescribeEvents
$creadPrec :: ReadPrec DescribeEvents
readList :: ReadS [DescribeEvents]
$creadList :: ReadS [DescribeEvents]
readsPrec :: Int -> ReadS DescribeEvents
$creadsPrec :: Int -> ReadS DescribeEvents
Prelude.Read, Int -> DescribeEvents -> ShowS
[DescribeEvents] -> ShowS
DescribeEvents -> String
(Int -> DescribeEvents -> ShowS)
-> (DescribeEvents -> String)
-> ([DescribeEvents] -> ShowS)
-> Show DescribeEvents
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEvents] -> ShowS
$cshowList :: [DescribeEvents] -> ShowS
show :: DescribeEvents -> String
$cshow :: DescribeEvents -> String
showsPrec :: Int -> DescribeEvents -> ShowS
$cshowsPrec :: Int -> DescribeEvents -> ShowS
Prelude.Show, (forall x. DescribeEvents -> Rep DescribeEvents x)
-> (forall x. Rep DescribeEvents x -> DescribeEvents)
-> Generic DescribeEvents
forall x. Rep DescribeEvents x -> DescribeEvents
forall x. DescribeEvents -> Rep DescribeEvents x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeEvents x -> DescribeEvents
$cfrom :: forall x. DescribeEvents -> Rep DescribeEvents x
Prelude.Generic)

-- |
-- Create a value of 'DescribeEvents' 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:
--
-- 'startTime', 'describeEvents_startTime' - The beginning of the time interval to retrieve events for, specified in
-- ISO 8601 format. For more information about ISO 8601, go to the
-- <http://en.wikipedia.org/wiki/ISO_8601 ISO8601 Wikipedia page.>
--
-- Example: 2009-07-08T18:00Z
--
-- 'sourceType', 'describeEvents_sourceType' - The event source to retrieve events for. If no value is specified, all
-- events are returned.
--
-- 'filters', 'describeEvents_filters' - This parameter isn\'t currently supported.
--
-- 'sourceIdentifier', 'describeEvents_sourceIdentifier' - The identifier of the event source for which events are returned. If not
-- specified, then all sources are included in the response.
--
-- Constraints:
--
-- -   If @SourceIdentifier@ is supplied, @SourceType@ must also be
--     provided.
--
-- -   If the source type is a DB instance, a @DBInstanceIdentifier@ value
--     must be supplied.
--
-- -   If the source type is a DB cluster, a @DBClusterIdentifier@ value
--     must be supplied.
--
-- -   If the source type is a DB parameter group, a @DBParameterGroupName@
--     value must be supplied.
--
-- -   If the source type is a DB security group, a @DBSecurityGroupName@
--     value must be supplied.
--
-- -   If the source type is a DB snapshot, a @DBSnapshotIdentifier@ value
--     must be supplied.
--
-- -   If the source type is a DB cluster snapshot, a
--     @DBClusterSnapshotIdentifier@ value must be supplied.
--
-- -   Can\'t end with a hyphen or contain two consecutive hyphens.
--
-- 'eventCategories', 'describeEvents_eventCategories' - A list of event categories that trigger notifications for a event
-- notification subscription.
--
-- 'marker', 'describeEvents_marker' - An optional pagination token provided by a previous DescribeEvents
-- request. If this parameter is specified, the response includes only
-- records beyond the marker, up to the value specified by @MaxRecords@.
--
-- 'maxRecords', 'describeEvents_maxRecords' - The maximum number of records to include in the response. If more
-- records exist than the specified @MaxRecords@ value, a pagination token
-- called a marker is included in the response so that you can retrieve the
-- remaining results.
--
-- Default: 100
--
-- Constraints: Minimum 20, maximum 100.
--
-- 'endTime', 'describeEvents_endTime' - The end of the time interval for which to retrieve events, specified in
-- ISO 8601 format. For more information about ISO 8601, go to the
-- <http://en.wikipedia.org/wiki/ISO_8601 ISO8601 Wikipedia page.>
--
-- Example: 2009-07-08T18:00Z
--
-- 'duration', 'describeEvents_duration' - The number of minutes to retrieve events for.
--
-- Default: 60
newDescribeEvents ::
  DescribeEvents
newDescribeEvents :: DescribeEvents
newDescribeEvents =
  DescribeEvents' :: Maybe ISO8601
-> Maybe SourceType
-> Maybe [Filter]
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Int
-> Maybe ISO8601
-> Maybe Int
-> DescribeEvents
DescribeEvents'
    { $sel:startTime:DescribeEvents' :: Maybe ISO8601
startTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceType:DescribeEvents' :: Maybe SourceType
sourceType = Maybe SourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeEvents' :: Maybe [Filter]
filters = Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceIdentifier:DescribeEvents' :: Maybe Text
sourceIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:eventCategories:DescribeEvents' :: Maybe [Text]
eventCategories = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeEvents' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeEvents' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:DescribeEvents' :: Maybe ISO8601
endTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:duration:DescribeEvents' :: Maybe Int
duration = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | The beginning of the time interval to retrieve events for, specified in
-- ISO 8601 format. For more information about ISO 8601, go to the
-- <http://en.wikipedia.org/wiki/ISO_8601 ISO8601 Wikipedia page.>
--
-- Example: 2009-07-08T18:00Z
describeEvents_startTime :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.UTCTime)
describeEvents_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeEvents -> f DescribeEvents
describeEvents_startTime = (DescribeEvents -> Maybe ISO8601)
-> (DescribeEvents -> Maybe ISO8601 -> DescribeEvents)
-> Lens
     DescribeEvents DescribeEvents (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe ISO8601
startTime :: Maybe ISO8601
$sel:startTime:DescribeEvents' :: DescribeEvents -> Maybe ISO8601
startTime} -> Maybe ISO8601
startTime) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe ISO8601
a -> DescribeEvents
s {$sel:startTime:DescribeEvents' :: Maybe ISO8601
startTime = Maybe ISO8601
a} :: DescribeEvents) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> DescribeEvents -> f DescribeEvents)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeEvents
-> f DescribeEvents
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The event source to retrieve events for. If no value is specified, all
-- events are returned.
describeEvents_sourceType :: Lens.Lens' DescribeEvents (Prelude.Maybe SourceType)
describeEvents_sourceType :: (Maybe SourceType -> f (Maybe SourceType))
-> DescribeEvents -> f DescribeEvents
describeEvents_sourceType = (DescribeEvents -> Maybe SourceType)
-> (DescribeEvents -> Maybe SourceType -> DescribeEvents)
-> Lens
     DescribeEvents DescribeEvents (Maybe SourceType) (Maybe SourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe SourceType
sourceType :: Maybe SourceType
$sel:sourceType:DescribeEvents' :: DescribeEvents -> Maybe SourceType
sourceType} -> Maybe SourceType
sourceType) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe SourceType
a -> DescribeEvents
s {$sel:sourceType:DescribeEvents' :: Maybe SourceType
sourceType = Maybe SourceType
a} :: DescribeEvents)

-- | This parameter isn\'t currently supported.
describeEvents_filters :: Lens.Lens' DescribeEvents (Prelude.Maybe [Filter])
describeEvents_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeEvents -> f DescribeEvents
describeEvents_filters = (DescribeEvents -> Maybe [Filter])
-> (DescribeEvents -> Maybe [Filter] -> DescribeEvents)
-> Lens
     DescribeEvents DescribeEvents (Maybe [Filter]) (Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeEvents' :: DescribeEvents -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe [Filter]
a -> DescribeEvents
s {$sel:filters:DescribeEvents' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeEvents) ((Maybe [Filter] -> f (Maybe [Filter]))
 -> DescribeEvents -> f DescribeEvents)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
    -> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeEvents
-> f DescribeEvents
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
     (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
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 [Filter] [Filter] [Filter] [Filter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The identifier of the event source for which events are returned. If not
-- specified, then all sources are included in the response.
--
-- Constraints:
--
-- -   If @SourceIdentifier@ is supplied, @SourceType@ must also be
--     provided.
--
-- -   If the source type is a DB instance, a @DBInstanceIdentifier@ value
--     must be supplied.
--
-- -   If the source type is a DB cluster, a @DBClusterIdentifier@ value
--     must be supplied.
--
-- -   If the source type is a DB parameter group, a @DBParameterGroupName@
--     value must be supplied.
--
-- -   If the source type is a DB security group, a @DBSecurityGroupName@
--     value must be supplied.
--
-- -   If the source type is a DB snapshot, a @DBSnapshotIdentifier@ value
--     must be supplied.
--
-- -   If the source type is a DB cluster snapshot, a
--     @DBClusterSnapshotIdentifier@ value must be supplied.
--
-- -   Can\'t end with a hyphen or contain two consecutive hyphens.
describeEvents_sourceIdentifier :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Text)
describeEvents_sourceIdentifier :: (Maybe Text -> f (Maybe Text))
-> DescribeEvents -> f DescribeEvents
describeEvents_sourceIdentifier = (DescribeEvents -> Maybe Text)
-> (DescribeEvents -> Maybe Text -> DescribeEvents)
-> Lens DescribeEvents DescribeEvents (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe Text
sourceIdentifier :: Maybe Text
$sel:sourceIdentifier:DescribeEvents' :: DescribeEvents -> Maybe Text
sourceIdentifier} -> Maybe Text
sourceIdentifier) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Text
a -> DescribeEvents
s {$sel:sourceIdentifier:DescribeEvents' :: Maybe Text
sourceIdentifier = Maybe Text
a} :: DescribeEvents)

-- | A list of event categories that trigger notifications for a event
-- notification subscription.
describeEvents_eventCategories :: Lens.Lens' DescribeEvents (Prelude.Maybe [Prelude.Text])
describeEvents_eventCategories :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeEvents -> f DescribeEvents
describeEvents_eventCategories = (DescribeEvents -> Maybe [Text])
-> (DescribeEvents -> Maybe [Text] -> DescribeEvents)
-> Lens DescribeEvents DescribeEvents (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe [Text]
eventCategories :: Maybe [Text]
$sel:eventCategories:DescribeEvents' :: DescribeEvents -> Maybe [Text]
eventCategories} -> Maybe [Text]
eventCategories) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe [Text]
a -> DescribeEvents
s {$sel:eventCategories:DescribeEvents' :: Maybe [Text]
eventCategories = Maybe [Text]
a} :: DescribeEvents) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeEvents -> f DescribeEvents)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeEvents
-> f DescribeEvents
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

-- | An optional pagination token provided by a previous DescribeEvents
-- request. If this parameter is specified, the response includes only
-- records beyond the marker, up to the value specified by @MaxRecords@.
describeEvents_marker :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Text)
describeEvents_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeEvents -> f DescribeEvents
describeEvents_marker = (DescribeEvents -> Maybe Text)
-> (DescribeEvents -> Maybe Text -> DescribeEvents)
-> Lens DescribeEvents DescribeEvents (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeEvents' :: DescribeEvents -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Text
a -> DescribeEvents
s {$sel:marker:DescribeEvents' :: Maybe Text
marker = Maybe Text
a} :: DescribeEvents)

-- | The maximum number of records to include in the response. If more
-- records exist than the specified @MaxRecords@ value, a pagination token
-- called a marker is included in the response so that you can retrieve the
-- remaining results.
--
-- Default: 100
--
-- Constraints: Minimum 20, maximum 100.
describeEvents_maxRecords :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Int)
describeEvents_maxRecords :: (Maybe Int -> f (Maybe Int)) -> DescribeEvents -> f DescribeEvents
describeEvents_maxRecords = (DescribeEvents -> Maybe Int)
-> (DescribeEvents -> Maybe Int -> DescribeEvents)
-> Lens DescribeEvents DescribeEvents (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeEvents' :: DescribeEvents -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Int
a -> DescribeEvents
s {$sel:maxRecords:DescribeEvents' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeEvents)

-- | The end of the time interval for which to retrieve events, specified in
-- ISO 8601 format. For more information about ISO 8601, go to the
-- <http://en.wikipedia.org/wiki/ISO_8601 ISO8601 Wikipedia page.>
--
-- Example: 2009-07-08T18:00Z
describeEvents_endTime :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.UTCTime)
describeEvents_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeEvents -> f DescribeEvents
describeEvents_endTime = (DescribeEvents -> Maybe ISO8601)
-> (DescribeEvents -> Maybe ISO8601 -> DescribeEvents)
-> Lens
     DescribeEvents DescribeEvents (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe ISO8601
endTime :: Maybe ISO8601
$sel:endTime:DescribeEvents' :: DescribeEvents -> Maybe ISO8601
endTime} -> Maybe ISO8601
endTime) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe ISO8601
a -> DescribeEvents
s {$sel:endTime:DescribeEvents' :: Maybe ISO8601
endTime = Maybe ISO8601
a} :: DescribeEvents) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> DescribeEvents -> f DescribeEvents)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeEvents
-> f DescribeEvents
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The number of minutes to retrieve events for.
--
-- Default: 60
describeEvents_duration :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Int)
describeEvents_duration :: (Maybe Int -> f (Maybe Int)) -> DescribeEvents -> f DescribeEvents
describeEvents_duration = (DescribeEvents -> Maybe Int)
-> (DescribeEvents -> Maybe Int -> DescribeEvents)
-> Lens DescribeEvents DescribeEvents (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe Int
duration :: Maybe Int
$sel:duration:DescribeEvents' :: DescribeEvents -> Maybe Int
duration} -> Maybe Int
duration) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Int
a -> DescribeEvents
s {$sel:duration:DescribeEvents' :: Maybe Int
duration = Maybe Int
a} :: DescribeEvents)

instance Core.AWSPager DescribeEvents where
  page :: DescribeEvents
-> AWSResponse DescribeEvents -> Maybe DescribeEvents
page DescribeEvents
rq AWSResponse DescribeEvents
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeEvents
DescribeEventsResponse
rs
            DescribeEventsResponse
-> Getting (First Text) DescribeEventsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeEventsResponse
-> Const (First Text) DescribeEventsResponse
Lens' DescribeEventsResponse (Maybe Text)
describeEventsResponse_marker ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeEventsResponse
 -> Const (First Text) DescribeEventsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeEventsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeEvents
forall a. Maybe a
Prelude.Nothing
    | Maybe [Event] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeEvents
DescribeEventsResponse
rs
            DescribeEventsResponse
-> Getting (First [Event]) DescribeEventsResponse [Event]
-> Maybe [Event]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Event] -> Const (First [Event]) (Maybe [Event]))
-> DescribeEventsResponse
-> Const (First [Event]) DescribeEventsResponse
Lens' DescribeEventsResponse (Maybe [Event])
describeEventsResponse_events ((Maybe [Event] -> Const (First [Event]) (Maybe [Event]))
 -> DescribeEventsResponse
 -> Const (First [Event]) DescribeEventsResponse)
-> (([Event] -> Const (First [Event]) [Event])
    -> Maybe [Event] -> Const (First [Event]) (Maybe [Event]))
-> Getting (First [Event]) DescribeEventsResponse [Event]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Event] -> Const (First [Event]) [Event])
-> Maybe [Event] -> Const (First [Event]) (Maybe [Event])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeEvents
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeEvents -> Maybe DescribeEvents
forall a. a -> Maybe a
Prelude.Just (DescribeEvents -> Maybe DescribeEvents)
-> DescribeEvents -> Maybe DescribeEvents
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeEvents
rq
          DescribeEvents
-> (DescribeEvents -> DescribeEvents) -> DescribeEvents
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeEvents -> Identity DescribeEvents
Lens DescribeEvents DescribeEvents (Maybe Text) (Maybe Text)
describeEvents_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeEvents -> Identity DescribeEvents)
-> Maybe Text -> DescribeEvents -> DescribeEvents
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeEvents
DescribeEventsResponse
rs
          DescribeEventsResponse
-> Getting (First Text) DescribeEventsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeEventsResponse
-> Const (First Text) DescribeEventsResponse
Lens' DescribeEventsResponse (Maybe Text)
describeEventsResponse_marker ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeEventsResponse
 -> Const (First Text) DescribeEventsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeEventsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeEvents where
  type
    AWSResponse DescribeEvents =
      DescribeEventsResponse
  request :: DescribeEvents -> Request DescribeEvents
request = Service -> DescribeEvents -> Request DescribeEvents
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeEvents
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeEvents)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeEvents))
-> Logger
-> Service
-> Proxy DescribeEvents
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeEvents)))
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
"DescribeEventsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [Event] -> Maybe Text -> Int -> DescribeEventsResponse
DescribeEventsResponse'
            (Maybe [Event] -> Maybe Text -> Int -> DescribeEventsResponse)
-> Either String (Maybe [Event])
-> Either String (Maybe Text -> Int -> DescribeEventsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Events" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [Event]))
-> Either String (Maybe [Event])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Event])
-> [Node] -> Either String (Maybe [Event])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Event]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"Event")
                        )
            Either String (Maybe Text -> Int -> DescribeEventsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeEventsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Marker")
            Either String (Int -> DescribeEventsResponse)
-> Either String Int -> Either String DescribeEventsResponse
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 DescribeEvents

instance Prelude.NFData DescribeEvents

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

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

instance Core.ToQuery DescribeEvents where
  toQuery :: DescribeEvents -> QueryString
toQuery DescribeEvents' {Maybe Int
Maybe [Text]
Maybe [Filter]
Maybe Text
Maybe ISO8601
Maybe SourceType
duration :: Maybe Int
endTime :: Maybe ISO8601
maxRecords :: Maybe Int
marker :: Maybe Text
eventCategories :: Maybe [Text]
sourceIdentifier :: Maybe Text
filters :: Maybe [Filter]
sourceType :: Maybe SourceType
startTime :: Maybe ISO8601
$sel:duration:DescribeEvents' :: DescribeEvents -> Maybe Int
$sel:endTime:DescribeEvents' :: DescribeEvents -> Maybe ISO8601
$sel:maxRecords:DescribeEvents' :: DescribeEvents -> Maybe Int
$sel:marker:DescribeEvents' :: DescribeEvents -> Maybe Text
$sel:eventCategories:DescribeEvents' :: DescribeEvents -> Maybe [Text]
$sel:sourceIdentifier:DescribeEvents' :: DescribeEvents -> Maybe Text
$sel:filters:DescribeEvents' :: DescribeEvents -> Maybe [Filter]
$sel:sourceType:DescribeEvents' :: DescribeEvents -> Maybe SourceType
$sel:startTime:DescribeEvents' :: DescribeEvents -> Maybe ISO8601
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeEvents" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"StartTime" ByteString -> Maybe ISO8601 -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ISO8601
startTime,
        ByteString
"SourceType" ByteString -> Maybe SourceType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe SourceType
sourceType,
        ByteString
"Filters"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Filter] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Filter" ([Filter] -> QueryString) -> Maybe [Filter] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters),
        ByteString
"SourceIdentifier" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
sourceIdentifier,
        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
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
        ByteString
"MaxRecords" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxRecords,
        ByteString
"EndTime" ByteString -> Maybe ISO8601 -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ISO8601
endTime,
        ByteString
"Duration" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
duration
      ]

-- | Contains the result of a successful invocation of the @DescribeEvents@
-- action.
--
-- /See:/ 'newDescribeEventsResponse' smart constructor.
data DescribeEventsResponse = DescribeEventsResponse'
  { -- | A list of @Event@ instances.
    DescribeEventsResponse -> Maybe [Event]
events :: Prelude.Maybe [Event],
    -- | An optional pagination token provided by a previous Events request. If
    -- this parameter is specified, the response includes only records beyond
    -- the marker, up to the value specified by @MaxRecords@ .
    DescribeEventsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeEventsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeEventsResponse -> DescribeEventsResponse -> Bool
(DescribeEventsResponse -> DescribeEventsResponse -> Bool)
-> (DescribeEventsResponse -> DescribeEventsResponse -> Bool)
-> Eq DescribeEventsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeEventsResponse -> DescribeEventsResponse -> Bool
$c/= :: DescribeEventsResponse -> DescribeEventsResponse -> Bool
== :: DescribeEventsResponse -> DescribeEventsResponse -> Bool
$c== :: DescribeEventsResponse -> DescribeEventsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeEventsResponse]
ReadPrec DescribeEventsResponse
Int -> ReadS DescribeEventsResponse
ReadS [DescribeEventsResponse]
(Int -> ReadS DescribeEventsResponse)
-> ReadS [DescribeEventsResponse]
-> ReadPrec DescribeEventsResponse
-> ReadPrec [DescribeEventsResponse]
-> Read DescribeEventsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeEventsResponse]
$creadListPrec :: ReadPrec [DescribeEventsResponse]
readPrec :: ReadPrec DescribeEventsResponse
$creadPrec :: ReadPrec DescribeEventsResponse
readList :: ReadS [DescribeEventsResponse]
$creadList :: ReadS [DescribeEventsResponse]
readsPrec :: Int -> ReadS DescribeEventsResponse
$creadsPrec :: Int -> ReadS DescribeEventsResponse
Prelude.Read, Int -> DescribeEventsResponse -> ShowS
[DescribeEventsResponse] -> ShowS
DescribeEventsResponse -> String
(Int -> DescribeEventsResponse -> ShowS)
-> (DescribeEventsResponse -> String)
-> ([DescribeEventsResponse] -> ShowS)
-> Show DescribeEventsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeEventsResponse] -> ShowS
$cshowList :: [DescribeEventsResponse] -> ShowS
show :: DescribeEventsResponse -> String
$cshow :: DescribeEventsResponse -> String
showsPrec :: Int -> DescribeEventsResponse -> ShowS
$cshowsPrec :: Int -> DescribeEventsResponse -> ShowS
Prelude.Show, (forall x. DescribeEventsResponse -> Rep DescribeEventsResponse x)
-> (forall x.
    Rep DescribeEventsResponse x -> DescribeEventsResponse)
-> Generic DescribeEventsResponse
forall x. Rep DescribeEventsResponse x -> DescribeEventsResponse
forall x. DescribeEventsResponse -> Rep DescribeEventsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeEventsResponse x -> DescribeEventsResponse
$cfrom :: forall x. DescribeEventsResponse -> Rep DescribeEventsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeEventsResponse' 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:
--
-- 'events', 'describeEventsResponse_events' - A list of @Event@ instances.
--
-- 'marker', 'describeEventsResponse_marker' - An optional pagination token provided by a previous Events request. If
-- this parameter is specified, the response includes only records beyond
-- the marker, up to the value specified by @MaxRecords@ .
--
-- 'httpStatus', 'describeEventsResponse_httpStatus' - The response's http status code.
newDescribeEventsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeEventsResponse
newDescribeEventsResponse :: Int -> DescribeEventsResponse
newDescribeEventsResponse Int
pHttpStatus_ =
  DescribeEventsResponse' :: Maybe [Event] -> Maybe Text -> Int -> DescribeEventsResponse
DescribeEventsResponse'
    { $sel:events:DescribeEventsResponse' :: Maybe [Event]
events = Maybe [Event]
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeEventsResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeEventsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of @Event@ instances.
describeEventsResponse_events :: Lens.Lens' DescribeEventsResponse (Prelude.Maybe [Event])
describeEventsResponse_events :: (Maybe [Event] -> f (Maybe [Event]))
-> DescribeEventsResponse -> f DescribeEventsResponse
describeEventsResponse_events = (DescribeEventsResponse -> Maybe [Event])
-> (DescribeEventsResponse
    -> Maybe [Event] -> DescribeEventsResponse)
-> Lens' DescribeEventsResponse (Maybe [Event])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEventsResponse' {Maybe [Event]
events :: Maybe [Event]
$sel:events:DescribeEventsResponse' :: DescribeEventsResponse -> Maybe [Event]
events} -> Maybe [Event]
events) (\s :: DescribeEventsResponse
s@DescribeEventsResponse' {} Maybe [Event]
a -> DescribeEventsResponse
s {$sel:events:DescribeEventsResponse' :: Maybe [Event]
events = Maybe [Event]
a} :: DescribeEventsResponse) ((Maybe [Event] -> f (Maybe [Event]))
 -> DescribeEventsResponse -> f DescribeEventsResponse)
-> ((Maybe [Event] -> f (Maybe [Event]))
    -> Maybe [Event] -> f (Maybe [Event]))
-> (Maybe [Event] -> f (Maybe [Event]))
-> DescribeEventsResponse
-> f DescribeEventsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Event] [Event] [Event] [Event]
-> Iso
     (Maybe [Event]) (Maybe [Event]) (Maybe [Event]) (Maybe [Event])
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 [Event] [Event] [Event] [Event]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An optional pagination token provided by a previous Events request. If
-- this parameter is specified, the response includes only records beyond
-- the marker, up to the value specified by @MaxRecords@ .
describeEventsResponse_marker :: Lens.Lens' DescribeEventsResponse (Prelude.Maybe Prelude.Text)
describeEventsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeEventsResponse -> f DescribeEventsResponse
describeEventsResponse_marker = (DescribeEventsResponse -> Maybe Text)
-> (DescribeEventsResponse -> Maybe Text -> DescribeEventsResponse)
-> Lens' DescribeEventsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEventsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeEventsResponse' :: DescribeEventsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeEventsResponse
s@DescribeEventsResponse' {} Maybe Text
a -> DescribeEventsResponse
s {$sel:marker:DescribeEventsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeEventsResponse)

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

instance Prelude.NFData DescribeEventsResponse