{-# 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.DescribeCustomMetric
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets information about a Device Defender detect custom metric.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions DescribeCustomMetric>
-- action.
module Amazonka.IoT.DescribeCustomMetric
  ( -- * Creating a Request
    DescribeCustomMetric (..),
    newDescribeCustomMetric,

    -- * Request Lenses
    describeCustomMetric_metricName,

    -- * Destructuring the Response
    DescribeCustomMetricResponse (..),
    newDescribeCustomMetricResponse,

    -- * Response Lenses
    describeCustomMetricResponse_creationDate,
    describeCustomMetricResponse_displayName,
    describeCustomMetricResponse_lastModifiedDate,
    describeCustomMetricResponse_metricArn,
    describeCustomMetricResponse_metricName,
    describeCustomMetricResponse_metricType,
    describeCustomMetricResponse_httpStatus,
  )
where

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

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

-- |
-- Create a value of 'DescribeCustomMetric' 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', 'describeCustomMetric_metricName' - The name of the custom metric.
newDescribeCustomMetric ::
  -- | 'metricName'
  Prelude.Text ->
  DescribeCustomMetric
newDescribeCustomMetric :: Text -> DescribeCustomMetric
newDescribeCustomMetric Text
pMetricName_ =
  DescribeCustomMetric' {$sel:metricName:DescribeCustomMetric' :: Text
metricName = Text
pMetricName_}

-- | The name of the custom metric.
describeCustomMetric_metricName :: Lens.Lens' DescribeCustomMetric Prelude.Text
describeCustomMetric_metricName :: Lens' DescribeCustomMetric Text
describeCustomMetric_metricName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCustomMetric' {Text
metricName :: Text
$sel:metricName:DescribeCustomMetric' :: DescribeCustomMetric -> Text
metricName} -> Text
metricName) (\s :: DescribeCustomMetric
s@DescribeCustomMetric' {} Text
a -> DescribeCustomMetric
s {$sel:metricName:DescribeCustomMetric' :: Text
metricName = Text
a} :: DescribeCustomMetric)

instance Core.AWSRequest DescribeCustomMetric where
  type
    AWSResponse DescribeCustomMetric =
      DescribeCustomMetricResponse
  request :: (Service -> Service)
-> DescribeCustomMetric -> Request DescribeCustomMetric
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeCustomMetric
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeCustomMetric)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe CustomMetricType
-> Int
-> DescribeCustomMetricResponse
DescribeCustomMetricResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"creationDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"displayName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"lastModifiedDate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"metricArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"metricName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"metricType")
            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 DescribeCustomMetric where
  hashWithSalt :: Int -> DescribeCustomMetric -> Int
hashWithSalt Int
_salt DescribeCustomMetric' {Text
metricName :: Text
$sel:metricName:DescribeCustomMetric' :: DescribeCustomMetric -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
metricName

instance Prelude.NFData DescribeCustomMetric where
  rnf :: DescribeCustomMetric -> ()
rnf DescribeCustomMetric' {Text
metricName :: Text
$sel:metricName:DescribeCustomMetric' :: DescribeCustomMetric -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
metricName

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

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

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

-- | /See:/ 'newDescribeCustomMetricResponse' smart constructor.
data DescribeCustomMetricResponse = DescribeCustomMetricResponse'
  { -- | The creation date of the custom metric in milliseconds since epoch.
    DescribeCustomMetricResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Data.POSIX,
    -- | Field represents a friendly name in the console for the custom metric;
    -- doesn\'t have to be unique. Don\'t use this name as the metric
    -- identifier in the device metric report. Can be updated.
    DescribeCustomMetricResponse -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | The time the custom metric was last modified in milliseconds since
    -- epoch.
    DescribeCustomMetricResponse -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Data.POSIX,
    -- | The Amazon Resource Number (ARN) of the custom metric.
    DescribeCustomMetricResponse -> Maybe Text
metricArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the custom metric.
    DescribeCustomMetricResponse -> Maybe Text
metricName :: Prelude.Maybe Prelude.Text,
    -- | The type of the custom metric.
    --
    -- The type @number@ only takes a single metric value as an input, but
    -- while submitting the metrics value in the DeviceMetrics report, it must
    -- be passed as an array with a single value.
    DescribeCustomMetricResponse -> Maybe CustomMetricType
metricType :: Prelude.Maybe CustomMetricType,
    -- | The response's http status code.
    DescribeCustomMetricResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeCustomMetricResponse
-> DescribeCustomMetricResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCustomMetricResponse
-> DescribeCustomMetricResponse -> Bool
$c/= :: DescribeCustomMetricResponse
-> DescribeCustomMetricResponse -> Bool
== :: DescribeCustomMetricResponse
-> DescribeCustomMetricResponse -> Bool
$c== :: DescribeCustomMetricResponse
-> DescribeCustomMetricResponse -> Bool
Prelude.Eq, ReadPrec [DescribeCustomMetricResponse]
ReadPrec DescribeCustomMetricResponse
Int -> ReadS DescribeCustomMetricResponse
ReadS [DescribeCustomMetricResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCustomMetricResponse]
$creadListPrec :: ReadPrec [DescribeCustomMetricResponse]
readPrec :: ReadPrec DescribeCustomMetricResponse
$creadPrec :: ReadPrec DescribeCustomMetricResponse
readList :: ReadS [DescribeCustomMetricResponse]
$creadList :: ReadS [DescribeCustomMetricResponse]
readsPrec :: Int -> ReadS DescribeCustomMetricResponse
$creadsPrec :: Int -> ReadS DescribeCustomMetricResponse
Prelude.Read, Int -> DescribeCustomMetricResponse -> ShowS
[DescribeCustomMetricResponse] -> ShowS
DescribeCustomMetricResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCustomMetricResponse] -> ShowS
$cshowList :: [DescribeCustomMetricResponse] -> ShowS
show :: DescribeCustomMetricResponse -> String
$cshow :: DescribeCustomMetricResponse -> String
showsPrec :: Int -> DescribeCustomMetricResponse -> ShowS
$cshowsPrec :: Int -> DescribeCustomMetricResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeCustomMetricResponse x -> DescribeCustomMetricResponse
forall x.
DescribeCustomMetricResponse -> Rep DescribeCustomMetricResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeCustomMetricResponse x -> DescribeCustomMetricResponse
$cfrom :: forall x.
DescribeCustomMetricResponse -> Rep DescribeCustomMetricResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeCustomMetricResponse' 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:
--
-- 'creationDate', 'describeCustomMetricResponse_creationDate' - The creation date of the custom metric in milliseconds since epoch.
--
-- 'displayName', 'describeCustomMetricResponse_displayName' - Field represents a friendly name in the console for the custom metric;
-- doesn\'t have to be unique. Don\'t use this name as the metric
-- identifier in the device metric report. Can be updated.
--
-- 'lastModifiedDate', 'describeCustomMetricResponse_lastModifiedDate' - The time the custom metric was last modified in milliseconds since
-- epoch.
--
-- 'metricArn', 'describeCustomMetricResponse_metricArn' - The Amazon Resource Number (ARN) of the custom metric.
--
-- 'metricName', 'describeCustomMetricResponse_metricName' - The name of the custom metric.
--
-- 'metricType', 'describeCustomMetricResponse_metricType' - The type of the custom metric.
--
-- The type @number@ only takes a single metric value as an input, but
-- while submitting the metrics value in the DeviceMetrics report, it must
-- be passed as an array with a single value.
--
-- 'httpStatus', 'describeCustomMetricResponse_httpStatus' - The response's http status code.
newDescribeCustomMetricResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeCustomMetricResponse
newDescribeCustomMetricResponse :: Int -> DescribeCustomMetricResponse
newDescribeCustomMetricResponse Int
pHttpStatus_ =
  DescribeCustomMetricResponse'
    { $sel:creationDate:DescribeCustomMetricResponse' :: Maybe POSIX
creationDate =
        forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:DescribeCustomMetricResponse' :: Maybe Text
displayName = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedDate:DescribeCustomMetricResponse' :: Maybe POSIX
lastModifiedDate = forall a. Maybe a
Prelude.Nothing,
      $sel:metricArn:DescribeCustomMetricResponse' :: Maybe Text
metricArn = forall a. Maybe a
Prelude.Nothing,
      $sel:metricName:DescribeCustomMetricResponse' :: Maybe Text
metricName = forall a. Maybe a
Prelude.Nothing,
      $sel:metricType:DescribeCustomMetricResponse' :: Maybe CustomMetricType
metricType = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeCustomMetricResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The creation date of the custom metric in milliseconds since epoch.
describeCustomMetricResponse_creationDate :: Lens.Lens' DescribeCustomMetricResponse (Prelude.Maybe Prelude.UTCTime)
describeCustomMetricResponse_creationDate :: Lens' DescribeCustomMetricResponse (Maybe UTCTime)
describeCustomMetricResponse_creationDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCustomMetricResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:DescribeCustomMetricResponse' :: DescribeCustomMetricResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: DescribeCustomMetricResponse
s@DescribeCustomMetricResponse' {} Maybe POSIX
a -> DescribeCustomMetricResponse
s {$sel:creationDate:DescribeCustomMetricResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: DescribeCustomMetricResponse) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Field represents a friendly name in the console for the custom metric;
-- doesn\'t have to be unique. Don\'t use this name as the metric
-- identifier in the device metric report. Can be updated.
describeCustomMetricResponse_displayName :: Lens.Lens' DescribeCustomMetricResponse (Prelude.Maybe Prelude.Text)
describeCustomMetricResponse_displayName :: Lens' DescribeCustomMetricResponse (Maybe Text)
describeCustomMetricResponse_displayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCustomMetricResponse' {Maybe Text
displayName :: Maybe Text
$sel:displayName:DescribeCustomMetricResponse' :: DescribeCustomMetricResponse -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: DescribeCustomMetricResponse
s@DescribeCustomMetricResponse' {} Maybe Text
a -> DescribeCustomMetricResponse
s {$sel:displayName:DescribeCustomMetricResponse' :: Maybe Text
displayName = Maybe Text
a} :: DescribeCustomMetricResponse)

-- | The time the custom metric was last modified in milliseconds since
-- epoch.
describeCustomMetricResponse_lastModifiedDate :: Lens.Lens' DescribeCustomMetricResponse (Prelude.Maybe Prelude.UTCTime)
describeCustomMetricResponse_lastModifiedDate :: Lens' DescribeCustomMetricResponse (Maybe UTCTime)
describeCustomMetricResponse_lastModifiedDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCustomMetricResponse' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:DescribeCustomMetricResponse' :: DescribeCustomMetricResponse -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: DescribeCustomMetricResponse
s@DescribeCustomMetricResponse' {} Maybe POSIX
a -> DescribeCustomMetricResponse
s {$sel:lastModifiedDate:DescribeCustomMetricResponse' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: DescribeCustomMetricResponse) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The Amazon Resource Number (ARN) of the custom metric.
describeCustomMetricResponse_metricArn :: Lens.Lens' DescribeCustomMetricResponse (Prelude.Maybe Prelude.Text)
describeCustomMetricResponse_metricArn :: Lens' DescribeCustomMetricResponse (Maybe Text)
describeCustomMetricResponse_metricArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCustomMetricResponse' {Maybe Text
metricArn :: Maybe Text
$sel:metricArn:DescribeCustomMetricResponse' :: DescribeCustomMetricResponse -> Maybe Text
metricArn} -> Maybe Text
metricArn) (\s :: DescribeCustomMetricResponse
s@DescribeCustomMetricResponse' {} Maybe Text
a -> DescribeCustomMetricResponse
s {$sel:metricArn:DescribeCustomMetricResponse' :: Maybe Text
metricArn = Maybe Text
a} :: DescribeCustomMetricResponse)

-- | The name of the custom metric.
describeCustomMetricResponse_metricName :: Lens.Lens' DescribeCustomMetricResponse (Prelude.Maybe Prelude.Text)
describeCustomMetricResponse_metricName :: Lens' DescribeCustomMetricResponse (Maybe Text)
describeCustomMetricResponse_metricName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCustomMetricResponse' {Maybe Text
metricName :: Maybe Text
$sel:metricName:DescribeCustomMetricResponse' :: DescribeCustomMetricResponse -> Maybe Text
metricName} -> Maybe Text
metricName) (\s :: DescribeCustomMetricResponse
s@DescribeCustomMetricResponse' {} Maybe Text
a -> DescribeCustomMetricResponse
s {$sel:metricName:DescribeCustomMetricResponse' :: Maybe Text
metricName = Maybe Text
a} :: DescribeCustomMetricResponse)

-- | The type of the custom metric.
--
-- The type @number@ only takes a single metric value as an input, but
-- while submitting the metrics value in the DeviceMetrics report, it must
-- be passed as an array with a single value.
describeCustomMetricResponse_metricType :: Lens.Lens' DescribeCustomMetricResponse (Prelude.Maybe CustomMetricType)
describeCustomMetricResponse_metricType :: Lens' DescribeCustomMetricResponse (Maybe CustomMetricType)
describeCustomMetricResponse_metricType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCustomMetricResponse' {Maybe CustomMetricType
metricType :: Maybe CustomMetricType
$sel:metricType:DescribeCustomMetricResponse' :: DescribeCustomMetricResponse -> Maybe CustomMetricType
metricType} -> Maybe CustomMetricType
metricType) (\s :: DescribeCustomMetricResponse
s@DescribeCustomMetricResponse' {} Maybe CustomMetricType
a -> DescribeCustomMetricResponse
s {$sel:metricType:DescribeCustomMetricResponse' :: Maybe CustomMetricType
metricType = Maybe CustomMetricType
a} :: DescribeCustomMetricResponse)

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

instance Prelude.NFData DescribeCustomMetricResponse where
  rnf :: DescribeCustomMetricResponse -> ()
rnf DescribeCustomMetricResponse' {Int
Maybe Text
Maybe POSIX
Maybe CustomMetricType
httpStatus :: Int
metricType :: Maybe CustomMetricType
metricName :: Maybe Text
metricArn :: Maybe Text
lastModifiedDate :: Maybe POSIX
displayName :: Maybe Text
creationDate :: Maybe POSIX
$sel:httpStatus:DescribeCustomMetricResponse' :: DescribeCustomMetricResponse -> Int
$sel:metricType:DescribeCustomMetricResponse' :: DescribeCustomMetricResponse -> Maybe CustomMetricType
$sel:metricName:DescribeCustomMetricResponse' :: DescribeCustomMetricResponse -> Maybe Text
$sel:metricArn:DescribeCustomMetricResponse' :: DescribeCustomMetricResponse -> Maybe Text
$sel:lastModifiedDate:DescribeCustomMetricResponse' :: DescribeCustomMetricResponse -> Maybe POSIX
$sel:displayName:DescribeCustomMetricResponse' :: DescribeCustomMetricResponse -> Maybe Text
$sel:creationDate:DescribeCustomMetricResponse' :: DescribeCustomMetricResponse -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
displayName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedDate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
metricArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
metricName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CustomMetricType
metricType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus