{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Ebs = Ebs'
{
Ebs -> Maybe Bool
deleteOnTermination :: Prelude.Maybe Prelude.Bool,
Ebs -> Maybe Natural
throughput :: Prelude.Maybe Prelude.Natural,
Ebs -> Maybe Natural
volumeSize :: Prelude.Maybe Prelude.Natural,
Ebs -> Maybe Natural
iops :: Prelude.Maybe Prelude.Natural,
Ebs -> Maybe Bool
encrypted :: Prelude.Maybe Prelude.Bool,
Ebs -> Maybe Text
volumeType :: Prelude.Maybe Prelude.Text,
Ebs -> Maybe Text
snapshotId :: Prelude.Maybe Prelude.Text
}
deriving (Ebs -> Ebs -> Bool
(Ebs -> Ebs -> Bool) -> (Ebs -> Ebs -> Bool) -> Eq Ebs
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]
(Int -> ReadS Ebs)
-> ReadS [Ebs] -> ReadPrec Ebs -> ReadPrec [Ebs] -> Read 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
(Int -> Ebs -> ShowS)
-> (Ebs -> String) -> ([Ebs] -> ShowS) -> Show Ebs
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. Ebs -> Rep Ebs x)
-> (forall x. Rep Ebs x -> Ebs) -> Generic Ebs
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' :: Maybe Bool
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Ebs
Ebs'
{ $sel:deleteOnTermination:Ebs' :: Maybe Bool
deleteOnTermination = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:throughput:Ebs' :: Maybe Natural
throughput = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:volumeSize:Ebs' :: Maybe Natural
volumeSize = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:iops:Ebs' :: Maybe Natural
iops = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:encrypted:Ebs' :: Maybe Bool
encrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:volumeType:Ebs' :: Maybe Text
volumeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:snapshotId:Ebs' :: Maybe Text
snapshotId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
ebs_deleteOnTermination :: Lens.Lens' Ebs (Prelude.Maybe Prelude.Bool)
ebs_deleteOnTermination :: (Maybe Bool -> f (Maybe Bool)) -> Ebs -> f Ebs
ebs_deleteOnTermination = (Ebs -> Maybe Bool)
-> (Ebs -> Maybe Bool -> Ebs)
-> Lens Ebs Ebs (Maybe Bool) (Maybe Bool)
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_throughput :: Lens.Lens' Ebs (Prelude.Maybe Prelude.Natural)
ebs_throughput :: (Maybe Natural -> f (Maybe Natural)) -> Ebs -> f Ebs
ebs_throughput = (Ebs -> Maybe Natural)
-> (Ebs -> Maybe Natural -> Ebs)
-> Lens Ebs Ebs (Maybe Natural) (Maybe Natural)
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 :: (Maybe Natural -> f (Maybe Natural)) -> Ebs -> f Ebs
ebs_volumeSize = (Ebs -> Maybe Natural)
-> (Ebs -> Maybe Natural -> Ebs)
-> Lens Ebs Ebs (Maybe Natural) (Maybe Natural)
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_iops :: Lens.Lens' Ebs (Prelude.Maybe Prelude.Natural)
ebs_iops :: (Maybe Natural -> f (Maybe Natural)) -> Ebs -> f Ebs
ebs_iops = (Ebs -> Maybe Natural)
-> (Ebs -> Maybe Natural -> Ebs)
-> Lens Ebs Ebs (Maybe Natural) (Maybe Natural)
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_encrypted :: Lens.Lens' Ebs (Prelude.Maybe Prelude.Bool)
ebs_encrypted :: (Maybe Bool -> f (Maybe Bool)) -> Ebs -> f Ebs
ebs_encrypted = (Ebs -> Maybe Bool)
-> (Ebs -> Maybe Bool -> Ebs)
-> Lens Ebs Ebs (Maybe Bool) (Maybe Bool)
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_volumeType :: Lens.Lens' Ebs (Prelude.Maybe Prelude.Text)
ebs_volumeType :: (Maybe Text -> f (Maybe Text)) -> Ebs -> f Ebs
ebs_volumeType = (Ebs -> Maybe Text)
-> (Ebs -> Maybe Text -> Ebs)
-> Lens Ebs Ebs (Maybe Text) (Maybe Text)
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)
ebs_snapshotId :: Lens.Lens' Ebs (Prelude.Maybe Prelude.Text)
ebs_snapshotId :: (Maybe Text -> f (Maybe Text)) -> Ebs -> f Ebs
ebs_snapshotId = (Ebs -> Maybe Text)
-> (Ebs -> Maybe Text -> Ebs)
-> Lens Ebs Ebs (Maybe Text) (Maybe Text)
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)
instance Core.FromXML Ebs where
parseXML :: [Node] -> Either String Ebs
parseXML [Node]
x =
Maybe Bool
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Ebs
Ebs'
(Maybe Bool
-> Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Ebs)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Ebs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DeleteOnTermination")
Either
String
(Maybe Natural
-> Maybe Natural
-> Maybe Natural
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Ebs)
-> Either String (Maybe Natural)
-> Either
String
(Maybe Natural
-> Maybe Natural -> Maybe Bool -> Maybe Text -> Maybe Text -> Ebs)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Natural)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Throughput")
Either
String
(Maybe Natural
-> Maybe Natural -> Maybe Bool -> Maybe Text -> Maybe Text -> Ebs)
-> Either String (Maybe Natural)
-> Either
String
(Maybe Natural -> Maybe Bool -> Maybe Text -> Maybe Text -> Ebs)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Natural)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"VolumeSize")
Either
String
(Maybe Natural -> Maybe Bool -> Maybe Text -> Maybe Text -> Ebs)
-> Either String (Maybe Natural)
-> Either String (Maybe Bool -> Maybe Text -> Maybe Text -> Ebs)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Natural)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Iops")
Either String (Maybe Bool -> Maybe Text -> Maybe Text -> Ebs)
-> Either String (Maybe Bool)
-> Either String (Maybe Text -> Maybe Text -> Ebs)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Encrypted")
Either String (Maybe Text -> Maybe Text -> Ebs)
-> Either String (Maybe Text) -> Either String (Maybe Text -> Ebs)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"VolumeType")
Either String (Maybe Text -> Ebs)
-> Either String (Maybe Text) -> Either String Ebs
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SnapshotId")
instance Prelude.Hashable Ebs
instance Prelude.NFData Ebs
instance Core.ToQuery Ebs where
toQuery :: Ebs -> QueryString
toQuery Ebs' {Maybe Bool
Maybe Natural
Maybe Text
snapshotId :: Maybe Text
volumeType :: Maybe Text
encrypted :: Maybe Bool
iops :: Maybe Natural
volumeSize :: Maybe Natural
throughput :: Maybe Natural
deleteOnTermination :: Maybe Bool
$sel:snapshotId:Ebs' :: Ebs -> Maybe Text
$sel:volumeType:Ebs' :: Ebs -> Maybe Text
$sel:encrypted:Ebs' :: Ebs -> Maybe Bool
$sel:iops:Ebs' :: Ebs -> Maybe Natural
$sel:volumeSize:Ebs' :: Ebs -> Maybe Natural
$sel:throughput:Ebs' :: Ebs -> Maybe Natural
$sel:deleteOnTermination:Ebs' :: Ebs -> Maybe Bool
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"DeleteOnTermination" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
deleteOnTermination,
ByteString
"Throughput" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
throughput,
ByteString
"VolumeSize" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
volumeSize,
ByteString
"Iops" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
iops,
ByteString
"Encrypted" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
encrypted,
ByteString
"VolumeType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
volumeType,
ByteString
"SnapshotId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
snapshotId
]