{-# 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.EbsInfo 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.EbsEncryptionSupport
import Amazonka.EC2.Types.EbsNvmeSupport
import Amazonka.EC2.Types.EbsOptimizedInfo
import Amazonka.EC2.Types.EbsOptimizedSupport
import qualified Amazonka.Prelude as Prelude
data EbsInfo = EbsInfo'
{
EbsInfo -> Maybe EbsOptimizedInfo
ebsOptimizedInfo :: Prelude.Maybe EbsOptimizedInfo,
EbsInfo -> Maybe EbsOptimizedSupport
ebsOptimizedSupport :: Prelude.Maybe EbsOptimizedSupport,
EbsInfo -> Maybe EbsEncryptionSupport
encryptionSupport :: Prelude.Maybe EbsEncryptionSupport,
EbsInfo -> Maybe EbsNvmeSupport
nvmeSupport :: Prelude.Maybe EbsNvmeSupport
}
deriving (EbsInfo -> EbsInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EbsInfo -> EbsInfo -> Bool
$c/= :: EbsInfo -> EbsInfo -> Bool
== :: EbsInfo -> EbsInfo -> Bool
$c== :: EbsInfo -> EbsInfo -> Bool
Prelude.Eq, ReadPrec [EbsInfo]
ReadPrec EbsInfo
Int -> ReadS EbsInfo
ReadS [EbsInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EbsInfo]
$creadListPrec :: ReadPrec [EbsInfo]
readPrec :: ReadPrec EbsInfo
$creadPrec :: ReadPrec EbsInfo
readList :: ReadS [EbsInfo]
$creadList :: ReadS [EbsInfo]
readsPrec :: Int -> ReadS EbsInfo
$creadsPrec :: Int -> ReadS EbsInfo
Prelude.Read, Int -> EbsInfo -> ShowS
[EbsInfo] -> ShowS
EbsInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EbsInfo] -> ShowS
$cshowList :: [EbsInfo] -> ShowS
show :: EbsInfo -> String
$cshow :: EbsInfo -> String
showsPrec :: Int -> EbsInfo -> ShowS
$cshowsPrec :: Int -> EbsInfo -> ShowS
Prelude.Show, forall x. Rep EbsInfo x -> EbsInfo
forall x. EbsInfo -> Rep EbsInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EbsInfo x -> EbsInfo
$cfrom :: forall x. EbsInfo -> Rep EbsInfo x
Prelude.Generic)
newEbsInfo ::
EbsInfo
newEbsInfo :: EbsInfo
newEbsInfo =
EbsInfo'
{ $sel:ebsOptimizedInfo:EbsInfo' :: Maybe EbsOptimizedInfo
ebsOptimizedInfo = forall a. Maybe a
Prelude.Nothing,
$sel:ebsOptimizedSupport:EbsInfo' :: Maybe EbsOptimizedSupport
ebsOptimizedSupport = forall a. Maybe a
Prelude.Nothing,
$sel:encryptionSupport:EbsInfo' :: Maybe EbsEncryptionSupport
encryptionSupport = forall a. Maybe a
Prelude.Nothing,
$sel:nvmeSupport:EbsInfo' :: Maybe EbsNvmeSupport
nvmeSupport = forall a. Maybe a
Prelude.Nothing
}
ebsInfo_ebsOptimizedInfo :: Lens.Lens' EbsInfo (Prelude.Maybe EbsOptimizedInfo)
ebsInfo_ebsOptimizedInfo :: Lens' EbsInfo (Maybe EbsOptimizedInfo)
ebsInfo_ebsOptimizedInfo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EbsInfo' {Maybe EbsOptimizedInfo
ebsOptimizedInfo :: Maybe EbsOptimizedInfo
$sel:ebsOptimizedInfo:EbsInfo' :: EbsInfo -> Maybe EbsOptimizedInfo
ebsOptimizedInfo} -> Maybe EbsOptimizedInfo
ebsOptimizedInfo) (\s :: EbsInfo
s@EbsInfo' {} Maybe EbsOptimizedInfo
a -> EbsInfo
s {$sel:ebsOptimizedInfo:EbsInfo' :: Maybe EbsOptimizedInfo
ebsOptimizedInfo = Maybe EbsOptimizedInfo
a} :: EbsInfo)
ebsInfo_ebsOptimizedSupport :: Lens.Lens' EbsInfo (Prelude.Maybe EbsOptimizedSupport)
ebsInfo_ebsOptimizedSupport :: Lens' EbsInfo (Maybe EbsOptimizedSupport)
ebsInfo_ebsOptimizedSupport = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EbsInfo' {Maybe EbsOptimizedSupport
ebsOptimizedSupport :: Maybe EbsOptimizedSupport
$sel:ebsOptimizedSupport:EbsInfo' :: EbsInfo -> Maybe EbsOptimizedSupport
ebsOptimizedSupport} -> Maybe EbsOptimizedSupport
ebsOptimizedSupport) (\s :: EbsInfo
s@EbsInfo' {} Maybe EbsOptimizedSupport
a -> EbsInfo
s {$sel:ebsOptimizedSupport:EbsInfo' :: Maybe EbsOptimizedSupport
ebsOptimizedSupport = Maybe EbsOptimizedSupport
a} :: EbsInfo)
ebsInfo_encryptionSupport :: Lens.Lens' EbsInfo (Prelude.Maybe EbsEncryptionSupport)
ebsInfo_encryptionSupport :: Lens' EbsInfo (Maybe EbsEncryptionSupport)
ebsInfo_encryptionSupport = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EbsInfo' {Maybe EbsEncryptionSupport
encryptionSupport :: Maybe EbsEncryptionSupport
$sel:encryptionSupport:EbsInfo' :: EbsInfo -> Maybe EbsEncryptionSupport
encryptionSupport} -> Maybe EbsEncryptionSupport
encryptionSupport) (\s :: EbsInfo
s@EbsInfo' {} Maybe EbsEncryptionSupport
a -> EbsInfo
s {$sel:encryptionSupport:EbsInfo' :: Maybe EbsEncryptionSupport
encryptionSupport = Maybe EbsEncryptionSupport
a} :: EbsInfo)
ebsInfo_nvmeSupport :: Lens.Lens' EbsInfo (Prelude.Maybe EbsNvmeSupport)
ebsInfo_nvmeSupport :: Lens' EbsInfo (Maybe EbsNvmeSupport)
ebsInfo_nvmeSupport = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EbsInfo' {Maybe EbsNvmeSupport
nvmeSupport :: Maybe EbsNvmeSupport
$sel:nvmeSupport:EbsInfo' :: EbsInfo -> Maybe EbsNvmeSupport
nvmeSupport} -> Maybe EbsNvmeSupport
nvmeSupport) (\s :: EbsInfo
s@EbsInfo' {} Maybe EbsNvmeSupport
a -> EbsInfo
s {$sel:nvmeSupport:EbsInfo' :: Maybe EbsNvmeSupport
nvmeSupport = Maybe EbsNvmeSupport
a} :: EbsInfo)
instance Data.FromXML EbsInfo where
parseXML :: [Node] -> Either String EbsInfo
parseXML [Node]
x =
Maybe EbsOptimizedInfo
-> Maybe EbsOptimizedSupport
-> Maybe EbsEncryptionSupport
-> Maybe EbsNvmeSupport
-> EbsInfo
EbsInfo'
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
"ebsOptimizedInfo")
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
"ebsOptimizedSupport")
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
"encryptionSupport")
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
"nvmeSupport")
instance Prelude.Hashable EbsInfo where
hashWithSalt :: Int -> EbsInfo -> Int
hashWithSalt Int
_salt EbsInfo' {Maybe EbsEncryptionSupport
Maybe EbsNvmeSupport
Maybe EbsOptimizedInfo
Maybe EbsOptimizedSupport
nvmeSupport :: Maybe EbsNvmeSupport
encryptionSupport :: Maybe EbsEncryptionSupport
ebsOptimizedSupport :: Maybe EbsOptimizedSupport
ebsOptimizedInfo :: Maybe EbsOptimizedInfo
$sel:nvmeSupport:EbsInfo' :: EbsInfo -> Maybe EbsNvmeSupport
$sel:encryptionSupport:EbsInfo' :: EbsInfo -> Maybe EbsEncryptionSupport
$sel:ebsOptimizedSupport:EbsInfo' :: EbsInfo -> Maybe EbsOptimizedSupport
$sel:ebsOptimizedInfo:EbsInfo' :: EbsInfo -> Maybe EbsOptimizedInfo
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EbsOptimizedInfo
ebsOptimizedInfo
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EbsOptimizedSupport
ebsOptimizedSupport
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EbsEncryptionSupport
encryptionSupport
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EbsNvmeSupport
nvmeSupport
instance Prelude.NFData EbsInfo where
rnf :: EbsInfo -> ()
rnf EbsInfo' {Maybe EbsEncryptionSupport
Maybe EbsNvmeSupport
Maybe EbsOptimizedInfo
Maybe EbsOptimizedSupport
nvmeSupport :: Maybe EbsNvmeSupport
encryptionSupport :: Maybe EbsEncryptionSupport
ebsOptimizedSupport :: Maybe EbsOptimizedSupport
ebsOptimizedInfo :: Maybe EbsOptimizedInfo
$sel:nvmeSupport:EbsInfo' :: EbsInfo -> Maybe EbsNvmeSupport
$sel:encryptionSupport:EbsInfo' :: EbsInfo -> Maybe EbsEncryptionSupport
$sel:ebsOptimizedSupport:EbsInfo' :: EbsInfo -> Maybe EbsOptimizedSupport
$sel:ebsOptimizedInfo:EbsInfo' :: EbsInfo -> Maybe EbsOptimizedInfo
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe EbsOptimizedInfo
ebsOptimizedInfo
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EbsOptimizedSupport
ebsOptimizedSupport
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EbsEncryptionSupport
encryptionSupport
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EbsNvmeSupport
nvmeSupport