Class FieldsRequestBuilder

java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.workitemtracking.fields.FieldsRequestBuilder

public class FieldsRequestBuilder extends BaseRequestBuilder
Provides functionality to work with Work item fields Api.
  • Constructor Details

    • FieldsRequestBuilder

      public FieldsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential)
      Instantiates a new RequestBuilder instance and sets the default values.
      Parameters:
      organizationUrl - Represents organization location request url.
      accessTokenCredential - Access token credential object.
  • Method Details

    • createAsync

      public CompletableFuture<WorkItemField> createAsync(WorkItemField workItemField) throws AzDException
      Create a new field.
      Parameters:
      workItemField - Describes a field on a work item and it's properties specific to that work item type.
      Returns:
      Describes a field on a work item and it's properties specific to that work item type. WorkItemField
      Throws:
      AzDException - Default Api exception handler.
    • deleteAsync

      public CompletableFuture<Void> deleteAsync(String fieldNameOrRefName) throws AzDException
      Deletes the field. To undelete a filed, see "Update Field" API.
      Parameters:
      fieldNameOrRefName - Field simple name or reference name
      Throws:
      AzDException - Default Api exception handler.
    • getAsync

      public CompletableFuture<WorkItemField> getAsync(String fieldNameOrRefName) throws AzDException
      Gets information on a specific field.
      Parameters:
      fieldNameOrRefName - Field simple name or reference name
      Returns:
      Describes a field on a work item and it's properties specific to that work item type. WorkItemField
      Throws:
      AzDException - Default Api exception handler.
    • listAsync

      public CompletableFuture<WorkItemFields> listAsync() throws AzDException
      Returns information for all fields. The project ID/name parameter is optional.
      Returns:
      Collection of work item fields. WorkItemFields
      Throws:
      AzDException - Default Api exception handler.
    • listAsync

      public CompletableFuture<WorkItemFields> listAsync(GetFieldsExpand expand) throws AzDException
      Returns information for all fields. The project ID/name parameter is optional.
      Parameters:
      expand - Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included.
      Returns:
      Collection of work item fields. WorkItemFields
      Throws:
      AzDException - Default Api exception handler.
    • updateAsync

      public CompletableFuture<WorkItemField> updateAsync(String fieldNameOrRefName, WorkItemFieldUpdate workItemFieldUpdate) throws AzDException
      Update a field.
      Parameters:
      fieldNameOrRefName - Name/reference name of the field to be updated
      workItemFieldUpdate - Describes an update request for a work item field.
      Returns:
      Describes a field on a work item and it's properties specific to that work item type. WorkItemField
      Throws:
      AzDException - Default Api exception handler.
    • create

      public WorkItemField create(WorkItemField workItemField) throws AzDException
      Create a new field.
      Parameters:
      workItemField - Describes a field on a work item and it's properties specific to that work item type.
      Returns:
      Describes a field on a work item and it's properties specific to that work item type. WorkItemField
      Throws:
      AzDException - Default Api exception handler.
    • delete

      public Void delete(String fieldNameOrRefName) throws AzDException
      Deletes the field. To undelete a filed, see "Update Field" API.
      Parameters:
      fieldNameOrRefName - Field simple name or reference name
      Throws:
      AzDException - Default Api exception handler.
    • get

      public WorkItemField get(String fieldNameOrRefName) throws AzDException
      Gets information on a specific field.
      Parameters:
      fieldNameOrRefName - Field simple name or reference name
      Returns:
      Describes a field on a work item and it's properties specific to that work item type. WorkItemField
      Throws:
      AzDException - Default Api exception handler.
    • list

      public WorkItemFields list() throws AzDException
      Returns information for all fields. The project ID/name parameter is optional.
      Returns:
      Collection of work item fields. WorkItemFields
      Throws:
      AzDException - Default Api exception handler.
    • list

      public WorkItemFields list(GetFieldsExpand expand) throws AzDException
      Returns information for all fields. The project ID/name parameter is optional.
      Parameters:
      expand - Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included.
      Returns:
      Collection of work item fields. WorkItemFields
      Throws:
      AzDException - Default Api exception handler.
    • update

      public WorkItemField update(String fieldNameOrRefName, WorkItemFieldUpdate workItemFieldUpdate) throws AzDException
      Update a field.
      Parameters:
      fieldNameOrRefName - Name/reference name of the field to be updated
      workItemFieldUpdate - Describes an update request for a work item field.
      Returns:
      Describes a field on a work item and it's properties specific to that work item type. WorkItemField
      Throws:
      AzDException - Default Api exception handler.