1 package com.acumenvelocity.ath.model;
2
3 import java.util.ArrayList;
4 import java.util.List;
5 import java.util.Objects;
6
7 import com.fasterxml.jackson.annotation.JsonProperty;
8
9 import io.swagger.annotations.ApiModel;
10 import io.swagger.annotations.ApiModelProperty;
11
12
13
14
15
16 @ApiModel(description = "Okapi filter configuration info.")
17 @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen", comments = "Generator version: 7.15.0")
18 public class FilterInfo {
19 @JsonProperty("id")
20 private String id;
21
22 @JsonProperty("name")
23 private String name;
24
25 @JsonProperty("description")
26 private String description;
27
28 @JsonProperty("custom")
29 private Boolean custom = false;
30
31 @JsonProperty("mime_type")
32 private String mimeType;
33
34 @JsonProperty("file_extensions")
35 private List<String> fileExtensions = new ArrayList<>();
36
37 @JsonProperty("parameters")
38 private String parameters;
39
40 @JsonProperty("parameters_format")
41 private ParametersFormat parametersFormat = ParametersFormat.FPRM;
42
43
44
45
46 public FilterInfo id(String id) {
47 this.id = id;
48 return this;
49 }
50
51 @ApiModelProperty(required = true, value = "Unique identifier for this filter configuration.")
52 @JsonProperty("id")
53 public String getId() {
54 return id;
55 }
56
57 public void setId(String id) {
58 this.id = id;
59 }
60
61
62
63
64 public FilterInfo name(String name) {
65 this.name = name;
66 return this;
67 }
68
69 @ApiModelProperty(required = true, value = "Short localizable name for this filter configuration.")
70 @JsonProperty("name")
71 public String getName() {
72 return name;
73 }
74
75 public void setName(String name) {
76 this.name = name;
77 }
78
79
80
81
82 public FilterInfo description(String description) {
83 this.description = description;
84 return this;
85 }
86
87 @ApiModelProperty(required = true, value = "Longer localizable description for this filter configuration.")
88 @JsonProperty("description")
89 public String getDescription() {
90 return description;
91 }
92
93 public void setDescription(String description) {
94 this.description = description;
95 }
96
97
98
99
100 public FilterInfo custom(Boolean custom) {
101 this.custom = custom;
102 return this;
103 }
104
105 @ApiModelProperty(value = "Flag indicating if this filter configuration is custom or pre-defined.")
106 @JsonProperty("custom")
107 public Boolean getCustom() {
108 return custom;
109 }
110
111 public void setCustom(Boolean custom) {
112 this.custom = custom;
113 }
114
115
116
117
118 public FilterInfo mimeType(String mimeType) {
119 this.mimeType = mimeType;
120 return this;
121 }
122
123 @ApiModelProperty(value = "MIME type for this filter configuration.")
124 @JsonProperty("mime_type")
125 public String getMimeType() {
126 return mimeType;
127 }
128
129 public void setMimeType(String mimeType) {
130 this.mimeType = mimeType;
131 }
132
133
134
135
136 public FilterInfo fileExtensions(List<String> fileExtensions) {
137 this.fileExtensions = fileExtensions;
138 return this;
139 }
140
141 @ApiModelProperty(example = "[\".docx\",\".doc\"]", required = true, value = "List of lower-case file extensions (dot included) corresponding to this filter configuration.")
142 @JsonProperty("file_extensions")
143 public List<String> getFileExtensions() {
144 return fileExtensions;
145 }
146
147 public void setFileExtensions(List<String> fileExtensions) {
148 this.fileExtensions = fileExtensions;
149 }
150
151
152
153
154 public FilterInfo parameters(String parameters) {
155 this.parameters = parameters;
156 return this;
157 }
158
159 @ApiModelProperty(value = "Default parameters of this filter configuration in the Okapi internal (FPRM, YAML, XML) format.")
160 @JsonProperty("parameters")
161 public String getParameters() {
162 return parameters;
163 }
164
165 public void setParameters(String parameters) {
166 this.parameters = parameters;
167 }
168
169
170
171 public FilterInfo parametersFormat(ParametersFormat parametersFormat) {
172 this.parametersFormat = parametersFormat;
173 return this;
174 }
175
176 @ApiModelProperty(value = "")
177 @JsonProperty("parameters_format")
178 public ParametersFormat getParametersFormat() {
179 return parametersFormat;
180 }
181
182 public void setParametersFormat(ParametersFormat parametersFormat) {
183 this.parametersFormat = parametersFormat;
184 }
185
186 @Override
187 public boolean equals(Object o) {
188 if (this == o) {
189 return true;
190 }
191 if (o == null || getClass() != o.getClass()) {
192 return false;
193 }
194 FilterInfo filterInfo = (FilterInfo) o;
195 return Objects.equals(id, filterInfo.id) &&
196 Objects.equals(name, filterInfo.name) &&
197 Objects.equals(description, filterInfo.description) &&
198 Objects.equals(custom, filterInfo.custom) &&
199 Objects.equals(mimeType, filterInfo.mimeType) &&
200 Objects.equals(fileExtensions, filterInfo.fileExtensions) &&
201 Objects.equals(parameters, filterInfo.parameters) &&
202 Objects.equals(parametersFormat, filterInfo.parametersFormat);
203 }
204
205 @Override
206 public int hashCode() {
207 return Objects.hash(id, name, description, custom, mimeType, fileExtensions, parameters,
208 parametersFormat);
209 }
210
211 @Override
212 public String toString() {
213 StringBuilder sb = new StringBuilder();
214 sb.append("class FilterInfo {\n");
215
216 sb.append(" id: ").append(toIndentedString(id)).append("\n");
217 sb.append(" name: ").append(toIndentedString(name)).append("\n");
218 sb.append(" description: ").append(toIndentedString(description)).append("\n");
219 sb.append(" custom: ").append(toIndentedString(custom)).append("\n");
220 sb.append(" mimeType: ").append(toIndentedString(mimeType)).append("\n");
221 sb.append(" fileExtensions: ").append(toIndentedString(fileExtensions)).append("\n");
222 sb.append(" parameters: ").append(toIndentedString(parameters)).append("\n");
223 sb.append(" parametersFormat: ").append(toIndentedString(parametersFormat)).append("\n");
224 sb.append("}");
225 return sb.toString();
226 }
227
228
229
230
231
232 private String toIndentedString(Object o) {
233 if (o == null) {
234 return "null";
235 }
236 return o.toString().replace("\n", "\n ");
237 }
238 }