Package org.azd.git.items
Class ItemsRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.git.items.ItemsRequestBuilder
Provides functionality to build requests for managing Git Items Api.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the query parameters.static classRepresents the query parameters.static classRequest configuration object for 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
ConstructorsConstructorDescriptionItemsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionGet Item Metadata and/or Content for a single item.getAsText(String repositoryId, String path, Consumer<ItemsRequestBuilder.RequestConfiguration> requestConfiguration) Get Item Metadata and/or Content for a single item.getAsTextAsync(String repositoryId, String path, Consumer<ItemsRequestBuilder.RequestConfiguration> requestConfiguration) Get Item Metadata and/or Content for a single item.Get Item Metadata and/or Content for a single item.getAsZip(String repositoryId, String path, Consumer<ItemsRequestBuilder.RequestConfiguration> requestConfiguration) Get Item Metadata and/or Content for a single item.getAsZipAsync(String repositoryId, String path, Consumer<ItemsRequestBuilder.RequestConfiguration> requestConfiguration) Get Item Metadata and/or Content for a single item.getBatch(GitItemRequestData gitItemRequestData, String repositoryId) Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long pathgetBatchAsync(GitItemRequestData gitItemRequestData, String repositoryId) Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long pathGet Item Metadata and/or Content for a collection of items.list(String repositoryId, Consumer<ItemsRequestBuilder.ListRequestConfiguration> requestConfiguration) Get Item Metadata and/or Content for a collection of items.Get Item Metadata and/or Content for a collection of items.listAsync(String repositoryId, Consumer<ItemsRequestBuilder.ListRequestConfiguration> requestConfiguration) Get Item Metadata and/or Content for a collection of items.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
ItemsRequestBuilder
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 Item Metadata and/or Content for a single item.- Parameters:
repositoryId- The name or ID of the repository.path- The item path.- Returns:
- Future of Git item object
GitItem - Throws:
AzDException- Default Api exception handler.
-
getAsTextAsync
public CompletableFuture<String> getAsTextAsync(String repositoryId, String path, Consumer<ItemsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.- Parameters:
repositoryId- The name or ID of the repository.path- The item path.requestConfiguration- Request configuration of query parameters.- Returns:
- Item as plain text.
- Throws:
AzDException- Default Api exception handler.
-
getAsZipAsync
public CompletableFuture<InputStream> getAsZipAsync(String repositoryId, String path, Consumer<ItemsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.- Parameters:
repositoryId- The name or ID of the repository.path- The item path.requestConfiguration- Request configuration of query parameters.- Returns:
- Item as plain text.
- Throws:
AzDException- Default Api exception handler.
-
getBatchAsync
public CompletableFuture<GitItemsList> getBatchAsync(GitItemRequestData gitItemRequestData, String repositoryId) throws AzDException Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path- Parameters:
gitItemRequestData- Request data to get the items in batch.repositoryId- The name or ID of the repository- Returns:
- List of GitItems.
- Throws:
AzDException- Default Api exception handler.
-
listAsync
Get Item Metadata and/or Content for a collection of items.- Parameters:
repositoryId- The name or ID of the repository- Returns:
- Git items
GitItems - Throws:
AzDException- Default Api exception handler.
-
listAsync
public CompletableFuture<GitItems> listAsync(String repositoryId, Consumer<ItemsRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException Get Item Metadata and/or Content for a collection of items.- Parameters:
repositoryId- The name or ID of the repositoryrequestConfiguration- Represents the query parameters- Returns:
- Git items
GitItems - Throws:
AzDException- Default Api exception handler.
-
get
Get Item Metadata and/or Content for a single item.- Parameters:
repositoryId- The name or ID of the repository.path- The item path.- Returns:
- Future of Git item object
GitItem - Throws:
AzDException- Default Api exception handler.
-
getAsText
public String getAsText(String repositoryId, String path, Consumer<ItemsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.- Parameters:
repositoryId- The name or ID of the repository.path- The item path.requestConfiguration- Request configuration of query parameters.- Returns:
- Item as plain text.
- Throws:
AzDException- Default Api exception handler.
-
getAsZip
public InputStream getAsZip(String repositoryId, String path, Consumer<ItemsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download.- Parameters:
repositoryId- The name or ID of the repository.path- The item path.requestConfiguration- Request configuration of query parameters.- Returns:
- Item as plain text.
- Throws:
AzDException- Default Api exception handler.
-
getBatch
public GitItemsList getBatch(GitItemRequestData gitItemRequestData, String repositoryId) throws AzDException Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path- Parameters:
gitItemRequestData- Request data to get the items in batch.repositoryId- The name or ID of the repository- Returns:
- List of GitItems.
- Throws:
AzDException- Default Api exception handler.
-
list
Get Item Metadata and/or Content for a collection of items.- Parameters:
repositoryId- The name or ID of the repository- Returns:
- Git items
GitItems - Throws:
AzDException- Default Api exception handler.
-
list
public GitItems list(String repositoryId, Consumer<ItemsRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException Get Item Metadata and/or Content for a collection of items.- Parameters:
repositoryId- The name or ID of the repositoryrequestConfiguration- Represents the query parameters- Returns:
- Git items
GitItems - Throws:
AzDException- Default Api exception handler.
-