{-# 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.LookoutMetrics.UpdateMetricSet
(
UpdateMetricSet (..),
newUpdateMetricSet,
updateMetricSet_dimensionList,
updateMetricSet_offset,
updateMetricSet_timestampColumn,
updateMetricSet_metricList,
updateMetricSet_metricSource,
updateMetricSet_metricSetFrequency,
updateMetricSet_metricSetDescription,
updateMetricSet_metricSetArn,
UpdateMetricSetResponse (..),
newUpdateMetricSetResponse,
updateMetricSetResponse_metricSetArn,
updateMetricSetResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LookoutMetrics.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateMetricSet = UpdateMetricSet'
{
UpdateMetricSet -> Maybe (NonEmpty Text)
dimensionList :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
UpdateMetricSet -> Maybe Natural
offset :: Prelude.Maybe Prelude.Natural,
UpdateMetricSet -> Maybe TimestampColumn
timestampColumn :: Prelude.Maybe TimestampColumn,
UpdateMetricSet -> Maybe (NonEmpty Metric)
metricList :: Prelude.Maybe (Prelude.NonEmpty Metric),
UpdateMetricSet -> Maybe MetricSource
metricSource :: Prelude.Maybe MetricSource,
UpdateMetricSet -> Maybe Frequency
metricSetFrequency :: Prelude.Maybe Frequency,
UpdateMetricSet -> Maybe Text
metricSetDescription :: Prelude.Maybe Prelude.Text,
UpdateMetricSet -> Text
metricSetArn :: Prelude.Text
}
deriving (UpdateMetricSet -> UpdateMetricSet -> Bool
(UpdateMetricSet -> UpdateMetricSet -> Bool)
-> (UpdateMetricSet -> UpdateMetricSet -> Bool)
-> Eq UpdateMetricSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateMetricSet -> UpdateMetricSet -> Bool
$c/= :: UpdateMetricSet -> UpdateMetricSet -> Bool
== :: UpdateMetricSet -> UpdateMetricSet -> Bool
$c== :: UpdateMetricSet -> UpdateMetricSet -> Bool
Prelude.Eq, ReadPrec [UpdateMetricSet]
ReadPrec UpdateMetricSet
Int -> ReadS UpdateMetricSet
ReadS [UpdateMetricSet]
(Int -> ReadS UpdateMetricSet)
-> ReadS [UpdateMetricSet]
-> ReadPrec UpdateMetricSet
-> ReadPrec [UpdateMetricSet]
-> Read UpdateMetricSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateMetricSet]
$creadListPrec :: ReadPrec [UpdateMetricSet]
readPrec :: ReadPrec UpdateMetricSet
$creadPrec :: ReadPrec UpdateMetricSet
readList :: ReadS [UpdateMetricSet]
$creadList :: ReadS [UpdateMetricSet]
readsPrec :: Int -> ReadS UpdateMetricSet
$creadsPrec :: Int -> ReadS UpdateMetricSet
Prelude.Read, Int -> UpdateMetricSet -> ShowS
[UpdateMetricSet] -> ShowS
UpdateMetricSet -> String
(Int -> UpdateMetricSet -> ShowS)
-> (UpdateMetricSet -> String)
-> ([UpdateMetricSet] -> ShowS)
-> Show UpdateMetricSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateMetricSet] -> ShowS
$cshowList :: [UpdateMetricSet] -> ShowS
show :: UpdateMetricSet -> String
$cshow :: UpdateMetricSet -> String
showsPrec :: Int -> UpdateMetricSet -> ShowS
$cshowsPrec :: Int -> UpdateMetricSet -> ShowS
Prelude.Show, (forall x. UpdateMetricSet -> Rep UpdateMetricSet x)
-> (forall x. Rep UpdateMetricSet x -> UpdateMetricSet)
-> Generic UpdateMetricSet
forall x. Rep UpdateMetricSet x -> UpdateMetricSet
forall x. UpdateMetricSet -> Rep UpdateMetricSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateMetricSet x -> UpdateMetricSet
$cfrom :: forall x. UpdateMetricSet -> Rep UpdateMetricSet x
Prelude.Generic)
newUpdateMetricSet ::
Prelude.Text ->
UpdateMetricSet
newUpdateMetricSet :: Text -> UpdateMetricSet
newUpdateMetricSet Text
pMetricSetArn_ =
UpdateMetricSet' :: Maybe (NonEmpty Text)
-> Maybe Natural
-> Maybe TimestampColumn
-> Maybe (NonEmpty Metric)
-> Maybe MetricSource
-> Maybe Frequency
-> Maybe Text
-> Text
-> UpdateMetricSet
UpdateMetricSet'
{ $sel:dimensionList:UpdateMetricSet' :: Maybe (NonEmpty Text)
dimensionList = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:offset:UpdateMetricSet' :: Maybe Natural
offset = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:timestampColumn:UpdateMetricSet' :: Maybe TimestampColumn
timestampColumn = Maybe TimestampColumn
forall a. Maybe a
Prelude.Nothing,
$sel:metricList:UpdateMetricSet' :: Maybe (NonEmpty Metric)
metricList = Maybe (NonEmpty Metric)
forall a. Maybe a
Prelude.Nothing,
$sel:metricSource:UpdateMetricSet' :: Maybe MetricSource
metricSource = Maybe MetricSource
forall a. Maybe a
Prelude.Nothing,
$sel:metricSetFrequency:UpdateMetricSet' :: Maybe Frequency
metricSetFrequency = Maybe Frequency
forall a. Maybe a
Prelude.Nothing,
$sel:metricSetDescription:UpdateMetricSet' :: Maybe Text
metricSetDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:metricSetArn:UpdateMetricSet' :: Text
metricSetArn = Text
pMetricSetArn_
}
updateMetricSet_dimensionList :: Lens.Lens' UpdateMetricSet (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
updateMetricSet_dimensionList :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> UpdateMetricSet -> f UpdateMetricSet
updateMetricSet_dimensionList = (UpdateMetricSet -> Maybe (NonEmpty Text))
-> (UpdateMetricSet -> Maybe (NonEmpty Text) -> UpdateMetricSet)
-> Lens
UpdateMetricSet
UpdateMetricSet
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMetricSet' {Maybe (NonEmpty Text)
dimensionList :: Maybe (NonEmpty Text)
$sel:dimensionList:UpdateMetricSet' :: UpdateMetricSet -> Maybe (NonEmpty Text)
dimensionList} -> Maybe (NonEmpty Text)
dimensionList) (\s :: UpdateMetricSet
s@UpdateMetricSet' {} Maybe (NonEmpty Text)
a -> UpdateMetricSet
s {$sel:dimensionList:UpdateMetricSet' :: Maybe (NonEmpty Text)
dimensionList = Maybe (NonEmpty Text)
a} :: UpdateMetricSet) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> UpdateMetricSet -> f UpdateMetricSet)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> UpdateMetricSet
-> f UpdateMetricSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateMetricSet_offset :: Lens.Lens' UpdateMetricSet (Prelude.Maybe Prelude.Natural)
updateMetricSet_offset :: (Maybe Natural -> f (Maybe Natural))
-> UpdateMetricSet -> f UpdateMetricSet
updateMetricSet_offset = (UpdateMetricSet -> Maybe Natural)
-> (UpdateMetricSet -> Maybe Natural -> UpdateMetricSet)
-> Lens
UpdateMetricSet UpdateMetricSet (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMetricSet' {Maybe Natural
offset :: Maybe Natural
$sel:offset:UpdateMetricSet' :: UpdateMetricSet -> Maybe Natural
offset} -> Maybe Natural
offset) (\s :: UpdateMetricSet
s@UpdateMetricSet' {} Maybe Natural
a -> UpdateMetricSet
s {$sel:offset:UpdateMetricSet' :: Maybe Natural
offset = Maybe Natural
a} :: UpdateMetricSet)
updateMetricSet_timestampColumn :: Lens.Lens' UpdateMetricSet (Prelude.Maybe TimestampColumn)
updateMetricSet_timestampColumn :: (Maybe TimestampColumn -> f (Maybe TimestampColumn))
-> UpdateMetricSet -> f UpdateMetricSet
updateMetricSet_timestampColumn = (UpdateMetricSet -> Maybe TimestampColumn)
-> (UpdateMetricSet -> Maybe TimestampColumn -> UpdateMetricSet)
-> Lens
UpdateMetricSet
UpdateMetricSet
(Maybe TimestampColumn)
(Maybe TimestampColumn)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMetricSet' {Maybe TimestampColumn
timestampColumn :: Maybe TimestampColumn
$sel:timestampColumn:UpdateMetricSet' :: UpdateMetricSet -> Maybe TimestampColumn
timestampColumn} -> Maybe TimestampColumn
timestampColumn) (\s :: UpdateMetricSet
s@UpdateMetricSet' {} Maybe TimestampColumn
a -> UpdateMetricSet
s {$sel:timestampColumn:UpdateMetricSet' :: Maybe TimestampColumn
timestampColumn = Maybe TimestampColumn
a} :: UpdateMetricSet)
updateMetricSet_metricList :: Lens.Lens' UpdateMetricSet (Prelude.Maybe (Prelude.NonEmpty Metric))
updateMetricSet_metricList :: (Maybe (NonEmpty Metric) -> f (Maybe (NonEmpty Metric)))
-> UpdateMetricSet -> f UpdateMetricSet
updateMetricSet_metricList = (UpdateMetricSet -> Maybe (NonEmpty Metric))
-> (UpdateMetricSet -> Maybe (NonEmpty Metric) -> UpdateMetricSet)
-> Lens
UpdateMetricSet
UpdateMetricSet
(Maybe (NonEmpty Metric))
(Maybe (NonEmpty Metric))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMetricSet' {Maybe (NonEmpty Metric)
metricList :: Maybe (NonEmpty Metric)
$sel:metricList:UpdateMetricSet' :: UpdateMetricSet -> Maybe (NonEmpty Metric)
metricList} -> Maybe (NonEmpty Metric)
metricList) (\s :: UpdateMetricSet
s@UpdateMetricSet' {} Maybe (NonEmpty Metric)
a -> UpdateMetricSet
s {$sel:metricList:UpdateMetricSet' :: Maybe (NonEmpty Metric)
metricList = Maybe (NonEmpty Metric)
a} :: UpdateMetricSet) ((Maybe (NonEmpty Metric) -> f (Maybe (NonEmpty Metric)))
-> UpdateMetricSet -> f UpdateMetricSet)
-> ((Maybe (NonEmpty Metric) -> f (Maybe (NonEmpty Metric)))
-> Maybe (NonEmpty Metric) -> f (Maybe (NonEmpty Metric)))
-> (Maybe (NonEmpty Metric) -> f (Maybe (NonEmpty Metric)))
-> UpdateMetricSet
-> f UpdateMetricSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Metric)
(NonEmpty Metric)
(NonEmpty Metric)
(NonEmpty Metric)
-> Iso
(Maybe (NonEmpty Metric))
(Maybe (NonEmpty Metric))
(Maybe (NonEmpty Metric))
(Maybe (NonEmpty Metric))
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
(NonEmpty Metric)
(NonEmpty Metric)
(NonEmpty Metric)
(NonEmpty Metric)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateMetricSet_metricSource :: Lens.Lens' UpdateMetricSet (Prelude.Maybe MetricSource)
updateMetricSet_metricSource :: (Maybe MetricSource -> f (Maybe MetricSource))
-> UpdateMetricSet -> f UpdateMetricSet
updateMetricSet_metricSource = (UpdateMetricSet -> Maybe MetricSource)
-> (UpdateMetricSet -> Maybe MetricSource -> UpdateMetricSet)
-> Lens
UpdateMetricSet
UpdateMetricSet
(Maybe MetricSource)
(Maybe MetricSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMetricSet' {Maybe MetricSource
metricSource :: Maybe MetricSource
$sel:metricSource:UpdateMetricSet' :: UpdateMetricSet -> Maybe MetricSource
metricSource} -> Maybe MetricSource
metricSource) (\s :: UpdateMetricSet
s@UpdateMetricSet' {} Maybe MetricSource
a -> UpdateMetricSet
s {$sel:metricSource:UpdateMetricSet' :: Maybe MetricSource
metricSource = Maybe MetricSource
a} :: UpdateMetricSet)
updateMetricSet_metricSetFrequency :: Lens.Lens' UpdateMetricSet (Prelude.Maybe Frequency)
updateMetricSet_metricSetFrequency :: (Maybe Frequency -> f (Maybe Frequency))
-> UpdateMetricSet -> f UpdateMetricSet
updateMetricSet_metricSetFrequency = (UpdateMetricSet -> Maybe Frequency)
-> (UpdateMetricSet -> Maybe Frequency -> UpdateMetricSet)
-> Lens
UpdateMetricSet UpdateMetricSet (Maybe Frequency) (Maybe Frequency)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMetricSet' {Maybe Frequency
metricSetFrequency :: Maybe Frequency
$sel:metricSetFrequency:UpdateMetricSet' :: UpdateMetricSet -> Maybe Frequency
metricSetFrequency} -> Maybe Frequency
metricSetFrequency) (\s :: UpdateMetricSet
s@UpdateMetricSet' {} Maybe Frequency
a -> UpdateMetricSet
s {$sel:metricSetFrequency:UpdateMetricSet' :: Maybe Frequency
metricSetFrequency = Maybe Frequency
a} :: UpdateMetricSet)
updateMetricSet_metricSetDescription :: Lens.Lens' UpdateMetricSet (Prelude.Maybe Prelude.Text)
updateMetricSet_metricSetDescription :: (Maybe Text -> f (Maybe Text))
-> UpdateMetricSet -> f UpdateMetricSet
updateMetricSet_metricSetDescription = (UpdateMetricSet -> Maybe Text)
-> (UpdateMetricSet -> Maybe Text -> UpdateMetricSet)
-> Lens UpdateMetricSet UpdateMetricSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMetricSet' {Maybe Text
metricSetDescription :: Maybe Text
$sel:metricSetDescription:UpdateMetricSet' :: UpdateMetricSet -> Maybe Text
metricSetDescription} -> Maybe Text
metricSetDescription) (\s :: UpdateMetricSet
s@UpdateMetricSet' {} Maybe Text
a -> UpdateMetricSet
s {$sel:metricSetDescription:UpdateMetricSet' :: Maybe Text
metricSetDescription = Maybe Text
a} :: UpdateMetricSet)
updateMetricSet_metricSetArn :: Lens.Lens' UpdateMetricSet Prelude.Text
updateMetricSet_metricSetArn :: (Text -> f Text) -> UpdateMetricSet -> f UpdateMetricSet
updateMetricSet_metricSetArn = (UpdateMetricSet -> Text)
-> (UpdateMetricSet -> Text -> UpdateMetricSet)
-> Lens UpdateMetricSet UpdateMetricSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMetricSet' {Text
metricSetArn :: Text
$sel:metricSetArn:UpdateMetricSet' :: UpdateMetricSet -> Text
metricSetArn} -> Text
metricSetArn) (\s :: UpdateMetricSet
s@UpdateMetricSet' {} Text
a -> UpdateMetricSet
s {$sel:metricSetArn:UpdateMetricSet' :: Text
metricSetArn = Text
a} :: UpdateMetricSet)
instance Core.AWSRequest UpdateMetricSet where
type
AWSResponse UpdateMetricSet =
UpdateMetricSetResponse
request :: UpdateMetricSet -> Request UpdateMetricSet
request = Service -> UpdateMetricSet -> Request UpdateMetricSet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateMetricSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateMetricSet)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateMetricSet))
-> Logger
-> Service
-> Proxy UpdateMetricSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateMetricSet)))
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 Text -> Int -> UpdateMetricSetResponse
UpdateMetricSetResponse'
(Maybe Text -> Int -> UpdateMetricSetResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateMetricSetResponse)
forall (f :: * -> *) a b. Functor 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
"MetricSetArn")
Either String (Int -> UpdateMetricSetResponse)
-> Either String Int -> Either String UpdateMetricSetResponse
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 UpdateMetricSet
instance Prelude.NFData UpdateMetricSet
instance Core.ToHeaders UpdateMetricSet where
toHeaders :: UpdateMetricSet -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateMetricSet -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateMetricSet where
toJSON :: UpdateMetricSet -> Value
toJSON UpdateMetricSet' {Maybe Natural
Maybe (NonEmpty Text)
Maybe (NonEmpty Metric)
Maybe Text
Maybe Frequency
Maybe TimestampColumn
Maybe MetricSource
Text
metricSetArn :: Text
metricSetDescription :: Maybe Text
metricSetFrequency :: Maybe Frequency
metricSource :: Maybe MetricSource
metricList :: Maybe (NonEmpty Metric)
timestampColumn :: Maybe TimestampColumn
offset :: Maybe Natural
dimensionList :: Maybe (NonEmpty Text)
$sel:metricSetArn:UpdateMetricSet' :: UpdateMetricSet -> Text
$sel:metricSetDescription:UpdateMetricSet' :: UpdateMetricSet -> Maybe Text
$sel:metricSetFrequency:UpdateMetricSet' :: UpdateMetricSet -> Maybe Frequency
$sel:metricSource:UpdateMetricSet' :: UpdateMetricSet -> Maybe MetricSource
$sel:metricList:UpdateMetricSet' :: UpdateMetricSet -> Maybe (NonEmpty Metric)
$sel:timestampColumn:UpdateMetricSet' :: UpdateMetricSet -> Maybe TimestampColumn
$sel:offset:UpdateMetricSet' :: UpdateMetricSet -> Maybe Natural
$sel:dimensionList:UpdateMetricSet' :: UpdateMetricSet -> Maybe (NonEmpty Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DimensionList" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
dimensionList,
(Text
"Offset" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
offset,
(Text
"TimestampColumn" Text -> TimestampColumn -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(TimestampColumn -> Pair) -> Maybe TimestampColumn -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimestampColumn
timestampColumn,
(Text
"MetricList" Text -> NonEmpty Metric -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Metric -> Pair) -> Maybe (NonEmpty Metric) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Metric)
metricList,
(Text
"MetricSource" Text -> MetricSource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MetricSource -> Pair) -> Maybe MetricSource -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MetricSource
metricSource,
(Text
"MetricSetFrequency" Text -> Frequency -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Frequency -> Pair) -> Maybe Frequency -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Frequency
metricSetFrequency,
(Text
"MetricSetDescription" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
metricSetDescription,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"MetricSetArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
metricSetArn)
]
)
instance Core.ToPath UpdateMetricSet where
toPath :: UpdateMetricSet -> ByteString
toPath = ByteString -> UpdateMetricSet -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/UpdateMetricSet"
instance Core.ToQuery UpdateMetricSet where
toQuery :: UpdateMetricSet -> QueryString
toQuery = QueryString -> UpdateMetricSet -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateMetricSetResponse = UpdateMetricSetResponse'
{
UpdateMetricSetResponse -> Maybe Text
metricSetArn :: Prelude.Maybe Prelude.Text,
UpdateMetricSetResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateMetricSetResponse -> UpdateMetricSetResponse -> Bool
(UpdateMetricSetResponse -> UpdateMetricSetResponse -> Bool)
-> (UpdateMetricSetResponse -> UpdateMetricSetResponse -> Bool)
-> Eq UpdateMetricSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateMetricSetResponse -> UpdateMetricSetResponse -> Bool
$c/= :: UpdateMetricSetResponse -> UpdateMetricSetResponse -> Bool
== :: UpdateMetricSetResponse -> UpdateMetricSetResponse -> Bool
$c== :: UpdateMetricSetResponse -> UpdateMetricSetResponse -> Bool
Prelude.Eq, ReadPrec [UpdateMetricSetResponse]
ReadPrec UpdateMetricSetResponse
Int -> ReadS UpdateMetricSetResponse
ReadS [UpdateMetricSetResponse]
(Int -> ReadS UpdateMetricSetResponse)
-> ReadS [UpdateMetricSetResponse]
-> ReadPrec UpdateMetricSetResponse
-> ReadPrec [UpdateMetricSetResponse]
-> Read UpdateMetricSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateMetricSetResponse]
$creadListPrec :: ReadPrec [UpdateMetricSetResponse]
readPrec :: ReadPrec UpdateMetricSetResponse
$creadPrec :: ReadPrec UpdateMetricSetResponse
readList :: ReadS [UpdateMetricSetResponse]
$creadList :: ReadS [UpdateMetricSetResponse]
readsPrec :: Int -> ReadS UpdateMetricSetResponse
$creadsPrec :: Int -> ReadS UpdateMetricSetResponse
Prelude.Read, Int -> UpdateMetricSetResponse -> ShowS
[UpdateMetricSetResponse] -> ShowS
UpdateMetricSetResponse -> String
(Int -> UpdateMetricSetResponse -> ShowS)
-> (UpdateMetricSetResponse -> String)
-> ([UpdateMetricSetResponse] -> ShowS)
-> Show UpdateMetricSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateMetricSetResponse] -> ShowS
$cshowList :: [UpdateMetricSetResponse] -> ShowS
show :: UpdateMetricSetResponse -> String
$cshow :: UpdateMetricSetResponse -> String
showsPrec :: Int -> UpdateMetricSetResponse -> ShowS
$cshowsPrec :: Int -> UpdateMetricSetResponse -> ShowS
Prelude.Show, (forall x.
UpdateMetricSetResponse -> Rep UpdateMetricSetResponse x)
-> (forall x.
Rep UpdateMetricSetResponse x -> UpdateMetricSetResponse)
-> Generic UpdateMetricSetResponse
forall x. Rep UpdateMetricSetResponse x -> UpdateMetricSetResponse
forall x. UpdateMetricSetResponse -> Rep UpdateMetricSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateMetricSetResponse x -> UpdateMetricSetResponse
$cfrom :: forall x. UpdateMetricSetResponse -> Rep UpdateMetricSetResponse x
Prelude.Generic)
newUpdateMetricSetResponse ::
Prelude.Int ->
UpdateMetricSetResponse
newUpdateMetricSetResponse :: Int -> UpdateMetricSetResponse
newUpdateMetricSetResponse Int
pHttpStatus_ =
UpdateMetricSetResponse' :: Maybe Text -> Int -> UpdateMetricSetResponse
UpdateMetricSetResponse'
{ $sel:metricSetArn:UpdateMetricSetResponse' :: Maybe Text
metricSetArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateMetricSetResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateMetricSetResponse_metricSetArn :: Lens.Lens' UpdateMetricSetResponse (Prelude.Maybe Prelude.Text)
updateMetricSetResponse_metricSetArn :: (Maybe Text -> f (Maybe Text))
-> UpdateMetricSetResponse -> f UpdateMetricSetResponse
updateMetricSetResponse_metricSetArn = (UpdateMetricSetResponse -> Maybe Text)
-> (UpdateMetricSetResponse
-> Maybe Text -> UpdateMetricSetResponse)
-> Lens
UpdateMetricSetResponse
UpdateMetricSetResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMetricSetResponse' {Maybe Text
metricSetArn :: Maybe Text
$sel:metricSetArn:UpdateMetricSetResponse' :: UpdateMetricSetResponse -> Maybe Text
metricSetArn} -> Maybe Text
metricSetArn) (\s :: UpdateMetricSetResponse
s@UpdateMetricSetResponse' {} Maybe Text
a -> UpdateMetricSetResponse
s {$sel:metricSetArn:UpdateMetricSetResponse' :: Maybe Text
metricSetArn = Maybe Text
a} :: UpdateMetricSetResponse)
updateMetricSetResponse_httpStatus :: Lens.Lens' UpdateMetricSetResponse Prelude.Int
updateMetricSetResponse_httpStatus :: (Int -> f Int)
-> UpdateMetricSetResponse -> f UpdateMetricSetResponse
updateMetricSetResponse_httpStatus = (UpdateMetricSetResponse -> Int)
-> (UpdateMetricSetResponse -> Int -> UpdateMetricSetResponse)
-> Lens UpdateMetricSetResponse UpdateMetricSetResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMetricSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateMetricSetResponse' :: UpdateMetricSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateMetricSetResponse
s@UpdateMetricSetResponse' {} Int
a -> UpdateMetricSetResponse
s {$sel:httpStatus:UpdateMetricSetResponse' :: Int
httpStatus = Int
a} :: UpdateMetricSetResponse)
instance Prelude.NFData UpdateMetricSetResponse