{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.DisableFastLaunch
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Discontinue faster launching for a Windows AMI, and clean up existing
-- pre-provisioned snapshots. When you disable faster launching, the AMI
-- uses the standard launch process for each instance. All pre-provisioned
-- snapshots must be removed before you can enable faster launching again.
--
-- To change these settings, you must own the AMI.
module Amazonka.EC2.DisableFastLaunch
  ( -- * Creating a Request
    DisableFastLaunch (..),
    newDisableFastLaunch,

    -- * Request Lenses
    disableFastLaunch_dryRun,
    disableFastLaunch_force,
    disableFastLaunch_imageId,

    -- * Destructuring the Response
    DisableFastLaunchResponse (..),
    newDisableFastLaunchResponse,

    -- * Response Lenses
    disableFastLaunchResponse_imageId,
    disableFastLaunchResponse_launchTemplate,
    disableFastLaunchResponse_maxParallelLaunches,
    disableFastLaunchResponse_ownerId,
    disableFastLaunchResponse_resourceType,
    disableFastLaunchResponse_snapshotConfiguration,
    disableFastLaunchResponse_state,
    disableFastLaunchResponse_stateTransitionReason,
    disableFastLaunchResponse_stateTransitionTime,
    disableFastLaunchResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDisableFastLaunch' smart constructor.
data DisableFastLaunch = DisableFastLaunch'
  { -- | Checks whether you have the required permissions for the action, without
    -- actually making the request, and provides an error response. If you have
    -- the required permissions, the error response is @DryRunOperation@.
    -- Otherwise, it is @UnauthorizedOperation@.
    DisableFastLaunch -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | Forces the image settings to turn off faster launching for your Windows
    -- AMI. This parameter overrides any errors that are encountered while
    -- cleaning up resources in your account.
    DisableFastLaunch -> Maybe Bool
force :: Prelude.Maybe Prelude.Bool,
    -- | The ID of the image for which you’re turning off faster launching, and
    -- removing pre-provisioned snapshots.
    DisableFastLaunch -> Text
imageId :: Prelude.Text
  }
  deriving (DisableFastLaunch -> DisableFastLaunch -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisableFastLaunch -> DisableFastLaunch -> Bool
$c/= :: DisableFastLaunch -> DisableFastLaunch -> Bool
== :: DisableFastLaunch -> DisableFastLaunch -> Bool
$c== :: DisableFastLaunch -> DisableFastLaunch -> Bool
Prelude.Eq, ReadPrec [DisableFastLaunch]
ReadPrec DisableFastLaunch
Int -> ReadS DisableFastLaunch
ReadS [DisableFastLaunch]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisableFastLaunch]
$creadListPrec :: ReadPrec [DisableFastLaunch]
readPrec :: ReadPrec DisableFastLaunch
$creadPrec :: ReadPrec DisableFastLaunch
readList :: ReadS [DisableFastLaunch]
$creadList :: ReadS [DisableFastLaunch]
readsPrec :: Int -> ReadS DisableFastLaunch
$creadsPrec :: Int -> ReadS DisableFastLaunch
Prelude.Read, Int -> DisableFastLaunch -> ShowS
[DisableFastLaunch] -> ShowS
DisableFastLaunch -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisableFastLaunch] -> ShowS
$cshowList :: [DisableFastLaunch] -> ShowS
show :: DisableFastLaunch -> String
$cshow :: DisableFastLaunch -> String
showsPrec :: Int -> DisableFastLaunch -> ShowS
$cshowsPrec :: Int -> DisableFastLaunch -> ShowS
Prelude.Show, forall x. Rep DisableFastLaunch x -> DisableFastLaunch
forall x. DisableFastLaunch -> Rep DisableFastLaunch x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DisableFastLaunch x -> DisableFastLaunch
$cfrom :: forall x. DisableFastLaunch -> Rep DisableFastLaunch x
Prelude.Generic)

-- |
-- Create a value of 'DisableFastLaunch' 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:
--
-- 'dryRun', 'disableFastLaunch_dryRun' - Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
--
-- 'force', 'disableFastLaunch_force' - Forces the image settings to turn off faster launching for your Windows
-- AMI. This parameter overrides any errors that are encountered while
-- cleaning up resources in your account.
--
-- 'imageId', 'disableFastLaunch_imageId' - The ID of the image for which you’re turning off faster launching, and
-- removing pre-provisioned snapshots.
newDisableFastLaunch ::
  -- | 'imageId'
  Prelude.Text ->
  DisableFastLaunch
newDisableFastLaunch :: Text -> DisableFastLaunch
newDisableFastLaunch Text
pImageId_ =
  DisableFastLaunch'
    { $sel:dryRun:DisableFastLaunch' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
      $sel:force:DisableFastLaunch' :: Maybe Bool
force = forall a. Maybe a
Prelude.Nothing,
      $sel:imageId:DisableFastLaunch' :: Text
imageId = Text
pImageId_
    }

-- | Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
disableFastLaunch_dryRun :: Lens.Lens' DisableFastLaunch (Prelude.Maybe Prelude.Bool)
disableFastLaunch_dryRun :: Lens' DisableFastLaunch (Maybe Bool)
disableFastLaunch_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableFastLaunch' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:DisableFastLaunch' :: DisableFastLaunch -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: DisableFastLaunch
s@DisableFastLaunch' {} Maybe Bool
a -> DisableFastLaunch
s {$sel:dryRun:DisableFastLaunch' :: Maybe Bool
dryRun = Maybe Bool
a} :: DisableFastLaunch)

-- | Forces the image settings to turn off faster launching for your Windows
-- AMI. This parameter overrides any errors that are encountered while
-- cleaning up resources in your account.
disableFastLaunch_force :: Lens.Lens' DisableFastLaunch (Prelude.Maybe Prelude.Bool)
disableFastLaunch_force :: Lens' DisableFastLaunch (Maybe Bool)
disableFastLaunch_force = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableFastLaunch' {Maybe Bool
force :: Maybe Bool
$sel:force:DisableFastLaunch' :: DisableFastLaunch -> Maybe Bool
force} -> Maybe Bool
force) (\s :: DisableFastLaunch
s@DisableFastLaunch' {} Maybe Bool
a -> DisableFastLaunch
s {$sel:force:DisableFastLaunch' :: Maybe Bool
force = Maybe Bool
a} :: DisableFastLaunch)

-- | The ID of the image for which you’re turning off faster launching, and
-- removing pre-provisioned snapshots.
disableFastLaunch_imageId :: Lens.Lens' DisableFastLaunch Prelude.Text
disableFastLaunch_imageId :: Lens' DisableFastLaunch Text
disableFastLaunch_imageId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableFastLaunch' {Text
imageId :: Text
$sel:imageId:DisableFastLaunch' :: DisableFastLaunch -> Text
imageId} -> Text
imageId) (\s :: DisableFastLaunch
s@DisableFastLaunch' {} Text
a -> DisableFastLaunch
s {$sel:imageId:DisableFastLaunch' :: Text
imageId = Text
a} :: DisableFastLaunch)

instance Core.AWSRequest DisableFastLaunch where
  type
    AWSResponse DisableFastLaunch =
      DisableFastLaunchResponse
  request :: (Service -> Service)
-> DisableFastLaunch -> Request DisableFastLaunch
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DisableFastLaunch
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DisableFastLaunch)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe FastLaunchLaunchTemplateSpecificationResponse
-> Maybe Int
-> Maybe Text
-> Maybe FastLaunchResourceType
-> Maybe FastLaunchSnapshotConfigurationResponse
-> Maybe FastLaunchStateCode
-> Maybe Text
-> Maybe ISO8601
-> Int
-> DisableFastLaunchResponse
DisableFastLaunchResponse'
            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
"imageId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"launchTemplate")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"maxParallelLaunches")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ownerId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"resourceType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"snapshotConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"state")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"stateTransitionReason")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"stateTransitionTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DisableFastLaunch where
  hashWithSalt :: Int -> DisableFastLaunch -> Int
hashWithSalt Int
_salt DisableFastLaunch' {Maybe Bool
Text
imageId :: Text
force :: Maybe Bool
dryRun :: Maybe Bool
$sel:imageId:DisableFastLaunch' :: DisableFastLaunch -> Text
$sel:force:DisableFastLaunch' :: DisableFastLaunch -> Maybe Bool
$sel:dryRun:DisableFastLaunch' :: DisableFastLaunch -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
force
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
imageId

instance Prelude.NFData DisableFastLaunch where
  rnf :: DisableFastLaunch -> ()
rnf DisableFastLaunch' {Maybe Bool
Text
imageId :: Text
force :: Maybe Bool
dryRun :: Maybe Bool
$sel:imageId:DisableFastLaunch' :: DisableFastLaunch -> Text
$sel:force:DisableFastLaunch' :: DisableFastLaunch -> Maybe Bool
$sel:dryRun:DisableFastLaunch' :: DisableFastLaunch -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
force
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
imageId

instance Data.ToHeaders DisableFastLaunch where
  toHeaders :: DisableFastLaunch -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath DisableFastLaunch where
  toPath :: DisableFastLaunch -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery DisableFastLaunch where
  toQuery :: DisableFastLaunch -> QueryString
toQuery DisableFastLaunch' {Maybe Bool
Text
imageId :: Text
force :: Maybe Bool
dryRun :: Maybe Bool
$sel:imageId:DisableFastLaunch' :: DisableFastLaunch -> Text
$sel:force:DisableFastLaunch' :: DisableFastLaunch -> Maybe Bool
$sel:dryRun:DisableFastLaunch' :: DisableFastLaunch -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DisableFastLaunch" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
        ByteString
"Force" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
force,
        ByteString
"ImageId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
imageId
      ]

-- | /See:/ 'newDisableFastLaunchResponse' smart constructor.
data DisableFastLaunchResponse = DisableFastLaunchResponse'
  { -- | The ID of the image for which faster-launching has been turned off.
    DisableFastLaunchResponse -> Maybe Text
imageId :: Prelude.Maybe Prelude.Text,
    -- | The launch template that was used to launch Windows instances from
    -- pre-provisioned snapshots.
    DisableFastLaunchResponse
-> Maybe FastLaunchLaunchTemplateSpecificationResponse
launchTemplate :: Prelude.Maybe FastLaunchLaunchTemplateSpecificationResponse,
    -- | The maximum number of parallel instances to launch for creating
    -- resources.
    DisableFastLaunchResponse -> Maybe Int
maxParallelLaunches :: Prelude.Maybe Prelude.Int,
    -- | The owner of the Windows AMI for which faster launching was turned off.
    DisableFastLaunchResponse -> Maybe Text
ownerId :: Prelude.Maybe Prelude.Text,
    -- | The pre-provisioning resource type that must be cleaned after turning
    -- off faster launching for the Windows AMI. Supported values include:
    -- @snapshot@.
    DisableFastLaunchResponse -> Maybe FastLaunchResourceType
resourceType :: Prelude.Maybe FastLaunchResourceType,
    -- | Parameters that were used for faster launching for the Windows AMI
    -- before faster launching was turned off. This informs the clean-up
    -- process.
    DisableFastLaunchResponse
-> Maybe FastLaunchSnapshotConfigurationResponse
snapshotConfiguration :: Prelude.Maybe FastLaunchSnapshotConfigurationResponse,
    -- | The current state of faster launching for the specified Windows AMI.
    DisableFastLaunchResponse -> Maybe FastLaunchStateCode
state :: Prelude.Maybe FastLaunchStateCode,
    -- | The reason that the state changed for faster launching for the Windows
    -- AMI.
    DisableFastLaunchResponse -> Maybe Text
stateTransitionReason :: Prelude.Maybe Prelude.Text,
    -- | The time that the state changed for faster launching for the Windows
    -- AMI.
    DisableFastLaunchResponse -> Maybe ISO8601
stateTransitionTime :: Prelude.Maybe Data.ISO8601,
    -- | The response's http status code.
    DisableFastLaunchResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DisableFastLaunchResponse -> DisableFastLaunchResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisableFastLaunchResponse -> DisableFastLaunchResponse -> Bool
$c/= :: DisableFastLaunchResponse -> DisableFastLaunchResponse -> Bool
== :: DisableFastLaunchResponse -> DisableFastLaunchResponse -> Bool
$c== :: DisableFastLaunchResponse -> DisableFastLaunchResponse -> Bool
Prelude.Eq, ReadPrec [DisableFastLaunchResponse]
ReadPrec DisableFastLaunchResponse
Int -> ReadS DisableFastLaunchResponse
ReadS [DisableFastLaunchResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisableFastLaunchResponse]
$creadListPrec :: ReadPrec [DisableFastLaunchResponse]
readPrec :: ReadPrec DisableFastLaunchResponse
$creadPrec :: ReadPrec DisableFastLaunchResponse
readList :: ReadS [DisableFastLaunchResponse]
$creadList :: ReadS [DisableFastLaunchResponse]
readsPrec :: Int -> ReadS DisableFastLaunchResponse
$creadsPrec :: Int -> ReadS DisableFastLaunchResponse
Prelude.Read, Int -> DisableFastLaunchResponse -> ShowS
[DisableFastLaunchResponse] -> ShowS
DisableFastLaunchResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisableFastLaunchResponse] -> ShowS
$cshowList :: [DisableFastLaunchResponse] -> ShowS
show :: DisableFastLaunchResponse -> String
$cshow :: DisableFastLaunchResponse -> String
showsPrec :: Int -> DisableFastLaunchResponse -> ShowS
$cshowsPrec :: Int -> DisableFastLaunchResponse -> ShowS
Prelude.Show, forall x.
Rep DisableFastLaunchResponse x -> DisableFastLaunchResponse
forall x.
DisableFastLaunchResponse -> Rep DisableFastLaunchResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisableFastLaunchResponse x -> DisableFastLaunchResponse
$cfrom :: forall x.
DisableFastLaunchResponse -> Rep DisableFastLaunchResponse x
Prelude.Generic)

-- |
-- Create a value of 'DisableFastLaunchResponse' 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:
--
-- 'imageId', 'disableFastLaunchResponse_imageId' - The ID of the image for which faster-launching has been turned off.
--
-- 'launchTemplate', 'disableFastLaunchResponse_launchTemplate' - The launch template that was used to launch Windows instances from
-- pre-provisioned snapshots.
--
-- 'maxParallelLaunches', 'disableFastLaunchResponse_maxParallelLaunches' - The maximum number of parallel instances to launch for creating
-- resources.
--
-- 'ownerId', 'disableFastLaunchResponse_ownerId' - The owner of the Windows AMI for which faster launching was turned off.
--
-- 'resourceType', 'disableFastLaunchResponse_resourceType' - The pre-provisioning resource type that must be cleaned after turning
-- off faster launching for the Windows AMI. Supported values include:
-- @snapshot@.
--
-- 'snapshotConfiguration', 'disableFastLaunchResponse_snapshotConfiguration' - Parameters that were used for faster launching for the Windows AMI
-- before faster launching was turned off. This informs the clean-up
-- process.
--
-- 'state', 'disableFastLaunchResponse_state' - The current state of faster launching for the specified Windows AMI.
--
-- 'stateTransitionReason', 'disableFastLaunchResponse_stateTransitionReason' - The reason that the state changed for faster launching for the Windows
-- AMI.
--
-- 'stateTransitionTime', 'disableFastLaunchResponse_stateTransitionTime' - The time that the state changed for faster launching for the Windows
-- AMI.
--
-- 'httpStatus', 'disableFastLaunchResponse_httpStatus' - The response's http status code.
newDisableFastLaunchResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DisableFastLaunchResponse
newDisableFastLaunchResponse :: Int -> DisableFastLaunchResponse
newDisableFastLaunchResponse Int
pHttpStatus_ =
  DisableFastLaunchResponse'
    { $sel:imageId:DisableFastLaunchResponse' :: Maybe Text
imageId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:launchTemplate:DisableFastLaunchResponse' :: Maybe FastLaunchLaunchTemplateSpecificationResponse
launchTemplate = forall a. Maybe a
Prelude.Nothing,
      $sel:maxParallelLaunches:DisableFastLaunchResponse' :: Maybe Int
maxParallelLaunches = forall a. Maybe a
Prelude.Nothing,
      $sel:ownerId:DisableFastLaunchResponse' :: Maybe Text
ownerId = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:DisableFastLaunchResponse' :: Maybe FastLaunchResourceType
resourceType = forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotConfiguration:DisableFastLaunchResponse' :: Maybe FastLaunchSnapshotConfigurationResponse
snapshotConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:state:DisableFastLaunchResponse' :: Maybe FastLaunchStateCode
state = forall a. Maybe a
Prelude.Nothing,
      $sel:stateTransitionReason:DisableFastLaunchResponse' :: Maybe Text
stateTransitionReason = forall a. Maybe a
Prelude.Nothing,
      $sel:stateTransitionTime:DisableFastLaunchResponse' :: Maybe ISO8601
stateTransitionTime = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DisableFastLaunchResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ID of the image for which faster-launching has been turned off.
disableFastLaunchResponse_imageId :: Lens.Lens' DisableFastLaunchResponse (Prelude.Maybe Prelude.Text)
disableFastLaunchResponse_imageId :: Lens' DisableFastLaunchResponse (Maybe Text)
disableFastLaunchResponse_imageId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableFastLaunchResponse' {Maybe Text
imageId :: Maybe Text
$sel:imageId:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Maybe Text
imageId} -> Maybe Text
imageId) (\s :: DisableFastLaunchResponse
s@DisableFastLaunchResponse' {} Maybe Text
a -> DisableFastLaunchResponse
s {$sel:imageId:DisableFastLaunchResponse' :: Maybe Text
imageId = Maybe Text
a} :: DisableFastLaunchResponse)

-- | The launch template that was used to launch Windows instances from
-- pre-provisioned snapshots.
disableFastLaunchResponse_launchTemplate :: Lens.Lens' DisableFastLaunchResponse (Prelude.Maybe FastLaunchLaunchTemplateSpecificationResponse)
disableFastLaunchResponse_launchTemplate :: Lens'
  DisableFastLaunchResponse
  (Maybe FastLaunchLaunchTemplateSpecificationResponse)
disableFastLaunchResponse_launchTemplate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableFastLaunchResponse' {Maybe FastLaunchLaunchTemplateSpecificationResponse
launchTemplate :: Maybe FastLaunchLaunchTemplateSpecificationResponse
$sel:launchTemplate:DisableFastLaunchResponse' :: DisableFastLaunchResponse
-> Maybe FastLaunchLaunchTemplateSpecificationResponse
launchTemplate} -> Maybe FastLaunchLaunchTemplateSpecificationResponse
launchTemplate) (\s :: DisableFastLaunchResponse
s@DisableFastLaunchResponse' {} Maybe FastLaunchLaunchTemplateSpecificationResponse
a -> DisableFastLaunchResponse
s {$sel:launchTemplate:DisableFastLaunchResponse' :: Maybe FastLaunchLaunchTemplateSpecificationResponse
launchTemplate = Maybe FastLaunchLaunchTemplateSpecificationResponse
a} :: DisableFastLaunchResponse)

-- | The maximum number of parallel instances to launch for creating
-- resources.
disableFastLaunchResponse_maxParallelLaunches :: Lens.Lens' DisableFastLaunchResponse (Prelude.Maybe Prelude.Int)
disableFastLaunchResponse_maxParallelLaunches :: Lens' DisableFastLaunchResponse (Maybe Int)
disableFastLaunchResponse_maxParallelLaunches = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableFastLaunchResponse' {Maybe Int
maxParallelLaunches :: Maybe Int
$sel:maxParallelLaunches:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Maybe Int
maxParallelLaunches} -> Maybe Int
maxParallelLaunches) (\s :: DisableFastLaunchResponse
s@DisableFastLaunchResponse' {} Maybe Int
a -> DisableFastLaunchResponse
s {$sel:maxParallelLaunches:DisableFastLaunchResponse' :: Maybe Int
maxParallelLaunches = Maybe Int
a} :: DisableFastLaunchResponse)

-- | The owner of the Windows AMI for which faster launching was turned off.
disableFastLaunchResponse_ownerId :: Lens.Lens' DisableFastLaunchResponse (Prelude.Maybe Prelude.Text)
disableFastLaunchResponse_ownerId :: Lens' DisableFastLaunchResponse (Maybe Text)
disableFastLaunchResponse_ownerId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableFastLaunchResponse' {Maybe Text
ownerId :: Maybe Text
$sel:ownerId:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Maybe Text
ownerId} -> Maybe Text
ownerId) (\s :: DisableFastLaunchResponse
s@DisableFastLaunchResponse' {} Maybe Text
a -> DisableFastLaunchResponse
s {$sel:ownerId:DisableFastLaunchResponse' :: Maybe Text
ownerId = Maybe Text
a} :: DisableFastLaunchResponse)

-- | The pre-provisioning resource type that must be cleaned after turning
-- off faster launching for the Windows AMI. Supported values include:
-- @snapshot@.
disableFastLaunchResponse_resourceType :: Lens.Lens' DisableFastLaunchResponse (Prelude.Maybe FastLaunchResourceType)
disableFastLaunchResponse_resourceType :: Lens' DisableFastLaunchResponse (Maybe FastLaunchResourceType)
disableFastLaunchResponse_resourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableFastLaunchResponse' {Maybe FastLaunchResourceType
resourceType :: Maybe FastLaunchResourceType
$sel:resourceType:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Maybe FastLaunchResourceType
resourceType} -> Maybe FastLaunchResourceType
resourceType) (\s :: DisableFastLaunchResponse
s@DisableFastLaunchResponse' {} Maybe FastLaunchResourceType
a -> DisableFastLaunchResponse
s {$sel:resourceType:DisableFastLaunchResponse' :: Maybe FastLaunchResourceType
resourceType = Maybe FastLaunchResourceType
a} :: DisableFastLaunchResponse)

-- | Parameters that were used for faster launching for the Windows AMI
-- before faster launching was turned off. This informs the clean-up
-- process.
disableFastLaunchResponse_snapshotConfiguration :: Lens.Lens' DisableFastLaunchResponse (Prelude.Maybe FastLaunchSnapshotConfigurationResponse)
disableFastLaunchResponse_snapshotConfiguration :: Lens'
  DisableFastLaunchResponse
  (Maybe FastLaunchSnapshotConfigurationResponse)
disableFastLaunchResponse_snapshotConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableFastLaunchResponse' {Maybe FastLaunchSnapshotConfigurationResponse
snapshotConfiguration :: Maybe FastLaunchSnapshotConfigurationResponse
$sel:snapshotConfiguration:DisableFastLaunchResponse' :: DisableFastLaunchResponse
-> Maybe FastLaunchSnapshotConfigurationResponse
snapshotConfiguration} -> Maybe FastLaunchSnapshotConfigurationResponse
snapshotConfiguration) (\s :: DisableFastLaunchResponse
s@DisableFastLaunchResponse' {} Maybe FastLaunchSnapshotConfigurationResponse
a -> DisableFastLaunchResponse
s {$sel:snapshotConfiguration:DisableFastLaunchResponse' :: Maybe FastLaunchSnapshotConfigurationResponse
snapshotConfiguration = Maybe FastLaunchSnapshotConfigurationResponse
a} :: DisableFastLaunchResponse)

-- | The current state of faster launching for the specified Windows AMI.
disableFastLaunchResponse_state :: Lens.Lens' DisableFastLaunchResponse (Prelude.Maybe FastLaunchStateCode)
disableFastLaunchResponse_state :: Lens' DisableFastLaunchResponse (Maybe FastLaunchStateCode)
disableFastLaunchResponse_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableFastLaunchResponse' {Maybe FastLaunchStateCode
state :: Maybe FastLaunchStateCode
$sel:state:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Maybe FastLaunchStateCode
state} -> Maybe FastLaunchStateCode
state) (\s :: DisableFastLaunchResponse
s@DisableFastLaunchResponse' {} Maybe FastLaunchStateCode
a -> DisableFastLaunchResponse
s {$sel:state:DisableFastLaunchResponse' :: Maybe FastLaunchStateCode
state = Maybe FastLaunchStateCode
a} :: DisableFastLaunchResponse)

-- | The reason that the state changed for faster launching for the Windows
-- AMI.
disableFastLaunchResponse_stateTransitionReason :: Lens.Lens' DisableFastLaunchResponse (Prelude.Maybe Prelude.Text)
disableFastLaunchResponse_stateTransitionReason :: Lens' DisableFastLaunchResponse (Maybe Text)
disableFastLaunchResponse_stateTransitionReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableFastLaunchResponse' {Maybe Text
stateTransitionReason :: Maybe Text
$sel:stateTransitionReason:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Maybe Text
stateTransitionReason} -> Maybe Text
stateTransitionReason) (\s :: DisableFastLaunchResponse
s@DisableFastLaunchResponse' {} Maybe Text
a -> DisableFastLaunchResponse
s {$sel:stateTransitionReason:DisableFastLaunchResponse' :: Maybe Text
stateTransitionReason = Maybe Text
a} :: DisableFastLaunchResponse)

-- | The time that the state changed for faster launching for the Windows
-- AMI.
disableFastLaunchResponse_stateTransitionTime :: Lens.Lens' DisableFastLaunchResponse (Prelude.Maybe Prelude.UTCTime)
disableFastLaunchResponse_stateTransitionTime :: Lens' DisableFastLaunchResponse (Maybe UTCTime)
disableFastLaunchResponse_stateTransitionTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableFastLaunchResponse' {Maybe ISO8601
stateTransitionTime :: Maybe ISO8601
$sel:stateTransitionTime:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Maybe ISO8601
stateTransitionTime} -> Maybe ISO8601
stateTransitionTime) (\s :: DisableFastLaunchResponse
s@DisableFastLaunchResponse' {} Maybe ISO8601
a -> DisableFastLaunchResponse
s {$sel:stateTransitionTime:DisableFastLaunchResponse' :: Maybe ISO8601
stateTransitionTime = Maybe ISO8601
a} :: DisableFastLaunchResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The response's http status code.
disableFastLaunchResponse_httpStatus :: Lens.Lens' DisableFastLaunchResponse Prelude.Int
disableFastLaunchResponse_httpStatus :: Lens' DisableFastLaunchResponse Int
disableFastLaunchResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableFastLaunchResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisableFastLaunchResponse
s@DisableFastLaunchResponse' {} Int
a -> DisableFastLaunchResponse
s {$sel:httpStatus:DisableFastLaunchResponse' :: Int
httpStatus = Int
a} :: DisableFastLaunchResponse)

instance Prelude.NFData DisableFastLaunchResponse where
  rnf :: DisableFastLaunchResponse -> ()
rnf DisableFastLaunchResponse' {Int
Maybe Int
Maybe Text
Maybe ISO8601
Maybe FastLaunchLaunchTemplateSpecificationResponse
Maybe FastLaunchResourceType
Maybe FastLaunchSnapshotConfigurationResponse
Maybe FastLaunchStateCode
httpStatus :: Int
stateTransitionTime :: Maybe ISO8601
stateTransitionReason :: Maybe Text
state :: Maybe FastLaunchStateCode
snapshotConfiguration :: Maybe FastLaunchSnapshotConfigurationResponse
resourceType :: Maybe FastLaunchResourceType
ownerId :: Maybe Text
maxParallelLaunches :: Maybe Int
launchTemplate :: Maybe FastLaunchLaunchTemplateSpecificationResponse
imageId :: Maybe Text
$sel:httpStatus:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Int
$sel:stateTransitionTime:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Maybe ISO8601
$sel:stateTransitionReason:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Maybe Text
$sel:state:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Maybe FastLaunchStateCode
$sel:snapshotConfiguration:DisableFastLaunchResponse' :: DisableFastLaunchResponse
-> Maybe FastLaunchSnapshotConfigurationResponse
$sel:resourceType:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Maybe FastLaunchResourceType
$sel:ownerId:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Maybe Text
$sel:maxParallelLaunches:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Maybe Int
$sel:launchTemplate:DisableFastLaunchResponse' :: DisableFastLaunchResponse
-> Maybe FastLaunchLaunchTemplateSpecificationResponse
$sel:imageId:DisableFastLaunchResponse' :: DisableFastLaunchResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imageId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FastLaunchLaunchTemplateSpecificationResponse
launchTemplate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxParallelLaunches
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ownerId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FastLaunchResourceType
resourceType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FastLaunchSnapshotConfigurationResponse
snapshotConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FastLaunchStateCode
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stateTransitionReason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
stateTransitionTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus