From 25a8cc1342374e1f5b684909d8281b453fb4235f Mon Sep 17 00:00:00 2001 From: Greg Messner Date: Mon, 1 Jul 2019 20:23:57 -0700 Subject: [PATCH] Added withXXXX() methods. --- .../org/gitlab4j/api/models/ProjectHook.java | 138 +++++------------- 1 file changed, 38 insertions(+), 100 deletions(-) diff --git a/src/main/java/org/gitlab4j/api/models/ProjectHook.java b/src/main/java/org/gitlab4j/api/models/ProjectHook.java index 920a2743f..b28f82919 100644 --- a/src/main/java/org/gitlab4j/api/models/ProjectHook.java +++ b/src/main/java/org/gitlab4j/api/models/ProjectHook.java @@ -5,8 +5,6 @@ import org.gitlab4j.api.utils.JacksonJson; -import com.fasterxml.jackson.annotation.JsonIgnore; - public class ProjectHook { private Boolean buildEvents; @@ -181,125 +179,65 @@ public String getPushEventsBranchFilter() { public void setPushEventsBranchFilter(String pushEventsBranchFilter) { this.pushEventsBranchFilter = pushEventsBranchFilter; } - - /** - * @return the do build events flag - * @deprecated As of release 4.1.0, replaced by {@link #getBuildEvents()} - */ - @Deprecated - @JsonIgnore - public Boolean getBuild_events() { - return buildEvents; + + public ProjectHook withIssuesEvents(Boolean issuesEvents) { + this.issuesEvents = issuesEvents; + return (this); } - /** - * @param buildEvents the do build events flag - * @deprecated As of release 4.1.0, replaced by {@link #setBuildEvents(Boolean)} - */ - @Deprecated - @JsonIgnore - public void setBuild_events(Boolean buildEvents) { - this.buildEvents = buildEvents; + public ProjectHook withMergeRequestsEvents(Boolean mergeRequestsEvents) { + this.mergeRequestsEvents = mergeRequestsEvents; + return (this); } - /** - * @return the enable SSL verification flag - * @deprecated As of release 4.1.0, replaced by {@link #getEnableSslVerification()} - */ - @Deprecated - @JsonIgnore - public Boolean getEnable_ssl_verification() { - return enableSslVerification; + public ProjectHook withNoteEvents(Boolean noteEvents) { + this.noteEvents = noteEvents; + return (this); } - - /** - * @param enableSslVerification the enable SSL verification flag - * @deprecated As of release 4.1.0, replaced by {@link #setEnableSslVerification(Boolean)} - */ - @Deprecated - @JsonIgnore - public void setEnable_ssl_verification(Boolean enableSslVerification) { - this.enableSslVerification = enableSslVerification; + + public ProjectHook withJobEvents(Boolean jobEvents) { + this.jobEvents = jobEvents; + return (this); } - /** - * @return the do note events flag - * @deprecated As of release 4.1.0, replaced by {@link #getNoteEvents()} - */ - @Deprecated - @JsonIgnore - public Boolean getNote_events() { - return noteEvents; + public ProjectHook withPipelineEvents(Boolean pipelineEvents) { + this.pipelineEvents = pipelineEvents; + return (this); } - /** - * @param noteEvents the do note events flag - * @deprecated As of release 4.1.0, replaced by {@link #setNoteEvents(Boolean)} - */ - @Deprecated - @JsonIgnore - public void setNote_events(Boolean noteEvents) { - this.noteEvents = noteEvents; + public ProjectHook withPushEvents(Boolean pushEvents) { + this.pushEvents = pushEvents; + return (this); } - /** - * @return the do pipeline events flag - * @deprecated As of release 4.1.0, replaced by {@link #getPipelineEvents()} - */ - @Deprecated - @JsonIgnore - public Boolean getPipeline_events() { - return pipelineEvents; + public ProjectHook withTagPushEvents(Boolean tagPushEvents) { + this.tagPushEvents = tagPushEvents; + return (this); } - /** - * @param pipelineEvents the do pipeline events flag - * @deprecated As of release 4.1.0, replaced by {@link #setPipelineEvents(Boolean)} - */ - @Deprecated - @JsonIgnore - public void setPipeline_events(Boolean pipelineEvents) { - this.pipelineEvents = pipelineEvents; + public ProjectHook withWikiPageEvents(Boolean wikiPageEvents) { + this.wikiPageEvents = wikiPageEvents; + return (this); } - /** - * @return the do tag push events flag - * @deprecated As of release 4.1.0, replaced by {@link #getTagPushEvents()} - */ - @Deprecated - @JsonIgnore - public Boolean getTag_push_events() { - return tagPushEvents; + public ProjectHook withRepositoryUpdateEvents(Boolean repositoryUpdateEvents) { + this.repositoryUpdateEvents = repositoryUpdateEvents; + return (this); } - /** - * @param tagPushEvents the do tag push events flag - * @deprecated As of release 4.1.0, replaced by {@link #setTagPushEvents(Boolean)} - */ - @Deprecated - @JsonIgnore - public void setTag_push_events(Boolean tagPushEvents) { - this.tagPushEvents = tagPushEvents; + public ProjectHook withConfidentialIssuesEvents(Boolean confidentialIssuesEvents) { + this.confidentialIssuesEvents = confidentialIssuesEvents; + return (this); } - /** - * @return the do wiki page events flag - * @deprecated As of release 4.1.0, replaced by {@link #getWikiPageEvents()} - */ - @Deprecated - @JsonIgnore - public Boolean getWiki_page_events() { - return wikiPageEvents; + public ProjectHook withConfidentialNoteEvents(Boolean confidentialNoteEvents) { + this.confidentialNoteEvents = confidentialNoteEvents; + return (this); } - /** - * @param wikiPageEvents the do wiki page events flag - * @deprecated As of release 4.1.0, replaced by {@link #setWikiPageEvents(Boolean)} - */ - @Deprecated - @JsonIgnore - public void setWiki_page_events(Boolean wikiPageEvents) { - this.wikiPageEvents = wikiPageEvents; + public ProjectHook withPushEventsBranchFilter(String pushEventsBranchFilter) { + this.pushEventsBranchFilter = pushEventsBranchFilter; + return (this); } @Override