{-# 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.ElasticBeanstalk.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 list of event descriptions matching criteria up to the last 6
-- weeks.
--
-- This action returns the most recent 1,000 events from the specified
-- @NextToken@.
--
-- This operation returns paginated results.
module Amazonka.ElasticBeanstalk.DescribeEvents
  ( -- * Creating a Request
    DescribeEvents (..),
    newDescribeEvents,

    -- * Request Lenses
    describeEvents_requestId,
    describeEvents_templateName,
    describeEvents_startTime,
    describeEvents_severity,
    describeEvents_nextToken,
    describeEvents_versionLabel,
    describeEvents_platformArn,
    describeEvents_environmentName,
    describeEvents_maxRecords,
    describeEvents_endTime,
    describeEvents_applicationName,
    describeEvents_environmentId,

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

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

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

-- | Request to retrieve a list of events for an environment.
--
-- /See:/ 'newDescribeEvents' smart constructor.
data DescribeEvents = DescribeEvents'
  { -- | If specified, AWS Elastic Beanstalk restricts the described events to
    -- include only those associated with this request ID.
    DescribeEvents -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | If specified, AWS Elastic Beanstalk restricts the returned descriptions
    -- to those that are associated with this environment configuration.
    DescribeEvents -> Maybe Text
templateName :: Prelude.Maybe Prelude.Text,
    -- | If specified, AWS Elastic Beanstalk restricts the returned descriptions
    -- to those that occur on or after this time.
    DescribeEvents -> Maybe ISO8601
startTime :: Prelude.Maybe Core.ISO8601,
    -- | If specified, limits the events returned from this call to include only
    -- those with the specified severity or higher.
    DescribeEvents -> Maybe EventSeverity
severity :: Prelude.Maybe EventSeverity,
    -- | Pagination token. If specified, the events return the next batch of
    -- results.
    DescribeEvents -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | If specified, AWS Elastic Beanstalk restricts the returned descriptions
    -- to those associated with this application version.
    DescribeEvents -> Maybe Text
versionLabel :: Prelude.Maybe Prelude.Text,
    -- | The ARN of a custom platform version. If specified, AWS Elastic
    -- Beanstalk restricts the returned descriptions to those associated with
    -- this custom platform version.
    DescribeEvents -> Maybe Text
platformArn :: Prelude.Maybe Prelude.Text,
    -- | If specified, AWS Elastic Beanstalk restricts the returned descriptions
    -- to those associated with this environment.
    DescribeEvents -> Maybe Text
environmentName :: Prelude.Maybe Prelude.Text,
    -- | Specifies the maximum number of events that can be returned, beginning
    -- with the most recent event.
    DescribeEvents -> Maybe Natural
maxRecords :: Prelude.Maybe Prelude.Natural,
    -- | If specified, AWS Elastic Beanstalk restricts the returned descriptions
    -- to those that occur up to, but not including, the @EndTime@.
    DescribeEvents -> Maybe ISO8601
endTime :: Prelude.Maybe Core.ISO8601,
    -- | If specified, AWS Elastic Beanstalk restricts the returned descriptions
    -- to include only those associated with this application.
    DescribeEvents -> Maybe Text
applicationName :: Prelude.Maybe Prelude.Text,
    -- | If specified, AWS Elastic Beanstalk restricts the returned descriptions
    -- to those associated with this environment.
    DescribeEvents -> Maybe Text
environmentId :: Prelude.Maybe Prelude.Text
  }
  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:
--
-- 'requestId', 'describeEvents_requestId' - If specified, AWS Elastic Beanstalk restricts the described events to
-- include only those associated with this request ID.
--
-- 'templateName', 'describeEvents_templateName' - If specified, AWS Elastic Beanstalk restricts the returned descriptions
-- to those that are associated with this environment configuration.
--
-- 'startTime', 'describeEvents_startTime' - If specified, AWS Elastic Beanstalk restricts the returned descriptions
-- to those that occur on or after this time.
--
-- 'severity', 'describeEvents_severity' - If specified, limits the events returned from this call to include only
-- those with the specified severity or higher.
--
-- 'nextToken', 'describeEvents_nextToken' - Pagination token. If specified, the events return the next batch of
-- results.
--
-- 'versionLabel', 'describeEvents_versionLabel' - If specified, AWS Elastic Beanstalk restricts the returned descriptions
-- to those associated with this application version.
--
-- 'platformArn', 'describeEvents_platformArn' - The ARN of a custom platform version. If specified, AWS Elastic
-- Beanstalk restricts the returned descriptions to those associated with
-- this custom platform version.
--
-- 'environmentName', 'describeEvents_environmentName' - If specified, AWS Elastic Beanstalk restricts the returned descriptions
-- to those associated with this environment.
--
-- 'maxRecords', 'describeEvents_maxRecords' - Specifies the maximum number of events that can be returned, beginning
-- with the most recent event.
--
-- 'endTime', 'describeEvents_endTime' - If specified, AWS Elastic Beanstalk restricts the returned descriptions
-- to those that occur up to, but not including, the @EndTime@.
--
-- 'applicationName', 'describeEvents_applicationName' - If specified, AWS Elastic Beanstalk restricts the returned descriptions
-- to include only those associated with this application.
--
-- 'environmentId', 'describeEvents_environmentId' - If specified, AWS Elastic Beanstalk restricts the returned descriptions
-- to those associated with this environment.
newDescribeEvents ::
  DescribeEvents
newDescribeEvents :: DescribeEvents
newDescribeEvents =
  DescribeEvents' :: Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe EventSeverity
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> DescribeEvents
DescribeEvents'
    { $sel:requestId:DescribeEvents' :: Maybe Text
requestId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:templateName:DescribeEvents' :: Maybe Text
templateName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:DescribeEvents' :: Maybe ISO8601
startTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:severity:DescribeEvents' :: Maybe EventSeverity
severity = Maybe EventSeverity
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeEvents' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:versionLabel:DescribeEvents' :: Maybe Text
versionLabel = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:platformArn:DescribeEvents' :: Maybe Text
platformArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:environmentName:DescribeEvents' :: Maybe Text
environmentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeEvents' :: Maybe Natural
maxRecords = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:DescribeEvents' :: Maybe ISO8601
endTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationName:DescribeEvents' :: Maybe Text
applicationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:environmentId:DescribeEvents' :: Maybe Text
environmentId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | If specified, AWS Elastic Beanstalk restricts the described events to
-- include only those associated with this request ID.
describeEvents_requestId :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Text)
describeEvents_requestId :: (Maybe Text -> f (Maybe Text))
-> DescribeEvents -> f DescribeEvents
describeEvents_requestId = (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
requestId :: Maybe Text
$sel:requestId:DescribeEvents' :: DescribeEvents -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Text
a -> DescribeEvents
s {$sel:requestId:DescribeEvents' :: Maybe Text
requestId = Maybe Text
a} :: DescribeEvents)

-- | If specified, AWS Elastic Beanstalk restricts the returned descriptions
-- to those that are associated with this environment configuration.
describeEvents_templateName :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Text)
describeEvents_templateName :: (Maybe Text -> f (Maybe Text))
-> DescribeEvents -> f DescribeEvents
describeEvents_templateName = (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
templateName :: Maybe Text
$sel:templateName:DescribeEvents' :: DescribeEvents -> Maybe Text
templateName} -> Maybe Text
templateName) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Text
a -> DescribeEvents
s {$sel:templateName:DescribeEvents' :: Maybe Text
templateName = Maybe Text
a} :: DescribeEvents)

