Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Returns the base-64 encoded contents of a specified file and its metadata.
Synopsis
- data GetFile = GetFile' {}
- newGetFile :: Text -> Text -> GetFile
- getFile_commitSpecifier :: Lens' GetFile (Maybe Text)
- getFile_repositoryName :: Lens' GetFile Text
- getFile_filePath :: Lens' GetFile Text
- data GetFileResponse = GetFileResponse' {
- httpStatus :: Int
- commitId :: Text
- blobId :: Text
- filePath :: Text
- fileMode :: FileModeTypeEnum
- fileSize :: Integer
- fileContent :: Base64
- newGetFileResponse :: Int -> Text -> Text -> Text -> FileModeTypeEnum -> Integer -> ByteString -> GetFileResponse
- getFileResponse_httpStatus :: Lens' GetFileResponse Int
- getFileResponse_commitId :: Lens' GetFileResponse Text
- getFileResponse_blobId :: Lens' GetFileResponse Text
- getFileResponse_filePath :: Lens' GetFileResponse Text
- getFileResponse_fileMode :: Lens' GetFileResponse FileModeTypeEnum
- getFileResponse_fileSize :: Lens' GetFileResponse Integer
- getFileResponse_fileContent :: Lens' GetFileResponse ByteString
Creating a Request
See: newGetFile
smart constructor.
GetFile' | |
|
Instances
Create a value of GetFile
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:commitSpecifier:GetFile'
, getFile_commitSpecifier
- The fully quaified reference that identifies the commit that contains
the file. For example, you can specify a full commit ID, a tag, a branch
name, or a reference such as refs/heads/master. If none is provided,
the head commit is used.
$sel:repositoryName:GetFile'
, getFile_repositoryName
- The name of the repository that contains the file.
$sel:filePath:GetFile'
, getFile_filePath
- The fully qualified path to the file, including the full name and
extension of the file. For example, /examples/file.md is the fully
qualified path to a file named file.md in a folder named examples.
Request Lenses
getFile_commitSpecifier :: Lens' GetFile (Maybe Text) Source #
The fully quaified reference that identifies the commit that contains the file. For example, you can specify a full commit ID, a tag, a branch name, or a reference such as refs/heads/master. If none is provided, the head commit is used.
getFile_repositoryName :: Lens' GetFile Text Source #
The name of the repository that contains the file.
getFile_filePath :: Lens' GetFile Text Source #
The fully qualified path to the file, including the full name and extension of the file. For example, /examples/file.md is the fully qualified path to a file named file.md in a folder named examples.
Destructuring the Response
data GetFileResponse Source #
See: newGetFileResponse
smart constructor.
GetFileResponse' | |
|
Instances
:: Int | |
-> Text | |
-> Text | |
-> Text | |
-> FileModeTypeEnum | |
-> Integer | |
-> ByteString | |
-> GetFileResponse |
Create a value of GetFileResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:GetFileResponse'
, getFileResponse_httpStatus
- The response's http status code.
$sel:commitId:GetFileResponse'
, getFileResponse_commitId
- The full commit ID of the commit that contains the content returned by
GetFile.
$sel:blobId:GetFileResponse'
, getFileResponse_blobId
- The blob ID of the object that represents the file content.
$sel:filePath:GetFile'
, getFileResponse_filePath
- The fully qualified path to the specified file. Returns the name and
extension of the file.
$sel:fileMode:GetFileResponse'
, getFileResponse_fileMode
- The extrapolated file mode permissions of the blob. Valid values include
strings such as EXECUTABLE and not numeric values.
The file mode permissions returned by this API are not the standard file mode permission values, such as 100644, but rather extrapolated values. See the supported return values.
$sel:fileSize:GetFileResponse'
, getFileResponse_fileSize
- The size of the contents of the file, in bytes.
$sel:fileContent:GetFileResponse'
, getFileResponse_fileContent
- The base-64 encoded binary data object that represents the content of
the file.--
-- Note: This Lens
automatically encodes and decodes Base64 data.
-- The underlying isomorphism will encode to Base64 representation during
-- serialisation, and decode from Base64 representation during deserialisation.
-- This Lens
accepts and returns only raw unencoded data.
Response Lenses
getFileResponse_httpStatus :: Lens' GetFileResponse Int Source #
The response's http status code.
getFileResponse_commitId :: Lens' GetFileResponse Text Source #
The full commit ID of the commit that contains the content returned by GetFile.
getFileResponse_blobId :: Lens' GetFileResponse Text Source #
The blob ID of the object that represents the file content.
getFileResponse_filePath :: Lens' GetFileResponse Text Source #
The fully qualified path to the specified file. Returns the name and extension of the file.
getFileResponse_fileMode :: Lens' GetFileResponse FileModeTypeEnum Source #
The extrapolated file mode permissions of the blob. Valid values include strings such as EXECUTABLE and not numeric values.
The file mode permissions returned by this API are not the standard file mode permission values, such as 100644, but rather extrapolated values. See the supported return values.
getFileResponse_fileSize :: Lens' GetFileResponse Integer Source #
The size of the contents of the file, in bytes.
getFileResponse_fileContent :: Lens' GetFileResponse ByteString Source #
The base-64 encoded binary data object that represents the content of
the file.--
-- Note: This Lens
automatically encodes and decodes Base64 data.
-- The underlying isomorphism will encode to Base64 representation during
-- serialisation, and decode from Base64 representation during deserialisation.
-- This Lens
accepts and returns only raw unencoded data.