{-# 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.CloudWatch.DescribeAlarms
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves the specified alarms. You can filter the results by specifying
-- a prefix for the alarm name, the alarm state, or a prefix for any
-- action.
--
-- To use this operation and return information about composite alarms, you
-- must be signed on with the @cloudwatch:DescribeAlarms@ permission that
-- is scoped to @*@. You can\'t return information about composite alarms
-- if your @cloudwatch:DescribeAlarms@ permission has a narrower scope.
--
-- This operation returns paginated results.
module Amazonka.CloudWatch.DescribeAlarms
  ( -- * Creating a Request
    DescribeAlarms (..),
    newDescribeAlarms,

    -- * Request Lenses
    describeAlarms_actionPrefix,
    describeAlarms_alarmNamePrefix,
    describeAlarms_alarmNames,
    describeAlarms_alarmTypes,
    describeAlarms_childrenOfAlarmName,
    describeAlarms_maxRecords,
    describeAlarms_nextToken,
    describeAlarms_parentsOfAlarmName,
    describeAlarms_stateValue,

    -- * Destructuring the Response
    DescribeAlarmsResponse (..),
    newDescribeAlarmsResponse,

    -- * Response Lenses
    describeAlarmsResponse_compositeAlarms,
    describeAlarmsResponse_metricAlarms,
    describeAlarmsResponse_nextToken,
    describeAlarmsResponse_httpStatus,
  )
where

import Amazonka.CloudWatch.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeAlarms' smart constructor.
data DescribeAlarms = DescribeAlarms'
  { -- | Use this parameter to filter the results of the operation to only those
    -- alarms that use a certain alarm action. For example, you could specify
    -- the ARN of an SNS topic to find all alarms that send notifications to
    -- that topic.
    DescribeAlarms -> Maybe Text
actionPrefix :: Prelude.Maybe Prelude.Text,
    -- | An alarm name prefix. If you specify this parameter, you receive
    -- information about all alarms that have names that start with this
    -- prefix.
    --
    -- If this parameter is specified, you cannot specify @AlarmNames@.
    DescribeAlarms -> Maybe Text
alarmNamePrefix :: Prelude.Maybe Prelude.Text,
    -- | The names of the alarms to retrieve information about.
    DescribeAlarms -> Maybe [Text]
alarmNames :: Prelude.Maybe [Prelude.Text],
    -- | Use this parameter to specify whether you want the operation to return
    -- metric alarms or composite alarms. If you omit this parameter, only
    -- metric alarms are returned.
    DescribeAlarms -> Maybe [AlarmType]
alarmTypes :: Prelude.Maybe [AlarmType],
    -- | If you use this parameter and specify the name of a composite alarm, the
    -- operation returns information about the \"children\" alarms of the alarm
    -- you specify. These are the metric alarms and composite alarms referenced
    -- in the @AlarmRule@ field of the composite alarm that you specify in
    -- @ChildrenOfAlarmName@. Information about the composite alarm that you
    -- name in @ChildrenOfAlarmName@ is not returned.
    --
    -- If you specify @ChildrenOfAlarmName@, you cannot specify any other
    -- parameters in the request except for @MaxRecords@ and @NextToken@. If
    -- you do so, you receive a validation error.
    --
    -- Only the @Alarm Name@, @ARN@, @StateValue@
    -- (OK\/ALARM\/INSUFFICIENT_DATA), and @StateUpdatedTimestamp@ information
    -- are returned by this operation when you use this parameter. To get
    -- complete information about these alarms, perform another
    -- @DescribeAlarms@ operation and specify the parent alarm names in the
    -- @AlarmNames@ parameter.
    DescribeAlarms -> Maybe Text
childrenOfAlarmName :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of alarm descriptions to retrieve.
    DescribeAlarms -> Maybe Natural
maxRecords :: Prelude.Maybe Prelude.Natural,
    -- | The token returned by a previous call to indicate that there is more
    -- data available.
    DescribeAlarms -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | If you use this parameter and specify the name of a metric or composite
    -- alarm, the operation returns information about the \"parent\" alarms of
    -- the alarm you specify. These are the composite alarms that have
    -- @AlarmRule@ parameters that reference the alarm named in
    -- @ParentsOfAlarmName@. Information about the alarm that you specify in
    -- @ParentsOfAlarmName@ is not returned.
    --
    -- If you specify @ParentsOfAlarmName@, you cannot specify any other
    -- parameters in the request except for @MaxRecords@ and @NextToken@. If
    -- you do so, you receive a validation error.
    --
    -- Only the Alarm Name and ARN are returned by this operation when you use
    -- this parameter. To get complete information about these alarms, perform
    -- another @DescribeAlarms@ operation and specify the parent alarm names in
    -- the @AlarmNames@ parameter.
    DescribeAlarms -> Maybe Text
parentsOfAlarmName :: Prelude.Maybe Prelude.Text,
    -- | Specify this parameter to receive information only about alarms that are
    -- currently in the state that you specify.
    DescribeAlarms -> Maybe StateValue
stateValue :: Prelude.Maybe StateValue
  }
  deriving (DescribeAlarms -> DescribeAlarms -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAlarms -> DescribeAlarms -> Bool
$c/= :: DescribeAlarms -> DescribeAlarms -> Bool
== :: DescribeAlarms -> DescribeAlarms -> Bool
$c== :: DescribeAlarms -> DescribeAlarms -> Bool
Prelude.Eq, ReadPrec [DescribeAlarms]
ReadPrec DescribeAlarms
Int -> ReadS DescribeAlarms
ReadS [DescribeAlarms]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAlarms]
$creadListPrec :: ReadPrec [DescribeAlarms]
readPrec :: ReadPrec DescribeAlarms
$creadPrec :: ReadPrec DescribeAlarms
readList :: ReadS [DescribeAlarms]
$creadList :: ReadS [DescribeAlarms]
readsPrec :: Int -> ReadS DescribeAlarms
$creadsPrec :: Int -> ReadS DescribeAlarms
Prelude.Read, Int -> DescribeAlarms -> ShowS
[DescribeAlarms] -> ShowS
DescribeAlarms -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAlarms] -> ShowS
$cshowList :: [DescribeAlarms] -> ShowS
show :: DescribeAlarms -> String
$cshow :: DescribeAlarms -> String
showsPrec :: Int -> DescribeAlarms -> ShowS
$cshowsPrec :: Int -> DescribeAlarms -> ShowS
Prelude.Show, forall x. Rep DescribeAlarms x -> DescribeAlarms
forall x. DescribeAlarms -> Rep DescribeAlarms x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeAlarms x -> DescribeAlarms
$cfrom :: forall x. DescribeAlarms -> Rep DescribeAlarms x
Prelude.Generic)

-- |
-- Create a value of 'DescribeAlarms' 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:
--
-- 'actionPrefix', 'describeAlarms_actionPrefix' - Use this parameter to filter the results of the operation to only those
-- alarms that use a certain alarm action. For example, you could specify
-- the ARN of an SNS topic to find all alarms that send notifications to
-- that topic.
--
-- 'alarmNamePrefix', 'describeAlarms_alarmNamePrefix' - An alarm name prefix. If you specify this parameter, you receive
-- information about all alarms that have names that start with this
-- prefix.
--
-- If this parameter is specified, you cannot specify @AlarmNames@.
--
-- 'alarmNames', 'describeAlarms_alarmNames' - The names of the alarms to retrieve information about.
--
-- 'alarmTypes', 'describeAlarms_alarmTypes' - Use this parameter to specify whether you want the operation to return
-- metric alarms or composite alarms. If you omit this parameter, only
-- metric alarms are returned.
--
-- 'childrenOfAlarmName', 'describeAlarms_childrenOfAlarmName' - If you use this parameter and specify the name of a composite alarm, the
-- operation returns information about the \"children\" alarms of the alarm
-- you specify. These are the metric alarms and composite alarms referenced
-- in the @AlarmRule@ field of the composite alarm that you specify in
-- @ChildrenOfAlarmName@. Information about the composite alarm that you
-- name in @ChildrenOfAlarmName@ is not returned.
--
-- If you specify @ChildrenOfAlarmName@, you cannot specify any other
-- parameters in the request except for @MaxRecords@ and @NextToken@. If
-- you do so, you receive a validation error.
--
-- Only the @Alarm Name@, @ARN@, @StateValue@
-- (OK\/ALARM\/INSUFFICIENT_DATA), and @StateUpdatedTimestamp@ information
-- are returned by this operation when you use this parameter. To get
-- complete information about these alarms, perform another
-- @DescribeAlarms@ operation and specify the parent alarm names in the
-- @AlarmNames@ parameter.
--
-- 'maxRecords', 'describeAlarms_maxRecords' - The maximum number of alarm descriptions to retrieve.
--
-- 'nextToken', 'describeAlarms_nextToken' - The token returned by a previous call to indicate that there is more
-- data available.
--
-- 'parentsOfAlarmName', 'describeAlarms_parentsOfAlarmName' - If you use this parameter and specify the name of a metric or composite
-- alarm, the operation returns information about the \"parent\" alarms of
-- the alarm you specify. These are the composite alarms that have
-- @AlarmRule@ parameters that reference the alarm named in
-- @ParentsOfAlarmName@. Information about the alarm that you specify in
-- @ParentsOfAlarmName@ is not returned.
--
-- If you specify @ParentsOfAlarmName@, you cannot specify any other
-- parameters in the request except for @MaxRecords@ and @NextToken@. If
-- you do so, you receive a validation error.
--
-- Only the Alarm Name and ARN are returned by this operation when you use
-- this parameter. To get complete information about these alarms, perform
-- another @DescribeAlarms@ operation and specify the parent alarm names in
-- the @AlarmNames@ parameter.
--
-- 'stateValue', 'describeAlarms_stateValue' - Specify this parameter to receive information only about alarms that are
-- currently in the state that you specify.
newDescribeAlarms ::
  DescribeAlarms
