Skip to content

Commit f3c17ba

Browse files
authored
Merge pull request #3 from FastReports/java-native
a new files
2 parents dc32122 + a6a0cb3 commit f3c17ba

File tree

6 files changed

+642
-0
lines changed

6 files changed

+642
-0
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
/*
2+
* FastReport Cloud
3+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4+
*
5+
* The version of the OpenAPI document: v1
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
14+
package cloud.fastreport;
15+
16+
import java.net.http.HttpHeaders;
17+
18+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
19+
public class ApiException extends Exception {
20+
private int code = 0;
21+
private HttpHeaders responseHeaders = null;
22+
private String responseBody = null;
23+
24+
public ApiException() {}
25+
26+
public ApiException(Throwable throwable) {
27+
super(throwable);
28+
}
29+
30+
public ApiException(String message) {
31+
super(message);
32+
}
33+
34+
public ApiException(String message, Throwable throwable, int code, HttpHeaders responseHeaders, String responseBody) {
35+
super(message, throwable);
36+
this.code = code;
37+
this.responseHeaders = responseHeaders;
38+
this.responseBody = responseBody;
39+
}
40+
41+
public ApiException(String message, int code, HttpHeaders responseHeaders, String responseBody) {
42+
this(message, (Throwable) null, code, responseHeaders, responseBody);
43+
}
44+
45+
public ApiException(String message, Throwable throwable, int code, HttpHeaders responseHeaders) {
46+
this(message, throwable, code, responseHeaders, null);
47+
}
48+
49+
public ApiException(int code, HttpHeaders responseHeaders, String responseBody) {
50+
this((String) null, (Throwable) null, code, responseHeaders, responseBody);
51+
}
52+
53+
public ApiException(int code, String message) {
54+
super(message);
55+
this.code = code;
56+
}
57+
58+
public ApiException(int code, String message, HttpHeaders responseHeaders, String responseBody) {
59+
this(code, message);
60+
this.responseHeaders = responseHeaders;
61+
this.responseBody = responseBody;
62+
}
63+
64+
/**
65+
* Get the HTTP status code.
66+
*
67+
* @return HTTP status code
68+
*/
69+
public int getCode() {
70+
return code;
71+
}
72+
73+
/**
74+
* Get the HTTP response headers.
75+
*
76+
* @return Headers as an HttpHeaders object
77+
*/
78+
public HttpHeaders getResponseHeaders() {
79+
return responseHeaders;
80+
}
81+
82+
/**
83+
* Get the HTTP response body.
84+
*
85+
* @return Response body in the form of string
86+
*/
87+
public String getResponseBody() {
88+
return responseBody;
89+
}
90+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
* FastReport Cloud
3+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4+
*
5+
* The version of the OpenAPI document: v1
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
14+
package cloud.fastreport;
15+
16+
import java.util.List;
17+
import java.util.Map;
18+
19+
/**
20+
* API response returned by API call.
21+
*
22+
* @param <T> The type of data that is deserialized from response body
23+
*/
24+
public class ApiResponse<T> {
25+
final private int statusCode;
26+
final private Map<String, List<String>> headers;
27+
final private T data;
28+
29+
/**
30+
* @param statusCode The status code of HTTP response
31+
* @param headers The headers of HTTP response
32+
*/
33+
public ApiResponse(int statusCode, Map<String, List<String>> headers) {
34+
this(statusCode, headers, null);
35+
}
36+
37+
/**
38+
* @param statusCode The status code of HTTP response
39+
* @param headers The headers of HTTP response
40+
* @param data The object deserialized from response bod
41+
*/
42+
public ApiResponse(int statusCode, Map<String, List<String>> headers, T data) {
43+
this.statusCode = statusCode;
44+
this.headers = headers;
45+
this.data = data;
46+
}
47+
48+
public int getStatusCode() {
49+
return statusCode;
50+
}
51+
52+
public Map<String, List<String>> getHeaders() {
53+
return headers;
54+
}
55+
56+
public T getData() {
57+
return data;
58+
}
59+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* FastReport Cloud
3+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4+
*
5+
* The version of the OpenAPI document: v1
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
14+
package cloud.fastreport;
15+
16+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
17+
public class Configuration {
18+
public static final String VERSION = "2024.1.18";
19+
20+
private static ApiClient defaultApiClient = new ApiClient();
21+
22+
/**
23+
* Get the default API client, which would be used when creating API
24+
* instances without providing an API client.
25+
*
26+
* @return Default API client
27+
*/
28+
public static ApiClient getDefaultApiClient() {
29+
return defaultApiClient;
30+
}
31+
32+
/**
33+
* Set the default API client, which would be used when creating API
34+
* instances without providing an API client.
35+
*
36+
* @param apiClient API client
37+
*/
38+
public static void setDefaultApiClient(ApiClient apiClient) {
39+
defaultApiClient = apiClient;
40+
}
41+
}

0 commit comments

Comments
 (0)