{-# 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.AutoScaling.DescribeMetricCollectionTypes
-- 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)
--
-- Describes the available CloudWatch metrics for Amazon EC2 Auto Scaling.
--
-- The @GroupStandbyInstances@ metric is not returned by default. You must
-- explicitly request this metric when calling the EnableMetricsCollection
-- API.
module Amazonka.AutoScaling.DescribeMetricCollectionTypes
  ( -- * Creating a Request
    DescribeMetricCollectionTypes (..),
    newDescribeMetricCollectionTypes,

    -- * Destructuring the Response
    DescribeMetricCollectionTypesResponse (..),
    newDescribeMetricCollectionTypesResponse,

    -- * Response Lenses
    describeMetricCollectionTypesResponse_metrics,
    describeMetricCollectionTypesResponse_granularities,
    describeMetricCollectionTypesResponse_httpStatus,
  )
where

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

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

-- |
-- Create a value of 'DescribeMetricCollectionTypes' 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.
newDescribeMetricCollectionTypes ::
  DescribeMetricCollectionTypes
newDescribeMetricCollectionTypes :: DescribeMetricCollectionTypes
newDescribeMetricCollectionTypes =
  DescribeMetricCollectionTypes
DescribeMetricCollectionTypes'

instance
  Core.AWSRequest
    DescribeMetricCollectionTypes
  where
  type
    AWSResponse DescribeMetricCollectionTypes =
      DescribeMetricCollectionTypesResponse
  request :: DescribeMetricCollectionTypes
-> Request DescribeMetricCollectionTypes
request = Service
-> DescribeMetricCollectionTypes
-> Request DescribeMetricCollectionTypes
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeMetricCollectionTypes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeMetricCollectionTypes)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeMetricCollectionTypes))
-> Logger
-> Service
-> Proxy DescribeMetricCollectionTypes
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeMetricCollectionTypes)))
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
"DescribeMetricCollectionTypesResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [MetricCollectionType]
-> Maybe [MetricGranularityType]
-> Int
-> DescribeMetricCollectionTypesResponse
DescribeMetricCollectionTypesResponse'
            (Maybe [MetricCollectionType]
 -> Maybe [MetricGranularityType]
 -> Int
 -> DescribeMetricCollectionTypesResponse)
-> Either String (Maybe [MetricCollectionType])
-> Either
     String
     (Maybe [MetricGranularityType]
      -> Int -> DescribeMetricCollectionTypesResponse)
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
"Metrics" 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 [MetricCollectionType]))
-> Either String (Maybe [MetricCollectionType])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [MetricCollectionType])
-> [Node] -> Either String (Maybe [MetricCollectionType])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [MetricCollectionType]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either
  String
  (Maybe [MetricGranularityType]
   -> Int -> DescribeMetricCollectionTypesResponse)
-> Either String (Maybe [MetricGranularityType])
-> Either String (Int -> DescribeMetricCollectionTypesResponse)
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
"Granularities" 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 [MetricGranularityType]))
-> Either String (Maybe [MetricGranularityType])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [MetricGranularityType])
-> [Node] -> Either String (Maybe [MetricGranularityType])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [MetricGranularityType]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either String (Int -> DescribeMetricCollectionTypesResponse)
-> Either String Int
-> Either String DescribeMetricCollectionTypesResponse
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
    DescribeMetricCollectionTypes

instance Prelude.NFData DescribeMetricCollectionTypes

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

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

instance Core.ToQuery DescribeMetricCollectionTypes where
  toQuery :: DescribeMetricCollectionTypes -> QueryString
toQuery =
    QueryString -> DescribeMetricCollectionTypes -> QueryString
forall a b. a -> b -> a
Prelude.const
      ( [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ ByteString
"Action"
              ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"DescribeMetricCollectionTypes" ::
                          Prelude.ByteString
                      ),
            ByteString
"Version"
              ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2011-01-01" :: Prelude.ByteString)
          ]
      )

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

-- |
-- Create a value of 'DescribeMetricCollectionTypesResponse' 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:
--
-- 'metrics', 'describeMetricCollectionTypesResponse_metrics' - One or more metrics.
--
-- 'granularities', 'describeMetricCollectionTypesResponse_granularities' - The granularities for the metrics.
--
-- 'httpStatus', 'describeMetricCollectionTypesResponse_httpStatus' - The response's http status code.
newDescribeMetricCollectionTypesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeMetricCollectionTypesResponse
newDescribeMetricCollectionTypesResponse :: Int -> DescribeMetricCollectionTypesResponse
newDescribeMetricCollectionTypesResponse Int
pHttpStatus_ =
  DescribeMetricCollectionTypesResponse' :: Maybe [MetricCollectionType]
-> Maybe [MetricGranularityType]
-> Int
-> DescribeMetricCollectionTypesResponse
DescribeMetricCollectionTypesResponse'
    { $sel:metrics:DescribeMetricCollectionTypesResponse' :: Maybe [MetricCollectionType]
metrics =
        Maybe [MetricCollectionType]
forall a. Maybe a
Prelude.Nothing,
      $sel:granularities:DescribeMetricCollectionTypesResponse' :: Maybe [MetricGranularityType]
granularities = Maybe [MetricGranularityType]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeMetricCollectionTypesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | One or more metrics.
describeMetricCollectionTypesResponse_metrics :: Lens.Lens' DescribeMetricCollectionTypesResponse (Prelude.Maybe [MetricCollectionType])
describeMetricCollectionTypesResponse_metrics :: (Maybe [MetricCollectionType] -> f (Maybe [MetricCollectionType]))
-> DescribeMetricCollectionTypesResponse
-> f DescribeMetricCollectionTypesResponse
describeMetricCollectionTypesResponse_metrics = (DescribeMetricCollectionTypesResponse
 -> Maybe [MetricCollectionType])
-> (DescribeMetricCollectionTypesResponse
    -> Maybe [MetricCollectionType]
    -> DescribeMetricCollectionTypesResponse)
-> Lens
     DescribeMetricCollectionTypesResponse
     DescribeMetricCollectionTypesResponse
     (Maybe [MetricCollectionType])
     (Maybe [MetricCollectionType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMetricCollectionTypesResponse' {Maybe [MetricCollectionType]
metrics :: Maybe [MetricCollectionType]
$sel:metrics:DescribeMetricCollectionTypesResponse' :: DescribeMetricCollectionTypesResponse
-> Maybe [MetricCollectionType]
metrics} -> Maybe [MetricCollectionType]
metrics) (\s :: DescribeMetricCollectionTypesResponse
s@DescribeMetricCollectionTypesResponse' {} Maybe [MetricCollectionType]
a -> DescribeMetricCollectionTypesResponse
s {$sel:metrics:DescribeMetricCollectionTypesResponse' :: Maybe [MetricCollectionType]
metrics = Maybe [MetricCollectionType]
a} :: DescribeMetricCollectionTypesResponse) ((Maybe [MetricCollectionType] -> f (Maybe [MetricCollectionType]))
 -> DescribeMetricCollectionTypesResponse
 -> f DescribeMetricCollectionTypesResponse)
-> ((Maybe [MetricCollectionType]
     -> f (Maybe [MetricCollectionType]))
    -> Maybe [MetricCollectionType]
    -> f (Maybe [MetricCollectionType]))
-> (Maybe [MetricCollectionType]
    -> f (Maybe [MetricCollectionType]))
-> DescribeMetricCollectionTypesResponse
-> f DescribeMetricCollectionTypesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MetricCollectionType]
  [MetricCollectionType]
  [MetricCollectionType]
  [MetricCollectionType]
-> Iso
     (Maybe [MetricCollectionType])
     (Maybe [MetricCollectionType])
     (Maybe [MetricCollectionType])
     (Maybe [MetricCollectionType])
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
  [MetricCollectionType]
  [MetricCollectionType]
  [MetricCollectionType]
  [MetricCollectionType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The granularities for the metrics.
describeMetricCollectionTypesResponse_granularities :: Lens.Lens' DescribeMetricCollectionTypesResponse (Prelude.Maybe [MetricGranularityType])
describeMetricCollectionTypesResponse_granularities :: (Maybe [MetricGranularityType]
 -> f (Maybe [MetricGranularityType]))
-> DescribeMetricCollectionTypesResponse
-> f DescribeMetricCollectionTypesResponse
describeMetricCollectionTypesResponse_granularities = (DescribeMetricCollectionTypesResponse
 -> Maybe [MetricGranularityType])
-> (DescribeMetricCollectionTypesResponse
    -> Maybe [MetricGranularityType]
    -> DescribeMetricCollectionTypesResponse)
-> Lens
     DescribeMetricCollectionTypesResponse
     DescribeMetricCollectionTypesResponse
     (Maybe [MetricGranularityType])
     (Maybe [MetricGranularityType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMetricCollectionTypesResponse' {Maybe [MetricGranularityType]
granularities :: Maybe [MetricGranularityType]
$sel:granularities:DescribeMetricCollectionTypesResponse' :: DescribeMetricCollectionTypesResponse
-> Maybe [MetricGranularityType]
granularities} -> Maybe [MetricGranularityType]
granularities) (\s :: DescribeMetricCollectionTypesResponse
s@DescribeMetricCollectionTypesResponse' {} Maybe [MetricGranularityType]
a -> DescribeMetricCollectionTypesResponse
s {$sel:granularities:DescribeMetricCollectionTypesResponse' :: Maybe [MetricGranularityType]
granularities = Maybe [MetricGranularityType]
a} :: DescribeMetricCollectionTypesResponse) ((Maybe [MetricGranularityType]
  -> f (Maybe [MetricGranularityType]))
 -> DescribeMetricCollectionTypesResponse
 -> f DescribeMetricCollectionTypesResponse)
-> ((Maybe [MetricGranularityType]
     -> f (Maybe [MetricGranularityType]))
    -> Maybe [MetricGranularityType]
    -> f (Maybe [MetricGranularityType]))
-> (Maybe [MetricGranularityType]
    -> f (Maybe [MetricGranularityType]))
-> DescribeMetricCollectionTypesResponse
-> f DescribeMetricCollectionTypesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MetricGranularityType]
  [MetricGranularityType]
  [MetricGranularityType]
  [MetricGranularityType]
-> Iso
     (Maybe [MetricGranularityType])
     (Maybe [MetricGranularityType])
     (Maybe [MetricGranularityType])
     (Maybe [MetricGranularityType])
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
  [MetricGranularityType]
  [MetricGranularityType]
  [MetricGranularityType]
  [MetricGranularityType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeMetricCollectionTypesResponse