{-# 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.CostExplorer.Types.RightsizingRecommendationMetadata where
import qualified Amazonka.Core as Core
import Amazonka.CostExplorer.Types.LookbackPeriodInDays
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RightsizingRecommendationMetadata = RightsizingRecommendationMetadata'
{
RightsizingRecommendationMetadata -> Maybe Text
recommendationId :: Prelude.Maybe Prelude.Text,
RightsizingRecommendationMetadata -> Maybe Text
generationTimestamp :: Prelude.Maybe Prelude.Text,
RightsizingRecommendationMetadata -> Maybe Text
additionalMetadata :: Prelude.Maybe Prelude.Text,
RightsizingRecommendationMetadata -> Maybe LookbackPeriodInDays
lookbackPeriodInDays :: Prelude.Maybe LookbackPeriodInDays
}
deriving (RightsizingRecommendationMetadata
-> RightsizingRecommendationMetadata -> Bool
(RightsizingRecommendationMetadata
-> RightsizingRecommendationMetadata -> Bool)
-> (RightsizingRecommendationMetadata
-> RightsizingRecommendationMetadata -> Bool)
-> Eq RightsizingRecommendationMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RightsizingRecommendationMetadata
-> RightsizingRecommendationMetadata -> Bool
$c/= :: RightsizingRecommendationMetadata
-> RightsizingRecommendationMetadata -> Bool
== :: RightsizingRecommendationMetadata
-> RightsizingRecommendationMetadata -> Bool
$c== :: RightsizingRecommendationMetadata
-> RightsizingRecommendationMetadata -> Bool
Prelude.Eq, ReadPrec [RightsizingRecommendationMetadata]
ReadPrec RightsizingRecommendationMetadata
Int -> ReadS RightsizingRecommendationMetadata
ReadS [RightsizingRecommendationMetadata]
(Int -> ReadS RightsizingRecommendationMetadata)
-> ReadS [RightsizingRecommendationMetadata]
-> ReadPrec RightsizingRecommendationMetadata
-> ReadPrec [RightsizingRecommendationMetadata]
-> Read RightsizingRecommendationMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RightsizingRecommendationMetadata]
$creadListPrec :: ReadPrec [RightsizingRecommendationMetadata]
readPrec :: ReadPrec RightsizingRecommendationMetadata
$creadPrec :: ReadPrec RightsizingRecommendationMetadata
readList :: ReadS [RightsizingRecommendationMetadata]
$creadList :: ReadS [RightsizingRecommendationMetadata]
readsPrec :: Int -> ReadS RightsizingRecommendationMetadata
$creadsPrec :: Int -> ReadS RightsizingRecommendationMetadata
Prelude.Read, Int -> RightsizingRecommendationMetadata -> ShowS
[RightsizingRecommendationMetadata] -> ShowS
RightsizingRecommendationMetadata -> String
(Int -> RightsizingRecommendationMetadata -> ShowS)
-> (RightsizingRecommendationMetadata -> String)
-> ([RightsizingRecommendationMetadata] -> ShowS)
-> Show RightsizingRecommendationMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RightsizingRecommendationMetadata] -> ShowS
$cshowList :: [RightsizingRecommendationMetadata] -> ShowS
show :: RightsizingRecommendationMetadata -> String
$cshow :: RightsizingRecommendationMetadata -> String
showsPrec :: Int -> RightsizingRecommendationMetadata -> ShowS
$cshowsPrec :: Int -> RightsizingRecommendationMetadata -> ShowS
Prelude.Show, (forall x.
RightsizingRecommendationMetadata
-> Rep RightsizingRecommendationMetadata x)
-> (forall x.
Rep RightsizingRecommendationMetadata x
-> RightsizingRecommendationMetadata)
-> Generic RightsizingRecommendationMetadata
forall x.
Rep RightsizingRecommendationMetadata x
-> RightsizingRecommendationMetadata
forall x.
RightsizingRecommendationMetadata
-> Rep RightsizingRecommendationMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RightsizingRecommendationMetadata x
-> RightsizingRecommendationMetadata
$cfrom :: forall x.
RightsizingRecommendationMetadata
-> Rep RightsizingRecommendationMetadata x
Prelude.Generic)
newRightsizingRecommendationMetadata ::
RightsizingRecommendationMetadata
newRightsizingRecommendationMetadata :: RightsizingRecommendationMetadata
newRightsizingRecommendationMetadata =
RightsizingRecommendationMetadata' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe LookbackPeriodInDays
-> RightsizingRecommendationMetadata
RightsizingRecommendationMetadata'
{ $sel:recommendationId:RightsizingRecommendationMetadata' :: Maybe Text
recommendationId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:generationTimestamp:RightsizingRecommendationMetadata' :: Maybe Text
generationTimestamp = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:additionalMetadata:RightsizingRecommendationMetadata' :: Maybe Text
additionalMetadata = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lookbackPeriodInDays:RightsizingRecommendationMetadata' :: Maybe LookbackPeriodInDays
lookbackPeriodInDays = Maybe LookbackPeriodInDays
forall a. Maybe a
Prelude.Nothing
}
rightsizingRecommendationMetadata_recommendationId :: Lens.Lens' RightsizingRecommendationMetadata (Prelude.Maybe Prelude.Text)
rightsizingRecommendationMetadata_recommendationId :: (Maybe Text -> f (Maybe Text))
-> RightsizingRecommendationMetadata
-> f RightsizingRecommendationMetadata
rightsizingRecommendationMetadata_recommendationId = (RightsizingRecommendationMetadata -> Maybe Text)
-> (RightsizingRecommendationMetadata
-> Maybe Text -> RightsizingRecommendationMetadata)
-> Lens
RightsizingRecommendationMetadata
RightsizingRecommendationMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RightsizingRecommendationMetadata' {Maybe Text
recommendationId :: Maybe Text
$sel:recommendationId:RightsizingRecommendationMetadata' :: RightsizingRecommendationMetadata -> Maybe Text
recommendationId} -> Maybe Text
recommendationId) (\s :: RightsizingRecommendationMetadata
s@RightsizingRecommendationMetadata' {} Maybe Text
a -> RightsizingRecommendationMetadata
s {$sel:recommendationId:RightsizingRecommendationMetadata' :: Maybe Text
recommendationId = Maybe Text
a} :: RightsizingRecommendationMetadata)
rightsizingRecommendationMetadata_generationTimestamp :: Lens.Lens' RightsizingRecommendationMetadata (Prelude.Maybe Prelude.Text)
rightsizingRecommendationMetadata_generationTimestamp :: (Maybe Text -> f (Maybe Text))
-> RightsizingRecommendationMetadata
-> f RightsizingRecommendationMetadata
rightsizingRecommendationMetadata_generationTimestamp = (RightsizingRecommendationMetadata -> Maybe Text)
-> (RightsizingRecommendationMetadata
-> Maybe Text -> RightsizingRecommendationMetadata)
-> Lens
RightsizingRecommendationMetadata
RightsizingRecommendationMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RightsizingRecommendationMetadata' {Maybe Text
generationTimestamp :: Maybe Text
$sel:generationTimestamp:RightsizingRecommendationMetadata' :: RightsizingRecommendationMetadata -> Maybe Text
generationTimestamp} -> Maybe Text
generationTimestamp) (\s :: RightsizingRecommendationMetadata
s@RightsizingRecommendationMetadata' {} Maybe Text
a -> RightsizingRecommendationMetadata
s {$sel:generationTimestamp:RightsizingRecommendationMetadata' :: Maybe Text
generationTimestamp = Maybe Text
a} :: RightsizingRecommendationMetadata)
rightsizingRecommendationMetadata_additionalMetadata :: Lens.Lens' RightsizingRecommendationMetadata (Prelude.Maybe Prelude.Text)
rightsizingRecommendationMetadata_additionalMetadata :: (Maybe Text -> f (Maybe Text))
-> RightsizingRecommendationMetadata
-> f RightsizingRecommendationMetadata
rightsizingRecommendationMetadata_additionalMetadata = (RightsizingRecommendationMetadata -> Maybe Text)
-> (RightsizingRecommendationMetadata
-> Maybe Text -> RightsizingRecommendationMetadata)
-> Lens
RightsizingRecommendationMetadata
RightsizingRecommendationMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RightsizingRecommendationMetadata' {Maybe Text
additionalMetadata :: Maybe Text
$sel:additionalMetadata:RightsizingRecommendationMetadata' :: RightsizingRecommendationMetadata -> Maybe Text
additionalMetadata} -> Maybe Text
additionalMetadata) (\s :: RightsizingRecommendationMetadata
s@RightsizingRecommendationMetadata' {} Maybe Text
a -> RightsizingRecommendationMetadata
s {$sel:additionalMetadata:RightsizingRecommendationMetadata' :: Maybe Text
additionalMetadata = Maybe Text
a} :: RightsizingRecommendationMetadata)
rightsizingRecommendationMetadata_lookbackPeriodInDays :: Lens.Lens' RightsizingRecommendationMetadata (Prelude.Maybe LookbackPeriodInDays)
rightsizingRecommendationMetadata_lookbackPeriodInDays :: (Maybe LookbackPeriodInDays -> f (Maybe LookbackPeriodInDays))
-> RightsizingRecommendationMetadata
-> f RightsizingRecommendationMetadata
rightsizingRecommendationMetadata_lookbackPeriodInDays = (RightsizingRecommendationMetadata -> Maybe LookbackPeriodInDays)
-> (RightsizingRecommendationMetadata
-> Maybe LookbackPeriodInDays -> RightsizingRecommendationMetadata)
-> Lens
RightsizingRecommendationMetadata
RightsizingRecommendationMetadata
(Maybe LookbackPeriodInDays)
(Maybe LookbackPeriodInDays)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RightsizingRecommendationMetadata' {Maybe LookbackPeriodInDays
lookbackPeriodInDays :: Maybe LookbackPeriodInDays
$sel:lookbackPeriodInDays:RightsizingRecommendationMetadata' :: RightsizingRecommendationMetadata -> Maybe LookbackPeriodInDays
lookbackPeriodInDays} -> Maybe LookbackPeriodInDays
lookbackPeriodInDays) (\s :: RightsizingRecommendationMetadata
s@RightsizingRecommendationMetadata' {} Maybe LookbackPeriodInDays
a -> RightsizingRecommendationMetadata
s {$sel:lookbackPeriodInDays:RightsizingRecommendationMetadata' :: Maybe LookbackPeriodInDays
lookbackPeriodInDays = Maybe LookbackPeriodInDays
a} :: RightsizingRecommendationMetadata)
instance
Core.FromJSON
RightsizingRecommendationMetadata
where
parseJSON :: Value -> Parser RightsizingRecommendationMetadata
parseJSON =
String
-> (Object -> Parser RightsizingRecommendationMetadata)
-> Value
-> Parser RightsizingRecommendationMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RightsizingRecommendationMetadata"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe LookbackPeriodInDays
-> RightsizingRecommendationMetadata
RightsizingRecommendationMetadata'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe LookbackPeriodInDays
-> RightsizingRecommendationMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe LookbackPeriodInDays
-> RightsizingRecommendationMetadata)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RecommendationId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe LookbackPeriodInDays
-> RightsizingRecommendationMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe LookbackPeriodInDays -> RightsizingRecommendationMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GenerationTimestamp")
Parser
(Maybe Text
-> Maybe LookbackPeriodInDays -> RightsizingRecommendationMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe LookbackPeriodInDays -> RightsizingRecommendationMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AdditionalMetadata")
Parser
(Maybe LookbackPeriodInDays -> RightsizingRecommendationMetadata)
-> Parser (Maybe LookbackPeriodInDays)
-> Parser RightsizingRecommendationMetadata
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LookbackPeriodInDays)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LookbackPeriodInDays")
)
instance
Prelude.Hashable
RightsizingRecommendationMetadata
instance
Prelude.NFData
RightsizingRecommendationMetadata