Skip to content

Commit 8c35c87

Browse files
Update response models and related classes for risk and filter (#147)
1 parent 93106dc commit 8c35c87

30 files changed

Lines changed: 2230 additions & 1375 deletions

src/main/java/io/castle/client/model/generated/Address.java

100644100755
Lines changed: 18 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -13,54 +13,39 @@
1313

1414
package io.castle.client.model.generated;
1515

16-
import java.util.Objects;
17-
import java.util.Arrays;
18-
import com.google.gson.TypeAdapter;
19-
import com.google.gson.annotations.JsonAdapter;
2016
import com.google.gson.annotations.SerializedName;
21-
import com.google.gson.stream.JsonReader;
22-
import com.google.gson.stream.JsonWriter;
23-
import io.swagger.annotations.ApiModel;
2417
import io.swagger.annotations.ApiModelProperty;
25-
import java.io.IOException;
26-
import org.openapitools.jackson.nullable.JsonNullable;
2718

19+
import java.util.Objects;
2820
/**
2921
* Address
3022
*/
31-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-06-05T10:18:20.077062+02:00[Europe/Stockholm]")
32-
public class Address {
33-
public static final String SERIALIZED_NAME_LINE1 = "line1";
34-
@SerializedName(SERIALIZED_NAME_LINE1)
35-
private String line1;
3623

37-
public static final String SERIALIZED_NAME_LINE2 = "line2";
38-
@SerializedName(SERIALIZED_NAME_LINE2)
39-
private String line2;
24+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2025-01-20T18:58:06.855017776Z[GMT]")
25+
26+
public class Address {
27+
@SerializedName("line1")
28+
private String line1 = null;
4029

41-
public static final String SERIALIZED_NAME_CITY = "city";
42-
@SerializedName(SERIALIZED_NAME_CITY)
43-
private String city;
30+
@SerializedName("line2")
31+
private String line2 = null;
4432

45-
public static final String SERIALIZED_NAME_COUNTRY_CODE = "country_code";
46-
@SerializedName(SERIALIZED_NAME_COUNTRY_CODE)
47-
private String countryCode;
33+
@SerializedName("city")
34+
private String city = null;
4835

49-
public static final String SERIALIZED_NAME_REGION_CODE = "region_code";
50-
@SerializedName(SERIALIZED_NAME_REGION_CODE)
51-
private String regionCode;
36+
@SerializedName("country_code")
37+
private String countryCode = null;
5238

53-
public static final String SERIALIZED_NAME_POSTAL_CODE = "postal_code";
54-
@SerializedName(SERIALIZED_NAME_POSTAL_CODE)
55-
private String postalCode;
39+
@SerializedName("region_code")
40+
private String regionCode = null;
5641

57-
public static final String SERIALIZED_NAME_FINGERPRINT = "fingerprint";
58-
@SerializedName(SERIALIZED_NAME_FINGERPRINT)
59-
private String fingerprint;
42+
@SerializedName("postal_code")
43+
private String postalCode = null;
6044

45+
@SerializedName("fingerprint")
46+
private String fingerprint = null;
6147

6248
public Address line1(String line1) {
63-
6449
this.line1 = line1;
6550
return this;
6651
}
@@ -69,21 +54,16 @@ public Address line1(String line1) {
6954
* Get line1
7055
* @return line1
7156
**/
72-
@javax.annotation.Nullable
7357
@ApiModelProperty(example = "60 Rausch Street", value = "")
74-
7558
public String getLine1() {
7659
return line1;
7760
}
7861

79-
8062
public void setLine1(String line1) {
8163
this.line1 = line1;
8264
}
8365

84-
8566
public Address line2(String line2) {
86-
8767
this.line2 = line2;
8868
return this;
8969
}
@@ -92,21 +72,16 @@ public Address line2(String line2) {
9272
* Get line2
9373
* @return line2
9474
**/
95-
@javax.annotation.Nullable
9675
@ApiModelProperty(value = "")
97-
9876
public String getLine2() {
9977
return line2;
10078
}
10179

102-
10380
public void setLine2(String line2) {
10481
this.line2 = line2;
10582
}
10683

107-
10884
public Address city(String city) {
109-
11085
this.city = city;
11186
return this;
11287
}
@@ -115,21 +90,16 @@ public Address city(String city) {
11590
* Name of the city associated to this address.
11691
* @return city
11792
**/
118-
@javax.annotation.Nullable
11993
@ApiModelProperty(example = "San Francisco", value = "Name of the city associated to this address.")
120-
12194
public String getCity() {
12295
return city;
12396
}
12497

125-
12698
public void setCity(String city) {
12799
this.city = city;
128100
}
129101

130-
131102
public Address countryCode(String countryCode) {
132-
133103
this.countryCode = countryCode;
134104
return this;
135105
}
@@ -138,21 +108,16 @@ public Address countryCode(String countryCode) {
138108
* ISO-3166 country code
139109
* @return countryCode
140110
**/
141-
@javax.annotation.Nullable
142111
@ApiModelProperty(example = "US", required = true, value = "ISO-3166 country code")
143-
144112
public String getCountryCode() {
145113
return countryCode;
146114
}
147115

148-
149116
public void setCountryCode(String countryCode) {
150117
this.countryCode = countryCode;
151118
}
152119

153-
154120
public Address regionCode(String regionCode) {
155-
156121
this.regionCode = regionCode;
157122
return this;
158123
}
@@ -161,21 +126,16 @@ public Address regionCode(String regionCode) {
161126
* ISO region code
162127
* @return regionCode
163128
**/
164-
@javax.annotation.Nullable
165129
@ApiModelProperty(example = "CA", value = "ISO region code")
166-
167130
public String getRegionCode() {
168131
return regionCode;
169132
}
170133

171-
172134
public void setRegionCode(String regionCode) {
173135
this.regionCode = regionCode;
174136
}
175137

176-
177138
public Address postalCode(String postalCode) {
178-
179139
this.postalCode = postalCode;
180140
return this;
181141
}
@@ -184,21 +144,16 @@ public Address postalCode(String postalCode) {
184144
* Get postalCode
185145
* @return postalCode
186146
**/
187-
@javax.annotation.Nullable
188147
@ApiModelProperty(example = "94103", value = "")
189-
190148
public String getPostalCode() {
191149
return postalCode;
192150
}
193151

194-
195152
public void setPostalCode(String postalCode) {
196153
this.postalCode = postalCode;
197154
}
198155

199-
200156
public Address fingerprint(String fingerprint) {
201-
202157
this.fingerprint = fingerprint;
203158
return this;
204159
}
@@ -207,14 +162,11 @@ public Address fingerprint(String fingerprint) {
207162
* Get fingerprint
208163
* @return fingerprint
209164
**/
210-
@javax.annotation.Nullable
211165
@ApiModelProperty(example = "8a33j2lir9", value = "")
212-
213166
public String getFingerprint() {
214167
return fingerprint;
215168
}
216169

217-
218170
public void setFingerprint(String fingerprint) {
219171
this.fingerprint = fingerprint;
220172
}
@@ -238,23 +190,11 @@ public boolean equals(Object o) {
238190
Objects.equals(this.fingerprint, address.fingerprint);
239191
}
240192

241-
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
242-
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && a.get().getClass().isArray() ? Arrays.equals((T[])a.get(), (T[])b.get()) : Objects.equals(a.get(), b.get()));
243-
}
244-
245193
@Override
246194
public int hashCode() {
247195
return Objects.hash(line1, line2, city, countryCode, regionCode, postalCode, fingerprint);
248196
}
249197

250-
private static <T> int hashCodeNullable(JsonNullable<T> a) {
251-
if (a == null) {
252-
return 1;
253-
}
254-
return a.isPresent()
255-
? (a.get().getClass().isArray() ? Arrays.hashCode((T[])a.get()) : Objects.hashCode(a.get()))
256-
: 31;
257-
}
258198

259199
@Override
260200
public String toString() {
@@ -283,4 +223,3 @@ private String toIndentedString(Object o) {
283223
}
284224

285225
}
286-
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* Castle API
3+
* ## Introduction **Just getting started? Check out our [quick start guide](https://docs.castle.io/docs/quickstart)** Castle APIs uses standard HTTP response codes, authentication and verbs. JSON is used as data exchange format, both for parsing incoming request bodies, and in the returned response. This means that the `Content-Type` header should to be set to `application/json` in requests with a body, such as `POST` or `PUT`. All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). Non-HTTPS calls will fail and the **TLS version needs to be 1.1 or higher**. ## Supported types For a list of supported types, see our [Types Reference](https://docs.castle.io/docs/events). ## Rate limits Our APIs implement rate-limiting based on the number of requests made to them. Each request will return the following headers: - `X-RateLimit-Limit` - The maximum number of requests you're permitted to make in the current time window. - `X-RateLimit-Remaining` - The number of requests remaining in the current time window. - `X-RateLimit-Reset` - The remaining time in seconds until the current time window resets. Additionally, Our Risk, Filter (and the legacy Authenticate) APIs have a per-user-id rate limit of 6 requests per second and 10 requests per 5 seconds.
4+
*
5+
* OpenAPI spec version: 1
6+
*
7+
*
8+
* NOTE: This class is auto generated by the swagger code generator program.
9+
* https://github.com/swagger-api/swagger-codegen.git
10+
* Do not edit the class manually.
11+
*/
12+
13+
package io.castle.client.model.generated;
14+
15+
import com.google.gson.annotations.SerializedName;
16+
import io.swagger.annotations.ApiModelProperty;
17+
18+
import java.util.Objects;
19+
/**
20+
* FilterAndRiskResponseBehavior
21+
*/
22+
23+
@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2025-01-20T18:58:06.855017776Z[GMT]")
24+
25+
public class Behavior {
26+
@SerializedName("fingerprint")
27+
private String fingerprint = null;
28+
29+
public Behavior fingerprint(String fingerprint) {
30+
this.fingerprint = fingerprint;
31+
return this;
32+
}
33+
34+
/**
35+
* Get fingerprint
36+
* @return fingerprint
37+
**/
38+
@ApiModelProperty(example = "vOch_0a_fpkl1Tf-pVPuDA", value = "")
39+
public String getFingerprint() {
40+
return fingerprint;
41+
}
42+
43+
public void setFingerprint(String fingerprint) {
44+
this.fingerprint = fingerprint;
45+
}
46+
47+
48+
@Override
49+
public boolean equals(Object o) {
50+
if (this == o) {
51+
return true;
52+
}
53+
if (o == null || getClass() != o.getClass()) {
54+
return false;
55+
}
56+
Behavior behavior = (Behavior) o;
57+
return Objects.equals(this.fingerprint, behavior.fingerprint);
58+
}
59+
60+
@Override
61+
public int hashCode() {
62+
return Objects.hash(fingerprint);
63+
}
64+
65+
66+
@Override
67+
public String toString() {
68+
StringBuilder sb = new StringBuilder();
69+
sb.append("class FilterAndRiskResponseBehavior {\n");
70+
71+
sb.append(" fingerprint: ").append(toIndentedString(fingerprint)).append("\n");
72+
sb.append("}");
73+
return sb.toString();
74+
}
75+
76+
/**
77+
* Convert the given object to string with each line indented by 4 spaces
78+
* (except the first line).
79+
*/
80+
private String toIndentedString(Object o) {
81+
if (o == null) {
82+
return "null";
83+
}
84+
return o.toString().replace("\n", "\n ");
85+
}
86+
87+
}

0 commit comments

Comments
 (0)