src/main/java/org/gitlab4j/api/ServicesApi.java
public SlackService updateSlackService(Object projectIdOrPath, SlackService slackNotifications) throws GitLabApiException {
        GitLabApiForm formData = new GitLabApiForm()
                .withParam("webhook", slackNotifications.getWebhook(), true)
                .withParam("username", slackNotifications.getUsername())
                .withParam("channel",  slackNotifications.getDefaultChannel())
                .withParam("notify_only_broken_pipelines", slackNotifications.getNotifyOnlyBrokenPipelines())
                .withParam("notify_only_default_branch", slackNotifications.getNotifyOnlyDefaultBranch())
                .withParam("push_events", slackNotifications.getPushEvents())
                .withParam("issues_events", slackNotifications.getIssuesEvents())
                .withParam("confidential_issues_events", slackNotifications.getConfidentialIssuesEvents())
                .withParam("merge_requests_events", slackNotifications.getMergeRequestsEvents())
                .withParam("tag_push_events", slackNotifications.getTagPushEvents())
                .withParam("note_events", slackNotifications.getNoteEvents())
                .withParam("confidential_note_events", slackNotifications.getConfidentialNoteEvents())
                .withParam("pipeline_events", slackNotifications.getPipelineEvents())
                .withParam("wiki_page_events", slackNotifications.getWikiPageEvents())
                .withParam("push_channel", slackNotifications.getPushChannel())
                .withParam("issue_channel", slackNotifications.getIssueChannel())
                .withParam("confidential_issue_channel", slackNotifications.getConfidentialIssueChannel())
                .withParam("merge_request_channel", slackNotifications.getMergeRequestChannel())
                .withParam("note_channel", slackNotifications.getNoteChannel())
                .withParam("confidential_note_channel", slackNotifications.getConfidentialNoteChannel())
                .withParam("tag_push_channel", slackNotifications.getTagPushChannel())
                .withParam("pipeline_channel", slackNotifications.getPipelineChannel())
                .withParam("wiki_page_channel", slackNotifications.getWikiPageChannel());
        Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "services", "slack");
        return (response.readEntity(SlackService.class));
    }
/**
     * Updates the Slack notification settings for a project.
     *
     * PUT /projects/:id/services/slack
     *
     * The following properties on the SlackService instance are utilized in the update of the settings:
     * 
     * webhook (required) - https://hooks.slack.com/services/...
     * username (optional) - username
     * defaultChannel (optional) - Default channel to use if others are not configured
     * notifyOnlyBrokenPipelines (optional) - Send notifications for broken pipelines
     * notifyOnlyDefault_branch (optional) - Send notifications only for the default branch
     * pushEvents (optional) - Enable notifications for push events
     * issuesEvents (optional) - Enable notifications for issue events
     * confidentialIssuesEvents (optional) - Enable notifications for confidential issue events
     * mergeRequestsEvents (optional) - Enable notifications for merge request events
     * tagPushEvents (optional) - Enable notifications for tag push events
     * noteEvents (optional) - Enable notifications for note events
     * confidentialNoteEvents (optional) - Enable notifications for confidential note events
     * pipelineEvents (optional) - Enable notifications for pipeline events
     * wikiPageEvents (optional) - Enable notifications for wiki page events
     * pushChannel (optional) - The name of the channel to receive push events notifications
     * issueChannel (optional) - The name of the channel to receive issues events notifications
     * confidentialIssueChannel (optional) - The name of the channel to receive confidential issues events notifications
     * mergeRequestChannel (optional) - The name of the channel to receive merge request events notifications
     * noteChannel (optional) - The name of the channel to receive note events notifications
     * confidentialNoteChannel (optional) - The name of the channel to receive confidential note events notifications
     * tagPushChannel (optional) - The name of the channel to receive tag push events notifications
     * pipelineChannel (optional) - The name of the channel to receive pipeline events notifications
     * wikiPageChannel (optional) - The name of the channel to receive wiki page events notifications
     *
     * @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
     * @param slackNotifications the SlackService instance holding the settings
     * @return a SlackService instance holding the newly updated settings
     * @throws GitLabApiException if any exception occurs
     */
Updates the Slack notification settings for a project.
PUT /projects/:id/services/slack

The following properties on the SlackService instance are utilized in the update of the settings.



@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param slackNotifications the SlackService instance holding the settings
@return a SlackService instance holding the newly updated settings
@throws GitLabApiException if any exception occurs
Updates the Slack notification settings for a project . PUT / projects / : id / services / slack The following properties on the SlackService instance are utilized in the update of the settings . @param projectIdOrPath id path of the project or a Project instance holding the project ID or path @param slackNotifications the SlackService instance holding the settings @return a SlackService instance holding the newly updated settings @throws GitLabApiException if any exception occurs
public SlackService updateSlackService(Object projectIdOrPath, SlackService slackNotifications) throws GitLabApiException {
        GitLabApiForm formData = new GitLabApiForm()
                .withParam("webhook", slackNotifications.getWebhook(), true)
                .withParam("username", slackNotifications.getUsername())
                .withParam("channel",  slackNotifications.getDefaultChannel())
                .withParam("notify_only_broken_pipelines", slackNotifications.getNotifyOnlyBrokenPipelines())
                .withParam("notify_only_default_branch", slackNotifications.getNotifyOnlyDefaultBranch())
                .withParam("push_events", slackNotifications.getPushEvents())
                .withParam("issues_events", slackNotifications.getIssuesEvents())
                .withParam("confidential_issues_events", slackNotifications.getConfidentialIssuesEvents())
                .withParam("merge_requests_events", slackNotifications.getMergeRequestsEvents())
                .withParam("tag_push_events", slackNotifications.getTagPushEvents())
                .withParam("note_events", slackNotifications.getNoteEvents())
                .withParam("confidential_note_events", slackNotifications.getConfidentialNoteEvents())
                .withParam("pipeline_events", slackNotifications.getPipelineEvents())
                .withParam("wiki_page_events", slackNotifications.getWikiPageEvents())
                .withParam("push_channel", slackNotifications.getPushChannel())
                .withParam("issue_channel", slackNotifications.getIssueChannel())
                .withParam("confidential_issue_channel", slackNotifications.getConfidentialIssueChannel())
                .withParam("merge_request_channel", slackNotifications.getMergeRequestChannel())
                .withParam("note_channel", slackNotifications.getNoteChannel())
                .withParam("confidential_note_channel", slackNotifications.getConfidentialNoteChannel())
                .withParam("tag_push_channel", slackNotifications.getTagPushChannel())
                .withParam("pipeline_channel", slackNotifications.getPipelineChannel())
                .withParam("wiki_page_channel", slackNotifications.getWikiPageChannel());
        Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "services", "slack");
        return (response.readEntity(SlackService.class));
    }
public SlackService updateSlackService ( Object projectIdOrPath , SlackService slackNotifications ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "webhook" , slackNotifications . getWebhook ( ) , true ) . withParam ( "username" , slackNotifications . getUsername ( ) ) . withParam ( "channel" , slackNotifications . getDefaultChannel ( ) ) . withParam ( "notify_only_broken_pipelines" , slackNotifications . getNotifyOnlyBrokenPipelines ( ) ) . withParam ( "notify_only_default_branch" , slackNotifications . getNotifyOnlyDefaultBranch ( ) ) . withParam ( "push_events" , slackNotifications . getPushEvents ( ) ) . withParam ( "issues_events" , slackNotifications . getIssuesEvents ( ) ) . withParam ( "confidential_issues_events" , slackNotifications . getConfidentialIssuesEvents ( ) ) . withParam ( "merge_requests_events" , slackNotifications . getMergeRequestsEvents ( ) ) . withParam ( "tag_push_events" , slackNotifications . getTagPushEvents ( ) ) . withParam ( "note_events" , slackNotifications . getNoteEvents ( ) ) . withParam ( "confidential_note_events" , slackNotifications . getConfidentialNoteEvents ( ) ) . withParam ( "pipeline_events" , slackNotifications . getPipelineEvents ( ) ) . withParam ( "wiki_page_events" , slackNotifications . getWikiPageEvents ( ) ) . withParam ( "push_channel" , slackNotifications . getPushChannel ( ) ) . withParam ( "issue_channel" , slackNotifications . getIssueChannel ( ) ) . withParam ( "confidential_issue_channel" , slackNotifications . getConfidentialIssueChannel ( ) ) . withParam ( "merge_request_channel" , slackNotifications . getMergeRequestChannel ( ) ) . withParam ( "note_channel" , slackNotifications . getNoteChannel ( ) ) . withParam ( "confidential_note_channel" , slackNotifications . getConfidentialNoteChannel ( ) ) . withParam ( "tag_push_channel" , slackNotifications . getTagPushChannel ( ) ) . withParam ( "pipeline_channel" , slackNotifications . getPipelineChannel ( ) ) . withParam ( "wiki_page_channel" , slackNotifications . getWikiPageChannel ( ) ) ; Response response = put ( Response . Status . OK , formData . asMap ( ) , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "services" , "slack" ) ; return ( response . readEntity ( SlackService . class ) ) ; }
Updates the Slack notification settings for a project.
Updates the Slack notification settings for a project .