Skip to content

Commit 6ac2ae0

Browse files
committed
Updated sources
1 parent 9266f18 commit 6ac2ae0

File tree

6 files changed

+227
-6
lines changed

6 files changed

+227
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Add following repository and dependency to your project's POM
2424
<dependency>
2525
<groupId>com.groupdocs</groupId>
2626
<artifactId>groupdocs-conversion-cloud</artifactId>
27-
<version>23.9</version>
27+
<version>23.10</version>
2828
<scope>compile</scope>
2929
</dependency>
3030
```
@@ -43,7 +43,7 @@ repositories {
4343
...
4444
dependencies {
4545
...
46-
implementation 'com.groupdocs:groupdocs-conversion-cloud:23.9'
46+
implementation 'com.groupdocs:groupdocs-conversion-cloud:23.10'
4747
}
4848
```
4949

@@ -100,7 +100,7 @@ mvn package -D maven.test.skip=true
100100

101101
Then manually install the following JARs:
102102

103-
* target/groupdocs-conversion-cloud-23.9.jar
103+
* target/groupdocs-conversion-cloud-23.10.jar
104104
* target/lib/*.jar
105105

106106
## Licensing

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>groupdocs-conversion-cloud</artifactId>
66
<packaging>jar</packaging>
77
<name>groupdocs-conversion-cloud</name>
8-
<version>23.9</version>
8+
<version>23.10</version>
99
<url>https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-java</url>
1010
<description>Java library for communicating with the GroupDocs.Conversion Cloud API</description>
1111
<scm>

simplified-pom.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.groupdocs</groupId>
77
<artifactId>groupdocs-conversion-cloud</artifactId>
8-
<version>23.9</version>
8+
<version>23.10</version>
99
<packaging>jar</packaging>
1010

1111
<name>groupdocs-conversion-cloud</name>

src/main/java/com/groupdocs/cloud/conversion/api/LicenseApi.java

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,5 +192,119 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
192192
return call;
193193
}
194194

195+
/**
196+
* Build call for getLicenseInfo
197+
* @param progressListener Progress listener
198+
* @param progressRequestListener Progress request listener
199+
* @return Call to execute
200+
* @throws ApiException If fail to serialize the request body object
201+
*/
202+
public com.squareup.okhttp.Call getLicenseInfoCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
203+
Object localVarPostBody = null;
204+
205+
// create path and map variables
206+
String localVarPath = "/conversion/license";
207+
208+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
209+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
210+
211+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
212+
213+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
214+
215+
final String[] localVarAccepts = {
216+
"application/json"
217+
};
218+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
219+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
220+
221+
final String[] localVarContentTypes = {
222+
"application/json"
223+
};
224+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
225+
localVarHeaderParams.put("Content-Type", localVarContentType);
226+
227+
if(progressListener != null) {
228+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
229+
@Override
230+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
231+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
232+
return originalResponse.newBuilder()
233+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
234+
.build();
235+
}
236+
});
237+
}
238+
239+
String[] localVarAuthNames = new String[] { "JWT" };
240+
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
241+
}
242+
243+
@SuppressWarnings("rawtypes")
244+
private com.squareup.okhttp.Call getLicenseInfoValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
245+
246+
247+
com.squareup.okhttp.Call call = getLicenseInfoCall(progressListener, progressRequestListener);
248+
return call;
249+
250+
}
251+
252+
/**
253+
* Get license information
254+
*
255+
* @return LicenseInfo
256+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
257+
*/
258+
public LicenseInfo getLicenseInfo() throws ApiException {
259+
ApiResponse<LicenseInfo> resp = getLicenseInfoWithHttpInfo();
260+
return resp.getData();
261+
}
262+
263+
/**
264+
* Get license information
265+
*
266+
* @return ApiResponse&lt;LicenseInfo&gt;
267+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
268+
*/
269+
public ApiResponse<LicenseInfo> getLicenseInfoWithHttpInfo() throws ApiException {
270+
com.squareup.okhttp.Call call = getLicenseInfoValidateBeforeCall(null, null);
271+
Type localVarReturnType = new TypeToken<LicenseInfo>(){}.getType();
272+
return apiClient.execute(call, localVarReturnType);
273+
}
274+
275+
/**
276+
* Get license information (asynchronously)
277+
*
278+
* @param callback The callback to be executed when the API call finishes
279+
* @return The request call
280+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
281+
*/
282+
public com.squareup.okhttp.Call getLicenseInfoAsync(final ApiCallback<LicenseInfo> callback) throws ApiException {
283+
284+
ProgressResponseBody.ProgressListener progressListener = null;
285+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
286+
287+
if (callback != null) {
288+
progressListener = new ProgressResponseBody.ProgressListener() {
289+
@Override
290+
public void update(long bytesRead, long contentLength, boolean done) {
291+
callback.onDownloadProgress(bytesRead, contentLength, done);
292+
}
293+
};
294+
295+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
296+
@Override
297+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
298+
callback.onUploadProgress(bytesWritten, contentLength, done);
299+
}
300+
};
301+
}
302+
303+
com.squareup.okhttp.Call call = getLicenseInfoValidateBeforeCall(progressListener, progressRequestListener);
304+
Type localVarReturnType = new TypeToken<LicenseInfo>(){}.getType();
305+
apiClient.executeAsync(call, localVarReturnType, callback);
306+
return call;
307+
}
308+
195309
}
196310

