{-# 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.AutoScaling.Types.Ebs 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 Ebs = Ebs'
{
Ebs -> Maybe Bool
deleteOnTermination :: Prelude.Maybe Prelude.Bool,
Ebs -> Maybe Bool
encrypted :: Prelude.Maybe Prelude.Bool,
Ebs -> Maybe Natural
iops :: Prelude.Maybe Prelude.Natural,
Ebs -> Maybe Text
snapshotId :: Prelude.Maybe Prelude.Text,
Ebs -> Maybe Natural
throughput :: Prelude.Maybe Prelude.Natural,
Ebs -> Maybe Natural
volumeSize :: Prelude.Maybe Prelude.Natural,
Ebs -> Maybe Text
volumeType :: Prelude.Maybe Prelude.Text
}
deriving (Ebs -> Ebs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Ebs -> Ebs -> Bool
$c/= :: Ebs -> Ebs -> Bool
== :: Ebs -> Ebs -> Bool
$c== :: Ebs -> Ebs -> Bool
Prelude.Eq, ReadPrec [Ebs]
ReadPrec Ebs
Int -> ReadS Ebs
ReadS [Ebs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Ebs]
$creadListPrec :: ReadPrec [Ebs]
readPrec :: ReadPrec Ebs
$creadPrec :: ReadPrec Ebs
readList :: ReadS [Ebs]
$creadList :: ReadS [Ebs]
readsPrec :: Int -> ReadS Ebs
$creadsPrec :: Int -> ReadS Ebs
Prelude.Read, Int -> Ebs -> ShowS
[Ebs] -> ShowS
Ebs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Ebs] -> ShowS
$cshowList :: [Ebs] -> ShowS
show :: Ebs -> String
$cshow :: Ebs -> String
showsPrec :: Int -> Ebs -> ShowS
$cshowsPrec :: Int -> Ebs -> ShowS
Prelude.Show, forall x. Rep Ebs x -> Ebs
forall x. Ebs -> Rep Ebs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Ebs x -> Ebs
$cfrom :: forall x. Ebs -> Rep Ebs x
Prelude.Generic)
newEbs ::
Ebs
newEbs :: Ebs
newEbs =
Ebs'
{ $sel:deleteOnTermination:Ebs' :: Maybe Bool
deleteOnTermination = forall a. Maybe a
Prelude.Nothing,
$sel:encrypted:Ebs' :: Maybe Bool
encrypted = forall a. Maybe a
Prelude.Nothing,
$sel:iops:Ebs' :: Maybe Natural
iops = forall a. Maybe a
Prelude.Nothing,
$sel:snapshotId:Ebs' :: Maybe Text
snapshotId = forall a. Maybe a
Prelude.Nothing,
$sel:throughput:Ebs' :: Maybe Natural
throughput = forall a. Maybe a
Prelude.Nothing,
$sel:volumeSize:Ebs' :: Maybe Natural
volumeSize = forall a. Maybe a
Prelude.Nothing,
$sel:volumeType:Ebs' :: Maybe Text
volumeType = forall a. Maybe a
Prelude.Nothing
}
ebs_deleteOnTermination :: Lens.Lens' Ebs (Prelude.Maybe Prelude.Bool)
ebs_deleteOnTermination :: Lens' Ebs (Maybe Bool)
ebs_deleteOnTermination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ebs' {Maybe Bool
deleteOnTermination :: Maybe Bool
$sel:deleteOnTermination:Ebs' :: Ebs -> Maybe Bool
deleteOnTermination} -> Maybe Bool
deleteOnTermination) (\s :: Ebs
s@Ebs' {} Maybe Bool
a -> Ebs
s {$sel:deleteOnTermination:Ebs' :: Maybe Bool
deleteOnTermination = Maybe Bool
a} :: Ebs)
ebs_encrypted :: Lens.Lens' Ebs (Prelude.Maybe Prelude.Bool)
ebs_encrypted :: Lens' Ebs (Maybe Bool)
ebs_encrypted = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ebs' {Maybe Bool
encrypted :: Maybe Bool
$sel:encrypted:Ebs' :: Ebs -> Maybe Bool
encrypted} -> Maybe Bool
encrypted) (\s :: Ebs
s@Ebs' {} Maybe Bool
a -> Ebs
s {$sel:encrypted:Ebs' :: Maybe Bool
encrypted = Maybe Bool
a} :: Ebs)
ebs_iops :: Lens.Lens' Ebs (Prelude.Maybe Prelude.Natural)
ebs_iops :: Lens' Ebs (Maybe Natural)
ebs_iops = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ebs' {Maybe Natural
iops :: Maybe Natural
$sel:iops:Ebs' :: Ebs -> Maybe Natural
iops} -> Maybe Natural
iops) (\s :: Ebs
s@Ebs' {} Maybe Natural
a -> Ebs
s {$sel:iops:Ebs' :: Maybe Natural
iops = Maybe Natural
a} :: Ebs)
ebs_snapshotId :: Lens.Lens' Ebs (Prelude.Maybe Prelude.Text)
ebs_snapshotId :: Lens' Ebs (Maybe Text)
ebs_snapshotId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ebs' {Maybe Text
snapshotId :: Maybe Text
$sel:snapshotId:Ebs' :: Ebs -> Maybe Text
snapshotId} -> Maybe Text
snapshotId) (\s :: Ebs
s@Ebs' {} Maybe Text
a -> Ebs
s {$sel:snapshotId:Ebs' :: Maybe Text
snapshotId = Maybe Text
a} :: Ebs)
ebs_throughput :: Lens.Lens' Ebs (Prelude.Maybe Prelude.Natural)
ebs_throughput :: Lens' Ebs (Maybe Natural)
ebs_throughput = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ebs' {Maybe Natural
throughput :: Maybe Natural
$sel:throughput:Ebs' :: Ebs -> Maybe Natural
throughput} -> Maybe Natural
throughput) (\s :: Ebs
s@Ebs' {} Maybe Natural
a -> Ebs
s {$sel:throughput:Ebs' :: Maybe Natural
throughput = Maybe Natural
a} :: Ebs)
ebs_volumeSize :: Lens.Lens' Ebs (Prelude.Maybe Prelude.Natural)
ebs_volumeSize :: Lens' Ebs (Maybe Natural)
ebs_volumeSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ebs' {Maybe Natural
volumeSize :: Maybe Natural
$sel:volumeSize:Ebs' :: Ebs -> Maybe Natural
volumeSize} -> Maybe Natural
volumeSize) (\s :: Ebs
s@Ebs' {} Maybe Natural
a -> Ebs
s {$sel:volumeSize:Ebs' :: Maybe Natural
volumeSize = Maybe Natural
a} :: Ebs)
ebs_volumeType :: Lens.Lens' Ebs (Prelude.Maybe Prelude.Text)
ebs_volumeType :: Lens' Ebs (Maybe Text)
ebs_volumeType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ebs' {Maybe Text
volumeType :: Maybe Text
$sel:volumeType:Ebs' :: Ebs -> Maybe Text
volumeType} -> Maybe Text
volumeType) (\s :: Ebs
s@Ebs' {} Maybe Text
a -> Ebs
s {$sel:volumeType:Ebs' :: Maybe Text
volumeType = Maybe Text
a} :: Ebs)
instance Data.FromXML Ebs where
parseXML :: [Node] -> Either String Ebs
parseXML [Node]
x =
Maybe Bool
-> Maybe Bool
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Ebs
Ebs'
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
"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 Ebs where
hashWithSalt :: Int -> Ebs -> Int
hashWithSalt Int
_salt Ebs' {Maybe Bool
Maybe Natural
Maybe Text
volumeType :: Maybe Text
volumeSize :: Maybe Natural
throughput :: Maybe Natural
snapshotId :: Maybe Text
iops :: Maybe Natural
encrypted :: Maybe Bool
deleteOnTermination :: Maybe Bool
$sel:volumeType:Ebs' :: Ebs -> Maybe Text
$sel:volumeSize:Ebs' :: Ebs -> Maybe Natural
$sel:throughput:Ebs' :: Ebs -> Maybe Natural
$sel:snapshotId:Ebs' :: Ebs -> Maybe Text
$sel:iops:Ebs' :: Ebs -> Maybe Natural
$sel:encrypted:Ebs' :: Ebs -> Maybe Bool
$sel:deleteOnTermination:Ebs' :: Ebs -> 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 Natural
iops
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snapshotId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
throughput
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
volumeSize
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
volumeType
instance Prelude.NFData Ebs where
rnf :: Ebs -> ()
rnf Ebs' {Maybe Bool
Maybe Natural
Maybe Text
volumeType :: Maybe Text
volumeSize :: Maybe Natural
throughput :: Maybe Natural
snapshotId :: Maybe Text
iops :: Maybe Natural
encrypted :: Maybe Bool
deleteOnTermination :: Maybe Bool
$sel:volumeType:Ebs' :: Ebs -> Maybe Text
$sel:volumeSize:Ebs' :: Ebs -> Maybe Natural
$sel:throughput:Ebs' :: Ebs -> Maybe Natural
$sel:snapshotId:Ebs' :: Ebs -> Maybe Text
$sel:iops:Ebs' :: Ebs -> Maybe Natural
$sel:encrypted:Ebs' :: Ebs -> Maybe Bool
$sel:deleteOnTermination:Ebs' :: Ebs -> 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 Natural
iops
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 Natural
throughput
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
volumeSize
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
volumeType
instance Data.ToQuery Ebs where
toQuery :: Ebs -> QueryString
toQuery Ebs' {Maybe Bool
Maybe Natural
Maybe Text
volumeType :: Maybe Text
volumeSize :: Maybe Natural
throughput :: Maybe Natural
snapshotId :: Maybe Text
iops :: Maybe Natural
encrypted :: Maybe Bool
deleteOnTermination :: Maybe Bool
$sel:volumeType:Ebs' :: Ebs -> Maybe Text
$sel:volumeSize:Ebs' :: Ebs -> Maybe Natural
$sel:throughput:Ebs' :: Ebs -> Maybe Natural
$sel:snapshotId:Ebs' :: Ebs -> Maybe Text
$sel:iops:Ebs' :: Ebs -> Maybe Natural
$sel:encrypted:Ebs' :: Ebs -> Maybe Bool
$sel:deleteOnTermination:Ebs' :: Ebs -> 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 Natural
iops,
ByteString
"SnapshotId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
snapshotId,
ByteString
"Throughput" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
throughput,
ByteString
"VolumeSize" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
volumeSize,
ByteString
"VolumeType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
volumeType
]