{-# 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.VolumeConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VolumeConfiguration = VolumeConfiguration'
{
VolumeConfiguration -> Maybe Int
volumeSize :: Prelude.Maybe Prelude.Int,
VolumeConfiguration -> Maybe Int
volumeBaselineIOPS :: Prelude.Maybe Prelude.Int,
VolumeConfiguration -> Maybe Int
volumeBurstIOPS :: Prelude.Maybe Prelude.Int,
VolumeConfiguration -> Maybe Text
volumeType :: Prelude.Maybe Prelude.Text,
VolumeConfiguration -> Maybe Int
volumeBurstThroughput :: Prelude.Maybe Prelude.Int,
VolumeConfiguration -> Maybe Int
volumeBaselineThroughput :: Prelude.Maybe Prelude.Int
}
deriving (VolumeConfiguration -> VolumeConfiguration -> Bool
(VolumeConfiguration -> VolumeConfiguration -> Bool)
-> (VolumeConfiguration -> VolumeConfiguration -> Bool)
-> Eq VolumeConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VolumeConfiguration -> VolumeConfiguration -> Bool
$c/= :: VolumeConfiguration -> VolumeConfiguration -> Bool
== :: VolumeConfiguration -> VolumeConfiguration -> Bool
$c== :: VolumeConfiguration -> VolumeConfiguration -> Bool
Prelude.Eq, ReadPrec [VolumeConfiguration]
ReadPrec VolumeConfiguration
Int -> ReadS VolumeConfiguration
ReadS [VolumeConfiguration]
(Int -> ReadS VolumeConfiguration)
-> ReadS [VolumeConfiguration]
-> ReadPrec VolumeConfiguration
-> ReadPrec [VolumeConfiguration]
-> Read VolumeConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VolumeConfiguration]
$creadListPrec :: ReadPrec [VolumeConfiguration]
readPrec :: ReadPrec VolumeConfiguration
$creadPrec :: ReadPrec VolumeConfiguration
readList :: ReadS [VolumeConfiguration]
$creadList :: ReadS [VolumeConfiguration]
readsPrec :: Int -> ReadS VolumeConfiguration
$creadsPrec :: Int -> ReadS VolumeConfiguration
Prelude.Read, Int -> VolumeConfiguration -> ShowS
[VolumeConfiguration] -> ShowS
VolumeConfiguration -> String
(Int -> VolumeConfiguration -> ShowS)
-> (VolumeConfiguration -> String)
-> ([VolumeConfiguration] -> ShowS)
-> Show VolumeConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VolumeConfiguration] -> ShowS
$cshowList :: [VolumeConfiguration] -> ShowS
show :: VolumeConfiguration -> String
$cshow :: VolumeConfiguration -> String
showsPrec :: Int -> VolumeConfiguration -> ShowS
$cshowsPrec :: Int -> VolumeConfiguration -> ShowS
Prelude.Show, (forall x. VolumeConfiguration -> Rep VolumeConfiguration x)
-> (forall x. Rep VolumeConfiguration x -> VolumeConfiguration)
-> Generic VolumeConfiguration
forall x. Rep VolumeConfiguration x -> VolumeConfiguration
forall x. VolumeConfiguration -> Rep VolumeConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VolumeConfiguration x -> VolumeConfiguration
$cfrom :: forall x. VolumeConfiguration -> Rep VolumeConfiguration x
Prelude.Generic)
newVolumeConfiguration ::
VolumeConfiguration
newVolumeConfiguration :: VolumeConfiguration
newVolumeConfiguration =
VolumeConfiguration' :: Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> VolumeConfiguration
VolumeConfiguration'
{ $sel:volumeSize:VolumeConfiguration' :: Maybe Int
volumeSize = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:volumeBaselineIOPS:VolumeConfiguration' :: Maybe Int
volumeBaselineIOPS = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:volumeBurstIOPS:VolumeConfiguration' :: Maybe Int
volumeBurstIOPS = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:volumeType:VolumeConfiguration' :: Maybe Text
volumeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:volumeBurstThroughput:VolumeConfiguration' :: Maybe Int
volumeBurstThroughput = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:volumeBaselineThroughput:VolumeConfiguration' :: Maybe Int
volumeBaselineThroughput = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
volumeConfiguration_volumeSize :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Int)
volumeConfiguration_volumeSize :: (Maybe Int -> f (Maybe Int))
-> VolumeConfiguration -> f VolumeConfiguration
volumeConfiguration_volumeSize = (VolumeConfiguration -> Maybe Int)
-> (VolumeConfiguration -> Maybe Int -> VolumeConfiguration)
-> Lens
VolumeConfiguration VolumeConfiguration (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeConfiguration' {Maybe Int
volumeSize :: Maybe Int
$sel:volumeSize:VolumeConfiguration' :: VolumeConfiguration -> Maybe Int
volumeSize} -> Maybe Int
volumeSize) (\s :: VolumeConfiguration
s@VolumeConfiguration' {} Maybe Int
a -> VolumeConfiguration
s {$sel:volumeSize:VolumeConfiguration' :: Maybe Int
volumeSize = Maybe Int
a} :: VolumeConfiguration)
volumeConfiguration_volumeBaselineIOPS :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Int)
volumeConfiguration_volumeBaselineIOPS :: (Maybe Int -> f (Maybe Int))
-> VolumeConfiguration -> f VolumeConfiguration
volumeConfiguration_volumeBaselineIOPS = (VolumeConfiguration -> Maybe Int)
-> (VolumeConfiguration -> Maybe Int -> VolumeConfiguration)
-> Lens
VolumeConfiguration VolumeConfiguration (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeConfiguration' {Maybe Int
volumeBaselineIOPS :: Maybe Int
$sel:volumeBaselineIOPS:VolumeConfiguration' :: VolumeConfiguration -> Maybe Int
volumeBaselineIOPS} -> Maybe Int
volumeBaselineIOPS) (\s :: VolumeConfiguration
s@VolumeConfiguration' {} Maybe Int
a -> VolumeConfiguration
s {$sel:volumeBaselineIOPS:VolumeConfiguration' :: Maybe Int
volumeBaselineIOPS = Maybe Int
a} :: VolumeConfiguration)
volumeConfiguration_volumeBurstIOPS :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Int)
volumeConfiguration_volumeBurstIOPS :: (Maybe Int -> f (Maybe Int))
-> VolumeConfiguration -> f VolumeConfiguration
volumeConfiguration_volumeBurstIOPS = (VolumeConfiguration -> Maybe Int)
-> (VolumeConfiguration -> Maybe Int -> VolumeConfiguration)
-> Lens
VolumeConfiguration VolumeConfiguration (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeConfiguration' {Maybe Int
volumeBurstIOPS :: Maybe Int
$sel:volumeBurstIOPS:VolumeConfiguration' :: VolumeConfiguration -> Maybe Int
volumeBurstIOPS} -> Maybe Int
volumeBurstIOPS) (\s :: VolumeConfiguration
s@VolumeConfiguration' {} Maybe Int
a -> VolumeConfiguration
s {$sel:volumeBurstIOPS:VolumeConfiguration' :: Maybe Int
volumeBurstIOPS = Maybe Int
a} :: VolumeConfiguration)
volumeConfiguration_volumeType :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Text)
volumeConfiguration_volumeType :: (Maybe Text -> f (Maybe Text))
-> VolumeConfiguration -> f VolumeConfiguration
volumeConfiguration_volumeType = (VolumeConfiguration -> Maybe Text)
-> (VolumeConfiguration -> Maybe Text -> VolumeConfiguration)
-> Lens
VolumeConfiguration VolumeConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeConfiguration' {Maybe Text
volumeType :: Maybe Text
$sel:volumeType:VolumeConfiguration' :: VolumeConfiguration -> Maybe Text
volumeType} -> Maybe Text
volumeType) (\s :: VolumeConfiguration
s@VolumeConfiguration' {} Maybe Text
a -> VolumeConfiguration
s {$sel:volumeType:VolumeConfiguration' :: Maybe Text
volumeType = Maybe Text
a} :: VolumeConfiguration)
volumeConfiguration_volumeBurstThroughput :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Int)
volumeConfiguration_volumeBurstThroughput :: (Maybe Int -> f (Maybe Int))
-> VolumeConfiguration -> f VolumeConfiguration
volumeConfiguration_volumeBurstThroughput = (VolumeConfiguration -> Maybe Int)
-> (VolumeConfiguration -> Maybe Int -> VolumeConfiguration)
-> Lens
VolumeConfiguration VolumeConfiguration (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeConfiguration' {Maybe Int
volumeBurstThroughput :: Maybe Int
$sel:volumeBurstThroughput:VolumeConfiguration' :: VolumeConfiguration -> Maybe Int
volumeBurstThroughput} -> Maybe Int
volumeBurstThroughput) (\s :: VolumeConfiguration
s@VolumeConfiguration' {} Maybe Int
a -> VolumeConfiguration
s {$sel:volumeBurstThroughput:VolumeConfiguration' :: Maybe Int
volumeBurstThroughput = Maybe Int
a} :: VolumeConfiguration)
volumeConfiguration_volumeBaselineThroughput :: Lens.Lens' VolumeConfiguration (Prelude.Maybe Prelude.Int)
volumeConfiguration_volumeBaselineThroughput :: (Maybe Int -> f (Maybe Int))
-> VolumeConfiguration -> f VolumeConfiguration
volumeConfiguration_volumeBaselineThroughput = (VolumeConfiguration -> Maybe Int)
-> (VolumeConfiguration -> Maybe Int -> VolumeConfiguration)
-> Lens
VolumeConfiguration VolumeConfiguration (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VolumeConfiguration' {Maybe Int
volumeBaselineThroughput :: Maybe Int
$sel:volumeBaselineThroughput:VolumeConfiguration' :: VolumeConfiguration -> Maybe Int
volumeBaselineThroughput} -> Maybe Int
volumeBaselineThroughput) (\s :: VolumeConfiguration
s@VolumeConfiguration' {} Maybe Int
a -> VolumeConfiguration
s {$sel:volumeBaselineThroughput:VolumeConfiguration' :: Maybe Int
volumeBaselineThroughput = Maybe Int
a} :: VolumeConfiguration)
instance Core.FromJSON VolumeConfiguration where
parseJSON :: Value -> Parser VolumeConfiguration
parseJSON =
String
-> (Object -> Parser VolumeConfiguration)
-> Value
-> Parser VolumeConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VolumeConfiguration"
( \Object
x ->
Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> VolumeConfiguration
VolumeConfiguration'
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> VolumeConfiguration)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> VolumeConfiguration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"volumeSize")
Parser
(Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> VolumeConfiguration)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Text -> Maybe Int -> Maybe Int -> VolumeConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"volumeBaselineIOPS")
Parser
(Maybe Int
-> Maybe Text -> Maybe Int -> Maybe Int -> VolumeConfiguration)
-> Parser (Maybe Int)
-> Parser
(Maybe Text -> Maybe Int -> Maybe Int -> VolumeConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"volumeBurstIOPS")
Parser
(Maybe Text -> Maybe Int -> Maybe Int -> VolumeConfiguration)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> Maybe Int -> VolumeConfiguration)
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
"volumeType")
Parser (Maybe Int -> Maybe Int -> VolumeConfiguration)
-> Parser (Maybe Int) -> Parser (Maybe Int -> VolumeConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"volumeBurstThroughput")
Parser (Maybe Int -> VolumeConfiguration)
-> Parser (Maybe Int) -> Parser VolumeConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"volumeBaselineThroughput")
)
instance Prelude.Hashable VolumeConfiguration
instance Prelude.NFData VolumeConfiguration