|
| 1 | +package org.zendesk.client.v2.model; |
| 2 | + |
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 4 | + |
| 5 | +import java.util.Date; |
| 6 | +import java.util.List; |
| 7 | + |
| 8 | +/** |
| 9 | + * @author stephenc |
| 10 | + * @since 05/04/2013 12:03 |
| 11 | + */ |
| 12 | +public class Field { |
| 13 | + private Integer id; |
| 14 | + private String url; |
| 15 | + private String type; |
| 16 | + private String title; |
| 17 | + private String description; |
| 18 | + private Integer position; |
| 19 | + private Boolean active; |
| 20 | + private Boolean required; |
| 21 | + private Boolean collapsedForAgents; |
| 22 | + private String regexpForValidation; |
| 23 | + private String titleInPortal; |
| 24 | + private Boolean visibleInPortal; |
| 25 | + private Boolean editableInPortal; |
| 26 | + private Boolean requiredInPortal; |
| 27 | + private String tag; |
| 28 | + private Date createdAt; |
| 29 | + private Date updatedAt; |
| 30 | + private List<Option> customFieldOptions; |
| 31 | + |
| 32 | + public Boolean getActive() { |
| 33 | + return active; |
| 34 | + } |
| 35 | + |
| 36 | + public void setActive(Boolean active) { |
| 37 | + this.active = active; |
| 38 | + } |
| 39 | + |
| 40 | + @JsonProperty("collapsed_for_agents") |
| 41 | + public Boolean getCollapsedForAgents() { |
| 42 | + return collapsedForAgents; |
| 43 | + } |
| 44 | + |
| 45 | + public void setCollapsedForAgents(Boolean collapsedForAgents) { |
| 46 | + this.collapsedForAgents = collapsedForAgents; |
| 47 | + } |
| 48 | + |
| 49 | + @JsonProperty("created_at") |
| 50 | + public Date getCreatedAt() { |
| 51 | + return createdAt; |
| 52 | + } |
| 53 | + |
| 54 | + public void setCreatedAt(Date createdAt) { |
| 55 | + this.createdAt = createdAt; |
| 56 | + } |
| 57 | + |
| 58 | + @JsonProperty("custom_field_options") |
| 59 | + public List<Option> getCustomFieldOptions() { |
| 60 | + return customFieldOptions; |
| 61 | + } |
| 62 | + |
| 63 | + public void setCustomFieldOptions(List<Option> customFieldOptions) { |
| 64 | + this.customFieldOptions = customFieldOptions; |
| 65 | + } |
| 66 | + |
| 67 | + public String getDescription() { |
| 68 | + return description; |
| 69 | + } |
| 70 | + |
| 71 | + public void setDescription(String description) { |
| 72 | + this.description = description; |
| 73 | + } |
| 74 | + |
| 75 | + @JsonProperty("editable_in_portal") |
| 76 | + public Boolean getEditableInPortal() { |
| 77 | + return editableInPortal; |
| 78 | + } |
| 79 | + |
| 80 | + public void setEditableInPortal(Boolean editableInPortal) { |
| 81 | + this.editableInPortal = editableInPortal; |
| 82 | + } |
| 83 | + |
| 84 | + public Integer getId() { |
| 85 | + return id; |
| 86 | + } |
| 87 | + |
| 88 | + public void setId(Integer id) { |
| 89 | + this.id = id; |
| 90 | + } |
| 91 | + |
| 92 | + public Integer getPosition() { |
| 93 | + return position; |
| 94 | + } |
| 95 | + |
| 96 | + public void setPosition(Integer position) { |
| 97 | + this.position = position; |
| 98 | + } |
| 99 | + |
| 100 | + @JsonProperty("regexp_for_validation") |
| 101 | + public String getRegexpForValidation() { |
| 102 | + return regexpForValidation; |
| 103 | + } |
| 104 | + |
| 105 | + public void setRegexpForValidation(String regexpForValidation) { |
| 106 | + this.regexpForValidation = regexpForValidation; |
| 107 | + } |
| 108 | + |
| 109 | + public Boolean getRequired() { |
| 110 | + return required; |
| 111 | + } |
| 112 | + |
| 113 | + public void setRequired(Boolean required) { |
| 114 | + this.required = required; |
| 115 | + } |
| 116 | + |
| 117 | + @JsonProperty("required_in_portal") |
| 118 | + public Boolean getRequiredInPortal() { |
| 119 | + return requiredInPortal; |
| 120 | + } |
| 121 | + |
| 122 | + public void setRequiredInPortal(Boolean requiredInPortal) { |
| 123 | + this.requiredInPortal = requiredInPortal; |
| 124 | + } |
| 125 | + |
| 126 | + public String getTag() { |
| 127 | + return tag; |
| 128 | + } |
| 129 | + |
| 130 | + public void setTag(String tag) { |
| 131 | + this.tag = tag; |
| 132 | + } |
| 133 | + |
| 134 | + public String getTitle() { |
| 135 | + return title; |
| 136 | + } |
| 137 | + |
| 138 | + public void setTitle(String title) { |
| 139 | + this.title = title; |
| 140 | + } |
| 141 | + |
| 142 | + @JsonProperty("title_in_portal") |
| 143 | + public String getTitleInPortal() { |
| 144 | + return titleInPortal; |
| 145 | + } |
| 146 | + |
| 147 | + public void setTitleInPortal(String titleInPortal) { |
| 148 | + this.titleInPortal = titleInPortal; |
| 149 | + } |
| 150 | + |
| 151 | + public String getType() { |
| 152 | + return type; |
| 153 | + } |
| 154 | + |
| 155 | + public void setType(String type) { |
| 156 | + this.type = type; |
| 157 | + } |
| 158 | + |
| 159 | + @JsonProperty("updated_at") |
| 160 | + public Date getUpdatedAt() { |
| 161 | + return updatedAt; |
| 162 | + } |
| 163 | + |
| 164 | + public void setUpdatedAt(Date updatedAt) { |
| 165 | + this.updatedAt = updatedAt; |
| 166 | + } |
| 167 | + |
| 168 | + public String getUrl() { |
| 169 | + return url; |
| 170 | + } |
| 171 | + |
| 172 | + public void setUrl(String url) { |
| 173 | + this.url = url; |
| 174 | + } |
| 175 | + |
| 176 | + @JsonProperty("visible_in_portal") |
| 177 | + public Boolean getVisibleInPortal() { |
| 178 | + return visibleInPortal; |
| 179 | + } |
| 180 | + |
| 181 | + public void setVisibleInPortal(Boolean visibleInPortal) { |
| 182 | + this.visibleInPortal = visibleInPortal; |
| 183 | + } |
| 184 | + |
| 185 | + @Override |
| 186 | + public String toString() { |
| 187 | + final StringBuilder sb = new StringBuilder(); |
| 188 | + sb.append("Field"); |
| 189 | + sb.append("{active=").append(active); |
| 190 | + sb.append(", id=").append(id); |
| 191 | + sb.append(", url='").append(url).append('\''); |
| 192 | + sb.append(", type='").append(type).append('\''); |
| 193 | + sb.append(", title='").append(title).append('\''); |
| 194 | + sb.append(", description='").append(description).append('\''); |
| 195 | + sb.append(", position=").append(position); |
| 196 | + sb.append(", required=").append(required); |
| 197 | + sb.append(", collapsedForAgents=").append(collapsedForAgents); |
| 198 | + sb.append(", regexpForValidation='").append(regexpForValidation).append('\''); |
| 199 | + sb.append(", titleInPortal='").append(titleInPortal).append('\''); |
| 200 | + sb.append(", visibleInPortal=").append(visibleInPortal); |
| 201 | + sb.append(", editableInPortal=").append(editableInPortal); |
| 202 | + sb.append(", requiredInPortal=").append(requiredInPortal); |
| 203 | + sb.append(", tag='").append(tag).append('\''); |
| 204 | + sb.append(", createdAt=").append(createdAt); |
| 205 | + sb.append(", updatedAt=").append(updatedAt); |
| 206 | + sb.append(", customFieldOptions=").append(customFieldOptions); |
| 207 | + sb.append('}'); |
| 208 | + return sb.toString(); |
| 209 | + } |
| 210 | + |
| 211 | + private static class Option { |
| 212 | + private String name; |
| 213 | + private String value; |
| 214 | + |
| 215 | + private Option() { |
| 216 | + } |
| 217 | + |
| 218 | + private Option(String name, String value) { |
| 219 | + this.name = name; |
| 220 | + this.value = value; |
| 221 | + } |
| 222 | + |
| 223 | + public String getName() { |
| 224 | + return name; |
| 225 | + } |
| 226 | + |
| 227 | + public void setName(String name) { |
| 228 | + this.name = name; |
| 229 | + } |
| 230 | + |
| 231 | + public String getValue() { |
| 232 | + return value; |
| 233 | + } |
| 234 | + |
| 235 | + public void setValue(String value) { |
| 236 | + this.value = value; |
| 237 | + } |
| 238 | + |
| 239 | + @Override |
| 240 | + public String toString() { |
| 241 | + final StringBuilder sb = new StringBuilder(); |
| 242 | + sb.append("Option"); |
| 243 | + sb.append("{name='").append(name).append('\''); |
| 244 | + sb.append(", value='").append(value).append('\''); |
| 245 | + sb.append('}'); |
| 246 | + return sb.toString(); |
| 247 | + } |
| 248 | + } |
| 249 | +} |
0 commit comments