{-# 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.WorkSpaces.TerminateWorkspaces
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Terminates the specified WorkSpaces.
--
-- Terminating a WorkSpace is a permanent action and cannot be undone. The
-- user\'s data is destroyed. If you need to archive any user data, contact
-- Amazon Web Services Support before terminating the WorkSpace.
--
-- You can terminate a WorkSpace that is in any state except @SUSPENDED@.
--
-- This operation is asynchronous and returns before the WorkSpaces have
-- been completely terminated. After a WorkSpace is terminated, the
-- @TERMINATED@ state is returned only briefly before the WorkSpace
-- directory metadata is cleaned up, so this state is rarely returned. To
-- confirm that a WorkSpace is terminated, check for the WorkSpace ID by
-- using
-- <https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaces.html DescribeWorkSpaces>.
-- If the WorkSpace ID isn\'t returned, then the WorkSpace has been
-- successfully terminated.
--
-- Simple AD and AD Connector are made available to you free of charge to
-- use with WorkSpaces. If there are no WorkSpaces being used with your
-- Simple AD or AD Connector directory for 30 consecutive days, this
-- directory will be automatically deregistered for use with Amazon
-- WorkSpaces, and you will be charged for this directory as per the
-- <http://aws.amazon.com/directoryservice/pricing/ Directory Service pricing terms>.
--
-- To delete empty directories, see
-- <https://docs.aws.amazon.com/workspaces/latest/adminguide/delete-workspaces-directory.html Delete the Directory for Your WorkSpaces>.
-- If you delete your Simple AD or AD Connector directory, you can always
-- create a new one when you want to start using WorkSpaces again.
module Amazonka.WorkSpaces.TerminateWorkspaces
  ( -- * Creating a Request
    TerminateWorkspaces (..),
    newTerminateWorkspaces,

    -- * Request Lenses
    terminateWorkspaces_terminateWorkspaceRequests,

    -- * Destructuring the Response
    TerminateWorkspacesResponse (..),
    newTerminateWorkspacesResponse,

    -- * Response Lenses
    terminateWorkspacesResponse_failedRequests,
    terminateWorkspacesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WorkSpaces.Types

-- | /See:/ 'newTerminateWorkspaces' smart constructor.
data TerminateWorkspaces = TerminateWorkspaces'
  { -- | The WorkSpaces to terminate. You can specify up to 25 WorkSpaces.
    TerminateWorkspaces -> NonEmpty TerminateRequest
terminateWorkspaceRequests :: Prelude.NonEmpty TerminateRequest
  }
  deriving (TerminateWorkspaces -> TerminateWorkspaces -> Bool
(TerminateWorkspaces -> TerminateWorkspaces -> Bool)
-> (TerminateWorkspaces -> TerminateWorkspaces -> Bool)
-> Eq TerminateWorkspaces
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TerminateWorkspaces -> TerminateWorkspaces -> Bool
$c/= :: TerminateWorkspaces -> TerminateWorkspaces -> Bool
== :: TerminateWorkspaces -> TerminateWorkspaces -> Bool
$c== :: TerminateWorkspaces -> TerminateWorkspaces -> Bool
Prelude.Eq, ReadPrec [TerminateWorkspaces]
ReadPrec TerminateWorkspaces
Int -> ReadS TerminateWorkspaces
ReadS [TerminateWorkspaces]
(Int -> ReadS TerminateWorkspaces)
-> ReadS [TerminateWorkspaces]
-> ReadPrec TerminateWorkspaces
-> ReadPrec [TerminateWorkspaces]
-> Read TerminateWorkspaces
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TerminateWorkspaces]
$creadListPrec :: ReadPrec [TerminateWorkspaces]
readPrec :: ReadPrec TerminateWorkspaces
$creadPrec :: ReadPrec TerminateWorkspaces
readList :: ReadS [TerminateWorkspaces]
$creadList :: ReadS [TerminateWorkspaces]
readsPrec :: Int -> ReadS TerminateWorkspaces
$creadsPrec :: Int -> ReadS TerminateWorkspaces
Prelude.Read, Int -> TerminateWorkspaces -> ShowS
[TerminateWorkspaces] -> ShowS
TerminateWorkspaces -> String
(Int -> TerminateWorkspaces -> ShowS)
-> (TerminateWorkspaces -> String)
-> ([TerminateWorkspaces] -> ShowS)
-> Show TerminateWorkspaces
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TerminateWorkspaces] -> ShowS
$cshowList :: [TerminateWorkspaces] -> ShowS
show :: TerminateWorkspaces -> String
$cshow :: TerminateWorkspaces -> String
showsPrec :: Int -> TerminateWorkspaces -> ShowS
$cshowsPrec :: Int -> TerminateWorkspaces -> ShowS
Prelude.Show, (forall x. TerminateWorkspaces -> Rep TerminateWorkspaces x)
-> (forall x. Rep TerminateWorkspaces x -> TerminateWorkspaces)
-> Generic TerminateWorkspaces
forall x. Rep TerminateWorkspaces x -> TerminateWorkspaces
forall x. TerminateWorkspaces -> Rep TerminateWorkspaces x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TerminateWorkspaces x -> TerminateWorkspaces
$cfrom :: forall x. TerminateWorkspaces -> Rep TerminateWorkspaces x
Prelude.Generic)

-- |
-- Create a value of 'TerminateWorkspaces' 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:
--
-- 'terminateWorkspaceRequests', 'terminateWorkspaces_terminateWorkspaceRequests' - The WorkSpaces to terminate. You can specify up to 25 WorkSpaces.
newTerminateWorkspaces ::
  -- | 'terminateWorkspaceRequests'
  Prelude.NonEmpty TerminateRequest ->
  TerminateWorkspaces
newTerminateWorkspaces :: NonEmpty TerminateRequest -> TerminateWorkspaces
newTerminateWorkspaces NonEmpty TerminateRequest
pTerminateWorkspaceRequests_ =
  TerminateWorkspaces' :: NonEmpty TerminateRequest -> TerminateWorkspaces
TerminateWorkspaces'
    { $sel:terminateWorkspaceRequests:TerminateWorkspaces' :: NonEmpty TerminateRequest
terminateWorkspaceRequests =
        Tagged
  (NonEmpty TerminateRequest) (Identity (NonEmpty TerminateRequest))
-> Tagged
     (NonEmpty TerminateRequest) (Identity (NonEmpty TerminateRequest))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
   (NonEmpty TerminateRequest) (Identity (NonEmpty TerminateRequest))
 -> Tagged
      (NonEmpty TerminateRequest) (Identity (NonEmpty TerminateRequest)))
-> NonEmpty TerminateRequest -> NonEmpty TerminateRequest
forall t b. AReview t b -> b -> t
Lens.# NonEmpty TerminateRequest
pTerminateWorkspaceRequests_
    }

-- | The WorkSpaces to terminate. You can specify up to 25 WorkSpaces.
terminateWorkspaces_terminateWorkspaceRequests :: Lens.Lens' TerminateWorkspaces (Prelude.NonEmpty TerminateRequest)
terminateWorkspaces_terminateWorkspaceRequests :: (NonEmpty TerminateRequest -> f (NonEmpty TerminateRequest))
-> TerminateWorkspaces -> f TerminateWorkspaces
terminateWorkspaces_terminateWorkspaceRequests = (TerminateWorkspaces -> NonEmpty TerminateRequest)
-> (TerminateWorkspaces
    -> NonEmpty TerminateRequest -> TerminateWorkspaces)
-> Lens
     TerminateWorkspaces
     TerminateWorkspaces
     (NonEmpty TerminateRequest)
     (NonEmpty TerminateRequest)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TerminateWorkspaces' {NonEmpty TerminateRequest
