{-# 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.EnclaveOptions 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 qualified Amazonka.Prelude as Prelude
data EnclaveOptions = EnclaveOptions'
{
EnclaveOptions -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool
}
deriving (EnclaveOptions -> EnclaveOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnclaveOptions -> EnclaveOptions -> Bool
$c/= :: EnclaveOptions -> EnclaveOptions -> Bool
== :: EnclaveOptions -> EnclaveOptions -> Bool
$c== :: EnclaveOptions -> EnclaveOptions -> Bool
Prelude.Eq, ReadPrec [EnclaveOptions]
ReadPrec EnclaveOptions
Int -> ReadS EnclaveOptions
ReadS [EnclaveOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnclaveOptions]
$creadListPrec :: ReadPrec [EnclaveOptions]
readPrec :: ReadPrec EnclaveOptions
$creadPrec :: ReadPrec EnclaveOptions
readList :: ReadS [EnclaveOptions]
$creadList :: ReadS [EnclaveOptions]
readsPrec :: Int -> ReadS EnclaveOptions
$creadsPrec :: Int -> ReadS EnclaveOptions
Prelude.Read, Int -> EnclaveOptions -> ShowS
[EnclaveOptions] -> ShowS
EnclaveOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnclaveOptions] -> ShowS
$cshowList :: [EnclaveOptions] -> ShowS
show :: EnclaveOptions -> String
$cshow :: EnclaveOptions -> String
showsPrec :: Int -> EnclaveOptions -> ShowS
$cshowsPrec :: Int -> EnclaveOptions -> ShowS
Prelude.Show, forall x. Rep EnclaveOptions x -> EnclaveOptions
forall x. EnclaveOptions -> Rep EnclaveOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EnclaveOptions x -> EnclaveOptions
$cfrom :: forall x. EnclaveOptions -> Rep EnclaveOptions x
Prelude.Generic)
newEnclaveOptions ::
EnclaveOptions
newEnclaveOptions :: EnclaveOptions
newEnclaveOptions =
EnclaveOptions' {$sel:enabled:EnclaveOptions' :: Maybe Bool
enabled = forall a. Maybe a
Prelude.Nothing}
enclaveOptions_enabled :: Lens.Lens' EnclaveOptions (Prelude.Maybe Prelude.Bool)
enclaveOptions_enabled :: Lens' EnclaveOptions (Maybe Bool)
enclaveOptions_enabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnclaveOptions' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:EnclaveOptions' :: EnclaveOptions -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: EnclaveOptions
s@EnclaveOptions' {} Maybe Bool
a -> EnclaveOptions
s {$sel:enabled:EnclaveOptions' :: Maybe Bool
enabled = Maybe Bool
a} :: EnclaveOptions)
instance Data.FromXML EnclaveOptions where
parseXML :: [Node] -> Either String EnclaveOptions
parseXML [Node]
x =
Maybe Bool -> EnclaveOptions
EnclaveOptions' 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
"enabled")
instance Prelude.Hashable EnclaveOptions where
hashWithSalt :: Int -> EnclaveOptions -> Int
hashWithSalt Int
_salt EnclaveOptions' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:EnclaveOptions' :: EnclaveOptions -> Maybe Bool
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enabled
instance Prelude.NFData EnclaveOptions where
rnf :: EnclaveOptions -> ()
rnf EnclaveOptions' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:EnclaveOptions' :: EnclaveOptions -> Maybe Bool
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enabled