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