{-# 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_kmsEncrypted,
createTapes_kmsKey,
createTapes_poolId,
createTapes_tags,
createTapes_worm,
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.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
data CreateTapes = CreateTapes'
{
CreateTapes -> Maybe Bool
kmsEncrypted :: Prelude.Maybe Prelude.Bool,
CreateTapes -> Maybe Text
kmsKey :: Prelude.Maybe Prelude.Text,
CreateTapes -> Maybe Text
poolId :: Prelude.Maybe Prelude.Text,
CreateTapes -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateTapes -> Maybe Bool
worm :: Prelude.Maybe Prelude.Bool,
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
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]
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
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. 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'
{ $sel:kmsEncrypted:CreateTapes' :: Maybe Bool
kmsEncrypted = forall a. Maybe a
Prelude.Nothing,
$sel:kmsKey:CreateTapes' :: Maybe Text
kmsKey = forall a. Maybe a
Prelude.Nothing,
$sel:poolId:CreateTapes' :: Maybe Text
poolId = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateTapes' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
$sel:worm:CreateTapes' :: Maybe Bool
worm = 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_kmsEncrypted :: Lens.Lens' CreateTapes (Prelude.Maybe Prelude.Bool)
createTapes_kmsEncrypted :: Lens' CreateTapes (Maybe Bool)
createTapes_kmsEncrypted = 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_kmsKey :: Lens.Lens' CreateTapes (Prelude.Maybe Prelude.Text)
createTapes_kmsKey :: Lens' CreateTapes (Maybe Text)
createTapes_kmsKey = 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_poolId :: Lens.Lens' CreateTapes (Prelude.Maybe Prelude.Text)
createTapes_poolId :: Lens' CreateTapes (Maybe Text)
createTapes_poolId = 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_tags :: Lens.Lens' CreateTapes (Prelude.Maybe [Tag])
createTapes_tags :: Lens' CreateTapes (Maybe [Tag])
createTapes_tags = 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) 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
createTapes_worm :: Lens.Lens' CreateTapes (Prelude.Maybe Prelude.Bool)
createTapes_worm :: Lens' CreateTapes (Maybe Bool)
createTapes_worm = 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_gatewayARN :: Lens.Lens' CreateTapes Prelude.Text
createTapes_gatewayARN :: Lens' CreateTapes Text
createTapes_gatewayARN = 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 :: Lens' CreateTapes Integer
createTapes_tapeSizeInBytes = 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 :: Lens' CreateTapes Text
createTapes_clientToken = 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 :: Lens' CreateTapes Natural
createTapes_numTapesToCreate = 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 :: Lens' CreateTapes Text
createTapes_tapeBarcodePrefix = 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 :: (Service -> Service) -> CreateTapes -> Request CreateTapes
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 CreateTapes
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateTapes)))
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] -> Int -> CreateTapesResponse
CreateTapesResponse'
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
"TapeARNs" 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 CreateTapes where
hashWithSalt :: Int -> CreateTapes -> Int
hashWithSalt Int
_salt CreateTapes' {Integer
Natural
Maybe Bool
Maybe [Tag]
Maybe Text
Text
tapeBarcodePrefix :: Text
numTapesToCreate :: Natural
clientToken :: Text
tapeSizeInBytes :: Integer
gatewayARN :: Text
worm :: Maybe Bool
tags :: Maybe [Tag]
poolId :: Maybe Text
kmsKey :: Maybe Text
kmsEncrypted :: Maybe Bool
$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:worm:CreateTapes' :: CreateTapes -> Maybe Bool
$sel:tags:CreateTapes' :: CreateTapes -> Maybe [Tag]
$sel:poolId:CreateTapes' :: CreateTapes -> Maybe Text
$sel:kmsKey:CreateTapes' :: CreateTapes -> Maybe Text
$sel:kmsEncrypted:CreateTapes' :: CreateTapes -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
kmsEncrypted
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKey
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
poolId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
worm
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
gatewayARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Integer
tapeSizeInBytes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clientToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
numTapesToCreate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
tapeBarcodePrefix
instance Prelude.NFData CreateTapes where
rnf :: CreateTapes -> ()
rnf CreateTapes' {Integer
Natural
Maybe Bool
Maybe [Tag]
Maybe Text
Text
tapeBarcodePrefix :: Text
numTapesToCreate :: Natural
clientToken :: Text
tapeSizeInBytes :: Integer
gatewayARN :: Text
worm :: Maybe Bool
tags :: Maybe [Tag]
poolId :: Maybe Text
kmsKey :: Maybe Text
kmsEncrypted :: Maybe Bool
$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:worm:CreateTapes' :: CreateTapes -> Maybe Bool
$sel:tags:CreateTapes' :: CreateTapes -> Maybe [Tag]
$sel:poolId:CreateTapes' :: CreateTapes -> Maybe Text
$sel:kmsKey:CreateTapes' :: CreateTapes -> Maybe Text
$sel:kmsEncrypted:CreateTapes' :: CreateTapes -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
kmsEncrypted
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKey
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
poolId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
worm
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
gatewayARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Integer
tapeSizeInBytes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
clientToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
numTapesToCreate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
tapeBarcodePrefix
instance Data.ToHeaders CreateTapes where
toHeaders :: CreateTapes -> 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.CreateTapes" ::
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 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
worm :: Maybe Bool
tags :: Maybe [Tag]
poolId :: Maybe Text
kmsKey :: Maybe Text
kmsEncrypted :: Maybe Bool
$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:worm:CreateTapes' :: CreateTapes -> Maybe Bool
$sel:tags:CreateTapes' :: CreateTapes -> Maybe [Tag]
$sel:poolId:CreateTapes' :: CreateTapes -> Maybe Text
$sel:kmsKey:CreateTapes' :: CreateTapes -> Maybe Text
$sel:kmsEncrypted:CreateTapes' :: CreateTapes -> Maybe Bool
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"KMSEncrypted" 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 Bool
kmsEncrypted,
(Key
"KMSKey" 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
kmsKey,
(Key
"PoolId" 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
poolId,
(Key
"Tags" 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 [Tag]
tags,
(Key
"Worm" 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 Bool
worm,
forall a. a -> Maybe a
Prelude.Just (Key
"GatewayARN" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
gatewayARN),
forall a. a -> Maybe a
Prelude.Just
(Key
"TapeSizeInBytes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Integer
tapeSizeInBytes),
forall a. a -> Maybe a
Prelude.Just (Key
"ClientToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
clientToken),
forall a. a -> Maybe a
Prelude.Just
(Key
"NumTapesToCreate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
numTapesToCreate),
forall a. a -> Maybe a
Prelude.Just
(Key
"TapeBarcodePrefix" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
tapeBarcodePrefix)
]
)
instance Data.ToPath CreateTapes where
toPath :: CreateTapes -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateTapes where
toQuery :: CreateTapes -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const 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
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]
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
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. 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'
{ $sel:tapeARNs:CreateTapesResponse' :: Maybe [Text]
tapeARNs = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateTapesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createTapesResponse_tapeARNs :: Lens.Lens' CreateTapesResponse (Prelude.Maybe [Prelude.Text])
createTapesResponse_tapeARNs :: Lens' CreateTapesResponse (Maybe [Text])
createTapesResponse_tapeARNs = 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) 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
createTapesResponse_httpStatus :: Lens.Lens' CreateTapesResponse Prelude.Int
createTapesResponse_httpStatus :: Lens' CreateTapesResponse Int
createTapesResponse_httpStatus = 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 where
rnf :: CreateTapesResponse -> ()
rnf CreateTapesResponse' {Int
Maybe [Text]
httpStatus :: Int
tapeARNs :: Maybe [Text]
$sel:httpStatus:CreateTapesResponse' :: CreateTapesResponse -> Int
$sel:tapeARNs:CreateTapesResponse' :: CreateTapesResponse -> Maybe [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
tapeARNs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus