{-# 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.FastLaunchSnapshotConfigurationRequest
-- 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.FastLaunchSnapshotConfigurationRequest 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

-- | Configuration settings for creating and managing pre-provisioned
-- snapshots for a fast-launch enabled Windows AMI.
--
-- /See:/ 'newFastLaunchSnapshotConfigurationRequest' smart constructor.
data FastLaunchSnapshotConfigurationRequest = FastLaunchSnapshotConfigurationRequest'
  { -- | The number of pre-provisioned snapshots to keep on hand for a
    -- fast-launch enabled Windows AMI.
    FastLaunchSnapshotConfigurationRequest -> Maybe Int
targetResourceCount :: Prelude.Maybe Prelude.Int
  }
  deriving (FastLaunchSnapshotConfigurationRequest
-> FastLaunchSnapshotConfigurationRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FastLaunchSnapshotConfigurationRequest
-> FastLaunchSnapshotConfigurationRequest -> Bool
$c/= :: FastLaunchSnapshotConfigurationRequest
-> FastLaunchSnapshotConfigurationRequest -> Bool
== :: FastLaunchSnapshotConfigurationRequest
-> FastLaunchSnapshotConfigurationRequest -> Bool
$c== :: FastLaunchSnapshotConfigurationRequest
-> FastLaunchSnapshotConfigurationRequest -> Bool
Prelude.Eq, ReadPrec [FastLaunchSnapshotConfigurationRequest]
ReadPrec FastLaunchSnapshotConfigurationRequest
Int -> ReadS FastLaunchSnapshotConfigurationRequest
ReadS [FastLaunchSnapshotConfigurationRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FastLaunchSnapshotConfigurationRequest]
$creadListPrec :: ReadPrec [FastLaunchSnapshotConfigurationRequest]
readPrec :: ReadPrec FastLaunchSnapshotConfigurationRequest
$creadPrec :: ReadPrec FastLaunchSnapshotConfigurationRequest
readList :: ReadS [FastLaunchSnapshotConfigurationRequest]
$creadList :: ReadS [FastLaunchSnapshotConfigurationRequest]
readsPrec :: Int -> ReadS FastLaunchSnapshotConfigurationRequest
$creadsPrec :: Int -> ReadS FastLaunchSnapshotConfigurationRequest
Prelude.Read, Int -> FastLaunchSnapshotConfigurationRequest -> ShowS
[FastLaunchSnapshotConfigurationRequest] -> ShowS
FastLaunchSnapshotConfigurationRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FastLaunchSnapshotConfigurationRequest] -> ShowS
$cshowList :: [FastLaunchSnapshotConfigurationRequest] -> ShowS
show :: FastLaunchSnapshotConfigurationRequest -> String
$cshow :: FastLaunchSnapshotConfigurationRequest -> String
showsPrec :: Int -> FastLaunchSnapshotConfigurationRequest -> ShowS
$cshowsPrec :: Int -> FastLaunchSnapshotConfigurationRequest -> ShowS
Prelude.Show, forall x.
Rep FastLaunchSnapshotConfigurationRequest x
-> FastLaunchSnapshotConfigurationRequest
forall x.
FastLaunchSnapshotConfigurationRequest
-> Rep FastLaunchSnapshotConfigurationRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FastLaunchSnapshotConfigurationRequest x
-> FastLaunchSnapshotConfigurationRequest
$cfrom :: forall x.
FastLaunchSnapshotConfigurationRequest
-> Rep FastLaunchSnapshotConfigurationRequest x
Prelude.Generic)

-- |
-- Create a value of 'FastLaunchSnapshotConfigurationRequest' 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:
--
-- 'targetResourceCount', 'fastLaunchSnapshotConfigurationRequest_targetResourceCount' - The number of pre-provisioned snapshots to keep on hand for a
-- fast-launch enabled Windows AMI.
newFastLaunchSnapshotConfigurationRequest ::
  FastLaunchSnapshotConfigurationRequest
newFastLaunchSnapshotConfigurationRequest :: FastLaunchSnapshotConfigurationRequest
newFastLaunchSnapshotConfigurationRequest =
  FastLaunchSnapshotConfigurationRequest'
    { $sel:targetResourceCount:FastLaunchSnapshotConfigurationRequest' :: Maybe Int
targetResourceCount =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The number of pre-provisioned snapshots to keep on hand for a
-- fast-launch enabled Windows AMI.
fastLaunchSnapshotConfigurationRequest_targetResourceCount :: Lens.Lens' FastLaunchSnapshotConfigurationRequest (Prelude.Maybe Prelude.Int)
fastLaunchSnapshotConfigurationRequest_targetResourceCount :: Lens' FastLaunchSnapshotConfigurationRequest (Maybe Int)
fastLaunchSnapshotConfigurationRequest_targetResourceCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FastLaunchSnapshotConfigurationRequest' {Maybe Int
targetResourceCount :: Maybe Int
$sel:targetResourceCount:FastLaunchSnapshotConfigurationRequest' :: FastLaunchSnapshotConfigurationRequest -> Maybe Int
targetResourceCount} -> Maybe Int
targetResourceCount) (\s :: FastLaunchSnapshotConfigurationRequest
s@FastLaunchSnapshotConfigurationRequest' {} Maybe Int
a -> FastLaunchSnapshotConfigurationRequest
s {$sel:targetResourceCount:FastLaunchSnapshotConfigurationRequest' :: Maybe Int
targetResourceCount = Maybe Int
a} :: FastLaunchSnapshotConfigurationRequest)

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

instance
  Prelude.NFData
    FastLaunchSnapshotConfigurationRequest
  where
  rnf :: FastLaunchSnapshotConfigurationRequest -> ()
rnf FastLaunchSnapshotConfigurationRequest' {Maybe Int
targetResourceCount :: Maybe Int
$sel:targetResourceCount:FastLaunchSnapshotConfigurationRequest' :: FastLaunchSnapshotConfigurationRequest -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
targetResourceCount

instance
  Data.ToQuery
    FastLaunchSnapshotConfigurationRequest
  where
  toQuery :: FastLaunchSnapshotConfigurationRequest -> QueryString
toQuery FastLaunchSnapshotConfigurationRequest' {Maybe Int
targetResourceCount :: Maybe Int
$sel:targetResourceCount:FastLaunchSnapshotConfigurationRequest' :: FastLaunchSnapshotConfigurationRequest -> Maybe Int
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"TargetResourceCount" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
targetResourceCount]