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

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

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

instance
  Data.FromXML
    FastLaunchSnapshotConfigurationResponse
  where
  parseXML :: [Node] -> Either String FastLaunchSnapshotConfigurationResponse
parseXML [Node]
x =
    Maybe Int -> FastLaunchSnapshotConfigurationResponse
FastLaunchSnapshotConfigurationResponse'
      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
"targetResourceCount")

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

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