{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
{ $sel:device:EbsVolume' :: Maybe Text
device = forall a. Maybe a
Prelude.Nothing,
$sel:volumeId:EbsVolume' :: Maybe Text
volumeId = forall a. Maybe a
Prelude.Nothing
}
ebsVolume_device :: Lens.Lens' EbsVolume (Prelude.Maybe Prelude.Text)
ebsVolume_device :: Lens' EbsVolume (Maybe Text)
ebsVolume_device = 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 :: Lens' EbsVolume (Maybe Text)
ebsVolume_volumeId = 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 Data.FromJSON EbsVolume where
parseJSON :: Value -> Parser EbsVolume
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"EbsVolume"
( \Object
x ->
Maybe Text -> Maybe Text -> EbsVolume
EbsVolume'
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
"Device")
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
"VolumeId")
)
instance Prelude.Hashable EbsVolume where
hashWithSalt :: Int -> EbsVolume -> Int
hashWithSalt Int
_salt EbsVolume' {Maybe Text
volumeId :: Maybe Text
device :: Maybe Text
$sel:volumeId:EbsVolume' :: EbsVolume -> Maybe Text
$sel:device:EbsVolume' :: EbsVolume -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
device
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
volumeId
instance Prelude.NFData EbsVolume where
rnf :: EbsVolume -> ()
rnf EbsVolume' {Maybe Text
volumeId :: Maybe Text
device :: Maybe Text
$sel:volumeId:EbsVolume' :: EbsVolume -> Maybe Text
$sel:device:EbsVolume' :: EbsVolume -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
device
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
volumeId