Skip to content

Commit 7c54828

Browse files
committed
Add Code Review Changes
1 parent 9f7d683 commit 7c54828

File tree

9 files changed

+409
-88
lines changed

9 files changed

+409
-88
lines changed
+21-21
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222

23-
public class ConfigurationDTO {
23+
public class GatewayConfigurationDTO {
2424

2525
private String name = null;
2626
private String label = null;
@@ -34,7 +34,7 @@ public class ConfigurationDTO {
3434

3535
/**
3636
**/
37-
public ConfigurationDTO name(String name) {
37+
public GatewayConfigurationDTO name(String name) {
3838
this.name = name;
3939
return this;
4040
}
@@ -51,7 +51,7 @@ public void setName(String name) {
5151

5252
/**
5353
**/
54-
public ConfigurationDTO label(String label) {
54+
public GatewayConfigurationDTO label(String label) {
5555
this.label = label;
5656
return this;
5757
}
@@ -68,7 +68,7 @@ public void setLabel(String label) {
6868

6969
/**
7070
**/
71-
public ConfigurationDTO type(String type) {
71+
public GatewayConfigurationDTO type(String type) {
7272
this.type = type;
7373
return this;
7474
}
@@ -85,7 +85,7 @@ public void setType(String type) {
8585

8686
/**
8787
**/
88-
public ConfigurationDTO required(Boolean required) {
88+
public GatewayConfigurationDTO required(Boolean required) {
8989
this.required = required;
9090
return this;
9191
}
@@ -102,7 +102,7 @@ public void setRequired(Boolean required) {
102102

103103
/**
104104
**/
105-
public ConfigurationDTO mask(Boolean mask) {
105+
public GatewayConfigurationDTO mask(Boolean mask) {
106106
this.mask = mask;
107107
return this;
108108
}
@@ -119,7 +119,7 @@ public void setMask(Boolean mask) {
119119

120120
/**
121121
**/
122-
public ConfigurationDTO multiple(Boolean multiple) {
122+
public GatewayConfigurationDTO multiple(Boolean multiple) {
123123
this.multiple = multiple;
124124
return this;
125125
}
@@ -136,7 +136,7 @@ public void setMultiple(Boolean multiple) {
136136

137137
/**
138138
**/
139-
public ConfigurationDTO tooltip(String tooltip) {
139+
public GatewayConfigurationDTO tooltip(String tooltip) {
140140
this.tooltip = tooltip;
141141
return this;
142142
}
@@ -153,7 +153,7 @@ public void setTooltip(String tooltip) {
153153

154154
/**
155155
**/
156-
public ConfigurationDTO _default(Object _default) {
156+
public GatewayConfigurationDTO _default(Object _default) {
157157
this._default = _default;
158158
return this;
159159
}
@@ -171,7 +171,7 @@ public void setDefault(Object _default) {
171171

172172
/**
173173
**/
174-
public ConfigurationDTO values(List<Object> values) {
174+
public GatewayConfigurationDTO values(List<Object> values) {
175175
this.values = values;
176176
return this;
177177
}
@@ -195,16 +195,16 @@ public boolean equals(java.lang.Object o) {
195195
if (o == null || getClass() != o.getClass()) {
196196
return false;
197197
}
198-
ConfigurationDTO _configuration = (ConfigurationDTO) o;
199-
return Objects.equals(name, _configuration.name) &&
200-
Objects.equals(label, _configuration.label) &&
201-
Objects.equals(type, _configuration.type) &&
202-
Objects.equals(required, _configuration.required) &&
203-
Objects.equals(mask, _configuration.mask) &&
204-
Objects.equals(multiple, _configuration.multiple) &&
205-
Objects.equals(tooltip, _configuration.tooltip) &&
206-
Objects.equals(_default, _configuration._default) &&
207-
Objects.equals(values, _configuration.values);
198+
GatewayConfigurationDTO gatewayConfiguration = (GatewayConfigurationDTO) o;
199+
return Objects.equals(name, gatewayConfiguration.name) &&
200+
Objects.equals(label, gatewayConfiguration.label) &&
201+
Objects.equals(type, gatewayConfiguration.type) &&
202+
Objects.equals(required, gatewayConfiguration.required) &&
203+
Objects.equals(mask, gatewayConfiguration.mask) &&
204+
Objects.equals(multiple, gatewayConfiguration.multiple) &&
205+
Objects.equals(tooltip, gatewayConfiguration.tooltip) &&
206+
Objects.equals(_default, gatewayConfiguration._default) &&
207+
Objects.equals(values, gatewayConfiguration.values);
208208
}
209209

210210
@Override
@@ -215,7 +215,7 @@ public int hashCode() {
215215
@Override
216216
public String toString() {
217217
StringBuilder sb = new StringBuilder();
218-
sb.append("class ConfigurationDTO {\n");
218+
sb.append("class GatewayConfigurationDTO {\n");
219219

220220
sb.append(" name: ").append(toIndentedString(name)).append("\n");
221221
sb.append(" label: ").append(toIndentedString(label)).append("\n");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
package org.wso2.carbon.apimgt.rest.api.admin.v1.dto;
2+
3+
import com.fasterxml.jackson.annotation.JsonProperty;
4+
import com.fasterxml.jackson.annotation.JsonCreator;
5+
import io.swagger.annotations.ApiModel;
6+
import io.swagger.annotations.ApiModelProperty;
7+
import java.util.ArrayList;
8+
import java.util.List;
9+
import javax.validation.constraints.*;
10+
11+
12+
import io.swagger.annotations.*;
13+
import java.util.Objects;
14+
15+
import javax.xml.bind.annotation.*;
16+
import org.wso2.carbon.apimgt.rest.api.common.annotations.Scope;
17+
import com.fasterxml.jackson.annotation.JsonCreator;
18+
19+
import javax.validation.Valid;
20+
21+
22+
23+
public class KeyManagerConfigurationDTO {
24+
25+
private String name = null;
26+
private String label = null;
27+
private String type = null;
28+
private Boolean required = null;
29+
private Boolean mask = null;
30+
private Boolean multiple = null;
31+
private String tooltip = null;
32+
private Object _default = null;
33+
private List<Object> values = new ArrayList<Object>();
34+
35+
/**
36+
**/
37+
public KeyManagerConfigurationDTO name(String name) {
38+
this.name = name;
39+
return this;
40+
}
41+
42+
43+
@ApiModelProperty(example = "consumer_key", value = "")
44+
@JsonProperty("name")
45+
public String getName() {
46+
return name;
47+
}
48+
public void setName(String name) {
49+
this.name = name;
50+
}
51+
52+
/**
53+
**/
54+
public KeyManagerConfigurationDTO label(String label) {
55+
this.label = label;
56+
return this;
57+
}
58+
59+
60+
@ApiModelProperty(example = "Consumer Key", value = "")
61+
@JsonProperty("label")
62+
public String getLabel() {
63+
return label;
64+
}
65+
public void setLabel(String label) {
66+
this.label = label;
67+
}
68+
69+
/**
70+
**/
71+
public KeyManagerConfigurationDTO type(String type) {
72+
this.type = type;
73+
return this;
74+
}
75+
76+
77+
@ApiModelProperty(example = "select", value = "")
78+
@JsonProperty("type")
79+
public String getType() {
80+
return type;
81+
}
82+
public void setType(String type) {
83+
this.type = type;
84+
}
85+
86+
/**
87+
**/
88+
public KeyManagerConfigurationDTO required(Boolean required) {
89+
this.required = required;
90+
return this;
91+
}
92+
93+
94+
@ApiModelProperty(example = "true", value = "")
95+
@JsonProperty("required")
96+
public Boolean isRequired() {
97+
return required;
98+
}
99+
public void setRequired(Boolean required) {
100+
this.required = required;
101+
}
102+
103+
/**
104+
**/
105+
public KeyManagerConfigurationDTO mask(Boolean mask) {
106+
this.mask = mask;
107+
return this;
108+
}
109+
110+
111+
@ApiModelProperty(example = "true", value = "")
112+
@JsonProperty("mask")
113+
public Boolean isMask() {
114+
return mask;
115+
}
116+
public void setMask(Boolean mask) {
117+
this.mask = mask;
118+
}
119+
120+
/**
121+
**/
122+
public KeyManagerConfigurationDTO multiple(Boolean multiple) {
123+
this.multiple = multiple;
124+
return this;
125+
}
126+
127+
128+
@ApiModelProperty(example = "true", value = "")
129+
@JsonProperty("multiple")
130+
public Boolean isMultiple() {
131+
return multiple;
132+
}
133+
public void setMultiple(Boolean multiple) {
134+
this.multiple = multiple;
135+
}
136+
137+
/**
138+
**/
139+
public KeyManagerConfigurationDTO tooltip(String tooltip) {
140+
this.tooltip = tooltip;
141+
return this;
142+
}
143+
144+
145+
@ApiModelProperty(example = "Enter username to connect to key manager", value = "")
146+
@JsonProperty("tooltip")
147+
public String getTooltip() {
148+
return tooltip;
149+
}
150+
public void setTooltip(String tooltip) {
151+
this.tooltip = tooltip;
152+
}
153+
154+
/**
155+
**/
156+
public KeyManagerConfigurationDTO _default(Object _default) {
157+
this._default = _default;
158+
return this;
159+
}
160+
161+
162+
@ApiModelProperty(example = "admin", value = "")
163+
@Valid
164+
@JsonProperty("default")
165+
public Object getDefault() {
166+
return _default;
167+
}
168+
public void setDefault(Object _default) {
169+
this._default = _default;
170+
}
171+
172+
/**
173+
**/
174+
public KeyManagerConfigurationDTO values(List<Object> values) {
175+
this.values = values;
176+
return this;
177+
}
178+
179+
180+
@ApiModelProperty(value = "")
181+
@JsonProperty("values")
182+
public List<Object> getValues() {
183+
return values;
184+
}
185+
public void setValues(List<Object> values) {
186+
this.values = values;
187+
}
188+
189+
190+
@Override
191+
public boolean equals(java.lang.Object o) {
192+
if (this == o) {
193+
return true;
194+
}
195+
if (o == null || getClass() != o.getClass()) {
196+
return false;
197+
}
198+
KeyManagerConfigurationDTO keyManagerConfiguration = (KeyManagerConfigurationDTO) o;
199+
return Objects.equals(name, keyManagerConfiguration.name) &&
200+
Objects.equals(label, keyManagerConfiguration.label) &&
201+
Objects.equals(type, keyManagerConfiguration.type) &&
202+
Objects.equals(required, keyManagerConfiguration.required) &&
203+
Objects.equals(mask, keyManagerConfiguration.mask) &&
204+
Objects.equals(multiple, keyManagerConfiguration.multiple) &&
205+
Objects.equals(tooltip, keyManagerConfiguration.tooltip) &&
206+
Objects.equals(_default, keyManagerConfiguration._default) &&
207+
Objects.equals(values, keyManagerConfiguration.values);
208+
}
209+
210+
@Override
211+
public int hashCode() {
212+
return Objects.hash(name, label, type, required, mask, multiple, tooltip, _default, values);
213+
}
214+
215+
@Override
216+
public String toString() {
217+
StringBuilder sb = new StringBuilder();
218+
sb.append("class KeyManagerConfigurationDTO {\n");
219+
220+
sb.append(" name: ").append(toIndentedString(name)).append("\n");
221+
sb.append(" label: ").append(toIndentedString(label)).append("\n");
222+
sb.append(" type: ").append(toIndentedString(type)).append("\n");
223+
sb.append(" required: ").append(toIndentedString(required)).append("\n");
224+
sb.append(" mask: ").append(toIndentedString(mask)).append("\n");
225+
sb.append(" multiple: ").append(toIndentedString(multiple)).append("\n");
226+
sb.append(" tooltip: ").append(toIndentedString(tooltip)).append("\n");
227+
sb.append(" _default: ").append(toIndentedString(_default)).append("\n");
228+
sb.append(" values: ").append(toIndentedString(values)).append("\n");
229+
sb.append("}");
230+
return sb.toString();
231+
}
232+
233+
/**
234+
* Convert the given object to string with each line indented by 4 spaces
235+
* (except the first line).
236+
*/
237+
private String toIndentedString(java.lang.Object o) {
238+
if (o == null) {
239+
return "null";
240+
}
241+
return o.toString().replace("\n", "\n ");
242+
}
243+
}
244+

0 commit comments

Comments
 (0)