-- | If specified, AWS Elastic Beanstalk restricts the returned descriptions
-- to those that occur on or after this time.
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

-- | If specified, limits the events returned from this call to include only
-- those with the specified severity or higher.
describeEvents_severity :: Lens.Lens' DescribeEvents (Prelude.Maybe EventSeverity)
describeEvents_severity :: (Maybe EventSeverity -> f (Maybe EventSeverity))
-> DescribeEvents -> f DescribeEvents
describeEvents_severity = (DescribeEvents -> Maybe EventSeverity)
-> (DescribeEvents -> Maybe EventSeverity -> DescribeEvents)
-> Lens
     DescribeEvents
     DescribeEvents
     (Maybe EventSeverity)
     (Maybe EventSeverity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe EventSeverity
severity :: Maybe EventSeverity
$sel:severity:DescribeEvents' :: DescribeEvents -> Maybe EventSeverity
severity} -> Maybe EventSeverity
severity) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe EventSeverity
a -> DescribeEvents
s {$sel:severity:DescribeEvents' :: Maybe EventSeverity
severity = Maybe EventSeverity
a} :: DescribeEvents)

-- | Pagination token. If specified, the events return the next batch of
-- results.
describeEvents_nextToken :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Text)
describeEvents_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeEvents -> f DescribeEvents
describeEvents_nextToken = (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
nextToken :: Maybe Text
$sel:nextToken:DescribeEvents' :: DescribeEvents -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Text
a -> DescribeEvents
s {$sel:nextToken:DescribeEvents' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeEvents)

-- | If specified, AWS Elastic Beanstalk restricts the returned descriptions
-- to those associated with this application version.
describeEvents_versionLabel :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Text)
describeEvents_versionLabel :: (Maybe Text -> f (Maybe Text))
-> DescribeEvents -> f DescribeEvents
describeEvents_versionLabel = (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
versionLabel :: Maybe Text
$sel:versionLabel:DescribeEvents' :: DescribeEvents -> Maybe Text
versionLabel} -> Maybe Text
versionLabel) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Text
a -> DescribeEvents
s {$sel:versionLabel:DescribeEvents' :: Maybe Text
versionLabel = Maybe Text
a} :: DescribeEvents)

