Skip to content

Commit 38396ff

Browse files
authored
Add java constructor, default equal and hashcode methods on no response (#639)
1 parent 1a49575 commit 38396ff

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/main/resources/twilio-java/responseModel.mustache

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,16 @@
5959
return Objects.hash({{#vars}}{{{name}}}{{^-last}}, {{/-last}}{{/vars}});
6060
}
6161
{{/responseModel}}
62+
{{^responseModel}}
63+
@JsonCreator
64+
private {{apiName}}() {
65+
}
66+
@Override
67+
public boolean equals(Object obj) {
68+
return obj != null && obj.getClass() == this.getClass();
69+
}
70+
@Override
71+
public int hashCode() {
72+
return 1;
73+
}
74+
{{/responseModel}}

0 commit comments

Comments
 (0)