{-# 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.CodeCommit.PutFile
(
PutFile (..),
newPutFile,
putFile_email,
putFile_fileMode,
putFile_parentCommitId,
putFile_name,
putFile_commitMessage,
putFile_repositoryName,
putFile_branchName,
putFile_fileContent,
putFile_filePath,
PutFileResponse (..),
newPutFileResponse,
putFileResponse_httpStatus,
putFileResponse_commitId,
putFileResponse_blobId,
putFileResponse_treeId,
)
where
import Amazonka.CodeCommit.Types
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
data PutFile = PutFile'
{
PutFile -> Maybe Text
email :: Prelude.Maybe Prelude.Text,
PutFile -> Maybe FileModeTypeEnum
fileMode :: Prelude.Maybe FileModeTypeEnum,
PutFile -> Maybe Text
parentCommitId :: Prelude.Maybe Prelude.Text,
PutFile -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
PutFile -> Maybe Text
commitMessage :: Prelude.Maybe Prelude.Text,
PutFile -> Text
repositoryName :: Prelude.Text,
PutFile -> Text
branchName :: Prelude.Text,
PutFile -> Base64
fileContent :: Core.Base64,
PutFile -> Text
filePath :: Prelude.Text
}
deriving (PutFile -> PutFile -> Bool
(PutFile -> PutFile -> Bool)
-> (PutFile -> PutFile -> Bool) -> Eq PutFile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutFile -> PutFile -> Bool
$c/= :: PutFile -> PutFile -> Bool
== :: PutFile -> PutFile -> Bool
$c== :: PutFile -> PutFile -> Bool
Prelude.Eq, ReadPrec [PutFile]
ReadPrec PutFile
Int -> ReadS PutFile
ReadS [PutFile]
(Int -> ReadS PutFile)
-> ReadS [PutFile]
-> ReadPrec PutFile
-> ReadPrec [PutFile]
-> Read PutFile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutFile]
$creadListPrec :: ReadPrec [PutFile]
readPrec :: ReadPrec PutFile
$creadPrec :: ReadPrec PutFile
readList :: ReadS [PutFile]
$creadList :: ReadS [PutFile]
readsPrec :: Int -> ReadS PutFile
$creadsPrec :: Int -> ReadS PutFile
Prelude.Read, Int -> PutFile -> ShowS
[PutFile] -> ShowS
PutFile -> String
(Int -> PutFile -> ShowS)
-> (PutFile -> String) -> ([PutFile] -> ShowS) -> Show PutFile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutFile] -> ShowS
$cshowList :: [PutFile] -> ShowS
show :: PutFile -> String
$cshow :: PutFile -> String
showsPrec :: Int -> PutFile -> ShowS
$cshowsPrec :: Int -> PutFile -> ShowS
Prelude.Show, (forall x. PutFile -> Rep PutFile x)
-> (forall x. Rep PutFile x -> PutFile) -> Generic PutFile
forall x. Rep PutFile x -> PutFile
forall x. PutFile -> Rep PutFile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutFile x -> PutFile
$cfrom :: forall x. PutFile -> Rep PutFile x
Prelude.Generic)
newPutFile ::
Prelude.Text ->
Prelude.Text ->
Prelude.ByteString ->
Prelude.Text ->
PutFile
newPutFile :: Text -> Text -> ByteString -> Text -> PutFile
newPutFile
Text
pRepositoryName_
Text
pBranchName_
ByteString
pFileContent_
Text
pFilePath_ =
PutFile' :: Maybe Text
-> Maybe FileModeTypeEnum
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Base64
-> Text
-> PutFile
PutFile'
{ $sel:email:PutFile' :: Maybe Text
email = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fileMode:PutFile' :: Maybe FileModeTypeEnum
fileMode = Maybe FileModeTypeEnum
forall a. Maybe a
Prelude.Nothing,
$sel:parentCommitId:PutFile' :: Maybe Text
parentCommitId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:PutFile' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:commitMessage:PutFile' :: Maybe Text
commitMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:PutFile' :: Text
repositoryName = Text
pRepositoryName_,
$sel:branchName:PutFile' :: Text
branchName = Text
pBranchName_,
$sel:fileContent:PutFile' :: Base64
fileContent = Tagged ByteString (Identity ByteString)
-> Tagged Base64 (Identity Base64)
Iso' Base64 ByteString
Core._Base64 (Tagged ByteString (Identity ByteString)
-> Tagged Base64 (Identity Base64))
-> ByteString -> Base64
forall t b. AReview t b -> b -> t
Lens.# ByteString
pFileContent_,
$sel:filePath:PutFile' :: Text
filePath = Text
pFilePath_
}
putFile_email :: Lens.Lens' PutFile (Prelude.Maybe Prelude.Text)
putFile_email :: (Maybe Text -> f (Maybe Text)) -> PutFile -> f PutFile
putFile_email = (PutFile -> Maybe Text)
-> (PutFile -> Maybe Text -> PutFile)
-> Lens PutFile PutFile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutFile' {Maybe Text
email :: Maybe Text
$sel:email:PutFile' :: PutFile -> Maybe Text
email} -> Maybe Text
email) (\s :: PutFile
s@PutFile' {} Maybe Text
a -> PutFile
s {$sel:email:PutFile' :: Maybe Text
email = Maybe Text
a} :: PutFile)
putFile_fileMode :: Lens.Lens' PutFile (Prelude.Maybe FileModeTypeEnum)
putFile_fileMode :: (Maybe FileModeTypeEnum -> f (Maybe FileModeTypeEnum))
-> PutFile -> f PutFile
putFile_fileMode = (PutFile -> Maybe FileModeTypeEnum)
-> (PutFile -> Maybe FileModeTypeEnum -> PutFile)
-> Lens
PutFile PutFile (Maybe FileModeTypeEnum) (Maybe FileModeTypeEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutFile' {Maybe FileModeTypeEnum
fileMode :: Maybe FileModeTypeEnum
$sel:fileMode:PutFile' :: PutFile -> Maybe FileModeTypeEnum
fileMode} -> Maybe FileModeTypeEnum
fileMode) (\s :: PutFile
s@PutFile' {} Maybe FileModeTypeEnum
a -> PutFile
s {$sel:fileMode:PutFile' :: Maybe FileModeTypeEnum
fileMode = Maybe FileModeTypeEnum
a} :: PutFile)
putFile_parentCommitId :: Lens.Lens' PutFile (Prelude.Maybe Prelude.Text)
putFile_parentCommitId :: (Maybe Text -> f (Maybe Text)) -> PutFile -> f PutFile
putFile_parentCommitId = (PutFile -> Maybe Text)
-> (PutFile -> Maybe Text -> PutFile)
-> Lens PutFile PutFile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutFile' {Maybe Text
parentCommitId :: Maybe Text
$sel:parentCommitId:PutFile' :: PutFile -> Maybe Text
parentCommitId} -> Maybe Text
parentCommitId) (\s :: PutFile
s@PutFile' {} Maybe Text
a -> PutFile
s {$sel:parentCommitId:PutFile' :: Maybe Text
parentCommitId = Maybe Text
a} :: PutFile)
putFile_name :: Lens.Lens' PutFile (Prelude.Maybe Prelude.Text)
putFile_name :: (Maybe Text -> f (Maybe Text)) -> PutFile -> f PutFile
putFile_name = (PutFile -> Maybe Text)
-> (PutFile -> Maybe Text -> PutFile)
-> Lens PutFile PutFile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutFile' {Maybe Text
name :: Maybe Text
$sel:name:PutFile' :: PutFile -> Maybe Text
name} -> Maybe Text
name) (\s :: PutFile
s@PutFile' {} Maybe Text
a -> PutFile
s {$sel:name:PutFile' :: Maybe Text
name = Maybe Text
a} :: PutFile)
putFile_commitMessage :: Lens.Lens' PutFile (Prelude.Maybe Prelude.Text)
putFile_commitMessage :: (Maybe Text -> f (Maybe Text)) -> PutFile -> f PutFile
putFile_commitMessage = (PutFile -> Maybe Text)
-> (PutFile -> Maybe Text -> PutFile)
-> Lens PutFile PutFile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutFile' {Maybe Text
commitMessage :: Maybe Text
$sel:commitMessage:PutFile' :: PutFile -> Maybe Text
commitMessage} -> Maybe Text
commitMessage) (\s :: PutFile
s@PutFile' {} Maybe Text
a -> PutFile
s {$sel:commitMessage:PutFile' :: Maybe Text
commitMessage = Maybe Text
a} :: PutFile)
putFile_repositoryName :: Lens.Lens' PutFile Prelude.Text
putFile_repositoryName :: (Text -> f Text) -> PutFile -> f PutFile
putFile_repositoryName = (PutFile -> Text)
-> (PutFile -> Text -> PutFile) -> Lens PutFile PutFile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutFile' {Text
repositoryName :: Text
$sel:repositoryName:PutFile' :: PutFile -> Text
repositoryName} -> Text
repositoryName) (\s :: PutFile
s@PutFile' {} Text
a -> PutFile
s {$sel:repositoryName:PutFile' :: Text
repositoryName = Text
a} :: PutFile)
putFile_branchName :: Lens.Lens' PutFile Prelude.Text
putFile_branchName :: (Text -> f Text) -> PutFile -> f PutFile
putFile_branchName = (PutFile -> Text)
-> (PutFile -> Text -> PutFile) -> Lens PutFile PutFile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutFile' {Text
branchName :: Text
$sel:branchName:PutFile' :: PutFile -> Text
branchName} -> Text
branchName) (\s :: PutFile
s@PutFile' {} Text
a -> PutFile
s {$sel:branchName:PutFile' :: Text
branchName = Text
a} :: PutFile)
putFile_fileContent :: Lens.Lens' PutFile Prelude.ByteString
putFile_fileContent :: (ByteString -> f ByteString) -> PutFile -> f PutFile
putFile_fileContent = (PutFile -> Base64)
-> (PutFile -> Base64 -> PutFile)
-> Lens PutFile PutFile Base64 Base64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutFile' {Base64
fileContent :: Base64
$sel:fileContent:PutFile' :: PutFile -> Base64
fileContent} -> Base64
fileContent) (\s :: PutFile
s@PutFile' {} Base64
a -> PutFile
s {$sel:fileContent:PutFile' :: Base64
fileContent = Base64
a} :: PutFile) ((Base64 -> f Base64) -> PutFile -> f PutFile)
-> ((ByteString -> f ByteString) -> Base64 -> f Base64)
-> (ByteString -> f ByteString)
-> PutFile
-> f PutFile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ByteString -> f ByteString) -> Base64 -> f Base64
Iso' Base64 ByteString
Core._Base64
putFile_filePath :: Lens.Lens' PutFile Prelude.Text
putFile_filePath :: (Text -> f Text) -> PutFile -> f PutFile
putFile_filePath = (PutFile -> Text)
-> (PutFile -> Text -> PutFile) -> Lens PutFile PutFile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutFile' {Text
filePath :: Text
$sel:filePath:PutFile' :: PutFile -> Text
filePath} -> Text
filePath) (\s :: PutFile
s@PutFile' {} Text
a -> PutFile
s {$sel:filePath:PutFile' :: Text
filePath = Text
a} :: PutFile)
instance Core.AWSRequest PutFile where
type AWSResponse PutFile = PutFileResponse
request :: PutFile -> Request PutFile
request = Service -> PutFile -> Request PutFile
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy PutFile
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutFile)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse PutFile))
-> Logger
-> Service
-> Proxy PutFile
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutFile)))
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 ->
Int -> Text -> Text -> Text -> PutFileResponse
PutFileResponse'
(Int -> Text -> Text -> Text -> PutFileResponse)
-> Either String Int
-> Either String (Text -> Text -> Text -> PutFileResponse)
forall (f :: * -> *) a b. Functor 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))
Either String (Text -> Text -> Text -> PutFileResponse)
-> Either String Text
-> Either String (Text -> Text -> PutFileResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"commitId")
Either String (Text -> Text -> PutFileResponse)
-> Either String Text -> Either String (Text -> PutFileResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"blobId")
Either String (Text -> PutFileResponse)
-> Either String Text -> Either String PutFileResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"treeId")
)
instance Prelude.Hashable PutFile
instance Prelude.NFData PutFile
instance Core.ToHeaders PutFile where
toHeaders :: PutFile -> ResponseHeaders
toHeaders =
ResponseHeaders -> PutFile -> 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
"CodeCommit_20150413.PutFile" ::
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 PutFile where
toJSON :: PutFile -> Value
toJSON PutFile' {Maybe Text
Maybe FileModeTypeEnum
Text
Base64
filePath :: Text
fileContent :: Base64
branchName :: Text
repositoryName :: Text
commitMessage :: Maybe Text
name :: Maybe Text
parentCommitId :: Maybe Text
fileMode :: Maybe FileModeTypeEnum
email :: Maybe Text
$sel:filePath:PutFile' :: PutFile -> Text
$sel:fileContent:PutFile' :: PutFile -> Base64
$sel:branchName:PutFile' :: PutFile -> Text
$sel:repositoryName:PutFile' :: PutFile -> Text
$sel:commitMessage:PutFile' :: PutFile -> Maybe Text
$sel:name:PutFile' :: PutFile -> Maybe Text
$sel:parentCommitId:PutFile' :: PutFile -> Maybe Text
$sel:fileMode:PutFile' :: PutFile -> Maybe FileModeTypeEnum
$sel:email:PutFile' :: PutFile -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"email" 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
email,
(Text
"fileMode" Text -> FileModeTypeEnum -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (FileModeTypeEnum -> Pair) -> Maybe FileModeTypeEnum -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FileModeTypeEnum
fileMode,
(Text
"parentCommitId" 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
parentCommitId,
(Text
"name" 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
name,
(Text
"commitMessage" 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
commitMessage,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"repositoryName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
repositoryName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"branchName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
branchName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"fileContent" Text -> Base64 -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Base64
fileContent),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"filePath" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
filePath)
]
)
instance Core.ToPath PutFile where
toPath :: PutFile -> ByteString
toPath = ByteString -> PutFile -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery PutFile where
toQuery :: PutFile -> QueryString
toQuery = QueryString -> PutFile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data PutFileResponse = PutFileResponse'
{
PutFileResponse -> Int
httpStatus :: Prelude.Int,
PutFileResponse -> Text
commitId :: Prelude.Text,
PutFileResponse -> Text
blobId :: Prelude.Text,
PutFileResponse -> Text
treeId :: Prelude.Text
}
deriving (PutFileResponse -> PutFileResponse -> Bool
(PutFileResponse -> PutFileResponse -> Bool)
-> (PutFileResponse -> PutFileResponse -> Bool)
-> Eq PutFileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutFileResponse -> PutFileResponse -> Bool
$c/= :: PutFileResponse -> PutFileResponse -> Bool
== :: PutFileResponse -> PutFileResponse -> Bool
$c== :: PutFileResponse -> PutFileResponse -> Bool
Prelude.Eq, ReadPrec [PutFileResponse]
ReadPrec PutFileResponse
Int -> ReadS PutFileResponse
ReadS [PutFileResponse]
(Int -> ReadS PutFileResponse)
-> ReadS [PutFileResponse]
-> ReadPrec PutFileResponse
-> ReadPrec [PutFileResponse]
-> Read PutFileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutFileResponse]
$creadListPrec :: ReadPrec [PutFileResponse]
readPrec :: ReadPrec PutFileResponse
$creadPrec :: ReadPrec PutFileResponse
readList :: ReadS [PutFileResponse]
$creadList :: ReadS [PutFileResponse]
readsPrec :: Int -> ReadS PutFileResponse
$creadsPrec :: Int -> ReadS PutFileResponse
Prelude.Read, Int -> PutFileResponse -> ShowS
[PutFileResponse] -> ShowS
PutFileResponse -> String
(Int -> PutFileResponse -> ShowS)
-> (PutFileResponse -> String)
-> ([PutFileResponse] -> ShowS)
-> Show PutFileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutFileResponse] -> ShowS
$cshowList :: [PutFileResponse] -> ShowS
show :: PutFileResponse -> String
$cshow :: PutFileResponse -> String
showsPrec :: Int -> PutFileResponse -> ShowS
$cshowsPrec :: Int -> PutFileResponse -> ShowS
Prelude.Show, (forall x. PutFileResponse -> Rep PutFileResponse x)
-> (forall x. Rep PutFileResponse x -> PutFileResponse)
-> Generic PutFileResponse
forall x. Rep PutFileResponse x -> PutFileResponse
forall x. PutFileResponse -> Rep PutFileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutFileResponse x -> PutFileResponse
$cfrom :: forall x. PutFileResponse -> Rep PutFileResponse x
Prelude.Generic)
newPutFileResponse ::
Prelude.Int ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
PutFileResponse
newPutFileResponse :: Int -> Text -> Text -> Text -> PutFileResponse
newPutFileResponse
Int
pHttpStatus_
Text
pCommitId_
Text
pBlobId_
Text
pTreeId_ =
PutFileResponse' :: Int -> Text -> Text -> Text -> PutFileResponse
PutFileResponse'
{ $sel:httpStatus:PutFileResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:commitId:PutFileResponse' :: Text
commitId = Text
pCommitId_,
$sel:blobId:PutFileResponse' :: Text
blobId = Text
pBlobId_,
$sel:treeId:PutFileResponse' :: Text
treeId = Text
pTreeId_
}
putFileResponse_httpStatus :: Lens.Lens' PutFileResponse Prelude.Int
putFileResponse_httpStatus :: (Int -> f Int) -> PutFileResponse -> f PutFileResponse
putFileResponse_httpStatus = (PutFileResponse -> Int)
-> (PutFileResponse -> Int -> PutFileResponse)
-> Lens PutFileResponse PutFileResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutFileResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutFileResponse' :: PutFileResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutFileResponse
s@PutFileResponse' {} Int
a -> PutFileResponse
s {$sel:httpStatus:PutFileResponse' :: Int
httpStatus = Int
a} :: PutFileResponse)
putFileResponse_commitId :: Lens.Lens' PutFileResponse Prelude.Text
putFileResponse_commitId :: (Text -> f Text) -> PutFileResponse -> f PutFileResponse
putFileResponse_commitId = (PutFileResponse -> Text)
-> (PutFileResponse -> Text -> PutFileResponse)
-> Lens PutFileResponse PutFileResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutFileResponse' {Text
commitId :: Text
$sel:commitId:PutFileResponse' :: PutFileResponse -> Text
commitId} -> Text
commitId) (\s :: PutFileResponse
s@PutFileResponse' {} Text
a -> PutFileResponse
s {$sel:commitId:PutFileResponse' :: Text
commitId = Text
a} :: PutFileResponse)
putFileResponse_blobId :: Lens.Lens' PutFileResponse Prelude.Text
putFileResponse_blobId :: (Text -> f Text) -> PutFileResponse -> f PutFileResponse
putFileResponse_blobId = (PutFileResponse -> Text)
-> (PutFileResponse -> Text -> PutFileResponse)
-> Lens PutFileResponse PutFileResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutFileResponse' {Text
blobId :: Text
$sel:blobId:PutFileResponse' :: PutFileResponse -> Text
blobId} -> Text
blobId) (\s :: PutFileResponse
s@PutFileResponse' {} Text
a -> PutFileResponse
s {$sel:blobId:PutFileResponse' :: Text
blobId = Text
a} :: PutFileResponse)
putFileResponse_treeId :: Lens.Lens' PutFileResponse Prelude.Text
putFileResponse_treeId :: (Text -> f Text) -> PutFileResponse -> f PutFileResponse
putFileResponse_treeId = (PutFileResponse -> Text)
-> (PutFileResponse -> Text -> PutFileResponse)
-> Lens PutFileResponse PutFileResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutFileResponse' {Text
treeId :: Text
$sel:treeId:PutFileResponse' :: PutFileResponse -> Text
treeId} -> Text
treeId) (\s :: PutFileResponse
s@PutFileResponse' {} Text
a -> PutFileResponse
s {$sel:treeId:PutFileResponse' :: Text
treeId = Text
a} :: PutFileResponse)
instance Prelude.NFData PutFileResponse