{-# 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.IoT.DescribeFleetMetric
-- 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)
--
-- Gets information about the specified fleet metric.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions DescribeFleetMetric>
-- action.
module Amazonka.IoT.DescribeFleetMetric
  ( -- * Creating a Request
    DescribeFleetMetric (..),
    newDescribeFleetMetric,

    -- * Request Lenses
    describeFleetMetric_metricName,

    -- * Destructuring the Response
    DescribeFleetMetricResponse (..),
    newDescribeFleetMetricResponse,

    -- * Response Lenses
    describeFleetMetricResponse_aggregationType,
    describeFleetMetricResponse_lastModifiedDate,
    describeFleetMetricResponse_period,
    describeFleetMetricResponse_queryVersion,
    describeFleetMetricResponse_metricName,
    describeFleetMetricResponse_aggregationField,
    describeFleetMetricResponse_queryString,
    describeFleetMetricResponse_version,
    describeFleetMetricResponse_creationDate,
    describeFleetMetricResponse_description,
    describeFleetMetricResponse_unit,
    describeFleetMetricResponse_indexName,
    describeFleetMetricResponse_metricArn,
    describeFleetMetricResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoT.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

-- | /See:/ 'newDescribeFleetMetric' smart constructor.
data DescribeFleetMetric = DescribeFleetMetric'
  { -- | The name of the fleet metric to describe.
    DescribeFleetMetric -> Text
metricName :: Prelude.Text
  }
  deriving (DescribeFleetMetric -> DescribeFleetMetric -> Bool
(DescribeFleetMetric -> DescribeFleetMetric -> Bool)
-> (DescribeFleetMetric -> DescribeFleetMetric -> Bool)
-> Eq DescribeFleetMetric
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFleetMetric -> DescribeFleetMetric -> Bool
$c/= :: DescribeFleetMetric -> DescribeFleetMetric -> Bool
== :: DescribeFleetMetric -> DescribeFleetMetric -> Bool
$c== :: DescribeFleetMetric -> DescribeFleetMetric -> Bool
Prelude.Eq, ReadPrec [DescribeFleetMetric]
ReadPrec DescribeFleetMetric
Int -> ReadS DescribeFleetMetric
ReadS [DescribeFleetMetric]
(Int -> ReadS DescribeFleetMetric)
-> ReadS [DescribeFleetMetric]
-> ReadPrec DescribeFleetMetric
-> ReadPrec [DescribeFleetMetric]
-> Read DescribeFleetMetric
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFleetMetric]
$creadListPrec :: ReadPrec [DescribeFleetMetric]
readPrec :: ReadPrec DescribeFleetMetric
$creadPrec :: ReadPrec DescribeFleetMetric
readList :: ReadS [DescribeFleetMetric]
$creadList :: ReadS [DescribeFleetMetric]
readsPrec :: Int -> ReadS DescribeFleetMetric
$creadsPrec :: Int -> ReadS DescribeFleetMetric
Prelude.Read, Int -> DescribeFleetMetric -> ShowS
[DescribeFleetMetric] -> ShowS
DescribeFleetMetric -> String
(Int -> DescribeFleetMetric -> ShowS)
-> (DescribeFleetMetric -> String)
-> ([DescribeFleetMetric] -> ShowS)
-> Show DescribeFleetMetric
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFleetMetric] -> ShowS
$cshowList :: [DescribeFleetMetric] -> ShowS
show :: DescribeFleetMetric -> String
$cshow :: DescribeFleetMetric -> String
showsPrec :: Int -> DescribeFleetMetric -> ShowS
$cshowsPrec :: Int -> DescribeFleetMetric -> ShowS
Prelude.Show, (forall x. DescribeFleetMetric -> Rep DescribeFleetMetric x)
-> (forall x. Rep DescribeFleetMetric x -> DescribeFleetMetric)
-> Generic DescribeFleetMetric
forall x. Rep DescribeFleetMetric x -> DescribeFleetMetric
forall x. DescribeFleetMetric -> Rep DescribeFleetMetric x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeFleetMetric x -> DescribeFleetMetric
$cfrom :: forall x. DescribeFleetMetric -> Rep DescribeFleetMetric x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFleetMetric' 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:
--
-- 'metricName', 'describeFleetMetric_metricName' - The name of the fleet metric to describe.
newDescribeFleetMetric ::
  -- | 'metricName'
  Prelude.Text ->
  DescribeFleetMetric
newDescribeFleetMetric :: Text -> DescribeFleetMetric
newDescribeFleetMetric Text
pMetricName_ =
  DescribeFleetMetric' :: Text -> DescribeFleetMetric
DescribeFleetMetric' {$sel:metricName:DescribeFleetMetric' :: Text
metricName = Text
pMetricName_}

-- | The name of the fleet metric to describe.
describeFleetMetric_metricName :: Lens.Lens' DescribeFleetMetric Prelude.Text
describeFleetMetric_metricName :: (Text -> f Text) -> DescribeFleetMetric -> f DescribeFleetMetric
describeFleetMetric_metricName = (DescribeFleetMetric -> Text)
-> (DescribeFleetMetric -> Text -> DescribeFleetMetric)
-> Lens DescribeFleetMetric DescribeFleetMetric Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetMetric' {Text
metricName :: Text
$sel:metricName:DescribeFleetMetric' :: DescribeFleetMetric -> Text
metricName} -> Text
metricName) (\s :: DescribeFleetMetric
s@DescribeFleetMetric' {} Text
a -> DescribeFleetMetric
s {$sel:metricName:DescribeFleetMetric' :: Text
metricName = Text
a} :: DescribeFleetMetric)

instance Core.AWSRequest DescribeFleetMetric where
  type
    AWSResponse DescribeFleetMetric =
      DescribeFleetMetricResponse
  request :: DescribeFleetMetric -> Request DescribeFleetMetric
request = Service -> DescribeFleetMetric -> Request DescribeFleetMetric
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeFleetMetric
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeFleetMetric)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeFleetMetric))
-> Logger
-> Service
-> Proxy DescribeFleetMetric
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeFleetMetric)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe AggregationType
-> Maybe POSIX
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe Text
-> Maybe FleetMetricUnit
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeFleetMetricResponse
DescribeFleetMetricResponse'
            (Maybe AggregationType
 -> Maybe POSIX
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe FleetMetricUnit
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DescribeFleetMetricResponse)
-> Either String (Maybe AggregationType)
-> Either
     String
     (Maybe POSIX
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe FleetMetricUnit
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeFleetMetricResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe AggregationType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"aggregationType")
            Either
  String
  (Maybe POSIX
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe FleetMetricUnit
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeFleetMetricResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe FleetMetricUnit
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeFleetMetricResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastModifiedDate")
            Either
  String
  (Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe FleetMetricUnit
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeFleetMetricResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe FleetMetricUnit
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeFleetMetricResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"period")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe FleetMetricUnit
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeFleetMetricResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe FleetMetricUnit
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeFleetMetricResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"queryVersion")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe FleetMetricUnit
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeFleetMetricResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe FleetMetricUnit
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeFleetMetricResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"metricName")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe FleetMetricUnit
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeFleetMetricResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe FleetMetricUnit
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeFleetMetricResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"aggregationField")
            Either
  String
  (Maybe Text
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe FleetMetricUnit
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeFleetMetricResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Integer
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe FleetMetricUnit
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeFleetMetricResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"queryString")
            Either
  String
  (Maybe Integer
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe FleetMetricUnit
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeFleetMetricResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe FleetMetricUnit
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeFleetMetricResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"version")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe FleetMetricUnit
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeFleetMetricResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe FleetMetricUnit
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeFleetMetricResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"creationDate")
            Either
  String
  (Maybe Text
   -> Maybe FleetMetricUnit
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeFleetMetricResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe FleetMetricUnit
      -> Maybe Text -> Maybe Text -> Int -> DescribeFleetMetricResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"description")
            Either
  String
  (Maybe FleetMetricUnit
   -> Maybe Text -> Maybe Text -> Int -> DescribeFleetMetricResponse)
