Skip to content

Commit 997d64d

Browse files
SDK regenerated by CI server [ci skip]
1 parent bb40413 commit 997d64d

File tree

4 files changed

+374
-2
lines changed

4 files changed

+374
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This repository contains Aspose.Words Cloud SDK for Java source code. This SDK a
1717

1818
- Removed 'GraphicsQualityOptions' image save option as it no longer supported.
1919
- Added query parameter 'displayIntermediateResults' for batch requests. If 'false', the last response in batch will be returned only. Default is 'true'
20+
- Added 'JsonDataLoadOptions' and 'XmlDataLoadOptions' to 'ReportEngineSettings'
2021

2122

2223
## Enhancements in Version 21.8
Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="JsonDataLoadOptions.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+
* Represents options for parsing JSON data.
47+
*/
48+
@ApiModel(description = "Represents options for parsing JSON data.")
49+
public class JsonDataLoadOptions {
50+
/**
51+
* Gets or sets a mode for parsing JSON simple values (null, boolean, number, integer,
52+
* and string) while loading JSON. Such a mode does not affect parsing of date-time
53+
* values. The default is Aspose.Words.Reporting.JsonSimpleValueParseMode.Loose.
54+
*/
55+
@JsonAdapter(SimpleValueParseModeEnum.Adapter.class)
56+
public enum SimpleValueParseModeEnum {
57+
LOOSE("Loose"),
58+
STRICT("Strict");
59+
60+
private String value;
61+
62+
SimpleValueParseModeEnum(String value) {
63+
this.value = value;
64+
}
65+
66+
public String getValue() {
67+
return value;
68+
}
69+
70+
@Override
71+
public String toString() {
72+
return String.valueOf(value);
73+
}
74+
75+
public static SimpleValueParseModeEnum fromValue(String text) {
76+
for (SimpleValueParseModeEnum b : SimpleValueParseModeEnum.values()) {
77+
if (String.valueOf(b.value).equals(text)) {
78+
return b;
79+
}
80+
}
81+
return null;
82+
}
83+
84+
public static class Adapter extends TypeAdapter< SimpleValueParseModeEnum > {
85+
@Override
86+
public void write(final JsonWriter jsonWriter, final SimpleValueParseModeEnum enumeration) throws IOException {
87+
jsonWriter.value(enumeration.getValue());
88+
}
89+
90+
@Override
91+
public SimpleValueParseModeEnum read(final JsonReader jsonReader) throws IOException {
92+
String value = jsonReader.nextString();
93+
return SimpleValueParseModeEnum.fromValue(String.valueOf(value));
94+
}
95+
}
96+
}
97+
98+
@SerializedName("AlwaysGenerateRootObject")
99+
private Boolean alwaysGenerateRootObject = null;
100+
101+
@SerializedName("ExactDateTimeParseFormats")
102+
private List<String> exactDateTimeParseFormats = null;
103+
104+
@SerializedName("SimpleValueParseMode")
105+
private SimpleValueParseModeEnum simpleValueParseMode = null;
106+
public JsonDataLoadOptions alwaysGenerateRootObject(Boolean alwaysGenerateRootObject) {
107+
this.alwaysGenerateRootObject = alwaysGenerateRootObject;
108+
return this;
109+
}
110+
111+
/**
112+
* Gets or sets a value indicating whether a generated data source will always contain
113+
* an object for a JSON root element. If a JSON root element contains a single complex
114+
* property, such an object is not created by default.
115+
* @return alwaysGenerateRootObject
116+
**/
117+
@ApiModelProperty(value = "Gets or sets a value indicating whether a generated data source will always contain an object for a JSON root element. If a JSON root element contains a single complex property, such an object is not created by default.")
118+
public Boolean getAlwaysGenerateRootObject() {
119+
return alwaysGenerateRootObject;
120+
}
121+
122+
public void setAlwaysGenerateRootObject(Boolean alwaysGenerateRootObject) {
123+
this.alwaysGenerateRootObject = alwaysGenerateRootObject;
124+
}
125+
126+
public JsonDataLoadOptions exactDateTimeParseFormats(List<String> exactDateTimeParseFormats) {
127+
this.exactDateTimeParseFormats = exactDateTimeParseFormats;
128+
return this;
129+
}
130+
131+
public JsonDataLoadOptions addExactDateTimeParseFormatsItem(String exactDateTimeParseFormatsItem) {
132+
if (this.exactDateTimeParseFormats == null) {
133+
this.exactDateTimeParseFormats = new ArrayList<String>();
134+
}
135+
this.exactDateTimeParseFormats.add(exactDateTimeParseFormatsItem);
136+
return this;
137+
}
138+
139+
/**
140+
* Gets or sets exact formats for parsing JSON date-time values while loading JSON.
141+
* The default is null.
142+
* @return exactDateTimeParseFormats
143+
**/
144+
@ApiModelProperty(value = "Gets or sets exact formats for parsing JSON date-time values while loading JSON. The default is null.")
145+
public List<String> getExactDateTimeParseFormats() {
146+
return exactDateTimeParseFormats;
147+
}
148+
149+
public void setExactDateTimeParseFormats(List<String> exactDateTimeParseFormats) {
150+
this.exactDateTimeParseFormats = exactDateTimeParseFormats;
151+
}
152+
153+
public JsonDataLoadOptions simpleValueParseMode(SimpleValueParseModeEnum simpleValueParseMode) {
154+
this.simpleValueParseMode = simpleValueParseMode;
155+
return this;
156+
}
157+
158+
/**
159+
* Gets or sets a mode for parsing JSON simple values (null, boolean, number, integer,
160+
* and string) while loading JSON. Such a mode does not affect parsing of date-time
161+
* values. The default is Aspose.Words.Reporting.JsonSimpleValueParseMode.Loose.
162+
* @return simpleValueParseMode
163+
**/
164+
@ApiModelProperty(value = "Gets or sets a mode for parsing JSON simple values (null, boolean, number, integer, and string) while loading JSON. Such a mode does not affect parsing of date-time values. The default is Aspose.Words.Reporting.JsonSimpleValueParseMode.Loose.")
165+
public SimpleValueParseModeEnum getSimpleValueParseMode() {
166+
return simpleValueParseMode;
167+
}
168+
169+
public void setSimpleValueParseMode(SimpleValueParseModeEnum simpleValueParseMode) {
170+
this.simpleValueParseMode = simpleValueParseMode;
171+
}
172+
173+
@Override
174+
public boolean equals(java.lang.Object o) {
175+
if (this == o) {
176+
return true;
177+
}
178+
if (o == null || getClass() != o.getClass()) {
179+
return false;
180+
}
181+
182+
JsonDataLoadOptions jsonDataLoadOptions = (JsonDataLoadOptions) o;
183+
return
184+
Objects.equals(this.alwaysGenerateRootObject, jsonDataLoadOptions.alwaysGenerateRootObject) &&
185+
Objects.equals(this.exactDateTimeParseFormats, jsonDataLoadOptions.exactDateTimeParseFormats) &&
186+
Objects.equals(this.simpleValueParseMode, jsonDataLoadOptions.simpleValueParseMode);
187+
}
188+
189+
@Override
190+
public int hashCode() {
191+
return Objects.hash(alwaysGenerateRootObject, exactDateTimeParseFormats, simpleValueParseMode);
192+
}
193+
194+
@Override
195+
public String toString() {
196+
StringBuilder sb = new StringBuilder();
197+
sb.append("class JsonDataLoadOptions {\n");
198+
sb.append(" alwaysGenerateRootObject: ").append(toIndentedString(alwaysGenerateRootObject)).append("\n");
199+
sb.append(" exactDateTimeParseFormats: ").append(toIndentedString(exactDateTimeParseFormats)).append("\n");
200+
sb.append(" simpleValueParseMode: ").append(toIndentedString(simpleValueParseMode)).append("\n");
201+
sb.append("}");
202+
return sb.toString();
203+
}
204+
205+
/**
206+
* Convert the given object to string with each line indented by 4 spaces
207+
* (except the first line).
208+
*/
209+
private String toIndentedString(java.lang.Object o) {
210+
if (o == null) {
211+
return "null";
212+
}
213+
return o.toString().replace("\n", "\n ");
214+
}
215+
}

src/main/java/com/aspose/words/cloud/model/ReportEngineSettings.java

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,14 @@ public DataSourceTypeEnum read(final JsonReader jsonReader) throws IOException {
103103
@SerializedName("DataSourceType")
104104
private DataSourceTypeEnum dataSourceType = null;
105105

106+
@SerializedName("JsonDataLoadOptions")
107+
private JsonDataLoadOptions jsonDataLoadOptions = null;
108+
106109
@SerializedName("ReportBuildOptions")
107110
private List<ReportBuildOptions> reportBuildOptions = null;
111+
112+
@SerializedName("XmlDataLoadOptions")
113+
private XmlDataLoadOptions xmlDataLoadOptions = null;
108114
public ReportEngineSettings csvDataLoadOptions(CsvDataLoadOptions csvDataLoadOptions) {
109115
this.csvDataLoadOptions = csvDataLoadOptions;
110116
return this;
@@ -159,6 +165,24 @@ public void setDataSourceType(DataSourceTypeEnum dataSourceType) {
159165
this.dataSourceType = dataSourceType;
160166
}
161167

168+
public ReportEngineSettings jsonDataLoadOptions(JsonDataLoadOptions jsonDataLoadOptions) {
169+
this.jsonDataLoadOptions = jsonDataLoadOptions;
170+
return this;
171+
}
172+
173+
/**
174+
* Gets or sets the options for parsing JSON data.
175+
* @return jsonDataLoadOptions
176+
**/
177+
@ApiModelProperty(value = "Gets or sets the options for parsing JSON data.")
178+
public JsonDataLoadOptions getJsonDataLoadOptions() {
179+
return jsonDataLoadOptions;
180+
}
181+
182+
public void setJsonDataLoadOptions(JsonDataLoadOptions jsonDataLoadOptions) {
183+
this.jsonDataLoadOptions = jsonDataLoadOptions;
184+
}
185+
162186
public ReportEngineSettings reportBuildOptions(List<ReportBuildOptions> reportBuildOptions) {
163187
this.reportBuildOptions = reportBuildOptions;
164188
return this;
@@ -185,6 +209,24 @@ public void setReportBuildOptions(List<ReportBuildOptions> reportBuildOptions) {
185209
this.reportBuildOptions = reportBuildOptions;
186210
}
187211

212+
public ReportEngineSettings xmlDataLoadOptions(XmlDataLoadOptions xmlDataLoadOptions) {
213+
this.xmlDataLoadOptions = xmlDataLoadOptions;
214+
return this;
215+
}
216+
217+
/**
218+
* Gets or sets the options for parsing XML data.
219+
* @return xmlDataLoadOptions
220+
**/
221+
@ApiModelProperty(value = "Gets or sets the options for parsing XML data.")
222+
public XmlDataLoadOptions getXmlDataLoadOptions() {
223+
return xmlDataLoadOptions;
224+
}
225+
226+
public void setXmlDataLoadOptions(XmlDataLoadOptions xmlDataLoadOptions) {
227+
this.xmlDataLoadOptions = xmlDataLoadOptions;
228+
}
229+
188230
@Override
189231
public boolean equals(java.lang.Object o) {
190232
if (this == o) {
@@ -199,12 +241,14 @@ public boolean equals(java.lang.Object o) {
199241
Objects.equals(this.csvDataLoadOptions, reportEngineSettings.csvDataLoadOptions) &&
200242
Objects.equals(this.dataSourceName, reportEngineSettings.dataSourceName) &&
201243
Objects.equals(this.dataSourceType, reportEngineSettings.dataSourceType) &&
202-
Objects.equals(this.reportBuildOptions, reportEngineSettings.reportBuildOptions);
244+
Objects.equals(this.jsonDataLoadOptions, reportEngineSettings.jsonDataLoadOptions) &&
245+
Objects.equals(this.reportBuildOptions, reportEngineSettings.reportBuildOptions) &&
246+
Objects.equals(this.xmlDataLoadOptions, reportEngineSettings.xmlDataLoadOptions);
203247
}
204248

205249
@Override
206250
public int hashCode() {
207-
return Objects.hash(csvDataLoadOptions, dataSourceName, dataSourceType, reportBuildOptions);
251+
return Objects.hash(csvDataLoadOptions, dataSourceName, dataSourceType, jsonDataLoadOptions, reportBuildOptions, xmlDataLoadOptions);
208252
}
209253

210254
@Override
@@ -214,7 +258,9 @@ public String toString() {
214258
sb.append(" csvDataLoadOptions: ").append(toIndentedString(csvDataLoadOptions)).append("\n");
215259
sb.append(" dataSourceName: ").append(toIndentedString(dataSourceName)).append("\n");
216260
sb.append(" dataSourceType: ").append(toIndentedString(dataSourceType)).append("\n");
261+
sb.append(" jsonDataLoadOptions: ").append(toIndentedString(jsonDataLoadOptions)).append("\n");
217262
sb.append(" reportBuildOptions: ").append(toIndentedString(reportBuildOptions)).append("\n");
263+
sb.append(" xmlDataLoadOptions: ").append(toIndentedString(xmlDataLoadOptions)).append("\n");
218264
sb.append("}");
219265
return sb.toString();
220266
}

0 commit comments

Comments
 (0)