-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e5e2e6
commit ba5ad9d
Showing
4 changed files
with
490 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
183 changes: 183 additions & 0 deletions
183
src/main/java/org/gitlab4j/api/models/WebHookParams.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
package org.gitlab4j.api.models; | ||
|
||
import java.io.Serializable; | ||
|
||
import org.gitlab4j.api.GitLabApiForm; | ||
|
||
public class WebHookParams implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
private String url; | ||
private String name; | ||
private String description; | ||
private Boolean pushEvents; | ||
private String pushEventsBranchFilter; | ||
private String branchFilterStrategy; | ||
private Boolean issuesEvents; | ||
private Boolean confidentialIssuesEvents; | ||
private Boolean mergeRequestsEvents; | ||
private Boolean tagPushEvents; | ||
private Boolean noteEvents; | ||
private Boolean confidentialNoteEvents; | ||
private Boolean jobEvents; | ||
private Boolean pipelineEvents; | ||
private Boolean wikiPageEvents; | ||
private Boolean deploymentEvents; | ||
private Boolean featureFlagEvents; | ||
private Boolean releasesEvents; | ||
private Boolean subgroupEvents; | ||
private Boolean memberEvents; | ||
private Boolean enableSslVerification; | ||
private String token; | ||
private Boolean resourceAccessTokenEvents; | ||
private String customWebhookTemplate; | ||
|
||
public GitLabApiForm getForm() { | ||
|
||
return new GitLabApiForm() | ||
.withParam("url", url, true) | ||
.withParam("name", name) | ||
.withParam("description", description) | ||
.withParam("push_events", pushEvents) | ||
.withParam("push_events_branch_filter", pushEventsBranchFilter) | ||
.withParam("branch_filter_strategy", branchFilterStrategy) | ||
.withParam("issues_events", issuesEvents) | ||
.withParam("confidential_issues_events", confidentialIssuesEvents) | ||
.withParam("merge_requests_events", mergeRequestsEvents) | ||
.withParam("tag_push_events", tagPushEvents) | ||
.withParam("note_events", noteEvents) | ||
.withParam("confidential_note_events", confidentialNoteEvents) | ||
.withParam("job_events", jobEvents) | ||
.withParam("pipeline_events", pipelineEvents) | ||
.withParam("wiki_page_events", wikiPageEvents) | ||
.withParam("deployment_events", deploymentEvents) | ||
.withParam("feature_flag_events", featureFlagEvents) | ||
.withParam("releases_events", releasesEvents) | ||
.withParam("subgroup_events", subgroupEvents) | ||
.withParam("member_events", memberEvents) | ||
.withParam("enable_ssl_verification", enableSslVerification) | ||
.withParam("token", token) | ||
.withParam("resource_access_token_events", resourceAccessTokenEvents) | ||
.withParam("custom_webhook_template", customWebhookTemplate); | ||
} | ||
|
||
public WebHookParams setBranchFilterStrategy(String branchFilterStrategy) { | ||
this.branchFilterStrategy = branchFilterStrategy; | ||
return this; | ||
} | ||
|
||
public WebHookParams setUrl(String url) { | ||
this.url = url; | ||
return this; | ||
} | ||
|
||
public WebHookParams setName(String name) { | ||
this.name = name; | ||
return this; | ||
} | ||
|
||
public WebHookParams setDescription(String description) { | ||
this.description = description; | ||
return this; | ||
} | ||
|
||
public WebHookParams setPushEvents(Boolean pushEvents) { | ||
this.pushEvents = pushEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setPushEventsBranchFilter(String pushEventsBranchFilter) { | ||
this.pushEventsBranchFilter = pushEventsBranchFilter; | ||
return this; | ||
} | ||
|
||
public WebHookParams setIssuesEvents(Boolean issuesEvents) { | ||
this.issuesEvents = issuesEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setConfidentialIssuesEvents(Boolean confidentialIssuesEvents) { | ||
this.confidentialIssuesEvents = confidentialIssuesEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setMergeRequestsEvents(Boolean mergeRequestsEvents) { | ||
this.mergeRequestsEvents = mergeRequestsEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setTagPushEvents(Boolean tagPushEvents) { | ||
this.tagPushEvents = tagPushEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setNoteEvents(Boolean noteEvents) { | ||
this.noteEvents = noteEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setConfidentialNoteEvents(Boolean confidentialNoteEvents) { | ||
this.confidentialNoteEvents = confidentialNoteEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setJobEvents(Boolean jobEvents) { | ||
this.jobEvents = jobEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setPipelineEvents(Boolean pipelineEvents) { | ||
this.pipelineEvents = pipelineEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setWikiPageEvents(Boolean wikiPageEvents) { | ||
this.wikiPageEvents = wikiPageEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setDeploymentEvents(Boolean deploymentEvents) { | ||
this.deploymentEvents = deploymentEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setFeatureFlagEvents(Boolean featureFlagEvents) { | ||
this.featureFlagEvents = featureFlagEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setReleasesEvents(Boolean releasesEvents) { | ||
this.releasesEvents = releasesEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setSubgroupEvents(Boolean subgroupEvents) { | ||
this.subgroupEvents = subgroupEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setMemberEvents(Boolean memberEvents) { | ||
this.memberEvents = memberEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setEnableSslVerification(Boolean enableSslVerification) { | ||
this.enableSslVerification = enableSslVerification; | ||
return this; | ||
} | ||
|
||
public WebHookParams setToken(String token) { | ||
this.token = token; | ||
return this; | ||
} | ||
|
||
public WebHookParams setResourceAccessTokenEvents(Boolean resourceAccessTokenEvents) { | ||
this.resourceAccessTokenEvents = resourceAccessTokenEvents; | ||
return this; | ||
} | ||
|
||
public WebHookParams setCustomWebhookTemplate(String customWebhookTemplate) { | ||
this.customWebhookTemplate = customWebhookTemplate; | ||
return this; | ||
} | ||
} |
Oops, something went wrong.