{-# 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.CreateTapes
(
CreateTapes (..),
newCreateTapes,
createTapes_kmsKey,
createTapes_kmsEncrypted,
createTapes_poolId,
createTapes_worm,
createTapes_tags,
createTapes_gatewayARN,
createTapes_tapeSizeInBytes,
createTapes_clientToken,
createTapes_numTapesToCreate,
createTapes_tapeBarcodePrefix,
CreateTapesResponse (..),
newCreateTapesResponse,
createTapesResponse_tapeARNs,
createTapesResponse_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 CreateTapes = CreateTapes'
{
CreateTapes -> Maybe Text
kmsKey :: Prelude.Maybe Prelude.Text,
CreateTapes -> Maybe Bool
kmsEncrypted :: Prelude.Maybe Prelude.Bool,
CreateTapes -> Maybe Text
poolId :: Prelude.Maybe Prelude.Text,
CreateTapes -> Maybe Bool
worm :: Prelude.Maybe Prelude.Bool,
CreateTapes -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateTapes -> Text
gatewayARN :: Prelude.Text,
CreateTapes -> Integer
tapeSizeInBytes :: Prelude.Integer,
CreateTapes -> Text
clientToken :: Prelude.Text,
CreateTapes -> Natural
numTapesToCreate :: Prelude.Natural,
CreateTapes -> Text
tapeBarcodePrefix :: Prelude.Text
}
deriving (CreateTapes -> CreateTapes -> Bool
(CreateTapes -> CreateTapes -> Bool)
-> (CreateTapes -> CreateTapes -> Bool) -> Eq CreateTapes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTapes -> CreateTapes -> Bool
$c/= :: CreateTapes -> CreateTapes -> Bool
== :: CreateTapes -> CreateTapes -> Bool
$c== :: CreateTapes -> CreateTapes -> Bool
Prelude.Eq, ReadPrec [CreateTapes]
ReadPrec CreateTapes
Int -> ReadS CreateTapes
ReadS [CreateTapes]
(Int -> ReadS CreateTapes)
-> ReadS [CreateTapes]
-> ReadPrec CreateTapes
-> ReadPrec [CreateTapes]
-> Read CreateTapes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTapes]
$creadListPrec :: ReadPrec [CreateTapes]
readPrec :: ReadPrec CreateTapes
$creadPrec :: ReadPrec CreateTapes
readList :: ReadS [CreateTapes]
$creadList :: ReadS [CreateTapes]
readsPrec :: Int -> ReadS CreateTapes
$creadsPrec :: Int -> ReadS CreateTapes
Prelude.Read, Int -> CreateTapes -> ShowS
[CreateTapes] -> ShowS
CreateTapes -> String
(Int -> CreateTapes -> ShowS)
-> (CreateTapes -> String)
-> ([CreateTapes] -> ShowS)
-> Show CreateTapes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTapes] -> ShowS
$cshowList :: [CreateTapes] -> ShowS
show :: CreateTapes -> String
$cshow :: CreateTapes -> String
showsPrec :: Int -> CreateTapes -> ShowS
$cshowsPrec :: Int -> CreateTapes -> ShowS
Prelude.Show, (forall x. CreateTapes -> Rep CreateTapes x)
-> (forall x. Rep CreateTapes x -> CreateTapes)
-> Generic CreateTapes
forall x. Rep CreateTapes x -> CreateTapes
forall x. CreateTapes -> Rep CreateTapes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateTapes x -> CreateTapes
$cfrom :: forall x. CreateTapes -> Rep CreateTapes x
Prelude.Generic)
newCreateTapes ::
Prelude.Text ->
Prelude.Integer ->
Prelude.Text ->
Prelude.Natural ->
Prelude.Text ->
CreateTapes
newCreateTapes :: Text -> Integer -> Text -> Natural -> Text -> CreateTapes
newCreateTapes
Text
pGatewayARN_
Integer
pTapeSizeInBytes_
Text
pClientToken_
Natural
pNumTapesToCreate_
Text
pTapeBarcodePrefix_ =
CreateTapes' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe [Tag]
-> Text
-> Integer
-> Text
-> Natural
-> Text
-> CreateTapes
CreateTapes'
{ $sel:kmsKey:CreateTapes' :: Maybe Text
kmsKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:kmsEncrypted:CreateTapes' :: Maybe Bool
kmsEncrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:poolId:CreateTapes' :: Maybe Text
poolId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:worm:CreateTapes' :: Maybe Bool
worm = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateTapes' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:gatewayARN:CreateTapes' :: Text
gatewayARN = Text
pGatewayARN_,
$sel:tapeSizeInBytes:CreateTapes' :: Integer
tapeSizeInBytes = Integer
pTapeSizeInBytes_,
$sel:clientToken:CreateTapes' :: Text
clientToken = Text
pClientToken_,
$sel:numTapesToCreate:CreateTapes' :: Natural
numTapesToCreate = Natural
pNumTapesToCreate_,
$sel:tapeBarcodePrefix:CreateTapes' :: Text
tapeBarcodePrefix = Text
pTapeBarcodePrefix_
}
createTapes_kmsKey :: Lens.Lens' CreateTapes (Prelude.Maybe Prelude.Text)
createTapes_kmsKey :: (Maybe Text -> f (Maybe Text)) -> CreateTapes -> f CreateTapes
createTapes_kmsKey = (CreateTapes -> Maybe Text)
-> (CreateTapes -> Maybe Text -> CreateTapes)
-> Lens CreateTapes CreateTapes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapes' {Maybe Text
kmsKey :: Maybe Text
$sel:kmsKey:CreateTapes' :: CreateTapes -> Maybe Text
kmsKey} -> Maybe Text
kmsKey) (\s :: CreateTapes
s@CreateTapes' {} Maybe Text
a -> CreateTapes
s {$sel:kmsKey:CreateTapes' :: Maybe Text
kmsKey = Maybe Text
a} :: CreateTapes)
createTapes_kmsEncrypted :: Lens.Lens' CreateTapes (Prelude.Maybe Prelude.Bool)
createTapes_kmsEncrypted :: (Maybe Bool -> f (Maybe Bool)) -> CreateTapes -> f CreateTapes
createTapes_kmsEncrypted = (CreateTapes -> Maybe Bool)
-> (CreateTapes -> Maybe Bool -> CreateTapes)
-> Lens CreateTapes CreateTapes (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapes' {Maybe Bool
kmsEncrypted :: Maybe Bool
$sel:kmsEncrypted:CreateTapes' :: CreateTapes -> Maybe Bool
kmsEncrypted} -> Maybe Bool
kmsEncrypted) (\s :: CreateTapes
s@CreateTapes' {} Maybe Bool
a -> CreateTapes
s {$sel:kmsEncrypted:CreateTapes' :: Maybe Bool
kmsEncrypted = Maybe Bool
a} :: CreateTapes)
createTapes_poolId :: Lens.Lens' CreateTapes (Prelude.Maybe Prelude.Text)
createTapes_poolId :: (Maybe Text -> f (Maybe Text)) -> CreateTapes -> f CreateTapes
createTapes_poolId = (CreateTapes -> Maybe Text)
-> (CreateTapes -> Maybe Text -> CreateTapes)
-> Lens CreateTapes CreateTapes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapes' {Maybe Text
poolId :: Maybe Text
$sel:poolId:CreateTapes' :: CreateTapes -> Maybe Text
poolId} -> Maybe Text
poolId) (\s :: CreateTapes
s@CreateTapes' {} Maybe Text
a -> CreateTapes
s {$sel:poolId:CreateTapes' :: Maybe Text
poolId = Maybe Text
a} :: CreateTapes)
createTapes_worm :: Lens.Lens' CreateTapes (Prelude.Maybe Prelude.Bool)
createTapes_worm :: (Maybe Bool -> f (Maybe Bool)) -> CreateTapes -> f CreateTapes
createTapes_worm = (CreateTapes -> Maybe Bool)
-> (CreateTapes -> Maybe Bool -> CreateTapes)
-> Lens CreateTapes CreateTapes (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapes' {Maybe Bool
worm :: Maybe Bool
$sel:worm:CreateTapes' :: CreateTapes -> Maybe Bool
worm} -> Maybe Bool
worm) (\s :: CreateTapes
s@CreateTapes' {} Maybe Bool
a -> CreateTapes
s {$sel:worm:CreateTapes' :: Maybe Bool
worm = Maybe Bool
a} :: CreateTapes)
createTapes_tags :: Lens.Lens' CreateTapes (Prelude.Maybe [Tag])
createTapes_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> CreateTapes -> f CreateTapes
createTapes_tags = (CreateTapes -> Maybe [Tag])
-> (CreateTapes -> Maybe [Tag] -> CreateTapes)
-> Lens CreateTapes CreateTapes (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapes' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateTapes' :: CreateTapes -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateTapes
s@CreateTapes' {} Maybe [Tag]
a -> CreateTapes
s {$sel:tags:CreateTapes' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateTapes) ((Maybe [Tag] -> f (Maybe [Tag])) -> CreateTapes -> f CreateTapes)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateTapes
-> f CreateTapes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createTapes_gatewayARN :: Lens.Lens' CreateTapes Prelude.Text
createTapes_gatewayARN :: (Text -> f Text) -> CreateTapes -> f CreateTapes
createTapes_gatewayARN = (CreateTapes -> Text)
-> (CreateTapes -> Text -> CreateTapes)
-> Lens CreateTapes CreateTapes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapes' {Text
gatewayARN :: Text
$sel:gatewayARN:CreateTapes' :: CreateTapes -> Text
gatewayARN} -> Text
gatewayARN) (\s :: CreateTapes
s@CreateTapes' {} Text
a -> CreateTapes
s {$sel:gatewayARN:CreateTapes' :: Text
gatewayARN = Text
a} :: CreateTapes)
createTapes_tapeSizeInBytes :: Lens.Lens' CreateTapes Prelude.Integer
createTapes_tapeSizeInBytes :: (Integer -> f Integer) -> CreateTapes -> f CreateTapes
createTapes_tapeSizeInBytes = (CreateTapes -> Integer)
-> (CreateTapes -> Integer -> CreateTapes)
-> Lens CreateTapes CreateTapes Integer Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapes' {Integer
tapeSizeInBytes :: Integer
$sel:tapeSizeInBytes:CreateTapes' :: CreateTapes -> Integer
tapeSizeInBytes} -> Integer
tapeSizeInBytes) (\s :: CreateTapes
s@CreateTapes' {} Integer
a -> CreateTapes
s {$sel:tapeSizeInBytes:CreateTapes' :: Integer
tapeSizeInBytes = Integer
a} :: CreateTapes)
createTapes_clientToken :: Lens.Lens' CreateTapes Prelude.Text
createTapes_clientToken :: (Text -> f Text) -> CreateTapes -> f CreateTapes
createTapes_clientToken = (CreateTapes -> Text)
-> (CreateTapes -> Text -> CreateTapes)
-> Lens CreateTapes CreateTapes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapes' {Text
clientToken :: Text
$sel:clientToken:CreateTapes' :: CreateTapes -> Text
clientToken} -> Text
clientToken) (\s :: CreateTapes
s@CreateTapes' {} Text
a -> CreateTapes
s {$sel:clientToken:CreateTapes' :: Text
clientToken = Text
a} :: CreateTapes)
createTapes_numTapesToCreate :: Lens.Lens' CreateTapes Prelude.Natural
createTapes_numTapesToCreate :: (Natural -> f Natural) -> CreateTapes -> f CreateTapes
createTapes_numTapesToCreate = (CreateTapes -> Natural)
-> (CreateTapes -> Natural -> CreateTapes)
-> Lens CreateTapes CreateTapes Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapes' {Natural
numTapesToCreate :: Natural
$sel:numTapesToCreate:CreateTapes' :: CreateTapes -> Natural
numTapesToCreate} -> Natural
numTapesToCreate) (\s :: CreateTapes
s@CreateTapes' {} Natural
a -> CreateTapes
s {$sel:numTapesToCreate:CreateTapes' :: Natural
numTapesToCreate = Natural
a} :: CreateTapes)
createTapes_tapeBarcodePrefix :: Lens.Lens' CreateTapes Prelude.Text
createTapes_tapeBarcodePrefix :: (Text -> f Text) -> CreateTapes -> f CreateTapes
createTapes_tapeBarcodePrefix = (CreateTapes -> Text)
-> (CreateTapes -> Text -> CreateTapes)
-> Lens CreateTapes CreateTapes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapes' {Text
tapeBarcodePrefix :: Text
$sel:tapeBarcodePrefix:CreateTapes' :: CreateTapes -> Text
tapeBarcodePrefix} -> Text
tapeBarcodePrefix) (\s :: CreateTapes
s@CreateTapes' {} Text
a -> CreateTapes
s {$sel:tapeBarcodePrefix:CreateTapes' :: Text
tapeBarcodePrefix = Text
a} :: CreateTapes)
instance Core.AWSRequest CreateTapes where
type AWSResponse CreateTapes = CreateTapesResponse
request :: CreateTapes -> Request CreateTapes
request = Service -> CreateTapes -> Request CreateTapes
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateTapes
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateTapes)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateTapes))
-> Logger
-> Service
-> Proxy CreateTapes
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateTapes)))
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] -> Int -> CreateTapesResponse
CreateTapesResponse'
(Maybe [Text] -> Int -> CreateTapesResponse)
-> Either String (Maybe [Text])
-> Either String (Int -> CreateTapesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TapeARNs" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> CreateTapesResponse)
-> Either String Int -> Either String CreateTapesResponse
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 CreateTapes
instance Prelude.NFData CreateTapes
instance Core.ToHeaders CreateTapes where
toHeaders :: CreateTapes -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateTapes -> 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.CreateTapes" ::
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 CreateTapes where
toJSON :: CreateTapes -> Value
toJSON CreateTapes' {Integer
Natural
Maybe Bool
Maybe [Tag]
Maybe Text
Text
tapeBarcodePrefix :: Text
numTapesToCreate :: Natural
clientToken :: Text
tapeSizeInBytes :: Integer
gatewayARN :: Text
tags :: Maybe [Tag]
worm :: Maybe Bool
poolId :: Maybe Text
kmsEncrypted :: Maybe Bool
kmsKey :: Maybe Text
$sel:tapeBarcodePrefix:CreateTapes' :: CreateTapes -> Text
$sel:numTapesToCreate:CreateTapes' :: CreateTapes -> Natural
$sel:clientToken:CreateTapes' :: CreateTapes -> Text
$sel:tapeSizeInBytes:CreateTapes' :: CreateTapes -> Integer
$sel:gatewayARN:CreateTapes' :: CreateTapes -> Text
$sel:tags:CreateTapes' :: CreateTapes -> Maybe [Tag]
$sel:worm:CreateTapes' :: CreateTapes -> Maybe Bool
$sel:poolId:CreateTapes' :: CreateTapes -> Maybe Text
$sel:kmsEncrypted:CreateTapes' :: CreateTapes -> Maybe Bool
$sel:kmsKey:CreateTapes' :: CreateTapes -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"KMSKey" 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
kmsKey,
(Text
"KMSEncrypted" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
kmsEncrypted,
(Text
"PoolId" 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
poolId,
(Text
"Worm" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
worm,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
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),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"TapeSizeInBytes" Text -> Integer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Integer
tapeSizeInBytes),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ClientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientToken),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"NumTapesToCreate" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
numTapesToCreate),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"TapeBarcodePrefix" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
tapeBarcodePrefix)
]
)
instance Core.ToPath CreateTapes where
toPath :: CreateTapes -> ByteString
toPath = ByteString -> CreateTapes -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateTapes where
toQuery :: CreateTapes -> QueryString
toQuery = QueryString -> CreateTapes -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateTapesResponse = CreateTapesResponse'
{
CreateTapesResponse -> Maybe [Text]
tapeARNs :: Prelude.Maybe [Prelude.Text],
CreateTapesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateTapesResponse -> CreateTapesResponse -> Bool
(CreateTapesResponse -> CreateTapesResponse -> Bool)
-> (CreateTapesResponse -> CreateTapesResponse -> Bool)
-> Eq CreateTapesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTapesResponse -> CreateTapesResponse -> Bool
$c/= :: CreateTapesResponse -> CreateTapesResponse -> Bool
== :: CreateTapesResponse -> CreateTapesResponse -> Bool
$c== :: CreateTapesResponse -> CreateTapesResponse -> Bool
Prelude.Eq, ReadPrec [CreateTapesResponse]
ReadPrec CreateTapesResponse
Int -> ReadS CreateTapesResponse
ReadS [CreateTapesResponse]
(Int -> ReadS CreateTapesResponse)
-> ReadS [CreateTapesResponse]
-> ReadPrec CreateTapesResponse
-> ReadPrec [CreateTapesResponse]
-> Read CreateTapesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTapesResponse]
$creadListPrec :: ReadPrec [CreateTapesResponse]
readPrec :: ReadPrec CreateTapesResponse
$creadPrec :: ReadPrec CreateTapesResponse
readList :: ReadS [CreateTapesResponse]
$creadList :: ReadS [CreateTapesResponse]
readsPrec :: Int -> ReadS CreateTapesResponse
$creadsPrec :: Int -> ReadS CreateTapesResponse
Prelude.Read, Int -> CreateTapesResponse -> ShowS
[CreateTapesResponse] -> ShowS
CreateTapesResponse -> String
(Int -> CreateTapesResponse -> ShowS)
-> (CreateTapesResponse -> String)
-> ([CreateTapesResponse] -> ShowS)
-> Show CreateTapesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTapesResponse] -> ShowS
$cshowList :: [CreateTapesResponse] -> ShowS
show :: CreateTapesResponse -> String
$cshow :: CreateTapesResponse -> String
showsPrec :: Int -> CreateTapesResponse -> ShowS
$cshowsPrec :: Int -> CreateTapesResponse -> ShowS
Prelude.Show, (forall x. CreateTapesResponse -> Rep CreateTapesResponse x)
-> (forall x. Rep CreateTapesResponse x -> CreateTapesResponse)
-> Generic CreateTapesResponse
forall x. Rep CreateTapesResponse x -> CreateTapesResponse
forall x. CreateTapesResponse -> Rep CreateTapesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateTapesResponse x -> CreateTapesResponse
$cfrom :: forall x. CreateTapesResponse -> Rep CreateTapesResponse x
Prelude.Generic)
newCreateTapesResponse ::
Prelude.Int ->
CreateTapesResponse
newCreateTapesResponse :: Int -> CreateTapesResponse
newCreateTapesResponse Int
pHttpStatus_ =
CreateTapesResponse' :: Maybe [Text] -> Int -> CreateTapesResponse
CreateTapesResponse'
{ $sel:tapeARNs:CreateTapesResponse' :: Maybe [Text]
tapeARNs = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateTapesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createTapesResponse_tapeARNs :: Lens.Lens' CreateTapesResponse (Prelude.Maybe [Prelude.Text])
createTapesResponse_tapeARNs :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateTapesResponse -> f CreateTapesResponse
createTapesResponse_tapeARNs = (CreateTapesResponse -> Maybe [Text])
-> (CreateTapesResponse -> Maybe [Text] -> CreateTapesResponse)
-> Lens
CreateTapesResponse
CreateTapesResponse
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapesResponse' {Maybe [Text]
tapeARNs :: Maybe [Text]
$sel:tapeARNs:CreateTapesResponse' :: CreateTapesResponse -> Maybe [Text]
tapeARNs} -> Maybe [Text]
tapeARNs) (\s :: CreateTapesResponse
s@CreateTapesResponse' {} Maybe [Text]
a -> CreateTapesResponse
s {$sel:tapeARNs:CreateTapesResponse' :: Maybe [Text]
tapeARNs = Maybe [Text]
a} :: CreateTapesResponse) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateTapesResponse -> f CreateTapesResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateTapesResponse
-> f CreateTapesResponse
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
createTapesResponse_httpStatus :: Lens.Lens' CreateTapesResponse Prelude.Int
createTapesResponse_httpStatus :: (Int -> f Int) -> CreateTapesResponse -> f CreateTapesResponse
createTapesResponse_httpStatus = (CreateTapesResponse -> Int)
-> (CreateTapesResponse -> Int -> CreateTapesResponse)
-> Lens CreateTapesResponse CreateTapesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapesResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateTapesResponse' :: CreateTapesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateTapesResponse
s@CreateTapesResponse' {} Int
a -> CreateTapesResponse
s {$sel:httpStatus:CreateTapesResponse' :: Int
httpStatus = Int
a} :: CreateTapesResponse)
instance Prelude.NFData CreateTapesResponse