newDescribeAlarms :: DescribeAlarms
newDescribeAlarms =
  DescribeAlarms'
    { $sel:actionPrefix:DescribeAlarms' :: Maybe Text
actionPrefix = forall a. Maybe a
Prelude.Nothing,
      $sel:alarmNamePrefix:DescribeAlarms' :: Maybe Text
alarmNamePrefix = forall a. Maybe a
Prelude.Nothing,
      $sel:alarmNames:DescribeAlarms' :: Maybe [Text]
alarmNames = forall a. Maybe a
Prelude.Nothing,
      $sel:alarmTypes:DescribeAlarms' :: Maybe [AlarmType]
alarmTypes = forall a. Maybe a
Prelude.Nothing,
      $sel:childrenOfAlarmName:DescribeAlarms' :: Maybe Text
childrenOfAlarmName = forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeAlarms' :: Maybe Natural
maxRecords = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeAlarms' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:parentsOfAlarmName:DescribeAlarms' :: Maybe Text
parentsOfAlarmName = forall a. Maybe a
Prelude.Nothing,
      $sel:stateValue:DescribeAlarms' :: Maybe StateValue
stateValue = forall a. Maybe a
Prelude.Nothing
    }

-- | Use this parameter to filter the results of the operation to only those
-- alarms that use a certain alarm action. For example, you could specify
-- the ARN of an SNS topic to find all alarms that send notifications to
-- that topic.
describeAlarms_actionPrefix :: Lens.Lens' DescribeAlarms (Prelude.Maybe Prelude.Text)
describeAlarms_actionPrefix :: Lens' DescribeAlarms (Maybe Text)
describeAlarms_actionPrefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarms' {Maybe Text
actionPrefix :: Maybe Text
$sel:actionPrefix:DescribeAlarms' :: DescribeAlarms -> Maybe Text
actionPrefix} -> Maybe Text
actionPrefix) (\s :: DescribeAlarms
s@DescribeAlarms' {} Maybe Text
a -> DescribeAlarms
s {$sel:actionPrefix:DescribeAlarms' :: Maybe Text
actionPrefix = Maybe Text
a} :: DescribeAlarms)

-- | An alarm name prefix. If you specify this parameter, you receive
-- information about all alarms that have names that start with this
-- prefix.
--
-- If this parameter is specified, you cannot specify @AlarmNames@.
describeAlarms_alarmNamePrefix :: Lens.Lens' DescribeAlarms (Prelude.Maybe Prelude.Text)
describeAlarms_alarmNamePrefix :: Lens' DescribeAlarms (Maybe Text)
describeAlarms_alarmNamePrefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarms' {Maybe Text
alarmNamePrefix :: Maybe Text
$sel:alarmNamePrefix:DescribeAlarms' :: DescribeAlarms -> Maybe Text
alarmNamePrefix} -> Maybe Text
alarmNamePrefix) (\s :: DescribeAlarms
s@DescribeAlarms' {} Maybe Text
a -> DescribeAlarms
s {$sel:alarmNamePrefix:DescribeAlarms' :: Maybe Text
alarmNamePrefix = Maybe Text
a} :: DescribeAlarms)

-- | The names of the alarms to retrieve information about.
describeAlarms_alarmNames :: Lens.Lens' DescribeAlarms (Prelude.Maybe [Prelude.Text])
describeAlarms_alarmNames :: Lens' DescribeAlarms (Maybe [Text])
describeAlarms_alarmNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarms' {Maybe [Text]
alarmNames :: Maybe [Text]
$sel:alarmNames:DescribeAlarms' :: DescribeAlarms -> Maybe [Text]
alarmNames} -> Maybe [Text]
alarmNames) (\s :: DescribeAlarms
s@DescribeAlarms' {} Maybe [Text]
a -> DescribeAlarms
s {$sel:alarmNames:DescribeAlarms' :: Maybe [Text]
alarmNames = Maybe [Text]
a} :: DescribeAlarms) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Use this parameter to specify whether you want the operation to return
-- metric alarms or composite alarms. If you omit this parameter, only
-- metric alarms are returned.
describeAlarms_alarmTypes :: Lens.Lens' DescribeAlarms (Prelude.Maybe [AlarmType])
describeAlarms_alarmTypes :: Lens' DescribeAlarms (Maybe [AlarmType])
describeAlarms_alarmTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarms' {Maybe [AlarmType]
alarmTypes :: Maybe [AlarmType]
$sel:alarmTypes:DescribeAlarms' :: DescribeAlarms -> Maybe [AlarmType]
alarmTypes} -> Maybe [AlarmType]
alarmTypes) (\s :: DescribeAlarms
s@DescribeAlarms' {} Maybe [AlarmType]
a -> DescribeAlarms
s {$sel:alarmTypes:DescribeAlarms' :: Maybe [AlarmType]
alarmTypes = Maybe [AlarmType]
a} :: DescribeAlarms) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If you use this parameter and specify the name of a composite alarm, the
-- operation returns information about the \"children\" alarms of the alarm
-- you specify. These are the metric alarms and composite alarms referenced
-- in the @AlarmRule@ field of the composite alarm that you specify in
-- @ChildrenOfAlarmName@. Information about the composite alarm that you
-- name in @ChildrenOfAlarmName@ is not returned.
--
-- If you specify @ChildrenOfAlarmName@, you cannot specify any other
-- parameters in the request except for @MaxRecords@ and @NextToken@. If
-- you do so, you receive a validation error.
--
-- Only the @Alarm Name@, @ARN@, @StateValue@
-- (OK\/ALARM\/INSUFFICIENT_DATA), and @StateUpdatedTimestamp@ information
-- are returned by this operation when you use this parameter. To get
-- complete information about these alarms, perform another
-- @DescribeAlarms@ operation and specify the parent alarm names in the
-- @AlarmNames@ parameter.
describeAlarms_childrenOfAlarmName :: Lens.Lens' DescribeAlarms (Prelude.Maybe Prelude.Text)
describeAlarms_childrenOfAlarmName :: Lens' DescribeAlarms (Maybe Text)
describeAlarms_childrenOfAlarmName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarms' {Maybe Text
childrenOfAlarmName :: Maybe Text
$sel:childrenOfAlarmName:DescribeAlarms' :: DescribeAlarms -> Maybe Text
childrenOfAlarmName} -> Maybe Text
childrenOfAlarmName) (\s :: DescribeAlarms
s@DescribeAlarms' {} Maybe Text
a -> DescribeAlarms
s {$sel:childrenOfAlarmName:DescribeAlarms' :: Maybe Text
childrenOfAlarmName = Maybe Text
a} :: DescribeAlarms)

-- | The maximum number of alarm descriptions to retrieve.
describeAlarms_maxRecords :: Lens.Lens' DescribeAlarms (Prelude.Maybe Prelude.Natural)
describeAlarms_maxRecords :: Lens' DescribeAlarms (Maybe Natural)
describeAlarms_maxRecords = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarms' {Maybe Natural
maxRecords :: Maybe Natural
$sel:maxRecords:DescribeAlarms' :: DescribeAlarms -> Maybe Natural
maxRecords} -> Maybe Natural
maxRecords) (\s :: DescribeAlarms
s@DescribeAlarms' {} Maybe Natural
a -> DescribeAlarms
s {$sel:maxRecords:DescribeAlarms' :: Maybe Natural
maxRecords = Maybe Natural
a} :: DescribeAlarms)

