|
| 1 | +package org.gitlab4j.api.webhook; |
| 2 | + |
| 3 | +import java.util.Date; |
| 4 | + |
| 5 | +import javax.xml.bind.annotation.XmlAccessType; |
| 6 | +import javax.xml.bind.annotation.XmlAccessorType; |
| 7 | +import javax.xml.bind.annotation.XmlRootElement; |
| 8 | + |
| 9 | +import org.gitlab4j.api.utils.JacksonJson; |
| 10 | +import org.gitlab4j.api.utils.JacksonJsonEnumHelper; |
| 11 | + |
| 12 | +import com.fasterxml.jackson.annotation.JsonCreator; |
| 13 | +import com.fasterxml.jackson.annotation.JsonValue; |
| 14 | + |
| 15 | +@XmlRootElement |
| 16 | +@XmlAccessorType(XmlAccessType.FIELD) |
| 17 | +public class EventLabel { |
| 18 | + |
| 19 | + public enum LabelType { |
| 20 | + |
| 21 | + PROJECT_LABEL; |
| 22 | + |
| 23 | + private static JacksonJsonEnumHelper<LabelType> enumHelper = new JacksonJsonEnumHelper<>(LabelType.class, true, true); |
| 24 | + |
| 25 | + @JsonCreator |
| 26 | + public static LabelType forValue(String value) { |
| 27 | + return enumHelper.forValue(value); |
| 28 | + } |
| 29 | + |
| 30 | + @JsonValue |
| 31 | + public String toValue() { |
| 32 | + return (enumHelper.toString(this)); |
| 33 | + } |
| 34 | + |
| 35 | + @Override |
| 36 | + public String toString() { |
| 37 | + return (enumHelper.toString(this)); |
| 38 | + } |
| 39 | + } |
| 40 | + |
| 41 | + private Integer id; |
| 42 | + private String title; |
| 43 | + private String color; |
| 44 | + private Integer projectId; |
| 45 | + private Date createdAt; |
| 46 | + private Date updatedAt; |
| 47 | + private Boolean template; |
| 48 | + private String description; |
| 49 | + private LabelType type; |
| 50 | + private Integer groupId; |
| 51 | + |
| 52 | + public Integer getId() { |
| 53 | + return id; |
| 54 | + } |
| 55 | + |
| 56 | + public void setId(Integer id) { |
| 57 | + this.id = id; |
| 58 | + } |
| 59 | + |
| 60 | + public String getTitle() { |
| 61 | + return title; |
| 62 | + } |
| 63 | + |
| 64 | + public void setTitle(String title) { |
| 65 | + this.title = title; |
| 66 | + } |
| 67 | + |
| 68 | + public String getColor() { |
| 69 | + return color; |
| 70 | + } |
| 71 | + |
| 72 | + public void setColor(String color) { |
| 73 | + this.color = color; |
| 74 | + } |
| 75 | + |
| 76 | + public Integer getProjectId() { |
| 77 | + return projectId; |
| 78 | + } |
| 79 | + |
| 80 | + public void setProjectId(Integer projectId) { |
| 81 | + this.projectId = projectId; |
| 82 | + } |
| 83 | + |
| 84 | + public Date getCreatedAt() { |
| 85 | + return createdAt; |
| 86 | + } |
| 87 | + |
| 88 | + public void setCreatedAt(Date createdAt) { |
| 89 | + this.createdAt = createdAt; |
| 90 | + } |
| 91 | + |
| 92 | + public Date getUpdatedAt() { |
| 93 | + return updatedAt; |
| 94 | + } |
| 95 | + |
| 96 | + public void setUpdatedAt(Date updatedAt) { |
| 97 | + this.updatedAt = updatedAt; |
| 98 | + } |
| 99 | + |
| 100 | + public Boolean getTemplate() { |
| 101 | + return template; |
| 102 | + } |
| 103 | + |
| 104 | + public void setTemplate(Boolean template) { |
| 105 | + this.template = template; |
| 106 | + } |
| 107 | + |
| 108 | + public String getDescription() { |
| 109 | + return description; |
| 110 | + } |
| 111 | + |
| 112 | + public void setDescription(String description) { |
| 113 | + this.description = description; |
| 114 | + } |
| 115 | + |
| 116 | + public LabelType getType() { |
| 117 | + return type; |
| 118 | + } |
| 119 | + |
| 120 | + public void setType(LabelType type) { |
| 121 | + this.type = type; |
| 122 | + } |
| 123 | + |
| 124 | + public Integer getGroupId() { |
| 125 | + return groupId; |
| 126 | + } |
| 127 | + |
| 128 | + public void setGroupId(Integer groupId) { |
| 129 | + this.groupId = groupId; |
| 130 | + } |
| 131 | + |
| 132 | + @Override |
| 133 | + public String toString() { |
| 134 | + return (JacksonJson.toJsonString(this)); |
| 135 | + } |
| 136 | +} |
0 commit comments