Skip to content

Commit c2c90f7

Browse files
SDK regenerated by CI server [ci skip]
1 parent abf8fcc commit c2c90f7

File tree

6 files changed

+436
-3
lines changed

6 files changed

+436
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Python Cloud SDK wraps Aspose.Words Cloud API so you could seamlessly integrate
2020

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

2425

2526
## Enhancements in Version 21.8

asposewordscloud/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
from asposewordscloud.models.hyperlinks_response import HyperlinksResponse
117117
from asposewordscloud.models.image_save_options_data import ImageSaveOptionsData
118118
from asposewordscloud.models.jpeg_save_options_data import JpegSaveOptionsData
119+
from asposewordscloud.models.json_data_load_options import JsonDataLoadOptions
119120
from asposewordscloud.models.link import Link
120121
from asposewordscloud.models.link_element import LinkElement
121122
from asposewordscloud.models.list_format import ListFormat
@@ -254,4 +255,5 @@
254255
from asposewordscloud.models.xaml_fixed_save_options_data import XamlFixedSaveOptionsData
255256
from asposewordscloud.models.xaml_flow_save_options_data import XamlFlowSaveOptionsData
256257
from asposewordscloud.models.xml_color import XmlColor
258+
from asposewordscloud.models.xml_data_load_options import XmlDataLoadOptions
257259
from asposewordscloud.models.xps_save_options_data import XpsSaveOptionsData

asposewordscloud/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
from asposewordscloud.models.hyperlinks_response import HyperlinksResponse
112112
from asposewordscloud.models.image_save_options_data import ImageSaveOptionsData
113113
from asposewordscloud.models.jpeg_save_options_data import JpegSaveOptionsData
114+
from asposewordscloud.models.json_data_load_options import JsonDataLoadOptions
114115
from asposewordscloud.models.link import Link
115116
from asposewordscloud.models.link_element import LinkElement
116117
from asposewordscloud.models.list_format import ListFormat
@@ -249,4 +250,5 @@
249250
from asposewordscloud.models.xaml_fixed_save_options_data import XamlFixedSaveOptionsData
250251
from asposewordscloud.models.xaml_flow_save_options_data import XamlFlowSaveOptionsData
251252
from asposewordscloud.models.xml_color import XmlColor
253+
from asposewordscloud.models.xml_data_load_options import XmlDataLoadOptions
252254
from asposewordscloud.models.xps_save_options_data import XpsSaveOptionsData
Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
# coding: utf-8
2+
# -----------------------------------------------------------------------------------
3+
# <copyright company="Aspose" file="json_data_load_options.py">
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+
import pprint
27+
import re # noqa: F401
28+
29+
import datetime
30+
import six
31+
import json
32+
33+
34+
class JsonDataLoadOptions(object):
35+
"""Represents options for parsing JSON data.
36+
"""
37+
38+
"""
39+
Attributes:
40+
swagger_types (dict): The key is attribute name
41+
and the value is attribute type.
42+
attribute_map (dict): The key is attribute name
43+
and the value is json key in definition.
44+
"""
45+
swagger_types = {
46+
'always_generate_root_object': 'bool',
47+
'exact_date_time_parse_formats': 'list[str]',
48+
'simple_value_parse_mode': 'str'
49+
}
50+
51+
attribute_map = {
52+
'always_generate_root_object': 'AlwaysGenerateRootObject',
53+
'exact_date_time_parse_formats': 'ExactDateTimeParseFormats',
54+
'simple_value_parse_mode': 'SimpleValueParseMode'
55+
}
56+
57+
def __init__(self, always_generate_root_object=None, exact_date_time_parse_formats=None, simple_value_parse_mode=None): # noqa: E501
58+
"""JsonDataLoadOptions - a model defined in Swagger""" # noqa: E501
59+
60+
self._always_generate_root_object = None
61+
self._exact_date_time_parse_formats = None
62+
self._simple_value_parse_mode = None
63+
self.discriminator = None
64+
65+
if always_generate_root_object is not None:
66+
self.always_generate_root_object = always_generate_root_object
67+
if exact_date_time_parse_formats is not None:
68+
self.exact_date_time_parse_formats = exact_date_time_parse_formats
69+
if simple_value_parse_mode is not None:
70+
self.simple_value_parse_mode = simple_value_parse_mode
71+
72+
@property
73+
def always_generate_root_object(self):
74+
"""Gets the always_generate_root_object of this JsonDataLoadOptions. # noqa: E501
75+
76+
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. # noqa: E501
77+
78+
:return: The always_generate_root_object of this JsonDataLoadOptions. # noqa: E501
79+
:rtype: bool
80+
"""
81+
return self._always_generate_root_object
82+
83+
@always_generate_root_object.setter
84+
def always_generate_root_object(self, always_generate_root_object):
85+
"""Sets the always_generate_root_object of this JsonDataLoadOptions.
86+
87+
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. # noqa: E501
88+
89+
:param always_generate_root_object: The always_generate_root_object of this JsonDataLoadOptions. # noqa: E501
90+
:type: bool
91+
"""
92+
self._always_generate_root_object = always_generate_root_object
93+
94+
@property
95+
def exact_date_time_parse_formats(self):
96+
"""Gets the exact_date_time_parse_formats of this JsonDataLoadOptions. # noqa: E501
97+
98+
Gets or sets exact formats for parsing JSON date-time values while loading JSON. The default is null. # noqa: E501
99+
100+
:return: The exact_date_time_parse_formats of this JsonDataLoadOptions. # noqa: E501
101+
:rtype: list[str]
102+
"""
103+
return self._exact_date_time_parse_formats
104+
105+
@exact_date_time_parse_formats.setter
106+
def exact_date_time_parse_formats(self, exact_date_time_parse_formats):
107+
"""Sets the exact_date_time_parse_formats of this JsonDataLoadOptions.
108+
109+
Gets or sets exact formats for parsing JSON date-time values while loading JSON. The default is null. # noqa: E501
110+
111+
:param exact_date_time_parse_formats: The exact_date_time_parse_formats of this JsonDataLoadOptions. # noqa: E501
112+
:type: list[str]
113+
"""
114+
self._exact_date_time_parse_formats = exact_date_time_parse_formats
115+
116+
@property
117+
def simple_value_parse_mode(self):
118+
"""Gets the simple_value_parse_mode of this JsonDataLoadOptions. # noqa: E501
119+
120+
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. # noqa: E501
121+
122+
:return: The simple_value_parse_mode of this JsonDataLoadOptions. # noqa: E501
123+
:rtype: str
124+
"""
125+
return self._simple_value_parse_mode
126+
127+
@simple_value_parse_mode.setter
128+
def simple_value_parse_mode(self, simple_value_parse_mode):
129+
"""Sets the simple_value_parse_mode of this JsonDataLoadOptions.
130+
131+
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. # noqa: E501
132+
133+
:param simple_value_parse_mode: The simple_value_parse_mode of this JsonDataLoadOptions. # noqa: E501
134+
:type: str
135+
"""
136+
allowed_values = ["Loose", "Strict"] # noqa: E501
137+
if not simple_value_parse_mode.isdigit():
138+
if simple_value_parse_mode not in allowed_values:
139+
raise ValueError(
140+
"Invalid value for `simple_value_parse_mode` ({0}), must be one of {1}" # noqa: E501
141+
.format(simple_value_parse_mode, allowed_values))
142+
self._simple_value_parse_mode = simple_value_parse_mode
143+
else:
144+
self._simple_value_parse_mode = allowed_values[int(simple_value_parse_mode) if six.PY3 else long(simple_value_parse_mode)]
145+
146+
147+
def to_dict(self):
148+
"""Returns the model properties as a dict"""
149+
result = {}
150+
151+
for attr, _ in six.iteritems(self.swagger_types):
152+
value = getattr(self, attr)
153+
if value is None:
154+
continue
155+
if isinstance(value, list):
156+
result[self.attribute_map[attr]] = list(map(
157+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
158+
value
159+
))
160+
elif hasattr(value, "to_dict"):
161+
result[self.attribute_map[attr]] = value.to_dict()
162+
elif isinstance(value, dict):
163+
result[self.attribute_map[attr]] = dict(map(
164+
lambda item: (item[0], item[1].to_dict())
165+
if hasattr(item[1], "to_dict") else item,
166+
value.items()
167+
))
168+
elif isinstance(value, (datetime.datetime, datetime.date)):
169+
result[self.attribute_map[attr]] = value.isoformat()
170+
else:
171+
result[self.attribute_map[attr]] = value
172+
173+
return result
174+
175+
def to_json(self):
176+
"""Returns the model properties as a dict"""
177+
result = {}
178+
179+
for attr, _ in six.iteritems(self.swagger_types):
180+
value = getattr(self, attr)
181+
if isinstance(value, list):
182+
result[self.attribute_map[attr]] = list(map(
183+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
184+
value
185+
))
186+
elif hasattr(value, "to_dict"):
187+
result[self.attribute_map[attr]] = value.to_dict()
188+
elif isinstance(value, dict):
189+
result[self.attribute_map[attr]] = dict(map(
190+
lambda item: (item[0], item[1].to_dict())
191+
if hasattr(item[1], "to_dict") else item,
192+
value.items()
193+
))
194+
elif isinstance(value, (datetime.datetime, datetime.date)):
195+
result[self.attribute_map[attr]] = value.isoformat()
196+
else:
197+
result[self.attribute_map[attr]] = value
198+
199+
return json.dumps(result)
200+
201+
def to_str(self):
202+
"""Returns the string representation of the model"""
203+
return pprint.pformat(self.to_dict())
204+
205+
def __repr__(self):
206+
"""For `print` and `pprint`"""
207+
return self.to_str()
208+
209+
def __eq__(self, other):
210+
"""Returns true if both objects are equal"""
211+
if not isinstance(other, JsonDataLoadOptions):
212+
return False
213+
214+
return self.__dict__ == other.__dict__
215+
216+
def __ne__(self, other):
217+
"""Returns true if both objects are not equal"""
218+
return not self == other

asposewordscloud/models/report_engine_settings.py

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,29 @@ class ReportEngineSettings(object):
4646
'csv_data_load_options': 'CsvDataLoadOptions',
4747
'data_source_name': 'str',
4848
'data_source_type': 'str',
49-
'report_build_options': 'list[str]'
49+
'json_data_load_options': 'JsonDataLoadOptions',
50+
'report_build_options': 'list[str]',
51+
'xml_data_load_options': 'XmlDataLoadOptions'
5052
}
5153

5254
attribute_map = {
5355
'csv_data_load_options': 'CsvDataLoadOptions',
5456
'data_source_name': 'DataSourceName',
5557
'data_source_type': 'DataSourceType',
56-
'report_build_options': 'ReportBuildOptions'
58+
'json_data_load_options': 'JsonDataLoadOptions',
59+
'report_build_options': 'ReportBuildOptions',
60+
'xml_data_load_options': 'XmlDataLoadOptions'
5761
}
5862

59-
def __init__(self, csv_data_load_options=None, data_source_name=None, data_source_type=None, report_build_options=None): # noqa: E501
63+
def __init__(self, csv_data_load_options=None, data_source_name=None, data_source_type=None, json_data_load_options=None, report_build_options=None, xml_data_load_options=None): # noqa: E501
6064
"""ReportEngineSettings - a model defined in Swagger""" # noqa: E501
6165

6266
self._csv_data_load_options = None
6367
self._data_source_name = None
6468
self._data_source_type = None
69+
self._json_data_load_options = None
6570
self._report_build_options = None
71+
self._xml_data_load_options = None
6672
self.discriminator = None
6773

6874
if csv_data_load_options is not None:
@@ -71,8 +77,12 @@ def __init__(self, csv_data_load_options=None, data_source_name=None, data_sourc
7177
self.data_source_name = data_source_name
7278
if data_source_type is not None:
7379
self.data_source_type = data_source_type
80+
if json_data_load_options is not None:
81+
self.json_data_load_options = json_data_load_options
7482
if report_build_options is not None:
7583
self.report_build_options = report_build_options
84+
if xml_data_load_options is not None:
85+
self.xml_data_load_options = xml_data_load_options
7686

7787
@property
7888
def csv_data_load_options(self):
@@ -148,6 +158,28 @@ def data_source_type(self, data_source_type):
148158
else:
149159
self._data_source_type = allowed_values[int(data_source_type) if six.PY3 else long(data_source_type)]
150160

161+
@property
162+
def json_data_load_options(self):
163+
"""Gets the json_data_load_options of this ReportEngineSettings. # noqa: E501
164+
165+
Gets or sets the options for parsing JSON data. # noqa: E501
166+
167+
:return: The json_data_load_options of this ReportEngineSettings. # noqa: E501
168+
:rtype: JsonDataLoadOptions
169+
"""
170+
return self._json_data_load_options
171+
172+
@json_data_load_options.setter
173+
def json_data_load_options(self, json_data_load_options):
174+
"""Sets the json_data_load_options of this ReportEngineSettings.
175+
176+
Gets or sets the options for parsing JSON data. # noqa: E501
177+
178+
:param json_data_load_options: The json_data_load_options of this ReportEngineSettings. # noqa: E501
179+
:type: JsonDataLoadOptions
180+
"""
181+
self._json_data_load_options = json_data_load_options
182+
151183
@property
152184
def report_build_options(self):
153185
"""Gets the report_build_options of this ReportEngineSettings. # noqa: E501
@@ -170,6 +202,28 @@ def report_build_options(self, report_build_options):
170202
"""
171203
self._report_build_options = report_build_options
172204

205+
@property
206+
def xml_data_load_options(self):
207+
"""Gets the xml_data_load_options of this ReportEngineSettings. # noqa: E501
208+
209+
Gets or sets the options for parsing XML data. # noqa: E501
210+
211+
:return: The xml_data_load_options of this ReportEngineSettings. # noqa: E501
212+
:rtype: XmlDataLoadOptions
213+
"""
214+
return self._xml_data_load_options
215+
216+
@xml_data_load_options.setter
217+
def xml_data_load_options(self, xml_data_load_options):
218+
"""Sets the xml_data_load_options of this ReportEngineSettings.
219+
220+
Gets or sets the options for parsing XML data. # noqa: E501
221+
222+
:param xml_data_load_options: The xml_data_load_options of this ReportEngineSettings. # noqa: E501
223+
:type: XmlDataLoadOptions
224+
"""
225+
self._xml_data_load_options = xml_data_load_options
226+
173227

174228
def to_dict(self):
175229
"""Returns the model properties as a dict"""

0 commit comments

Comments
 (0)