package org.gitlab4j.api; import java.util.List; import java.util.Optional; import java.util.stream.Stream; import javax.ws.rs.core.Response; import org.gitlab4j.api.models.LabelEvent; /** * This class provides an entry point to all the GitLab Resource label events API * @see Resource label events API at GitLab */ public class ResourceLabelEventsApi extends AbstractApi { public ResourceLabelEventsApi(GitLabApi gitLabApi) { super(gitLabApi); } /** * Gets a list of all label events for a single issue. * *
GitLab Endpoint: GET /projects/:id/issues/:issue_iid/resource_label_events
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param issueIid the IID of the issue
* @return a List of LabelEvent for the specified issue
* @throws GitLabApiException if any exception occurs
*/
public ListGitLab Endpoint: GET /projects/:id/issues/:issue_iid/resource_label_events
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param issueIid the IID of the issue
* @param itemsPerPage the number of LabelEvent instances that will be fetched per page
* @return the Pager of LabelEvent instances for the specified issue IID
* @throws GitLabApiException if any exception occurs
*/
public PagerGitLab Endpoint: GET /projects/:id/issues/:issue_iid/resource_label_events
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param issueIid the IID of the issue
* @return a Stream of LabelEvent for the specified issue
* @throws GitLabApiException if any exception occurs
*/
public StreamGitLab Endpoint: GET /projects/:id/issues/:issue_iid/resource_label_events/:resource_label_event_id
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param issueIid the IID of the issue
* @param resourceLabelEventId the ID of a label event
* @return LabelEvent instance for the specified project issue
* @throws GitLabApiException if any exception occurs
*/
public LabelEvent getIssueLabelEvent(Object projectIdOrPath, Long issueIid, Long resourceLabelEventId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath),
"issues", issueIid, "resource_label_events", resourceLabelEventId);
return (response.readEntity(LabelEvent.class));
}
/**
* Get an Optional instance holding a LabelEvent for a specific project issue
*
* GitLab Endpoint: GET /projects/:id/issues/:issue_iid/resource_label_events/:resource_label_event_id
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param issueIid the IID of the issue
* @param resourceLabelEventId the ID of a label event
* @return an Optional instance with the specified LabelEvent as the value
* @throws GitLabApiException if any exception occurs
*/
public OptionalGitLab Endpoint: GET /projects/:id/epics/:epic_id/resource_label_events
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param epicId the ID of the epic
* @return a List of LabelEvent for the specified epic
* @throws GitLabApiException if any exception occurs
*/
public ListGitLab Endpoint: GET /projects/:id/epics/:epic_id/resource_label_events
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param epicId the ID of the epic
* @param itemsPerPage the number of LabelEvent instances that will be fetched per page
* @return the Pager of LabelEvent instances for the specified epic
* @throws GitLabApiException if any exception occurs
*/
public PagerGitLab Endpoint: GET /projects/:id/epics/:epic_id/resource_label_events
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param epicId the ID of the epic
* @return a Stream of LabelEvent for the specified epic
* @throws GitLabApiException if any exception occurs
*/
public StreamGitLab Endpoint: GET /projects/:id/epics/:epic_id/resource_label_events/:resource_label_event_id
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param epicId the ID of the epic
* @param resourceLabelEventId the ID of a label event
* @return LabelEvent instance for the specified epic label event
* @throws GitLabApiException if any exception occurs
*/
public LabelEvent getEpicLabelEvent(Object projectIdOrPath, Long epicId, Long resourceLabelEventId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath),
"epics", epicId, "resource_label_events", resourceLabelEventId);
return (response.readEntity(LabelEvent.class));
}
/**
* Get an Optional instance holding a LabelEvent for a specific epic label event.
*
* GitLab Endpoint: GET /projects/:id/epics/:epic_id/resource_label_events/:resource_label_event_id
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param epicId the ID of the epic
* @param resourceLabelEventId the ID of a label event
* @return an Optional instance with the specified LabelEvent as the value
* @throws GitLabApiException if any exception occurs
*/
public OptionalGitLab Endpoint: GET /projects/:id/merge_requests/:epic_id/resource_label_events
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param mergeRequestIid the IID of the merge request
* @return a List of LabelEvent for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public ListGitLab Endpoint: GET /projects/:id/merge_requests/:epic_id/resource_label_events
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param mergeRequestIid the IID of the merge request
* @param itemsPerPage the number of LabelEvent instances that will be fetched per page
* @return the Pager of LabelEvent instances for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public PagerGitLab Endpoint: GET /projects/:id/merge_requests/:issue_iid/resource_label_events
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param mergeRequestIid the IID of the merge request
* @return a Stream of LabelEvent for the specified merge request
* @throws GitLabApiException if any exception occurs
*/
public StreamGitLab Endpoint: GET /projects/:id/merge_requests/:epic_id/resource_label_events/:resource_label_event_id
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param mergeRequestIid the IID of the merge request
* @param resourceLabelEventId the ID of a label event
* @return LabelEvent instance for the specified epic label event
* @throws GitLabApiException if any exception occurs
*/
public LabelEvent getMergeRequestLabelEvent(Object projectIdOrPath, Long mergeRequestIid, Long resourceLabelEventId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath),
"merge_requests", mergeRequestIid, "resource_label_events", resourceLabelEventId);
return (response.readEntity(LabelEvent.class));
}
/**
* Get an Optional instance holding a LabelEvent for a specific merge request label event.
*
* GitLab Endpoint: GET /projects/:id/merge_requests/:issue_iid/resource_label_events/:resource_label_event_id
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param mergeRequestIid the IID of the merge request
* @param resourceLabelEventId the ID of a label event
* @return an Optional instance with the specified LabelEvent as the value
* @throws GitLabApiException if any exception occurs
*/
public Optional