-> Either String (Maybe FleetMetricUnit)
-> Either
     String
     (Maybe Text -> Maybe Text -> Int -> DescribeFleetMetricResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe FleetMetricUnit)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"unit")
            Either
  String
  (Maybe Text -> Maybe Text -> Int -> DescribeFleetMetricResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> DescribeFleetMetricResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"indexName")
            Either String (Maybe Text -> Int -> DescribeFleetMetricResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeFleetMetricResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"metricArn")
            Either String (Int -> DescribeFleetMetricResponse)
-> Either String Int -> Either String DescribeFleetMetricResponse
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 DescribeFleetMetric

instance Prelude.NFData DescribeFleetMetric

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

instance Core.ToPath DescribeFleetMetric where
  toPath :: DescribeFleetMetric -> ByteString
toPath DescribeFleetMetric' {Text
metricName :: Text
$sel:metricName:DescribeFleetMetric' :: DescribeFleetMetric -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/fleet-metric/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
metricName]

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

-- | /See:/ 'newDescribeFleetMetricResponse' smart constructor.
data DescribeFleetMetricResponse = DescribeFleetMetricResponse'
  { -- | The type of the aggregation query.
    DescribeFleetMetricResponse -> Maybe AggregationType
aggregationType :: Prelude.Maybe AggregationType,
    -- | The date when the fleet metric is last modified.
    DescribeFleetMetricResponse -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
    -- | The time in seconds between fleet metric emissions. Range [60(1 min),
    -- 86400(1 day)] and must be multiple of 60.
    DescribeFleetMetricResponse -> Maybe Natural
period :: Prelude.Maybe Prelude.Natural,
    -- | The query version.
    DescribeFleetMetricResponse -> Maybe Text
queryVersion :: Prelude.Maybe Prelude.Text,
    -- | The name of the fleet metric to describe.
    DescribeFleetMetricResponse -> Maybe Text
metricName :: Prelude.Maybe Prelude.Text,
    -- | The field to aggregate.
    DescribeFleetMetricResponse -> Maybe Text
aggregationField :: Prelude.Maybe Prelude.Text,
    -- | The search query string.
    DescribeFleetMetricResponse -> Maybe Text
queryString :: Prelude.Maybe Prelude.Text,
    -- | The version of the fleet metric.
    DescribeFleetMetricResponse -> Maybe Integer
version :: Prelude.Maybe Prelude.Integer,
    -- | The date when the fleet metric is created.
    DescribeFleetMetricResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The fleet metric description.
    DescribeFleetMetricResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Used to support unit transformation such as milliseconds to seconds. The
    -- unit must be supported by
    -- <https://docs.aws.amazon.com/https:/docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html CW metric>.
    DescribeFleetMetricResponse -> Maybe FleetMetricUnit
unit :: Prelude.Maybe FleetMetricUnit,
    -- | The name of the index to search.
    DescribeFleetMetricResponse -> Maybe Text
indexName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the fleet metric to describe.
    DescribeFleetMetricResponse -> Maybe Text
metricArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeFleetMetricResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeFleetMetricResponse -> DescribeFleetMetricResponse -> Bool
(DescribeFleetMetricResponse
 -> DescribeFleetMetricResponse -> Bool)
-> (DescribeFleetMetricResponse
    -> DescribeFleetMetricResponse -> Bool)
-> Eq DescribeFleetMetricResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFleetMetricResponse -> DescribeFleetMetricResponse -> Bool
$c/= :: DescribeFleetMetricResponse -> DescribeFleetMetricResponse -> Bool
== :: DescribeFleetMetricResponse -> DescribeFleetMetricResponse -> Bool
$c== :: DescribeFleetMetricResponse -> DescribeFleetMetricResponse -> Bool
Prelude.Eq, ReadPrec [DescribeFleetMetricResponse]
ReadPrec DescribeFleetMetricResponse
Int -> ReadS DescribeFleetMetricResponse
ReadS [DescribeFleetMetricResponse]
(Int -> ReadS DescribeFleetMetricResponse)
-> ReadS [DescribeFleetMetricResponse]
-> ReadPrec DescribeFleetMetricResponse
-> ReadPrec [DescribeFleetMetricResponse]
-> Read DescribeFleetMetricResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFleetMetricResponse]
$creadListPrec :: ReadPrec [DescribeFleetMetricResponse]
readPrec :: ReadPrec DescribeFleetMetricResponse
$creadPrec :: ReadPrec DescribeFleetMetricResponse
readList :: ReadS [DescribeFleetMetricResponse]
$creadList :: ReadS [DescribeFleetMetricResponse]
readsPrec :: Int -> ReadS DescribeFleetMetricResponse
$creadsPrec :: Int -> ReadS DescribeFleetMetricResponse
Prelude.Read, Int -> DescribeFleetMetricResponse -> ShowS
[DescribeFleetMetricResponse] -> ShowS
DescribeFleetMetricResponse -> String
(Int -> DescribeFleetMetricResponse -> ShowS)
-> (DescribeFleetMetricResponse -> String)
-> ([DescribeFleetMetricResponse] -> ShowS)
-> Show DescribeFleetMetricResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFleetMetricResponse] -> ShowS
$cshowList :: [DescribeFleetMetricResponse] -> ShowS
show :: DescribeFleetMetricResponse -> String
$cshow :: DescribeFleetMetricResponse -> String
showsPrec :: Int -> DescribeFleetMetricResponse -> ShowS
$cshowsPrec :: Int -> DescribeFleetMetricResponse -> ShowS
Prelude.Show, (forall x.
 DescribeFleetMetricResponse -> Rep DescribeFleetMetricResponse x)
