{-# 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.RDSInstanceDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RDSInstanceDetails = RDSInstanceDetails'
{
RDSInstanceDetails -> Maybe Bool
currentGeneration :: Prelude.Maybe Prelude.Bool,
RDSInstanceDetails -> Maybe Text
deploymentOption :: Prelude.Maybe Prelude.Text,
RDSInstanceDetails -> Maybe Text
family :: Prelude.Maybe Prelude.Text,
RDSInstanceDetails -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
RDSInstanceDetails -> Maybe Text
licenseModel :: Prelude.Maybe Prelude.Text,
RDSInstanceDetails -> Maybe Bool
sizeFlexEligible :: Prelude.Maybe Prelude.Bool,
RDSInstanceDetails -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
RDSInstanceDetails -> Maybe Text
databaseEngine :: Prelude.Maybe Prelude.Text,
RDSInstanceDetails -> Maybe Text
databaseEdition :: Prelude.Maybe Prelude.Text
}
deriving (RDSInstanceDetails -> RDSInstanceDetails -> Bool
(RDSInstanceDetails -> RDSInstanceDetails -> Bool)
-> (RDSInstanceDetails -> RDSInstanceDetails -> Bool)
-> Eq RDSInstanceDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RDSInstanceDetails -> RDSInstanceDetails -> Bool
$c/= :: RDSInstanceDetails -> RDSInstanceDetails -> Bool
== :: RDSInstanceDetails -> RDSInstanceDetails -> Bool
$c== :: RDSInstanceDetails -> RDSInstanceDetails -> Bool
Prelude.Eq, ReadPrec [RDSInstanceDetails]
ReadPrec RDSInstanceDetails
Int -> ReadS RDSInstanceDetails
ReadS [RDSInstanceDetails]
(Int -> ReadS RDSInstanceDetails)
-> ReadS [RDSInstanceDetails]
-> ReadPrec RDSInstanceDetails
-> ReadPrec [RDSInstanceDetails]
-> Read RDSInstanceDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RDSInstanceDetails]
$creadListPrec :: ReadPrec [RDSInstanceDetails]
readPrec :: ReadPrec RDSInstanceDetails
$creadPrec :: ReadPrec RDSInstanceDetails
readList :: ReadS [RDSInstanceDetails]
$creadList :: ReadS [RDSInstanceDetails]
readsPrec :: Int -> ReadS RDSInstanceDetails
$creadsPrec :: Int -> ReadS RDSInstanceDetails
Prelude.Read, Int -> RDSInstanceDetails -> ShowS
[RDSInstanceDetails] -> ShowS
RDSInstanceDetails -> String
(Int -> RDSInstanceDetails -> ShowS)
-> (RDSInstanceDetails -> String)
-> ([RDSInstanceDetails] -> ShowS)
-> Show RDSInstanceDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RDSInstanceDetails] -> ShowS
$cshowList :: [RDSInstanceDetails] -> ShowS
show :: RDSInstanceDetails -> String
$cshow :: RDSInstanceDetails -> String
showsPrec :: Int -> RDSInstanceDetails -> ShowS
$cshowsPrec :: Int -> RDSInstanceDetails -> ShowS
Prelude.Show, (forall x. RDSInstanceDetails -> Rep RDSInstanceDetails x)
-> (forall x. Rep RDSInstanceDetails x -> RDSInstanceDetails)
-> Generic RDSInstanceDetails
forall x. Rep RDSInstanceDetails x -> RDSInstanceDetails
forall x. RDSInstanceDetails -> Rep RDSInstanceDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RDSInstanceDetails x -> RDSInstanceDetails
$cfrom :: forall x. RDSInstanceDetails -> Rep RDSInstanceDetails x
Prelude.Generic)
newRDSInstanceDetails ::
RDSInstanceDetails
newRDSInstanceDetails :: RDSInstanceDetails
newRDSInstanceDetails =
RDSInstanceDetails' :: Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSInstanceDetails
RDSInstanceDetails'
{ $sel:currentGeneration:RDSInstanceDetails' :: Maybe Bool
currentGeneration =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:deploymentOption:RDSInstanceDetails' :: Maybe Text
deploymentOption = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:family:RDSInstanceDetails' :: Maybe Text
family = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:instanceType:RDSInstanceDetails' :: Maybe Text
instanceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:licenseModel:RDSInstanceDetails' :: Maybe Text
licenseModel = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sizeFlexEligible:RDSInstanceDetails' :: Maybe Bool
sizeFlexEligible = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:region:RDSInstanceDetails' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:databaseEngine:RDSInstanceDetails' :: Maybe Text
databaseEngine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:databaseEdition:RDSInstanceDetails' :: Maybe Text
databaseEdition = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
rDSInstanceDetails_currentGeneration :: Lens.Lens' RDSInstanceDetails (Prelude.Maybe Prelude.Bool)
rDSInstanceDetails_currentGeneration :: (Maybe Bool -> f (Maybe Bool))
-> RDSInstanceDetails -> f RDSInstanceDetails
rDSInstanceDetails_currentGeneration = (RDSInstanceDetails -> Maybe Bool)
-> (RDSInstanceDetails -> Maybe Bool -> RDSInstanceDetails)
-> Lens
RDSInstanceDetails RDSInstanceDetails (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSInstanceDetails' {Maybe Bool
currentGeneration :: Maybe Bool
$sel:currentGeneration:RDSInstanceDetails' :: RDSInstanceDetails -> Maybe Bool
currentGeneration} -> Maybe Bool
currentGeneration) (\s :: RDSInstanceDetails
s@RDSInstanceDetails' {} Maybe Bool
a -> RDSInstanceDetails
s {$sel:currentGeneration:RDSInstanceDetails' :: Maybe Bool
currentGeneration = Maybe Bool
a} :: RDSInstanceDetails)
rDSInstanceDetails_deploymentOption :: Lens.Lens' RDSInstanceDetails (Prelude.Maybe Prelude.Text)
rDSInstanceDetails_deploymentOption :: (Maybe Text -> f (Maybe Text))
-> RDSInstanceDetails -> f RDSInstanceDetails
rDSInstanceDetails_deploymentOption = (RDSInstanceDetails -> Maybe Text)
-> (RDSInstanceDetails -> Maybe Text -> RDSInstanceDetails)
-> Lens
RDSInstanceDetails RDSInstanceDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSInstanceDetails' {Maybe Text
deploymentOption :: Maybe Text
$sel:deploymentOption:RDSInstanceDetails' :: RDSInstanceDetails -> Maybe Text
deploymentOption} -> Maybe Text
deploymentOption) (\s :: RDSInstanceDetails
s@RDSInstanceDetails' {} Maybe Text
a -> RDSInstanceDetails
s {$sel:deploymentOption:RDSInstanceDetails' :: Maybe Text
deploymentOption = Maybe Text
a} :: RDSInstanceDetails)
rDSInstanceDetails_family :: Lens.Lens' RDSInstanceDetails (Prelude.Maybe Prelude.Text)
rDSInstanceDetails_family :: (Maybe Text -> f (Maybe Text))
-> RDSInstanceDetails -> f RDSInstanceDetails
rDSInstanceDetails_family = (RDSInstanceDetails -> Maybe Text)
-> (RDSInstanceDetails -> Maybe Text -> RDSInstanceDetails)
-> Lens
RDSInstanceDetails RDSInstanceDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSInstanceDetails' {Maybe Text
family :: Maybe Text
$sel:family:RDSInstanceDetails' :: RDSInstanceDetails -> Maybe Text
family} -> Maybe Text
family) (\s :: RDSInstanceDetails
s@RDSInstanceDetails' {} Maybe Text
a -> RDSInstanceDetails
s {$sel:family:RDSInstanceDetails' :: Maybe Text
family = Maybe Text
a} :: RDSInstanceDetails)
rDSInstanceDetails_instanceType :: Lens.Lens' RDSInstanceDetails (Prelude.Maybe Prelude.Text)
rDSInstanceDetails_instanceType :: (Maybe Text -> f (Maybe Text))
-> RDSInstanceDetails -> f RDSInstanceDetails
rDSInstanceDetails_instanceType = (RDSInstanceDetails -> Maybe Text)
-> (RDSInstanceDetails -> Maybe Text -> RDSInstanceDetails)
-> Lens
RDSInstanceDetails RDSInstanceDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSInstanceDetails' {Maybe Text
instanceType :: Maybe Text
$sel:instanceType:RDSInstanceDetails' :: RDSInstanceDetails -> Maybe Text
instanceType} -> Maybe Text
instanceType) (\s :: RDSInstanceDetails
s@RDSInstanceDetails' {} Maybe Text
a -> RDSInstanceDetails
s {$sel:instanceType:RDSInstanceDetails' :: Maybe Text
instanceType = Maybe Text
a} :: RDSInstanceDetails)
rDSInstanceDetails_licenseModel :: Lens.Lens' RDSInstanceDetails (Prelude.Maybe Prelude.Text)
rDSInstanceDetails_licenseModel :: (Maybe Text -> f (Maybe Text))
-> RDSInstanceDetails -> f RDSInstanceDetails
rDSInstanceDetails_licenseModel = (RDSInstanceDetails -> Maybe Text)
-> (RDSInstanceDetails -> Maybe Text -> RDSInstanceDetails)
-> Lens
RDSInstanceDetails RDSInstanceDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSInstanceDetails' {Maybe Text
licenseModel :: Maybe Text
$sel:licenseModel:RDSInstanceDetails' :: RDSInstanceDetails -> Maybe Text
licenseModel} -> Maybe Text
licenseModel) (\s :: RDSInstanceDetails
s@RDSInstanceDetails' {} Maybe Text
a -> RDSInstanceDetails
s {$sel:licenseModel:RDSInstanceDetails' :: Maybe Text
licenseModel = Maybe Text
a} :: RDSInstanceDetails)
rDSInstanceDetails_sizeFlexEligible :: Lens.Lens' RDSInstanceDetails (Prelude.Maybe Prelude.Bool)
rDSInstanceDetails_sizeFlexEligible :: (Maybe Bool -> f (Maybe Bool))
-> RDSInstanceDetails -> f RDSInstanceDetails
rDSInstanceDetails_sizeFlexEligible = (RDSInstanceDetails -> Maybe Bool)
-> (RDSInstanceDetails -> Maybe Bool -> RDSInstanceDetails)
-> Lens
RDSInstanceDetails RDSInstanceDetails (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSInstanceDetails' {Maybe Bool
sizeFlexEligible :: Maybe Bool
$sel:sizeFlexEligible:RDSInstanceDetails' :: RDSInstanceDetails -> Maybe Bool
sizeFlexEligible} -> Maybe Bool
sizeFlexEligible) (\s :: RDSInstanceDetails
s@RDSInstanceDetails' {} Maybe Bool
a -> RDSInstanceDetails
s {$sel:sizeFlexEligible:RDSInstanceDetails' :: Maybe Bool
sizeFlexEligible = Maybe Bool
a} :: RDSInstanceDetails)
rDSInstanceDetails_region :: Lens.Lens' RDSInstanceDetails (Prelude.Maybe Prelude.Text)
rDSInstanceDetails_region :: (Maybe Text -> f (Maybe Text))
-> RDSInstanceDetails -> f RDSInstanceDetails
rDSInstanceDetails_region = (RDSInstanceDetails -> Maybe Text)
-> (RDSInstanceDetails -> Maybe Text -> RDSInstanceDetails)
-> Lens
RDSInstanceDetails RDSInstanceDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSInstanceDetails' {Maybe Text
region :: Maybe Text
$sel:region:RDSInstanceDetails' :: RDSInstanceDetails -> Maybe Text
region} -> Maybe Text
region) (\s :: RDSInstanceDetails
s@RDSInstanceDetails' {} Maybe Text
a -> RDSInstanceDetails
s {$sel:region:RDSInstanceDetails' :: Maybe Text
region = Maybe Text
a} :: RDSInstanceDetails)
rDSInstanceDetails_databaseEngine :: Lens.Lens' RDSInstanceDetails (Prelude.Maybe Prelude.Text)
rDSInstanceDetails_databaseEngine :: (Maybe Text -> f (Maybe Text))
-> RDSInstanceDetails -> f RDSInstanceDetails
rDSInstanceDetails_databaseEngine = (RDSInstanceDetails -> Maybe Text)
-> (RDSInstanceDetails -> Maybe Text -> RDSInstanceDetails)
-> Lens
RDSInstanceDetails RDSInstanceDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSInstanceDetails' {Maybe Text
databaseEngine :: Maybe Text
$sel:databaseEngine:RDSInstanceDetails' :: RDSInstanceDetails -> Maybe Text
databaseEngine} -> Maybe Text
databaseEngine) (\s :: RDSInstanceDetails
s@RDSInstanceDetails' {} Maybe Text
a -> RDSInstanceDetails
s {$sel:databaseEngine:RDSInstanceDetails' :: Maybe Text
databaseEngine = Maybe Text
a} :: RDSInstanceDetails)
rDSInstanceDetails_databaseEdition :: Lens.Lens' RDSInstanceDetails (Prelude.Maybe Prelude.Text)
rDSInstanceDetails_databaseEdition :: (Maybe Text -> f (Maybe Text))
-> RDSInstanceDetails -> f RDSInstanceDetails
rDSInstanceDetails_databaseEdition = (RDSInstanceDetails -> Maybe Text)
-> (RDSInstanceDetails -> Maybe Text -> RDSInstanceDetails)
-> Lens
RDSInstanceDetails RDSInstanceDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RDSInstanceDetails' {Maybe Text
databaseEdition :: Maybe Text
$sel:databaseEdition:RDSInstanceDetails' :: RDSInstanceDetails -> Maybe Text
databaseEdition} -> Maybe Text
databaseEdition) (\s :: RDSInstanceDetails
s@RDSInstanceDetails' {} Maybe Text
a -> RDSInstanceDetails
s {$sel:databaseEdition:RDSInstanceDetails' :: Maybe Text
databaseEdition = Maybe Text
a} :: RDSInstanceDetails)
instance Core.FromJSON RDSInstanceDetails where
parseJSON :: Value -> Parser RDSInstanceDetails
parseJSON =
String
-> (Object -> Parser RDSInstanceDetails)
-> Value
-> Parser RDSInstanceDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RDSInstanceDetails"
( \Object
x ->
Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSInstanceDetails
RDSInstanceDetails'
(Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSInstanceDetails)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSInstanceDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CurrentGeneration")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSInstanceDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSInstanceDetails)
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
"DeploymentOption")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSInstanceDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSInstanceDetails)
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
"Family")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSInstanceDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSInstanceDetails)
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
"InstanceType")
Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RDSInstanceDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text -> Maybe Text -> Maybe Text -> RDSInstanceDetails)
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
"LicenseModel")
Parser
(Maybe Bool
-> Maybe Text -> Maybe Text -> Maybe Text -> RDSInstanceDetails)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> RDSInstanceDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SizeFlexEligible")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> RDSInstanceDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> RDSInstanceDetails)
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
"Region")
Parser (Maybe Text -> Maybe Text -> RDSInstanceDetails)
-> Parser (Maybe Text) -> Parser (Maybe Text -> RDSInstanceDetails)
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
"DatabaseEngine")
Parser (Maybe Text -> RDSInstanceDetails)
-> Parser (Maybe Text) -> Parser RDSInstanceDetails
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
"DatabaseEdition")
)
instance Prelude.Hashable RDSInstanceDetails
instance Prelude.NFData RDSInstanceDetails