{-# 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.EBS.PutSnapshotBlock
(
PutSnapshotBlock (..),
newPutSnapshotBlock,
putSnapshotBlock_progress,
putSnapshotBlock_snapshotId,
putSnapshotBlock_blockIndex,
putSnapshotBlock_dataLength,
putSnapshotBlock_checksum,
putSnapshotBlock_checksumAlgorithm,
putSnapshotBlock_blockData,
PutSnapshotBlockResponse (..),
newPutSnapshotBlockResponse,
putSnapshotBlockResponse_checksumAlgorithm,
putSnapshotBlockResponse_checksum,
putSnapshotBlockResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.EBS.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data PutSnapshotBlock = PutSnapshotBlock'
{
PutSnapshotBlock -> Maybe Natural
progress :: Prelude.Maybe Prelude.Natural,
PutSnapshotBlock -> Text
snapshotId :: Prelude.Text,
PutSnapshotBlock -> Natural
blockIndex :: Prelude.Natural,
PutSnapshotBlock -> Int
dataLength :: Prelude.Int,
PutSnapshotBlock -> Text
checksum :: Prelude.Text,
PutSnapshotBlock -> ChecksumAlgorithm
checksumAlgorithm :: ChecksumAlgorithm,
PutSnapshotBlock -> HashedBody
blockData :: Core.HashedBody
}
deriving (Int -> PutSnapshotBlock -> ShowS
[PutSnapshotBlock] -> ShowS
PutSnapshotBlock -> String
(Int -> PutSnapshotBlock -> ShowS)
-> (PutSnapshotBlock -> String)
-> ([PutSnapshotBlock] -> ShowS)
-> Show PutSnapshotBlock
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutSnapshotBlock] -> ShowS
$cshowList :: [PutSnapshotBlock] -> ShowS
show :: PutSnapshotBlock -> String
$cshow :: PutSnapshotBlock -> String
showsPrec :: Int -> PutSnapshotBlock -> ShowS
$cshowsPrec :: Int -> PutSnapshotBlock -> ShowS
Prelude.Show, (forall x. PutSnapshotBlock -> Rep PutSnapshotBlock x)
-> (forall x. Rep PutSnapshotBlock x -> PutSnapshotBlock)
-> Generic PutSnapshotBlock
forall x. Rep PutSnapshotBlock x -> PutSnapshotBlock
forall x. PutSnapshotBlock -> Rep PutSnapshotBlock x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutSnapshotBlock x -> PutSnapshotBlock
$cfrom :: forall x. PutSnapshotBlock -> Rep PutSnapshotBlock x
Prelude.Generic)
newPutSnapshotBlock ::
Prelude.Text ->
Prelude.Natural ->
Prelude.Int ->
Prelude.Text ->
ChecksumAlgorithm ->
Core.HashedBody ->
PutSnapshotBlock
newPutSnapshotBlock :: Text
-> Natural
-> Int
-> Text
-> ChecksumAlgorithm
-> HashedBody
-> PutSnapshotBlock
newPutSnapshotBlock
Text
pSnapshotId_
Natural
pBlockIndex_
Int
pDataLength_
Text
pChecksum_
ChecksumAlgorithm
pChecksumAlgorithm_
HashedBody
pBlockData_ =
PutSnapshotBlock' :: Maybe Natural
-> Text
-> Natural
-> Int
-> Text
-> ChecksumAlgorithm
-> HashedBody
-> PutSnapshotBlock
PutSnapshotBlock'
{ $sel:progress:PutSnapshotBlock' :: Maybe Natural
progress = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:snapshotId:PutSnapshotBlock' :: Text
snapshotId = Text
pSnapshotId_,
$sel:blockIndex:PutSnapshotBlock' :: Natural
blockIndex = Natural
pBlockIndex_,
$sel:dataLength:PutSnapshotBlock' :: Int
dataLength = Int
pDataLength_,
$sel:checksum:PutSnapshotBlock' :: Text
checksum = Text
pChecksum_,
$sel:checksumAlgorithm:PutSnapshotBlock' :: ChecksumAlgorithm
checksumAlgorithm = ChecksumAlgorithm
pChecksumAlgorithm_,
$sel:blockData:PutSnapshotBlock' :: HashedBody
blockData = HashedBody
pBlockData_
}
putSnapshotBlock_progress :: Lens.Lens' PutSnapshotBlock (Prelude.Maybe Prelude.Natural)
putSnapshotBlock_progress :: (Maybe Natural -> f (Maybe Natural))
-> PutSnapshotBlock -> f PutSnapshotBlock
putSnapshotBlock_progress = (PutSnapshotBlock -> Maybe Natural)
-> (PutSnapshotBlock -> Maybe Natural -> PutSnapshotBlock)
-> Lens
PutSnapshotBlock PutSnapshotBlock (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSnapshotBlock' {Maybe Natural
progress :: Maybe Natural
$sel:progress:PutSnapshotBlock' :: PutSnapshotBlock -> Maybe Natural
progress} -> Maybe Natural
progress) (\s :: PutSnapshotBlock
s@PutSnapshotBlock' {} Maybe Natural
a -> PutSnapshotBlock
s {$sel:progress:PutSnapshotBlock' :: Maybe Natural
progress = Maybe Natural
a} :: PutSnapshotBlock)
putSnapshotBlock_snapshotId :: Lens.Lens' PutSnapshotBlock Prelude.Text
putSnapshotBlock_snapshotId :: (Text -> f Text) -> PutSnapshotBlock -> f PutSnapshotBlock
putSnapshotBlock_snapshotId = (PutSnapshotBlock -> Text)
-> (PutSnapshotBlock -> Text -> PutSnapshotBlock)
-> Lens PutSnapshotBlock PutSnapshotBlock Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSnapshotBlock' {Text
snapshotId :: Text
$sel:snapshotId:PutSnapshotBlock' :: PutSnapshotBlock -> Text
snapshotId} -> Text
snapshotId) (\s :: PutSnapshotBlock
s@PutSnapshotBlock' {} Text
a -> PutSnapshotBlock
s {$sel:snapshotId:PutSnapshotBlock' :: Text
snapshotId = Text
a} :: PutSnapshotBlock)
putSnapshotBlock_blockIndex :: Lens.Lens' PutSnapshotBlock Prelude.Natural
putSnapshotBlock_blockIndex :: (Natural -> f Natural) -> PutSnapshotBlock -> f PutSnapshotBlock
putSnapshotBlock_blockIndex = (PutSnapshotBlock -> Natural)
-> (PutSnapshotBlock -> Natural -> PutSnapshotBlock)
-> Lens PutSnapshotBlock PutSnapshotBlock Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSnapshotBlock' {Natural
blockIndex :: Natural
$sel:blockIndex:PutSnapshotBlock' :: PutSnapshotBlock -> Natural
blockIndex} -> Natural
blockIndex) (\s :: PutSnapshotBlock
s@PutSnapshotBlock' {} Natural
a -> PutSnapshotBlock
s {$sel:blockIndex:PutSnapshotBlock' :: Natural
blockIndex = Natural
a} :: PutSnapshotBlock)
putSnapshotBlock_dataLength :: Lens.Lens' PutSnapshotBlock Prelude.Int
putSnapshotBlock_dataLength :: (Int -> f Int) -> PutSnapshotBlock -> f PutSnapshotBlock
putSnapshotBlock_dataLength = (PutSnapshotBlock -> Int)
-> (PutSnapshotBlock -> Int -> PutSnapshotBlock)
-> Lens PutSnapshotBlock PutSnapshotBlock Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSnapshotBlock' {Int
dataLength :: Int
$sel:dataLength:PutSnapshotBlock' :: PutSnapshotBlock -> Int
dataLength} -> Int
dataLength) (\s :: PutSnapshotBlock
s@PutSnapshotBlock' {} Int
a -> PutSnapshotBlock
s {$sel:dataLength:PutSnapshotBlock' :: Int
dataLength = Int
a} :: PutSnapshotBlock)
putSnapshotBlock_checksum :: Lens.Lens' PutSnapshotBlock Prelude.Text
putSnapshotBlock_checksum :: (Text -> f Text) -> PutSnapshotBlock -> f PutSnapshotBlock
putSnapshotBlock_checksum = (PutSnapshotBlock -> Text)
-> (PutSnapshotBlock -> Text -> PutSnapshotBlock)
-> Lens PutSnapshotBlock PutSnapshotBlock Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSnapshotBlock' {Text
checksum :: Text
$sel:checksum:PutSnapshotBlock' :: PutSnapshotBlock -> Text
checksum} -> Text
checksum) (\s :: PutSnapshotBlock
s@PutSnapshotBlock' {} Text
a -> PutSnapshotBlock
s {$sel:checksum:PutSnapshotBlock' :: Text
checksum = Text
a} :: PutSnapshotBlock)
putSnapshotBlock_checksumAlgorithm :: Lens.Lens' PutSnapshotBlock ChecksumAlgorithm
putSnapshotBlock_checksumAlgorithm :: (ChecksumAlgorithm -> f ChecksumAlgorithm)
-> PutSnapshotBlock -> f PutSnapshotBlock
putSnapshotBlock_checksumAlgorithm = (PutSnapshotBlock -> ChecksumAlgorithm)
-> (PutSnapshotBlock -> ChecksumAlgorithm -> PutSnapshotBlock)
-> Lens
PutSnapshotBlock
PutSnapshotBlock
ChecksumAlgorithm
ChecksumAlgorithm
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSnapshotBlock' {ChecksumAlgorithm
checksumAlgorithm :: ChecksumAlgorithm
$sel:checksumAlgorithm:PutSnapshotBlock' :: PutSnapshotBlock -> ChecksumAlgorithm
checksumAlgorithm} -> ChecksumAlgorithm
checksumAlgorithm) (\s :: PutSnapshotBlock
s@PutSnapshotBlock' {} ChecksumAlgorithm
a -> PutSnapshotBlock
s {$sel:checksumAlgorithm:PutSnapshotBlock' :: ChecksumAlgorithm
checksumAlgorithm = ChecksumAlgorithm
a} :: PutSnapshotBlock)
putSnapshotBlock_blockData :: Lens.Lens' PutSnapshotBlock Core.HashedBody
putSnapshotBlock_blockData :: (HashedBody -> f HashedBody)
-> PutSnapshotBlock -> f PutSnapshotBlock
putSnapshotBlock_blockData = (PutSnapshotBlock -> HashedBody)
-> (PutSnapshotBlock -> HashedBody -> PutSnapshotBlock)
-> Lens PutSnapshotBlock PutSnapshotBlock HashedBody HashedBody
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSnapshotBlock' {HashedBody
blockData :: HashedBody
$sel:blockData:PutSnapshotBlock' :: PutSnapshotBlock -> HashedBody
blockData} -> HashedBody
blockData) (\s :: PutSnapshotBlock
s@PutSnapshotBlock' {} HashedBody
a -> PutSnapshotBlock
s {$sel:blockData:PutSnapshotBlock' :: HashedBody
blockData = HashedBody
a} :: PutSnapshotBlock)
instance Core.AWSRequest PutSnapshotBlock where
type
AWSResponse PutSnapshotBlock =
PutSnapshotBlockResponse
request :: PutSnapshotBlock -> Request PutSnapshotBlock
request = Service -> PutSnapshotBlock -> Request PutSnapshotBlock
forall a. (ToRequest a, ToBody a) => Service -> a -> Request a
Request.putBody Service
defaultService
response :: Logger
-> Service
-> Proxy PutSnapshotBlock
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutSnapshotBlock)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse PutSnapshotBlock))
-> Logger
-> Service
-> Proxy PutSnapshotBlock
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutSnapshotBlock)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Maybe ChecksumAlgorithm
-> Maybe Text -> Int -> PutSnapshotBlockResponse
PutSnapshotBlockResponse'
(Maybe ChecksumAlgorithm
-> Maybe Text -> Int -> PutSnapshotBlockResponse)
-> Either String (Maybe ChecksumAlgorithm)
-> Either String (Maybe Text -> Int -> PutSnapshotBlockResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe ChecksumAlgorithm)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-Checksum-Algorithm")
Either String (Maybe Text -> Int -> PutSnapshotBlockResponse)
-> Either String (Maybe Text)
-> Either String (Int -> PutSnapshotBlockResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-Checksum")
Either String (Int -> PutSnapshotBlockResponse)
-> Either String Int -> Either String PutSnapshotBlockResponse
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 Core.ToBody PutSnapshotBlock where
toBody :: PutSnapshotBlock -> RequestBody
toBody PutSnapshotBlock' {Int
Natural
Maybe Natural
Text
HashedBody
ChecksumAlgorithm
blockData :: HashedBody
checksumAlgorithm :: ChecksumAlgorithm
checksum :: Text
dataLength :: Int
blockIndex :: Natural
snapshotId :: Text
progress :: Maybe Natural
$sel:blockData:PutSnapshotBlock' :: PutSnapshotBlock -> HashedBody
$sel:checksumAlgorithm:PutSnapshotBlock' :: PutSnapshotBlock -> ChecksumAlgorithm
$sel:checksum:PutSnapshotBlock' :: PutSnapshotBlock -> Text
$sel:dataLength:PutSnapshotBlock' :: PutSnapshotBlock -> Int
$sel:blockIndex:PutSnapshotBlock' :: PutSnapshotBlock -> Natural
$sel:snapshotId:PutSnapshotBlock' :: PutSnapshotBlock -> Text
$sel:progress:PutSnapshotBlock' :: PutSnapshotBlock -> Maybe Natural
..} = HashedBody -> RequestBody
forall a. ToBody a => a -> RequestBody
Core.toBody HashedBody
blockData
instance Core.ToHeaders PutSnapshotBlock where
toHeaders :: PutSnapshotBlock -> ResponseHeaders
toHeaders PutSnapshotBlock' {Int
Natural
Maybe Natural
Text
HashedBody
ChecksumAlgorithm
blockData :: HashedBody
checksumAlgorithm :: ChecksumAlgorithm
checksum :: Text
dataLength :: Int
blockIndex :: Natural
snapshotId :: Text
progress :: Maybe Natural
$sel:blockData:PutSnapshotBlock' :: PutSnapshotBlock -> HashedBody
$sel:checksumAlgorithm:PutSnapshotBlock' :: PutSnapshotBlock -> ChecksumAlgorithm
$sel:checksum:PutSnapshotBlock' :: PutSnapshotBlock -> Text
$sel:dataLength:PutSnapshotBlock' :: PutSnapshotBlock -> Int
$sel:blockIndex:PutSnapshotBlock' :: PutSnapshotBlock -> Natural
$sel:snapshotId:PutSnapshotBlock' :: PutSnapshotBlock -> Text
$sel:progress:PutSnapshotBlock' :: PutSnapshotBlock -> Maybe Natural
..} =
[ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"x-amz-Progress" HeaderName -> Maybe Natural -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Natural
progress,
HeaderName
"x-amz-Data-Length" HeaderName -> Int -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Int
dataLength,
HeaderName
"x-amz-Checksum" HeaderName -> Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Text
checksum,
HeaderName
"x-amz-Checksum-Algorithm" HeaderName -> ChecksumAlgorithm -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ChecksumAlgorithm
checksumAlgorithm,
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.ToPath PutSnapshotBlock where
toPath :: PutSnapshotBlock -> ByteString
toPath PutSnapshotBlock' {Int
Natural
Maybe Natural
Text
HashedBody
ChecksumAlgorithm
blockData :: HashedBody
checksumAlgorithm :: ChecksumAlgorithm
checksum :: Text
dataLength :: Int
blockIndex :: Natural
snapshotId :: Text
progress :: Maybe Natural
$sel:blockData:PutSnapshotBlock' :: PutSnapshotBlock -> HashedBody
$sel:checksumAlgorithm:PutSnapshotBlock' :: PutSnapshotBlock -> ChecksumAlgorithm
$sel:checksum:PutSnapshotBlock' :: PutSnapshotBlock -> Text
$sel:dataLength:PutSnapshotBlock' :: PutSnapshotBlock -> Int
$sel:blockIndex:PutSnapshotBlock' :: PutSnapshotBlock -> Natural
$sel:snapshotId:PutSnapshotBlock' :: PutSnapshotBlock -> Text
$sel:progress:PutSnapshotBlock' :: PutSnapshotBlock -> Maybe Natural
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/snapshots/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
snapshotId,
ByteString
"/blocks/",
Natural -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Natural
blockIndex
]
instance Core.ToQuery PutSnapshotBlock where
toQuery :: PutSnapshotBlock -> QueryString
toQuery = QueryString -> PutSnapshotBlock -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data PutSnapshotBlockResponse = PutSnapshotBlockResponse'
{
PutSnapshotBlockResponse -> Maybe ChecksumAlgorithm
checksumAlgorithm :: Prelude.Maybe ChecksumAlgorithm,
PutSnapshotBlockResponse -> Maybe Text
checksum :: Prelude.Maybe Prelude.Text,
PutSnapshotBlockResponse -> Int
httpStatus :: Prelude.Int
}
deriving (PutSnapshotBlockResponse -> PutSnapshotBlockResponse -> Bool
(PutSnapshotBlockResponse -> PutSnapshotBlockResponse -> Bool)
-> (PutSnapshotBlockResponse -> PutSnapshotBlockResponse -> Bool)
-> Eq PutSnapshotBlockResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutSnapshotBlockResponse -> PutSnapshotBlockResponse -> Bool
$c/= :: PutSnapshotBlockResponse -> PutSnapshotBlockResponse -> Bool
== :: PutSnapshotBlockResponse -> PutSnapshotBlockResponse -> Bool
$c== :: PutSnapshotBlockResponse -> PutSnapshotBlockResponse -> Bool
Prelude.Eq, ReadPrec [PutSnapshotBlockResponse]
ReadPrec PutSnapshotBlockResponse
Int -> ReadS PutSnapshotBlockResponse
ReadS [PutSnapshotBlockResponse]
(Int -> ReadS PutSnapshotBlockResponse)
-> ReadS [PutSnapshotBlockResponse]
-> ReadPrec PutSnapshotBlockResponse
-> ReadPrec [PutSnapshotBlockResponse]
-> Read PutSnapshotBlockResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutSnapshotBlockResponse]
$creadListPrec :: ReadPrec [PutSnapshotBlockResponse]
readPrec :: ReadPrec PutSnapshotBlockResponse
$creadPrec :: ReadPrec PutSnapshotBlockResponse
readList :: ReadS [PutSnapshotBlockResponse]
$creadList :: ReadS [PutSnapshotBlockResponse]
readsPrec :: Int -> ReadS PutSnapshotBlockResponse
$creadsPrec :: Int -> ReadS PutSnapshotBlockResponse
Prelude.Read, Int -> PutSnapshotBlockResponse -> ShowS
[PutSnapshotBlockResponse] -> ShowS
PutSnapshotBlockResponse -> String
(Int -> PutSnapshotBlockResponse -> ShowS)
-> (PutSnapshotBlockResponse -> String)
-> ([PutSnapshotBlockResponse] -> ShowS)
-> Show PutSnapshotBlockResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutSnapshotBlockResponse] -> ShowS
$cshowList :: [PutSnapshotBlockResponse] -> ShowS
show :: PutSnapshotBlockResponse -> String
$cshow :: PutSnapshotBlockResponse -> String
showsPrec :: Int -> PutSnapshotBlockResponse -> ShowS
$cshowsPrec :: Int -> PutSnapshotBlockResponse -> ShowS
Prelude.Show, (forall x.
PutSnapshotBlockResponse -> Rep PutSnapshotBlockResponse x)
-> (forall x.
Rep PutSnapshotBlockResponse x -> PutSnapshotBlockResponse)
-> Generic PutSnapshotBlockResponse
forall x.
Rep PutSnapshotBlockResponse x -> PutSnapshotBlockResponse
forall x.
PutSnapshotBlockResponse -> Rep PutSnapshotBlockResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PutSnapshotBlockResponse x -> PutSnapshotBlockResponse
$cfrom :: forall x.
PutSnapshotBlockResponse -> Rep PutSnapshotBlockResponse x
Prelude.Generic)
newPutSnapshotBlockResponse ::
Prelude.Int ->
PutSnapshotBlockResponse
newPutSnapshotBlockResponse :: Int -> PutSnapshotBlockResponse
newPutSnapshotBlockResponse Int
pHttpStatus_ =
PutSnapshotBlockResponse' :: Maybe ChecksumAlgorithm
-> Maybe Text -> Int -> PutSnapshotBlockResponse
PutSnapshotBlockResponse'
{ $sel:checksumAlgorithm:PutSnapshotBlockResponse' :: Maybe ChecksumAlgorithm
checksumAlgorithm =
Maybe ChecksumAlgorithm
forall a. Maybe a
Prelude.Nothing,
$sel:checksum:PutSnapshotBlockResponse' :: Maybe Text
checksum = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:PutSnapshotBlockResponse' :: Int
httpStatus = Int
pHttpStatus_
}
putSnapshotBlockResponse_checksumAlgorithm :: Lens.Lens' PutSnapshotBlockResponse (Prelude.Maybe ChecksumAlgorithm)
putSnapshotBlockResponse_checksumAlgorithm :: (Maybe ChecksumAlgorithm -> f (Maybe ChecksumAlgorithm))
-> PutSnapshotBlockResponse -> f PutSnapshotBlockResponse
putSnapshotBlockResponse_checksumAlgorithm = (PutSnapshotBlockResponse -> Maybe ChecksumAlgorithm)
-> (PutSnapshotBlockResponse
-> Maybe ChecksumAlgorithm -> PutSnapshotBlockResponse)
-> Lens
PutSnapshotBlockResponse
PutSnapshotBlockResponse
(Maybe ChecksumAlgorithm)
(Maybe ChecksumAlgorithm)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSnapshotBlockResponse' {Maybe ChecksumAlgorithm
checksumAlgorithm :: Maybe ChecksumAlgorithm
$sel:checksumAlgorithm:PutSnapshotBlockResponse' :: PutSnapshotBlockResponse -> Maybe ChecksumAlgorithm
checksumAlgorithm} -> Maybe ChecksumAlgorithm
checksumAlgorithm) (\s :: PutSnapshotBlockResponse
s@PutSnapshotBlockResponse' {} Maybe ChecksumAlgorithm
a -> PutSnapshotBlockResponse
s {$sel:checksumAlgorithm:PutSnapshotBlockResponse' :: Maybe ChecksumAlgorithm
checksumAlgorithm = Maybe ChecksumAlgorithm
a} :: PutSnapshotBlockResponse)
putSnapshotBlockResponse_checksum :: Lens.Lens' PutSnapshotBlockResponse (Prelude.Maybe Prelude.Text)
putSnapshotBlockResponse_checksum :: (Maybe Text -> f (Maybe Text))
-> PutSnapshotBlockResponse -> f PutSnapshotBlockResponse
putSnapshotBlockResponse_checksum = (PutSnapshotBlockResponse -> Maybe Text)
-> (PutSnapshotBlockResponse
-> Maybe Text -> PutSnapshotBlockResponse)
-> Lens
PutSnapshotBlockResponse
PutSnapshotBlockResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSnapshotBlockResponse' {Maybe Text
checksum :: Maybe Text
$sel:checksum:PutSnapshotBlockResponse' :: PutSnapshotBlockResponse -> Maybe Text
checksum} -> Maybe Text
checksum) (\s :: PutSnapshotBlockResponse
s@PutSnapshotBlockResponse' {} Maybe Text
a -> PutSnapshotBlockResponse
s {$sel:checksum:PutSnapshotBlockResponse' :: Maybe Text
checksum = Maybe Text
a} :: PutSnapshotBlockResponse)
putSnapshotBlockResponse_httpStatus :: Lens.Lens' PutSnapshotBlockResponse Prelude.Int
putSnapshotBlockResponse_httpStatus :: (Int -> f Int)
-> PutSnapshotBlockResponse -> f PutSnapshotBlockResponse
putSnapshotBlockResponse_httpStatus = (PutSnapshotBlockResponse -> Int)
-> (PutSnapshotBlockResponse -> Int -> PutSnapshotBlockResponse)
-> Lens PutSnapshotBlockResponse PutSnapshotBlockResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSnapshotBlockResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutSnapshotBlockResponse' :: PutSnapshotBlockResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutSnapshotBlockResponse
s@PutSnapshotBlockResponse' {} Int
a -> PutSnapshotBlockResponse
s {$sel:httpStatus:PutSnapshotBlockResponse' :: Int
httpStatus = Int
a} :: PutSnapshotBlockResponse)
instance Prelude.NFData PutSnapshotBlockResponse