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