{-# 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.DescribeWorkspaceSnapshots
-- 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)
--
-- Describes the snapshots for the specified WorkSpace.
module Amazonka.WorkSpaces.DescribeWorkspaceSnapshots
  ( -- * Creating a Request
    DescribeWorkspaceSnapshots (..),
    newDescribeWorkspaceSnapshots,

    -- * Request Lenses
    describeWorkspaceSnapshots_workspaceId,

    -- * Destructuring the Response
    DescribeWorkspaceSnapshotsResponse (..),
    newDescribeWorkspaceSnapshotsResponse,

    -- * Response Lenses
    describeWorkspaceSnapshotsResponse_restoreSnapshots,
    describeWorkspaceSnapshotsResponse_rebuildSnapshots,
    describeWorkspaceSnapshotsResponse_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:/ 'newDescribeWorkspaceSnapshots' smart constructor.
data DescribeWorkspaceSnapshots = DescribeWorkspaceSnapshots'
  { -- | The identifier of the WorkSpace.
    DescribeWorkspaceSnapshots -> Text
workspaceId :: Prelude.Text
  }
  deriving (DescribeWorkspaceSnapshots -> DescribeWorkspaceSnapshots -> Bool
(DescribeWorkspaceSnapshots -> DescribeWorkspaceSnapshots -> Bool)
-> (DescribeWorkspaceSnapshots
    -> DescribeWorkspaceSnapshots -> Bool)
-> Eq DescribeWorkspaceSnapshots
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeWorkspaceSnapshots -> DescribeWorkspaceSnapshots -> Bool
$c/= :: DescribeWorkspaceSnapshots -> DescribeWorkspaceSnapshots -> Bool
== :: DescribeWorkspaceSnapshots -> DescribeWorkspaceSnapshots -> Bool
$c== :: DescribeWorkspaceSnapshots -> DescribeWorkspaceSnapshots -> Bool
Prelude.Eq, ReadPrec [DescribeWorkspaceSnapshots]
ReadPrec DescribeWorkspaceSnapshots
Int -> ReadS DescribeWorkspaceSnapshots
ReadS [DescribeWorkspaceSnapshots]
(Int -> ReadS DescribeWorkspaceSnapshots)
-> ReadS [DescribeWorkspaceSnapshots]
-> ReadPrec DescribeWorkspaceSnapshots
-> ReadPrec [DescribeWorkspaceSnapshots]
-> Read DescribeWorkspaceSnapshots
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeWorkspaceSnapshots]
$creadListPrec :: ReadPrec [DescribeWorkspaceSnapshots]
readPrec :: ReadPrec DescribeWorkspaceSnapshots
$creadPrec :: ReadPrec DescribeWorkspaceSnapshots
readList :: ReadS [DescribeWorkspaceSnapshots]
$creadList :: ReadS [DescribeWorkspaceSnapshots]
readsPrec :: Int -> ReadS DescribeWorkspaceSnapshots
$creadsPrec :: Int -> ReadS DescribeWorkspaceSnapshots
Prelude.Read, Int -> DescribeWorkspaceSnapshots -> ShowS
[DescribeWorkspaceSnapshots] -> ShowS
DescribeWorkspaceSnapshots -> String
(Int -> DescribeWorkspaceSnapshots -> ShowS)
-> (DescribeWorkspaceSnapshots -> String)
-> ([DescribeWorkspaceSnapshots] -> ShowS)
-> Show DescribeWorkspaceSnapshots
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeWorkspaceSnapshots] -> ShowS
$cshowList :: [DescribeWorkspaceSnapshots] -> ShowS
show :: DescribeWorkspaceSnapshots -> String
$cshow :: DescribeWorkspaceSnapshots -> String
showsPrec :: Int -> DescribeWorkspaceSnapshots -> ShowS
$cshowsPrec :: Int -> DescribeWorkspaceSnapshots -> ShowS
Prelude.Show, (forall x.
 DescribeWorkspaceSnapshots -> Rep DescribeWorkspaceSnapshots x)
-> (forall x.
    Rep DescribeWorkspaceSnapshots x -> DescribeWorkspaceSnapshots)
-> Generic DescribeWorkspaceSnapshots
forall x.
Rep DescribeWorkspaceSnapshots x -> DescribeWorkspaceSnapshots
forall x.
DescribeWorkspaceSnapshots -> Rep DescribeWorkspaceSnapshots x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeWorkspaceSnapshots x -> DescribeWorkspaceSnapshots
$cfrom :: forall x.
DescribeWorkspaceSnapshots -> Rep DescribeWorkspaceSnapshots x
Prelude.Generic)

-- |
-- Create a value of 'DescribeWorkspaceSnapshots' 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:
--
-- 'workspaceId', 'describeWorkspaceSnapshots_workspaceId' - The identifier of the WorkSpace.
newDescribeWorkspaceSnapshots ::
  -- | 'workspaceId'
  Prelude.Text ->
  DescribeWorkspaceSnapshots
newDescribeWorkspaceSnapshots :: Text -> DescribeWorkspaceSnapshots
newDescribeWorkspaceSnapshots Text
pWorkspaceId_ =
  DescribeWorkspaceSnapshots' :: Text -> DescribeWorkspaceSnapshots
DescribeWorkspaceSnapshots'
    { $sel:workspaceId:DescribeWorkspaceSnapshots' :: Text
workspaceId =
        Text
pWorkspaceId_
    }

-- | The identifier of the WorkSpace.
describeWorkspaceSnapshots_workspaceId :: Lens.Lens' DescribeWorkspaceSnapshots Prelude.Text
describeWorkspaceSnapshots_workspaceId :: (Text -> f Text)
-> DescribeWorkspaceSnapshots -> f DescribeWorkspaceSnapshots
describeWorkspaceSnapshots_workspaceId = (DescribeWorkspaceSnapshots -> Text)
-> (DescribeWorkspaceSnapshots
    -> Text -> DescribeWorkspaceSnapshots)
-> Lens
     DescribeWorkspaceSnapshots DescribeWorkspaceSnapshots Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorkspaceSnapshots' {Text
workspaceId :: Text
$sel:workspaceId:DescribeWorkspaceSnapshots' :: DescribeWorkspaceSnapshots -> Text
workspaceId} -> Text
workspaceId) (\s :: DescribeWorkspaceSnapshots
s@DescribeWorkspaceSnapshots' {} Text
a -> DescribeWorkspaceSnapshots
s {$sel:workspaceId:DescribeWorkspaceSnapshots' :: Text
workspaceId = Text
a} :: DescribeWorkspaceSnapshots)

instance Core.AWSRequest DescribeWorkspaceSnapshots where
  type
    AWSResponse DescribeWorkspaceSnapshots =
      DescribeWorkspaceSnapshotsResponse
  request :: DescribeWorkspaceSnapshots -> Request DescribeWorkspaceSnapshots
request = Service
-> DescribeWorkspaceSnapshots -> Request DescribeWorkspaceSnapshots
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeWorkspaceSnapshots
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeWorkspaceSnapshots)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeWorkspaceSnapshots))
-> Logger
-> Service
-> Proxy DescribeWorkspaceSnapshots
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeWorkspaceSnapshots)))
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 [Snapshot]
-> Maybe [Snapshot] -> Int -> DescribeWorkspaceSnapshotsResponse
DescribeWorkspaceSnapshotsResponse'
            (Maybe [Snapshot]
 -> Maybe [Snapshot] -> Int -> DescribeWorkspaceSnapshotsResponse)
-> Either String (Maybe [Snapshot])
-> Either
     String
     (Maybe [Snapshot] -> Int -> DescribeWorkspaceSnapshotsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Snapshot]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RestoreSnapshots"
                            Either String (Maybe (Maybe [Snapshot]))
-> Maybe [Snapshot] -> Either String (Maybe [Snapshot])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Snapshot]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe [Snapshot] -> Int -> DescribeWorkspaceSnapshotsResponse)
-> Either String (Maybe [Snapshot])
-> Either String (Int -> DescribeWorkspaceSnapshotsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Snapshot]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RebuildSnapshots"
                            Either String (Maybe (Maybe [Snapshot]))
-> Maybe [Snapshot] -> Either String (Maybe [Snapshot])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Snapshot]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> DescribeWorkspaceSnapshotsResponse)
-> Either String Int
-> Either String DescribeWorkspaceSnapshotsResponse
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 DescribeWorkspaceSnapshots

instance Prelude.NFData DescribeWorkspaceSnapshots

instance Core.ToHeaders DescribeWorkspaceSnapshots where
  toHeaders :: DescribeWorkspaceSnapshots -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeWorkspaceSnapshots -> 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.DescribeWorkspaceSnapshots" ::
                          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 DescribeWorkspaceSnapshots where
  toJSON :: DescribeWorkspaceSnapshots -> Value
toJSON DescribeWorkspaceSnapshots' {Text
workspaceId :: Text
$sel:workspaceId:DescribeWorkspaceSnapshots' :: DescribeWorkspaceSnapshots -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"WorkspaceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
workspaceId)]
      )

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

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

-- | /See:/ 'newDescribeWorkspaceSnapshotsResponse' smart constructor.
data DescribeWorkspaceSnapshotsResponse = DescribeWorkspaceSnapshotsResponse'
  { -- | Information about the snapshots that can be used to restore a WorkSpace.
    -- These snapshots include both the root volume and the user volume.
    DescribeWorkspaceSnapshotsResponse -> Maybe [Snapshot]
restoreSnapshots :: Prelude.Maybe [Snapshot],
    -- | Information about the snapshots that can be used to rebuild a WorkSpace.
    -- These snapshots include the user volume.
    DescribeWorkspaceSnapshotsResponse -> Maybe [Snapshot]
rebuildSnapshots :: Prelude.Maybe [Snapshot],
    -- | The response's http status code.
    DescribeWorkspaceSnapshotsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeWorkspaceSnapshotsResponse
-> DescribeWorkspaceSnapshotsResponse -> Bool
(DescribeWorkspaceSnapshotsResponse
 -> DescribeWorkspaceSnapshotsResponse -> Bool)
-> (DescribeWorkspaceSnapshotsResponse
    -> DescribeWorkspaceSnapshotsResponse -> Bool)
-> Eq DescribeWorkspaceSnapshotsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeWorkspaceSnapshotsResponse
-> DescribeWorkspaceSnapshotsResponse -> Bool
$c/= :: DescribeWorkspaceSnapshotsResponse
-> DescribeWorkspaceSnapshotsResponse -> Bool
== :: DescribeWorkspaceSnapshotsResponse
-> DescribeWorkspaceSnapshotsResponse -> Bool
$c== :: DescribeWorkspaceSnapshotsResponse
-> DescribeWorkspaceSnapshotsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeWorkspaceSnapshotsResponse]
ReadPrec DescribeWorkspaceSnapshotsResponse
Int -> ReadS DescribeWorkspaceSnapshotsResponse
ReadS [DescribeWorkspaceSnapshotsResponse]
(Int -> ReadS DescribeWorkspaceSnapshotsResponse)
-> ReadS [DescribeWorkspaceSnapshotsResponse]
-> ReadPrec DescribeWorkspaceSnapshotsResponse
-> ReadPrec [DescribeWorkspaceSnapshotsResponse]
-> Read DescribeWorkspaceSnapshotsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeWorkspaceSnapshotsResponse]
$creadListPrec :: ReadPrec [DescribeWorkspaceSnapshotsResponse]
readPrec :: ReadPrec DescribeWorkspaceSnapshotsResponse
$creadPrec :: ReadPrec DescribeWorkspaceSnapshotsResponse
readList :: ReadS [DescribeWorkspaceSnapshotsResponse]
$creadList :: ReadS [DescribeWorkspaceSnapshotsResponse]
readsPrec :: Int -> ReadS DescribeWorkspaceSnapshotsResponse
$creadsPrec :: Int -> ReadS DescribeWorkspaceSnapshotsResponse
Prelude.Read, Int -> DescribeWorkspaceSnapshotsResponse -> ShowS
[DescribeWorkspaceSnapshotsResponse] -> ShowS
DescribeWorkspaceSnapshotsResponse -> String
(Int -> DescribeWorkspaceSnapshotsResponse -> ShowS)
-> (DescribeWorkspaceSnapshotsResponse -> String)
-> ([DescribeWorkspaceSnapshotsResponse] -> ShowS)
-> Show DescribeWorkspaceSnapshotsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeWorkspaceSnapshotsResponse] -> ShowS
$cshowList :: [DescribeWorkspaceSnapshotsResponse] -> ShowS
show :: DescribeWorkspaceSnapshotsResponse -> String
$cshow :: DescribeWorkspaceSnapshotsResponse -> String
showsPrec :: Int -> DescribeWorkspaceSnapshotsResponse -> ShowS
$cshowsPrec :: Int -> DescribeWorkspaceSnapshotsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeWorkspaceSnapshotsResponse
 -> Rep DescribeWorkspaceSnapshotsResponse x)
-> (forall x.
    Rep DescribeWorkspaceSnapshotsResponse x
    -> DescribeWorkspaceSnapshotsResponse)
-> Generic DescribeWorkspaceSnapshotsResponse
forall x.
Rep DescribeWorkspaceSnapshotsResponse x
-> DescribeWorkspaceSnapshotsResponse
forall x.
DescribeWorkspaceSnapshotsResponse
-> Rep DescribeWorkspaceSnapshotsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeWorkspaceSnapshotsResponse x
-> DescribeWorkspaceSnapshotsResponse
$cfrom :: forall x.
DescribeWorkspaceSnapshotsResponse
-> Rep DescribeWorkspaceSnapshotsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeWorkspaceSnapshotsResponse' 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:
--
-- 'restoreSnapshots', 'describeWorkspaceSnapshotsResponse_restoreSnapshots' - Information about the snapshots that can be used to restore a WorkSpace.
-- These snapshots include both the root volume and the user volume.
--
-- 'rebuildSnapshots', 'describeWorkspaceSnapshotsResponse_rebuildSnapshots' - Information about the snapshots that can be used to rebuild a WorkSpace.
-- These snapshots include the user volume.
--
-- 'httpStatus', 'describeWorkspaceSnapshotsResponse_httpStatus' - The response's http status code.
newDescribeWorkspaceSnapshotsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeWorkspaceSnapshotsResponse
newDescribeWorkspaceSnapshotsResponse :: Int -> DescribeWorkspaceSnapshotsResponse
newDescribeWorkspaceSnapshotsResponse Int
pHttpStatus_ =
  DescribeWorkspaceSnapshotsResponse' :: Maybe [Snapshot]
-> Maybe [Snapshot] -> Int -> DescribeWorkspaceSnapshotsResponse
DescribeWorkspaceSnapshotsResponse'
    { $sel:restoreSnapshots:DescribeWorkspaceSnapshotsResponse' :: Maybe [Snapshot]
restoreSnapshots =
        Maybe [Snapshot]
forall a. Maybe a
Prelude.Nothing,
      $sel:rebuildSnapshots:DescribeWorkspaceSnapshotsResponse' :: Maybe [Snapshot]
rebuildSnapshots = Maybe [Snapshot]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeWorkspaceSnapshotsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the snapshots that can be used to restore a WorkSpace.
-- These snapshots include both the root volume and the user volume.
describeWorkspaceSnapshotsResponse_restoreSnapshots :: Lens.Lens' DescribeWorkspaceSnapshotsResponse (Prelude.Maybe [Snapshot])
describeWorkspaceSnapshotsResponse_restoreSnapshots :: (Maybe [Snapshot] -> f (Maybe [Snapshot]))
-> DescribeWorkspaceSnapshotsResponse
-> f DescribeWorkspaceSnapshotsResponse
describeWorkspaceSnapshotsResponse_restoreSnapshots = (DescribeWorkspaceSnapshotsResponse -> Maybe [Snapshot])
-> (DescribeWorkspaceSnapshotsResponse
    -> Maybe [Snapshot] -> DescribeWorkspaceSnapshotsResponse)
-> Lens
     DescribeWorkspaceSnapshotsResponse
     DescribeWorkspaceSnapshotsResponse
     (Maybe [Snapshot])
     (Maybe [Snapshot])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorkspaceSnapshotsResponse' {Maybe [Snapshot]
restoreSnapshots :: Maybe [Snapshot]
$sel:restoreSnapshots:DescribeWorkspaceSnapshotsResponse' :: DescribeWorkspaceSnapshotsResponse -> Maybe [Snapshot]
restoreSnapshots} -> Maybe [Snapshot]
restoreSnapshots) (\s :: DescribeWorkspaceSnapshotsResponse
s@DescribeWorkspaceSnapshotsResponse' {} Maybe [Snapshot]
a -> DescribeWorkspaceSnapshotsResponse
s {$sel:restoreSnapshots:DescribeWorkspaceSnapshotsResponse' :: Maybe [Snapshot]
restoreSnapshots = Maybe [Snapshot]
a} :: DescribeWorkspaceSnapshotsResponse) ((Maybe [Snapshot] -> f (Maybe [Snapshot]))
 -> DescribeWorkspaceSnapshotsResponse
 -> f DescribeWorkspaceSnapshotsResponse)
-> ((Maybe [Snapshot] -> f (Maybe [Snapshot]))
    -> Maybe [Snapshot] -> f (Maybe [Snapshot]))
-> (Maybe [Snapshot] -> f (Maybe [Snapshot]))
-> DescribeWorkspaceSnapshotsResponse
-> f DescribeWorkspaceSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Snapshot] [Snapshot] [Snapshot] [Snapshot]
-> Iso
     (Maybe [Snapshot])
     (Maybe [Snapshot])
     (Maybe [Snapshot])
     (Maybe [Snapshot])
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 [Snapshot] [Snapshot] [Snapshot] [Snapshot]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about the snapshots that can be used to rebuild a WorkSpace.
-- These snapshots include the user volume.
describeWorkspaceSnapshotsResponse_rebuildSnapshots :: Lens.Lens' DescribeWorkspaceSnapshotsResponse (Prelude.Maybe [Snapshot])
describeWorkspaceSnapshotsResponse_rebuildSnapshots :: (Maybe [Snapshot] -> f (Maybe [Snapshot]))
-> DescribeWorkspaceSnapshotsResponse
-> f DescribeWorkspaceSnapshotsResponse
describeWorkspaceSnapshotsResponse_rebuildSnapshots = (DescribeWorkspaceSnapshotsResponse -> Maybe [Snapshot])
-> (DescribeWorkspaceSnapshotsResponse
    -> Maybe [Snapshot] -> DescribeWorkspaceSnapshotsResponse)
-> Lens
     DescribeWorkspaceSnapshotsResponse
     DescribeWorkspaceSnapshotsResponse
     (Maybe [Snapshot])
     (Maybe [Snapshot])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorkspaceSnapshotsResponse' {Maybe [Snapshot]
rebuildSnapshots :: Maybe [Snapshot]
$sel:rebuildSnapshots:DescribeWorkspaceSnapshotsResponse' :: DescribeWorkspaceSnapshotsResponse -> Maybe [Snapshot]
rebuildSnapshots} -> Maybe [Snapshot]
rebuildSnapshots) (\s :: DescribeWorkspaceSnapshotsResponse
s@DescribeWorkspaceSnapshotsResponse' {} Maybe [Snapshot]
a -> DescribeWorkspaceSnapshotsResponse
s {$sel:rebuildSnapshots:DescribeWorkspaceSnapshotsResponse' :: Maybe [Snapshot]
rebuildSnapshots = Maybe [Snapshot]
a} :: DescribeWorkspaceSnapshotsResponse) ((Maybe [Snapshot] -> f (Maybe [Snapshot]))
 -> DescribeWorkspaceSnapshotsResponse
 -> f DescribeWorkspaceSnapshotsResponse)
-> ((Maybe [Snapshot] -> f (Maybe [Snapshot]))
    -> Maybe [Snapshot] -> f (Maybe [Snapshot]))
-> (Maybe [Snapshot] -> f (Maybe [Snapshot]))
-> DescribeWorkspaceSnapshotsResponse
-> f DescribeWorkspaceSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Snapshot] [Snapshot] [Snapshot] [Snapshot]
-> Iso
     (Maybe [Snapshot])
     (Maybe [Snapshot])
     (Maybe [Snapshot])
     (Maybe [Snapshot])
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 [Snapshot] [Snapshot] [Snapshot] [Snapshot]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeWorkspaceSnapshotsResponse