{-# 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.AutoScalingPlans.GetScalingPlanResourceForecastData
(
GetScalingPlanResourceForecastData (..),
newGetScalingPlanResourceForecastData,
getScalingPlanResourceForecastData_scalingPlanName,
getScalingPlanResourceForecastData_scalingPlanVersion,
getScalingPlanResourceForecastData_serviceNamespace,
getScalingPlanResourceForecastData_resourceId,
getScalingPlanResourceForecastData_scalableDimension,
getScalingPlanResourceForecastData_forecastDataType,
getScalingPlanResourceForecastData_startTime,
getScalingPlanResourceForecastData_endTime,
GetScalingPlanResourceForecastDataResponse (..),
newGetScalingPlanResourceForecastDataResponse,
getScalingPlanResourceForecastDataResponse_httpStatus,
getScalingPlanResourceForecastDataResponse_datapoints,
)
where
import Amazonka.AutoScalingPlans.Types
import qualified Amazonka.Core as Core
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 GetScalingPlanResourceForecastData = GetScalingPlanResourceForecastData'
{
GetScalingPlanResourceForecastData -> Text
scalingPlanName :: Prelude.Text,
GetScalingPlanResourceForecastData -> Integer
scalingPlanVersion :: Prelude.Integer,
GetScalingPlanResourceForecastData -> ServiceNamespace
serviceNamespace :: ServiceNamespace,
GetScalingPlanResourceForecastData -> Text
resourceId :: Prelude.Text,
GetScalingPlanResourceForecastData -> ScalableDimension
scalableDimension :: ScalableDimension,
GetScalingPlanResourceForecastData -> ForecastDataType
forecastDataType :: ForecastDataType,
GetScalingPlanResourceForecastData -> POSIX
startTime :: Core.POSIX,
GetScalingPlanResourceForecastData -> POSIX
endTime :: Core.POSIX
}
deriving (GetScalingPlanResourceForecastData
-> GetScalingPlanResourceForecastData -> Bool
(GetScalingPlanResourceForecastData
-> GetScalingPlanResourceForecastData -> Bool)
-> (GetScalingPlanResourceForecastData
-> GetScalingPlanResourceForecastData -> Bool)
-> Eq GetScalingPlanResourceForecastData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetScalingPlanResourceForecastData
-> GetScalingPlanResourceForecastData -> Bool
$c/= :: GetScalingPlanResourceForecastData
-> GetScalingPlanResourceForecastData -> Bool
== :: GetScalingPlanResourceForecastData
-> GetScalingPlanResourceForecastData -> Bool
$c== :: GetScalingPlanResourceForecastData
-> GetScalingPlanResourceForecastData -> Bool
Prelude.Eq, ReadPrec [GetScalingPlanResourceForecastData]
ReadPrec GetScalingPlanResourceForecastData
Int -> ReadS GetScalingPlanResourceForecastData
ReadS [GetScalingPlanResourceForecastData]
(Int -> ReadS GetScalingPlanResourceForecastData)
-> ReadS [GetScalingPlanResourceForecastData]
-> ReadPrec GetScalingPlanResourceForecastData
-> ReadPrec [GetScalingPlanResourceForecastData]
-> Read GetScalingPlanResourceForecastData
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetScalingPlanResourceForecastData]
$creadListPrec :: ReadPrec [GetScalingPlanResourceForecastData]
readPrec :: ReadPrec GetScalingPlanResourceForecastData
$creadPrec :: ReadPrec GetScalingPlanResourceForecastData
readList :: ReadS [GetScalingPlanResourceForecastData]
$creadList :: ReadS [GetScalingPlanResourceForecastData]
readsPrec :: Int -> ReadS GetScalingPlanResourceForecastData
$creadsPrec :: Int -> ReadS GetScalingPlanResourceForecastData
Prelude.Read, Int -> GetScalingPlanResourceForecastData -> ShowS
[GetScalingPlanResourceForecastData] -> ShowS
GetScalingPlanResourceForecastData -> String
(Int -> GetScalingPlanResourceForecastData -> ShowS)
-> (GetScalingPlanResourceForecastData -> String)
-> ([GetScalingPlanResourceForecastData] -> ShowS)
-> Show GetScalingPlanResourceForecastData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetScalingPlanResourceForecastData] -> ShowS
$cshowList :: [GetScalingPlanResourceForecastData] -> ShowS
show :: GetScalingPlanResourceForecastData -> String
$cshow :: GetScalingPlanResourceForecastData -> String
showsPrec :: Int -> GetScalingPlanResourceForecastData -> ShowS
$cshowsPrec :: Int -> GetScalingPlanResourceForecastData -> ShowS
Prelude.Show, (forall x.
GetScalingPlanResourceForecastData
-> Rep GetScalingPlanResourceForecastData x)
-> (forall x.
Rep GetScalingPlanResourceForecastData x
-> GetScalingPlanResourceForecastData)
-> Generic GetScalingPlanResourceForecastData
forall x.
Rep GetScalingPlanResourceForecastData x
-> GetScalingPlanResourceForecastData
forall x.
GetScalingPlanResourceForecastData
-> Rep GetScalingPlanResourceForecastData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetScalingPlanResourceForecastData x
-> GetScalingPlanResourceForecastData
$cfrom :: forall x.
GetScalingPlanResourceForecastData
-> Rep GetScalingPlanResourceForecastData x
Prelude.Generic)
newGetScalingPlanResourceForecastData ::
Prelude.Text ->
Prelude.Integer ->
ServiceNamespace ->
Prelude.Text ->
ScalableDimension ->
ForecastDataType ->
Prelude.UTCTime ->
Prelude.UTCTime ->
GetScalingPlanResourceForecastData
newGetScalingPlanResourceForecastData :: Text
-> Integer
-> ServiceNamespace
-> Text
-> ScalableDimension
-> ForecastDataType
-> UTCTime
-> UTCTime
-> GetScalingPlanResourceForecastData
newGetScalingPlanResourceForecastData
Text
pScalingPlanName_
Integer
pScalingPlanVersion_
ServiceNamespace
pServiceNamespace_
Text
pResourceId_
ScalableDimension
pScalableDimension_
ForecastDataType
pForecastDataType_
UTCTime
pStartTime_
UTCTime
pEndTime_ =
GetScalingPlanResourceForecastData' :: Text
-> Integer
-> ServiceNamespace
-> Text
-> ScalableDimension
-> ForecastDataType
-> POSIX
-> POSIX
-> GetScalingPlanResourceForecastData
GetScalingPlanResourceForecastData'
{ $sel:scalingPlanName:GetScalingPlanResourceForecastData' :: Text
scalingPlanName =
Text
pScalingPlanName_,
$sel:scalingPlanVersion:GetScalingPlanResourceForecastData' :: Integer
scalingPlanVersion =
Integer
pScalingPlanVersion_,
$sel:serviceNamespace:GetScalingPlanResourceForecastData' :: ServiceNamespace
serviceNamespace = ServiceNamespace
pServiceNamespace_,
$sel:resourceId:GetScalingPlanResourceForecastData' :: Text
resourceId = Text
pResourceId_,
$sel:scalableDimension:GetScalingPlanResourceForecastData' :: ScalableDimension
scalableDimension = ScalableDimension
pScalableDimension_,
$sel:forecastDataType:GetScalingPlanResourceForecastData' :: ForecastDataType
forecastDataType = ForecastDataType
pForecastDataType_,
$sel:startTime:GetScalingPlanResourceForecastData' :: POSIX
startTime =
Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartTime_,
$sel:endTime:GetScalingPlanResourceForecastData' :: POSIX
endTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pEndTime_
}
getScalingPlanResourceForecastData_scalingPlanName :: Lens.Lens' GetScalingPlanResourceForecastData Prelude.Text
getScalingPlanResourceForecastData_scalingPlanName :: (Text -> f Text)
-> GetScalingPlanResourceForecastData
-> f GetScalingPlanResourceForecastData
getScalingPlanResourceForecastData_scalingPlanName = (GetScalingPlanResourceForecastData -> Text)
-> (GetScalingPlanResourceForecastData
-> Text -> GetScalingPlanResourceForecastData)
-> Lens
GetScalingPlanResourceForecastData
GetScalingPlanResourceForecastData
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetScalingPlanResourceForecastData' {Text
scalingPlanName :: Text
$sel:scalingPlanName:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> Text
scalingPlanName} -> Text
scalingPlanName) (\s :: GetScalingPlanResourceForecastData
s@GetScalingPlanResourceForecastData' {} Text
a -> GetScalingPlanResourceForecastData
s {$sel:scalingPlanName:GetScalingPlanResourceForecastData' :: Text
scalingPlanName = Text
a} :: GetScalingPlanResourceForecastData)
getScalingPlanResourceForecastData_scalingPlanVersion :: Lens.Lens' GetScalingPlanResourceForecastData Prelude.Integer
getScalingPlanResourceForecastData_scalingPlanVersion :: (Integer -> f Integer)
-> GetScalingPlanResourceForecastData
-> f GetScalingPlanResourceForecastData
getScalingPlanResourceForecastData_scalingPlanVersion = (GetScalingPlanResourceForecastData -> Integer)
-> (GetScalingPlanResourceForecastData
-> Integer -> GetScalingPlanResourceForecastData)
-> Lens
GetScalingPlanResourceForecastData
GetScalingPlanResourceForecastData
Integer
Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetScalingPlanResourceForecastData' {Integer
scalingPlanVersion :: Integer
$sel:scalingPlanVersion:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> Integer
scalingPlanVersion} -> Integer
scalingPlanVersion) (\s :: GetScalingPlanResourceForecastData
s@GetScalingPlanResourceForecastData' {} Integer
a -> GetScalingPlanResourceForecastData
s {$sel:scalingPlanVersion:GetScalingPlanResourceForecastData' :: Integer
scalingPlanVersion = Integer
a} :: GetScalingPlanResourceForecastData)
getScalingPlanResourceForecastData_serviceNamespace :: Lens.Lens' GetScalingPlanResourceForecastData ServiceNamespace
getScalingPlanResourceForecastData_serviceNamespace :: (ServiceNamespace -> f ServiceNamespace)
-> GetScalingPlanResourceForecastData
-> f GetScalingPlanResourceForecastData
getScalingPlanResourceForecastData_serviceNamespace = (GetScalingPlanResourceForecastData -> ServiceNamespace)
-> (GetScalingPlanResourceForecastData
-> ServiceNamespace -> GetScalingPlanResourceForecastData)
-> Lens
GetScalingPlanResourceForecastData
GetScalingPlanResourceForecastData
ServiceNamespace
ServiceNamespace
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetScalingPlanResourceForecastData' {ServiceNamespace
serviceNamespace :: ServiceNamespace
$sel:serviceNamespace:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> ServiceNamespace
serviceNamespace} -> ServiceNamespace
serviceNamespace) (\s :: GetScalingPlanResourceForecastData
s@GetScalingPlanResourceForecastData' {} ServiceNamespace
a -> GetScalingPlanResourceForecastData
s {$sel:serviceNamespace:GetScalingPlanResourceForecastData' :: ServiceNamespace
serviceNamespace = ServiceNamespace
a} :: GetScalingPlanResourceForecastData)
getScalingPlanResourceForecastData_resourceId :: Lens.Lens' GetScalingPlanResourceForecastData Prelude.Text
getScalingPlanResourceForecastData_resourceId :: (Text -> f Text)
-> GetScalingPlanResourceForecastData
-> f GetScalingPlanResourceForecastData
getScalingPlanResourceForecastData_resourceId = (GetScalingPlanResourceForecastData -> Text)
-> (GetScalingPlanResourceForecastData
-> Text -> GetScalingPlanResourceForecastData)
-> Lens
GetScalingPlanResourceForecastData
GetScalingPlanResourceForecastData
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetScalingPlanResourceForecastData' {Text
resourceId :: Text
$sel:resourceId:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> Text
resourceId} -> Text
resourceId) (\s :: GetScalingPlanResourceForecastData
s@GetScalingPlanResourceForecastData' {} Text
a -> GetScalingPlanResourceForecastData
s {$sel:resourceId:GetScalingPlanResourceForecastData' :: Text
resourceId = Text
a} :: GetScalingPlanResourceForecastData)
getScalingPlanResourceForecastData_scalableDimension :: Lens.Lens' GetScalingPlanResourceForecastData ScalableDimension
getScalingPlanResourceForecastData_scalableDimension :: (ScalableDimension -> f ScalableDimension)
-> GetScalingPlanResourceForecastData
-> f GetScalingPlanResourceForecastData
getScalingPlanResourceForecastData_scalableDimension = (GetScalingPlanResourceForecastData -> ScalableDimension)
-> (GetScalingPlanResourceForecastData
-> ScalableDimension -> GetScalingPlanResourceForecastData)
-> Lens
GetScalingPlanResourceForecastData
GetScalingPlanResourceForecastData
ScalableDimension
ScalableDimension
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetScalingPlanResourceForecastData' {ScalableDimension
scalableDimension :: ScalableDimension
$sel:scalableDimension:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> ScalableDimension
scalableDimension} -> ScalableDimension
scalableDimension) (\s :: GetScalingPlanResourceForecastData
s@GetScalingPlanResourceForecastData' {} ScalableDimension
a -> GetScalingPlanResourceForecastData
s {$sel:scalableDimension:GetScalingPlanResourceForecastData' :: ScalableDimension
scalableDimension = ScalableDimension
a} :: GetScalingPlanResourceForecastData)
getScalingPlanResourceForecastData_forecastDataType :: Lens.Lens' GetScalingPlanResourceForecastData ForecastDataType
getScalingPlanResourceForecastData_forecastDataType :: (ForecastDataType -> f ForecastDataType)
-> GetScalingPlanResourceForecastData
-> f GetScalingPlanResourceForecastData
getScalingPlanResourceForecastData_forecastDataType = (GetScalingPlanResourceForecastData -> ForecastDataType)
-> (GetScalingPlanResourceForecastData
-> ForecastDataType -> GetScalingPlanResourceForecastData)
-> Lens
GetScalingPlanResourceForecastData
GetScalingPlanResourceForecastData
ForecastDataType
ForecastDataType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetScalingPlanResourceForecastData' {ForecastDataType
forecastDataType :: ForecastDataType
$sel:forecastDataType:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> ForecastDataType
forecastDataType} -> ForecastDataType
forecastDataType) (\s :: GetScalingPlanResourceForecastData
s@GetScalingPlanResourceForecastData' {} ForecastDataType
a -> GetScalingPlanResourceForecastData
s {$sel:forecastDataType:GetScalingPlanResourceForecastData' :: ForecastDataType
forecastDataType = ForecastDataType
a} :: GetScalingPlanResourceForecastData)
getScalingPlanResourceForecastData_startTime :: Lens.Lens' GetScalingPlanResourceForecastData Prelude.UTCTime
getScalingPlanResourceForecastData_startTime :: (UTCTime -> f UTCTime)
-> GetScalingPlanResourceForecastData
-> f GetScalingPlanResourceForecastData
getScalingPlanResourceForecastData_startTime = (GetScalingPlanResourceForecastData -> POSIX)
-> (GetScalingPlanResourceForecastData
-> POSIX -> GetScalingPlanResourceForecastData)
-> Lens
GetScalingPlanResourceForecastData
GetScalingPlanResourceForecastData
POSIX
POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetScalingPlanResourceForecastData' {POSIX
startTime :: POSIX
$sel:startTime:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> POSIX
startTime} -> POSIX
startTime) (\s :: GetScalingPlanResourceForecastData
s@GetScalingPlanResourceForecastData' {} POSIX
a -> GetScalingPlanResourceForecastData
s {$sel:startTime:GetScalingPlanResourceForecastData' :: POSIX
startTime = POSIX
a} :: GetScalingPlanResourceForecastData) ((POSIX -> f POSIX)
-> GetScalingPlanResourceForecastData
-> f GetScalingPlanResourceForecastData)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetScalingPlanResourceForecastData
-> f GetScalingPlanResourceForecastData
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
getScalingPlanResourceForecastData_endTime :: Lens.Lens' GetScalingPlanResourceForecastData Prelude.UTCTime
getScalingPlanResourceForecastData_endTime :: (UTCTime -> f UTCTime)
-> GetScalingPlanResourceForecastData
-> f GetScalingPlanResourceForecastData
getScalingPlanResourceForecastData_endTime = (GetScalingPlanResourceForecastData -> POSIX)
-> (GetScalingPlanResourceForecastData
-> POSIX -> GetScalingPlanResourceForecastData)
-> Lens
GetScalingPlanResourceForecastData
GetScalingPlanResourceForecastData
POSIX
POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetScalingPlanResourceForecastData' {POSIX
endTime :: POSIX
$sel:endTime:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> POSIX
endTime} -> POSIX
endTime) (\s :: GetScalingPlanResourceForecastData
s@GetScalingPlanResourceForecastData' {} POSIX
a -> GetScalingPlanResourceForecastData
s {$sel:endTime:GetScalingPlanResourceForecastData' :: POSIX
endTime = POSIX
a} :: GetScalingPlanResourceForecastData) ((POSIX -> f POSIX)
-> GetScalingPlanResourceForecastData
-> f GetScalingPlanResourceForecastData)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetScalingPlanResourceForecastData
-> f GetScalingPlanResourceForecastData
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance
Core.AWSRequest
GetScalingPlanResourceForecastData
where
type
AWSResponse GetScalingPlanResourceForecastData =
GetScalingPlanResourceForecastDataResponse
request :: GetScalingPlanResourceForecastData
-> Request GetScalingPlanResourceForecastData
request = Service
-> GetScalingPlanResourceForecastData
-> Request GetScalingPlanResourceForecastData
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetScalingPlanResourceForecastData
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetScalingPlanResourceForecastData)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetScalingPlanResourceForecastData))
-> Logger
-> Service
-> Proxy GetScalingPlanResourceForecastData
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetScalingPlanResourceForecastData)))
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 ->
Int -> [Datapoint] -> GetScalingPlanResourceForecastDataResponse
GetScalingPlanResourceForecastDataResponse'
(Int -> [Datapoint] -> GetScalingPlanResourceForecastDataResponse)
-> Either String Int
-> Either
String ([Datapoint] -> GetScalingPlanResourceForecastDataResponse)
forall (f :: * -> *) a b. Functor 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))
Either
String ([Datapoint] -> GetScalingPlanResourceForecastDataResponse)
-> Either String [Datapoint]
-> Either String GetScalingPlanResourceForecastDataResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe [Datapoint])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Datapoints" Either String (Maybe [Datapoint])
-> [Datapoint] -> Either String [Datapoint]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Datapoint]
forall a. Monoid a => a
Prelude.mempty)
)
instance
Prelude.Hashable
GetScalingPlanResourceForecastData
instance
Prelude.NFData
GetScalingPlanResourceForecastData
instance
Core.ToHeaders
GetScalingPlanResourceForecastData
where
toHeaders :: GetScalingPlanResourceForecastData -> ResponseHeaders
toHeaders =
ResponseHeaders
-> GetScalingPlanResourceForecastData -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AnyScaleScalingPlannerFrontendService.GetScalingPlanResourceForecastData" ::
Prelude.ByteString
),
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
GetScalingPlanResourceForecastData
where
toJSON :: GetScalingPlanResourceForecastData -> Value
toJSON GetScalingPlanResourceForecastData' {Integer
Text
POSIX
ForecastDataType
ScalableDimension
ServiceNamespace
endTime :: POSIX
startTime :: POSIX
forecastDataType :: ForecastDataType
scalableDimension :: ScalableDimension
resourceId :: Text
serviceNamespace :: ServiceNamespace
scalingPlanVersion :: Integer
scalingPlanName :: Text
$sel:endTime:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> POSIX
$sel:startTime:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> POSIX
$sel:forecastDataType:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> ForecastDataType
$sel:scalableDimension:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> ScalableDimension
$sel:resourceId:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> Text
$sel:serviceNamespace:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> ServiceNamespace
$sel:scalingPlanVersion:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> Integer
$sel:scalingPlanName:GetScalingPlanResourceForecastData' :: GetScalingPlanResourceForecastData -> 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
"ScalingPlanName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
scalingPlanName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ScalingPlanVersion" Text -> Integer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Integer
scalingPlanVersion),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ServiceNamespace" Text -> ServiceNamespace -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ServiceNamespace
serviceNamespace),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ResourceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ScalableDimension" Text -> ScalableDimension -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ScalableDimension
scalableDimension),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ForecastDataType" Text -> ForecastDataType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ForecastDataType
forecastDataType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"StartTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= POSIX
startTime),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"EndTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= POSIX
endTime)
]
)
instance
Core.ToPath
GetScalingPlanResourceForecastData
where
toPath :: GetScalingPlanResourceForecastData -> ByteString
toPath = ByteString -> GetScalingPlanResourceForecastData -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
GetScalingPlanResourceForecastData
where
toQuery :: GetScalingPlanResourceForecastData -> QueryString
toQuery = QueryString -> GetScalingPlanResourceForecastData -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetScalingPlanResourceForecastDataResponse = GetScalingPlanResourceForecastDataResponse'
{
GetScalingPlanResourceForecastDataResponse -> Int
httpStatus :: Prelude.Int,
GetScalingPlanResourceForecastDataResponse -> [Datapoint]
datapoints :: [Datapoint]
}
deriving (GetScalingPlanResourceForecastDataResponse
-> GetScalingPlanResourceForecastDataResponse -> Bool
(GetScalingPlanResourceForecastDataResponse
-> GetScalingPlanResourceForecastDataResponse -> Bool)
-> (GetScalingPlanResourceForecastDataResponse
-> GetScalingPlanResourceForecastDataResponse -> Bool)
-> Eq GetScalingPlanResourceForecastDataResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetScalingPlanResourceForecastDataResponse
-> GetScalingPlanResourceForecastDataResponse -> Bool
$c/= :: GetScalingPlanResourceForecastDataResponse
-> GetScalingPlanResourceForecastDataResponse -> Bool
== :: GetScalingPlanResourceForecastDataResponse
-> GetScalingPlanResourceForecastDataResponse -> Bool
$c== :: GetScalingPlanResourceForecastDataResponse
-> GetScalingPlanResourceForecastDataResponse -> Bool
Prelude.Eq, ReadPrec [GetScalingPlanResourceForecastDataResponse]
ReadPrec GetScalingPlanResourceForecastDataResponse
Int -> ReadS GetScalingPlanResourceForecastDataResponse
ReadS [GetScalingPlanResourceForecastDataResponse]
(Int -> ReadS GetScalingPlanResourceForecastDataResponse)
-> ReadS [GetScalingPlanResourceForecastDataResponse]
-> ReadPrec GetScalingPlanResourceForecastDataResponse
-> ReadPrec [GetScalingPlanResourceForecastDataResponse]
-> Read GetScalingPlanResourceForecastDataResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetScalingPlanResourceForecastDataResponse]
$creadListPrec :: ReadPrec [GetScalingPlanResourceForecastDataResponse]
readPrec :: ReadPrec GetScalingPlanResourceForecastDataResponse
$creadPrec :: ReadPrec GetScalingPlanResourceForecastDataResponse
readList :: ReadS [GetScalingPlanResourceForecastDataResponse]
$creadList :: ReadS [GetScalingPlanResourceForecastDataResponse]
readsPrec :: Int -> ReadS GetScalingPlanResourceForecastDataResponse
$creadsPrec :: Int -> ReadS GetScalingPlanResourceForecastDataResponse
Prelude.Read, Int -> GetScalingPlanResourceForecastDataResponse -> ShowS
[GetScalingPlanResourceForecastDataResponse] -> ShowS
GetScalingPlanResourceForecastDataResponse -> String
(Int -> GetScalingPlanResourceForecastDataResponse -> ShowS)
-> (GetScalingPlanResourceForecastDataResponse -> String)
-> ([GetScalingPlanResourceForecastDataResponse] -> ShowS)
-> Show GetScalingPlanResourceForecastDataResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetScalingPlanResourceForecastDataResponse] -> ShowS
$cshowList :: [GetScalingPlanResourceForecastDataResponse] -> ShowS
show :: GetScalingPlanResourceForecastDataResponse -> String
$cshow :: GetScalingPlanResourceForecastDataResponse -> String
showsPrec :: Int -> GetScalingPlanResourceForecastDataResponse -> ShowS
$cshowsPrec :: Int -> GetScalingPlanResourceForecastDataResponse -> ShowS
Prelude.Show, (forall x.
GetScalingPlanResourceForecastDataResponse
-> Rep GetScalingPlanResourceForecastDataResponse x)
-> (forall x.
Rep GetScalingPlanResourceForecastDataResponse x
-> GetScalingPlanResourceForecastDataResponse)
-> Generic GetScalingPlanResourceForecastDataResponse
forall x.
Rep GetScalingPlanResourceForecastDataResponse x
-> GetScalingPlanResourceForecastDataResponse
forall x.
GetScalingPlanResourceForecastDataResponse
-> Rep GetScalingPlanResourceForecastDataResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetScalingPlanResourceForecastDataResponse x
-> GetScalingPlanResourceForecastDataResponse
$cfrom :: forall x.
GetScalingPlanResourceForecastDataResponse
-> Rep GetScalingPlanResourceForecastDataResponse x
Prelude.Generic)
newGetScalingPlanResourceForecastDataResponse ::
Prelude.Int ->
GetScalingPlanResourceForecastDataResponse
newGetScalingPlanResourceForecastDataResponse :: Int -> GetScalingPlanResourceForecastDataResponse
newGetScalingPlanResourceForecastDataResponse
Int
pHttpStatus_ =
GetScalingPlanResourceForecastDataResponse' :: Int -> [Datapoint] -> GetScalingPlanResourceForecastDataResponse
GetScalingPlanResourceForecastDataResponse'
{ $sel:httpStatus:GetScalingPlanResourceForecastDataResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:datapoints:GetScalingPlanResourceForecastDataResponse' :: [Datapoint]
datapoints = [Datapoint]
forall a. Monoid a => a
Prelude.mempty
}
getScalingPlanResourceForecastDataResponse_httpStatus :: Lens.Lens' GetScalingPlanResourceForecastDataResponse Prelude.Int
getScalingPlanResourceForecastDataResponse_httpStatus :: (Int -> f Int)
-> GetScalingPlanResourceForecastDataResponse
-> f GetScalingPlanResourceForecastDataResponse
getScalingPlanResourceForecastDataResponse_httpStatus = (GetScalingPlanResourceForecastDataResponse -> Int)
-> (GetScalingPlanResourceForecastDataResponse
-> Int -> GetScalingPlanResourceForecastDataResponse)
-> Lens
GetScalingPlanResourceForecastDataResponse
GetScalingPlanResourceForecastDataResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetScalingPlanResourceForecastDataResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetScalingPlanResourceForecastDataResponse' :: GetScalingPlanResourceForecastDataResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetScalingPlanResourceForecastDataResponse
s@GetScalingPlanResourceForecastDataResponse' {} Int
a -> GetScalingPlanResourceForecastDataResponse
s {$sel:httpStatus:GetScalingPlanResourceForecastDataResponse' :: Int
httpStatus = Int
a} :: GetScalingPlanResourceForecastDataResponse)
getScalingPlanResourceForecastDataResponse_datapoints :: Lens.Lens' GetScalingPlanResourceForecastDataResponse [Datapoint]
getScalingPlanResourceForecastDataResponse_datapoints :: ([Datapoint] -> f [Datapoint])
-> GetScalingPlanResourceForecastDataResponse
-> f GetScalingPlanResourceForecastDataResponse
getScalingPlanResourceForecastDataResponse_datapoints = (GetScalingPlanResourceForecastDataResponse -> [Datapoint])
-> (GetScalingPlanResourceForecastDataResponse
-> [Datapoint] -> GetScalingPlanResourceForecastDataResponse)
-> Lens
GetScalingPlanResourceForecastDataResponse
GetScalingPlanResourceForecastDataResponse
[Datapoint]
[Datapoint]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetScalingPlanResourceForecastDataResponse' {[Datapoint]
datapoints :: [Datapoint]
$sel:datapoints:GetScalingPlanResourceForecastDataResponse' :: GetScalingPlanResourceForecastDataResponse -> [Datapoint]
datapoints} -> [Datapoint]
datapoints) (\s :: GetScalingPlanResourceForecastDataResponse
s@GetScalingPlanResourceForecastDataResponse' {} [Datapoint]
a -> GetScalingPlanResourceForecastDataResponse
s {$sel:datapoints:GetScalingPlanResourceForecastDataResponse' :: [Datapoint]
datapoints = [Datapoint]
a} :: GetScalingPlanResourceForecastDataResponse) (([Datapoint] -> f [Datapoint])
-> GetScalingPlanResourceForecastDataResponse
-> f GetScalingPlanResourceForecastDataResponse)
-> (([Datapoint] -> f [Datapoint]) -> [Datapoint] -> f [Datapoint])
-> ([Datapoint] -> f [Datapoint])
-> GetScalingPlanResourceForecastDataResponse
-> f GetScalingPlanResourceForecastDataResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Datapoint] -> f [Datapoint]) -> [Datapoint] -> f [Datapoint]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Prelude.NFData
GetScalingPlanResourceForecastDataResponse