-> (forall x.
    Rep DescribeFleetMetricResponse x -> DescribeFleetMetricResponse)
-> Generic DescribeFleetMetricResponse
forall x.
Rep DescribeFleetMetricResponse x -> DescribeFleetMetricResponse
forall x.
DescribeFleetMetricResponse -> Rep DescribeFleetMetricResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeFleetMetricResponse x -> DescribeFleetMetricResponse
$cfrom :: forall x.
DescribeFleetMetricResponse -> Rep DescribeFleetMetricResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeFleetMetricResponse' 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:
--
-- 'aggregationType', 'describeFleetMetricResponse_aggregationType' - The type of the aggregation query.
--
-- 'lastModifiedDate', 'describeFleetMetricResponse_lastModifiedDate' - The date when the fleet metric is last modified.
--
-- 'period', 'describeFleetMetricResponse_period' - The time in seconds between fleet metric emissions. Range [60(1 min),
-- 86400(1 day)] and must be multiple of 60.
--
-- 'queryVersion', 'describeFleetMetricResponse_queryVersion' - The query version.
--
-- 'metricName', 'describeFleetMetricResponse_metricName' - The name of the fleet metric to describe.
--
-- 'aggregationField', 'describeFleetMetricResponse_aggregationField' - The field to aggregate.
--
-- 'queryString', 'describeFleetMetricResponse_queryString' - The search query string.
--
-- 'version', 'describeFleetMetricResponse_version' - The version of the fleet metric.
--
-- 'creationDate', 'describeFleetMetricResponse_creationDate' - The date when the fleet metric is created.
--
-- 'description', 'describeFleetMetricResponse_description' - The fleet metric description.
--
-- 'unit', 'describeFleetMetricResponse_unit' - Used to support unit transformation such as milliseconds to seconds. The
-- unit must be supported by
-- <https://docs.aws.amazon.com/https:/docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html CW metric>.
--
-- 'indexName', 'describeFleetMetricResponse_indexName' - The name of the index to search.
--
-- 'metricArn', 'describeFleetMetricResponse_metricArn' - The ARN of the fleet metric to describe.
--
-- 'httpStatus', 'describeFleetMetricResponse_httpStatus' - The response's http status code.
newDescribeFleetMetricResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeFleetMetricResponse
newDescribeFleetMetricResponse :: Int -> DescribeFleetMetricResponse
newDescribeFleetMetricResponse Int
pHttpStatus_ =
  DescribeFleetMetricResponse' :: Maybe AggregationType
