{-# 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.EMR.Types.ClusterSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EMR.Types.ClusterStatus
import qualified Amazonka.Prelude as Prelude
data ClusterSummary = ClusterSummary'
{
ClusterSummary -> Maybe Text
clusterArn :: Prelude.Maybe Prelude.Text,
ClusterSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
ClusterSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ClusterSummary -> Maybe Int
normalizedInstanceHours :: Prelude.Maybe Prelude.Int,
ClusterSummary -> Maybe Text
outpostArn :: Prelude.Maybe Prelude.Text,
ClusterSummary -> Maybe ClusterStatus
status :: Prelude.Maybe ClusterStatus
}
deriving (ClusterSummary -> ClusterSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClusterSummary -> ClusterSummary -> Bool
$c/= :: ClusterSummary -> ClusterSummary -> Bool
== :: ClusterSummary -> ClusterSummary -> Bool
$c== :: ClusterSummary -> ClusterSummary -> Bool
Prelude.Eq, ReadPrec [ClusterSummary]
ReadPrec ClusterSummary
Int -> ReadS ClusterSummary
ReadS [ClusterSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClusterSummary]
$creadListPrec :: ReadPrec [ClusterSummary]
readPrec :: ReadPrec ClusterSummary
$creadPrec :: ReadPrec ClusterSummary
readList :: ReadS [ClusterSummary]
$creadList :: ReadS [ClusterSummary]
readsPrec :: Int -> ReadS ClusterSummary
$creadsPrec :: Int -> ReadS ClusterSummary
Prelude.Read, Int -> ClusterSummary -> ShowS
[ClusterSummary] -> ShowS
ClusterSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClusterSummary] -> ShowS
$cshowList :: [ClusterSummary] -> ShowS
show :: ClusterSummary -> String
$cshow :: ClusterSummary -> String
showsPrec :: Int -> ClusterSummary -> ShowS
$cshowsPrec :: Int -> ClusterSummary -> ShowS
Prelude.Show, forall x. Rep ClusterSummary x -> ClusterSummary
forall x. ClusterSummary -> Rep ClusterSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClusterSummary x -> ClusterSummary
$cfrom :: forall x. ClusterSummary -> Rep ClusterSummary x
Prelude.Generic)
newClusterSummary ::
ClusterSummary
newClusterSummary :: ClusterSummary
newClusterSummary =
ClusterSummary'
{ $sel:clusterArn:ClusterSummary' :: Maybe Text
clusterArn = forall a. Maybe a
Prelude.Nothing,
$sel:id:ClusterSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:name:ClusterSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:normalizedInstanceHours:ClusterSummary' :: Maybe Int
normalizedInstanceHours = forall a. Maybe a
Prelude.Nothing,
$sel:outpostArn:ClusterSummary' :: Maybe Text
outpostArn = forall a. Maybe a
Prelude.Nothing,
$sel:status:ClusterSummary' :: Maybe ClusterStatus
status = forall a. Maybe a
Prelude.Nothing
}
clusterSummary_clusterArn :: Lens.Lens' ClusterSummary (Prelude.Maybe Prelude.Text)
clusterSummary_clusterArn :: Lens' ClusterSummary (Maybe Text)
clusterSummary_clusterArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSummary' {Maybe Text
clusterArn :: Maybe Text
$sel:clusterArn:ClusterSummary' :: ClusterSummary -> Maybe Text
clusterArn} -> Maybe Text
clusterArn) (\s :: ClusterSummary
s@ClusterSummary' {} Maybe Text
a -> ClusterSummary
s {$sel:clusterArn:ClusterSummary' :: Maybe Text
clusterArn = Maybe Text
a} :: ClusterSummary)
clusterSummary_id :: Lens.Lens' ClusterSummary (Prelude.Maybe Prelude.Text)
clusterSummary_id :: Lens' ClusterSummary (Maybe Text)
clusterSummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSummary' {Maybe Text
id :: Maybe Text
$sel:id:ClusterSummary' :: ClusterSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: ClusterSummary
s@ClusterSummary' {} Maybe Text
a -> ClusterSummary
s {$sel:id:ClusterSummary' :: Maybe Text
id = Maybe Text
a} :: ClusterSummary)
clusterSummary_name :: Lens.Lens' ClusterSummary (Prelude.Maybe Prelude.Text)
clusterSummary_name :: Lens' ClusterSummary (Maybe Text)
clusterSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSummary' {Maybe Text
name :: Maybe Text
$sel:name:ClusterSummary' :: ClusterSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: ClusterSummary
s@ClusterSummary' {} Maybe Text
a -> ClusterSummary
s {$sel:name:ClusterSummary' :: Maybe Text
name = Maybe Text
a} :: ClusterSummary)
clusterSummary_normalizedInstanceHours :: Lens.Lens' ClusterSummary (Prelude.Maybe Prelude.Int)
clusterSummary_normalizedInstanceHours :: Lens' ClusterSummary (Maybe Int)
clusterSummary_normalizedInstanceHours = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSummary' {Maybe Int
normalizedInstanceHours :: Maybe Int
$sel:normalizedInstanceHours:ClusterSummary' :: ClusterSummary -> Maybe Int
normalizedInstanceHours} -> Maybe Int
normalizedInstanceHours) (\s :: ClusterSummary
s@ClusterSummary' {} Maybe Int
a -> ClusterSummary
s {$sel:normalizedInstanceHours:ClusterSummary' :: Maybe Int
normalizedInstanceHours = Maybe Int
a} :: ClusterSummary)
clusterSummary_outpostArn :: Lens.Lens' ClusterSummary (Prelude.Maybe Prelude.Text)
clusterSummary_outpostArn :: Lens' ClusterSummary (Maybe Text)
clusterSummary_outpostArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSummary' {Maybe Text
outpostArn :: Maybe Text
$sel:outpostArn:ClusterSummary' :: ClusterSummary -> Maybe Text
outpostArn} -> Maybe Text
outpostArn) (\s :: ClusterSummary
s@ClusterSummary' {} Maybe Text
a -> ClusterSummary
s {$sel:outpostArn:ClusterSummary' :: Maybe Text
outpostArn = Maybe Text
a} :: ClusterSummary)
clusterSummary_status :: Lens.Lens' ClusterSummary (Prelude.Maybe ClusterStatus)
clusterSummary_status :: Lens' ClusterSummary (Maybe ClusterStatus)
clusterSummary_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClusterSummary' {Maybe ClusterStatus
status :: Maybe ClusterStatus
$sel:status:ClusterSummary' :: ClusterSummary -> Maybe ClusterStatus
status} -> Maybe ClusterStatus
status) (\s :: ClusterSummary
s@ClusterSummary' {} Maybe ClusterStatus
a -> ClusterSummary
s {$sel:status:ClusterSummary' :: Maybe ClusterStatus
status = Maybe ClusterStatus
a} :: ClusterSummary)
instance Data.FromJSON ClusterSummary where
parseJSON :: Value -> Parser ClusterSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ClusterSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe ClusterStatus
-> ClusterSummary
ClusterSummary'
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
"ClusterArn")
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
"Id")
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
"Name")
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
"NormalizedInstanceHours")
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
"OutpostArn")
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
"Status")
)
instance Prelude.Hashable ClusterSummary where
hashWithSalt :: Int -> ClusterSummary -> Int
hashWithSalt Int
_salt ClusterSummary' {Maybe Int
Maybe Text
Maybe ClusterStatus
status :: Maybe ClusterStatus
outpostArn :: Maybe Text
normalizedInstanceHours :: Maybe Int
name :: Maybe Text
id :: Maybe Text
clusterArn :: Maybe Text
$sel:status:ClusterSummary' :: ClusterSummary -> Maybe ClusterStatus
$sel:outpostArn:ClusterSummary' :: ClusterSummary -> Maybe Text
$sel:normalizedInstanceHours:ClusterSummary' :: ClusterSummary -> Maybe Int
$sel:name:ClusterSummary' :: ClusterSummary -> Maybe Text
$sel:id:ClusterSummary' :: ClusterSummary -> Maybe Text
$sel:clusterArn:ClusterSummary' :: ClusterSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clusterArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
normalizedInstanceHours
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
outpostArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ClusterStatus
status
instance Prelude.NFData ClusterSummary where
rnf :: ClusterSummary -> ()
rnf ClusterSummary' {Maybe Int
Maybe Text
Maybe ClusterStatus
status :: Maybe ClusterStatus
outpostArn :: Maybe Text
normalizedInstanceHours :: Maybe Int
name :: Maybe Text
id :: Maybe Text
clusterArn :: Maybe Text
$sel:status:ClusterSummary' :: ClusterSummary -> Maybe ClusterStatus
$sel:outpostArn:ClusterSummary' :: ClusterSummary -> Maybe Text
$sel:normalizedInstanceHours:ClusterSummary' :: ClusterSummary -> Maybe Int
$sel:name:ClusterSummary' :: ClusterSummary -> Maybe Text
$sel:id:ClusterSummary' :: ClusterSummary -> Maybe Text
$sel:clusterArn:ClusterSummary' :: ClusterSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clusterArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
normalizedInstanceHours
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
outpostArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ClusterStatus
status