src/main/java/com/groupdocs/cloud/conversion/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public ApiClient(Configuration configuration) {
9797
this.json = new JSON();
9898

9999
// Set default User-Agent.
100-
setUserAgent("java-sdk/23.9");
100+
setUserAgent("java-sdk/23.10");
101101

102102
// Set connection timeout
103103
setConnectTimeout(configuration.getTimeout());
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/**
2+
* --------------------------------------------------------------------------------------------------------------------
3+
* <copyright company="Aspose Pty Ltd" file="LicenseInfo.java">
4+
* Copyright (c) 2003-2023 Aspose Pty Ltd
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.groupdocs.cloud.conversion.model;
29+
30+
import java.util.Objects;
31+
import com.google.gson.TypeAdapter;
32+
import com.google.gson.annotations.JsonAdapter;
33+
import com.google.gson.annotations.SerializedName;
34+
import com.google.gson.stream.JsonReader;
35+
import com.google.gson.stream.JsonWriter;
36+
import io.swagger.annotations.ApiModel;
37+
import io.swagger.annotations.ApiModelProperty;
38+
import java.io.IOException;
39+
40+
/**
41+
* Current license information
42+
*/
43+
@ApiModel(description = "Current license information")
44+
public class LicenseInfo {
45+
@SerializedName("isLicensed")
46+
private Boolean isLicensed = null;
47+
48+
public LicenseInfo isLicensed(Boolean isLicensed) {
49+
this.isLicensed = isLicensed;
50+
return this;
51+
}
52+
53+
/**
54+
* True, if license was applied and valid, otherwise False
55+
* @return isLicensed
56+
**/
57+
@ApiModelProperty(required = true, value = "True, if license was applied and valid, otherwise False")
58+
public Boolean getIsLicensed() {
59+
return isLicensed;
60+
}
61+
62+
public void setIsLicensed(Boolean isLicensed) {
63+
this.isLicensed = isLicensed;
64+
}
65+
66+
67+
@Override
68+
public boolean equals(java.lang.Object o) {
69+
if (this == o) {
70+
return true;
71+
}
72+
if (o == null || getClass() != o.getClass()) {
73+
return false;
74+
}
75+
LicenseInfo licenseInfo = (LicenseInfo) o;
76+
return Objects.equals(this.isLicensed, licenseInfo.isLicensed);
77+
}
78+
79+
@Override
80+
public int hashCode() {
81+
return Objects.hash(isLicensed);
82+
}
83+
84+
85+
@Override
86+
public String toString() {
87+
StringBuilder sb = new StringBuilder();
88+
sb.append("class LicenseInfo {\n");
89+
90+
sb.append(" isLicensed: ").append(toIndentedString(isLicensed)).append("\n");
91+
sb.append("}");
92+
return sb.toString();
93+
}
94+
95+
/**
96+
* Convert the given object to string with each line indented by 4 spaces
97+
* (except the first line).
98+
*/
99+
private String toIndentedString(java.lang.Object o) {
100+
if (o == null) {
101+
return "null";
102+
}
103+
return o.toString().replace("\n", "\n ");
104+
}
105+
106+
}
107+

0 commit comments

Comments
 (0)