{-# 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.ComputeOptimizer.Types.CurrentPerformanceRiskRatings where
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 CurrentPerformanceRiskRatings = CurrentPerformanceRiskRatings'
{
CurrentPerformanceRiskRatings -> Maybe Integer
high :: Prelude.Maybe Prelude.Integer,
CurrentPerformanceRiskRatings -> Maybe Integer
low :: Prelude.Maybe Prelude.Integer,
CurrentPerformanceRiskRatings -> Maybe Integer
medium :: Prelude.Maybe Prelude.Integer,
CurrentPerformanceRiskRatings -> Maybe Integer
veryLow :: Prelude.Maybe Prelude.Integer
}
deriving (CurrentPerformanceRiskRatings
-> CurrentPerformanceRiskRatings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CurrentPerformanceRiskRatings
-> CurrentPerformanceRiskRatings -> Bool
$c/= :: CurrentPerformanceRiskRatings
-> CurrentPerformanceRiskRatings -> Bool
== :: CurrentPerformanceRiskRatings
-> CurrentPerformanceRiskRatings -> Bool
$c== :: CurrentPerformanceRiskRatings
-> CurrentPerformanceRiskRatings -> Bool
Prelude.Eq, ReadPrec [CurrentPerformanceRiskRatings]
ReadPrec CurrentPerformanceRiskRatings
Int -> ReadS CurrentPerformanceRiskRatings
ReadS [CurrentPerformanceRiskRatings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CurrentPerformanceRiskRatings]
$creadListPrec :: ReadPrec [CurrentPerformanceRiskRatings]
readPrec :: ReadPrec CurrentPerformanceRiskRatings
$creadPrec :: ReadPrec CurrentPerformanceRiskRatings
readList :: ReadS [CurrentPerformanceRiskRatings]
$creadList :: ReadS [CurrentPerformanceRiskRatings]
readsPrec :: Int -> ReadS CurrentPerformanceRiskRatings
$creadsPrec :: Int -> ReadS CurrentPerformanceRiskRatings
Prelude.Read, Int -> CurrentPerformanceRiskRatings -> ShowS
[CurrentPerformanceRiskRatings] -> ShowS
CurrentPerformanceRiskRatings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CurrentPerformanceRiskRatings] -> ShowS
$cshowList :: [CurrentPerformanceRiskRatings] -> ShowS
show :: CurrentPerformanceRiskRatings -> String
$cshow :: CurrentPerformanceRiskRatings -> String
showsPrec :: Int -> CurrentPerformanceRiskRatings -> ShowS
$cshowsPrec :: Int -> CurrentPerformanceRiskRatings -> ShowS
Prelude.Show, forall x.
Rep CurrentPerformanceRiskRatings x
-> CurrentPerformanceRiskRatings
forall x.
CurrentPerformanceRiskRatings
-> Rep CurrentPerformanceRiskRatings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CurrentPerformanceRiskRatings x
-> CurrentPerformanceRiskRatings
$cfrom :: forall x.
CurrentPerformanceRiskRatings
-> Rep CurrentPerformanceRiskRatings x
Prelude.Generic)
newCurrentPerformanceRiskRatings ::
CurrentPerformanceRiskRatings
newCurrentPerformanceRiskRatings :: CurrentPerformanceRiskRatings
newCurrentPerformanceRiskRatings =
CurrentPerformanceRiskRatings'
{ $sel:high:CurrentPerformanceRiskRatings' :: Maybe Integer
high =
forall a. Maybe a
Prelude.Nothing,
$sel:low:CurrentPerformanceRiskRatings' :: Maybe Integer
low = forall a. Maybe a
Prelude.Nothing,
$sel:medium:CurrentPerformanceRiskRatings' :: Maybe Integer
medium = forall a. Maybe a
Prelude.Nothing,
$sel:veryLow:CurrentPerformanceRiskRatings' :: Maybe Integer
veryLow = forall a. Maybe a
Prelude.Nothing
}
currentPerformanceRiskRatings_high :: Lens.Lens' CurrentPerformanceRiskRatings (Prelude.Maybe Prelude.Integer)
currentPerformanceRiskRatings_high :: Lens' CurrentPerformanceRiskRatings (Maybe Integer)
currentPerformanceRiskRatings_high = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CurrentPerformanceRiskRatings' {Maybe Integer
high :: Maybe Integer
$sel:high:CurrentPerformanceRiskRatings' :: CurrentPerformanceRiskRatings -> Maybe Integer
high} -> Maybe Integer
high) (\s :: CurrentPerformanceRiskRatings
s@CurrentPerformanceRiskRatings' {} Maybe Integer
a -> CurrentPerformanceRiskRatings
s {$sel:high:CurrentPerformanceRiskRatings' :: Maybe Integer
high = Maybe Integer
a} :: CurrentPerformanceRiskRatings)
currentPerformanceRiskRatings_low :: Lens.Lens' CurrentPerformanceRiskRatings (Prelude.Maybe Prelude.Integer)
currentPerformanceRiskRatings_low :: Lens' CurrentPerformanceRiskRatings (Maybe Integer)
currentPerformanceRiskRatings_low = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CurrentPerformanceRiskRatings' {Maybe Integer
low :: Maybe Integer
$sel:low:CurrentPerformanceRiskRatings' :: CurrentPerformanceRiskRatings -> Maybe Integer
low} -> Maybe Integer
low) (\s :: CurrentPerformanceRiskRatings
s@CurrentPerformanceRiskRatings' {} Maybe Integer
a -> CurrentPerformanceRiskRatings
s {$sel:low:CurrentPerformanceRiskRatings' :: Maybe Integer
low = Maybe Integer
a} :: CurrentPerformanceRiskRatings)
currentPerformanceRiskRatings_medium :: Lens.Lens' CurrentPerformanceRiskRatings (Prelude.Maybe Prelude.Integer)
currentPerformanceRiskRatings_medium :: Lens' CurrentPerformanceRiskRatings (Maybe Integer)
currentPerformanceRiskRatings_medium = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CurrentPerformanceRiskRatings' {Maybe Integer
medium :: Maybe Integer
$sel:medium:CurrentPerformanceRiskRatings' :: CurrentPerformanceRiskRatings -> Maybe Integer
medium} -> Maybe Integer
medium) (\s :: CurrentPerformanceRiskRatings
s@CurrentPerformanceRiskRatings' {} Maybe Integer
a -> CurrentPerformanceRiskRatings
s {$sel:medium:CurrentPerformanceRiskRatings' :: Maybe Integer
medium = Maybe Integer
a} :: CurrentPerformanceRiskRatings)
currentPerformanceRiskRatings_veryLow :: Lens.Lens' CurrentPerformanceRiskRatings (Prelude.Maybe Prelude.Integer)
currentPerformanceRiskRatings_veryLow :: Lens' CurrentPerformanceRiskRatings (Maybe Integer)
currentPerformanceRiskRatings_veryLow = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CurrentPerformanceRiskRatings' {Maybe Integer
veryLow :: Maybe Integer
$sel:veryLow:CurrentPerformanceRiskRatings' :: CurrentPerformanceRiskRatings -> Maybe Integer
veryLow} -> Maybe Integer
veryLow) (\s :: CurrentPerformanceRiskRatings
s@CurrentPerformanceRiskRatings' {} Maybe Integer
a -> CurrentPerformanceRiskRatings
s {$sel:veryLow:CurrentPerformanceRiskRatings' :: Maybe Integer
veryLow = Maybe Integer
a} :: CurrentPerformanceRiskRatings)
instance Data.FromJSON CurrentPerformanceRiskRatings where
parseJSON :: Value -> Parser CurrentPerformanceRiskRatings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CurrentPerformanceRiskRatings"
( \Object
x ->
Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> CurrentPerformanceRiskRatings
CurrentPerformanceRiskRatings'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"high")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"low")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"medium")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"veryLow")
)
instance
Prelude.Hashable
CurrentPerformanceRiskRatings
where
hashWithSalt :: Int -> CurrentPerformanceRiskRatings -> Int
hashWithSalt Int
_salt CurrentPerformanceRiskRatings' {Maybe Integer
veryLow :: Maybe Integer
medium :: Maybe Integer
low :: Maybe Integer
high :: Maybe Integer
$sel:veryLow:CurrentPerformanceRiskRatings' :: CurrentPerformanceRiskRatings -> Maybe Integer
$sel:medium:CurrentPerformanceRiskRatings' :: CurrentPerformanceRiskRatings -> Maybe Integer
$sel:low:CurrentPerformanceRiskRatings' :: CurrentPerformanceRiskRatings -> Maybe Integer
$sel:high:CurrentPerformanceRiskRatings' :: CurrentPerformanceRiskRatings -> Maybe Integer
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
high
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
low
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
medium
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
veryLow
instance Prelude.NFData CurrentPerformanceRiskRatings where
rnf :: CurrentPerformanceRiskRatings -> ()
rnf CurrentPerformanceRiskRatings' {Maybe Integer
veryLow :: Maybe Integer
medium :: Maybe Integer
low :: Maybe Integer
high :: Maybe Integer
$sel:veryLow:CurrentPerformanceRiskRatings' :: CurrentPerformanceRiskRatings -> Maybe Integer
$sel:medium:CurrentPerformanceRiskRatings' :: CurrentPerformanceRiskRatings -> Maybe Integer
$sel:low:CurrentPerformanceRiskRatings' :: CurrentPerformanceRiskRatings -> Maybe Integer
$sel:high:CurrentPerformanceRiskRatings' :: CurrentPerformanceRiskRatings -> Maybe Integer
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
high
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
low
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
medium
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
veryLow