{-# 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.StorageGateway.DescribeTapeArchives
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a description of specified virtual tapes in the virtual tape
-- shelf (VTS). This operation is only supported in the tape gateway type.
--
-- If a specific @TapeARN@ is not specified, Storage Gateway returns a
-- description of all virtual tapes found in the VTS associated with your
-- account.
--
-- This operation returns paginated results.
module Amazonka.StorageGateway.DescribeTapeArchives
  ( -- * Creating a Request
    DescribeTapeArchives (..),
    newDescribeTapeArchives,

    -- * Request Lenses
    describeTapeArchives_limit,
    describeTapeArchives_marker,
    describeTapeArchives_tapeARNs,

    -- * Destructuring the Response
    DescribeTapeArchivesResponse (..),
    newDescribeTapeArchivesResponse,

    -- * Response Lenses
    describeTapeArchivesResponse_marker,
    describeTapeArchivesResponse_tapeArchives,
    describeTapeArchivesResponse_httpStatus,
  )
where

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

-- | DescribeTapeArchivesInput
--
-- /See:/ 'newDescribeTapeArchives' smart constructor.
data DescribeTapeArchives = DescribeTapeArchives'
  { -- | Specifies that the number of virtual tapes described be limited to the
    -- specified number.
    DescribeTapeArchives -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | An opaque string that indicates the position at which to begin
    -- describing virtual tapes.
    DescribeTapeArchives -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | Specifies one or more unique Amazon Resource Names (ARNs) that represent
    -- the virtual tapes you want to describe.
    DescribeTapeArchives -> Maybe [Text]
tapeARNs :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DescribeTapeArchives -> DescribeTapeArchives -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTapeArchives -> DescribeTapeArchives -> Bool
$c/= :: DescribeTapeArchives -> DescribeTapeArchives -> Bool
== :: DescribeTapeArchives -> DescribeTapeArchives -> Bool
$c== :: DescribeTapeArchives -> DescribeTapeArchives -> Bool
Prelude.Eq, ReadPrec [DescribeTapeArchives]
ReadPrec DescribeTapeArchives
Int -> ReadS DescribeTapeArchives
ReadS [DescribeTapeArchives]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTapeArchives]
$creadListPrec :: ReadPrec [DescribeTapeArchives]
readPrec :: ReadPrec DescribeTapeArchives
$creadPrec :: ReadPrec DescribeTapeArchives
readList :: ReadS [DescribeTapeArchives]
$creadList :: ReadS [DescribeTapeArchives]
readsPrec :: Int -> ReadS DescribeTapeArchives
$creadsPrec :: Int -> ReadS DescribeTapeArchives
Prelude.Read, Int -> DescribeTapeArchives -> ShowS
[DescribeTapeArchives] -> ShowS
DescribeTapeArchives -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTapeArchives] -> ShowS
$cshowList :: [DescribeTapeArchives] -> ShowS
show :: DescribeTapeArchives -> String
$cshow :: DescribeTapeArchives -> String
showsPrec :: Int -> DescribeTapeArchives -> ShowS
$cshowsPrec :: Int -> DescribeTapeArchives -> ShowS
Prelude.Show, forall x. Rep DescribeTapeArchives x -> DescribeTapeArchives
forall x. DescribeTapeArchives -> Rep DescribeTapeArchives x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeTapeArchives x -> DescribeTapeArchives
$cfrom :: forall x. DescribeTapeArchives -> Rep DescribeTapeArchives x
Prelude.Generic)

-- |
-- Create a value of 'DescribeTapeArchives' 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:
--
-- 'limit', 'describeTapeArchives_limit' - Specifies that the number of virtual tapes described be limited to the
-- specified number.
--
-- 'marker', 'describeTapeArchives_marker' - An opaque string that indicates the position at which to begin
-- describing virtual tapes.
--
-- 'tapeARNs', 'describeTapeArchives_tapeARNs' - Specifies one or more unique Amazon Resource Names (ARNs) that represent
-- the virtual tapes you want to describe.
newDescribeTapeArchives ::
  DescribeTapeArchives
newDescribeTapeArchives :: DescribeTapeArchives
newDescribeTapeArchives =
  DescribeTapeArchives'
    { $sel:limit:DescribeTapeArchives' :: Maybe Natural
limit = forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeTapeArchives' :: Maybe Text
marker = forall a. Maybe a
Prelude.Nothing,
      $sel:tapeARNs:DescribeTapeArchives' :: Maybe [Text]
tapeARNs = forall a. Maybe a
Prelude.Nothing
    }