terminateWorkspaceRequests :: NonEmpty TerminateRequest
$sel:terminateWorkspaceRequests:TerminateWorkspaces' :: TerminateWorkspaces -> NonEmpty TerminateRequest
terminateWorkspaceRequests} -> NonEmpty TerminateRequest
terminateWorkspaceRequests) (\s :: TerminateWorkspaces
s@TerminateWorkspaces' {} NonEmpty TerminateRequest
a -> TerminateWorkspaces
s {$sel:terminateWorkspaceRequests:TerminateWorkspaces' :: NonEmpty TerminateRequest
terminateWorkspaceRequests = NonEmpty TerminateRequest
a} :: TerminateWorkspaces) ((NonEmpty TerminateRequest -> f (NonEmpty TerminateRequest))
 -> TerminateWorkspaces -> f TerminateWorkspaces)
-> ((NonEmpty TerminateRequest -> f (NonEmpty TerminateRequest))
    -> NonEmpty TerminateRequest -> f (NonEmpty TerminateRequest))
-> (NonEmpty TerminateRequest -> f (NonEmpty TerminateRequest))
-> TerminateWorkspaces
-> f TerminateWorkspaces
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty TerminateRequest -> f (NonEmpty TerminateRequest))
-> NonEmpty TerminateRequest -> f (NonEmpty TerminateRequest)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest TerminateWorkspaces where
  type
    AWSResponse TerminateWorkspaces =
      TerminateWorkspacesResponse
  request :: TerminateWorkspaces -> Request TerminateWorkspaces
request = Service -> TerminateWorkspaces -> Request TerminateWorkspaces
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy TerminateWorkspaces
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse TerminateWorkspaces)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse TerminateWorkspaces))
-> Logger
-> Service
-> Proxy TerminateWorkspaces
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse TerminateWorkspaces)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [FailedWorkspaceChangeRequest]
-> Int -> TerminateWorkspacesResponse
TerminateWorkspacesResponse'
            (Maybe [FailedWorkspaceChangeRequest]
 -> Int -> TerminateWorkspacesResponse)
-> Either String (Maybe [FailedWorkspaceChangeRequest])
-> Either String (Int -> TerminateWorkspacesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Key
-> Either String (Maybe (Maybe [FailedWorkspaceChangeRequest]))
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Core..?> Key
"FailedRequests" Either String (Maybe (Maybe [FailedWorkspaceChangeRequest]))
-> Maybe [FailedWorkspaceChangeRequest]
-> Either String (Maybe [FailedWorkspaceChangeRequest])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [FailedWorkspaceChangeRequest]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> TerminateWorkspacesResponse)
-> Either String Int -> Either String TerminateWorkspacesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable TerminateWorkspaces

instance Prelude.NFData TerminateWorkspaces

instance Core.ToHeaders TerminateWorkspaces where
  toHeaders :: TerminateWorkspaces -> ResponseHeaders
toHeaders =
    ResponseHeaders -> TerminateWorkspaces -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"WorkspacesService.TerminateWorkspaces" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON TerminateWorkspaces where
  toJSON :: TerminateWorkspaces -> Value
toJSON TerminateWorkspaces' {NonEmpty TerminateRequest
terminateWorkspaceRequests :: NonEmpty TerminateRequest
$sel:terminateWorkspaceRequests:TerminateWorkspaces' :: TerminateWorkspaces -> NonEmpty TerminateRequest
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Key
"TerminateWorkspaceRequests"
                  Key -> NonEmpty TerminateRequest -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Core..= NonEmpty TerminateRequest
terminateWorkspaceRequests
              )
          ]
      )

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

instance Core.ToQuery TerminateWorkspaces where
  toQuery :: TerminateWorkspaces -> QueryString
toQuery = QueryString -> TerminateWorkspaces -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newTerminateWorkspacesResponse' smart constructor.
data TerminateWorkspacesResponse = TerminateWorkspacesResponse'
  { -- | Information about the WorkSpaces that could not be terminated.
    TerminateWorkspacesResponse -> Maybe [FailedWorkspaceChangeRequest]
failedRequests :: Prelude.Maybe [FailedWorkspaceChangeRequest],
    -- | The response's http status code.
    TerminateWorkspacesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (TerminateWorkspacesResponse -> TerminateWorkspacesResponse -> Bool
(TerminateWorkspacesResponse
 -> TerminateWorkspacesResponse -> Bool)
-> (TerminateWorkspacesResponse
    -> TerminateWorkspacesResponse -> Bool)
-> Eq TerminateWorkspacesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TerminateWorkspacesResponse -> TerminateWorkspacesResponse -> Bool
$c/= :: TerminateWorkspacesResponse -> TerminateWorkspacesResponse -> Bool
== :: TerminateWorkspacesResponse -> TerminateWorkspacesResponse -> Bool
$c== :: TerminateWorkspacesResponse -> TerminateWorkspacesResponse -> Bool
Prelude.Eq, ReadPrec [TerminateWorkspacesResponse]
ReadPrec TerminateWorkspacesResponse
Int -> ReadS TerminateWorkspacesResponse
ReadS [TerminateWorkspacesResponse]
(Int -> ReadS TerminateWorkspacesResponse)
-> ReadS [TerminateWorkspacesResponse]
-> ReadPrec TerminateWorkspacesResponse
-> ReadPrec [TerminateWorkspacesResponse]
-> Read TerminateWorkspacesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TerminateWorkspacesResponse]
$creadListPrec :: ReadPrec [TerminateWorkspacesResponse]
readPrec :: ReadPrec TerminateWorkspacesResponse
$creadPrec :: ReadPrec TerminateWorkspacesResponse
readList :: ReadS [TerminateWorkspacesResponse]
$creadList :: ReadS [TerminateWorkspacesResponse]
readsPrec :: Int -> ReadS TerminateWorkspacesResponse
$creadsPrec :: Int -> ReadS TerminateWorkspacesResponse
Prelude.Read, Int -> TerminateWorkspacesResponse -> ShowS
[TerminateWorkspacesResponse] -> ShowS
TerminateWorkspacesResponse -> String
(Int -> TerminateWorkspacesResponse -> ShowS)
-> (TerminateWorkspacesResponse -> String)
-> ([TerminateWorkspacesResponse] -> ShowS)
-> Show TerminateWorkspacesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TerminateWorkspacesResponse] -> ShowS
$cshowList :: [TerminateWorkspacesResponse] -> ShowS
show :: TerminateWorkspacesResponse -> String
$cshow :: TerminateWorkspacesResponse -> String
showsPrec :: Int -> TerminateWorkspacesResponse -> ShowS
$cshowsPrec :: Int -> TerminateWorkspacesResponse -> ShowS
Prelude.Show, (forall x.
 TerminateWorkspacesResponse -> Rep TerminateWorkspacesResponse x)
-> (forall x.
    Rep TerminateWorkspacesResponse x -> TerminateWorkspacesResponse)
-> Generic TerminateWorkspacesResponse
forall x.
Rep TerminateWorkspacesResponse x -> TerminateWorkspacesResponse
forall x.
TerminateWorkspacesResponse -> Rep TerminateWorkspacesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TerminateWorkspacesResponse x -> TerminateWorkspacesResponse
$cfrom :: forall x.
TerminateWorkspacesResponse -> Rep TerminateWorkspacesResponse x
Prelude.Generic)

-- |
-- Create a value of 'TerminateWorkspacesResponse' 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:
--
-- 'failedRequests', 'terminateWorkspacesResponse_failedRequests' - Information about the WorkSpaces that could not be terminated.
--
-- 'httpStatus', 'terminateWorkspacesResponse_httpStatus' - The response's http status code.
newTerminateWorkspacesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  TerminateWorkspacesResponse
newTerminateWorkspacesResponse :: Int -> TerminateWorkspacesResponse
newTerminateWorkspacesResponse Int
pHttpStatus_ =
  TerminateWorkspacesResponse' :: Maybe [FailedWorkspaceChangeRequest]
-> Int -> TerminateWorkspacesResponse
TerminateWorkspacesResponse'
    { $sel:failedRequests:TerminateWorkspacesResponse' :: Maybe [FailedWorkspaceChangeRequest]
failedRequests =
        Maybe [FailedWorkspaceChangeRequest]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:TerminateWorkspacesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the WorkSpaces that could not be terminated.
terminateWorkspacesResponse_failedRequests :: Lens.Lens' TerminateWorkspacesResponse (Prelude.Maybe [FailedWorkspaceChangeRequest])
terminateWorkspacesResponse_failedRequests :: (Maybe [FailedWorkspaceChangeRequest]
 -> f (Maybe [FailedWorkspaceChangeRequest]))
-> TerminateWorkspacesResponse -> f TerminateWorkspacesResponse
terminateWorkspacesResponse_failedRequests = (TerminateWorkspacesResponse
 -> Maybe [FailedWorkspaceChangeRequest])
-> (TerminateWorkspacesResponse
    -> Maybe [FailedWorkspaceChangeRequest]
    -> TerminateWorkspacesResponse)
-> Lens
     TerminateWorkspacesResponse
     TerminateWorkspacesResponse
     (Maybe [FailedWorkspaceChangeRequest])
     (Maybe [FailedWorkspaceChangeRequest])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TerminateWorkspacesResponse' {Maybe [FailedWorkspaceChangeRequest]
failedRequests :: Maybe [FailedWorkspaceChangeRequest]
$sel:failedRequests:TerminateWorkspacesResponse' :: TerminateWorkspacesResponse -> Maybe [FailedWorkspaceChangeRequest]
failedRequests} -> Maybe [FailedWorkspaceChangeRequest]
failedRequests) (\s :: TerminateWorkspacesResponse
s@TerminateWorkspacesResponse' {} Maybe [FailedWorkspaceChangeRequest]
a -> TerminateWorkspacesResponse
s {$sel:failedRequests:TerminateWorkspacesResponse' :: Maybe [FailedWorkspaceChangeRequest]
failedRequests = Maybe [FailedWorkspaceChangeRequest]
a} :: TerminateWorkspacesResponse) ((Maybe [FailedWorkspaceChangeRequest]
  -> f (Maybe [FailedWorkspaceChangeRequest]))
 -> TerminateWorkspacesResponse -> f TerminateWorkspacesResponse)
-> ((Maybe [FailedWorkspaceChangeRequest]
     -> f (Maybe [FailedWorkspaceChangeRequest]))
    -> Maybe [FailedWorkspaceChangeRequest]
    -> f (Maybe [FailedWorkspaceChangeRequest]))
-> (Maybe [FailedWorkspaceChangeRequest]
    -> f (Maybe [FailedWorkspaceChangeRequest]))
-> TerminateWorkspacesResponse
-> f TerminateWorkspacesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [FailedWorkspaceChangeRequest]
  [FailedWorkspaceChangeRequest]
  [FailedWorkspaceChangeRequest]
  [FailedWorkspaceChangeRequest]
-> Iso
     (Maybe [FailedWorkspaceChangeRequest])
     (Maybe [FailedWorkspaceChangeRequest])
     (Maybe [FailedWorkspaceChangeRequest])
     (Maybe [FailedWorkspaceChangeRequest])
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 AnIso
  [FailedWorkspaceChangeRequest]
  [FailedWorkspaceChangeRequest]
  [FailedWorkspaceChangeRequest]
  [FailedWorkspaceChangeRequest]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData TerminateWorkspacesResponse