-> Maybe POSIX
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe POSIX
-> Maybe Text
-> Maybe FleetMetricUnit
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeFleetMetricResponse
DescribeFleetMetricResponse'
    { $sel:aggregationType:DescribeFleetMetricResponse' :: Maybe AggregationType
aggregationType =
        Maybe AggregationType
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedDate:DescribeFleetMetricResponse' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:period:DescribeFleetMetricResponse' :: Maybe Natural
period = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:queryVersion:DescribeFleetMetricResponse' :: Maybe Text
queryVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:metricName:DescribeFleetMetricResponse' :: Maybe Text
metricName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:aggregationField:DescribeFleetMetricResponse' :: Maybe Text
aggregationField = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:queryString:DescribeFleetMetricResponse' :: Maybe Text
queryString = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:DescribeFleetMetricResponse' :: Maybe Integer
version = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:DescribeFleetMetricResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:description:DescribeFleetMetricResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:unit:DescribeFleetMetricResponse' :: Maybe FleetMetricUnit
unit = Maybe FleetMetricUnit
forall a. Maybe a
Prelude.Nothing,
      $sel:indexName:DescribeFleetMetricResponse' :: Maybe Text
indexName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:metricArn:DescribeFleetMetricResponse' :: Maybe Text
metricArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeFleetMetricResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The type of the aggregation query.
describeFleetMetricResponse_aggregationType :: Lens.Lens' DescribeFleetMetricResponse (Prelude.Maybe AggregationType)
describeFleetMetricResponse_aggregationType :: (Maybe AggregationType -> f (Maybe AggregationType))
-> DescribeFleetMetricResponse -> f DescribeFleetMetricResponse
describeFleetMetricResponse_aggregationType = (DescribeFleetMetricResponse -> Maybe AggregationType)
-> (DescribeFleetMetricResponse
    -> Maybe AggregationType -> DescribeFleetMetricResponse)
-> Lens
     DescribeFleetMetricResponse
     DescribeFleetMetricResponse
     (Maybe AggregationType)
     (Maybe AggregationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetMetricResponse' {Maybe AggregationType
aggregationType :: Maybe AggregationType
$sel:aggregationType:DescribeFleetMetricResponse' :: DescribeFleetMetricResponse -> Maybe AggregationType
aggregationType} -> Maybe AggregationType
aggregationType) (\s :: DescribeFleetMetricResponse
s@DescribeFleetMetricResponse' {} Maybe AggregationType
a -> DescribeFleetMetricResponse
s {$sel:aggregationType:DescribeFleetMetricResponse' :: Maybe AggregationType
aggregationType = Maybe AggregationType
a} :: DescribeFleetMetricResponse)

-- | The date when the fleet metric is last modified.
describeFleetMetricResponse_lastModifiedDate :: Lens.Lens' DescribeFleetMetricResponse (Prelude.Maybe Prelude.UTCTime)
describeFleetMetricResponse_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeFleetMetricResponse -> f DescribeFleetMetricResponse
describeFleetMetricResponse_lastModifiedDate = (DescribeFleetMetricResponse -> Maybe POSIX)
-> (DescribeFleetMetricResponse
    -> Maybe POSIX -> DescribeFleetMetricResponse)
-> Lens
     DescribeFleetMetricResponse
     DescribeFleetMetricResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetMetricResponse' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:DescribeFleetMetricResponse' :: DescribeFleetMetricResponse -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: DescribeFleetMetricResponse
s@DescribeFleetMetricResponse' {} Maybe POSIX
a -> DescribeFleetMetricResponse
s {$sel:lastModifiedDate:DescribeFleetMetricResponse' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: DescribeFleetMetricResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeFleetMetricResponse -> f DescribeFleetMetricResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeFleetMetricResponse
-> f DescribeFleetMetricResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The time in seconds between fleet metric emissions. Range [60(1 min),
-- 86400(1 day)] and must be multiple of 60.
describeFleetMetricResponse_period :: Lens.Lens' DescribeFleetMetricResponse (Prelude.Maybe Prelude.Natural)
describeFleetMetricResponse_period :: (Maybe Natural -> f (Maybe Natural))
-> DescribeFleetMetricResponse -> f DescribeFleetMetricResponse
describeFleetMetricResponse_period = (DescribeFleetMetricResponse -> Maybe Natural)
-> (DescribeFleetMetricResponse
    -> Maybe Natural -> DescribeFleetMetricResponse)
-> Lens
     DescribeFleetMetricResponse
     DescribeFleetMetricResponse
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetMetricResponse' {Maybe Natural
period :: Maybe Natural
$sel:period:DescribeFleetMetricResponse' :: DescribeFleetMetricResponse -> Maybe Natural
period} -> Maybe Natural
period) (\s :: DescribeFleetMetricResponse
s@DescribeFleetMetricResponse' {} Maybe Natural
a -> DescribeFleetMetricResponse
s {$sel:period:DescribeFleetMetricResponse' :: Maybe Natural
period = Maybe Natural
a} :: DescribeFleetMetricResponse)

-- | The query version.
describeFleetMetricResponse_queryVersion :: Lens.Lens' DescribeFleetMetricResponse (Prelude.Maybe Prelude.Text)
describeFleetMetricResponse_queryVersion :: (Maybe Text -> f (Maybe Text))
-> DescribeFleetMetricResponse -> f DescribeFleetMetricResponse
describeFleetMetricResponse_queryVersion = (DescribeFleetMetricResponse -> Maybe Text)
-> (DescribeFleetMetricResponse
    -> Maybe Text -> DescribeFleetMetricResponse)
-> Lens
     DescribeFleetMetricResponse
     DescribeFleetMetricResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetMetricResponse' {Maybe Text
queryVersion :: Maybe Text
$sel:queryVersion:DescribeFleetMetricResponse' :: DescribeFleetMetricResponse -> Maybe Text
queryVersion} -> Maybe Text
queryVersion) (\s :: DescribeFleetMetricResponse
s@DescribeFleetMetricResponse' {} Maybe Text
a -> DescribeFleetMetricResponse
s {$sel:queryVersion:DescribeFleetMetricResponse' :: Maybe Text
queryVersion = Maybe Text
a} :: DescribeFleetMetricResponse)

-- | The name of the fleet metric to describe.
describeFleetMetricResponse_metricName :: Lens.Lens' DescribeFleetMetricResponse (Prelude.Maybe Prelude.Text)
describeFleetMetricResponse_metricName :: (Maybe Text -> f (Maybe Text))
-> DescribeFleetMetricResponse -> f DescribeFleetMetricResponse
describeFleetMetricResponse_metricName = (DescribeFleetMetricResponse -> Maybe Text)
-> (DescribeFleetMetricResponse
    -> Maybe Text -> DescribeFleetMetricResponse)
-> Lens
     DescribeFleetMetricResponse
     DescribeFleetMetricResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetMetricResponse' {Maybe Text
metricName :: Maybe Text
$sel:metricName:DescribeFleetMetricResponse' :: DescribeFleetMetricResponse -> Maybe Text
metricName} -> Maybe Text
metricName) (\s :: DescribeFleetMetricResponse
s@DescribeFleetMetricResponse' {} Maybe Text
a -> DescribeFleetMetricResponse
s {$sel:metricName:DescribeFleetMetricResponse' :: Maybe Text
metricName = Maybe Text
a} :: DescribeFleetMetricResponse)

-- | The field to aggregate.
describeFleetMetricResponse_aggregationField :: Lens.Lens' DescribeFleetMetricResponse (Prelude.Maybe Prelude.Text)
describeFleetMetricResponse_aggregationField :: (Maybe Text -> f (Maybe Text))
-> DescribeFleetMetricResponse -> f DescribeFleetMetricResponse
describeFleetMetricResponse_aggregationField = (DescribeFleetMetricResponse -> Maybe Text)
-> (DescribeFleetMetricResponse
    -> Maybe Text -> DescribeFleetMetricResponse)
-> Lens
     DescribeFleetMetricResponse
     DescribeFleetMetricResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetMetricResponse' {Maybe Text
aggregationField :: Maybe Text
$sel:aggregationField:DescribeFleetMetricResponse' :: DescribeFleetMetricResponse -> Maybe Text
aggregationField} -> Maybe Text
aggregationField) (\s :: DescribeFleetMetricResponse
s@DescribeFleetMetricResponse' {} Maybe Text
a -> DescribeFleetMetricResponse
s {$sel:aggregationField:DescribeFleetMetricResponse' :: Maybe Text
aggregationField = Maybe Text
a} :: DescribeFleetMetricResponse)

-- | The search query string.
describeFleetMetricResponse_queryString :: Lens.Lens' DescribeFleetMetricResponse (Prelude.Maybe Prelude.Text)
describeFleetMetricResponse_queryString :: (Maybe Text -> f (Maybe Text))
-> DescribeFleetMetricResponse -> f DescribeFleetMetricResponse
describeFleetMetricResponse_queryString = (DescribeFleetMetricResponse -> Maybe Text)
-> (DescribeFleetMetricResponse
    -> Maybe Text -> DescribeFleetMetricResponse)
-> Lens
     DescribeFleetMetricResponse
     DescribeFleetMetricResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetMetricResponse' {Maybe Text
queryString :: Maybe Text
$sel:queryString:DescribeFleetMetricResponse' :: DescribeFleetMetricResponse -> Maybe Text
queryString} -> Maybe Text
queryString) (\s :: DescribeFleetMetricResponse
s@DescribeFleetMetricResponse' {} Maybe Text
a -> DescribeFleetMetricResponse
s {$sel:queryString:DescribeFleetMetricResponse' :: Maybe Text
queryString = Maybe Text
a} :: DescribeFleetMetricResponse)

-- | The version of the fleet metric.
describeFleetMetricResponse_version :: Lens.Lens' DescribeFleetMetricResponse (Prelude.Maybe Prelude.Integer)
describeFleetMetricResponse_version :: (Maybe Integer -> f (Maybe Integer))
-> DescribeFleetMetricResponse -> f DescribeFleetMetricResponse
describeFleetMetricResponse_version = (DescribeFleetMetricResponse -> Maybe Integer)
-> (DescribeFleetMetricResponse
    -> Maybe Integer -> DescribeFleetMetricResponse)
-> Lens
     DescribeFleetMetricResponse
     DescribeFleetMetricResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetMetricResponse' {Maybe Integer
version :: Maybe Integer
$sel:version:DescribeFleetMetricResponse' :: DescribeFleetMetricResponse -> Maybe Integer
version} -> Maybe Integer
version) (\s :: DescribeFleetMetricResponse
s@DescribeFleetMetricResponse' {} Maybe Integer
a -> DescribeFleetMetricResponse
s {$sel:version:DescribeFleetMetricResponse' :: Maybe Integer
version = Maybe Integer
a} :: DescribeFleetMetricResponse)

-- | The date when the fleet metric is created.
describeFleetMetricResponse_creationDate :: Lens.Lens' DescribeFleetMetricResponse (Prelude.Maybe Prelude.UTCTime)
describeFleetMetricResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeFleetMetricResponse -> f DescribeFleetMetricResponse
describeFleetMetricResponse_creationDate = (DescribeFleetMetricResponse -> Maybe POSIX)
-> (DescribeFleetMetricResponse
    -> Maybe POSIX -> DescribeFleetMetricResponse)
-> Lens
     DescribeFleetMetricResponse
     DescribeFleetMetricResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetMetricResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:DescribeFleetMetricResponse' :: DescribeFleetMetricResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: DescribeFleetMetricResponse
s@DescribeFleetMetricResponse' {} Maybe POSIX
a -> DescribeFleetMetricResponse
s {$sel:creationDate:DescribeFleetMetricResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: DescribeFleetMetricResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeFleetMetricResponse -> f DescribeFleetMetricResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeFleetMetricResponse
-> f DescribeFleetMetricResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The fleet metric description.
describeFleetMetricResponse_description :: Lens.Lens' DescribeFleetMetricResponse (Prelude.Maybe Prelude.Text)
describeFleetMetricResponse_description :: (Maybe Text -> f (Maybe Text))
-> DescribeFleetMetricResponse -> f DescribeFleetMetricResponse
describeFleetMetricResponse_description = (DescribeFleetMetricResponse -> Maybe Text)
-> (DescribeFleetMetricResponse
    -> Maybe Text -> DescribeFleetMetricResponse)
-> Lens
     DescribeFleetMetricResponse
     DescribeFleetMetricResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetMetricResponse' {Maybe Text
description :: Maybe Text
$sel:description:DescribeFleetMetricResponse' :: DescribeFleetMetricResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: DescribeFleetMetricResponse
s@DescribeFleetMetricResponse' {} Maybe Text
a -> DescribeFleetMetricResponse
s {$sel:description:DescribeFleetMetricResponse' :: Maybe Text
description = Maybe Text
a} :: DescribeFleetMetricResponse)

-- | Used to support unit transformation such as milliseconds to seconds. The
-- unit must be supported by
-- <https://docs.aws.amazon.com/https:/docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html CW metric>.
describeFleetMetricResponse_unit :: Lens.Lens' DescribeFleetMetricResponse (Prelude.Maybe FleetMetricUnit)
describeFleetMetricResponse_unit :: (Maybe FleetMetricUnit -> f (Maybe FleetMetricUnit))
-> DescribeFleetMetricResponse -> f DescribeFleetMetricResponse
describeFleetMetricResponse_unit = (DescribeFleetMetricResponse -> Maybe FleetMetricUnit)
-> (DescribeFleetMetricResponse
    -> Maybe FleetMetricUnit -> DescribeFleetMetricResponse)
-> Lens
     DescribeFleetMetricResponse
     DescribeFleetMetricResponse
     (Maybe FleetMetricUnit)
     (Maybe FleetMetricUnit)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetMetricResponse' {Maybe FleetMetricUnit
unit :: Maybe FleetMetricUnit
$sel:unit:DescribeFleetMetricResponse' :: DescribeFleetMetricResponse -> Maybe FleetMetricUnit
unit} -> Maybe FleetMetricUnit
unit) (\s :: DescribeFleetMetricResponse
s@DescribeFleetMetricResponse' {} Maybe FleetMetricUnit
a -> DescribeFleetMetricResponse
s {$sel:unit:DescribeFleetMetricResponse' :: Maybe FleetMetricUnit
unit = Maybe FleetMetricUnit
a} :: DescribeFleetMetricResponse)

-- | The name of the index to search.
describeFleetMetricResponse_indexName :: Lens.Lens' DescribeFleetMetricResponse (Prelude.Maybe Prelude.Text)
describeFleetMetricResponse_indexName :: (Maybe Text -> f (Maybe Text))
-> DescribeFleetMetricResponse -> f DescribeFleetMetricResponse
describeFleetMetricResponse_indexName = (DescribeFleetMetricResponse -> Maybe Text)
-> (DescribeFleetMetricResponse
    -> Maybe Text -> DescribeFleetMetricResponse)
-> Lens
     DescribeFleetMetricResponse
     DescribeFleetMetricResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetMetricResponse' {Maybe Text
indexName :: Maybe Text
$sel:indexName:DescribeFleetMetricResponse' :: DescribeFleetMetricResponse -> Maybe Text
indexName} -> Maybe Text
indexName) (\s :: DescribeFleetMetricResponse
s@DescribeFleetMetricResponse' {} Maybe Text
a -> DescribeFleetMetricResponse
s {$sel:indexName:DescribeFleetMetricResponse' :: Maybe Text
indexName = Maybe Text
a} :: DescribeFleetMetricResponse)

-- | The ARN of the fleet metric to describe.
describeFleetMetricResponse_metricArn :: Lens.Lens' DescribeFleetMetricResponse (Prelude.Maybe Prelude.Text)
describeFleetMetricResponse_metricArn :: (Maybe Text -> f (Maybe Text))
-> DescribeFleetMetricResponse -> f DescribeFleetMetricResponse
describeFleetMetricResponse_metricArn = (DescribeFleetMetricResponse -> Maybe Text)
-> (DescribeFleetMetricResponse
    -> Maybe Text -> DescribeFleetMetricResponse)
-> Lens
     DescribeFleetMetricResponse
     DescribeFleetMetricResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFleetMetricResponse' {Maybe Text
metricArn :: Maybe Text
$sel:metricArn:DescribeFleetMetricResponse' :: DescribeFleetMetricResponse -> Maybe Text
metricArn} -> Maybe Text
metricArn) (\s :: DescribeFleetMetricResponse
s@DescribeFleetMetricResponse' {} Maybe Text
a -> DescribeFleetMetricResponse
s {$sel:metricArn:DescribeFleetMetricResponse' :: Maybe Text
metricArn = Maybe Text
a} :: DescribeFleetMetricResponse)

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

instance Prelude.NFData DescribeFleetMetricResponse