{-# 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.CreateTapeWithBarcode
(
CreateTapeWithBarcode (..),
newCreateTapeWithBarcode,
createTapeWithBarcode_kmsKey,
createTapeWithBarcode_kmsEncrypted,
createTapeWithBarcode_poolId,
createTapeWithBarcode_worm,
createTapeWithBarcode_tags,
createTapeWithBarcode_gatewayARN,
createTapeWithBarcode_tapeSizeInBytes,
createTapeWithBarcode_tapeBarcode,
CreateTapeWithBarcodeResponse (..),
newCreateTapeWithBarcodeResponse,
createTapeWithBarcodeResponse_tapeARN,
createTapeWithBarcodeResponse_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 CreateTapeWithBarcode = CreateTapeWithBarcode'
{
CreateTapeWithBarcode -> Maybe Text
kmsKey :: Prelude.Maybe Prelude.Text,
CreateTapeWithBarcode -> Maybe Bool
kmsEncrypted :: Prelude.Maybe Prelude.Bool,
CreateTapeWithBarcode -> Maybe Text
poolId :: Prelude.Maybe Prelude.Text,
CreateTapeWithBarcode -> Maybe Bool
worm :: Prelude.Maybe Prelude.Bool,
CreateTapeWithBarcode -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateTapeWithBarcode -> Text
gatewayARN :: Prelude.Text,
CreateTapeWithBarcode -> Integer
tapeSizeInBytes :: Prelude.Integer,
CreateTapeWithBarcode -> Text
tapeBarcode :: Prelude.Text
}
deriving (CreateTapeWithBarcode -> CreateTapeWithBarcode -> Bool
(CreateTapeWithBarcode -> CreateTapeWithBarcode -> Bool)
-> (CreateTapeWithBarcode -> CreateTapeWithBarcode -> Bool)
-> Eq CreateTapeWithBarcode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTapeWithBarcode -> CreateTapeWithBarcode -> Bool
$c/= :: CreateTapeWithBarcode -> CreateTapeWithBarcode -> Bool
== :: CreateTapeWithBarcode -> CreateTapeWithBarcode -> Bool
$c== :: CreateTapeWithBarcode -> CreateTapeWithBarcode -> Bool
Prelude.Eq, ReadPrec [CreateTapeWithBarcode]
ReadPrec CreateTapeWithBarcode
Int -> ReadS CreateTapeWithBarcode
ReadS [CreateTapeWithBarcode]
(Int -> ReadS CreateTapeWithBarcode)
-> ReadS [CreateTapeWithBarcode]
-> ReadPrec CreateTapeWithBarcode
-> ReadPrec [CreateTapeWithBarcode]
-> Read CreateTapeWithBarcode
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTapeWithBarcode]
$creadListPrec :: ReadPrec [CreateTapeWithBarcode]
readPrec :: ReadPrec CreateTapeWithBarcode
$creadPrec :: ReadPrec CreateTapeWithBarcode
readList :: ReadS [CreateTapeWithBarcode]
$creadList :: ReadS [CreateTapeWithBarcode]
readsPrec :: Int -> ReadS CreateTapeWithBarcode
$creadsPrec :: Int -> ReadS CreateTapeWithBarcode
Prelude.Read, Int -> CreateTapeWithBarcode -> ShowS
[CreateTapeWithBarcode] -> ShowS
CreateTapeWithBarcode -> String
(Int -> CreateTapeWithBarcode -> ShowS)
-> (CreateTapeWithBarcode -> String)
-> ([CreateTapeWithBarcode] -> ShowS)
-> Show CreateTapeWithBarcode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTapeWithBarcode] -> ShowS
$cshowList :: [CreateTapeWithBarcode] -> ShowS
show :: CreateTapeWithBarcode -> String
$cshow :: CreateTapeWithBarcode -> String
showsPrec :: Int -> CreateTapeWithBarcode -> ShowS
$cshowsPrec :: Int -> CreateTapeWithBarcode -> ShowS
Prelude.Show, (forall x. CreateTapeWithBarcode -> Rep CreateTapeWithBarcode x)
-> (forall x. Rep CreateTapeWithBarcode x -> CreateTapeWithBarcode)
-> Generic CreateTapeWithBarcode
forall x. Rep CreateTapeWithBarcode x -> CreateTapeWithBarcode
forall x. CreateTapeWithBarcode -> Rep CreateTapeWithBarcode x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateTapeWithBarcode x -> CreateTapeWithBarcode
$cfrom :: forall x. CreateTapeWithBarcode -> Rep CreateTapeWithBarcode x
Prelude.Generic)
newCreateTapeWithBarcode ::
Prelude.Text ->
Prelude.Integer ->
Prelude.Text ->
CreateTapeWithBarcode
newCreateTapeWithBarcode :: Text -> Integer -> Text -> CreateTapeWithBarcode
newCreateTapeWithBarcode
Text
pGatewayARN_
Integer
pTapeSizeInBytes_
Text
pTapeBarcode_ =
CreateTapeWithBarcode' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe [Tag]
-> Text
-> Integer
-> Text
-> CreateTapeWithBarcode
CreateTapeWithBarcode'
{ $sel:kmsKey:CreateTapeWithBarcode' :: Maybe Text
kmsKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:kmsEncrypted:CreateTapeWithBarcode' :: Maybe Bool
kmsEncrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:poolId:CreateTapeWithBarcode' :: Maybe Text
poolId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:worm:CreateTapeWithBarcode' :: Maybe Bool
worm = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateTapeWithBarcode' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:gatewayARN:CreateTapeWithBarcode' :: Text
gatewayARN = Text
pGatewayARN_,
$sel:tapeSizeInBytes:CreateTapeWithBarcode' :: Integer
tapeSizeInBytes = Integer
pTapeSizeInBytes_,
$sel:tapeBarcode:CreateTapeWithBarcode' :: Text
tapeBarcode = Text
pTapeBarcode_
}
createTapeWithBarcode_kmsKey :: Lens.Lens' CreateTapeWithBarcode (Prelude.Maybe Prelude.Text)
createTapeWithBarcode_kmsKey :: (Maybe Text -> f (Maybe Text))
-> CreateTapeWithBarcode -> f CreateTapeWithBarcode
createTapeWithBarcode_kmsKey = (CreateTapeWithBarcode -> Maybe Text)
-> (CreateTapeWithBarcode -> Maybe Text -> CreateTapeWithBarcode)
-> Lens
CreateTapeWithBarcode
CreateTapeWithBarcode
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapeWithBarcode' {Maybe Text
kmsKey :: Maybe Text
$sel:kmsKey:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> Maybe Text
kmsKey} -> Maybe Text
kmsKey) (\s :: CreateTapeWithBarcode
s@CreateTapeWithBarcode' {} Maybe Text
a -> CreateTapeWithBarcode
s {$sel:kmsKey:CreateTapeWithBarcode' :: Maybe Text
kmsKey = Maybe Text
a} :: CreateTapeWithBarcode)
createTapeWithBarcode_kmsEncrypted :: Lens.Lens' CreateTapeWithBarcode (Prelude.Maybe Prelude.Bool)
createTapeWithBarcode_kmsEncrypted :: (Maybe Bool -> f (Maybe Bool))
-> CreateTapeWithBarcode -> f CreateTapeWithBarcode
createTapeWithBarcode_kmsEncrypted = (CreateTapeWithBarcode -> Maybe Bool)
-> (CreateTapeWithBarcode -> Maybe Bool -> CreateTapeWithBarcode)
-> Lens
CreateTapeWithBarcode
CreateTapeWithBarcode
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapeWithBarcode' {Maybe Bool
kmsEncrypted :: Maybe Bool
$sel:kmsEncrypted:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> Maybe Bool
kmsEncrypted} -> Maybe Bool
kmsEncrypted) (\s :: CreateTapeWithBarcode
s@CreateTapeWithBarcode' {} Maybe Bool
a -> CreateTapeWithBarcode
s {$sel:kmsEncrypted:CreateTapeWithBarcode' :: Maybe Bool
kmsEncrypted = Maybe Bool
a} :: CreateTapeWithBarcode)
createTapeWithBarcode_poolId :: Lens.Lens' CreateTapeWithBarcode (Prelude.Maybe Prelude.Text)
createTapeWithBarcode_poolId :: (Maybe Text -> f (Maybe Text))
-> CreateTapeWithBarcode -> f CreateTapeWithBarcode
createTapeWithBarcode_poolId = (CreateTapeWithBarcode -> Maybe Text)
-> (CreateTapeWithBarcode -> Maybe Text -> CreateTapeWithBarcode)
-> Lens
CreateTapeWithBarcode
CreateTapeWithBarcode
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapeWithBarcode' {Maybe Text
poolId :: Maybe Text
$sel:poolId:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> Maybe Text
poolId} -> Maybe Text
poolId) (\s :: CreateTapeWithBarcode
s@CreateTapeWithBarcode' {} Maybe Text
a -> CreateTapeWithBarcode
s {$sel:poolId:CreateTapeWithBarcode' :: Maybe Text
poolId = Maybe Text
a} :: CreateTapeWithBarcode)
createTapeWithBarcode_worm :: Lens.Lens' CreateTapeWithBarcode (Prelude.Maybe Prelude.Bool)
createTapeWithBarcode_worm :: (Maybe Bool -> f (Maybe Bool))
-> CreateTapeWithBarcode -> f CreateTapeWithBarcode
createTapeWithBarcode_worm = (CreateTapeWithBarcode -> Maybe Bool)
-> (CreateTapeWithBarcode -> Maybe Bool -> CreateTapeWithBarcode)
-> Lens
CreateTapeWithBarcode
CreateTapeWithBarcode
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapeWithBarcode' {Maybe Bool
worm :: Maybe Bool
$sel:worm:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> Maybe Bool
worm} -> Maybe Bool
worm) (\s :: CreateTapeWithBarcode
s@CreateTapeWithBarcode' {} Maybe Bool
a -> CreateTapeWithBarcode
s {$sel:worm:CreateTapeWithBarcode' :: Maybe Bool
worm = Maybe Bool
a} :: CreateTapeWithBarcode)
createTapeWithBarcode_tags :: Lens.Lens' CreateTapeWithBarcode (Prelude.Maybe [Tag])
createTapeWithBarcode_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateTapeWithBarcode -> f CreateTapeWithBarcode
createTapeWithBarcode_tags = (CreateTapeWithBarcode -> Maybe [Tag])
-> (CreateTapeWithBarcode -> Maybe [Tag] -> CreateTapeWithBarcode)
-> Lens
CreateTapeWithBarcode
CreateTapeWithBarcode
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapeWithBarcode' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateTapeWithBarcode
s@CreateTapeWithBarcode' {} Maybe [Tag]
a -> CreateTapeWithBarcode
s {$sel:tags:CreateTapeWithBarcode' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateTapeWithBarcode) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateTapeWithBarcode -> f CreateTapeWithBarcode)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateTapeWithBarcode
-> f CreateTapeWithBarcode
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
createTapeWithBarcode_gatewayARN :: Lens.Lens' CreateTapeWithBarcode Prelude.Text
createTapeWithBarcode_gatewayARN :: (Text -> f Text)
-> CreateTapeWithBarcode -> f CreateTapeWithBarcode
createTapeWithBarcode_gatewayARN = (CreateTapeWithBarcode -> Text)
-> (CreateTapeWithBarcode -> Text -> CreateTapeWithBarcode)
-> Lens CreateTapeWithBarcode CreateTapeWithBarcode Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapeWithBarcode' {Text
gatewayARN :: Text
$sel:gatewayARN:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> Text
gatewayARN} -> Text
gatewayARN) (\s :: CreateTapeWithBarcode
s@CreateTapeWithBarcode' {} Text
a -> CreateTapeWithBarcode
s {$sel:gatewayARN:CreateTapeWithBarcode' :: Text
gatewayARN = Text
a} :: CreateTapeWithBarcode)
createTapeWithBarcode_tapeSizeInBytes :: Lens.Lens' CreateTapeWithBarcode Prelude.Integer
createTapeWithBarcode_tapeSizeInBytes :: (Integer -> f Integer)
-> CreateTapeWithBarcode -> f CreateTapeWithBarcode
createTapeWithBarcode_tapeSizeInBytes = (CreateTapeWithBarcode -> Integer)
-> (CreateTapeWithBarcode -> Integer -> CreateTapeWithBarcode)
-> Lens CreateTapeWithBarcode CreateTapeWithBarcode Integer Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapeWithBarcode' {Integer
tapeSizeInBytes :: Integer
$sel:tapeSizeInBytes:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> Integer
tapeSizeInBytes} -> Integer
tapeSizeInBytes) (\s :: CreateTapeWithBarcode
s@CreateTapeWithBarcode' {} Integer
a -> CreateTapeWithBarcode
s {$sel:tapeSizeInBytes:CreateTapeWithBarcode' :: Integer
tapeSizeInBytes = Integer
a} :: CreateTapeWithBarcode)
createTapeWithBarcode_tapeBarcode :: Lens.Lens' CreateTapeWithBarcode Prelude.Text
createTapeWithBarcode_tapeBarcode :: (Text -> f Text)
-> CreateTapeWithBarcode -> f CreateTapeWithBarcode
createTapeWithBarcode_tapeBarcode = (CreateTapeWithBarcode -> Text)
-> (CreateTapeWithBarcode -> Text -> CreateTapeWithBarcode)
-> Lens CreateTapeWithBarcode CreateTapeWithBarcode Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapeWithBarcode' {Text
tapeBarcode :: Text
$sel:tapeBarcode:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> Text
tapeBarcode} -> Text
tapeBarcode) (\s :: CreateTapeWithBarcode
s@CreateTapeWithBarcode' {} Text
a -> CreateTapeWithBarcode
s {$sel:tapeBarcode:CreateTapeWithBarcode' :: Text
tapeBarcode = Text
a} :: CreateTapeWithBarcode)
instance Core.AWSRequest CreateTapeWithBarcode where
type
AWSResponse CreateTapeWithBarcode =
CreateTapeWithBarcodeResponse
request :: CreateTapeWithBarcode -> Request CreateTapeWithBarcode
request = Service -> CreateTapeWithBarcode -> Request CreateTapeWithBarcode
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateTapeWithBarcode
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateTapeWithBarcode)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateTapeWithBarcode))
-> Logger
-> Service
-> Proxy CreateTapeWithBarcode
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateTapeWithBarcode)))
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 -> CreateTapeWithBarcodeResponse
CreateTapeWithBarcodeResponse'
(Maybe Text -> Int -> CreateTapeWithBarcodeResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateTapeWithBarcodeResponse)
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
"TapeARN")
Either String (Int -> CreateTapeWithBarcodeResponse)
-> Either String Int -> Either String CreateTapeWithBarcodeResponse
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 CreateTapeWithBarcode
instance Prelude.NFData CreateTapeWithBarcode
instance Core.ToHeaders CreateTapeWithBarcode where
toHeaders :: CreateTapeWithBarcode -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateTapeWithBarcode -> 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.CreateTapeWithBarcode" ::
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 CreateTapeWithBarcode where
toJSON :: CreateTapeWithBarcode -> Value
toJSON CreateTapeWithBarcode' {Integer
Maybe Bool
Maybe [Tag]
Maybe Text
Text
tapeBarcode :: Text
tapeSizeInBytes :: Integer
gatewayARN :: Text
tags :: Maybe [Tag]
worm :: Maybe Bool
poolId :: Maybe Text
kmsEncrypted :: Maybe Bool
kmsKey :: Maybe Text
$sel:tapeBarcode:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> Text
$sel:tapeSizeInBytes:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> Integer
$sel:gatewayARN:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> Text
$sel:tags:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> Maybe [Tag]
$sel:worm:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> Maybe Bool
$sel:poolId:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> Maybe Text
$sel:kmsEncrypted:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> Maybe Bool
$sel:kmsKey:CreateTapeWithBarcode' :: CreateTapeWithBarcode -> 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
"TapeBarcode" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
tapeBarcode)
]
)
instance Core.ToPath CreateTapeWithBarcode where
toPath :: CreateTapeWithBarcode -> ByteString
toPath = ByteString -> CreateTapeWithBarcode -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateTapeWithBarcode where
toQuery :: CreateTapeWithBarcode -> QueryString
toQuery = QueryString -> CreateTapeWithBarcode -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateTapeWithBarcodeResponse = CreateTapeWithBarcodeResponse'
{
CreateTapeWithBarcodeResponse -> Maybe Text
tapeARN :: Prelude.Maybe Prelude.Text,
CreateTapeWithBarcodeResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateTapeWithBarcodeResponse
-> CreateTapeWithBarcodeResponse -> Bool
(CreateTapeWithBarcodeResponse
-> CreateTapeWithBarcodeResponse -> Bool)
-> (CreateTapeWithBarcodeResponse
-> CreateTapeWithBarcodeResponse -> Bool)
-> Eq CreateTapeWithBarcodeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTapeWithBarcodeResponse
-> CreateTapeWithBarcodeResponse -> Bool
$c/= :: CreateTapeWithBarcodeResponse
-> CreateTapeWithBarcodeResponse -> Bool
== :: CreateTapeWithBarcodeResponse
-> CreateTapeWithBarcodeResponse -> Bool
$c== :: CreateTapeWithBarcodeResponse
-> CreateTapeWithBarcodeResponse -> Bool
Prelude.Eq, ReadPrec [CreateTapeWithBarcodeResponse]
ReadPrec CreateTapeWithBarcodeResponse
Int -> ReadS CreateTapeWithBarcodeResponse
ReadS [CreateTapeWithBarcodeResponse]
(Int -> ReadS CreateTapeWithBarcodeResponse)
-> ReadS [CreateTapeWithBarcodeResponse]
-> ReadPrec CreateTapeWithBarcodeResponse
-> ReadPrec [CreateTapeWithBarcodeResponse]
-> Read CreateTapeWithBarcodeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTapeWithBarcodeResponse]
$creadListPrec :: ReadPrec [CreateTapeWithBarcodeResponse]
readPrec :: ReadPrec CreateTapeWithBarcodeResponse
$creadPrec :: ReadPrec CreateTapeWithBarcodeResponse
readList :: ReadS [CreateTapeWithBarcodeResponse]
$creadList :: ReadS [CreateTapeWithBarcodeResponse]
readsPrec :: Int -> ReadS CreateTapeWithBarcodeResponse
$creadsPrec :: Int -> ReadS CreateTapeWithBarcodeResponse
Prelude.Read, Int -> CreateTapeWithBarcodeResponse -> ShowS
[CreateTapeWithBarcodeResponse] -> ShowS
CreateTapeWithBarcodeResponse -> String
(Int -> CreateTapeWithBarcodeResponse -> ShowS)
-> (CreateTapeWithBarcodeResponse -> String)
-> ([CreateTapeWithBarcodeResponse] -> ShowS)
-> Show CreateTapeWithBarcodeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTapeWithBarcodeResponse] -> ShowS
$cshowList :: [CreateTapeWithBarcodeResponse] -> ShowS
show :: CreateTapeWithBarcodeResponse -> String
$cshow :: CreateTapeWithBarcodeResponse -> String
showsPrec :: Int -> CreateTapeWithBarcodeResponse -> ShowS
$cshowsPrec :: Int -> CreateTapeWithBarcodeResponse -> ShowS
Prelude.Show, (forall x.
CreateTapeWithBarcodeResponse
-> Rep CreateTapeWithBarcodeResponse x)
-> (forall x.
Rep CreateTapeWithBarcodeResponse x
-> CreateTapeWithBarcodeResponse)
-> Generic CreateTapeWithBarcodeResponse
forall x.
Rep CreateTapeWithBarcodeResponse x
-> CreateTapeWithBarcodeResponse
forall x.
CreateTapeWithBarcodeResponse
-> Rep CreateTapeWithBarcodeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateTapeWithBarcodeResponse x
-> CreateTapeWithBarcodeResponse
$cfrom :: forall x.
CreateTapeWithBarcodeResponse
-> Rep CreateTapeWithBarcodeResponse x
Prelude.Generic)
newCreateTapeWithBarcodeResponse ::
Prelude.Int ->
CreateTapeWithBarcodeResponse
newCreateTapeWithBarcodeResponse :: Int -> CreateTapeWithBarcodeResponse
newCreateTapeWithBarcodeResponse Int
pHttpStatus_ =
CreateTapeWithBarcodeResponse' :: Maybe Text -> Int -> CreateTapeWithBarcodeResponse
CreateTapeWithBarcodeResponse'
{ $sel:tapeARN:CreateTapeWithBarcodeResponse' :: Maybe Text
tapeARN =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateTapeWithBarcodeResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createTapeWithBarcodeResponse_tapeARN :: Lens.Lens' CreateTapeWithBarcodeResponse (Prelude.Maybe Prelude.Text)
createTapeWithBarcodeResponse_tapeARN :: (Maybe Text -> f (Maybe Text))
-> CreateTapeWithBarcodeResponse -> f CreateTapeWithBarcodeResponse
createTapeWithBarcodeResponse_tapeARN = (CreateTapeWithBarcodeResponse -> Maybe Text)
-> (CreateTapeWithBarcodeResponse
-> Maybe Text -> CreateTapeWithBarcodeResponse)
-> Lens
CreateTapeWithBarcodeResponse
CreateTapeWithBarcodeResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapeWithBarcodeResponse' {Maybe Text
tapeARN :: Maybe Text
$sel:tapeARN:CreateTapeWithBarcodeResponse' :: CreateTapeWithBarcodeResponse -> Maybe Text
tapeARN} -> Maybe Text
tapeARN) (\s :: CreateTapeWithBarcodeResponse
s@CreateTapeWithBarcodeResponse' {} Maybe Text
a -> CreateTapeWithBarcodeResponse
s {$sel:tapeARN:CreateTapeWithBarcodeResponse' :: Maybe Text
tapeARN = Maybe Text
a} :: CreateTapeWithBarcodeResponse)
createTapeWithBarcodeResponse_httpStatus :: Lens.Lens' CreateTapeWithBarcodeResponse Prelude.Int
createTapeWithBarcodeResponse_httpStatus :: (Int -> f Int)
-> CreateTapeWithBarcodeResponse -> f CreateTapeWithBarcodeResponse
createTapeWithBarcodeResponse_httpStatus = (CreateTapeWithBarcodeResponse -> Int)
-> (CreateTapeWithBarcodeResponse
-> Int -> CreateTapeWithBarcodeResponse)
-> Lens
CreateTapeWithBarcodeResponse CreateTapeWithBarcodeResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapeWithBarcodeResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateTapeWithBarcodeResponse' :: CreateTapeWithBarcodeResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateTapeWithBarcodeResponse
s@CreateTapeWithBarcodeResponse' {} Int
a -> CreateTapeWithBarcodeResponse
s {$sel:httpStatus:CreateTapeWithBarcodeResponse' :: Int
httpStatus = Int
a} :: CreateTapeWithBarcodeResponse)
instance Prelude.NFData CreateTapeWithBarcodeResponse