{-# 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.CostExplorer.GetRightsizingRecommendation
(
GetRightsizingRecommendation (..),
newGetRightsizingRecommendation,
getRightsizingRecommendation_nextPageToken,
getRightsizingRecommendation_configuration,
getRightsizingRecommendation_filter,
getRightsizingRecommendation_pageSize,
getRightsizingRecommendation_service,
GetRightsizingRecommendationResponse (..),
newGetRightsizingRecommendationResponse,
getRightsizingRecommendationResponse_summary,
getRightsizingRecommendationResponse_nextPageToken,
getRightsizingRecommendationResponse_rightsizingRecommendations,
getRightsizingRecommendationResponse_metadata,
getRightsizingRecommendationResponse_configuration,
getRightsizingRecommendationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.CostExplorer.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 GetRightsizingRecommendation = GetRightsizingRecommendation'
{
GetRightsizingRecommendation -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
GetRightsizingRecommendation
-> Maybe RightsizingRecommendationConfiguration
configuration :: Prelude.Maybe RightsizingRecommendationConfiguration,
GetRightsizingRecommendation -> Maybe Expression
filter' :: Prelude.Maybe Expression,
GetRightsizingRecommendation -> Maybe Natural
pageSize :: Prelude.Maybe Prelude.Natural,
GetRightsizingRecommendation -> Text
service :: Prelude.Text
}
deriving (GetRightsizingRecommendation
-> GetRightsizingRecommendation -> Bool
(GetRightsizingRecommendation
-> GetRightsizingRecommendation -> Bool)
-> (GetRightsizingRecommendation
-> GetRightsizingRecommendation -> Bool)
-> Eq GetRightsizingRecommendation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRightsizingRecommendation
-> GetRightsizingRecommendation -> Bool
$c/= :: GetRightsizingRecommendation
-> GetRightsizingRecommendation -> Bool
== :: GetRightsizingRecommendation
-> GetRightsizingRecommendation -> Bool
$c== :: GetRightsizingRecommendation
-> GetRightsizingRecommendation -> Bool
Prelude.Eq, ReadPrec [GetRightsizingRecommendation]
ReadPrec GetRightsizingRecommendation
Int -> ReadS GetRightsizingRecommendation
ReadS [GetRightsizingRecommendation]
(Int -> ReadS GetRightsizingRecommendation)
-> ReadS [GetRightsizingRecommendation]
-> ReadPrec GetRightsizingRecommendation
-> ReadPrec [GetRightsizingRecommendation]
-> Read GetRightsizingRecommendation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRightsizingRecommendation]
$creadListPrec :: ReadPrec [GetRightsizingRecommendation]
readPrec :: ReadPrec GetRightsizingRecommendation
$creadPrec :: ReadPrec GetRightsizingRecommendation
readList :: ReadS [GetRightsizingRecommendation]
$creadList :: ReadS [GetRightsizingRecommendation]
readsPrec :: Int -> ReadS GetRightsizingRecommendation
$creadsPrec :: Int -> ReadS GetRightsizingRecommendation
Prelude.Read, Int -> GetRightsizingRecommendation -> ShowS
[GetRightsizingRecommendation] -> ShowS
GetRightsizingRecommendation -> String
(Int -> GetRightsizingRecommendation -> ShowS)
-> (GetRightsizingRecommendation -> String)
-> ([GetRightsizingRecommendation] -> ShowS)
-> Show GetRightsizingRecommendation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRightsizingRecommendation] -> ShowS
$cshowList :: [GetRightsizingRecommendation] -> ShowS
show :: GetRightsizingRecommendation -> String
$cshow :: GetRightsizingRecommendation -> String
showsPrec :: Int -> GetRightsizingRecommendation -> ShowS
$cshowsPrec :: Int -> GetRightsizingRecommendation -> ShowS
Prelude.Show, (forall x.
GetRightsizingRecommendation -> Rep GetRightsizingRecommendation x)
-> (forall x.
Rep GetRightsizingRecommendation x -> GetRightsizingRecommendation)
-> Generic GetRightsizingRecommendation
forall x.
Rep GetRightsizingRecommendation x -> GetRightsizingRecommendation
forall x.
GetRightsizingRecommendation -> Rep GetRightsizingRecommendation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetRightsizingRecommendation x -> GetRightsizingRecommendation
$cfrom :: forall x.
GetRightsizingRecommendation -> Rep GetRightsizingRecommendation x
Prelude.Generic)
newGetRightsizingRecommendation ::
Prelude.Text ->
GetRightsizingRecommendation
newGetRightsizingRecommendation :: Text -> GetRightsizingRecommendation
newGetRightsizingRecommendation Text
pService_ =
GetRightsizingRecommendation' :: Maybe Text
-> Maybe RightsizingRecommendationConfiguration
-> Maybe Expression
-> Maybe Natural
-> Text
-> GetRightsizingRecommendation
GetRightsizingRecommendation'
{ $sel:nextPageToken:GetRightsizingRecommendation' :: Maybe Text
nextPageToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:configuration:GetRightsizingRecommendation' :: Maybe RightsizingRecommendationConfiguration
configuration = Maybe RightsizingRecommendationConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:filter':GetRightsizingRecommendation' :: Maybe Expression
filter' = Maybe Expression
forall a. Maybe a
Prelude.Nothing,
$sel:pageSize:GetRightsizingRecommendation' :: Maybe Natural
pageSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:service:GetRightsizingRecommendation' :: Text
service = Text
pService_
}
getRightsizingRecommendation_nextPageToken :: Lens.Lens' GetRightsizingRecommendation (Prelude.Maybe Prelude.Text)
getRightsizingRecommendation_nextPageToken :: (Maybe Text -> f (Maybe Text))
-> GetRightsizingRecommendation -> f GetRightsizingRecommendation
getRightsizingRecommendation_nextPageToken = (GetRightsizingRecommendation -> Maybe Text)
-> (GetRightsizingRecommendation
-> Maybe Text -> GetRightsizingRecommendation)
-> Lens
GetRightsizingRecommendation
GetRightsizingRecommendation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRightsizingRecommendation' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:GetRightsizingRecommendation' :: GetRightsizingRecommendation -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: GetRightsizingRecommendation
s@GetRightsizingRecommendation' {} Maybe Text
a -> GetRightsizingRecommendation
s {$sel:nextPageToken:GetRightsizingRecommendation' :: Maybe Text
nextPageToken = Maybe Text
a} :: GetRightsizingRecommendation)
getRightsizingRecommendation_configuration :: Lens.Lens' GetRightsizingRecommendation (Prelude.Maybe RightsizingRecommendationConfiguration)
getRightsizingRecommendation_configuration :: (Maybe RightsizingRecommendationConfiguration
-> f (Maybe RightsizingRecommendationConfiguration))
-> GetRightsizingRecommendation -> f GetRightsizingRecommendation
getRightsizingRecommendation_configuration = (GetRightsizingRecommendation
-> Maybe RightsizingRecommendationConfiguration)
-> (GetRightsizingRecommendation
-> Maybe RightsizingRecommendationConfiguration
-> GetRightsizingRecommendation)
-> Lens
GetRightsizingRecommendation
GetRightsizingRecommendation
(Maybe RightsizingRecommendationConfiguration)
(Maybe RightsizingRecommendationConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRightsizingRecommendation' {Maybe RightsizingRecommendationConfiguration
configuration :: Maybe RightsizingRecommendationConfiguration
$sel:configuration:GetRightsizingRecommendation' :: GetRightsizingRecommendation
-> Maybe RightsizingRecommendationConfiguration
configuration} -> Maybe RightsizingRecommendationConfiguration
configuration) (\s :: GetRightsizingRecommendation
s@GetRightsizingRecommendation' {} Maybe RightsizingRecommendationConfiguration
a -> GetRightsizingRecommendation
s {$sel:configuration:GetRightsizingRecommendation' :: Maybe RightsizingRecommendationConfiguration
configuration = Maybe RightsizingRecommendationConfiguration
a} :: GetRightsizingRecommendation)
getRightsizingRecommendation_filter :: Lens.Lens' GetRightsizingRecommendation (Prelude.Maybe Expression)
getRightsizingRecommendation_filter :: (Maybe Expression -> f (Maybe Expression))
-> GetRightsizingRecommendation -> f GetRightsizingRecommendation
getRightsizingRecommendation_filter = (GetRightsizingRecommendation -> Maybe Expression)
-> (GetRightsizingRecommendation
-> Maybe Expression -> GetRightsizingRecommendation)
-> Lens
GetRightsizingRecommendation
GetRightsizingRecommendation
(Maybe Expression)
(Maybe Expression)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRightsizingRecommendation' {Maybe Expression
filter' :: Maybe Expression
$sel:filter':GetRightsizingRecommendation' :: GetRightsizingRecommendation -> Maybe Expression
filter'} -> Maybe Expression
filter') (\s :: GetRightsizingRecommendation
s@GetRightsizingRecommendation' {} Maybe Expression
a -> GetRightsizingRecommendation
s {$sel:filter':GetRightsizingRecommendation' :: Maybe Expression
filter' = Maybe Expression
a} :: GetRightsizingRecommendation)
getRightsizingRecommendation_pageSize :: Lens.Lens' GetRightsizingRecommendation (Prelude.Maybe Prelude.Natural)
getRightsizingRecommendation_pageSize :: (Maybe Natural -> f (Maybe Natural))
-> GetRightsizingRecommendation -> f GetRightsizingRecommendation
getRightsizingRecommendation_pageSize = (GetRightsizingRecommendation -> Maybe Natural)
-> (GetRightsizingRecommendation
-> Maybe Natural -> GetRightsizingRecommendation)
-> Lens
GetRightsizingRecommendation
GetRightsizingRecommendation
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRightsizingRecommendation' {Maybe Natural
pageSize :: Maybe Natural
$sel:pageSize:GetRightsizingRecommendation' :: GetRightsizingRecommendation -> Maybe Natural
pageSize} -> Maybe Natural
pageSize) (\s :: GetRightsizingRecommendation
s@GetRightsizingRecommendation' {} Maybe Natural
a -> GetRightsizingRecommendation
s {$sel:pageSize:GetRightsizingRecommendation' :: Maybe Natural
pageSize = Maybe Natural
a} :: GetRightsizingRecommendation)
getRightsizingRecommendation_service :: Lens.Lens' GetRightsizingRecommendation Prelude.Text
getRightsizingRecommendation_service :: (Text -> f Text)
-> GetRightsizingRecommendation -> f GetRightsizingRecommendation
getRightsizingRecommendation_service = (GetRightsizingRecommendation -> Text)
-> (GetRightsizingRecommendation
-> Text -> GetRightsizingRecommendation)
-> Lens
GetRightsizingRecommendation GetRightsizingRecommendation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRightsizingRecommendation' {Text
service :: Text
$sel:service:GetRightsizingRecommendation' :: GetRightsizingRecommendation -> Text
service} -> Text
service) (\s :: GetRightsizingRecommendation
s@GetRightsizingRecommendation' {} Text
a -> GetRightsizingRecommendation
s {$sel:service:GetRightsizingRecommendation' :: Text
service = Text
a} :: GetRightsizingRecommendation)
instance Core.AWSRequest GetRightsizingRecommendation where
type
AWSResponse GetRightsizingRecommendation =
GetRightsizingRecommendationResponse
request :: GetRightsizingRecommendation
-> Request GetRightsizingRecommendation
request = Service
-> GetRightsizingRecommendation
-> Request GetRightsizingRecommendation
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetRightsizingRecommendation
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetRightsizingRecommendation)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetRightsizingRecommendation))
-> Logger
-> Service
-> Proxy GetRightsizingRecommendation
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetRightsizingRecommendation)))
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 RightsizingRecommendationSummary
-> Maybe Text
-> Maybe [RightsizingRecommendation]
-> Maybe RightsizingRecommendationMetadata
-> Maybe RightsizingRecommendationConfiguration
-> Int
-> GetRightsizingRecommendationResponse
GetRightsizingRecommendationResponse'
(Maybe RightsizingRecommendationSummary
-> Maybe Text
-> Maybe [RightsizingRecommendation]
-> Maybe RightsizingRecommendationMetadata
-> Maybe RightsizingRecommendationConfiguration
-> Int
-> GetRightsizingRecommendationResponse)
-> Either String (Maybe RightsizingRecommendationSummary)
-> Either
String
(Maybe Text
-> Maybe [RightsizingRecommendation]
-> Maybe RightsizingRecommendationMetadata
-> Maybe RightsizingRecommendationConfiguration
-> Int
-> GetRightsizingRecommendationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe RightsizingRecommendationSummary)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Summary")
Either
String
(Maybe Text
-> Maybe [RightsizingRecommendation]
-> Maybe RightsizingRecommendationMetadata
-> Maybe RightsizingRecommendationConfiguration
-> Int
-> GetRightsizingRecommendationResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [RightsizingRecommendation]
-> Maybe RightsizingRecommendationMetadata
-> Maybe RightsizingRecommendationConfiguration
-> Int
-> GetRightsizingRecommendationResponse)
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
"NextPageToken")
Either
String
(Maybe [RightsizingRecommendation]
-> Maybe RightsizingRecommendationMetadata
-> Maybe RightsizingRecommendationConfiguration
-> Int
-> GetRightsizingRecommendationResponse)
-> Either String (Maybe [RightsizingRecommendation])
-> Either
String
(Maybe RightsizingRecommendationMetadata
-> Maybe RightsizingRecommendationConfiguration
-> Int
-> GetRightsizingRecommendationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [RightsizingRecommendation]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RightsizingRecommendations"
Either String (Maybe (Maybe [RightsizingRecommendation]))
-> Maybe [RightsizingRecommendation]
-> Either String (Maybe [RightsizingRecommendation])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [RightsizingRecommendation]
forall a. Monoid a => a
Prelude.mempty
)
Either
String
(Maybe RightsizingRecommendationMetadata
-> Maybe RightsizingRecommendationConfiguration
-> Int
-> GetRightsizingRecommendationResponse)
-> Either String (Maybe RightsizingRecommendationMetadata)
-> Either
String
(Maybe RightsizingRecommendationConfiguration
-> Int -> GetRightsizingRecommendationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe RightsizingRecommendationMetadata)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Metadata")
Either
String
(Maybe RightsizingRecommendationConfiguration
-> Int -> GetRightsizingRecommendationResponse)
-> Either String (Maybe RightsizingRecommendationConfiguration)
-> Either String (Int -> GetRightsizingRecommendationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe RightsizingRecommendationConfiguration)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Configuration")
Either String (Int -> GetRightsizingRecommendationResponse)
-> Either String Int
-> Either String GetRightsizingRecommendationResponse
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
GetRightsizingRecommendation
instance Prelude.NFData GetRightsizingRecommendation
instance Core.ToHeaders GetRightsizingRecommendation where
toHeaders :: GetRightsizingRecommendation -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetRightsizingRecommendation -> 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
"AWSInsightsIndexService.GetRightsizingRecommendation" ::
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 GetRightsizingRecommendation where
toJSON :: GetRightsizingRecommendation -> Value
toJSON GetRightsizingRecommendation' {Maybe Natural
Maybe Text
Maybe RightsizingRecommendationConfiguration
Maybe Expression
Text
service :: Text
pageSize :: Maybe Natural
filter' :: Maybe Expression
configuration :: Maybe RightsizingRecommendationConfiguration
nextPageToken :: Maybe Text
$sel:service:GetRightsizingRecommendation' :: GetRightsizingRecommendation -> Text
$sel:pageSize:GetRightsizingRecommendation' :: GetRightsizingRecommendation -> Maybe Natural
$sel:filter':GetRightsizingRecommendation' :: GetRightsizingRecommendation -> Maybe Expression
$sel:configuration:GetRightsizingRecommendation' :: GetRightsizingRecommendation
-> Maybe RightsizingRecommendationConfiguration
$sel:nextPageToken:GetRightsizingRecommendation' :: GetRightsizingRecommendation -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"NextPageToken" 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
nextPageToken,
(Text
"Configuration" Text -> RightsizingRecommendationConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RightsizingRecommendationConfiguration -> Pair)
-> Maybe RightsizingRecommendationConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RightsizingRecommendationConfiguration
configuration,
(Text
"Filter" Text -> Expression -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Expression -> Pair) -> Maybe Expression -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Expression
filter',
(Text
"PageSize" 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
pageSize,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Service" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
service)
]
)
instance Core.ToPath GetRightsizingRecommendation where
toPath :: GetRightsizingRecommendation -> ByteString
toPath = ByteString -> GetRightsizingRecommendation -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetRightsizingRecommendation where
toQuery :: GetRightsizingRecommendation -> QueryString
toQuery = QueryString -> GetRightsizingRecommendation -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetRightsizingRecommendationResponse = GetRightsizingRecommendationResponse'
{
GetRightsizingRecommendationResponse
-> Maybe RightsizingRecommendationSummary
summary :: Prelude.Maybe RightsizingRecommendationSummary,
GetRightsizingRecommendationResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
GetRightsizingRecommendationResponse
-> Maybe [RightsizingRecommendation]
rightsizingRecommendations :: Prelude.Maybe [RightsizingRecommendation],
GetRightsizingRecommendationResponse
-> Maybe RightsizingRecommendationMetadata
metadata :: Prelude.Maybe RightsizingRecommendationMetadata,
GetRightsizingRecommendationResponse
-> Maybe RightsizingRecommendationConfiguration
configuration :: Prelude.Maybe RightsizingRecommendationConfiguration,
GetRightsizingRecommendationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetRightsizingRecommendationResponse
-> GetRightsizingRecommendationResponse -> Bool
(GetRightsizingRecommendationResponse
-> GetRightsizingRecommendationResponse -> Bool)
-> (GetRightsizingRecommendationResponse
-> GetRightsizingRecommendationResponse -> Bool)
-> Eq GetRightsizingRecommendationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRightsizingRecommendationResponse
-> GetRightsizingRecommendationResponse -> Bool
$c/= :: GetRightsizingRecommendationResponse
-> GetRightsizingRecommendationResponse -> Bool
== :: GetRightsizingRecommendationResponse
-> GetRightsizingRecommendationResponse -> Bool
$c== :: GetRightsizingRecommendationResponse
-> GetRightsizingRecommendationResponse -> Bool
Prelude.Eq, ReadPrec [GetRightsizingRecommendationResponse]
ReadPrec GetRightsizingRecommendationResponse
Int -> ReadS GetRightsizingRecommendationResponse
ReadS [GetRightsizingRecommendationResponse]
(Int -> ReadS GetRightsizingRecommendationResponse)
-> ReadS [GetRightsizingRecommendationResponse]
-> ReadPrec GetRightsizingRecommendationResponse
-> ReadPrec [GetRightsizingRecommendationResponse]
-> Read GetRightsizingRecommendationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRightsizingRecommendationResponse]
$creadListPrec :: ReadPrec [GetRightsizingRecommendationResponse]
readPrec :: ReadPrec GetRightsizingRecommendationResponse
$creadPrec :: ReadPrec GetRightsizingRecommendationResponse
readList :: ReadS [GetRightsizingRecommendationResponse]
$creadList :: ReadS [GetRightsizingRecommendationResponse]
readsPrec :: Int -> ReadS GetRightsizingRecommendationResponse
$creadsPrec :: Int -> ReadS GetRightsizingRecommendationResponse
Prelude.Read, Int -> GetRightsizingRecommendationResponse -> ShowS
[GetRightsizingRecommendationResponse] -> ShowS
GetRightsizingRecommendationResponse -> String
(Int -> GetRightsizingRecommendationResponse -> ShowS)
-> (GetRightsizingRecommendationResponse -> String)
-> ([GetRightsizingRecommendationResponse] -> ShowS)
-> Show GetRightsizingRecommendationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRightsizingRecommendationResponse] -> ShowS
$cshowList :: [GetRightsizingRecommendationResponse] -> ShowS
show :: GetRightsizingRecommendationResponse -> String
$cshow :: GetRightsizingRecommendationResponse -> String
showsPrec :: Int -> GetRightsizingRecommendationResponse -> ShowS
$cshowsPrec :: Int -> GetRightsizingRecommendationResponse -> ShowS
Prelude.Show, (forall x.
GetRightsizingRecommendationResponse
-> Rep GetRightsizingRecommendationResponse x)
-> (forall x.
Rep GetRightsizingRecommendationResponse x
-> GetRightsizingRecommendationResponse)
-> Generic GetRightsizingRecommendationResponse
forall x.
Rep GetRightsizingRecommendationResponse x
-> GetRightsizingRecommendationResponse
forall x.
GetRightsizingRecommendationResponse
-> Rep GetRightsizingRecommendationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetRightsizingRecommendationResponse x
-> GetRightsizingRecommendationResponse
$cfrom :: forall x.
GetRightsizingRecommendationResponse
-> Rep GetRightsizingRecommendationResponse x
Prelude.Generic)
newGetRightsizingRecommendationResponse ::
Prelude.Int ->
GetRightsizingRecommendationResponse
newGetRightsizingRecommendationResponse :: Int -> GetRightsizingRecommendationResponse
newGetRightsizingRecommendationResponse Int
pHttpStatus_ =
GetRightsizingRecommendationResponse' :: Maybe RightsizingRecommendationSummary
-> Maybe Text
-> Maybe [RightsizingRecommendation]
-> Maybe RightsizingRecommendationMetadata
-> Maybe RightsizingRecommendationConfiguration
-> Int
-> GetRightsizingRecommendationResponse
GetRightsizingRecommendationResponse'
{ $sel:summary:GetRightsizingRecommendationResponse' :: Maybe RightsizingRecommendationSummary
summary =
Maybe RightsizingRecommendationSummary
forall a. Maybe a
Prelude.Nothing,
$sel:nextPageToken:GetRightsizingRecommendationResponse' :: Maybe Text
nextPageToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:rightsizingRecommendations:GetRightsizingRecommendationResponse' :: Maybe [RightsizingRecommendation]
rightsizingRecommendations =
Maybe [RightsizingRecommendation]
forall a. Maybe a
Prelude.Nothing,
$sel:metadata:GetRightsizingRecommendationResponse' :: Maybe RightsizingRecommendationMetadata
metadata = Maybe RightsizingRecommendationMetadata
forall a. Maybe a
Prelude.Nothing,
$sel:configuration:GetRightsizingRecommendationResponse' :: Maybe RightsizingRecommendationConfiguration
configuration = Maybe RightsizingRecommendationConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetRightsizingRecommendationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getRightsizingRecommendationResponse_summary :: Lens.Lens' GetRightsizingRecommendationResponse (Prelude.Maybe RightsizingRecommendationSummary)
getRightsizingRecommendationResponse_summary :: (Maybe RightsizingRecommendationSummary
-> f (Maybe RightsizingRecommendationSummary))
-> GetRightsizingRecommendationResponse
-> f GetRightsizingRecommendationResponse
getRightsizingRecommendationResponse_summary = (GetRightsizingRecommendationResponse
-> Maybe RightsizingRecommendationSummary)
-> (GetRightsizingRecommendationResponse
-> Maybe RightsizingRecommendationSummary
-> GetRightsizingRecommendationResponse)
-> Lens
GetRightsizingRecommendationResponse
GetRightsizingRecommendationResponse
(Maybe RightsizingRecommendationSummary)
(Maybe RightsizingRecommendationSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRightsizingRecommendationResponse' {Maybe RightsizingRecommendationSummary
summary :: Maybe RightsizingRecommendationSummary
$sel:summary:GetRightsizingRecommendationResponse' :: GetRightsizingRecommendationResponse
-> Maybe RightsizingRecommendationSummary
summary} -> Maybe RightsizingRecommendationSummary
summary) (\s :: GetRightsizingRecommendationResponse
s@GetRightsizingRecommendationResponse' {} Maybe RightsizingRecommendationSummary
a -> GetRightsizingRecommendationResponse
s {$sel:summary:GetRightsizingRecommendationResponse' :: Maybe RightsizingRecommendationSummary
summary = Maybe RightsizingRecommendationSummary
a} :: GetRightsizingRecommendationResponse)
getRightsizingRecommendationResponse_nextPageToken :: Lens.Lens' GetRightsizingRecommendationResponse (Prelude.Maybe Prelude.Text)
getRightsizingRecommendationResponse_nextPageToken :: (Maybe Text -> f (Maybe Text))
-> GetRightsizingRecommendationResponse
-> f GetRightsizingRecommendationResponse
getRightsizingRecommendationResponse_nextPageToken = (GetRightsizingRecommendationResponse -> Maybe Text)
-> (GetRightsizingRecommendationResponse
-> Maybe Text -> GetRightsizingRecommendationResponse)
-> Lens
GetRightsizingRecommendationResponse
GetRightsizingRecommendationResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRightsizingRecommendationResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:GetRightsizingRecommendationResponse' :: GetRightsizingRecommendationResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: GetRightsizingRecommendationResponse
s@GetRightsizingRecommendationResponse' {} Maybe Text
a -> GetRightsizingRecommendationResponse
s {$sel:nextPageToken:GetRightsizingRecommendationResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: GetRightsizingRecommendationResponse)
getRightsizingRecommendationResponse_rightsizingRecommendations :: Lens.Lens' GetRightsizingRecommendationResponse (Prelude.Maybe [RightsizingRecommendation])
getRightsizingRecommendationResponse_rightsizingRecommendations :: (Maybe [RightsizingRecommendation]
-> f (Maybe [RightsizingRecommendation]))
-> GetRightsizingRecommendationResponse
-> f GetRightsizingRecommendationResponse
getRightsizingRecommendationResponse_rightsizingRecommendations = (GetRightsizingRecommendationResponse
-> Maybe [RightsizingRecommendation])
-> (GetRightsizingRecommendationResponse
-> Maybe [RightsizingRecommendation]
-> GetRightsizingRecommendationResponse)
-> Lens
GetRightsizingRecommendationResponse
GetRightsizingRecommendationResponse
(Maybe [RightsizingRecommendation])
(Maybe [RightsizingRecommendation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRightsizingRecommendationResponse' {Maybe [RightsizingRecommendation]
rightsizingRecommendations :: Maybe [RightsizingRecommendation]
$sel:rightsizingRecommendations:GetRightsizingRecommendationResponse' :: GetRightsizingRecommendationResponse
-> Maybe [RightsizingRecommendation]
rightsizingRecommendations} -> Maybe [RightsizingRecommendation]
rightsizingRecommendations) (\s :: GetRightsizingRecommendationResponse
s@GetRightsizingRecommendationResponse' {} Maybe [RightsizingRecommendation]
a -> GetRightsizingRecommendationResponse
s {$sel:rightsizingRecommendations:GetRightsizingRecommendationResponse' :: Maybe [RightsizingRecommendation]
rightsizingRecommendations = Maybe [RightsizingRecommendation]
a} :: GetRightsizingRecommendationResponse) ((Maybe [RightsizingRecommendation]
-> f (Maybe [RightsizingRecommendation]))
-> GetRightsizingRecommendationResponse
-> f GetRightsizingRecommendationResponse)
-> ((Maybe [RightsizingRecommendation]
-> f (Maybe [RightsizingRecommendation]))
-> Maybe [RightsizingRecommendation]
-> f (Maybe [RightsizingRecommendation]))
-> (Maybe [RightsizingRecommendation]
-> f (Maybe [RightsizingRecommendation]))
-> GetRightsizingRecommendationResponse
-> f GetRightsizingRecommendationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[RightsizingRecommendation]
[RightsizingRecommendation]
[RightsizingRecommendation]
[RightsizingRecommendation]
-> Iso
(Maybe [RightsizingRecommendation])
(Maybe [RightsizingRecommendation])
(Maybe [RightsizingRecommendation])
(Maybe [RightsizingRecommendation])
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
[RightsizingRecommendation]
[RightsizingRecommendation]
[RightsizingRecommendation]
[RightsizingRecommendation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getRightsizingRecommendationResponse_metadata :: Lens.Lens' GetRightsizingRecommendationResponse (Prelude.Maybe RightsizingRecommendationMetadata)
getRightsizingRecommendationResponse_metadata :: (Maybe RightsizingRecommendationMetadata
-> f (Maybe RightsizingRecommendationMetadata))
-> GetRightsizingRecommendationResponse
-> f GetRightsizingRecommendationResponse
getRightsizingRecommendationResponse_metadata = (GetRightsizingRecommendationResponse
-> Maybe RightsizingRecommendationMetadata)
-> (GetRightsizingRecommendationResponse
-> Maybe RightsizingRecommendationMetadata
-> GetRightsizingRecommendationResponse)
-> Lens
GetRightsizingRecommendationResponse
GetRightsizingRecommendationResponse
(Maybe RightsizingRecommendationMetadata)
(Maybe RightsizingRecommendationMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRightsizingRecommendationResponse' {Maybe RightsizingRecommendationMetadata
metadata :: Maybe RightsizingRecommendationMetadata
$sel:metadata:GetRightsizingRecommendationResponse' :: GetRightsizingRecommendationResponse
-> Maybe RightsizingRecommendationMetadata
metadata} -> Maybe RightsizingRecommendationMetadata
metadata) (\s :: GetRightsizingRecommendationResponse
s@GetRightsizingRecommendationResponse' {} Maybe RightsizingRecommendationMetadata
a -> GetRightsizingRecommendationResponse
s {$sel:metadata:GetRightsizingRecommendationResponse' :: Maybe RightsizingRecommendationMetadata
metadata = Maybe RightsizingRecommendationMetadata
a} :: GetRightsizingRecommendationResponse)
getRightsizingRecommendationResponse_configuration :: Lens.Lens' GetRightsizingRecommendationResponse (Prelude.Maybe RightsizingRecommendationConfiguration)
getRightsizingRecommendationResponse_configuration :: (Maybe RightsizingRecommendationConfiguration
-> f (Maybe RightsizingRecommendationConfiguration))
-> GetRightsizingRecommendationResponse
-> f GetRightsizingRecommendationResponse
getRightsizingRecommendationResponse_configuration = (GetRightsizingRecommendationResponse
-> Maybe RightsizingRecommendationConfiguration)
-> (GetRightsizingRecommendationResponse
-> Maybe RightsizingRecommendationConfiguration
-> GetRightsizingRecommendationResponse)
-> Lens
GetRightsizingRecommendationResponse
GetRightsizingRecommendationResponse
(Maybe RightsizingRecommendationConfiguration)
(Maybe RightsizingRecommendationConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRightsizingRecommendationResponse' {Maybe RightsizingRecommendationConfiguration
configuration :: Maybe RightsizingRecommendationConfiguration
$sel:configuration:GetRightsizingRecommendationResponse' :: GetRightsizingRecommendationResponse
-> Maybe RightsizingRecommendationConfiguration
configuration} -> Maybe RightsizingRecommendationConfiguration
configuration) (\s :: GetRightsizingRecommendationResponse
s@GetRightsizingRecommendationResponse' {} Maybe RightsizingRecommendationConfiguration
a -> GetRightsizingRecommendationResponse
s {$sel:configuration:GetRightsizingRecommendationResponse' :: Maybe RightsizingRecommendationConfiguration
configuration = Maybe RightsizingRecommendationConfiguration
a} :: GetRightsizingRecommendationResponse)
getRightsizingRecommendationResponse_httpStatus :: Lens.Lens' GetRightsizingRecommendationResponse Prelude.Int
getRightsizingRecommendationResponse_httpStatus :: (Int -> f Int)
-> GetRightsizingRecommendationResponse
-> f GetRightsizingRecommendationResponse
getRightsizingRecommendationResponse_httpStatus = (GetRightsizingRecommendationResponse -> Int)
-> (GetRightsizingRecommendationResponse
-> Int -> GetRightsizingRecommendationResponse)
-> Lens
GetRightsizingRecommendationResponse
GetRightsizingRecommendationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRightsizingRecommendationResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetRightsizingRecommendationResponse' :: GetRightsizingRecommendationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetRightsizingRecommendationResponse
s@GetRightsizingRecommendationResponse' {} Int
a -> GetRightsizingRecommendationResponse
s {$sel:httpStatus:GetRightsizingRecommendationResponse' :: Int
httpStatus = Int
a} :: GetRightsizingRecommendationResponse)
instance
Prelude.NFData
GetRightsizingRecommendationResponse