-- | The ARN of a custom platform version. If specified, AWS Elastic
-- Beanstalk restricts the returned descriptions to those associated with
-- this custom platform version.
describeEvents_platformArn :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Text)
describeEvents_platformArn :: (Maybe Text -> f (Maybe Text))
-> DescribeEvents -> f DescribeEvents
describeEvents_platformArn = (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
platformArn :: Maybe Text
$sel:platformArn:DescribeEvents' :: DescribeEvents -> Maybe Text
platformArn} -> Maybe Text
platformArn) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Text
a -> DescribeEvents
s {$sel:platformArn:DescribeEvents' :: Maybe Text
platformArn = Maybe Text
a} :: DescribeEvents)

-- | If specified, AWS Elastic Beanstalk restricts the returned descriptions
-- to those associated with this environment.
describeEvents_environmentName :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Text)
describeEvents_environmentName :: (Maybe Text -> f (Maybe Text))
-> DescribeEvents -> f DescribeEvents
describeEvents_environmentName = (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
environmentName :: Maybe Text
$sel:environmentName:DescribeEvents' :: DescribeEvents -> Maybe Text
environmentName} -> Maybe Text
environmentName) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Text
a -> DescribeEvents
s {$sel:environmentName:DescribeEvents' :: Maybe Text
environmentName = Maybe Text
a} :: DescribeEvents)

-- | Specifies the maximum number of events that can be returned, beginning
-- with the most recent event.
describeEvents_maxRecords :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Natural)
describeEvents_maxRecords :: (Maybe Natural -> f (Maybe Natural))
-> DescribeEvents -> f DescribeEvents
describeEvents_maxRecords = (DescribeEvents -> Maybe Natural)
-> (DescribeEvents -> Maybe Natural -> DescribeEvents)
-> Lens
     DescribeEvents DescribeEvents (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeEvents' {Maybe Natural
maxRecords :: Maybe Natural
$sel:maxRecords:DescribeEvents' :: DescribeEvents -> Maybe Natural
maxRecords} -> Maybe Natural
maxRecords) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Natural
a -> DescribeEvents
s {$sel:maxRecords:DescribeEvents' :: Maybe Natural
maxRecords = Maybe Natural
a} :: DescribeEvents)

