{-# 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 #-}
module Amazonka.IoT.UpdateCustomMetric
(
UpdateCustomMetric (..),
newUpdateCustomMetric,
updateCustomMetric_metricName,
updateCustomMetric_displayName,
UpdateCustomMetricResponse (..),
newUpdateCustomMetricResponse,
updateCustomMetricResponse_metricType,
updateCustomMetricResponse_lastModifiedDate,
updateCustomMetricResponse_metricName,
updateCustomMetricResponse_displayName,
updateCustomMetricResponse_creationDate,
updateCustomMetricResponse_metricArn,
updateCustomMetricResponse_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
data UpdateCustomMetric = UpdateCustomMetric'
{
UpdateCustomMetric -> Text
metricName :: Prelude.Text,
UpdateCustomMetric -> Text
displayName :: Prelude.Text
}
deriving (UpdateCustomMetric -> UpdateCustomMetric -> Bool
(UpdateCustomMetric -> UpdateCustomMetric -> Bool)
-> (UpdateCustomMetric -> UpdateCustomMetric -> Bool)
-> Eq UpdateCustomMetric
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateCustomMetric -> UpdateCustomMetric -> Bool
$c/= :: UpdateCustomMetric -> UpdateCustomMetric -> Bool
== :: UpdateCustomMetric -> UpdateCustomMetric -> Bool
$c== :: UpdateCustomMetric -> UpdateCustomMetric -> Bool
Prelude.Eq, ReadPrec [UpdateCustomMetric]
ReadPrec UpdateCustomMetric
Int -> ReadS UpdateCustomMetric
ReadS [UpdateCustomMetric]
(Int -> ReadS UpdateCustomMetric)
-> ReadS [UpdateCustomMetric]
-> ReadPrec UpdateCustomMetric
-> ReadPrec [UpdateCustomMetric]
-> Read UpdateCustomMetric
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateCustomMetric]
$creadListPrec :: ReadPrec [UpdateCustomMetric]
readPrec :: ReadPrec UpdateCustomMetric
$creadPrec :: ReadPrec UpdateCustomMetric
readList :: ReadS [UpdateCustomMetric]
$creadList :: ReadS [UpdateCustomMetric]
readsPrec :: Int -> ReadS UpdateCustomMetric
$creadsPrec :: Int -> ReadS UpdateCustomMetric
Prelude.Read, Int -> UpdateCustomMetric -> ShowS
[UpdateCustomMetric] -> ShowS
UpdateCustomMetric -> String
(Int -> UpdateCustomMetric -> ShowS)
-> (UpdateCustomMetric -> String)
-> ([UpdateCustomMetric] -> ShowS)
-> Show UpdateCustomMetric
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateCustomMetric] -> ShowS
$cshowList :: [UpdateCustomMetric] -> ShowS
show :: UpdateCustomMetric -> String
$cshow :: UpdateCustomMetric -> String
showsPrec :: Int -> UpdateCustomMetric -> ShowS
$cshowsPrec :: Int -> UpdateCustomMetric -> ShowS
Prelude.Show, (forall x. UpdateCustomMetric -> Rep UpdateCustomMetric x)
-> (forall x. Rep UpdateCustomMetric x -> UpdateCustomMetric)
-> Generic UpdateCustomMetric
forall x. Rep UpdateCustomMetric x -> UpdateCustomMetric
forall x. UpdateCustomMetric -> Rep UpdateCustomMetric x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateCustomMetric x -> UpdateCustomMetric
$cfrom :: forall x. UpdateCustomMetric -> Rep UpdateCustomMetric x
Prelude.Generic)
newUpdateCustomMetric ::
Prelude.Text ->
Prelude.Text ->
UpdateCustomMetric
newUpdateCustomMetric :: Text -> Text -> UpdateCustomMetric
newUpdateCustomMetric Text
pMetricName_ Text
pDisplayName_ =
UpdateCustomMetric' :: Text -> Text -> UpdateCustomMetric
UpdateCustomMetric'
{ $sel:metricName:UpdateCustomMetric' :: Text
metricName = Text
pMetricName_,
$sel:displayName:UpdateCustomMetric' :: Text
displayName = Text
pDisplayName_
}
updateCustomMetric_metricName :: Lens.Lens' UpdateCustomMetric Prelude.Text
updateCustomMetric_metricName :: (Text -> f Text) -> UpdateCustomMetric -> f UpdateCustomMetric
updateCustomMetric_metricName = (UpdateCustomMetric -> Text)
-> (UpdateCustomMetric -> Text -> UpdateCustomMetric)
-> Lens UpdateCustomMetric UpdateCustomMetric Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCustomMetric' {Text
metricName :: Text
$sel:metricName:UpdateCustomMetric' :: UpdateCustomMetric -> Text
metricName} -> Text
metricName) (\s :: UpdateCustomMetric
s@UpdateCustomMetric' {} Text
a -> UpdateCustomMetric
s {$sel:metricName:UpdateCustomMetric' :: Text
metricName = Text
a} :: UpdateCustomMetric)
updateCustomMetric_displayName :: Lens.Lens' UpdateCustomMetric Prelude.Text
updateCustomMetric_displayName :: (Text -> f Text) -> UpdateCustomMetric -> f UpdateCustomMetric
updateCustomMetric_displayName = (UpdateCustomMetric -> Text)
-> (UpdateCustomMetric -> Text -> UpdateCustomMetric)
-> Lens UpdateCustomMetric UpdateCustomMetric Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCustomMetric' {Text
displayName :: Text
$sel:displayName:UpdateCustomMetric' :: UpdateCustomMetric -> Text
displayName} -> Text
displayName) (\s :: UpdateCustomMetric
s@UpdateCustomMetric' {} Text
a -> UpdateCustomMetric
s {$sel:displayName:UpdateCustomMetric' :: Text
displayName = Text
a} :: UpdateCustomMetric)
instance Core.AWSRequest UpdateCustomMetric where
type
AWSResponse UpdateCustomMetric =
UpdateCustomMetricResponse
request :: UpdateCustomMetric -> Request UpdateCustomMetric
request = Service -> UpdateCustomMetric -> Request UpdateCustomMetric
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateCustomMetric
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateCustomMetric)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateCustomMetric))
-> Logger
-> Service
-> Proxy UpdateCustomMetric
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateCustomMetric)))
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 CustomMetricType
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> UpdateCustomMetricResponse
UpdateCustomMetricResponse'
(Maybe CustomMetricType
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> UpdateCustomMetricResponse)
-> Either String (Maybe CustomMetricType)
-> Either
String
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> UpdateCustomMetricResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe CustomMetricType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"metricType")
Either
String
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> UpdateCustomMetricResponse)
-> Either String (Maybe POSIX)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> UpdateCustomMetricResponse)
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 Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> UpdateCustomMetricResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe POSIX -> Maybe Text -> Int -> UpdateCustomMetricResponse)
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 POSIX -> Maybe Text -> Int -> UpdateCustomMetricResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe POSIX -> Maybe Text -> Int -> UpdateCustomMetricResponse)
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
"displayName")
Either
String
(Maybe POSIX -> Maybe Text -> Int -> UpdateCustomMetricResponse)
-> Either String (Maybe POSIX)
-> Either String (Maybe Text -> Int -> UpdateCustomMetricResponse)
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 -> Int -> UpdateCustomMetricResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateCustomMetricResponse)
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 -> UpdateCustomMetricResponse)
-> Either String Int -> Either String UpdateCustomMetricResponse
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 UpdateCustomMetric
instance Prelude.NFData UpdateCustomMetric
instance Core.ToHeaders UpdateCustomMetric where
toHeaders :: UpdateCustomMetric -> ResponseHeaders
toHeaders = ResponseHeaders -> UpdateCustomMetric -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON UpdateCustomMetric where
toJSON :: UpdateCustomMetric -> Value
toJSON UpdateCustomMetric' {Text
displayName :: Text
metricName :: Text
$sel:displayName:UpdateCustomMetric' :: UpdateCustomMetric -> Text
$sel:metricName:UpdateCustomMetric' :: UpdateCustomMetric -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"displayName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
displayName)]
)
instance Core.ToPath UpdateCustomMetric where
toPath :: UpdateCustomMetric -> ByteString
toPath UpdateCustomMetric' {Text
displayName :: Text
metricName :: Text
$sel:displayName:UpdateCustomMetric' :: UpdateCustomMetric -> Text
$sel:metricName:UpdateCustomMetric' :: UpdateCustomMetric -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/custom-metric/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
metricName]
instance Core.ToQuery UpdateCustomMetric where
toQuery :: UpdateCustomMetric -> QueryString
toQuery = QueryString -> UpdateCustomMetric -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateCustomMetricResponse = UpdateCustomMetricResponse'
{
UpdateCustomMetricResponse -> Maybe CustomMetricType
metricType :: Prelude.Maybe CustomMetricType,
UpdateCustomMetricResponse -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
UpdateCustomMetricResponse -> Maybe Text
metricName :: Prelude.Maybe Prelude.Text,
UpdateCustomMetricResponse -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
UpdateCustomMetricResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
UpdateCustomMetricResponse -> Maybe Text
metricArn :: Prelude.Maybe Prelude.Text,
UpdateCustomMetricResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateCustomMetricResponse -> UpdateCustomMetricResponse -> Bool
(UpdateCustomMetricResponse -> UpdateCustomMetricResponse -> Bool)
-> (UpdateCustomMetricResponse
-> UpdateCustomMetricResponse -> Bool)
-> Eq UpdateCustomMetricResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateCustomMetricResponse -> UpdateCustomMetricResponse -> Bool
$c/= :: UpdateCustomMetricResponse -> UpdateCustomMetricResponse -> Bool
== :: UpdateCustomMetricResponse -> UpdateCustomMetricResponse -> Bool
$c== :: UpdateCustomMetricResponse -> UpdateCustomMetricResponse -> Bool
Prelude.Eq, ReadPrec [UpdateCustomMetricResponse]
ReadPrec UpdateCustomMetricResponse
Int -> ReadS UpdateCustomMetricResponse
ReadS [UpdateCustomMetricResponse]
(Int -> ReadS UpdateCustomMetricResponse)
-> ReadS [UpdateCustomMetricResponse]
-> ReadPrec UpdateCustomMetricResponse
-> ReadPrec [UpdateCustomMetricResponse]
-> Read UpdateCustomMetricResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateCustomMetricResponse]
$creadListPrec :: ReadPrec [UpdateCustomMetricResponse]
readPrec :: ReadPrec UpdateCustomMetricResponse
$creadPrec :: ReadPrec UpdateCustomMetricResponse
readList :: ReadS [UpdateCustomMetricResponse]
$creadList :: ReadS [UpdateCustomMetricResponse]
readsPrec :: Int -> ReadS UpdateCustomMetricResponse
$creadsPrec :: Int -> ReadS UpdateCustomMetricResponse
Prelude.Read, Int -> UpdateCustomMetricResponse -> ShowS
[UpdateCustomMetricResponse] -> ShowS
UpdateCustomMetricResponse -> String
(Int -> UpdateCustomMetricResponse -> ShowS)
-> (UpdateCustomMetricResponse -> String)
-> ([UpdateCustomMetricResponse] -> ShowS)
-> Show UpdateCustomMetricResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateCustomMetricResponse] -> ShowS
$cshowList :: [UpdateCustomMetricResponse] -> ShowS
show :: UpdateCustomMetricResponse -> String
$cshow :: UpdateCustomMetricResponse -> String
showsPrec :: Int -> UpdateCustomMetricResponse -> ShowS
$cshowsPrec :: Int -> UpdateCustomMetricResponse -> ShowS
Prelude.Show, (forall x.
UpdateCustomMetricResponse -> Rep UpdateCustomMetricResponse x)
-> (forall x.
Rep UpdateCustomMetricResponse x -> UpdateCustomMetricResponse)
-> Generic UpdateCustomMetricResponse
forall x.
Rep UpdateCustomMetricResponse x -> UpdateCustomMetricResponse
forall x.
UpdateCustomMetricResponse -> Rep UpdateCustomMetricResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateCustomMetricResponse x -> UpdateCustomMetricResponse
$cfrom :: forall x.
UpdateCustomMetricResponse -> Rep UpdateCustomMetricResponse x
Prelude.Generic)
newUpdateCustomMetricResponse ::
Prelude.Int ->
UpdateCustomMetricResponse
newUpdateCustomMetricResponse :: Int -> UpdateCustomMetricResponse
newUpdateCustomMetricResponse Int
pHttpStatus_ =
UpdateCustomMetricResponse' :: Maybe CustomMetricType
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> UpdateCustomMetricResponse
UpdateCustomMetricResponse'
{ $sel:metricType:UpdateCustomMetricResponse' :: Maybe CustomMetricType
metricType =
Maybe CustomMetricType
forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedDate:UpdateCustomMetricResponse' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:metricName:UpdateCustomMetricResponse' :: Maybe Text
metricName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:displayName:UpdateCustomMetricResponse' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:UpdateCustomMetricResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:metricArn:UpdateCustomMetricResponse' :: Maybe Text
metricArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateCustomMetricResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateCustomMetricResponse_metricType :: Lens.Lens' UpdateCustomMetricResponse (Prelude.Maybe CustomMetricType)
updateCustomMetricResponse_metricType :: (Maybe CustomMetricType -> f (Maybe CustomMetricType))
-> UpdateCustomMetricResponse -> f UpdateCustomMetricResponse
updateCustomMetricResponse_metricType = (UpdateCustomMetricResponse -> Maybe CustomMetricType)
-> (UpdateCustomMetricResponse
-> Maybe CustomMetricType -> UpdateCustomMetricResponse)
-> Lens
UpdateCustomMetricResponse
UpdateCustomMetricResponse
(Maybe CustomMetricType)
(Maybe CustomMetricType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCustomMetricResponse' {Maybe CustomMetricType
metricType :: Maybe CustomMetricType
$sel:metricType:UpdateCustomMetricResponse' :: UpdateCustomMetricResponse -> Maybe CustomMetricType
metricType} -> Maybe CustomMetricType
metricType) (\s :: UpdateCustomMetricResponse
s@UpdateCustomMetricResponse' {} Maybe CustomMetricType
a -> UpdateCustomMetricResponse
s {$sel:metricType:UpdateCustomMetricResponse' :: Maybe CustomMetricType
metricType = Maybe CustomMetricType
a} :: UpdateCustomMetricResponse)
updateCustomMetricResponse_lastModifiedDate :: Lens.Lens' UpdateCustomMetricResponse (Prelude.Maybe Prelude.UTCTime)
updateCustomMetricResponse_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateCustomMetricResponse -> f UpdateCustomMetricResponse
updateCustomMetricResponse_lastModifiedDate = (UpdateCustomMetricResponse -> Maybe POSIX)
-> (UpdateCustomMetricResponse
-> Maybe POSIX -> UpdateCustomMetricResponse)
-> Lens
UpdateCustomMetricResponse
UpdateCustomMetricResponse
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCustomMetricResponse' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:UpdateCustomMetricResponse' :: UpdateCustomMetricResponse -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: UpdateCustomMetricResponse
s@UpdateCustomMetricResponse' {} Maybe POSIX
a -> UpdateCustomMetricResponse
s {$sel:lastModifiedDate:UpdateCustomMetricResponse' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: UpdateCustomMetricResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> UpdateCustomMetricResponse -> f UpdateCustomMetricResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateCustomMetricResponse
-> f UpdateCustomMetricResponse
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
updateCustomMetricResponse_metricName :: Lens.Lens' UpdateCustomMetricResponse (Prelude.Maybe Prelude.Text)
updateCustomMetricResponse_metricName :: (Maybe Text -> f (Maybe Text))
-> UpdateCustomMetricResponse -> f UpdateCustomMetricResponse
updateCustomMetricResponse_metricName = (UpdateCustomMetricResponse -> Maybe Text)
-> (UpdateCustomMetricResponse
-> Maybe Text -> UpdateCustomMetricResponse)
-> Lens
UpdateCustomMetricResponse
UpdateCustomMetricResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCustomMetricResponse' {Maybe Text
metricName :: Maybe Text
$sel:metricName:UpdateCustomMetricResponse' :: UpdateCustomMetricResponse -> Maybe Text
metricName} -> Maybe Text
metricName) (\s :: UpdateCustomMetricResponse
s@UpdateCustomMetricResponse' {} Maybe Text
a -> UpdateCustomMetricResponse
s {$sel:metricName:UpdateCustomMetricResponse' :: Maybe Text
metricName = Maybe Text
a} :: UpdateCustomMetricResponse)
updateCustomMetricResponse_displayName :: Lens.Lens' UpdateCustomMetricResponse (Prelude.Maybe Prelude.Text)
updateCustomMetricResponse_displayName :: (Maybe Text -> f (Maybe Text))
-> UpdateCustomMetricResponse -> f UpdateCustomMetricResponse
updateCustomMetricResponse_displayName = (UpdateCustomMetricResponse -> Maybe Text)
-> (UpdateCustomMetricResponse
-> Maybe Text -> UpdateCustomMetricResponse)
-> Lens
UpdateCustomMetricResponse
UpdateCustomMetricResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCustomMetricResponse' {Maybe Text
displayName :: Maybe Text
$sel:displayName:UpdateCustomMetricResponse' :: UpdateCustomMetricResponse -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: UpdateCustomMetricResponse
s@UpdateCustomMetricResponse' {} Maybe Text
a -> UpdateCustomMetricResponse
s {$sel:displayName:UpdateCustomMetricResponse' :: Maybe Text
displayName = Maybe Text
a} :: UpdateCustomMetricResponse)
updateCustomMetricResponse_creationDate :: Lens.Lens' UpdateCustomMetricResponse (Prelude.Maybe Prelude.UTCTime)
updateCustomMetricResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateCustomMetricResponse -> f UpdateCustomMetricResponse
updateCustomMetricResponse_creationDate = (UpdateCustomMetricResponse -> Maybe POSIX)
-> (UpdateCustomMetricResponse
-> Maybe POSIX -> UpdateCustomMetricResponse)
-> Lens
UpdateCustomMetricResponse
UpdateCustomMetricResponse
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCustomMetricResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:UpdateCustomMetricResponse' :: UpdateCustomMetricResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: UpdateCustomMetricResponse
s@UpdateCustomMetricResponse' {} Maybe POSIX
a -> UpdateCustomMetricResponse
s {$sel:creationDate:UpdateCustomMetricResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: UpdateCustomMetricResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> UpdateCustomMetricResponse -> f UpdateCustomMetricResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateCustomMetricResponse
-> f UpdateCustomMetricResponse
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
updateCustomMetricResponse_metricArn :: Lens.Lens' UpdateCustomMetricResponse (Prelude.Maybe Prelude.Text)
updateCustomMetricResponse_metricArn :: (Maybe Text -> f (Maybe Text))
-> UpdateCustomMetricResponse -> f UpdateCustomMetricResponse
updateCustomMetricResponse_metricArn = (UpdateCustomMetricResponse -> Maybe Text)
-> (UpdateCustomMetricResponse
-> Maybe Text -> UpdateCustomMetricResponse)
-> Lens
UpdateCustomMetricResponse
UpdateCustomMetricResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCustomMetricResponse' {Maybe Text
metricArn :: Maybe Text
$sel:metricArn:UpdateCustomMetricResponse' :: UpdateCustomMetricResponse -> Maybe Text
metricArn} -> Maybe Text
metricArn) (\s :: UpdateCustomMetricResponse
s@UpdateCustomMetricResponse' {} Maybe Text
a -> UpdateCustomMetricResponse
s {$sel:metricArn:UpdateCustomMetricResponse' :: Maybe Text
metricArn = Maybe Text
a} :: UpdateCustomMetricResponse)
updateCustomMetricResponse_httpStatus :: Lens.Lens' UpdateCustomMetricResponse Prelude.Int
updateCustomMetricResponse_httpStatus :: (Int -> f Int)
-> UpdateCustomMetricResponse -> f UpdateCustomMetricResponse
updateCustomMetricResponse_httpStatus = (UpdateCustomMetricResponse -> Int)
-> (UpdateCustomMetricResponse
-> Int -> UpdateCustomMetricResponse)
-> Lens
UpdateCustomMetricResponse UpdateCustomMetricResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCustomMetricResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateCustomMetricResponse' :: UpdateCustomMetricResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateCustomMetricResponse
s@UpdateCustomMetricResponse' {} Int
a -> UpdateCustomMetricResponse
s {$sel:httpStatus:UpdateCustomMetricResponse' :: Int
httpStatus = Int
a} :: UpdateCustomMetricResponse)
instance Prelude.NFData UpdateCustomMetricResponse