Skip to content

Commit 09acc9b

Browse files
committed
CELLSCLOUD-10134 Update SDKs for CellsRanges_GetWorksheetCellsRangeValue
fix inheritance deserialization issue
1 parent 443976a commit 09acc9b

File tree

219 files changed

+2543
-1669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+2543
-1669
lines changed

asposecellscloud/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
from .models.pivot_table_response import PivotTableResponse
181181
from .models.pivot_tables import PivotTables
182182
from .models.pivot_tables_response import PivotTablesResponse
183+
from .models.range_value_response import RangeValueResponse
183184
from .models.ranges_response import RangesResponse
184185
from .models.row import Row
185186
from .models.row_response import RowResponse

asposecellscloud/api_client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -619,15 +619,17 @@ def __deserialize_model(self, data, klass):
619619
:param klass: class literal.
620620
:return: model object.
621621
"""
622-
if not klass.swagger_types:
622+
swagger_types = klass.get_swagger_types()
623+
attribute_map = klass.get_attribute_map()
624+
if not swagger_types:
623625
return data
624626

625627
kwargs = {}
626-
for attr, attr_type in iteritems(klass.swagger_types):
628+
for attr, attr_type in iteritems(swagger_types):
627629
if data is not None \
628-
and klass.attribute_map[attr] in data \
630+
and attribute_map[attr] in data \
629631
and isinstance(data, (list, dict)):
630-
value = data[klass.attribute_map[attr]]
632+
value = data[attribute_map[attr]]
631633
kwargs[attr] = self.__deserialize(value, attr_type)
632634

633635
instance = klass(**kwargs)

asposecellscloud/apis/cells_ranges_api.py

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,141 @@ def __init__(self, api_client=None):
4040
config.api_client = ApiClient()
4141
self.api_client = config.api_client
4242

43+
def cells_ranges_get_worksheet_cells_range_value(self, name, sheet_name, **kwargs):
44+
"""
45+
Get cells list in a range by range name or row column indexes
46+
This method makes a synchronous HTTP request by default. To make an
47+
asynchronous HTTP request, please define a `callback` function
48+
to be invoked when receiving the response.
49+
>>> def callback_function(response):
50+
>>> pprint(response)
51+
>>>
52+
>>> thread = api.cells_ranges_get_worksheet_cells_range_value(name, sheet_name, callback=callback_function)
53+
54+
:param callback function: The callback function
55+
for asynchronous request. (optional)
56+
:param str name: workbook name (required)
57+
:param str sheet_name: worksheet name (required)
58+
:param str namerange: range name, for example: 'A1:B2' or 'range_name1'
59+
:param int first_row: the first row of the range
60+
:param int first_column: the first column of the range
61+
:param int row_count: the count of rows in the range
62+
:param int column_count: the count of columns in the range
63+
:param str folder: Workbook folder.
64+
:return: RangeValueResponse
65+
If the method is called asynchronously,
66+
returns the request thread.
67+
"""
68+
kwargs['_return_http_data_only'] = True
69+
if kwargs.get('callback'):
70+
return self.cells_ranges_get_worksheet_cells_range_value_with_http_info(name, sheet_name, **kwargs)
71+
else:
72+
(data) = self.cells_ranges_get_worksheet_cells_range_value_with_http_info(name, sheet_name, **kwargs)
73+
return data
74+
75+
def cells_ranges_get_worksheet_cells_range_value_with_http_info(self, name, sheet_name, **kwargs):
76+
"""
77+
Get cells list in a range by range name or row column indexes
78+
This method makes a synchronous HTTP request by default. To make an
79+
asynchronous HTTP request, please define a `callback` function
80+
to be invoked when receiving the response.
81+
>>> def callback_function(response):
82+
>>> pprint(response)
83+
>>>
84+
>>> thread = api.cells_ranges_get_worksheet_cells_range_value_with_http_info(name, sheet_name, callback=callback_function)
85+
86+
:param callback function: The callback function
87+
for asynchronous request. (optional)
88+
:param str name: workbook name (required)
89+
:param str sheet_name: worksheet name (required)
90+
:param str namerange: range name, for example: 'A1:B2' or 'range_name1'
91+
:param int first_row: the first row of the range
92+
:param int first_column: the first column of the range
93+
:param int row_count: the count of rows in the range
94+
:param int column_count: the count of columns in the range
95+
:param str folder: Workbook folder.
96+
:return: RangeValueResponse
97+
If the method is called asynchronously,
98+
returns the request thread.
99+
"""
100+
101+
all_params = ['name', 'sheet_name', 'namerange', 'first_row', 'first_column', 'row_count', 'column_count', 'folder']
102+
all_params.append('callback')
103+
all_params.append('_return_http_data_only')
104+
all_params.append('_preload_content')
105+
all_params.append('_request_timeout')
106+
107+
params = locals()
108+
for key, val in iteritems(params['kwargs']):
109+
if key not in all_params:
110+
raise TypeError(
111+
"Got an unexpected keyword argument '%s'"
112+
" to method cells_ranges_get_worksheet_cells_range_value" % key
113+
)
114+
params[key] = val
115+
del params['kwargs']
116+
# verify the required parameter 'name' is set
117+
if ('name' not in params) or (params['name'] is None):
118+
raise ValueError("Missing the required parameter `name` when calling `cells_ranges_get_worksheet_cells_range_value`")
119+
# verify the required parameter 'sheet_name' is set
120+
if ('sheet_name' not in params) or (params['sheet_name'] is None):
121+
raise ValueError("Missing the required parameter `sheet_name` when calling `cells_ranges_get_worksheet_cells_range_value`")
122+
123+
124+
collection_formats = {}
125+
126+
path_params = {}
127+
if 'name' in params:
128+
path_params['name'] = params['name']
129+
if 'sheet_name' in params:
130+
path_params['sheetName'] = params['sheet_name']
131+
132+
query_params = []
133+
if 'namerange' in params:
134+
query_params.append(('namerange', params['namerange']))
135+
if 'first_row' in params:
136+
query_params.append(('firstRow', params['first_row']))
137+
if 'first_column' in params:
138+
query_params.append(('firstColumn', params['first_column']))
139+
if 'row_count' in params:
140+
query_params.append(('rowCount', params['row_count']))
141+
if 'column_count' in params:
142+
query_params.append(('columnCount', params['column_count']))
143+
if 'folder' in params:
144+
query_params.append(('folder', params['folder']))
145+
146+
header_params = {}
147+
148+
form_params = []
149+
local_var_files = {}
150+
151+
body_params = None
152+
# HTTP header `Accept`
153+
header_params['Accept'] = self.api_client.\
154+
select_header_accept(['application/json'])
155+
156+
# HTTP header `Content-Type`
157+
header_params['Content-Type'] = self.api_client.\
158+
select_header_content_type(['application/json'])
159+
160+
# Authentication setting
161+
auth_settings = []
162+
163+
return self.api_client.call_api('/cells/{name}/worksheets/{sheetName}/ranges/value', 'GET',
164+
path_params,
165+
query_params,
166+
header_params,
167+
body=body_params,
168+
post_params=form_params,
169+
files=local_var_files,
170+
response_type='RangeValueResponse',
171+
auth_settings=auth_settings,
172+
callback=params.get('callback'),
173+
_return_http_data_only=params.get('_return_http_data_only'),
174+
_preload_content=params.get('_preload_content', True),
175+
_request_timeout=params.get('_request_timeout'),
176+
collection_formats=collection_formats)
177+
43178
def cells_ranges_post_worksheet_cells_range_column_width(self, name, sheet_name, value, **kwargs):
44179
"""
45180
Set column width of range

asposecellscloud/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
from .pivot_table_response import PivotTableResponse
181181
from .pivot_tables import PivotTables
182182
from .pivot_tables_response import PivotTablesResponse
183+
from .range_value_response import RangeValueResponse
183184
from .ranges_response import RangesResponse
184185
from .row import Row
185186
from .row_response import RowResponse

asposecellscloud/models/above_average.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,25 @@ class AboveAverage(object):
4242
'std_dev': 'StdDev'
4343
}
4444

45-
def get_swagger_types(self):
45+
@staticmethod
46+
def get_swagger_types():
4647
return AboveAverage.swagger_types
47-
48-
def get_attribute_map(self):
49-
return AboveAverage.attribute_map
5048

51-
"""
52-
Associative dict for storing property values
53-
"""
54-
container = {}
49+
@staticmethod
50+
def get_attribute_map():
51+
return AboveAverage.attribute_map
5552

5653
def get_from_container(self, attr):
5754
if attr in self.container:
5855
return self.container[attr]
5956
return None
6057

61-
def __init__(self, is_above_average=None, is_equal_average=None, std_dev=None):
58+
def __init__(self, is_above_average=None, is_equal_average=None, std_dev=None, **kw):
59+
"""
60+
Associative dict for storing property values
61+
"""
62+
self.container = {}
63+
6264
"""
6365
AboveAverage - a model defined in Swagger
6466
"""

asposecellscloud/models/access_token_response.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,25 @@ class AccessTokenResponse(object):
5252
'expires': '.expires'
5353
}
5454

55-
def get_swagger_types(self):
55+
@staticmethod
56+
def get_swagger_types():
5657
return AccessTokenResponse.swagger_types
57-
58-
def get_attribute_map(self):
59-
return AccessTokenResponse.attribute_map
6058

61-
"""
62-
Associative dict for storing property values
63-
"""
64-
container = {}
59+
@staticmethod
60+
def get_attribute_map():
61+
return AccessTokenResponse.attribute_map
6562

6663
def get_from_container(self, attr):
6764
if attr in self.container:
6865
return self.container[attr]
6966
return None
7067