-- | If specified, AWS Elastic Beanstalk restricts the returned descriptions
-- to those that occur up to, but not including, the @EndTime@.
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

-- | If specified, AWS Elastic Beanstalk restricts the returned descriptions
-- to include only those associated with this application.
describeEvents_applicationName :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Text)
describeEvents_applicationName :: (Maybe Text -> f (Maybe Text))
-> DescribeEvents -> f DescribeEvents
describeEvents_applicationName = (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
applicationName :: Maybe Text
$sel:applicationName:DescribeEvents' :: DescribeEvents -> Maybe Text
applicationName} -> Maybe Text
applicationName) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Text
a -> DescribeEvents
s {$sel:applicationName:DescribeEvents' :: Maybe Text
applicationName = Maybe Text
a} :: DescribeEvents)

-- | If specified, AWS Elastic Beanstalk restricts the returned descriptions
-- to those associated with this environment.
describeEvents_environmentId :: Lens.Lens' DescribeEvents (Prelude.Maybe Prelude.Text)
describeEvents_environmentId :: (Maybe Text -> f (Maybe Text))
-> DescribeEvents -> f DescribeEvents
describeEvents_environmentId = (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
environmentId :: Maybe Text
$sel:environmentId:DescribeEvents' :: DescribeEvents -> Maybe Text
environmentId} -> Maybe Text
environmentId) (\s :: DescribeEvents
s@DescribeEvents' {} Maybe Text
a -> DescribeEvents
s {$sel:environmentId:DescribeEvents' :: Maybe Text
environmentId = Maybe Text
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_nextToken
              ((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 [EventDescription] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeEvents
DescribeEventsResponse
rs
            DescribeEventsResponse
-> Getting
     (First [EventDescription])
     DescribeEventsResponse
     [EventDescription]
-> Maybe [EventDescription]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [EventDescription]
 -> Const (First [EventDescription]) (Maybe [EventDescription]))
-> DescribeEventsResponse
-> Const (First [EventDescription]) DescribeEventsResponse
Lens' DescribeEventsResponse (Maybe [EventDescription])
describeEventsResponse_events ((Maybe [EventDescription]
  -> Const (First [EventDescription]) (Maybe [EventDescription]))
 -> DescribeEventsResponse
 -> Const (First [EventDescription]) DescribeEventsResponse)
-> (([EventDescription]
     -> Const (First [EventDescription]) [EventDescription])
    -> Maybe [EventDescription]
    -> Const (First [EventDescription]) (Maybe [EventDescription]))
-> Getting
     (First [EventDescription])
     DescribeEventsResponse
     [EventDescription]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EventDescription]
 -> Const (First [EventDescription]) [EventDescription])
-> Maybe [EventDescription]
-> Const (First [EventDescription]) (Maybe [EventDescription])
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_nextToken
          ((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_nextToken ((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 Text
-> Maybe [EventDescription] -> Int -> DescribeEventsResponse
DescribeEventsResponse'
            (Maybe Text
 -> Maybe [EventDescription] -> Int -> DescribeEventsResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [EventDescription] -> Int -> DescribeEventsResponse)
forall (f :: * -> *) a b. Functor 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
"NextToken")
            Either
  String (Maybe [EventDescription] -> Int -> DescribeEventsResponse)
-> Either String (Maybe [EventDescription])
-> 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 [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 [EventDescription]))
-> Either String (Maybe [EventDescription])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [EventDescription])
-> [Node] -> Either String (Maybe [EventDescription])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [EventDescription]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            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 Natural
Maybe Text
Maybe ISO8601
Maybe EventSeverity
environmentId :: Maybe Text
applicationName :: Maybe Text
endTime :: Maybe ISO8601
maxRecords :: Maybe Natural
environmentName :: Maybe Text
platformArn :: Maybe Text
versionLabel :: Maybe Text
nextToken :: Maybe Text
severity :: Maybe EventSeverity
startTime :: Maybe ISO8601
templateName :: Maybe Text
requestId :: Maybe Text
$sel:environmentId:DescribeEvents' :: DescribeEvents -> Maybe Text
$sel:applicationName:DescribeEvents' :: DescribeEvents -> Maybe Text
$sel:endTime:DescribeEvents' :: DescribeEvents -> Maybe ISO8601
$sel:maxRecords:DescribeEvents' :: DescribeEvents -> Maybe Natural
$sel:environmentName:DescribeEvents' :: DescribeEvents -> Maybe Text
$sel:platformArn:DescribeEvents' :: DescribeEvents -> Maybe Text
$sel:versionLabel:DescribeEvents' :: DescribeEvents -> Maybe Text
$sel:nextToken:DescribeEvents' :: DescribeEvents -> Maybe Text
$sel:severity:DescribeEvents' :: DescribeEvents -> Maybe EventSeverity
$sel:startTime:DescribeEvents' :: DescribeEvents -> Maybe ISO8601
$sel:templateName:DescribeEvents' :: DescribeEvents -> Maybe Text
$sel:requestId:DescribeEvents' :: DescribeEvents -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeEvents" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
        ByteString
"RequestId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
requestId,
        ByteString
"TemplateName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
templateName,
        ByteString
"StartTime" ByteString -> Maybe ISO8601 -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ISO8601
startTime,
        ByteString
"Severity" ByteString -> Maybe EventSeverity -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe EventSeverity
severity,
        ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"VersionLabel" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
versionLabel,
        ByteString
"PlatformArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
platformArn,
        ByteString
"EnvironmentName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
environmentName,
        ByteString
"MaxRecords" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxRecords,
        ByteString
"EndTime" ByteString -> Maybe ISO8601 -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ISO8601
endTime,
        ByteString
"ApplicationName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
applicationName,
        ByteString
"EnvironmentId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
environmentId
      ]

-- | Result message wrapping a list of event descriptions.
--
-- /See:/ 'newDescribeEventsResponse' smart constructor.
data DescribeEventsResponse = DescribeEventsResponse'
  { -- | If returned, this indicates that there are more results to obtain. Use
    -- this token in the next DescribeEvents call to get the next batch of
    -- events.
    DescribeEventsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of EventDescription.
    DescribeEventsResponse -> Maybe [EventDescription]
events :: Prelude.Maybe [EventDescription],
    -- | 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:
--
-- 'nextToken', 'describeEventsResponse_nextToken' - If returned, this indicates that there are more results to obtain. Use
-- this token in the next DescribeEvents call to get the next batch of
-- events.
--
-- 'events', 'describeEventsResponse_events' - A list of EventDescription.
--
-- 'httpStatus', 'describeEventsResponse_httpStatus' - The response's http status code.
newDescribeEventsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeEventsResponse
newDescribeEventsResponse :: Int -> DescribeEventsResponse
newDescribeEventsResponse Int
pHttpStatus_ =
  DescribeEventsResponse' :: Maybe Text
-> Maybe [EventDescription] -> Int -> DescribeEventsResponse
DescribeEventsResponse'
    { $sel:nextToken:DescribeEventsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:events:DescribeEventsResponse' :: Maybe [EventDescription]
events = Maybe [EventDescription]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeEventsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If returned, this indicates that there are more results to obtain. Use
-- this token in the next DescribeEvents call to get the next batch of
-- events.
describeEventsResponse_nextToken :: Lens.Lens' DescribeEventsResponse (Prelude.Maybe Prelude.Text)
describeEventsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeEventsResponse -> f DescribeEventsResponse
describeEventsResponse_nextToken = (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
nextToken :: Maybe Text
$sel:nextToken:DescribeEventsResponse' :: DescribeEventsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeEventsResponse
s@DescribeEventsResponse' {} Maybe Text
a -> DescribeEventsResponse
s {$sel:nextToken:DescribeEventsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeEventsResponse)

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

-- | 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