{-# 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.EbsVolume where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EbsVolume = EbsVolume'
{
EbsVolume -> Maybe Text
device :: Prelude.Maybe Prelude.Text,
EbsVolume -> Maybe Text
volumeId :: Prelude.Maybe Prelude.Text
}
deriving (EbsVolume -> EbsVolume -> Bool
(EbsVolume -> EbsVolume -> Bool)
-> (EbsVolume -> EbsVolume -> Bool) -> Eq EbsVolume
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EbsVolume -> EbsVolume -> Bool
$c/= :: EbsVolume -> EbsVolume -> Bool
== :: EbsVolume -> EbsVolume -> Bool
$c== :: EbsVolume -> EbsVolume -> Bool
Prelude.Eq, ReadPrec [EbsVolume]
ReadPrec EbsVolume
Int -> ReadS EbsVolume
ReadS [EbsVolume]
(Int -> ReadS EbsVolume)
-> ReadS [EbsVolume]
-> ReadPrec EbsVolume
-> ReadPrec [EbsVolume]
-> Read EbsVolume
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EbsVolume]
$creadListPrec :: ReadPrec [EbsVolume]
readPrec :: ReadPrec EbsVolume
$creadPrec :: ReadPrec EbsVolume
readList :: ReadS [EbsVolume]
$creadList :: ReadS [EbsVolume]
readsPrec :: Int -> ReadS EbsVolume
$creadsPrec :: Int -> ReadS EbsVolume
Prelude.Read, Int -> EbsVolume -> ShowS
[EbsVolume] -> ShowS
EbsVolume -> String
(Int -> EbsVolume -> ShowS)
-> (EbsVolume -> String)
-> ([EbsVolume] -> ShowS)
-> Show EbsVolume
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EbsVolume] -> ShowS
$cshowList :: [EbsVolume] -> ShowS
show :: EbsVolume -> String
$cshow :: EbsVolume -> String
showsPrec :: Int -> EbsVolume -> ShowS
$cshowsPrec :: Int -> EbsVolume -> ShowS
Prelude.Show, (forall x. EbsVolume -> Rep EbsVolume x)
-> (forall x. Rep EbsVolume x -> EbsVolume) -> Generic EbsVolume
forall x. Rep EbsVolume x -> EbsVolume
forall x. EbsVolume -> Rep EbsVolume x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EbsVolume x -> EbsVolume
$cfrom :: forall x. EbsVolume -> Rep EbsVolume x
Prelude.Generic)
newEbsVolume ::
EbsVolume
newEbsVolume :: EbsVolume
newEbsVolume =
EbsVolume' :: Maybe Text -> Maybe Text -> EbsVolume
EbsVolume'
{ $sel:device:EbsVolume' :: Maybe Text
device = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:volumeId:EbsVolume' :: Maybe Text
volumeId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
ebsVolume_device :: Lens.Lens' EbsVolume (Prelude.Maybe Prelude.Text)
ebsVolume_device :: (Maybe Text -> f (Maybe Text)) -> EbsVolume -> f EbsVolume
ebsVolume_device = (EbsVolume -> Maybe Text)
-> (EbsVolume -> Maybe Text -> EbsVolume)
-> Lens EbsVolume EbsVolume (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EbsVolume' {Maybe Text
device :: Maybe Text
$sel:device:EbsVolume' :: EbsVolume -> Maybe Text
device} -> Maybe Text
device) (\s :: EbsVolume
s@EbsVolume' {} Maybe Text
a -> EbsVolume
s {$sel:device:EbsVolume' :: Maybe Text
device = Maybe Text
a} :: EbsVolume)
ebsVolume_volumeId :: Lens.Lens' EbsVolume (Prelude.Maybe Prelude.Text)
ebsVolume_volumeId :: (Maybe Text -> f (Maybe Text)) -> EbsVolume -> f EbsVolume
ebsVolume_volumeId = (EbsVolume -> Maybe Text)
-> (EbsVolume -> Maybe Text -> EbsVolume)
-> Lens EbsVolume EbsVolume (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EbsVolume' {Maybe Text
volumeId :: Maybe Text
$sel:volumeId:EbsVolume' :: EbsVolume -> Maybe Text
volumeId} -> Maybe Text
volumeId) (\s :: EbsVolume
s@EbsVolume' {} Maybe Text
a -> EbsVolume
s {$sel:volumeId:EbsVolume' :: Maybe Text
volumeId = Maybe Text
a} :: EbsVolume)
instance Core.FromJSON EbsVolume where
parseJSON :: Value -> Parser EbsVolume
parseJSON =
String -> (Object -> Parser EbsVolume) -> Value -> Parser EbsVolume
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EbsVolume"
( \Object
x ->
Maybe Text -> Maybe Text -> EbsVolume
EbsVolume'
(Maybe Text -> Maybe Text -> EbsVolume)
-> Parser (Maybe Text) -> Parser (Maybe Text -> EbsVolume)
forall (f :: * -> *) a b. Functor 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
"Device")
Parser (Maybe Text -> EbsVolume)
-> Parser (Maybe Text) -> Parser EbsVolume
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
"VolumeId")
)
instance Prelude.Hashable EbsVolume
instance Prelude.NFData EbsVolume