71-
def __init__(self, access_token=None, token_type=None, expires_in=None, refresh_token=None, client_id=None, client_refresh_token_life_time_in_minutes=None, issued=None, expires=None):
68+
def __init__(self, access_token=None, token_type=None, expires_in=None, refresh_token=None, client_id=None, client_refresh_token_life_time_in_minutes=None, issued=None, expires=None, **kw):
69+
"""
70+
Associative dict for storing property values
71+
"""
72+
self.container = {}
73+
7274
"""
7375
AccessTokenResponse - a model defined in Swagger
7476
"""

asposecellscloud/models/area.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,25 @@ class Area(object):
4848
'transparency': 'Transparency'
4949
}
5050

51-
def get_swagger_types(self):
51+
@staticmethod
52+
def get_swagger_types():
5253
return Area.swagger_types
53-
54-
def get_attribute_map(self):
55-
return Area.attribute_map
5654

57-
"""
58-
Associative dict for storing property values
59-
"""
60-
container = {}
55+
@staticmethod
56+
def get_attribute_map():
57+
return Area.attribute_map
6158

6259
def get_from_container(self, attr):
6360
if attr in self.container:
6461
return self.container[attr]
6562
return None
6663

67-
def __init__(self, background_color=None, fill_format=None, foreground_color=None, format=None, invert_if_negative=None, transparency=None):
64+
def __init__(self, background_color=None, fill_format=None, foreground_color=None, format=None, invert_if_negative=None, transparency=None, **kw):
65+
"""
66+
Associative dict for storing property values
67+
"""
68+
self.container = {}
69+
6870
"""
6971
Area - a model defined in Swagger
7072
"""

asposecellscloud/models/auto_filter.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,25 @@ class AutoFilter(object):
4444
'sorter': 'Sorter'
4545
}
4646

47-
def get_swagger_types(self):
47+
@staticmethod
48+
def get_swagger_types():
4849
return AutoFilter.swagger_types
49-
50-
def get_attribute_map(self):
51-
return AutoFilter.attribute_map
5250

53-
"""
54-
Associative dict for storing property values
55-
"""
56-
container = {}
51+
@staticmethod
52+
def get_attribute_map():
53+
return AutoFilter.attribute_map
5754

5855
def get_from_container(self, attr):
5956
if attr in self.container:
6057
return self.container[attr]
6158
return None
6259

63-
def __init__(self, link=None, filter_columns=None, range=None, sorter=None):
60+
def __init__(self, link=None, filter_columns=None, range=None, sorter=None, **kw):
61+
"""
62+
Associative dict for storing property values
63+
"""
64+
self.container = {}
65+
6466
"""
6567
AutoFilter - a model defined in Swagger
6668
"""

asposecellscloud/models/auto_filter_response.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,22 @@ class AutoFilterResponse(SaaSposeResponse):
3838
'auto_filter': 'AutoFilter'
3939
}
4040

41-
def get_swagger_types(self):
42-
return dict(AutoFilterResponse.swagger_types, **SaaSposeResponse.get_swagger_types(self))
43-
44-
def get_attribute_map(self):
45-
return dict(AutoFilterResponse.attribute_map, **SaaSposeResponse.get_attribute_map(self))
41+
@staticmethod
42+
def get_swagger_types():
43+
return dict(AutoFilterResponse.swagger_types, **SaaSposeResponse.get_swagger_types())
4644

45+
@staticmethod
46+
def get_attribute_map():
47+
return dict(AutoFilterResponse.attribute_map, **SaaSposeResponse.get_attribute_map())
4748

4849
def get_from_container(self, attr):
4950
if attr in self.container:
5051
return self.container[attr]
5152
return None
5253

53-
def __init__(self, auto_filter=None):
54+
def __init__(self, auto_filter=None, **kw):
55+
super(AutoFilterResponse, self).__init__(**kw)
56+
5457
"""
5558
AutoFilterResponse - a model defined in Swagger
5659
"""

asposecellscloud/models/auto_fitter_options.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,25 @@ class AutoFitterOptions(object):
4242
'only_auto': 'OnlyAuto'
4343
}
4444

45-
def get_swagger_types(self):
45+
@staticmethod
46+
def get_swagger_types():
4647
return AutoFitterOptions.swagger_types
47-
48-
def get_attribute_map(self):
49-
return AutoFitterOptions.attribute_map
5048

51-
"""
52-
Associative dict for storing property values
53-
"""
54-
container = {}
49+
@staticmethod
50+
def get_attribute_map():
51+
return AutoFitterOptions.attribute_map
5552

5653
def get_from_container(self, attr):
5754
if attr in self.container:
5855
return self.container[attr]
5956
return None
6057

61-
def __init__(self, auto_fit_merged_cells=None, ignore_hidden=None, only_auto=None):
58+
def __init__(self, auto_fit_merged_cells=None, ignore_hidden=None, only_auto=None, **kw):
59+
"""
60+
Associative dict for storing property values
61+
"""
62+
self.container = {}
63+
6264
"""
6365
AutoFitterOptions - a model defined in Swagger
6466
"""

0 commit comments

Comments
 (0)