{-# 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.EC2.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.EC2.Internal
import Amazonka.EC2.Types.VolumeType
import qualified Amazonka.Prelude as Prelude
data EbsBlockDevice = EbsBlockDevice'
{
EbsBlockDevice -> Maybe Bool
deleteOnTermination :: Prelude.Maybe Prelude.Bool,
EbsBlockDevice -> Maybe Bool
encrypted :: Prelude.Maybe Prelude.Bool,
EbsBlockDevice -> Maybe Int
iops :: Prelude.Maybe Prelude.Int,
EbsBlockDevice -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
EbsBlockDevice -> Maybe Text
outpostArn :: Prelude.Maybe Prelude.Text,
EbsBlockDevice -> Maybe Text
snapshotId :: Prelude.Maybe Prelude.Text,
EbsBlockDevice -> Maybe Int
throughput :: Prelude.Maybe Prelude.Int,
EbsBlockDevice -> Maybe Int
volumeSize :: Prelude.Maybe Prelude.Int,
EbsBlockDevice -> Maybe VolumeType
volumeType :: Prelude.Maybe VolumeType
}
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:deleteOnTermination:EbsBlockDevice' :: Maybe Bool
deleteOnTermination =
forall a. Maybe a
Prelude.Nothing,
$sel:encrypted:EbsBlockDevice' :: Maybe Bool
encrypted = forall a. Maybe a
Prelude.Nothing,
$sel:iops:EbsBlockDevice' :: Maybe Int
iops = forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyId:EbsBlockDevice' :: Maybe Text
kmsKeyId = forall a. Maybe a
Prelude.Nothing,
$sel:outpostArn:EbsBlockDevice' :: Maybe Text
outpostArn = forall a. Maybe a
Prelude.Nothing,
$sel:snapshotId:EbsBlockDevice' :: Maybe Text
snapshotId = forall a. Maybe a
Prelude.Nothing,
$sel:throughput:EbsBlockDevice' :: Maybe Int
throughput = forall a. Maybe a
Prelude.Nothing,
$sel:volumeSize:EbsBlockDevice' :: Maybe Int
volumeSize = forall a. Maybe a
Prelude.Nothing,
$sel:volumeType:EbsBlockDevice' :: Maybe VolumeType
volumeType = forall a. Maybe a
Prelude.Nothing
}
ebsBlockDevice_deleteOnTermination :: Lens.Lens' EbsBlockDevice (Prelude.Maybe Prelude.Bool)
ebsBlockDevice_deleteOnTermination :: Lens' EbsBlockDevice (Maybe Bool)
ebsBlockDevice_deleteOnTermination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EbsBlockDevice' {Maybe Bool
deleteOnTermination :: Maybe Bool
$sel:deleteOnTermination:EbsBlockDevice' :: EbsBlockDevice -> Maybe Bool
deleteOnTermination} -> Maybe Bool
deleteOnTermination) (\s :: EbsBlockDevice
s@EbsBlockDevice' {} Maybe Bool
a -> EbsBlockDevice
s {$sel:deleteOnTermination:EbsBlockDevice' :: Maybe Bool
deleteOnTermination = Maybe Bool
a} :: EbsBlockDevice)
ebsBlockDevice_encrypted :: Lens.Lens' EbsBlockDevice (Prelude.Maybe Prelude.Bool)
ebsBlockDevice_encrypted :: Lens' EbsBlockDevice (Maybe Bool)
ebsBlockDevice_encrypted = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EbsBlockDevice' {Maybe Bool
encrypted :: Maybe Bool
$sel:encrypted:EbsBlockDevice' :: EbsBlockDevice -> Maybe Bool
encrypted} -> Maybe Bool
encrypted) (\s :: EbsBlockDevice
s@EbsBlockDevice' {} Maybe Bool
a -> EbsBlockDevice
s {$sel:encrypted:EbsBlockDevice' :: Maybe Bool
encrypted = Maybe Bool
a} :: EbsBlockDevice)
ebsBlockDevice_iops :: Lens.Lens' EbsBlockDevice (Prelude.Maybe Prelude.Int)
ebsBlockDevice_iops :: Lens' EbsBlockDevice (Maybe Int)
ebsBlockDevice_iops = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EbsBlockDevice' {Maybe Int
iops :: Maybe Int
$sel:iops:EbsBlockDevice' :: EbsBlockDevice -> Maybe Int
iops} -> Maybe Int
iops) (\s :: EbsBlockDevice
s@EbsBlockDevice' {} Maybe Int
a -> EbsBlockDevice
s {$sel:iops:EbsBlockDevice' :: Maybe Int
iops = Maybe Int
a} :: EbsBlockDevice)
ebsBlockDevice_kmsKeyId :: Lens.Lens' EbsBlockDevice (Prelude.Maybe Prelude.Text)
ebsBlockDevice_kmsKeyId :: Lens' EbsBlockDevice (Maybe Text)
ebsBlockDevice_kmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EbsBlockDevice' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:EbsBlockDevice' :: EbsBlockDevice -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: EbsBlockDevice
s@EbsBlockDevice' {} Maybe Text
a -> EbsBlockDevice
s {$sel:kmsKeyId:EbsBlockDevice' :: Maybe Text
kmsKeyId = Maybe Text
a} :: EbsBlockDevice)
ebsBlockDevice_outpostArn :: Lens.Lens' EbsBlockDevice (Prelude.Maybe Prelude.Text)
ebsBlockDevice_outpostArn :: Lens' EbsBlockDevice (Maybe Text)
ebsBlockDevice_outpostArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EbsBlockDevice' {Maybe Text
outpostArn :: Maybe Text
$sel:outpostArn:EbsBlockDevice' :: EbsBlockDevice -> Maybe Text
outpostArn} -> Maybe Text
outpostArn) (\s :: EbsBlockDevice
s@EbsBlockDevice' {} Maybe Text
a -> EbsBlockDevice
s {$sel:outpostArn:EbsBlockDevice' :: Maybe Text
outpostArn = Maybe Text
a} :: EbsBlockDevice)
ebsBlockDevice_snapshotId :: Lens.Lens' EbsBlockDevice (Prelude.Maybe Prelude.Text)
ebsBlockDevice_snapshotId :: Lens' EbsBlockDevice (Maybe Text)
ebsBlockDevice_snapshotId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EbsBlockDevice' {Maybe Text
snapshotId :: Maybe Text
$sel:snapshotId:EbsBlockDevice' :: EbsBlockDevice -> Maybe Text
snapshotId} -> Maybe Text
snapshotId) (\s :: EbsBlockDevice
s@EbsBlockDevice' {} Maybe Text
a -> EbsBlockDevice
s {$sel:snapshotId:EbsBlockDevice' :: Maybe Text
snapshotId = Maybe Text
a} :: EbsBlockDevice)
ebsBlockDevice_throughput :: Lens.Lens' EbsBlockDevice (Prelude.Maybe Prelude.Int)
ebsBlockDevice_throughput :: Lens' EbsBlockDevice (Maybe Int)
ebsBlockDevice_throughput = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EbsBlockDevice' {Maybe Int
throughput :: Maybe Int
$sel:throughput:EbsBlockDevice' :: EbsBlockDevice -> Maybe Int
throughput} -> Maybe Int
throughput) (\s :: EbsBlockDevice
s@EbsBlockDevice' {} Maybe Int
a -> EbsBlockDevice
s {$sel:throughput:EbsBlockDevice' :: Maybe Int
throughput = Maybe Int
a} :: EbsBlockDevice)
ebsBlockDevice_volumeSize :: Lens.Lens' EbsBlockDevice (Prelude.Maybe Prelude.Int)
ebsBlockDevice_volumeSize :: Lens' EbsBlockDevice (Maybe Int)
ebsBlockDevice_volumeSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EbsBlockDevice' {Maybe Int
volumeSize :: Maybe Int
$sel:volumeSize:EbsBlockDevice' :: EbsBlockDevice -> Maybe Int
volumeSize} -> Maybe Int
volumeSize) (\s :: EbsBlockDevice
s@EbsBlockDevice' {} Maybe Int
a -> EbsBlockDevice
s {$sel:volumeSize:EbsBlockDevice' :: Maybe Int
volumeSize = Maybe Int
a} :: EbsBlockDevice)
ebsBlockDevice_volumeType :: Lens.Lens' EbsBlockDevice (Prelude.Maybe VolumeType)
ebsBlockDevice_volumeType :: Lens' EbsBlockDevice (Maybe VolumeType)
ebsBlockDevice_volumeType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EbsBlockDevice' {Maybe VolumeType
volumeType :: Maybe VolumeType
$sel:volumeType:EbsBlockDevice' :: EbsBlockDevice -> Maybe VolumeType
volumeType} -> Maybe VolumeType
volumeType) (\s :: EbsBlockDevice
s@EbsBlockDevice' {} Maybe VolumeType
a -> EbsBlockDevice
s {$sel:volumeType:EbsBlockDevice' :: Maybe VolumeType
volumeType = Maybe VolumeType
a} :: EbsBlockDevice)
instance Data.FromXML EbsBlockDevice where
parseXML :: [Node] -> Either String EbsBlockDevice
parseXML [Node]
x =
Maybe Bool
-> Maybe Bool
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe VolumeType
-> EbsBlockDevice
EbsBlockDevice'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"deleteOnTermination")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"encrypted")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"iops")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"kmsKeyId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"outpostArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"snapshotId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"throughput")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"volumeSize")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"volumeType")
instance Prelude.Hashable EbsBlockDevice where
hashWithSalt :: Int -> EbsBlockDevice -> Int
hashWithSalt Int
_salt EbsBlockDevice' {Maybe Bool
Maybe Int
Maybe Text
Maybe VolumeType
volumeType :: Maybe VolumeType
volumeSize :: Maybe Int
throughput :: Maybe Int
snapshotId :: Maybe Text
outpostArn :: Maybe Text
kmsKeyId :: Maybe Text
iops :: Maybe Int
encrypted :: Maybe Bool
deleteOnTermination :: Maybe Bool
$sel:volumeType:EbsBlockDevice' :: EbsBlockDevice -> Maybe VolumeType
$sel:volumeSize:EbsBlockDevice' :: EbsBlockDevice -> Maybe Int
$sel:throughput:EbsBlockDevice' :: EbsBlockDevice -> Maybe Int
$sel:snapshotId:EbsBlockDevice' :: EbsBlockDevice -> Maybe Text
$sel:outpostArn:EbsBlockDevice' :: EbsBlockDevice -> Maybe Text
$sel:kmsKeyId:EbsBlockDevice' :: EbsBlockDevice -> Maybe Text
$sel:iops:EbsBlockDevice' :: EbsBlockDevice -> Maybe Int
$sel:encrypted:EbsBlockDevice' :: EbsBlockDevice -> Maybe Bool
$sel:deleteOnTermination:EbsBlockDevice' :: EbsBlockDevice -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
deleteOnTermination
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
encrypted
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
iops
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKeyId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
outpostArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snapshotId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
throughput
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
volumeSize
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VolumeType
volumeType
instance Prelude.NFData EbsBlockDevice where
rnf :: EbsBlockDevice -> ()
rnf EbsBlockDevice' {Maybe Bool
Maybe Int
Maybe Text
Maybe VolumeType
volumeType :: Maybe VolumeType
volumeSize :: Maybe Int
throughput :: Maybe Int
snapshotId :: Maybe Text
outpostArn :: Maybe Text
kmsKeyId :: Maybe Text
iops :: Maybe Int
encrypted :: Maybe Bool
deleteOnTermination :: Maybe Bool
$sel:volumeType:EbsBlockDevice' :: EbsBlockDevice -> Maybe VolumeType
$sel:volumeSize:EbsBlockDevice' :: EbsBlockDevice -> Maybe Int
$sel:throughput:EbsBlockDevice' :: EbsBlockDevice -> Maybe Int
$sel:snapshotId:EbsBlockDevice' :: EbsBlockDevice -> Maybe Text
$sel:outpostArn:EbsBlockDevice' :: EbsBlockDevice -> Maybe Text
$sel:kmsKeyId:EbsBlockDevice' :: EbsBlockDevice -> Maybe Text
$sel:iops:EbsBlockDevice' :: EbsBlockDevice -> Maybe Int
$sel:encrypted:EbsBlockDevice' :: EbsBlockDevice -> Maybe Bool
$sel:deleteOnTermination:EbsBlockDevice' :: EbsBlockDevice -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
deleteOnTermination
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
encrypted
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
iops
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKeyId
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 Text
snapshotId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
throughput
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
volumeSize
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VolumeType
volumeType
instance Data.ToQuery EbsBlockDevice where
toQuery :: EbsBlockDevice -> QueryString
toQuery EbsBlockDevice' {Maybe Bool
Maybe Int
Maybe Text
Maybe VolumeType
volumeType :: Maybe VolumeType
volumeSize :: Maybe Int
throughput :: Maybe Int
snapshotId :: Maybe Text
outpostArn :: Maybe Text
kmsKeyId :: Maybe Text
iops :: Maybe Int
encrypted :: Maybe Bool
deleteOnTermination :: Maybe Bool
$sel:volumeType:EbsBlockDevice' :: EbsBlockDevice -> Maybe VolumeType
$sel:volumeSize:EbsBlockDevice' :: EbsBlockDevice -> Maybe Int
$sel:throughput:EbsBlockDevice' :: EbsBlockDevice -> Maybe Int
$sel:snapshotId:EbsBlockDevice' :: EbsBlockDevice -> Maybe Text
$sel:outpostArn:EbsBlockDevice' :: EbsBlockDevice -> Maybe Text
$sel:kmsKeyId:EbsBlockDevice' :: EbsBlockDevice -> Maybe Text
$sel:iops:EbsBlockDevice' :: EbsBlockDevice -> Maybe Int
$sel:encrypted:EbsBlockDevice' :: EbsBlockDevice -> Maybe Bool
$sel:deleteOnTermination:EbsBlockDevice' :: EbsBlockDevice -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"DeleteOnTermination" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
deleteOnTermination,
ByteString
"Encrypted" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
encrypted,
ByteString
"Iops" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
iops,
ByteString
"KmsKeyId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
kmsKeyId,
ByteString
"OutpostArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
outpostArn,
ByteString
"SnapshotId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
snapshotId,
ByteString
"Throughput" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
throughput,
ByteString
"VolumeSize" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
volumeSize,
ByteString
"VolumeType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe VolumeType
volumeType
]