-- | Specifies that the number of virtual tapes described be limited to the
-- specified number.
describeTapeArchives_limit :: Lens.Lens' DescribeTapeArchives (Prelude.Maybe Prelude.Natural)
describeTapeArchives_limit :: Lens' DescribeTapeArchives (Maybe Natural)
describeTapeArchives_limit = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTapeArchives' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeTapeArchives' :: DescribeTapeArchives -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeTapeArchives
s@DescribeTapeArchives' {} Maybe Natural
a -> DescribeTapeArchives
s {$sel:limit:DescribeTapeArchives' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeTapeArchives)

-- | An opaque string that indicates the position at which to begin
-- describing virtual tapes.
describeTapeArchives_marker :: Lens.Lens' DescribeTapeArchives (Prelude.Maybe Prelude.Text)
describeTapeArchives_marker :: Lens' DescribeTapeArchives (Maybe Text)
describeTapeArchives_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTapeArchives' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeTapeArchives' :: DescribeTapeArchives -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeTapeArchives
s@DescribeTapeArchives' {} Maybe Text
a -> DescribeTapeArchives
s {$sel:marker:DescribeTapeArchives' :: Maybe Text
marker = Maybe Text
a} :: DescribeTapeArchives)

-- | Specifies one or more unique Amazon Resource Names (ARNs) that represent
-- the virtual tapes you want to describe.
describeTapeArchives_tapeARNs :: Lens.Lens' DescribeTapeArchives (Prelude.Maybe [Prelude.Text])
describeTapeArchives_tapeARNs :: Lens' DescribeTapeArchives (Maybe [Text])
describeTapeArchives_tapeARNs = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTapeArchives' {Maybe [Text]
tapeARNs :: Maybe [Text]
$sel:tapeARNs:DescribeTapeArchives' :: DescribeTapeArchives -> Maybe [Text]
tapeARNs} -> Maybe [Text]
tapeARNs) (\s :: DescribeTapeArchives
s@DescribeTapeArchives' {} Maybe [Text]
a -> DescribeTapeArchives
s {$sel:tapeARNs:DescribeTapeArchives' :: Maybe [Text]
tapeARNs = Maybe [Text]
a} :: DescribeTapeArchives) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSPager DescribeTapeArchives where
  page :: DescribeTapeArchives
-> AWSResponse DescribeTapeArchives -> Maybe DescribeTapeArchives
page DescribeTapeArchives
rq AWSResponse DescribeTapeArchives
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeTapeArchives
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeTapeArchivesResponse (Maybe Text)
describeTapeArchivesResponse_marker
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeTapeArchives
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeTapeArchivesResponse (Maybe [TapeArchive])
describeTapeArchivesResponse_tapeArchives
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribeTapeArchives
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribeTapeArchives (Maybe Text)
describeTapeArchives_marker
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeTapeArchives
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribeTapeArchivesResponse (Maybe Text)
describeTapeArchivesResponse_marker
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeTapeArchives where
  type
    AWSResponse DescribeTapeArchives =
      DescribeTapeArchivesResponse
  request :: (Service -> Service)
-> DescribeTapeArchives -> Request DescribeTapeArchives
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeTapeArchives
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeTapeArchives)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [TapeArchive] -> Int -> DescribeTapeArchivesResponse
DescribeTapeArchivesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Marker")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"TapeArchives" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            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 DescribeTapeArchives where
  hashWithSalt :: Int -> DescribeTapeArchives -> Int
hashWithSalt Int
_salt DescribeTapeArchives' {Maybe Natural
Maybe [Text]
Maybe Text
tapeARNs :: Maybe [Text]
marker :: Maybe Text
limit :: Maybe Natural
$sel:tapeARNs:DescribeTapeArchives' :: DescribeTapeArchives -> Maybe [Text]
$sel:marker:DescribeTapeArchives' :: DescribeTapeArchives -> Maybe Text
$sel:limit:DescribeTapeArchives' :: DescribeTapeArchives -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
limit
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
marker
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
tapeARNs

instance Prelude.NFData DescribeTapeArchives where
  rnf :: DescribeTapeArchives -> ()
rnf DescribeTapeArchives' {Maybe Natural
Maybe [Text]
Maybe Text
tapeARNs :: Maybe [Text]
marker :: Maybe Text
limit :: Maybe Natural
$sel:tapeARNs:DescribeTapeArchives' :: DescribeTapeArchives -> Maybe [Text]
$sel:marker:DescribeTapeArchives' :: DescribeTapeArchives -> Maybe Text
$sel:limit:DescribeTapeArchives' :: DescribeTapeArchives -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
limit
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
tapeARNs

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

instance Data.ToJSON DescribeTapeArchives where
  toJSON :: DescribeTapeArchives -> Value
toJSON DescribeTapeArchives' {Maybe Natural
Maybe [Text]
Maybe Text
tapeARNs :: Maybe [Text]
marker :: Maybe Text
limit :: Maybe Natural
$sel:tapeARNs:DescribeTapeArchives' :: DescribeTapeArchives -> Maybe [Text]
$sel:marker:DescribeTapeArchives' :: DescribeTapeArchives -> Maybe Text
$sel:limit:DescribeTapeArchives' :: DescribeTapeArchives -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Limit" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
            (Key
"Marker" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
marker,
            (Key
"TapeARNs" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
tapeARNs
          ]
      )

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

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

-- | DescribeTapeArchivesOutput
--
-- /See:/ 'newDescribeTapeArchivesResponse' smart constructor.
data DescribeTapeArchivesResponse = DescribeTapeArchivesResponse'
  { -- | An opaque string that indicates the position at which the virtual tapes
    -- that were fetched for description ended. Use this marker in your next
    -- request to fetch the next set of virtual tapes in the virtual tape shelf
    -- (VTS). If there are no more virtual tapes to describe, this field does
    -- not appear in the response.
    DescribeTapeArchivesResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | An array of virtual tape objects in the virtual tape shelf (VTS). The
    -- description includes of the Amazon Resource Name (ARN) of the virtual
    -- tapes. The information returned includes the Amazon Resource Names
    -- (ARNs) of the tapes, size of the tapes, status of the tapes, progress of
    -- the description, and tape barcode.
    DescribeTapeArchivesResponse -> Maybe [TapeArchive]
tapeArchives :: Prelude.Maybe [TapeArchive],
    -- | The response's http status code.
    DescribeTapeArchivesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeTapeArchivesResponse
-> DescribeTapeArchivesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTapeArchivesResponse
-> DescribeTapeArchivesResponse -> Bool
$c/= :: DescribeTapeArchivesResponse
-> DescribeTapeArchivesResponse -> Bool
== :: DescribeTapeArchivesResponse
-> DescribeTapeArchivesResponse -> Bool
$c== :: DescribeTapeArchivesResponse
-> DescribeTapeArchivesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeTapeArchivesResponse]
ReadPrec DescribeTapeArchivesResponse
Int -> ReadS DescribeTapeArchivesResponse
ReadS [DescribeTapeArchivesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTapeArchivesResponse]
$creadListPrec :: ReadPrec [DescribeTapeArchivesResponse]
readPrec :: ReadPrec DescribeTapeArchivesResponse
$creadPrec :: ReadPrec DescribeTapeArchivesResponse
readList :: ReadS [DescribeTapeArchivesResponse]
$creadList :: ReadS [DescribeTapeArchivesResponse]
readsPrec :: Int -> ReadS DescribeTapeArchivesResponse
$creadsPrec :: Int -> ReadS DescribeTapeArchivesResponse
Prelude.Read, Int -> DescribeTapeArchivesResponse -> ShowS
[DescribeTapeArchivesResponse] -> ShowS
DescribeTapeArchivesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTapeArchivesResponse] -> ShowS
$cshowList :: [DescribeTapeArchivesResponse] -> ShowS
show :: DescribeTapeArchivesResponse -> String
$cshow :: DescribeTapeArchivesResponse -> String
showsPrec :: Int -> DescribeTapeArchivesResponse -> ShowS
$cshowsPrec :: Int -> DescribeTapeArchivesResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeTapeArchivesResponse x -> DescribeTapeArchivesResponse
forall x.
DescribeTapeArchivesResponse -> Rep DescribeTapeArchivesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeTapeArchivesResponse x -> DescribeTapeArchivesResponse
$cfrom :: forall x.
DescribeTapeArchivesResponse -> Rep DescribeTapeArchivesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeTapeArchivesResponse' 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:
--
-- 'marker', 'describeTapeArchivesResponse_marker' - An opaque string that indicates the position at which the virtual tapes
-- that were fetched for description ended. Use this marker in your next
-- request to fetch the next set of virtual tapes in the virtual tape shelf
-- (VTS). If there are no more virtual tapes to describe, this field does
-- not appear in the response.
--
-- 'tapeArchives', 'describeTapeArchivesResponse_tapeArchives' - An array of virtual tape objects in the virtual tape shelf (VTS). The
-- description includes of the Amazon Resource Name (ARN) of the virtual
-- tapes. The information returned includes the Amazon Resource Names
-- (ARNs) of the tapes, size of the tapes, status of the tapes, progress of
-- the description, and tape barcode.
--
-- 'httpStatus', 'describeTapeArchivesResponse_httpStatus' - The response's http status code.
newDescribeTapeArchivesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeTapeArchivesResponse
newDescribeTapeArchivesResponse :: Int -> DescribeTapeArchivesResponse
newDescribeTapeArchivesResponse Int
pHttpStatus_ =
  DescribeTapeArchivesResponse'
    { $sel:marker:DescribeTapeArchivesResponse' :: Maybe Text
marker =
        forall a. Maybe a
Prelude.Nothing,
      $sel:tapeArchives:DescribeTapeArchivesResponse' :: Maybe [TapeArchive]
tapeArchives = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeTapeArchivesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An opaque string that indicates the position at which the virtual tapes
-- that were fetched for description ended. Use this marker in your next
-- request to fetch the next set of virtual tapes in the virtual tape shelf
-- (VTS). If there are no more virtual tapes to describe, this field does
-- not appear in the response.
describeTapeArchivesResponse_marker :: Lens.Lens' DescribeTapeArchivesResponse (Prelude.Maybe Prelude.Text)
describeTapeArchivesResponse_marker :: Lens' DescribeTapeArchivesResponse (Maybe Text)
describeTapeArchivesResponse_marker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTapeArchivesResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeTapeArchivesResponse' :: DescribeTapeArchivesResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeTapeArchivesResponse
s@DescribeTapeArchivesResponse' {} Maybe Text
a -> DescribeTapeArchivesResponse
s {$sel:marker:DescribeTapeArchivesResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeTapeArchivesResponse)

-- | An array of virtual tape objects in the virtual tape shelf (VTS). The
-- description includes of the Amazon Resource Name (ARN) of the virtual
-- tapes. The information returned includes the Amazon Resource Names
-- (ARNs) of the tapes, size of the tapes, status of the tapes, progress of
-- the description, and tape barcode.
describeTapeArchivesResponse_tapeArchives :: Lens.Lens' DescribeTapeArchivesResponse (Prelude.Maybe [TapeArchive])
describeTapeArchivesResponse_tapeArchives :: Lens' DescribeTapeArchivesResponse (Maybe [TapeArchive])
describeTapeArchivesResponse_tapeArchives = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTapeArchivesResponse' {Maybe [TapeArchive]
tapeArchives :: Maybe [TapeArchive]
$sel:tapeArchives:DescribeTapeArchivesResponse' :: DescribeTapeArchivesResponse -> Maybe [TapeArchive]
tapeArchives} -> Maybe [TapeArchive]
tapeArchives) (\s :: DescribeTapeArchivesResponse
s@DescribeTapeArchivesResponse' {} Maybe [TapeArchive]
a -> DescribeTapeArchivesResponse
s {$sel:tapeArchives:DescribeTapeArchivesResponse' :: Maybe [TapeArchive]
tapeArchives = Maybe [TapeArchive]
a} :: DescribeTapeArchivesResponse) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeTapeArchivesResponse where
  rnf :: DescribeTapeArchivesResponse -> ()
rnf DescribeTapeArchivesResponse' {Int
Maybe [TapeArchive]
Maybe Text
httpStatus :: Int
tapeArchives :: Maybe [TapeArchive]
marker :: Maybe Text
$sel:httpStatus:DescribeTapeArchivesResponse' :: DescribeTapeArchivesResponse -> Int
$sel:tapeArchives:DescribeTapeArchivesResponse' :: DescribeTapeArchivesResponse -> Maybe [TapeArchive]
$sel:marker:DescribeTapeArchivesResponse' :: DescribeTapeArchivesResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
marker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [TapeArchive]
tapeArchives
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus