{-# 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.DeleteFile
(
DeleteFile (..),
newDeleteFile,
deleteFile_email,
deleteFile_name,
deleteFile_commitMessage,
deleteFile_keepEmptyFolders,
deleteFile_repositoryName,
deleteFile_branchName,
deleteFile_filePath,
deleteFile_parentCommitId,
DeleteFileResponse (..),
newDeleteFileResponse,
deleteFileResponse_httpStatus,
deleteFileResponse_commitId,
deleteFileResponse_blobId,
deleteFileResponse_treeId,
deleteFileResponse_filePath,
)
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 DeleteFile = DeleteFile'
{
DeleteFile -> Maybe Text
email :: Prelude.Maybe Prelude.Text,
DeleteFile -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
DeleteFile -> Maybe Text
commitMessage :: Prelude.Maybe Prelude.Text,
DeleteFile -> Maybe Bool
keepEmptyFolders :: Prelude.Maybe Prelude.Bool,
DeleteFile -> Text
repositoryName :: Prelude.Text,
DeleteFile -> Text
branchName :: Prelude.Text,
DeleteFile -> Text
filePath :: Prelude.Text,
DeleteFile -> Text
parentCommitId :: Prelude.Text
}
deriving (DeleteFile -> DeleteFile -> Bool
(DeleteFile -> DeleteFile -> Bool)
-> (DeleteFile -> DeleteFile -> Bool) -> Eq DeleteFile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFile -> DeleteFile -> Bool
$c/= :: DeleteFile -> DeleteFile -> Bool
== :: DeleteFile -> DeleteFile -> Bool
$c== :: DeleteFile -> DeleteFile -> Bool
Prelude.Eq, ReadPrec [DeleteFile]
ReadPrec DeleteFile
Int -> ReadS DeleteFile
ReadS [DeleteFile]
(Int -> ReadS DeleteFile)
-> ReadS [DeleteFile]
-> ReadPrec DeleteFile
-> ReadPrec [DeleteFile]
-> Read DeleteFile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFile]
$creadListPrec :: ReadPrec [DeleteFile]
readPrec :: ReadPrec DeleteFile
$creadPrec :: ReadPrec DeleteFile
readList :: ReadS [DeleteFile]
$creadList :: ReadS [DeleteFile]
readsPrec :: Int -> ReadS DeleteFile
$creadsPrec :: Int -> ReadS DeleteFile
Prelude.Read, Int -> DeleteFile -> ShowS
[DeleteFile] -> ShowS
DeleteFile -> String
(Int -> DeleteFile -> ShowS)
-> (DeleteFile -> String)
-> ([DeleteFile] -> ShowS)
-> Show DeleteFile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFile] -> ShowS
$cshowList :: [DeleteFile] -> ShowS
show :: DeleteFile -> String
$cshow :: DeleteFile -> String
showsPrec :: Int -> DeleteFile -> ShowS
$cshowsPrec :: Int -> DeleteFile -> ShowS
Prelude.Show, (forall x. DeleteFile -> Rep DeleteFile x)
-> (forall x. Rep DeleteFile x -> DeleteFile) -> Generic DeleteFile
forall x. Rep DeleteFile x -> DeleteFile
forall x. DeleteFile -> Rep DeleteFile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteFile x -> DeleteFile
$cfrom :: forall x. DeleteFile -> Rep DeleteFile x
Prelude.Generic)
newDeleteFile ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DeleteFile
newDeleteFile :: Text -> Text -> Text -> Text -> DeleteFile
newDeleteFile
Text
pRepositoryName_
Text
pBranchName_
Text
pFilePath_
Text
pParentCommitId_ =
DeleteFile' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Text
-> Text
-> Text
-> Text
-> DeleteFile
DeleteFile'
{ $sel:email:DeleteFile' :: Maybe Text
email = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:DeleteFile' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:commitMessage:DeleteFile' :: Maybe Text
commitMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:keepEmptyFolders:DeleteFile' :: Maybe Bool
keepEmptyFolders = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:repositoryName:DeleteFile' :: Text
repositoryName = Text
pRepositoryName_,
$sel:branchName:DeleteFile' :: Text
branchName = Text
pBranchName_,
$sel:filePath:DeleteFile' :: Text
filePath = Text
pFilePath_,
$sel:parentCommitId:DeleteFile' :: Text
parentCommitId = Text
pParentCommitId_
}
deleteFile_email :: Lens.Lens' DeleteFile (Prelude.Maybe Prelude.Text)
deleteFile_email :: (Maybe Text -> f (Maybe Text)) -> DeleteFile -> f DeleteFile
deleteFile_email = (DeleteFile -> Maybe Text)
-> (DeleteFile -> Maybe Text -> DeleteFile)
-> Lens DeleteFile DeleteFile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFile' {Maybe Text
email :: Maybe Text
$sel:email:DeleteFile' :: DeleteFile -> Maybe Text
email} -> Maybe Text
email) (\s :: DeleteFile
s@DeleteFile' {} Maybe Text
a -> DeleteFile
s {$sel:email:DeleteFile' :: Maybe Text
email = Maybe Text
a} :: DeleteFile)
deleteFile_name :: Lens.Lens' DeleteFile (Prelude.Maybe Prelude.Text)
deleteFile_name :: (Maybe Text -> f (Maybe Text)) -> DeleteFile -> f DeleteFile
deleteFile_name = (DeleteFile -> Maybe Text)
-> (DeleteFile -> Maybe Text -> DeleteFile)
-> Lens DeleteFile DeleteFile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFile' {Maybe Text
name :: Maybe Text
$sel:name:DeleteFile' :: DeleteFile -> Maybe Text
name} -> Maybe Text
name) (\s :: DeleteFile
s@DeleteFile' {} Maybe Text
a -> DeleteFile
s {$sel:name:DeleteFile' :: Maybe Text
name = Maybe Text
a} :: DeleteFile)
deleteFile_commitMessage :: Lens.Lens' DeleteFile (Prelude.Maybe Prelude.Text)
deleteFile_commitMessage :: (Maybe Text -> f (Maybe Text)) -> DeleteFile -> f DeleteFile
deleteFile_commitMessage = (DeleteFile -> Maybe Text)
-> (DeleteFile -> Maybe Text -> DeleteFile)
-> Lens DeleteFile DeleteFile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFile' {Maybe Text
commitMessage :: Maybe Text
$sel:commitMessage:DeleteFile' :: DeleteFile -> Maybe Text
commitMessage} -> Maybe Text
commitMessage) (\s :: DeleteFile
s@DeleteFile' {} Maybe Text
a -> DeleteFile
s {$sel:commitMessage:DeleteFile' :: Maybe Text
commitMessage = Maybe Text
a} :: DeleteFile)
deleteFile_keepEmptyFolders :: Lens.Lens' DeleteFile (Prelude.Maybe Prelude.Bool)
deleteFile_keepEmptyFolders :: (Maybe Bool -> f (Maybe Bool)) -> DeleteFile -> f DeleteFile
deleteFile_keepEmptyFolders = (DeleteFile -> Maybe Bool)
-> (DeleteFile -> Maybe Bool -> DeleteFile)
-> Lens DeleteFile DeleteFile (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFile' {Maybe Bool
keepEmptyFolders :: Maybe Bool
$sel:keepEmptyFolders:DeleteFile' :: DeleteFile -> Maybe Bool
keepEmptyFolders} -> Maybe Bool
keepEmptyFolders) (\s :: DeleteFile
s@DeleteFile' {} Maybe Bool
a -> DeleteFile
s {$sel:keepEmptyFolders:DeleteFile' :: Maybe Bool
keepEmptyFolders = Maybe Bool
a} :: DeleteFile)
deleteFile_repositoryName :: Lens.Lens' DeleteFile Prelude.Text
deleteFile_repositoryName :: (Text -> f Text) -> DeleteFile -> f DeleteFile
deleteFile_repositoryName = (DeleteFile -> Text)
-> (DeleteFile -> Text -> DeleteFile)
-> Lens DeleteFile DeleteFile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFile' {Text
repositoryName :: Text
$sel:repositoryName:DeleteFile' :: DeleteFile -> Text
repositoryName} -> Text
repositoryName) (\s :: DeleteFile
s@DeleteFile' {} Text
a -> DeleteFile
s {$sel:repositoryName:DeleteFile' :: Text
repositoryName = Text
a} :: DeleteFile)
deleteFile_branchName :: Lens.Lens' DeleteFile Prelude.Text
deleteFile_branchName :: (Text -> f Text) -> DeleteFile -> f DeleteFile
deleteFile_branchName = (DeleteFile -> Text)
-> (DeleteFile -> Text -> DeleteFile)
-> Lens DeleteFile DeleteFile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFile' {Text
branchName :: Text
$sel:branchName:DeleteFile' :: DeleteFile -> Text
branchName} -> Text
branchName) (\s :: DeleteFile
s@DeleteFile' {} Text
a -> DeleteFile
s {$sel:branchName:DeleteFile' :: Text
branchName = Text
a} :: DeleteFile)
deleteFile_filePath :: Lens.Lens' DeleteFile Prelude.Text
deleteFile_filePath :: (Text -> f Text) -> DeleteFile -> f DeleteFile
deleteFile_filePath = (DeleteFile -> Text)
-> (DeleteFile -> Text -> DeleteFile)
-> Lens DeleteFile DeleteFile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFile' {Text
filePath :: Text
$sel:filePath:DeleteFile' :: DeleteFile -> Text
filePath} -> Text
filePath) (\s :: DeleteFile
s@DeleteFile' {} Text
a -> DeleteFile
s {$sel:filePath:DeleteFile' :: Text
filePath = Text
a} :: DeleteFile)
deleteFile_parentCommitId :: Lens.Lens' DeleteFile Prelude.Text
deleteFile_parentCommitId :: (Text -> f Text) -> DeleteFile -> f DeleteFile
deleteFile_parentCommitId = (DeleteFile -> Text)
-> (DeleteFile -> Text -> DeleteFile)
-> Lens DeleteFile DeleteFile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFile' {Text
parentCommitId :: Text
$sel:parentCommitId:DeleteFile' :: DeleteFile -> Text
parentCommitId} -> Text
parentCommitId) (\s :: DeleteFile
s@DeleteFile' {} Text
a -> DeleteFile
s {$sel:parentCommitId:DeleteFile' :: Text
parentCommitId = Text
a} :: DeleteFile)
instance Core.AWSRequest DeleteFile where
type AWSResponse DeleteFile = DeleteFileResponse
request :: DeleteFile -> Request DeleteFile
request = Service -> DeleteFile -> Request DeleteFile
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteFile
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteFile)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeleteFile))
-> Logger
-> Service
-> Proxy DeleteFile
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteFile)))
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 -> Text -> DeleteFileResponse
DeleteFileResponse'
(Int -> Text -> Text -> Text -> Text -> DeleteFileResponse)
-> Either String Int
-> Either
String (Text -> Text -> Text -> Text -> DeleteFileResponse)
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 -> Text -> DeleteFileResponse)
-> Either String Text
-> Either String (Text -> Text -> Text -> DeleteFileResponse)
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 -> Text -> DeleteFileResponse)
-> Either String Text
-> Either String (Text -> Text -> DeleteFileResponse)
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 -> Text -> DeleteFileResponse)
-> Either String Text -> Either String (Text -> DeleteFileResponse)
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")
Either String (Text -> DeleteFileResponse)
-> Either String Text -> Either String DeleteFileResponse
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
"filePath")
)
instance Prelude.Hashable DeleteFile
instance Prelude.NFData DeleteFile
instance Core.ToHeaders DeleteFile where
toHeaders :: DeleteFile -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteFile -> 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.DeleteFile" ::
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 DeleteFile where
toJSON :: DeleteFile -> Value
toJSON DeleteFile' {Maybe Bool
Maybe Text
Text
parentCommitId :: Text
filePath :: Text
branchName :: Text
repositoryName :: Text
keepEmptyFolders :: Maybe Bool
commitMessage :: Maybe Text
name :: Maybe Text
email :: Maybe Text
$sel:parentCommitId:DeleteFile' :: DeleteFile -> Text
$sel:filePath:DeleteFile' :: DeleteFile -> Text
$sel:branchName:DeleteFile' :: DeleteFile -> Text
$sel:repositoryName:DeleteFile' :: DeleteFile -> Text
$sel:keepEmptyFolders:DeleteFile' :: DeleteFile -> Maybe Bool
$sel:commitMessage:DeleteFile' :: DeleteFile -> Maybe Text
$sel:name:DeleteFile' :: DeleteFile -> Maybe Text
$sel:email:DeleteFile' :: DeleteFile -> 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
"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,
(Text
"keepEmptyFolders" 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
keepEmptyFolders,
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
"filePath" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
filePath),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"parentCommitId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
parentCommitId)
]
)
instance Core.ToPath DeleteFile where
toPath :: DeleteFile -> ByteString
toPath = ByteString -> DeleteFile -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteFile where
toQuery :: DeleteFile -> QueryString
toQuery = QueryString -> DeleteFile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteFileResponse = DeleteFileResponse'
{
DeleteFileResponse -> Int
httpStatus :: Prelude.Int,
DeleteFileResponse -> Text
commitId :: Prelude.Text,
DeleteFileResponse -> Text
blobId :: Prelude.Text,
DeleteFileResponse -> Text
treeId :: Prelude.Text,
DeleteFileResponse -> Text
filePath :: Prelude.Text
}
deriving (DeleteFileResponse -> DeleteFileResponse -> Bool
(DeleteFileResponse -> DeleteFileResponse -> Bool)
-> (DeleteFileResponse -> DeleteFileResponse -> Bool)
-> Eq DeleteFileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFileResponse -> DeleteFileResponse -> Bool
$c/= :: DeleteFileResponse -> DeleteFileResponse -> Bool
== :: DeleteFileResponse -> DeleteFileResponse -> Bool
$c== :: DeleteFileResponse -> DeleteFileResponse -> Bool
Prelude.Eq, ReadPrec [DeleteFileResponse]
ReadPrec DeleteFileResponse
Int -> ReadS DeleteFileResponse
ReadS [DeleteFileResponse]
(Int -> ReadS DeleteFileResponse)
-> ReadS [DeleteFileResponse]
-> ReadPrec DeleteFileResponse
-> ReadPrec [DeleteFileResponse]
-> Read DeleteFileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFileResponse]
$creadListPrec :: ReadPrec [DeleteFileResponse]
readPrec :: ReadPrec DeleteFileResponse
$creadPrec :: ReadPrec DeleteFileResponse
readList :: ReadS [DeleteFileResponse]
$creadList :: ReadS [DeleteFileResponse]
readsPrec :: Int -> ReadS DeleteFileResponse
$creadsPrec :: Int -> ReadS DeleteFileResponse
Prelude.Read, Int -> DeleteFileResponse -> ShowS
[DeleteFileResponse] -> ShowS
DeleteFileResponse -> String
(Int -> DeleteFileResponse -> ShowS)
-> (DeleteFileResponse -> String)
-> ([DeleteFileResponse] -> ShowS)
-> Show DeleteFileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFileResponse] -> ShowS
$cshowList :: [DeleteFileResponse] -> ShowS
show :: DeleteFileResponse -> String
$cshow :: DeleteFileResponse -> String
showsPrec :: Int -> DeleteFileResponse -> ShowS
$cshowsPrec :: Int -> DeleteFileResponse -> ShowS
Prelude.Show, (forall x. DeleteFileResponse -> Rep DeleteFileResponse x)
-> (forall x. Rep DeleteFileResponse x -> DeleteFileResponse)
-> Generic DeleteFileResponse
forall x. Rep DeleteFileResponse x -> DeleteFileResponse
forall x. DeleteFileResponse -> Rep DeleteFileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteFileResponse x -> DeleteFileResponse
$cfrom :: forall x. DeleteFileResponse -> Rep DeleteFileResponse x
Prelude.Generic)
newDeleteFileResponse ::
Prelude.Int ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DeleteFileResponse
newDeleteFileResponse :: Int -> Text -> Text -> Text -> Text -> DeleteFileResponse
newDeleteFileResponse
Int
pHttpStatus_
Text
pCommitId_
Text
pBlobId_
Text
pTreeId_
Text
pFilePath_ =
DeleteFileResponse' :: Int -> Text -> Text -> Text -> Text -> DeleteFileResponse
DeleteFileResponse'
{ $sel:httpStatus:DeleteFileResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:commitId:DeleteFileResponse' :: Text
commitId = Text
pCommitId_,
$sel:blobId:DeleteFileResponse' :: Text
blobId = Text
pBlobId_,
$sel:treeId:DeleteFileResponse' :: Text
treeId = Text
pTreeId_,
$sel:filePath:DeleteFileResponse' :: Text
filePath = Text
pFilePath_
}
deleteFileResponse_httpStatus :: Lens.Lens' DeleteFileResponse Prelude.Int
deleteFileResponse_httpStatus :: (Int -> f Int) -> DeleteFileResponse -> f DeleteFileResponse
deleteFileResponse_httpStatus = (DeleteFileResponse -> Int)
-> (DeleteFileResponse -> Int -> DeleteFileResponse)
-> Lens DeleteFileResponse DeleteFileResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFileResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteFileResponse' :: DeleteFileResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteFileResponse
s@DeleteFileResponse' {} Int
a -> DeleteFileResponse
s {$sel:httpStatus:DeleteFileResponse' :: Int
httpStatus = Int
a} :: DeleteFileResponse)
deleteFileResponse_commitId :: Lens.Lens' DeleteFileResponse Prelude.Text
deleteFileResponse_commitId :: (Text -> f Text) -> DeleteFileResponse -> f DeleteFileResponse
deleteFileResponse_commitId = (DeleteFileResponse -> Text)
-> (DeleteFileResponse -> Text -> DeleteFileResponse)
-> Lens DeleteFileResponse DeleteFileResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFileResponse' {Text
commitId :: Text
$sel:commitId:DeleteFileResponse' :: DeleteFileResponse -> Text
commitId} -> Text
commitId) (\s :: DeleteFileResponse
s@DeleteFileResponse' {} Text
a -> DeleteFileResponse
s {$sel:commitId:DeleteFileResponse' :: Text
commitId = Text
a} :: DeleteFileResponse)
deleteFileResponse_blobId :: Lens.Lens' DeleteFileResponse Prelude.Text
deleteFileResponse_blobId :: (Text -> f Text) -> DeleteFileResponse -> f DeleteFileResponse
deleteFileResponse_blobId = (DeleteFileResponse -> Text)
-> (DeleteFileResponse -> Text -> DeleteFileResponse)
-> Lens DeleteFileResponse DeleteFileResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFileResponse' {Text
blobId :: Text
$sel:blobId:DeleteFileResponse' :: DeleteFileResponse -> Text
blobId} -> Text
blobId) (\s :: DeleteFileResponse
s@DeleteFileResponse' {} Text
a -> DeleteFileResponse
s {$sel:blobId:DeleteFileResponse' :: Text
blobId = Text
a} :: DeleteFileResponse)
deleteFileResponse_treeId :: Lens.Lens' DeleteFileResponse Prelude.Text
deleteFileResponse_treeId :: (Text -> f Text) -> DeleteFileResponse -> f DeleteFileResponse
deleteFileResponse_treeId = (DeleteFileResponse -> Text)
-> (DeleteFileResponse -> Text -> DeleteFileResponse)
-> Lens DeleteFileResponse DeleteFileResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFileResponse' {Text
treeId :: Text
$sel:treeId:DeleteFileResponse' :: DeleteFileResponse -> Text
treeId} -> Text
treeId) (\s :: DeleteFileResponse
s@DeleteFileResponse' {} Text
a -> DeleteFileResponse
s {$sel:treeId:DeleteFileResponse' :: Text
treeId = Text
a} :: DeleteFileResponse)
deleteFileResponse_filePath :: Lens.Lens' DeleteFileResponse Prelude.Text
deleteFileResponse_filePath :: (Text -> f Text) -> DeleteFileResponse -> f DeleteFileResponse
deleteFileResponse_filePath = (DeleteFileResponse -> Text)
-> (DeleteFileResponse -> Text -> DeleteFileResponse)
-> Lens DeleteFileResponse DeleteFileResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFileResponse' {Text
filePath :: Text
$sel:filePath:DeleteFileResponse' :: DeleteFileResponse -> Text
filePath} -> Text
filePath) (\s :: DeleteFileResponse
s@DeleteFileResponse' {} Text
a -> DeleteFileResponse
s {$sel:filePath:DeleteFileResponse' :: Text
filePath = Text
a} :: DeleteFileResponse)
instance Prelude.NFData DeleteFileResponse