{-# 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 #-}
module Amazonka.StorageGateway.DescribeTapes
(
DescribeTapes (..),
newDescribeTapes,
describeTapes_marker,
describeTapes_limit,
describeTapes_tapeARNs,
describeTapes_gatewayARN,
DescribeTapesResponse (..),
newDescribeTapesResponse,
describeTapesResponse_marker,
describeTapesResponse_tapes,
describeTapesResponse_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.StorageGateway.Types
data DescribeTapes = DescribeTapes'
{
DescribeTapes -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeTapes -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
DescribeTapes -> Maybe [Text]
tapeARNs :: Prelude.Maybe [Prelude.Text],
DescribeTapes -> Text
gatewayARN :: Prelude.Text
}
deriving (DescribeTapes -> DescribeTapes -> Bool
(DescribeTapes -> DescribeTapes -> Bool)
-> (DescribeTapes -> DescribeTapes -> Bool) -> Eq DescribeTapes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTapes -> DescribeTapes -> Bool
$c/= :: DescribeTapes -> DescribeTapes -> Bool
== :: DescribeTapes -> DescribeTapes -> Bool
$c== :: DescribeTapes -> DescribeTapes -> Bool
Prelude.Eq, ReadPrec [DescribeTapes]
ReadPrec DescribeTapes
Int -> ReadS DescribeTapes
ReadS [DescribeTapes]
(Int -> ReadS DescribeTapes)
-> ReadS [DescribeTapes]
-> ReadPrec DescribeTapes
-> ReadPrec [DescribeTapes]
-> Read DescribeTapes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTapes]
$creadListPrec :: ReadPrec [DescribeTapes]
readPrec :: ReadPrec DescribeTapes
$creadPrec :: ReadPrec DescribeTapes
readList :: ReadS [DescribeTapes]
$creadList :: ReadS [DescribeTapes]
readsPrec :: Int -> ReadS DescribeTapes
$creadsPrec :: Int -> ReadS DescribeTapes
Prelude.Read, Int -> DescribeTapes -> ShowS
[DescribeTapes] -> ShowS
DescribeTapes -> String
(Int -> DescribeTapes -> ShowS)
-> (DescribeTapes -> String)
-> ([DescribeTapes] -> ShowS)
-> Show DescribeTapes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTapes] -> ShowS
$cshowList :: [DescribeTapes] -> ShowS
show :: DescribeTapes -> String
$cshow :: DescribeTapes -> String
showsPrec :: Int -> DescribeTapes -> ShowS
$cshowsPrec :: Int -> DescribeTapes -> ShowS
Prelude.Show, (forall x. DescribeTapes -> Rep DescribeTapes x)
-> (forall x. Rep DescribeTapes x -> DescribeTapes)
-> Generic DescribeTapes
forall x. Rep DescribeTapes x -> DescribeTapes
forall x. DescribeTapes -> Rep DescribeTapes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeTapes x -> DescribeTapes
$cfrom :: forall x. DescribeTapes -> Rep DescribeTapes x
Prelude.Generic)
newDescribeTapes ::
Prelude.Text ->
DescribeTapes
newDescribeTapes :: Text -> DescribeTapes
newDescribeTapes Text
pGatewayARN_ =
DescribeTapes' :: Maybe Text
-> Maybe Natural -> Maybe [Text] -> Text -> DescribeTapes
DescribeTapes'
{ $sel:marker:DescribeTapes' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:limit:DescribeTapes' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:tapeARNs:DescribeTapes' :: Maybe [Text]
tapeARNs = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:gatewayARN:DescribeTapes' :: Text
gatewayARN = Text
pGatewayARN_
}
describeTapes_marker :: Lens.Lens' DescribeTapes (Prelude.Maybe Prelude.Text)
describeTapes_marker :: (Maybe Text -> f (Maybe Text)) -> DescribeTapes -> f DescribeTapes
describeTapes_marker = (DescribeTapes -> Maybe Text)
-> (DescribeTapes -> Maybe Text -> DescribeTapes)
-> Lens DescribeTapes DescribeTapes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTapes' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeTapes' :: DescribeTapes -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeTapes
s@DescribeTapes' {} Maybe Text
a -> DescribeTapes
s {$sel:marker:DescribeTapes' :: Maybe Text
marker = Maybe Text
a} :: DescribeTapes)
describeTapes_limit :: Lens.Lens' DescribeTapes (Prelude.Maybe Prelude.Natural)
describeTapes_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeTapes -> f DescribeTapes
describeTapes_limit = (DescribeTapes -> Maybe Natural)
-> (DescribeTapes -> Maybe Natural -> DescribeTapes)
-> Lens DescribeTapes DescribeTapes (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTapes' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeTapes' :: DescribeTapes -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeTapes
s@DescribeTapes' {} Maybe Natural
a -> DescribeTapes
s {$sel:limit:DescribeTapes' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeTapes)
describeTapes_tapeARNs :: Lens.Lens' DescribeTapes (Prelude.Maybe [Prelude.Text])
describeTapes_tapeARNs :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeTapes -> f DescribeTapes
describeTapes_tapeARNs = (DescribeTapes -> Maybe [Text])
-> (DescribeTapes -> Maybe [Text] -> DescribeTapes)
-> Lens DescribeTapes DescribeTapes (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTapes' {Maybe [Text]
tapeARNs :: Maybe [Text]
$sel:tapeARNs:DescribeTapes' :: DescribeTapes -> Maybe [Text]
tapeARNs} -> Maybe [Text]
tapeARNs) (\s :: DescribeTapes
s@DescribeTapes' {} Maybe [Text]
a -> DescribeTapes
s {$sel:tapeARNs:DescribeTapes' :: Maybe [Text]
tapeARNs = Maybe [Text]
a} :: DescribeTapes) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeTapes -> f DescribeTapes)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeTapes
-> f DescribeTapes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeTapes_gatewayARN :: Lens.Lens' DescribeTapes Prelude.Text
describeTapes_gatewayARN :: (Text -> f Text) -> DescribeTapes -> f DescribeTapes
describeTapes_gatewayARN = (DescribeTapes -> Text)
-> (DescribeTapes -> Text -> DescribeTapes)
-> Lens DescribeTapes DescribeTapes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTapes' {Text
gatewayARN :: Text
$sel:gatewayARN:DescribeTapes' :: DescribeTapes -> Text
gatewayARN} -> Text
gatewayARN) (\s :: DescribeTapes
s@DescribeTapes' {} Text
a -> DescribeTapes
s {$sel:gatewayARN:DescribeTapes' :: Text
gatewayARN = Text
a} :: DescribeTapes)
instance Core.AWSPager DescribeTapes where
page :: DescribeTapes -> AWSResponse DescribeTapes -> Maybe DescribeTapes
page DescribeTapes
rq AWSResponse DescribeTapes
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeTapes
DescribeTapesResponse
rs
DescribeTapesResponse
-> Getting (First Text) DescribeTapesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeTapesResponse
-> Const (First Text) DescribeTapesResponse
Lens' DescribeTapesResponse (Maybe Text)
describeTapesResponse_marker ((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeTapesResponse
-> Const (First Text) DescribeTapesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeTapesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeTapes
forall a. Maybe a
Prelude.Nothing
| Maybe [Tape] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeTapes
DescribeTapesResponse
rs
DescribeTapesResponse
-> Getting (First [Tape]) DescribeTapesResponse [Tape]
-> Maybe [Tape]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Tape] -> Const (First [Tape]) (Maybe [Tape]))
-> DescribeTapesResponse
-> Const (First [Tape]) DescribeTapesResponse
Lens' DescribeTapesResponse (Maybe [Tape])
describeTapesResponse_tapes ((Maybe [Tape] -> Const (First [Tape]) (Maybe [Tape]))
-> DescribeTapesResponse
-> Const (First [Tape]) DescribeTapesResponse)
-> (([Tape] -> Const (First [Tape]) [Tape])
-> Maybe [Tape] -> Const (First [Tape]) (Maybe [Tape]))
-> Getting (First [Tape]) DescribeTapesResponse [Tape]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Tape] -> Const (First [Tape]) [Tape])
-> Maybe [Tape] -> Const (First [Tape]) (Maybe [Tape])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeTapes
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeTapes -> Maybe DescribeTapes
forall a. a -> Maybe a
Prelude.Just (DescribeTapes -> Maybe DescribeTapes)
-> DescribeTapes -> Maybe DescribeTapes
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeTapes
rq
DescribeTapes -> (DescribeTapes -> DescribeTapes) -> DescribeTapes
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeTapes -> Identity DescribeTapes
Lens DescribeTapes DescribeTapes (Maybe Text) (Maybe Text)
describeTapes_marker
((Maybe Text -> Identity (Maybe Text))
-> DescribeTapes -> Identity DescribeTapes)
-> Maybe Text -> DescribeTapes -> DescribeTapes
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeTapes
DescribeTapesResponse
rs
DescribeTapesResponse
-> Getting (First Text) DescribeTapesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeTapesResponse
-> Const (First Text) DescribeTapesResponse
Lens' DescribeTapesResponse (Maybe Text)
describeTapesResponse_marker ((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeTapesResponse
-> Const (First Text) DescribeTapesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeTapesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest DescribeTapes where
type
AWSResponse DescribeTapes =
DescribeTapesResponse
request :: DescribeTapes -> Request DescribeTapes
request = Service -> DescribeTapes -> Request DescribeTapes
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeTapes
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeTapes)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeTapes))
-> Logger
-> Service
-> Proxy DescribeTapes
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeTapes)))
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 Text -> Maybe [Tape] -> Int -> DescribeTapesResponse
DescribeTapesResponse'
(Maybe Text -> Maybe [Tape] -> Int -> DescribeTapesResponse)
-> Either String (Maybe Text)
-> Either String (Maybe [Tape] -> Int -> DescribeTapesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Marker")
Either String (Maybe [Tape] -> Int -> DescribeTapesResponse)
-> Either String (Maybe [Tape])
-> Either String (Int -> DescribeTapesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Tape]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tapes" Either String (Maybe (Maybe [Tape]))
-> Maybe [Tape] -> Either String (Maybe [Tape])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Tape]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> DescribeTapesResponse)
-> Either String Int -> Either String DescribeTapesResponse
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 DescribeTapes
instance Prelude.NFData DescribeTapes
instance Core.ToHeaders DescribeTapes where
toHeaders :: DescribeTapes -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeTapes -> 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
"StorageGateway_20130630.DescribeTapes" ::
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 DescribeTapes where
toJSON :: DescribeTapes -> Value
toJSON DescribeTapes' {Maybe Natural
Maybe [Text]
Maybe Text
Text
gatewayARN :: Text
tapeARNs :: Maybe [Text]
limit :: Maybe Natural
marker :: Maybe Text
$sel:gatewayARN:DescribeTapes' :: DescribeTapes -> Text
$sel:tapeARNs:DescribeTapes' :: DescribeTapes -> Maybe [Text]
$sel:limit:DescribeTapes' :: DescribeTapes -> Maybe Natural
$sel:marker:DescribeTapes' :: DescribeTapes -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Marker" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
marker,
(Text
"Limit" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
(Text
"TapeARNs" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
tapeARNs,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"GatewayARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
gatewayARN)
]
)
instance Core.ToPath DescribeTapes where
toPath :: DescribeTapes -> ByteString
toPath = ByteString -> DescribeTapes -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeTapes where
toQuery :: DescribeTapes -> QueryString
toQuery = QueryString -> DescribeTapes -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeTapesResponse = DescribeTapesResponse'
{
DescribeTapesResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeTapesResponse -> Maybe [Tape]
tapes :: Prelude.Maybe [Tape],
DescribeTapesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeTapesResponse -> DescribeTapesResponse -> Bool
(DescribeTapesResponse -> DescribeTapesResponse -> Bool)
-> (DescribeTapesResponse -> DescribeTapesResponse -> Bool)
-> Eq DescribeTapesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTapesResponse -> DescribeTapesResponse -> Bool
$c/= :: DescribeTapesResponse -> DescribeTapesResponse -> Bool
== :: DescribeTapesResponse -> DescribeTapesResponse -> Bool
$c== :: DescribeTapesResponse -> DescribeTapesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeTapesResponse]
ReadPrec DescribeTapesResponse
Int -> ReadS DescribeTapesResponse
ReadS [DescribeTapesResponse]
(Int -> ReadS DescribeTapesResponse)
-> ReadS [DescribeTapesResponse]
-> ReadPrec DescribeTapesResponse
-> ReadPrec [DescribeTapesResponse]
-> Read DescribeTapesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTapesResponse]
$creadListPrec :: ReadPrec [DescribeTapesResponse]
readPrec :: ReadPrec DescribeTapesResponse
$creadPrec :: ReadPrec DescribeTapesResponse
readList :: ReadS [DescribeTapesResponse]
$creadList :: ReadS [DescribeTapesResponse]
readsPrec :: Int -> ReadS DescribeTapesResponse
$creadsPrec :: Int -> ReadS DescribeTapesResponse
Prelude.Read, Int -> DescribeTapesResponse -> ShowS
[DescribeTapesResponse] -> ShowS
DescribeTapesResponse -> String
(Int -> DescribeTapesResponse -> ShowS)
-> (DescribeTapesResponse -> String)
-> ([DescribeTapesResponse] -> ShowS)
-> Show DescribeTapesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTapesResponse] -> ShowS
$cshowList :: [DescribeTapesResponse] -> ShowS
show :: DescribeTapesResponse -> String
$cshow :: DescribeTapesResponse -> String
showsPrec :: Int -> DescribeTapesResponse -> ShowS
$cshowsPrec :: Int -> DescribeTapesResponse -> ShowS
Prelude.Show, (forall x. DescribeTapesResponse -> Rep DescribeTapesResponse x)
-> (forall x. Rep DescribeTapesResponse x -> DescribeTapesResponse)
-> Generic DescribeTapesResponse
forall x. Rep DescribeTapesResponse x -> DescribeTapesResponse
forall x. DescribeTapesResponse -> Rep DescribeTapesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeTapesResponse x -> DescribeTapesResponse
$cfrom :: forall x. DescribeTapesResponse -> Rep DescribeTapesResponse x
Prelude.Generic)
newDescribeTapesResponse ::
Prelude.Int ->
DescribeTapesResponse
newDescribeTapesResponse :: Int -> DescribeTapesResponse
newDescribeTapesResponse Int
pHttpStatus_ =
DescribeTapesResponse' :: Maybe Text -> Maybe [Tape] -> Int -> DescribeTapesResponse
DescribeTapesResponse'
{ $sel:marker:DescribeTapesResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tapes:DescribeTapesResponse' :: Maybe [Tape]
tapes = Maybe [Tape]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeTapesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeTapesResponse_marker :: Lens.Lens' DescribeTapesResponse (Prelude.Maybe Prelude.Text)
describeTapesResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeTapesResponse -> f DescribeTapesResponse
describeTapesResponse_marker = (DescribeTapesResponse -> Maybe Text)
-> (DescribeTapesResponse -> Maybe Text -> DescribeTapesResponse)
-> Lens' DescribeTapesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTapesResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeTapesResponse' :: DescribeTapesResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeTapesResponse
s@DescribeTapesResponse' {} Maybe Text
a -> DescribeTapesResponse
s {$sel:marker:DescribeTapesResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeTapesResponse)
describeTapesResponse_tapes :: Lens.Lens' DescribeTapesResponse (Prelude.Maybe [Tape])
describeTapesResponse_tapes :: (Maybe [Tape] -> f (Maybe [Tape]))
-> DescribeTapesResponse -> f DescribeTapesResponse
describeTapesResponse_tapes = (DescribeTapesResponse -> Maybe [Tape])
-> (DescribeTapesResponse -> Maybe [Tape] -> DescribeTapesResponse)
-> Lens' DescribeTapesResponse (Maybe [Tape])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTapesResponse' {Maybe [Tape]
tapes :: Maybe [Tape]
$sel:tapes:DescribeTapesResponse' :: DescribeTapesResponse -> Maybe [Tape]
tapes} -> Maybe [Tape]
tapes) (\s :: DescribeTapesResponse
s@DescribeTapesResponse' {} Maybe [Tape]
a -> DescribeTapesResponse
s {$sel:tapes:DescribeTapesResponse' :: Maybe [Tape]
tapes = Maybe [Tape]
a} :: DescribeTapesResponse) ((Maybe [Tape] -> f (Maybe [Tape]))
-> DescribeTapesResponse -> f DescribeTapesResponse)
-> ((Maybe [Tape] -> f (Maybe [Tape]))
-> Maybe [Tape] -> f (Maybe [Tape]))
-> (Maybe [Tape] -> f (Maybe [Tape]))
-> DescribeTapesResponse
-> f DescribeTapesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tape] [Tape] [Tape] [Tape]
-> Iso (Maybe [Tape]) (Maybe [Tape]) (Maybe [Tape]) (Maybe [Tape])
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 [Tape] [Tape] [Tape] [Tape]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeTapesResponse_httpStatus :: Lens.Lens' DescribeTapesResponse Prelude.Int
describeTapesResponse_httpStatus :: (Int -> f Int) -> DescribeTapesResponse -> f DescribeTapesResponse
describeTapesResponse_httpStatus = (DescribeTapesResponse -> Int)
-> (DescribeTapesResponse -> Int -> DescribeTapesResponse)
-> Lens DescribeTapesResponse DescribeTapesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTapesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeTapesResponse' :: DescribeTapesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeTapesResponse
s@DescribeTapesResponse' {} Int
a -> DescribeTapesResponse
s {$sel:httpStatus:DescribeTapesResponse' :: Int
httpStatus = Int
a} :: DescribeTapesResponse)
instance Prelude.NFData DescribeTapesResponse