Skip to content

Commit ddc29f7

Browse files
SDK regenerated by CI server [ci skip]
1 parent 6373011 commit ddc29f7

File tree

5 files changed

+535
-0
lines changed

5 files changed

+535
-0
lines changed

src/main/java/com/aspose/words/cloud/api/WordsApi.java

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10362,6 +10362,81 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
1036210362
return call;
1036310363
}
1036410364

10365+
@SuppressWarnings("rawtypes")
10366+
private com.squareup.okhttp.Call getInfoValidateBeforeCall(GetInfoRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
10367+
return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
10368+
}
10369+
10370+
/**
10371+
* Returns application info.
10372+
* @param request Request object
10373+
* @return InfoResponse
10374+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
10375+
* @throws IOException If fail to serialize the request body object
10376+
*/
10377+
public InfoResponse getInfo(GetInfoRequest request) throws ApiException, MessagingException, IOException {
10378+
try {
10379+
ApiResponse< InfoResponse > resp = getInfoWithHttpInfo(request);
10380+
return resp.getData();
10381+
}
10382+
catch (ApiException ex) {
10383+
if (ex.getCode() == apiClient.getNotAuthCode()) {
10384+
apiClient.requestToken();
10385+
ApiResponse< InfoResponse > resp = getInfoWithHttpInfo(request);
10386+
return resp.getData();
10387+
}
10388+
throw ex;
10389+
}
10390+
}
10391+
10392+
/**
10393+
* Returns application info.
10394+
* @param request Request object
10395+
* @return ApiResponse< InfoResponse >;
10396+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
10397+
* @throws IOException If fail to serialize the request body object
10398+
*/
10399+
private ApiResponse< InfoResponse > getInfoWithHttpInfo(GetInfoRequest request) throws ApiException, MessagingException, IOException {
10400+
com.squareup.okhttp.Call call = getInfoValidateBeforeCall(request, null, null);
10401+
Response response = call.execute();
10402+
InfoResponse data = request.deserializeResponse(apiClient, response);
10403+
return new ApiResponse< InfoResponse >(response.code(), response.headers().toMultimap(), data);
10404+
}
10405+
10406+
/**
10407+
* Returns application info. (asynchronously)
10408+
* @param request Request object
10409+
* @param callback The callback to be executed when the API call finishes
10410+
* @return The request call
10411+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
10412+
* @throws IOException If fail to serialize the request body object
10413+
*/
10414+
public com.squareup.okhttp.Call getInfoAsync(GetInfoRequest request, final ApiCallback< InfoResponse > callback) throws ApiException, MessagingException, IOException {
10415+
10416+
ProgressResponseBody.ProgressListener progressListener = null;
10417+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
10418+
10419+
if (callback != null) {
10420+
progressListener = new ProgressResponseBody.ProgressListener() {
10421+
@Override
10422+
public void update(long bytesRead, long contentLength, boolean done) {
10423+
callback.onDownloadProgress(bytesRead, contentLength, done);
10424+
}
10425+
};
10426+
10427+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
10428+
@Override
10429+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
10430+
callback.onUploadProgress(bytesWritten, contentLength, done);
10431+
}
10432+
};
10433+
}
10434+
10435+
com.squareup.okhttp.Call call = getInfoValidateBeforeCall(request, progressListener, progressRequestListener);
10436+
apiClient.executeAsync(call, request.getResponseType(), callback);
10437+
return call;
10438+
}
10439+
1036510440
@SuppressWarnings("rawtypes")
1036610441
private com.squareup.okhttp.Call getListValidateBeforeCall(GetListRequest request, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, IOException {
1036710442
return apiClient.buildCall(request.buildHttpRequest(apiClient, progressListener, progressRequestListener, true));
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="InfoAdditionalItem.java">
4+
* Copyright (c) 2021 Aspose.Words for Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
package com.aspose.words.cloud.model;
29+
30+
import java.util.Objects;
31+
import java.util.Arrays;
32+
import java.util.ArrayList;
33+
import java.util.List;
34+
import java.io.IOException;
35+
import org.threeten.bp.OffsetDateTime;
36+
import com.aspose.words.cloud.model.*;
37+
import com.google.gson.TypeAdapter;
38+
import com.google.gson.annotations.JsonAdapter;
39+
import com.google.gson.annotations.SerializedName;
40+
import com.google.gson.stream.JsonReader;
41+
import com.google.gson.stream.JsonWriter;
42+
import io.swagger.annotations.ApiModel;
43+
import io.swagger.annotations.ApiModelProperty;
44+
45+
/**
46+
* Info additional item.
47+
*/
48+
@ApiModel(description = "Info additional item.")
49+
public class InfoAdditionalItem {
50+
@SerializedName("Key")
51+
private String key = null;
52+
53+
@SerializedName("Value")
54+
private String value = null;
55+
public InfoAdditionalItem key(String key) {
56+
this.key = key;
57+
return this;
58+
}
59+
60+
/**
61+
* Gets or sets Key.
62+
* @return key
63+
**/
64+
@ApiModelProperty(value = "Gets or sets Key.")
65+
public String getKey() {
66+
return key;
67+
}
68+
69+
public void setKey(String key) {
70+
this.key = key;
71+
}
72+
73+
public InfoAdditionalItem value(String value) {
74+
this.value = value;
75+
return this;
76+
}
77+
78+
/**
79+
* Gets or sets Value.
80+
* @return value
81+
**/
82+
@ApiModelProperty(value = "Gets or sets Value.")
83+
public String getValue() {
84+
return value;
85+
}
86+
87+
public void setValue(String value) {
88+
this.value = value;
89+
}
90+
91+
@Override
92+
public boolean equals(java.lang.Object o) {
93+
if (this == o) {
94+
return true;
95+
}
96+
if (o == null || getClass() != o.getClass()) {
97+
return false;
98+
}
99+
100+
InfoAdditionalItem infoAdditionalItem = (InfoAdditionalItem) o;
101+
return
102+
Objects.equals(this.key, infoAdditionalItem.key) &&
103+
Objects.equals(this.value, infoAdditionalItem.value);
104+
}
105+
106+
@Override
107+
public int hashCode() {
108+
return Objects.hash(key, value);
109+
}
110+
111+
@Override
112+
public String toString() {
113+
StringBuilder sb = new StringBuilder();
114+
sb.append("class InfoAdditionalItem {\n");
115+
sb.append(" key: ").append(toIndentedString(key)).append("\n");
116+
sb.append(" value: ").append(toIndentedString(value)).append("\n");
117+
sb.append("}");
118+
return sb.toString();
119+
}
120+
121+
/**
122+
* Convert the given object to string with each line indented by 4 spaces
123+
* (except the first line).
124+
*/
125+
private String toIndentedString(java.lang.Object o) {
126+
if (o == null) {
127+
return "null";
128+
}
129+
return o.toString().replace("\n", "\n ");
130+
}
131+
}
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="InfoResponse.java">
4+
* Copyright (c) 2021 Aspose.Words for Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
package com.aspose.words.cloud.model;
29+
30+
import java.util.Objects;
31+
import java.util.Arrays;
32+
import java.util.ArrayList;
33+
import java.util.List;
34+
import java.io.IOException;
35+
import org.threeten.bp.OffsetDateTime;
36+
import com.aspose.words.cloud.model.*;
37+
import com.google.gson.TypeAdapter;
38+
import com.google.gson.annotations.JsonAdapter;
39+
import com.google.gson.annotations.SerializedName;
40+
import com.google.gson.stream.JsonReader;
41+
import com.google.gson.stream.JsonWriter;
42+
import io.swagger.annotations.ApiModel;
43+
import io.swagger.annotations.ApiModelProperty;
44+
45+
/**
46+
* Response with API info.
47+
*/
48+
@ApiModel(description = "Response with API info.")
49+
public class InfoResponse extends WordsResponse {
50+
@SerializedName("AdditionalInfo")
51+
private List<InfoAdditionalItem> additionalInfo = null;
52+
53+
@SerializedName("Name")
54+
private String name = null;
55+
56+
@SerializedName("Version")
57+
private String version = null;
58+
public InfoResponse additionalInfo(List<InfoAdditionalItem> additionalInfo) {
59+
this.additionalInfo = additionalInfo;
60+
return this;
61+
}
62+
63+
public InfoResponse addAdditionalInfoItem(InfoAdditionalItem additionalInfoItem) {
64+
if (this.additionalInfo == null) {
65+
this.additionalInfo = new ArrayList<InfoAdditionalItem>();
66+
}
67+
this.additionalInfo.add(additionalInfoItem);
68+
return this;
69+
}
70+
71+
/**
72+
* Gets or sets additional info.
73+
* @return additionalInfo
74+
**/
75+
@ApiModelProperty(value = "Gets or sets additional info.")
76+
public List<InfoAdditionalItem> getAdditionalInfo() {
77+
return additionalInfo;
78+
}
79+
80+
public void setAdditionalInfo(List<InfoAdditionalItem> additionalInfo) {
81+
this.additionalInfo = additionalInfo;
82+
}
83+
84+
public InfoResponse name(String name) {
85+
this.name = name;
86+
return this;
87+
}
88+
89+
/**
90+
* Gets or sets application name.
91+
* @return name
92+
**/
93+
@ApiModelProperty(value = "Gets or sets application name.")
94+
public String getName() {
95+
return name;
96+
}
97+
98+
public void setName(String name) {
99+
this.name = name;
100+
}
101+
102+
public InfoResponse version(String version) {
103+
this.version = version;
104+
return this;
105+
}
106+
107+
/**
108+
* Gets or sets version.
109+
* @return version
110+
**/
111+
@ApiModelProperty(value = "Gets or sets version.")
112+
public String getVersion() {
113+
return version;
114+
}
115+
116+
public void setVersion(String version) {
117+
this.version = version;
118+
}
119+
120+
@Override
121+
public boolean equals(java.lang.Object o) {
122+
if (this == o) {
123+
return true;
124+
}
125+
if (o == null || getClass() != o.getClass()) {
126+
return false;
127+
}
128+
129+
InfoResponse infoResponse = (InfoResponse) o;
130+
return
131+
Objects.equals(this.additionalInfo, infoResponse.additionalInfo) &&
132+
Objects.equals(this.name, infoResponse.name) &&
133+
Objects.equals(this.version, infoResponse.version) &&
134+
super.equals(o);
135+
}
136+
137+
@Override
138+
public int hashCode() {
139+
return Objects.hash(additionalInfo, name, version, super.hashCode());
140+
}
141+
142+
@Override
143+
public String toString() {
144+
StringBuilder sb = new StringBuilder();
145+
sb.append("class InfoResponse {\n");
146+
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
147+
sb.append(" additionalInfo: ").append(toIndentedString(additionalInfo)).append("\n");
148+
sb.append(" name: ").append(toIndentedString(name)).append("\n");
149+
sb.append(" version: ").append(toIndentedString(version)).append("\n");
150+
sb.append("}");
151+
return sb.toString();
152+
}
153+
154+
/**
155+
* Convert the given object to string with each line indented by 4 spaces
156+
* (except the first line).
157+
*/
158+
private String toIndentedString(java.lang.Object o) {
159+
if (o == null) {
160+
return "null";
161+
}
162+
return o.toString().replace("\n", "\n ");
163+
}
164+
}

0 commit comments

Comments
 (0)