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