{-# 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.OSRelease where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data OSRelease = OSRelease'
{
OSRelease -> Maybe Text
label :: Prelude.Maybe Prelude.Text
}
deriving (OSRelease -> OSRelease -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OSRelease -> OSRelease -> Bool
$c/= :: OSRelease -> OSRelease -> Bool
== :: OSRelease -> OSRelease -> Bool
$c== :: OSRelease -> OSRelease -> Bool
Prelude.Eq, ReadPrec [OSRelease]
ReadPrec OSRelease
Int -> ReadS OSRelease
ReadS [OSRelease]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OSRelease]
$creadListPrec :: ReadPrec [OSRelease]
readPrec :: ReadPrec OSRelease
$creadPrec :: ReadPrec OSRelease
readList :: ReadS [OSRelease]
$creadList :: ReadS [OSRelease]
readsPrec :: Int -> ReadS OSRelease
$creadsPrec :: Int -> ReadS OSRelease
Prelude.Read, Int -> OSRelease -> ShowS
[OSRelease] -> ShowS
OSRelease -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OSRelease] -> ShowS
$cshowList :: [OSRelease] -> ShowS
show :: OSRelease -> String
$cshow :: OSRelease -> String
showsPrec :: Int -> OSRelease -> ShowS
$cshowsPrec :: Int -> OSRelease -> ShowS
Prelude.Show, forall x. Rep OSRelease x -> OSRelease
forall x. OSRelease -> Rep OSRelease x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OSRelease x -> OSRelease
$cfrom :: forall x. OSRelease -> Rep OSRelease x
Prelude.Generic)
newOSRelease ::
OSRelease
newOSRelease :: OSRelease
newOSRelease = OSRelease' {$sel:label:OSRelease' :: Maybe Text
label = forall a. Maybe a
Prelude.Nothing}
oSRelease_label :: Lens.Lens' OSRelease (Prelude.Maybe Prelude.Text)
oSRelease_label :: Lens' OSRelease (Maybe Text)
oSRelease_label = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OSRelease' {Maybe Text
label :: Maybe Text
$sel:label:OSRelease' :: OSRelease -> Maybe Text
label} -> Maybe Text
label) (\s :: OSRelease
s@OSRelease' {} Maybe Text
a -> OSRelease
s {$sel:label:OSRelease' :: Maybe Text
label = Maybe Text
a} :: OSRelease)
instance Data.FromJSON OSRelease where
parseJSON :: Value -> Parser OSRelease
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"OSRelease"
(\Object
x -> Maybe Text -> OSRelease
OSRelease' 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
"Label"))
instance Prelude.Hashable OSRelease where
hashWithSalt :: Int -> OSRelease -> Int
hashWithSalt Int
_salt OSRelease' {Maybe Text
label :: Maybe Text
$sel:label:OSRelease' :: OSRelease -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
label
instance Prelude.NFData OSRelease where
rnf :: OSRelease -> ()
rnf OSRelease' {Maybe Text
label :: Maybe Text
$sel:label:OSRelease' :: OSRelease -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
label