Skip to content

Commit 7feb0e1

Browse files
committed
Merge tag '1.27.17.34' into develop
Release 1.27.17.34
2 parents bdb1e8a + b279444 commit 7feb0e1

File tree

3 files changed

+249
-0
lines changed

3 files changed

+249
-0
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
package com.bunq.sdk.model.generated.endpoint;
2+
3+
import com.bunq.sdk.context.ApiContext;
4+
import com.bunq.sdk.exception.BunqException;
5+
import com.bunq.sdk.http.ApiClient;
6+
import com.bunq.sdk.http.BunqResponse;
7+
import com.bunq.sdk.http.BunqResponseRaw;
8+
import com.bunq.sdk.model.core.AnchorObjectInterface;
9+
import com.bunq.sdk.model.core.BunqModel;
10+
import com.bunq.sdk.model.core.MonetaryAccountReference;
11+
import com.bunq.sdk.model.generated.object.HealthCheckResult;
12+
import com.google.gson.annotations.Expose;
13+
import com.google.gson.annotations.SerializedName;
14+
import com.google.gson.stream.JsonReader;
15+
import java.math.BigDecimal;
16+
import java.util.ArrayList;
17+
import java.util.HashMap;
18+
import java.util.List;
19+
import java.util.Map;
20+
import javax.lang.model.type.NullType;
21+
22+
/**
23+
* Basic health check for uptime and instance health monitoring.
24+
*/
25+
public class HealthCheck extends BunqModel implements AnchorObjectInterface {
26+
27+
/**
28+
* Error constants.
29+
*/
30+
protected static final String ERROR_NULL_FIELDS = "All fields of an extended model or object are null.";
31+
32+
/**
33+
* Endpoint constants.
34+
*/
35+
protected static final String ENDPOINT_URL_LISTING = "health-check";
36+
37+
/**
38+
* Object type.
39+
*/
40+
protected static final String OBJECT_TYPE_GET = "HealthCheckResult";
41+
42+
/**
43+
*/
44+
@Expose
45+
@SerializedName("HealthResult")
46+
private HealthCheckResult healthResult;
47+
48+
/**
49+
*/
50+
public static BunqResponse<List<HealthCheck>> list(Map<String, String> params, Map<String, String> customHeaders) {
51+
ApiClient apiClient = new ApiClient(getApiContext());
52+
BunqResponseRaw responseRaw = apiClient.get(ENDPOINT_URL_LISTING, params, customHeaders);
53+
54+
return fromJsonList(HealthCheck.class, responseRaw, OBJECT_TYPE_GET);
55+
}
56+
57+
public static BunqResponse<List<HealthCheck>> list() {
58+
return list(null, null);
59+
}
60+
61+
public static BunqResponse<List<HealthCheck>> list(Map<String, String> params) {
62+
return list(params, null);
63+
}
64+
65+
/**
66+
*/
67+
public HealthCheckResult getHealthResult() {
68+
return this.healthResult;
69+
}
70+
71+
public void setHealthResult(HealthCheckResult healthResult) {
72+
this.healthResult = healthResult;
73+
}
74+
75+
/**
76+
*/
77+
public BunqModel getReferencedObject() {
78+
if (this.healthResult != null) {
79+
return this.healthResult;
80+
}
81+
82+
throw new BunqException(ERROR_NULL_FIELDS);
83+
}
84+
85+
/**
86+
*/
87+
public boolean isAllFieldNull() {
88+
if (this.healthResult != null) {
89+
return false;
90+
}
91+
92+
return true;
93+
}
94+
95+
/**
96+
*/
97+
public static HealthCheck fromJsonReader(JsonReader reader) {
98+
return fromJsonReader(HealthCheck.class, reader);
99+
}
100+
101+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
package com.bunq.sdk.model.generated.object;
2+
3+
import com.bunq.sdk.model.core.BunqModel;
4+
import com.bunq.sdk.model.core.MonetaryAccountReference;
5+
import com.google.gson.annotations.Expose;
6+
import com.google.gson.annotations.SerializedName;
7+
import com.google.gson.stream.JsonReader;
8+
import java.math.BigDecimal;
9+
import java.util.ArrayList;
10+
import java.util.HashMap;
11+
import java.util.List;
12+
import java.util.Map;
13+
14+
/**
15+
*/
16+
public class HealthCheckResult extends BunqModel {
17+
18+
/**
19+
* The result status of the health check.
20+
*/
21+
@Expose
22+
@SerializedName("status")
23+
private String status;
24+
25+
/**
26+
* The entries on which the current status is based.
27+
*/
28+
@Expose
29+
@SerializedName("allEntry")
30+
private List<HealthCheckResultEntry> allEntry;
31+
32+
/**
33+
* The result status of the health check.
34+
*/
35+
public String getStatus() {
36+
return this.status;
37+
}
38+
39+
public void setStatus(String status) {
40+
this.status = status;
41+
}
42+
43+
/**
44+
* The entries on which the current status is based.
45+
*/
46+
public List<HealthCheckResultEntry> getAllEntry() {
47+
return this.allEntry;
48+
}
49+
50+
public void setAllEntry(List<HealthCheckResultEntry> allEntry) {
51+
this.allEntry = allEntry;
52+
}
53+
54+
/**
55+
*/
56+
public boolean isAllFieldNull() {
57+
if (this.status != null) {
58+
return false;
59+
}
60+
61+
if (this.allEntry != null) {
62+
return false;
63+
}
64+
65+
return true;
66+
}
67+
68+
/**
69+
*/
70+
public static HealthCheckResult fromJsonReader(JsonReader reader) {
71+
return fromJsonReader(HealthCheckResult.class, reader);
72+
}
73+
74+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
package com.bunq.sdk.model.generated.object;
2+
3+
import com.bunq.sdk.model.core.BunqModel;
4+
import com.bunq.sdk.model.core.MonetaryAccountReference;
5+
import com.google.gson.annotations.Expose;
6+
import com.google.gson.annotations.SerializedName;
7+
import com.google.gson.stream.JsonReader;
8+
import java.math.BigDecimal;
9+
import java.util.ArrayList;
10+
import java.util.HashMap;
11+
import java.util.List;
12+
import java.util.Map;
13+
14+
/**
15+
*/
16+
public class HealthCheckResultEntry extends BunqModel {
17+
18+
/**
19+
* The type of HealthCheckResultEntry.
20+
*/
21+
@Expose
22+
@SerializedName("type")
23+
private String type;
24+
25+
/**
26+
* The status of the HealthCheckResultEntry
27+
*/
28+
@Expose
29+
@SerializedName("status")
30+
private String status;
31+
32+
/**
33+
* The type of HealthCheckResultEntry.
34+
*/
35+
public String getType() {
36+
return this.type;
37+
}
38+
39+
public void setType(String type) {
40+
this.type = type;
41+
}
42+
43+
/**
44+
* The status of the HealthCheckResultEntry
45+
*/
46+
public String getStatus() {
47+
return this.status;
48+
}
49+
50+
public void setStatus(String status) {
51+
this.status = status;
52+
}
53+
54+
/**
55+
*/
56+
public boolean isAllFieldNull() {
57+
if (this.type != null) {
58+
return false;
59+
}
60+
61+
if (this.status != null) {
62+
return false;
63+
}
64+
65+
return true;
66+
}
67+
68+
/**
69+
*/
70+
public static HealthCheckResultEntry fromJsonReader(JsonReader reader) {
71+
return fromJsonReader(HealthCheckResultEntry.class, reader);
72+
}
73+
74+
}

0 commit comments

Comments
 (0)