{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.EC2.Types.EnclaveOptionsRequest
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EC2.Types.EnclaveOptionsRequest 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

-- | Indicates whether the instance is enabled for Amazon Web Services Nitro
-- Enclaves. For more information, see
-- <https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html What is Amazon Web Services Nitro Enclaves?>
-- in the /Amazon Web Services Nitro Enclaves User Guide/.
--
-- /See:/ 'newEnclaveOptionsRequest' smart constructor.
data EnclaveOptionsRequest = EnclaveOptionsRequest'
  { -- | To enable the instance for Amazon Web Services Nitro Enclaves, set this
    -- parameter to @true@.
    EnclaveOptionsRequest -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool
  }
  deriving (EnclaveOptionsRequest -> EnclaveOptionsRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnclaveOptionsRequest -> EnclaveOptionsRequest -> Bool
$c/= :: EnclaveOptionsRequest -> EnclaveOptionsRequest -> Bool
== :: EnclaveOptionsRequest -> EnclaveOptionsRequest -> Bool
$c== :: EnclaveOptionsRequest -> EnclaveOptionsRequest -> Bool
Prelude.Eq, ReadPrec [EnclaveOptionsRequest]
ReadPrec EnclaveOptionsRequest
Int -> ReadS EnclaveOptionsRequest
ReadS [EnclaveOptionsRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnclaveOptionsRequest]
$creadListPrec :: ReadPrec [EnclaveOptionsRequest]
readPrec :: ReadPrec EnclaveOptionsRequest
$creadPrec :: ReadPrec EnclaveOptionsRequest
readList :: ReadS [EnclaveOptionsRequest]
$creadList :: ReadS [EnclaveOptionsRequest]
readsPrec :: Int -> ReadS EnclaveOptionsRequest
$creadsPrec :: Int -> ReadS EnclaveOptionsRequest
Prelude.Read, Int -> EnclaveOptionsRequest -> ShowS
[EnclaveOptionsRequest] -> ShowS
EnclaveOptionsRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnclaveOptionsRequest] -> ShowS
$cshowList :: [EnclaveOptionsRequest] -> ShowS
show :: EnclaveOptionsRequest -> String
$cshow :: EnclaveOptionsRequest -> String
showsPrec :: Int -> EnclaveOptionsRequest -> ShowS
$cshowsPrec :: Int -> EnclaveOptionsRequest -> ShowS
Prelude.Show, forall x. Rep EnclaveOptionsRequest x -> EnclaveOptionsRequest
forall x. EnclaveOptionsRequest -> Rep EnclaveOptionsRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EnclaveOptionsRequest x -> EnclaveOptionsRequest
$cfrom :: forall x. EnclaveOptionsRequest -> Rep EnclaveOptionsRequest x
Prelude.Generic)

-- |
-- Create a value of 'EnclaveOptionsRequest' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'enabled', 'enclaveOptionsRequest_enabled' - To enable the instance for Amazon Web Services Nitro Enclaves, set this
-- parameter to @true@.
newEnclaveOptionsRequest ::
  EnclaveOptionsRequest
newEnclaveOptionsRequest :: EnclaveOptionsRequest
newEnclaveOptionsRequest =
  EnclaveOptionsRequest' {$sel:enabled:EnclaveOptionsRequest' :: Maybe Bool
enabled = forall a. Maybe a
Prelude.Nothing}

-- | To enable the instance for Amazon Web Services Nitro Enclaves, set this
-- parameter to @true@.
enclaveOptionsRequest_enabled :: Lens.Lens' EnclaveOptionsRequest (Prelude.Maybe Prelude.Bool)
enclaveOptionsRequest_enabled :: Lens' EnclaveOptionsRequest (Maybe Bool)
enclaveOptionsRequest_enabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnclaveOptionsRequest' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:EnclaveOptionsRequest' :: EnclaveOptionsRequest -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: EnclaveOptionsRequest
s@EnclaveOptionsRequest' {} Maybe Bool
a -> EnclaveOptionsRequest
s {$sel:enabled:EnclaveOptionsRequest' :: Maybe Bool
enabled = Maybe Bool
a} :: EnclaveOptionsRequest)

instance Prelude.Hashable EnclaveOptionsRequest where
  hashWithSalt :: Int -> EnclaveOptionsRequest -> Int
hashWithSalt Int
_salt EnclaveOptionsRequest' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:EnclaveOptionsRequest' :: EnclaveOptionsRequest -> Maybe Bool
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enabled

instance Prelude.NFData EnclaveOptionsRequest where
  rnf :: EnclaveOptionsRequest -> ()
rnf EnclaveOptionsRequest' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:EnclaveOptionsRequest' :: EnclaveOptionsRequest -> Maybe Bool
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enabled

instance Data.ToQuery EnclaveOptionsRequest where
  toQuery :: EnclaveOptionsRequest -> QueryString
toQuery EnclaveOptionsRequest' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:EnclaveOptionsRequest' :: EnclaveOptionsRequest -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"Enabled" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
enabled]