{-# 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.RedshiftInstanceDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data RedshiftInstanceDetails = RedshiftInstanceDetails'
{
RedshiftInstanceDetails -> Maybe Bool
currentGeneration :: Prelude.Maybe Prelude.Bool,
RedshiftInstanceDetails -> Maybe Text
family :: Prelude.Maybe Prelude.Text,
RedshiftInstanceDetails -> Maybe Bool
sizeFlexEligible :: Prelude.Maybe Prelude.Bool,
RedshiftInstanceDetails -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
RedshiftInstanceDetails -> Maybe Text
nodeType :: Prelude.Maybe Prelude.Text
}
deriving (RedshiftInstanceDetails -> RedshiftInstanceDetails -> Bool
(RedshiftInstanceDetails -> RedshiftInstanceDetails -> Bool)
-> (RedshiftInstanceDetails -> RedshiftInstanceDetails -> Bool)
-> Eq RedshiftInstanceDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RedshiftInstanceDetails -> RedshiftInstanceDetails -> Bool
$c/= :: RedshiftInstanceDetails -> RedshiftInstanceDetails -> Bool
== :: RedshiftInstanceDetails -> RedshiftInstanceDetails -> Bool
$c== :: RedshiftInstanceDetails -> RedshiftInstanceDetails -> Bool
Prelude.Eq, ReadPrec [RedshiftInstanceDetails]
ReadPrec RedshiftInstanceDetails
Int -> ReadS RedshiftInstanceDetails
ReadS [RedshiftInstanceDetails]
(Int -> ReadS RedshiftInstanceDetails)
-> ReadS [RedshiftInstanceDetails]
-> ReadPrec RedshiftInstanceDetails
-> ReadPrec [RedshiftInstanceDetails]
-> Read RedshiftInstanceDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RedshiftInstanceDetails]
$creadListPrec :: ReadPrec [RedshiftInstanceDetails]
readPrec :: ReadPrec RedshiftInstanceDetails
$creadPrec :: ReadPrec RedshiftInstanceDetails
readList :: ReadS [RedshiftInstanceDetails]
$creadList :: ReadS [RedshiftInstanceDetails]
readsPrec :: Int -> ReadS RedshiftInstanceDetails
$creadsPrec :: Int -> ReadS RedshiftInstanceDetails
Prelude.Read, Int -> RedshiftInstanceDetails -> ShowS
[RedshiftInstanceDetails] -> ShowS
RedshiftInstanceDetails -> String
(Int -> RedshiftInstanceDetails -> ShowS)
-> (RedshiftInstanceDetails -> String)
-> ([RedshiftInstanceDetails] -> ShowS)
-> Show RedshiftInstanceDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RedshiftInstanceDetails] -> ShowS
$cshowList :: [RedshiftInstanceDetails] -> ShowS
show :: RedshiftInstanceDetails -> String
$cshow :: RedshiftInstanceDetails -> String
showsPrec :: Int -> RedshiftInstanceDetails -> ShowS
$cshowsPrec :: Int -> RedshiftInstanceDetails -> ShowS
Prelude.Show, (forall x.
RedshiftInstanceDetails -> Rep RedshiftInstanceDetails x)
-> (forall x.
Rep RedshiftInstanceDetails x -> RedshiftInstanceDetails)
-> Generic RedshiftInstanceDetails
forall x. Rep RedshiftInstanceDetails x -> RedshiftInstanceDetails
forall x. RedshiftInstanceDetails -> Rep RedshiftInstanceDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RedshiftInstanceDetails x -> RedshiftInstanceDetails
$cfrom :: forall x. RedshiftInstanceDetails -> Rep RedshiftInstanceDetails x
Prelude.Generic)
newRedshiftInstanceDetails ::
RedshiftInstanceDetails
newRedshiftInstanceDetails :: RedshiftInstanceDetails
newRedshiftInstanceDetails =
RedshiftInstanceDetails' :: Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> RedshiftInstanceDetails
RedshiftInstanceDetails'
{ $sel:currentGeneration:RedshiftInstanceDetails' :: Maybe Bool
currentGeneration =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:family:RedshiftInstanceDetails' :: Maybe Text
family = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sizeFlexEligible:RedshiftInstanceDetails' :: Maybe Bool
sizeFlexEligible = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:region:RedshiftInstanceDetails' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nodeType:RedshiftInstanceDetails' :: Maybe Text
nodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
redshiftInstanceDetails_currentGeneration :: Lens.Lens' RedshiftInstanceDetails (Prelude.Maybe Prelude.Bool)
redshiftInstanceDetails_currentGeneration :: (Maybe Bool -> f (Maybe Bool))
-> RedshiftInstanceDetails -> f RedshiftInstanceDetails
redshiftInstanceDetails_currentGeneration = (RedshiftInstanceDetails -> Maybe Bool)
-> (RedshiftInstanceDetails
-> Maybe Bool -> RedshiftInstanceDetails)
-> Lens
RedshiftInstanceDetails
RedshiftInstanceDetails
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftInstanceDetails' {Maybe Bool
currentGeneration :: Maybe Bool
$sel:currentGeneration:RedshiftInstanceDetails' :: RedshiftInstanceDetails -> Maybe Bool
currentGeneration} -> Maybe Bool
currentGeneration) (\s :: RedshiftInstanceDetails
s@RedshiftInstanceDetails' {} Maybe Bool
a -> RedshiftInstanceDetails
s {$sel:currentGeneration:RedshiftInstanceDetails' :: Maybe Bool
currentGeneration = Maybe Bool
a} :: RedshiftInstanceDetails)
redshiftInstanceDetails_family :: Lens.Lens' RedshiftInstanceDetails (Prelude.Maybe Prelude.Text)
redshiftInstanceDetails_family :: (Maybe Text -> f (Maybe Text))
-> RedshiftInstanceDetails -> f RedshiftInstanceDetails
redshiftInstanceDetails_family = (RedshiftInstanceDetails -> Maybe Text)
-> (RedshiftInstanceDetails
-> Maybe Text -> RedshiftInstanceDetails)
-> Lens
RedshiftInstanceDetails
RedshiftInstanceDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftInstanceDetails' {Maybe Text
family :: Maybe Text
$sel:family:RedshiftInstanceDetails' :: RedshiftInstanceDetails -> Maybe Text
family} -> Maybe Text
family) (\s :: RedshiftInstanceDetails
s@RedshiftInstanceDetails' {} Maybe Text
a -> RedshiftInstanceDetails
s {$sel:family:RedshiftInstanceDetails' :: Maybe Text
family = Maybe Text
a} :: RedshiftInstanceDetails)
redshiftInstanceDetails_sizeFlexEligible :: Lens.Lens' RedshiftInstanceDetails (Prelude.Maybe Prelude.Bool)
redshiftInstanceDetails_sizeFlexEligible :: (Maybe Bool -> f (Maybe Bool))
-> RedshiftInstanceDetails -> f RedshiftInstanceDetails
redshiftInstanceDetails_sizeFlexEligible = (RedshiftInstanceDetails -> Maybe Bool)
-> (RedshiftInstanceDetails
-> Maybe Bool -> RedshiftInstanceDetails)
-> Lens
RedshiftInstanceDetails
RedshiftInstanceDetails
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftInstanceDetails' {Maybe Bool
sizeFlexEligible :: Maybe Bool
$sel:sizeFlexEligible:RedshiftInstanceDetails' :: RedshiftInstanceDetails -> Maybe Bool
sizeFlexEligible} -> Maybe Bool
sizeFlexEligible) (\s :: RedshiftInstanceDetails
s@RedshiftInstanceDetails' {} Maybe Bool
a -> RedshiftInstanceDetails
s {$sel:sizeFlexEligible:RedshiftInstanceDetails' :: Maybe Bool
sizeFlexEligible = Maybe Bool
a} :: RedshiftInstanceDetails)
redshiftInstanceDetails_region :: Lens.Lens' RedshiftInstanceDetails (Prelude.Maybe Prelude.Text)
redshiftInstanceDetails_region :: (Maybe Text -> f (Maybe Text))
-> RedshiftInstanceDetails -> f RedshiftInstanceDetails
redshiftInstanceDetails_region = (RedshiftInstanceDetails -> Maybe Text)
-> (RedshiftInstanceDetails
-> Maybe Text -> RedshiftInstanceDetails)
-> Lens
RedshiftInstanceDetails
RedshiftInstanceDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftInstanceDetails' {Maybe Text
region :: Maybe Text
$sel:region:RedshiftInstanceDetails' :: RedshiftInstanceDetails -> Maybe Text
region} -> Maybe Text
region) (\s :: RedshiftInstanceDetails
s@RedshiftInstanceDetails' {} Maybe Text
a -> RedshiftInstanceDetails
s {$sel:region:RedshiftInstanceDetails' :: Maybe Text
region = Maybe Text
a} :: RedshiftInstanceDetails)
redshiftInstanceDetails_nodeType :: Lens.Lens' RedshiftInstanceDetails (Prelude.Maybe Prelude.Text)
redshiftInstanceDetails_nodeType :: (Maybe Text -> f (Maybe Text))
-> RedshiftInstanceDetails -> f RedshiftInstanceDetails
redshiftInstanceDetails_nodeType = (RedshiftInstanceDetails -> Maybe Text)
-> (RedshiftInstanceDetails
-> Maybe Text -> RedshiftInstanceDetails)
-> Lens
RedshiftInstanceDetails
RedshiftInstanceDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RedshiftInstanceDetails' {Maybe Text
nodeType :: Maybe Text
$sel:nodeType:RedshiftInstanceDetails' :: RedshiftInstanceDetails -> Maybe Text
nodeType} -> Maybe Text
nodeType) (\s :: RedshiftInstanceDetails
s@RedshiftInstanceDetails' {} Maybe Text
a -> RedshiftInstanceDetails
s {$sel:nodeType:RedshiftInstanceDetails' :: Maybe Text
nodeType = Maybe Text
a} :: RedshiftInstanceDetails)
instance Core.FromJSON RedshiftInstanceDetails where
parseJSON :: Value -> Parser RedshiftInstanceDetails
parseJSON =
String
-> (Object -> Parser RedshiftInstanceDetails)
-> Value
-> Parser RedshiftInstanceDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"RedshiftInstanceDetails"
( \Object
x ->
Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> RedshiftInstanceDetails
RedshiftInstanceDetails'
(Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> RedshiftInstanceDetails)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> RedshiftInstanceDetails)
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 Bool
-> Maybe Text
-> Maybe Text
-> RedshiftInstanceDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool -> Maybe Text -> Maybe Text -> RedshiftInstanceDetails)
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 Bool -> Maybe Text -> Maybe Text -> RedshiftInstanceDetails)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Maybe Text -> RedshiftInstanceDetails)
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 -> RedshiftInstanceDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> RedshiftInstanceDetails)
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 -> RedshiftInstanceDetails)
-> Parser (Maybe Text) -> Parser RedshiftInstanceDetails
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
"NodeType")
)
instance Prelude.Hashable RedshiftInstanceDetails
instance Prelude.NFData RedshiftInstanceDetails