public class LabelsApi extends AbstractApi
Constants.ActionType, Constants.ApplicationScope, Constants.ArchiveFormat, Constants.CommitBuildState, Constants.DeploymentStatus, Constants.Encoding, Constants.EpicOrderBy, Constants.GroupOrderBy, Constants.GroupSearchScope, Constants.ImpersonationState, Constants.IssueOrderBy, Constants.IssueScope, Constants.IssueState, Constants.JobScope, Constants.LineType, Constants.MergeRequestOrderBy, Constants.MergeRequestScope, Constants.MergeRequestSearchIn, Constants.MergeRequestState, Constants.MilestoneState, Constants.PipelineOrderBy, Constants.PipelineScope, Constants.ProjectOrderBy, Constants.ProjectSearchScope, Constants.SearchScope, Constants.SortOrder, Constants.StateEvent, Constants.TagOrderBy, Constants.TargetType, Constants.TodoAction, Constants.TodoState, Constants.TodoType, Constants.TokenType
gitLabApi
NEXT_PAGE_HEADER, PAGE_HEADER, PAGE_PARAM, PER_PAGE, PER_PAGE_PARAM, PREV_PAGE_HEADER, TOTAL_HEADER, TOTAL_PAGES_HEADER
Modifier and Type | Method and Description |
---|---|
Label |
createGroupLabel(Object groupIdOrPath,
Label labelProperties)
Create a group label.
|
Label |
createLabel(Object projectIdOrPath,
String name,
String color)
Deprecated.
Replaced by the
createProjectLabel(Object, Label) method. |
Label |
createLabel(Object projectIdOrPath,
String name,
String color,
Integer priority)
Deprecated.
Replaced by the
createProjectLabel(Object, Label) method. |
Label |
createLabel(Object projectIdOrPath,
String name,
String color,
String description)
Deprecated.
Replaced by the
createProjectLabel(Object, Label) method. |
Label |
createLabel(Object projectIdOrPath,
String name,
String color,
String description,
Integer priority)
Deprecated.
Replaced by the
createProjectLabel(Object, Label) method. |
Label |
createProjectLabel(Object projectIdOrPath,
Label labelProperties)
Create a project label.
|
void |
deleteGroupLabel(Object groupIdOrPath,
Object labelIdOrName)
Delete the specified label
|
void |
deleteLabel(Object projectIdOrPath,
String name)
Deprecated.
Replaced by the
deleteProjectLabel(Object, Object) method. |
void |
deleteProjectLabel(Object projectIdOrPath,
Object labelIdOrName)
Delete the specified project label.
|
Label |
getGroupLabel(Object groupIdOrPath,
Object labelIdOrName)
Get a single group label.
|
List<Label> |
getGroupLabels(Object groupIdOrPath)
Get all labels of the specified group.
|
Pager<Label> |
getGroupLabels(Object groupIdOrPath,
int itemsPerPage)
Get a Pager of all labels of the specified group.
|
Stream<Label> |
getGroupLabelsStream(Object groupIdOrPath)
Get a Stream of all labels of the specified group.
|
List<Label> |
getLabels(Object projectIdOrPath)
Deprecated.
Replaced by the
getProjectLabels(Object) method. |
Pager<Label> |
getLabels(Object projectIdOrPath,
int itemsPerPage)
Deprecated.
Replaced by the
getProjectLabels(Object, int) method. |
List<Label> |
getLabels(Object projectIdOrPath,
int page,
int perPage)
Deprecated.
Will be removed in the next major release (5.0.0)
|
Stream<Label> |
getLabelsStream(Object projectIdOrPath)
Deprecated.
Replaced by the
getProjectLabelsStream(Object) method. |
Optional<Label> |
getOptionalGroupLabel(Object groupIdOrPath,
Object labelIdOrName)
Get a single group label as the value of an Optional.
|
Optional<Label> |
getOptionalProjectLabel(Object projectIdOrPath,
Object labelIdOrName)
Get a single project label as the value of an Optional.
|
Label |
getProjectLabel(Object projectIdOrPath,
Object labelIdOrName)
Get a single project label.
|
List<Label> |
getProjectLabels(Object projectIdOrPath)
Get all labels of the specified project.
|
Pager<Label> |
getProjectLabels(Object projectIdOrPath,
int itemsPerPage)
Get a Pager of all labels of the specified project.
|
Stream<Label> |
getProjectLabelsStream(Object projectIdOrPath)
Get a Stream of all labels of the specified project.
|
Label |
subscribeGroupLabel(Object groupIdOrPath,
Object labelIdOrName)
Subscribe a specified group label.
|
Label |
subscribeLabel(Object projectIdOrPath,
Integer labelId)
Deprecated.
Replaced by the
subscribeProjectLabel(Object, Object) method. |
Label |
subscribeProjectLabel(Object projectIdOrPath,
Object labelIdOrName)
Subscribe a specified project label.
|
Label |
unsubscribeGroupLabel(Object groupIdOrPath,
Object labelIdOrName)
Unsubscribe a specified group label.
|
Label |
unsubscribeLabel(Object projectIdOrPath,
Integer labelId)
Deprecated.
Replaced by the
unsubscribeProjectLabel(Object, Object) method. |
Label |
unsubscribeProjectLabel(Object projectIdOrPath,
Object labelIdOrName)
Unsubscribe a specified project label.
|
Label |
updateGroupLabel(Object groupIdOrPath,
Object labelIdOrName,
Label labelConfig)
Update the specified label.
|
Label |
updateLabel(Object projectIdOrPath,
String name,
String newName,
String color,
String description,
Integer priority)
Deprecated.
@deprecated Replaced by the
updateProjectLabel(Object, Object, Label) method. |
Label |
updateLabelColor(Object projectIdOrPath,
String name,
String color,
String description,
Integer priority)
Deprecated.
@deprecated Replaced by the
updateProjectLabel(Object, Object, Label) method. |
Label |
updateLabelName(Object projectIdOrPath,
String name,
String newName,
String description,
Integer priority)
Deprecated.
@deprecated Replaced by the
updateProjectLabel(Object, Object, Label) method. |
Label |
updateProjectLabel(Object projectIdOrPath,
Object labelIdOrName,
Label labelConfig)
Update the specified project label.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, getApiVersion, getDefaultPerPage, getDefaultPerPageParam, getDefaultPerPageParam, getGroupIdOrPath, getLabelIdOrName, getPageQueryParams, getPageQueryParams, getPerPageQueryParam, getProjectIdOrPath, getUserIdOrUsername, getWithAccepts, handle, head, isApiVersion, post, post, post, post, post, put, put, put, putUpload, putUpload, putWithFormData, upload, upload, upload, urlEncode, validate
public LabelsApi(GitLabApi gitLabApi)
public List<Label> getProjectLabels(Object projectIdOrPath) throws GitLabApiException
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Pager<Label> getProjectLabels(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceitemsPerPage
- the number of items per pageGitLabApiException
- if any exception occurspublic Stream<Label> getProjectLabelsStream(Object projectIdOrPath) throws GitLabApiException
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurspublic Label getProjectLabel(Object projectIdOrPath, Object labelIdOrName) throws GitLabApiException
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancelabelIdOrName
- the label in the form of an Integer(ID), String(name), or Label instanceGitLabApiException
- if any exception occurspublic Optional<Label> getOptionalProjectLabel(Object projectIdOrPath, Object labelIdOrName) throws GitLabApiException
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancelabelIdOrName
- the label in the form of an Integer(ID), String(name), or Label instanceGitLabApiException
- if any exception occurspublic Label createProjectLabel(Object projectIdOrPath, Label labelProperties) throws GitLabApiException
// name and color properties are required
Label labelProperties = new Label()
.withName("a-pink-project-label")
.withColor("pink")
.withDescription("A new pink project label")
.withPriority(10);
gitLabApi.getLabelsApi().createProjectLabel(projectId, labelProperties);
GitLab Endpoint: POST /groups/:id/labels
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancelabelProperties
- a Label instance holding the properties for the new group labelGitLabApiException
- if any exception occurspublic Label updateProjectLabel(Object projectIdOrPath, Object labelIdOrName, Label labelConfig) throws GitLabApiException
Label labelUpdates = new Label()
.withName("a-new-name")
.withColor("red")
.withDescription("A red group label");
gitLabApi.getLabelsApi().updateGroupLabel(projectId, labelId, labelUpdates);
GitLab Endpoint: PUT /projects/:id/labels/:label_id
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancelabelIdOrName
- the label in the form of an Integer(ID), String(name), or Label instancelabelConfig
- a Label instance holding the label properties to updateGitLabApiException
- if any exception occurspublic void deleteProjectLabel(Object projectIdOrPath, Object labelIdOrName) throws GitLabApiException
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancelabelIdOrName
- the label in the form of an Integer(ID), String(name), or Label instanceGitLabApiException
- if any exception occurspublic Label subscribeProjectLabel(Object projectIdOrPath, Object labelIdOrName) throws GitLabApiException
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancelabelIdOrName
- the label in the form of an Integer(ID), String(name), or Label instanceGitLabApiException
- if any exception occurspublic Label unsubscribeProjectLabel(Object projectIdOrPath, Object labelIdOrName) throws GitLabApiException
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancelabelIdOrName
- the label in the form of an Integer(ID), String(name), or Label instanceGitLabApiException
- if any exception occurspublic List<Label> getGroupLabels(Object groupIdOrPath) throws GitLabApiException
groupIdOrPath
- the group in the form of an Integer(ID), String(path), or Group instanceGitLabApiException
- if any exception occurspublic Pager<Label> getGroupLabels(Object groupIdOrPath, int itemsPerPage) throws GitLabApiException
groupIdOrPath
- the group in the form of an Integer(ID), String(path), or Group instanceitemsPerPage
- the number of items per pageGitLabApiException
- if any exception occurspublic Stream<Label> getGroupLabelsStream(Object groupIdOrPath) throws GitLabApiException
groupIdOrPath
- the group in the form of an Integer(ID), String(path), or Group instanceGitLabApiException
- if any exception occurspublic Label getGroupLabel(Object groupIdOrPath, Object labelIdOrName) throws GitLabApiException
groupIdOrPath
- the group in the form of an Integer(ID), String(path), or Group instancelabelIdOrName
- the label in the form of an Integer(ID), String(name), or Label instanceGitLabApiException
- if any exception occurspublic Optional<Label> getOptionalGroupLabel(Object groupIdOrPath, Object labelIdOrName) throws GitLabApiException
groupIdOrPath
- the group in the form of an Integer(ID), String(path), or Group instancelabelIdOrName
- the label in the form of an Integer(ID), String(name), or Label instanceGitLabApiException
- if any exception occurspublic Label createGroupLabel(Object groupIdOrPath, Label labelProperties) throws GitLabApiException
Label labelProperties = new Label()
.withName("a-name")
.withColor("green")
.withDescription("A new green group label");
gitLabApi.getLabelsApi().createGroupLabel(projectId, labelProperties);
GitLab Endpoint: POST /groups/:id/labels
groupIdOrPath
- the group in the form of an Integer(ID), String(path), or Group instancelabelProperties
- a Label instance holding the properties for the new group labelGitLabApiException
- if any exception occurspublic Label updateGroupLabel(Object groupIdOrPath, Object labelIdOrName, Label labelConfig) throws GitLabApiException
Label labelUpdates = new Label()
.withName("a-new-name")
.withColor("red")
.withDescription("A red group label");
gitLabApi.getLabelsApi().updateGroupLabel(projectId, labelId, labelUpdates);
GitLab Endpoint: PUT /groups/:id/labels/:label_id
groupIdOrPath
- the group in the form of an Integer(ID), String(path), or Group instancelabelIdOrName
- the label in the form of an Integer(ID), String(name), or Label instancelabelConfig
- a Label instance holding the label properties to updateGitLabApiException
- if any exception occurspublic void deleteGroupLabel(Object groupIdOrPath, Object labelIdOrName) throws GitLabApiException
groupIdOrPath
- the group in the form of an Integer(ID), String(path), or Group instancelabelIdOrName
- the label in the form of an Integer(ID), String(name), or Label instanceGitLabApiException
- if any exception occurspublic Label subscribeGroupLabel(Object groupIdOrPath, Object labelIdOrName) throws GitLabApiException
groupIdOrPath
- the group in the form of an Integer(ID), String(path), or Group instancelabelIdOrName
- the label in the form of an Integer(ID), String(name), or Label instanceGitLabApiException
- if any exception occurspublic Label unsubscribeGroupLabel(Object groupIdOrPath, Object labelIdOrName) throws GitLabApiException
groupIdOrPath
- the group in the form of an Integer(ID), String(path), or Group instancelabelIdOrName
- the label in the form of an Integer(ID), String(name), or Label instanceGitLabApiException
- if any exception occurs@Deprecated public List<Label> getLabels(Object projectIdOrPath) throws GitLabApiException
getProjectLabels(Object)
method.projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurs@Deprecated public List<Label> getLabels(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancepage
- the page to getperPage
- the number of items per pageGitLabApiException
- if any exception occurs@Deprecated public Pager<Label> getLabels(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
getProjectLabels(Object, int)
method.projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceitemsPerPage
- the number of items per pageGitLabApiException
- if any exception occurs@Deprecated public Stream<Label> getLabelsStream(Object projectIdOrPath) throws GitLabApiException
getProjectLabelsStream(Object)
method.projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instanceGitLabApiException
- if any exception occurs@Deprecated public Label createLabel(Object projectIdOrPath, String name, String color, String description) throws GitLabApiException
createProjectLabel(Object, Label)
method.projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancename
- the name for the labelcolor
- the color for the labeldescription
- the description for the labelGitLabApiException
- if any exception occurs@Deprecated public Label createLabel(Object projectIdOrPath, String name, String color) throws GitLabApiException
createProjectLabel(Object, Label)
method.projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancename
- the name for the labelcolor
- the color for the labelGitLabApiException
- if any exception occurs@Deprecated public Label createLabel(Object projectIdOrPath, String name, String color, Integer priority) throws GitLabApiException
createProjectLabel(Object, Label)
method.projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancename
- the name for the labelcolor
- the color for the labelpriority
- the priority for the labelGitLabApiException
- if any exception occurs@Deprecated public Label createLabel(Object projectIdOrPath, String name, String color, String description, Integer priority) throws GitLabApiException
createProjectLabel(Object, Label)
method.projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancename
- the name for the labelcolor
- the color for the labeldescription
- the description for the labelpriority
- the priority for the labelGitLabApiException
- if any exception occurs@Deprecated public Label updateLabelName(Object projectIdOrPath, String name, String newName, String description, Integer priority) throws GitLabApiException
updateProjectLabel(Object, Object, Label)
method.projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancename
- the name for the labelnewName
- the new name for the labeldescription
- the description for the labelpriority
- the priority for the labelGitLabApiException
- if any exception occurs@Deprecated public Label updateLabelColor(Object projectIdOrPath, String name, String color, String description, Integer priority) throws GitLabApiException
updateProjectLabel(Object, Object, Label)
method.projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancename
- the name for the labelcolor
- the color for the labeldescription
- the description for the labelpriority
- the priority for the labelGitLabApiException
- if any exception occurs@Deprecated public Label updateLabel(Object projectIdOrPath, String name, String newName, String color, String description, Integer priority) throws GitLabApiException
updateProjectLabel(Object, Object, Label)
method.projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancename
- the name for the labelnewName
- the new name for the labelcolor
- the color for the labeldescription
- the description for the labelpriority
- the priority for the labelGitLabApiException
- if any exception occurs@Deprecated public void deleteLabel(Object projectIdOrPath, String name) throws GitLabApiException
deleteProjectLabel(Object, Object)
method.projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancename
- the name for the labelGitLabApiException
- if any exception occurs@Deprecated public Label subscribeLabel(Object projectIdOrPath, Integer labelId) throws GitLabApiException
subscribeProjectLabel(Object, Object)
method.projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancelabelId
- the label IDGitLabApiException
- if any exception occurs@Deprecated public Label unsubscribeLabel(Object projectIdOrPath, Integer labelId) throws GitLabApiException
unsubscribeProjectLabel(Object, Object)
method.projectIdOrPath
- the project in the form of an Integer(ID), String(path), or Project instancelabelId
- the label IDGitLabApiException
- if any exception occursCopyright © 2020. All rights reserved.