{-# 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.UpdateFleetMetric
(
UpdateFleetMetric (..),
newUpdateFleetMetric,
updateFleetMetric_aggregationType,
updateFleetMetric_period,
updateFleetMetric_queryVersion,
updateFleetMetric_aggregationField,
updateFleetMetric_expectedVersion,
updateFleetMetric_queryString,
updateFleetMetric_description,
updateFleetMetric_unit,
updateFleetMetric_metricName,
updateFleetMetric_indexName,
UpdateFleetMetricResponse (..),
newUpdateFleetMetricResponse,
)
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 UpdateFleetMetric = UpdateFleetMetric'
{
UpdateFleetMetric -> Maybe AggregationType
aggregationType :: Prelude.Maybe AggregationType,
UpdateFleetMetric -> Maybe Natural
period :: Prelude.Maybe Prelude.Natural,
UpdateFleetMetric -> Maybe Text
queryVersion :: Prelude.Maybe Prelude.Text,
UpdateFleetMetric -> Maybe Text
aggregationField :: Prelude.Maybe Prelude.Text,
UpdateFleetMetric -> Maybe Integer
expectedVersion :: Prelude.Maybe Prelude.Integer,
UpdateFleetMetric -> Maybe Text
queryString :: Prelude.Maybe Prelude.Text,
UpdateFleetMetric -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
UpdateFleetMetric -> Maybe FleetMetricUnit
unit :: Prelude.Maybe FleetMetricUnit,
UpdateFleetMetric -> Text
metricName :: Prelude.Text,
UpdateFleetMetric -> Text
indexName :: Prelude.Text
}
deriving (UpdateFleetMetric -> UpdateFleetMetric -> Bool
(UpdateFleetMetric -> UpdateFleetMetric -> Bool)
-> (UpdateFleetMetric -> UpdateFleetMetric -> Bool)
-> Eq UpdateFleetMetric
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFleetMetric -> UpdateFleetMetric -> Bool
$c/= :: UpdateFleetMetric -> UpdateFleetMetric -> Bool
== :: UpdateFleetMetric -> UpdateFleetMetric -> Bool
$c== :: UpdateFleetMetric -> UpdateFleetMetric -> Bool
Prelude.Eq, ReadPrec [UpdateFleetMetric]
ReadPrec UpdateFleetMetric
Int -> ReadS UpdateFleetMetric
ReadS [UpdateFleetMetric]
(Int -> ReadS UpdateFleetMetric)
-> ReadS [UpdateFleetMetric]
-> ReadPrec UpdateFleetMetric
-> ReadPrec [UpdateFleetMetric]
-> Read UpdateFleetMetric
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFleetMetric]
$creadListPrec :: ReadPrec [UpdateFleetMetric]
readPrec :: ReadPrec UpdateFleetMetric
$creadPrec :: ReadPrec UpdateFleetMetric
readList :: ReadS [UpdateFleetMetric]
$creadList :: ReadS [UpdateFleetMetric]
readsPrec :: Int -> ReadS UpdateFleetMetric
$creadsPrec :: Int -> ReadS UpdateFleetMetric
Prelude.Read, Int -> UpdateFleetMetric -> ShowS
[UpdateFleetMetric] -> ShowS
UpdateFleetMetric -> String
(Int -> UpdateFleetMetric -> ShowS)
-> (UpdateFleetMetric -> String)
-> ([UpdateFleetMetric] -> ShowS)
-> Show UpdateFleetMetric
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFleetMetric] -> ShowS
$cshowList :: [UpdateFleetMetric] -> ShowS
show :: UpdateFleetMetric -> String
$cshow :: UpdateFleetMetric -> String
showsPrec :: Int -> UpdateFleetMetric -> ShowS
$cshowsPrec :: Int -> UpdateFleetMetric -> ShowS
Prelude.Show, (forall x. UpdateFleetMetric -> Rep UpdateFleetMetric x)
-> (forall x. Rep UpdateFleetMetric x -> UpdateFleetMetric)
-> Generic UpdateFleetMetric
forall x. Rep UpdateFleetMetric x -> UpdateFleetMetric
forall x. UpdateFleetMetric -> Rep UpdateFleetMetric x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateFleetMetric x -> UpdateFleetMetric
$cfrom :: forall x. UpdateFleetMetric -> Rep UpdateFleetMetric x
Prelude.Generic)
newUpdateFleetMetric ::
Prelude.Text ->
Prelude.Text ->
UpdateFleetMetric
newUpdateFleetMetric :: Text -> Text -> UpdateFleetMetric
newUpdateFleetMetric Text
pMetricName_ Text
pIndexName_ =
UpdateFleetMetric' :: Maybe AggregationType
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe FleetMetricUnit
-> Text
-> Text
-> UpdateFleetMetric
UpdateFleetMetric'
{ $sel:aggregationType:UpdateFleetMetric' :: Maybe AggregationType
aggregationType =
Maybe AggregationType
forall a. Maybe a
Prelude.Nothing,
$sel:period:UpdateFleetMetric' :: Maybe Natural
period = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:queryVersion:UpdateFleetMetric' :: Maybe Text
queryVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:aggregationField:UpdateFleetMetric' :: Maybe Text
aggregationField = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:expectedVersion:UpdateFleetMetric' :: Maybe Integer
expectedVersion = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:queryString:UpdateFleetMetric' :: Maybe Text
queryString = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:UpdateFleetMetric' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:unit:UpdateFleetMetric' :: Maybe FleetMetricUnit
unit = Maybe FleetMetricUnit
forall a. Maybe a
Prelude.Nothing,
$sel:metricName:UpdateFleetMetric' :: Text
metricName = Text
pMetricName_,
$sel:indexName:UpdateFleetMetric' :: Text
indexName = Text
pIndexName_
}
updateFleetMetric_aggregationType :: Lens.Lens' UpdateFleetMetric (Prelude.Maybe AggregationType)
updateFleetMetric_aggregationType :: (Maybe AggregationType -> f (Maybe AggregationType))
-> UpdateFleetMetric -> f UpdateFleetMetric
updateFleetMetric_aggregationType = (UpdateFleetMetric -> Maybe AggregationType)
-> (UpdateFleetMetric
-> Maybe AggregationType -> UpdateFleetMetric)
-> Lens
UpdateFleetMetric
UpdateFleetMetric
(Maybe AggregationType)
(Maybe AggregationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFleetMetric' {Maybe AggregationType
aggregationType :: Maybe AggregationType
$sel:aggregationType:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe AggregationType
aggregationType} -> Maybe AggregationType
aggregationType) (\s :: UpdateFleetMetric
s@UpdateFleetMetric' {} Maybe AggregationType
a -> UpdateFleetMetric
s {$sel:aggregationType:UpdateFleetMetric' :: Maybe AggregationType
aggregationType = Maybe AggregationType
a} :: UpdateFleetMetric)
updateFleetMetric_period :: Lens.Lens' UpdateFleetMetric (Prelude.Maybe Prelude.Natural)
updateFleetMetric_period :: (Maybe Natural -> f (Maybe Natural))
-> UpdateFleetMetric -> f UpdateFleetMetric
updateFleetMetric_period = (UpdateFleetMetric -> Maybe Natural)
-> (UpdateFleetMetric -> Maybe Natural -> UpdateFleetMetric)
-> Lens
UpdateFleetMetric UpdateFleetMetric (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFleetMetric' {Maybe Natural
period :: Maybe Natural
$sel:period:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Natural
period} -> Maybe Natural
period) (\s :: UpdateFleetMetric
s@UpdateFleetMetric' {} Maybe Natural
a -> UpdateFleetMetric
s {$sel:period:UpdateFleetMetric' :: Maybe Natural
period = Maybe Natural
a} :: UpdateFleetMetric)
updateFleetMetric_queryVersion :: Lens.Lens' UpdateFleetMetric (Prelude.Maybe Prelude.Text)
updateFleetMetric_queryVersion :: (Maybe Text -> f (Maybe Text))
-> UpdateFleetMetric -> f UpdateFleetMetric
updateFleetMetric_queryVersion = (UpdateFleetMetric -> Maybe Text)
-> (UpdateFleetMetric -> Maybe Text -> UpdateFleetMetric)
-> Lens
UpdateFleetMetric UpdateFleetMetric (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFleetMetric' {Maybe Text
queryVersion :: Maybe Text
$sel:queryVersion:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Text
queryVersion} -> Maybe Text
queryVersion) (\s :: UpdateFleetMetric
s@UpdateFleetMetric' {} Maybe Text
a -> UpdateFleetMetric
s {$sel:queryVersion:UpdateFleetMetric' :: Maybe Text
queryVersion = Maybe Text
a} :: UpdateFleetMetric)
updateFleetMetric_aggregationField :: Lens.Lens' UpdateFleetMetric (Prelude.Maybe Prelude.Text)
updateFleetMetric_aggregationField :: (Maybe Text -> f (Maybe Text))
-> UpdateFleetMetric -> f UpdateFleetMetric
updateFleetMetric_aggregationField = (UpdateFleetMetric -> Maybe Text)
-> (UpdateFleetMetric -> Maybe Text -> UpdateFleetMetric)
-> Lens
UpdateFleetMetric UpdateFleetMetric (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFleetMetric' {Maybe Text
aggregationField :: Maybe Text
$sel:aggregationField:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Text
aggregationField} -> Maybe Text
aggregationField) (\s :: UpdateFleetMetric
s@UpdateFleetMetric' {} Maybe Text
a -> UpdateFleetMetric
s {$sel:aggregationField:UpdateFleetMetric' :: Maybe Text
aggregationField = Maybe Text
a} :: UpdateFleetMetric)
updateFleetMetric_expectedVersion :: Lens.Lens' UpdateFleetMetric (Prelude.Maybe Prelude.Integer)
updateFleetMetric_expectedVersion :: (Maybe Integer -> f (Maybe Integer))
-> UpdateFleetMetric -> f UpdateFleetMetric
updateFleetMetric_expectedVersion = (UpdateFleetMetric -> Maybe Integer)
-> (UpdateFleetMetric -> Maybe Integer -> UpdateFleetMetric)
-> Lens
UpdateFleetMetric UpdateFleetMetric (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFleetMetric' {Maybe Integer
expectedVersion :: Maybe Integer
$sel:expectedVersion:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Integer
expectedVersion} -> Maybe Integer
expectedVersion) (\s :: UpdateFleetMetric
s@UpdateFleetMetric' {} Maybe Integer
a -> UpdateFleetMetric
s {$sel:expectedVersion:UpdateFleetMetric' :: Maybe Integer
expectedVersion = Maybe Integer
a} :: UpdateFleetMetric)
updateFleetMetric_queryString :: Lens.Lens' UpdateFleetMetric (Prelude.Maybe Prelude.Text)
updateFleetMetric_queryString :: (Maybe Text -> f (Maybe Text))
-> UpdateFleetMetric -> f UpdateFleetMetric
updateFleetMetric_queryString = (UpdateFleetMetric -> Maybe Text)
-> (UpdateFleetMetric -> Maybe Text -> UpdateFleetMetric)
-> Lens
UpdateFleetMetric UpdateFleetMetric (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFleetMetric' {Maybe Text
queryString :: Maybe Text
$sel:queryString:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Text
queryString} -> Maybe Text
queryString) (\s :: UpdateFleetMetric
s@UpdateFleetMetric' {} Maybe Text
a -> UpdateFleetMetric
s {$sel:queryString:UpdateFleetMetric' :: Maybe Text
queryString = Maybe Text
a} :: UpdateFleetMetric)
updateFleetMetric_description :: Lens.Lens' UpdateFleetMetric (Prelude.Maybe Prelude.Text)
updateFleetMetric_description :: (Maybe Text -> f (Maybe Text))
-> UpdateFleetMetric -> f UpdateFleetMetric
updateFleetMetric_description = (UpdateFleetMetric -> Maybe Text)
-> (UpdateFleetMetric -> Maybe Text -> UpdateFleetMetric)
-> Lens
UpdateFleetMetric UpdateFleetMetric (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFleetMetric' {Maybe Text
description :: Maybe Text
$sel:description:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateFleetMetric
s@UpdateFleetMetric' {} Maybe Text
a -> UpdateFleetMetric
s {$sel:description:UpdateFleetMetric' :: Maybe Text
description = Maybe Text
a} :: UpdateFleetMetric)
updateFleetMetric_unit :: Lens.Lens' UpdateFleetMetric (Prelude.Maybe FleetMetricUnit)
updateFleetMetric_unit :: (Maybe FleetMetricUnit -> f (Maybe FleetMetricUnit))
-> UpdateFleetMetric -> f UpdateFleetMetric
updateFleetMetric_unit = (UpdateFleetMetric -> Maybe FleetMetricUnit)
-> (UpdateFleetMetric
-> Maybe FleetMetricUnit -> UpdateFleetMetric)
-> Lens
UpdateFleetMetric
UpdateFleetMetric
(Maybe FleetMetricUnit)
(Maybe FleetMetricUnit)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFleetMetric' {Maybe FleetMetricUnit
unit :: Maybe FleetMetricUnit
$sel:unit:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe FleetMetricUnit
unit} -> Maybe FleetMetricUnit
unit) (\s :: UpdateFleetMetric
s@UpdateFleetMetric' {} Maybe FleetMetricUnit
a -> UpdateFleetMetric
s {$sel:unit:UpdateFleetMetric' :: Maybe FleetMetricUnit
unit = Maybe FleetMetricUnit
a} :: UpdateFleetMetric)
updateFleetMetric_metricName :: Lens.Lens' UpdateFleetMetric Prelude.Text
updateFleetMetric_metricName :: (Text -> f Text) -> UpdateFleetMetric -> f UpdateFleetMetric
updateFleetMetric_metricName = (UpdateFleetMetric -> Text)
-> (UpdateFleetMetric -> Text -> UpdateFleetMetric)
-> Lens UpdateFleetMetric UpdateFleetMetric Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFleetMetric' {Text
metricName :: Text
$sel:metricName:UpdateFleetMetric' :: UpdateFleetMetric -> Text
metricName} -> Text
metricName) (\s :: UpdateFleetMetric
s@UpdateFleetMetric' {} Text
a -> UpdateFleetMetric
s {$sel:metricName:UpdateFleetMetric' :: Text
metricName = Text
a} :: UpdateFleetMetric)
updateFleetMetric_indexName :: Lens.Lens' UpdateFleetMetric Prelude.Text
updateFleetMetric_indexName :: (Text -> f Text) -> UpdateFleetMetric -> f UpdateFleetMetric
updateFleetMetric_indexName = (UpdateFleetMetric -> Text)
-> (UpdateFleetMetric -> Text -> UpdateFleetMetric)
-> Lens UpdateFleetMetric UpdateFleetMetric Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateFleetMetric' {Text
indexName :: Text
$sel:indexName:UpdateFleetMetric' :: UpdateFleetMetric -> Text
indexName} -> Text
indexName) (\s :: UpdateFleetMetric
s@UpdateFleetMetric' {} Text
a -> UpdateFleetMetric
s {$sel:indexName:UpdateFleetMetric' :: Text
indexName = Text
a} :: UpdateFleetMetric)
instance Core.AWSRequest UpdateFleetMetric where
type
AWSResponse UpdateFleetMetric =
UpdateFleetMetricResponse
request :: UpdateFleetMetric -> Request UpdateFleetMetric
request = Service -> UpdateFleetMetric -> Request UpdateFleetMetric
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateFleetMetric
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateFleetMetric)))
response =
AWSResponse UpdateFleetMetric
-> Logger
-> Service
-> Proxy UpdateFleetMetric
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateFleetMetric)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse UpdateFleetMetric
UpdateFleetMetricResponse
UpdateFleetMetricResponse'
instance Prelude.Hashable UpdateFleetMetric
instance Prelude.NFData UpdateFleetMetric
instance Core.ToHeaders UpdateFleetMetric where
toHeaders :: UpdateFleetMetric -> [Header]
toHeaders = [Header] -> UpdateFleetMetric -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON UpdateFleetMetric where
toJSON :: UpdateFleetMetric -> Value
toJSON UpdateFleetMetric' {Maybe Integer
Maybe Natural
Maybe Text
Maybe AggregationType
Maybe FleetMetricUnit
Text
indexName :: Text
metricName :: Text
unit :: Maybe FleetMetricUnit
description :: Maybe Text
queryString :: Maybe Text
expectedVersion :: Maybe Integer
aggregationField :: Maybe Text
queryVersion :: Maybe Text
period :: Maybe Natural
aggregationType :: Maybe AggregationType
$sel:indexName:UpdateFleetMetric' :: UpdateFleetMetric -> Text
$sel:metricName:UpdateFleetMetric' :: UpdateFleetMetric -> Text
$sel:unit:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe FleetMetricUnit
$sel:description:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Text
$sel:queryString:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Text
$sel:expectedVersion:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Integer
$sel:aggregationField:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Text
$sel:queryVersion:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Text
$sel:period:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Natural
$sel:aggregationType:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe AggregationType
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"aggregationType" Text -> AggregationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AggregationType -> Pair) -> Maybe AggregationType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AggregationType
aggregationType,
(Text
"period" 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
period,
(Text
"queryVersion" 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
queryVersion,
(Text
"aggregationField" 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
aggregationField,
(Text
"expectedVersion" Text -> Integer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Integer -> Pair) -> Maybe Integer -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Integer
expectedVersion,
(Text
"queryString" 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
queryString,
(Text
"description" 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
description,
(Text
"unit" Text -> FleetMetricUnit -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (FleetMetricUnit -> Pair) -> Maybe FleetMetricUnit -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FleetMetricUnit
unit,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"indexName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
indexName)
]
)
instance Core.ToPath UpdateFleetMetric where
toPath :: UpdateFleetMetric -> ByteString
toPath UpdateFleetMetric' {Maybe Integer
Maybe Natural
Maybe Text
Maybe AggregationType
Maybe FleetMetricUnit
Text
indexName :: Text
metricName :: Text
unit :: Maybe FleetMetricUnit
description :: Maybe Text
queryString :: Maybe Text
expectedVersion :: Maybe Integer
aggregationField :: Maybe Text
queryVersion :: Maybe Text
period :: Maybe Natural
aggregationType :: Maybe AggregationType
$sel:indexName:UpdateFleetMetric' :: UpdateFleetMetric -> Text
$sel:metricName:UpdateFleetMetric' :: UpdateFleetMetric -> Text
$sel:unit:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe FleetMetricUnit
$sel:description:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Text
$sel:queryString:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Text
$sel:expectedVersion:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Integer
$sel:aggregationField:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Text
$sel:queryVersion:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Text
$sel:period:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe Natural
$sel:aggregationType:UpdateFleetMetric' :: UpdateFleetMetric -> Maybe AggregationType
..} =
[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 UpdateFleetMetric where
toQuery :: UpdateFleetMetric -> QueryString
toQuery = QueryString -> UpdateFleetMetric -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateFleetMetricResponse = UpdateFleetMetricResponse'
{
}
deriving (UpdateFleetMetricResponse -> UpdateFleetMetricResponse -> Bool
(UpdateFleetMetricResponse -> UpdateFleetMetricResponse -> Bool)
-> (UpdateFleetMetricResponse -> UpdateFleetMetricResponse -> Bool)
-> Eq UpdateFleetMetricResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateFleetMetricResponse -> UpdateFleetMetricResponse -> Bool
$c/= :: UpdateFleetMetricResponse -> UpdateFleetMetricResponse -> Bool
== :: UpdateFleetMetricResponse -> UpdateFleetMetricResponse -> Bool
$c== :: UpdateFleetMetricResponse -> UpdateFleetMetricResponse -> Bool
Prelude.Eq, ReadPrec [UpdateFleetMetricResponse]
ReadPrec UpdateFleetMetricResponse
Int -> ReadS UpdateFleetMetricResponse
ReadS [UpdateFleetMetricResponse]
(Int -> ReadS UpdateFleetMetricResponse)
-> ReadS [UpdateFleetMetricResponse]
-> ReadPrec UpdateFleetMetricResponse
-> ReadPrec [UpdateFleetMetricResponse]
-> Read UpdateFleetMetricResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateFleetMetricResponse]
$creadListPrec :: ReadPrec [UpdateFleetMetricResponse]
readPrec :: ReadPrec UpdateFleetMetricResponse
$creadPrec :: ReadPrec UpdateFleetMetricResponse
readList :: ReadS [UpdateFleetMetricResponse]
$creadList :: ReadS [UpdateFleetMetricResponse]
readsPrec :: Int -> ReadS UpdateFleetMetricResponse
$creadsPrec :: Int -> ReadS UpdateFleetMetricResponse
Prelude.Read, Int -> UpdateFleetMetricResponse -> ShowS
[UpdateFleetMetricResponse] -> ShowS
UpdateFleetMetricResponse -> String
(Int -> UpdateFleetMetricResponse -> ShowS)
-> (UpdateFleetMetricResponse -> String)
-> ([UpdateFleetMetricResponse] -> ShowS)
-> Show UpdateFleetMetricResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateFleetMetricResponse] -> ShowS
$cshowList :: [UpdateFleetMetricResponse] -> ShowS
show :: UpdateFleetMetricResponse -> String
$cshow :: UpdateFleetMetricResponse -> String
showsPrec :: Int -> UpdateFleetMetricResponse -> ShowS
$cshowsPrec :: Int -> UpdateFleetMetricResponse -> ShowS
Prelude.Show, (forall x.
UpdateFleetMetricResponse -> Rep UpdateFleetMetricResponse x)
-> (forall x.
Rep UpdateFleetMetricResponse x -> UpdateFleetMetricResponse)
-> Generic UpdateFleetMetricResponse
forall x.
Rep UpdateFleetMetricResponse x -> UpdateFleetMetricResponse
forall x.
UpdateFleetMetricResponse -> Rep UpdateFleetMetricResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateFleetMetricResponse x -> UpdateFleetMetricResponse
$cfrom :: forall x.
UpdateFleetMetricResponse -> Rep UpdateFleetMetricResponse x
Prelude.Generic)
newUpdateFleetMetricResponse ::
UpdateFleetMetricResponse
newUpdateFleetMetricResponse :: UpdateFleetMetricResponse
newUpdateFleetMetricResponse =
UpdateFleetMetricResponse
UpdateFleetMetricResponse'
instance Prelude.NFData UpdateFleetMetricResponse