{-# 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.LaunchTemplateEnclaveOptionsRequest
-- 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.LaunchTemplateEnclaveOptionsRequest 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:/ 'newLaunchTemplateEnclaveOptionsRequest' smart constructor.
data LaunchTemplateEnclaveOptionsRequest = LaunchTemplateEnclaveOptionsRequest'
  { -- | To enable the instance for Amazon Web Services Nitro Enclaves, set this
    -- parameter to @true@.
    LaunchTemplateEnclaveOptionsRequest -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool
  }
  deriving (LaunchTemplateEnclaveOptionsRequest
-> LaunchTemplateEnclaveOptionsRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LaunchTemplateEnclaveOptionsRequest
-> LaunchTemplateEnclaveOptionsRequest -> Bool
$c/= :: LaunchTemplateEnclaveOptionsRequest
-> LaunchTemplateEnclaveOptionsRequest -> Bool
== :: LaunchTemplateEnclaveOptionsRequest
-> LaunchTemplateEnclaveOptionsRequest -> Bool
$c== :: LaunchTemplateEnclaveOptionsRequest
-> LaunchTemplateEnclaveOptionsRequest -> Bool
Prelude.Eq, ReadPrec [LaunchTemplateEnclaveOptionsRequest]
ReadPrec LaunchTemplateEnclaveOptionsRequest
Int -> ReadS LaunchTemplateEnclaveOptionsRequest
ReadS [LaunchTemplateEnclaveOptionsRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LaunchTemplateEnclaveOptionsRequest]
$creadListPrec :: ReadPrec [LaunchTemplateEnclaveOptionsRequest]
readPrec :: ReadPrec LaunchTemplateEnclaveOptionsRequest
$creadPrec :: ReadPrec LaunchTemplateEnclaveOptionsRequest
readList :: ReadS [LaunchTemplateEnclaveOptionsRequest]
$creadList :: ReadS [LaunchTemplateEnclaveOptionsRequest]
readsPrec :: Int -> ReadS LaunchTemplateEnclaveOptionsRequest
$creadsPrec :: Int -> ReadS LaunchTemplateEnclaveOptionsRequest
Prelude.Read, Int -> LaunchTemplateEnclaveOptionsRequest -> ShowS
[LaunchTemplateEnclaveOptionsRequest] -> ShowS
LaunchTemplateEnclaveOptionsRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LaunchTemplateEnclaveOptionsRequest] -> ShowS
$cshowList :: [LaunchTemplateEnclaveOptionsRequest] -> ShowS
show :: LaunchTemplateEnclaveOptionsRequest -> String
$cshow :: LaunchTemplateEnclaveOptionsRequest -> String
showsPrec :: Int -> LaunchTemplateEnclaveOptionsRequest -> ShowS
$cshowsPrec :: Int -> LaunchTemplateEnclaveOptionsRequest -> ShowS
Prelude.Show, forall x.
Rep LaunchTemplateEnclaveOptionsRequest x
-> LaunchTemplateEnclaveOptionsRequest
forall x.
LaunchTemplateEnclaveOptionsRequest
-> Rep LaunchTemplateEnclaveOptionsRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LaunchTemplateEnclaveOptionsRequest x
-> LaunchTemplateEnclaveOptionsRequest
$cfrom :: forall x.
LaunchTemplateEnclaveOptionsRequest
-> Rep LaunchTemplateEnclaveOptionsRequest x
Prelude.Generic)

-- |
-- Create a value of 'LaunchTemplateEnclaveOptionsRequest' 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', 'launchTemplateEnclaveOptionsRequest_enabled' - To enable the instance for Amazon Web Services Nitro Enclaves, set this
-- parameter to @true@.
newLaunchTemplateEnclaveOptionsRequest ::
  LaunchTemplateEnclaveOptionsRequest
newLaunchTemplateEnclaveOptionsRequest :: LaunchTemplateEnclaveOptionsRequest
newLaunchTemplateEnclaveOptionsRequest =
  LaunchTemplateEnclaveOptionsRequest'
    { $sel:enabled:LaunchTemplateEnclaveOptionsRequest' :: Maybe Bool
enabled =
        forall a. Maybe a
Prelude.Nothing
    }

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

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

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

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