|
| 1 | +package org.gitlab4j.api.services; |
| 2 | + |
| 3 | +import javax.xml.bind.annotation.XmlAccessType; |
| 4 | +import javax.xml.bind.annotation.XmlAccessorType; |
| 5 | +import javax.xml.bind.annotation.XmlRootElement; |
| 6 | + |
| 7 | +import com.fasterxml.jackson.annotation.JsonIgnore; |
| 8 | + |
| 9 | +@XmlRootElement |
| 10 | +@XmlAccessorType(XmlAccessType.FIELD) |
| 11 | +public class HipChatService extends NotificationService { |
| 12 | + |
| 13 | + public static final String TOKEN_PROP = "token"; |
| 14 | + public static final String COLOR_PROP = "color"; |
| 15 | + public static final String NOTIFY_PROP = "notify"; |
| 16 | + public static final String ROOM_PROP = "room"; |
| 17 | + public static final String API_VERSION_PROP = "api_version"; |
| 18 | + public static final String SERVER_PROP = "server"; |
| 19 | + public static final String NOTIFY_ONLY_BROKEN_PIPELINES_PROP = "notify_only_broken_pipelines"; |
| 20 | + |
| 21 | + |
| 22 | + public HipChatService withPushEvents(Boolean pushEvents) { |
| 23 | + return withPushEvents(pushEvents, this); |
| 24 | + } |
| 25 | + |
| 26 | + public HipChatService withIssuesEvents(Boolean issuesEvents) { |
| 27 | + return withIssuesEvents(issuesEvents, this); |
| 28 | + } |
| 29 | + |
| 30 | + public HipChatService withConfidentialIssuesEvents(Boolean confidentialIssuesEvents) { |
| 31 | + return withConfidentialIssuesEvents(confidentialIssuesEvents, this); |
| 32 | + } |
| 33 | + |
| 34 | + public HipChatService withMergeRequestsEvents(Boolean mergeRequestsEvents) { |
| 35 | + return withMergeRequestsEvents(mergeRequestsEvents, this); |
| 36 | + } |
| 37 | + |
| 38 | + public HipChatService withTagPushEvents(Boolean tagPushEvents) { |
| 39 | + return withTagPushEvents(tagPushEvents, this); |
| 40 | + } |
| 41 | + |
| 42 | + public HipChatService withNoteEvents(Boolean noteEvents) { |
| 43 | + return withNoteEvents(noteEvents, this); |
| 44 | + } |
| 45 | + |
| 46 | + public HipChatService withConfidentialNoteEvents(Boolean confidentialNoteEvents) { |
| 47 | + return withConfidentialNoteEvents(confidentialNoteEvents, this); |
| 48 | + } |
| 49 | + |
| 50 | + public HipChatService withPipelineEvents(Boolean pipelineEvents) { |
| 51 | + return withPipelineEvents(pipelineEvents, this); |
| 52 | + } |
| 53 | + |
| 54 | + public HipChatService withWikiPageEvents(Boolean wikiPageEvents) { |
| 55 | + return withWikiPageEvents(wikiPageEvents, this); |
| 56 | + } |
| 57 | + |
| 58 | + public HipChatService withJobEvents(Boolean jobEvents) { |
| 59 | + return withPipelineEvents(jobEvents, this); |
| 60 | + } |
| 61 | + |
| 62 | + public String getToken() { |
| 63 | + return ((String) getProperty(TOKEN_PROP)); |
| 64 | + } |
| 65 | + |
| 66 | + public void setToken(String token) { |
| 67 | + setProperty(TOKEN_PROP, token); |
| 68 | + } |
| 69 | + |
| 70 | + public HipChatService withToken(String token) { |
| 71 | + setToken(token); |
| 72 | + return (this); |
| 73 | + } |
| 74 | + |
| 75 | + public String getColor() { |
| 76 | + return ((String) getProperty(COLOR_PROP)); |
| 77 | + } |
| 78 | + |
| 79 | + public void setColor(String color) { |
| 80 | + setProperty(COLOR_PROP, color); |
| 81 | + } |
| 82 | + |
| 83 | + public HipChatService withColor(String color) { |
| 84 | + setColor(color); |
| 85 | + return (this); |
| 86 | + } |
| 87 | + |
| 88 | + public Boolean getNotify() { |
| 89 | + return (getProperty(NOTIFY_PROP, (Boolean)null)); |
| 90 | + } |
| 91 | + |
| 92 | + public void setNotify(Boolean notify) { |
| 93 | + setProperty(NOTIFY_PROP, notify); |
| 94 | + } |
| 95 | + |
| 96 | + public HipChatService withNotify(Boolean notify) { |
| 97 | + setNotify(notify); |
| 98 | + return (this); |
| 99 | + } |
| 100 | + |
| 101 | + public String getRoom() { |
| 102 | + return ((String) getProperty(ROOM_PROP)); |
| 103 | + } |
| 104 | + |
| 105 | + public void setRoom(String room) { |
| 106 | + setProperty(ROOM_PROP, room); |
| 107 | + } |
| 108 | + |
| 109 | + public HipChatService withRoom(String room) { |
| 110 | + setRoom(room); |
| 111 | + return (this); |
| 112 | + } |
| 113 | + |
| 114 | + public String getApiVersion() { |
| 115 | + return ((String) getProperty(API_VERSION_PROP)); |
| 116 | + } |
| 117 | + |
| 118 | + public void setApiVersion(String apiVersion) { |
| 119 | + setProperty(API_VERSION_PROP, apiVersion); |
| 120 | + } |
| 121 | + |
| 122 | + public HipChatService withApiVersion(String apiVersion) { |
| 123 | + setApiVersion(apiVersion); |
| 124 | + return (this); |
| 125 | + } |
| 126 | + |
| 127 | + public String getServer() { |
| 128 | + return ((String) getProperty(SERVER_PROP)); |
| 129 | + } |
| 130 | + |
| 131 | + public void setServer(String server) { |
| 132 | + setProperty(SERVER_PROP, server); |
| 133 | + } |
| 134 | + |
| 135 | + public HipChatService withServer(String server) { |
| 136 | + setServer(server); |
| 137 | + return (this); |
| 138 | + } |
| 139 | + |
| 140 | + @JsonIgnore |
| 141 | + public Boolean getNotifyOnlyBrokenPipelines() { |
| 142 | + return ((Boolean) getProperty(NOTIFY_ONLY_BROKEN_PIPELINES_PROP, Boolean.FALSE)); |
| 143 | + } |
| 144 | + |
| 145 | + public void setNotifyOnlyBrokenPipelines(Boolean notifyOnlyBrokenPipelines) { |
| 146 | + setProperty(NOTIFY_ONLY_BROKEN_PIPELINES_PROP, notifyOnlyBrokenPipelines); |
| 147 | + } |
| 148 | + |
| 149 | + public HipChatService withNotifyOnlyBrokenPipelines(Boolean notifyOnlyBrokenPipelines) { |
| 150 | + setNotifyOnlyBrokenPipelines(notifyOnlyBrokenPipelines); |
| 151 | + return (this); |
| 152 | + } |
| 153 | +} |
0 commit comments