-- | The token returned by a previous call to indicate that there is more
-- data available.
describeAlarms_nextToken :: Lens.Lens' DescribeAlarms (Prelude.Maybe Prelude.Text)
describeAlarms_nextToken :: Lens' DescribeAlarms (Maybe Text)
describeAlarms_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarms' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAlarms' :: DescribeAlarms -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAlarms
s@DescribeAlarms' {} Maybe Text
a -> DescribeAlarms
s {$sel:nextToken:DescribeAlarms' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAlarms)

-- | If you use this parameter and specify the name of a metric or composite
-- alarm, the operation returns information about the \"parent\" alarms of
-- the alarm you specify. These are the composite alarms that have
-- @AlarmRule@ parameters that reference the alarm named in
-- @ParentsOfAlarmName@. Information about the alarm that you specify in
-- @ParentsOfAlarmName@ is not returned.
--
-- If you specify @ParentsOfAlarmName@, you cannot specify any other
-- parameters in the request except for @MaxRecords@ and @NextToken@. If
-- you do so, you receive a validation error.
--
-- Only the Alarm Name and ARN are returned by this operation when you use
-- this parameter. To get complete information about these alarms, perform
-- another @DescribeAlarms@ operation and specify the parent alarm names in
-- the @AlarmNames@ parameter.
describeAlarms_parentsOfAlarmName :: Lens.Lens' DescribeAlarms (Prelude.Maybe Prelude.Text)
describeAlarms_parentsOfAlarmName :: Lens' DescribeAlarms (Maybe Text)
describeAlarms_parentsOfAlarmName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarms' {Maybe Text
parentsOfAlarmName :: Maybe Text
$sel:parentsOfAlarmName:DescribeAlarms' :: DescribeAlarms -> Maybe Text
parentsOfAlarmName} -> Maybe Text
parentsOfAlarmName) (\s :: DescribeAlarms
s@DescribeAlarms' {} Maybe Text
a -> DescribeAlarms
s {$sel:parentsOfAlarmName:DescribeAlarms' :: Maybe Text
parentsOfAlarmName = Maybe Text
a} :: DescribeAlarms)

-- | Specify this parameter to receive information only about alarms that are
-- currently in the state that you specify.
describeAlarms_stateValue :: Lens.Lens' DescribeAlarms (Prelude.Maybe StateValue)
describeAlarms_stateValue :: Lens' DescribeAlarms (Maybe StateValue)
describeAlarms_stateValue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarms' {Maybe StateValue
stateValue :: Maybe StateValue
$sel:stateValue:DescribeAlarms' :: DescribeAlarms -> Maybe StateValue
stateValue} -> Maybe StateValue
stateValue) (\s :: DescribeAlarms
s@DescribeAlarms' {} Maybe StateValue
a -> DescribeAlarms
s {$sel:stateValue:DescribeAlarms' :: Maybe StateValue
stateValue = Maybe StateValue
a} :: DescribeAlarms)

instance Core.AWSPager DescribeAlarms where
  page :: DescribeAlarms
-> AWSResponse DescribeAlarms -> Maybe DescribeAlarms
page DescribeAlarms
rq AWSResponse DescribeAlarms
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeAlarms
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeAlarmsResponse (Maybe Text)
describeAlarmsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeAlarms
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeAlarmsResponse (Maybe [MetricAlarm])
describeAlarmsResponse_metricAlarms
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeAlarms
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeAlarmsResponse (Maybe [CompositeAlarm])
describeAlarmsResponse_compositeAlarms
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeAlarms
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeAlarms (Maybe Text)
describeAlarms_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeAlarms
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeAlarmsResponse (Maybe Text)
describeAlarmsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeAlarms where
  type
    AWSResponse DescribeAlarms =
      DescribeAlarmsResponse
  request :: (Service -> Service) -> DescribeAlarms -> Request DescribeAlarms
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeAlarms
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeAlarms)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeAlarmsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [CompositeAlarm]
-> Maybe [MetricAlarm]
-> Maybe Text
-> Int
-> DescribeAlarmsResponse
DescribeAlarmsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"CompositeAlarms"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"MetricAlarms"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeAlarms where
  hashWithSalt :: Int -> DescribeAlarms -> Int
hashWithSalt Int
_salt DescribeAlarms' {Maybe Natural
Maybe [Text]
Maybe [AlarmType]
Maybe Text
Maybe StateValue
stateValue :: Maybe StateValue
parentsOfAlarmName :: Maybe Text
nextToken :: Maybe Text
maxRecords :: Maybe Natural
childrenOfAlarmName :: Maybe Text
alarmTypes :: Maybe [AlarmType]
alarmNames :: Maybe [Text]
alarmNamePrefix :: Maybe Text
actionPrefix :: Maybe Text
$sel:stateValue:DescribeAlarms' :: DescribeAlarms -> Maybe StateValue
$sel:parentsOfAlarmName:DescribeAlarms' :: DescribeAlarms -> Maybe Text
$sel:nextToken:DescribeAlarms' :: DescribeAlarms -> Maybe Text
$sel:maxRecords:DescribeAlarms' :: DescribeAlarms -> Maybe Natural
$sel:childrenOfAlarmName:DescribeAlarms' :: DescribeAlarms -> Maybe Text
$sel:alarmTypes:DescribeAlarms' :: DescribeAlarms -> Maybe [AlarmType]
$sel:alarmNames:DescribeAlarms' :: DescribeAlarms -> Maybe [Text]
$sel:alarmNamePrefix:DescribeAlarms' :: DescribeAlarms -> Maybe Text
$sel:actionPrefix:DescribeAlarms' :: DescribeAlarms -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
actionPrefix
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
alarmNamePrefix
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
alarmNames
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [AlarmType]
alarmTypes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
childrenOfAlarmName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxRecords
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
parentsOfAlarmName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StateValue
stateValue

instance Prelude.NFData DescribeAlarms where
  rnf :: DescribeAlarms -> ()
rnf DescribeAlarms' {Maybe Natural
Maybe [Text]
Maybe [AlarmType]
Maybe Text
Maybe StateValue
stateValue :: Maybe StateValue
parentsOfAlarmName :: Maybe Text
nextToken :: Maybe Text
maxRecords :: Maybe Natural
childrenOfAlarmName :: Maybe Text
alarmTypes :: Maybe [AlarmType]
alarmNames :: Maybe [Text]
alarmNamePrefix :: Maybe Text
actionPrefix :: Maybe Text
$sel:stateValue:DescribeAlarms' :: DescribeAlarms -> Maybe StateValue
$sel:parentsOfAlarmName:DescribeAlarms' :: DescribeAlarms -> Maybe Text
$sel:nextToken:DescribeAlarms' :: DescribeAlarms -> Maybe Text
$sel:maxRecords:DescribeAlarms' :: DescribeAlarms -> Maybe Natural
$sel:childrenOfAlarmName:DescribeAlarms' :: DescribeAlarms -> Maybe Text
$sel:alarmTypes:DescribeAlarms' :: DescribeAlarms -> Maybe [AlarmType]
$sel:alarmNames:DescribeAlarms' :: DescribeAlarms -> Maybe [Text]
$sel:alarmNamePrefix:DescribeAlarms' :: DescribeAlarms -> Maybe Text
$sel:actionPrefix:DescribeAlarms' :: DescribeAlarms -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
actionPrefix
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
alarmNamePrefix
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
alarmNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [AlarmType]
alarmTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
childrenOfAlarmName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxRecords
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
parentsOfAlarmName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StateValue
stateValue

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

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

instance Data.ToQuery DescribeAlarms where
  toQuery :: DescribeAlarms -> QueryString
toQuery DescribeAlarms' {Maybe Natural
Maybe [Text]
Maybe [AlarmType]
Maybe Text
Maybe StateValue
stateValue :: Maybe StateValue
parentsOfAlarmName :: Maybe Text
nextToken :: Maybe Text
maxRecords :: Maybe Natural
childrenOfAlarmName :: Maybe Text
alarmTypes :: Maybe [AlarmType]
alarmNames :: Maybe [Text]
alarmNamePrefix :: Maybe Text
actionPrefix :: Maybe Text
$sel:stateValue:DescribeAlarms' :: DescribeAlarms -> Maybe StateValue
$sel:parentsOfAlarmName:DescribeAlarms' :: DescribeAlarms -> Maybe Text
$sel:nextToken:DescribeAlarms' :: DescribeAlarms -> Maybe Text
$sel:maxRecords:DescribeAlarms' :: DescribeAlarms -> Maybe Natural
$sel:childrenOfAlarmName:DescribeAlarms' :: DescribeAlarms -> Maybe Text
$sel:alarmTypes:DescribeAlarms' :: DescribeAlarms -> Maybe [AlarmType]
$sel:alarmNames:DescribeAlarms' :: DescribeAlarms -> Maybe [Text]
$sel:alarmNamePrefix:DescribeAlarms' :: DescribeAlarms -> Maybe Text
$sel:actionPrefix:DescribeAlarms' :: DescribeAlarms -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribeAlarms" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-08-01" :: Prelude.ByteString),
        ByteString
"ActionPrefix" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
actionPrefix,
        ByteString
"AlarmNamePrefix" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
alarmNamePrefix,
        ByteString
"AlarmNames"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
alarmNames),
        ByteString
"AlarmTypes"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AlarmType]
alarmTypes),
        ByteString
"ChildrenOfAlarmName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
childrenOfAlarmName,
        ByteString
"MaxRecords" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxRecords,
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"ParentsOfAlarmName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
parentsOfAlarmName,
        ByteString
"StateValue" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe StateValue
stateValue
      ]

-- | /See:/ 'newDescribeAlarmsResponse' smart constructor.
data DescribeAlarmsResponse = DescribeAlarmsResponse'
  { -- | The information about any composite alarms returned by the operation.
    DescribeAlarmsResponse -> Maybe [CompositeAlarm]
compositeAlarms :: Prelude.Maybe [CompositeAlarm],
    -- | The information about any metric alarms returned by the operation.
    DescribeAlarmsResponse -> Maybe [MetricAlarm]
metricAlarms :: Prelude.Maybe [MetricAlarm],
    -- | The token that marks the start of the next batch of returned results.
    DescribeAlarmsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeAlarmsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeAlarmsResponse -> DescribeAlarmsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAlarmsResponse -> DescribeAlarmsResponse -> Bool
$c/= :: DescribeAlarmsResponse -> DescribeAlarmsResponse -> Bool
== :: DescribeAlarmsResponse -> DescribeAlarmsResponse -> Bool
$c== :: DescribeAlarmsResponse -> DescribeAlarmsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAlarmsResponse]
ReadPrec DescribeAlarmsResponse
Int -> ReadS DescribeAlarmsResponse
ReadS [DescribeAlarmsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAlarmsResponse]
$creadListPrec :: ReadPrec [DescribeAlarmsResponse]
readPrec :: ReadPrec DescribeAlarmsResponse
$creadPrec :: ReadPrec DescribeAlarmsResponse
readList :: ReadS [DescribeAlarmsResponse]
$creadList :: ReadS [DescribeAlarmsResponse]
readsPrec :: Int -> ReadS DescribeAlarmsResponse
$creadsPrec :: Int -> ReadS DescribeAlarmsResponse
Prelude.Read, Int -> DescribeAlarmsResponse -> ShowS
[DescribeAlarmsResponse] -> ShowS
DescribeAlarmsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAlarmsResponse] -> ShowS
$cshowList :: [DescribeAlarmsResponse] -> ShowS
show :: DescribeAlarmsResponse -> String
$cshow :: DescribeAlarmsResponse -> String
showsPrec :: Int -> DescribeAlarmsResponse -> ShowS
$cshowsPrec :: Int -> DescribeAlarmsResponse -> ShowS
Prelude.Show, forall x. Rep DescribeAlarmsResponse x -> DescribeAlarmsResponse
forall x. DescribeAlarmsResponse -> Rep DescribeAlarmsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeAlarmsResponse x -> DescribeAlarmsResponse
$cfrom :: forall x. DescribeAlarmsResponse -> Rep DescribeAlarmsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeAlarmsResponse' 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:
--
-- 'compositeAlarms', 'describeAlarmsResponse_compositeAlarms' - The information about any composite alarms returned by the operation.
--
-- 'metricAlarms', 'describeAlarmsResponse_metricAlarms' - The information about any metric alarms returned by the operation.
--
-- 'nextToken', 'describeAlarmsResponse_nextToken' - The token that marks the start of the next batch of returned results.
--
-- 'httpStatus', 'describeAlarmsResponse_httpStatus' - The response's http status code.
newDescribeAlarmsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeAlarmsResponse
newDescribeAlarmsResponse :: Int -> DescribeAlarmsResponse
newDescribeAlarmsResponse Int
pHttpStatus_ =
  DescribeAlarmsResponse'
    { $sel:compositeAlarms:DescribeAlarmsResponse' :: Maybe [CompositeAlarm]
compositeAlarms =
        forall a. Maybe a
Prelude.Nothing,
      $sel:metricAlarms:DescribeAlarmsResponse' :: Maybe [MetricAlarm]
metricAlarms = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeAlarmsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeAlarmsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The information about any composite alarms returned by the operation.
describeAlarmsResponse_compositeAlarms :: Lens.Lens' DescribeAlarmsResponse (Prelude.Maybe [CompositeAlarm])
describeAlarmsResponse_compositeAlarms :: Lens' DescribeAlarmsResponse (Maybe [CompositeAlarm])
describeAlarmsResponse_compositeAlarms = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsResponse' {Maybe [CompositeAlarm]
compositeAlarms :: Maybe [CompositeAlarm]
$sel:compositeAlarms:DescribeAlarmsResponse' :: DescribeAlarmsResponse -> Maybe [CompositeAlarm]
compositeAlarms} -> Maybe [CompositeAlarm]
compositeAlarms) (\s :: DescribeAlarmsResponse
s@DescribeAlarmsResponse' {} Maybe [CompositeAlarm]
a -> DescribeAlarmsResponse
s {$sel:compositeAlarms:DescribeAlarmsResponse' :: Maybe [CompositeAlarm]
compositeAlarms = Maybe [CompositeAlarm]
a} :: DescribeAlarmsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The information about any metric alarms returned by the operation.
describeAlarmsResponse_metricAlarms :: Lens.Lens' DescribeAlarmsResponse (Prelude.Maybe [MetricAlarm])
describeAlarmsResponse_metricAlarms :: Lens' DescribeAlarmsResponse (Maybe [MetricAlarm])
describeAlarmsResponse_metricAlarms = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsResponse' {Maybe [MetricAlarm]
metricAlarms :: Maybe [MetricAlarm]
$sel:metricAlarms:DescribeAlarmsResponse' :: DescribeAlarmsResponse -> Maybe [MetricAlarm]
metricAlarms} -> Maybe [MetricAlarm]
metricAlarms) (\s :: DescribeAlarmsResponse
s@DescribeAlarmsResponse' {} Maybe [MetricAlarm]
a -> DescribeAlarmsResponse
s {$sel:metricAlarms:DescribeAlarmsResponse' :: Maybe [MetricAlarm]
metricAlarms = Maybe [MetricAlarm]
a} :: DescribeAlarmsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token that marks the start of the next batch of returned results.
describeAlarmsResponse_nextToken :: Lens.Lens' DescribeAlarmsResponse (Prelude.Maybe Prelude.Text)
describeAlarmsResponse_nextToken :: Lens' DescribeAlarmsResponse (Maybe Text)
describeAlarmsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAlarmsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAlarmsResponse' :: DescribeAlarmsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAlarmsResponse
s@DescribeAlarmsResponse' {} Maybe Text
a -> DescribeAlarmsResponse
s {$sel:nextToken:DescribeAlarmsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAlarmsResponse)

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

instance Prelude.NFData DescribeAlarmsResponse where
  rnf :: DescribeAlarmsResponse -> ()
rnf DescribeAlarmsResponse' {Int
Maybe [CompositeAlarm]
Maybe [MetricAlarm]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
metricAlarms :: Maybe [MetricAlarm]
compositeAlarms :: Maybe [CompositeAlarm]
$sel:httpStatus:DescribeAlarmsResponse' :: DescribeAlarmsResponse -> Int
$sel:nextToken:DescribeAlarmsResponse' :: DescribeAlarmsResponse -> Maybe Text
$sel:metricAlarms:DescribeAlarmsResponse' :: DescribeAlarmsResponse -> Maybe [MetricAlarm]
$sel:compositeAlarms:DescribeAlarmsResponse' :: DescribeAlarmsResponse -> Maybe [CompositeAlarm]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [CompositeAlarm]
compositeAlarms
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [MetricAlarm]
metricAlarms
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus