Package org.azd.git.blobs
Class BlobsRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.git.blobs.BlobsRequestBuilder
Request builder to manage Git blobs Api.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the query parameters.static classRequest configuration object for the query parameters.Nested classes/interfaces inherited from class org.azd.abstractions.BaseRequestBuilder
BaseRequestBuilder.ProjectExcludeParameter -
Field Summary
Fields inherited from class org.azd.abstractions.BaseRequestBuilder
accessTokenCredential, apiVersion, area, locationId, organizationUrl, serializer -
Constructor Summary
ConstructorsConstructorDescriptionBlobsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionGet a single blob.get(String repositoryId, String sha1, Consumer<BlobsRequestBuilder.RequestConfiguration> requestConfiguration) Get a single blob.Get a single blob.getAsync(String repositoryId, String sha1, Consumer<BlobsRequestBuilder.RequestConfiguration> requestConfiguration) Get a single blob.Gets one or more blobs in a zip file download.Gets one or more blobs in a zip file download.getAsZipAsync(String repositoryId, List<String> blobIds) Gets one or more blobs in a zip file download.getAsZipAsync(String repositoryId, List<String> blobIds, String filename) Gets one or more blobs in a zip file download.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
BlobsRequestBuilder
Instantiates a new RequestBuilder instance and sets the default values.- Parameters:
organizationUrl- Represents organization location request url.accessTokenCredential- Access token credential object.
-
-
Method Details
-
getAsync
Get a single blob.- Parameters:
repositoryId- The name or ID of the repository.sha1- SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.- Returns:
- GitBlobRef Object
GitBlobRef - Throws:
AzDException- Default Api Exception handler.
-
getAsync
public CompletableFuture<InputStream> getAsync(String repositoryId, String sha1, Consumer<BlobsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Get a single blob.- Parameters:
repositoryId- The name or ID of the repository.sha1- SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.requestConfiguration- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- Input stream.
- Throws:
AzDException- Default Api Exception handler.
-
getAsZipAsync
public CompletableFuture<InputStream> getAsZipAsync(String repositoryId, List<String> blobIds) throws AzDException Gets one or more blobs in a zip file download.- Parameters:
repositoryId- The name or ID of the repository.blobIds- Blob IDs (SHA1 hashes) to be returned in the zip file.- Throws:
AzDException- Default Api Exception handler.
-
getAsZipAsync
public CompletableFuture<InputStream> getAsZipAsync(String repositoryId, List<String> blobIds, String filename) throws AzDException Gets one or more blobs in a zip file download.- Parameters:
repositoryId- The name or ID of the repository.blobIds- Blob IDs (SHA1 hashes) to be returned in the zip file.filename- Specify the file name to get in a zip file.- Throws:
AzDException- Default Api Exception handler.
-
get
Get a single blob.- Parameters:
repositoryId- The name or ID of the repository.sha1- SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.- Returns:
- GitBlobRef Object
GitBlobRef - Throws:
AzDException- Default Api Exception handler.
-
get
public InputStream get(String repositoryId, String sha1, Consumer<BlobsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Get a single blob.- Parameters:
repositoryId- The name or ID of the repository.sha1- SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint.requestConfiguration- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- Input stream.
- Throws:
AzDException- Default Api Exception handler.
-
getAsZip
Gets one or more blobs in a zip file download.- Parameters:
repositoryId- The name or ID of the repository.blobIds- Blob IDs (SHA1 hashes) to be returned in the zip file.- Throws:
AzDException- Default Api Exception handler.
-
getAsZip
public InputStream getAsZip(String repositoryId, List<String> blobIds, String filename) throws AzDException Gets one or more blobs in a zip file download.- Parameters:
repositoryId- The name or ID of the repository.blobIds- Blob IDs (SHA1 hashes) to be returned in the zip file.filename- Specify the file name to get in a zip file.- Throws:
AzDException- Default Api Exception handler.
-