{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.AutoScaling.Types.PredictiveScalingCustomizedScalingMetric where
import Amazonka.AutoScaling.Types.MetricDataQuery
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data PredictiveScalingCustomizedScalingMetric = PredictiveScalingCustomizedScalingMetric'
{
PredictiveScalingCustomizedScalingMetric -> [MetricDataQuery]
metricDataQueries :: [MetricDataQuery]
}
deriving (PredictiveScalingCustomizedScalingMetric
-> PredictiveScalingCustomizedScalingMetric -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PredictiveScalingCustomizedScalingMetric
-> PredictiveScalingCustomizedScalingMetric -> Bool
$c/= :: PredictiveScalingCustomizedScalingMetric
-> PredictiveScalingCustomizedScalingMetric -> Bool
== :: PredictiveScalingCustomizedScalingMetric
-> PredictiveScalingCustomizedScalingMetric -> Bool
$c== :: PredictiveScalingCustomizedScalingMetric
-> PredictiveScalingCustomizedScalingMetric -> Bool
Prelude.Eq, ReadPrec [PredictiveScalingCustomizedScalingMetric]
ReadPrec PredictiveScalingCustomizedScalingMetric
Int -> ReadS PredictiveScalingCustomizedScalingMetric
ReadS [PredictiveScalingCustomizedScalingMetric]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PredictiveScalingCustomizedScalingMetric]
$creadListPrec :: ReadPrec [PredictiveScalingCustomizedScalingMetric]
readPrec :: ReadPrec PredictiveScalingCustomizedScalingMetric
$creadPrec :: ReadPrec PredictiveScalingCustomizedScalingMetric
readList :: ReadS [PredictiveScalingCustomizedScalingMetric]
$creadList :: ReadS [PredictiveScalingCustomizedScalingMetric]
readsPrec :: Int -> ReadS PredictiveScalingCustomizedScalingMetric
$creadsPrec :: Int -> ReadS PredictiveScalingCustomizedScalingMetric
Prelude.Read, Int -> PredictiveScalingCustomizedScalingMetric -> ShowS
[PredictiveScalingCustomizedScalingMetric] -> ShowS
PredictiveScalingCustomizedScalingMetric -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PredictiveScalingCustomizedScalingMetric] -> ShowS
$cshowList :: [PredictiveScalingCustomizedScalingMetric] -> ShowS
show :: PredictiveScalingCustomizedScalingMetric -> String
$cshow :: PredictiveScalingCustomizedScalingMetric -> String
showsPrec :: Int -> PredictiveScalingCustomizedScalingMetric -> ShowS
$cshowsPrec :: Int -> PredictiveScalingCustomizedScalingMetric -> ShowS
Prelude.Show, forall x.
Rep PredictiveScalingCustomizedScalingMetric x
-> PredictiveScalingCustomizedScalingMetric
forall x.
PredictiveScalingCustomizedScalingMetric
-> Rep PredictiveScalingCustomizedScalingMetric x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PredictiveScalingCustomizedScalingMetric x
-> PredictiveScalingCustomizedScalingMetric
$cfrom :: forall x.
PredictiveScalingCustomizedScalingMetric
-> Rep PredictiveScalingCustomizedScalingMetric x
Prelude.Generic)
newPredictiveScalingCustomizedScalingMetric ::
PredictiveScalingCustomizedScalingMetric
newPredictiveScalingCustomizedScalingMetric :: PredictiveScalingCustomizedScalingMetric
newPredictiveScalingCustomizedScalingMetric =
PredictiveScalingCustomizedScalingMetric'
{ $sel:metricDataQueries:PredictiveScalingCustomizedScalingMetric' :: [MetricDataQuery]
metricDataQueries =
forall a. Monoid a => a
Prelude.mempty
}
predictiveScalingCustomizedScalingMetric_metricDataQueries :: Lens.Lens' PredictiveScalingCustomizedScalingMetric [MetricDataQuery]
predictiveScalingCustomizedScalingMetric_metricDataQueries :: Lens' PredictiveScalingCustomizedScalingMetric [MetricDataQuery]
predictiveScalingCustomizedScalingMetric_metricDataQueries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictiveScalingCustomizedScalingMetric' {[MetricDataQuery]
metricDataQueries :: [MetricDataQuery]
$sel:metricDataQueries:PredictiveScalingCustomizedScalingMetric' :: PredictiveScalingCustomizedScalingMetric -> [MetricDataQuery]
metricDataQueries} -> [MetricDataQuery]
metricDataQueries) (\s :: PredictiveScalingCustomizedScalingMetric
s@PredictiveScalingCustomizedScalingMetric' {} [MetricDataQuery]
a -> PredictiveScalingCustomizedScalingMetric
s {$sel:metricDataQueries:PredictiveScalingCustomizedScalingMetric' :: [MetricDataQuery]
metricDataQueries = [MetricDataQuery]
a} :: PredictiveScalingCustomizedScalingMetric) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Data.FromXML
PredictiveScalingCustomizedScalingMetric
where
parseXML :: [Node] -> Either String PredictiveScalingCustomizedScalingMetric
parseXML [Node]
x =
[MetricDataQuery] -> PredictiveScalingCustomizedScalingMetric
PredictiveScalingCustomizedScalingMetric'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"MetricDataQueries"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member"
)
instance
Prelude.Hashable
PredictiveScalingCustomizedScalingMetric
where
hashWithSalt :: Int -> PredictiveScalingCustomizedScalingMetric -> Int
hashWithSalt
Int
_salt
PredictiveScalingCustomizedScalingMetric' {[MetricDataQuery]
metricDataQueries :: [MetricDataQuery]
$sel:metricDataQueries:PredictiveScalingCustomizedScalingMetric' :: PredictiveScalingCustomizedScalingMetric -> [MetricDataQuery]
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [MetricDataQuery]
metricDataQueries
instance
Prelude.NFData
PredictiveScalingCustomizedScalingMetric
where
rnf :: PredictiveScalingCustomizedScalingMetric -> ()
rnf PredictiveScalingCustomizedScalingMetric' {[MetricDataQuery]
metricDataQueries :: [MetricDataQuery]
$sel:metricDataQueries:PredictiveScalingCustomizedScalingMetric' :: PredictiveScalingCustomizedScalingMetric -> [MetricDataQuery]
..} =
forall a. NFData a => a -> ()
Prelude.rnf [MetricDataQuery]
metricDataQueries
instance
Data.ToQuery
PredictiveScalingCustomizedScalingMetric
where
toQuery :: PredictiveScalingCustomizedScalingMetric -> QueryString
toQuery PredictiveScalingCustomizedScalingMetric' {[MetricDataQuery]
metricDataQueries :: [MetricDataQuery]
$sel:metricDataQueries:PredictiveScalingCustomizedScalingMetric' :: PredictiveScalingCustomizedScalingMetric -> [MetricDataQuery]
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"MetricDataQueries"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" [MetricDataQuery]
metricDataQueries
]