Package org.azd.workitemtracking.fields
Class FieldsRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.workitemtracking.fields.FieldsRequestBuilder
Provides functionality to work with Work item fields Api.
-
Nested Class Summary
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
ConstructorDescriptionFieldsRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(WorkItemField workItemField) Create a new field.createAsync
(WorkItemField workItemField) Create a new field.Deletes the field.deleteAsync
(String fieldNameOrRefName) Deletes the field.Gets information on a specific field.Gets information on a specific field.list()
Returns information for all fields.list
(GetFieldsExpand expand) Returns information for all fields.Returns information for all fields.listAsync
(GetFieldsExpand expand) Returns information for all fields.update
(String fieldNameOrRefName, WorkItemFieldUpdate workItemFieldUpdate) Update a field.updateAsync
(String fieldNameOrRefName, WorkItemFieldUpdate workItemFieldUpdate) Update a field.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
FieldsRequestBuilder
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
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
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
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
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 updatedworkItemFieldUpdate
- 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
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
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
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
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
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 updatedworkItemFieldUpdate
- 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.
-