smartsheet-python-sdk 3.5.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- smartsheet/__init__.py +37 -0
- smartsheet/attachments.py +565 -0
- smartsheet/cells.py +164 -0
- smartsheet/contacts.py +78 -0
- smartsheet/discussions.py +411 -0
- smartsheet/events.py +79 -0
- smartsheet/exceptions.py +130 -0
- smartsheet/favorites.py +116 -0
- smartsheet/folders.py +438 -0
- smartsheet/groups.py +186 -0
- smartsheet/home.py +180 -0
- smartsheet/images.py +61 -0
- smartsheet/models/__init__.py +126 -0
- smartsheet/models/access_token.py +95 -0
- smartsheet/models/account.py +77 -0
- smartsheet/models/alternate_email.py +88 -0
- smartsheet/models/asset_share.py +165 -0
- smartsheet/models/asset_shares_paginated_result.py +84 -0
- smartsheet/models/attachment.py +181 -0
- smartsheet/models/auto_number_format.py +81 -0
- smartsheet/models/automation_action.py +162 -0
- smartsheet/models/automation_rule.py +164 -0
- smartsheet/models/boolean_object_value.py +38 -0
- smartsheet/models/bulk_item_failure.py +77 -0
- smartsheet/models/bulk_item_result.py +111 -0
- smartsheet/models/cell.py +193 -0
- smartsheet/models/cell_data_item.py +152 -0
- smartsheet/models/cell_history.py +67 -0
- smartsheet/models/cell_link.py +91 -0
- smartsheet/models/cell_link_widget_content.py +101 -0
- smartsheet/models/chart_widget_content.py +124 -0
- smartsheet/models/column.py +253 -0
- smartsheet/models/comment.py +126 -0
- smartsheet/models/contact.py +88 -0
- smartsheet/models/contact_object_value.py +59 -0
- smartsheet/models/container_destination.py +74 -0
- smartsheet/models/copy_or_move_row_destination.py +54 -0
- smartsheet/models/copy_or_move_row_directive.py +64 -0
- smartsheet/models/copy_or_move_row_result.py +67 -0
- smartsheet/models/criteria.py +82 -0
- smartsheet/models/cross_sheet_reference.py +134 -0
- smartsheet/models/currency.py +64 -0
- smartsheet/models/date_object_value.py +56 -0
- smartsheet/models/datetime_object_value.py +56 -0
- smartsheet/models/discussion.py +183 -0
- smartsheet/models/downloaded_file.py +106 -0
- smartsheet/models/duration.py +112 -0
- smartsheet/models/email.py +82 -0
- smartsheet/models/enums/__init__.py +56 -0
- smartsheet/models/enums/access_level.py +26 -0
- smartsheet/models/enums/asset_type.py +10 -0
- smartsheet/models/enums/attachment_parent_type.py +23 -0
- smartsheet/models/enums/attachment_sub_type.py +26 -0
- smartsheet/models/enums/attachment_type.py +29 -0
- smartsheet/models/enums/automation_action_frequency.py +24 -0
- smartsheet/models/enums/automation_action_type.py +23 -0
- smartsheet/models/enums/automation_rule_disabled_reason.py +27 -0
- smartsheet/models/enums/cell_link_status.py +28 -0
- smartsheet/models/enums/column_type.py +31 -0
- smartsheet/models/enums/criteria_target.py +21 -0
- smartsheet/models/enums/cross_sheet_reference_status.py +28 -0
- smartsheet/models/enums/currency_code.py +43 -0
- smartsheet/models/enums/day_descriptors.py +30 -0
- smartsheet/models/enums/day_ordinal.py +25 -0
- smartsheet/models/enums/event_action.py +76 -0
- smartsheet/models/enums/event_obejct_type.py +34 -0
- smartsheet/models/enums/event_source.py +27 -0
- smartsheet/models/enums/global_template.py +23 -0
- smartsheet/models/enums/operator.py +62 -0
- smartsheet/models/enums/paper_type.py +29 -0
- smartsheet/models/enums/predecessor_type.py +24 -0
- smartsheet/models/enums/publish_accessible_by.py +22 -0
- smartsheet/models/enums/schedule_type.py +25 -0
- smartsheet/models/enums/seat_type.py +17 -0
- smartsheet/models/enums/share_scope.py +22 -0
- smartsheet/models/enums/share_type.py +22 -0
- smartsheet/models/enums/sheet_email_format.py +23 -0
- smartsheet/models/enums/sheet_filter_operator.py +22 -0
- smartsheet/models/enums/sheet_filter_type.py +23 -0
- smartsheet/models/enums/sort_direction.py +22 -0
- smartsheet/models/enums/symbol.py +45 -0
- smartsheet/models/enums/system_column_type.py +25 -0
- smartsheet/models/enums/update_request_status.py +23 -0
- smartsheet/models/enums/user_status.py +23 -0
- smartsheet/models/enums/widget_type.py +32 -0
- smartsheet/models/error.py +74 -0
- smartsheet/models/error_result.py +117 -0
- smartsheet/models/event.py +153 -0
- smartsheet/models/event_result.py +86 -0
- smartsheet/models/explicit_null.py +24 -0
- smartsheet/models/favorite.py +81 -0
- smartsheet/models/folder.py +177 -0
- smartsheet/models/font_family.py +63 -0
- smartsheet/models/format_details.py +55 -0
- smartsheet/models/format_tables.py +191 -0
- smartsheet/models/group.py +134 -0
- smartsheet/models/group_member.py +104 -0
- smartsheet/models/home.py +110 -0
- smartsheet/models/hyperlink.py +81 -0
- smartsheet/models/image.py +101 -0
- smartsheet/models/image_url.py +91 -0
- smartsheet/models/image_url_map.py +68 -0
- smartsheet/models/image_widget_content.py +117 -0
- smartsheet/models/index_result.py +118 -0
- smartsheet/models/json_object.py +59 -0
- smartsheet/models/multi_contact_object_value.py +49 -0
- smartsheet/models/multi_picklist_object_value.py +48 -0
- smartsheet/models/multi_row_email.py +60 -0
- smartsheet/models/number_object_value.py +38 -0
- smartsheet/models/o_auth_error.py +86 -0
- smartsheet/models/object_value.py +130 -0
- smartsheet/models/paginated_children_result.py +80 -0
- smartsheet/models/predecessor.py +102 -0
- smartsheet/models/predecessor_list.py +49 -0
- smartsheet/models/primitive_object_value.py +59 -0
- smartsheet/models/profile_image.py +72 -0
- smartsheet/models/project_settings.py +89 -0
- smartsheet/models/recipient.py +63 -0
- smartsheet/models/report.py +90 -0
- smartsheet/models/report_cell.py +59 -0
- smartsheet/models/report_column.py +67 -0
- smartsheet/models/report_publish.py +95 -0
- smartsheet/models/report_row.py +68 -0
- smartsheet/models/report_widget_content.py +78 -0
- smartsheet/models/result.py +105 -0
- smartsheet/models/row.py +336 -0
- smartsheet/models/row_email.py +83 -0
- smartsheet/models/row_mapping.py +77 -0
- smartsheet/models/schedule.py +140 -0
- smartsheet/models/scope.py +70 -0
- smartsheet/models/search_result.py +67 -0
- smartsheet/models/search_result_item.py +150 -0
- smartsheet/models/selection_range.py +86 -0
- smartsheet/models/sent_update_request.py +172 -0
- smartsheet/models/server_info.py +67 -0
- smartsheet/models/share.py +183 -0
- smartsheet/models/sheet.py +462 -0
- smartsheet/models/sheet_email.py +81 -0
- smartsheet/models/sheet_filter.py +106 -0
- smartsheet/models/sheet_filter_details.py +76 -0
- smartsheet/models/sheet_publish.py +184 -0
- smartsheet/models/sheet_summary.py +59 -0
- smartsheet/models/sheet_user_permissions.py +58 -0
- smartsheet/models/sheet_user_settings.py +72 -0
- smartsheet/models/shortcut_data_item.py +102 -0
- smartsheet/models/shortcut_widget_content.py +61 -0
- smartsheet/models/sight.py +175 -0
- smartsheet/models/sight_publish.py +77 -0
- smartsheet/models/sort_criterion.py +64 -0
- smartsheet/models/sort_specifier.py +55 -0
- smartsheet/models/source.py +83 -0
- smartsheet/models/string_object_value.py +38 -0
- smartsheet/models/summary_field.py +256 -0
- smartsheet/models/template.py +171 -0
- smartsheet/models/title_rich_text_widget_content.py +68 -0
- smartsheet/models/token_paginated_result.py +79 -0
- smartsheet/models/update_request.py +110 -0
- smartsheet/models/user.py +58 -0
- smartsheet/models/user_model.py +280 -0
- smartsheet/models/user_plan.py +77 -0
- smartsheet/models/user_profile.py +89 -0
- smartsheet/models/version.py +57 -0
- smartsheet/models/web_content_widget_content.py +60 -0
- smartsheet/models/webhook.py +219 -0
- smartsheet/models/webhook_secret.py +58 -0
- smartsheet/models/webhook_stats.py +76 -0
- smartsheet/models/webhook_subscope.py +50 -0
- smartsheet/models/widget.py +211 -0
- smartsheet/models/widget_content.py +52 -0
- smartsheet/models/widget_hyperlink.py +74 -0
- smartsheet/models/workspace.py +185 -0
- smartsheet/object_value.py +72 -0
- smartsheet/passthrough.py +127 -0
- smartsheet/reports.py +382 -0
- smartsheet/search.py +100 -0
- smartsheet/server.py +48 -0
- smartsheet/session.py +70 -0
- smartsheet/sharing.py +163 -0
- smartsheet/sheets.py +2062 -0
- smartsheet/sights.py +370 -0
- smartsheet/smartsheet.py +684 -0
- smartsheet/templates.py +87 -0
- smartsheet/token.py +128 -0
- smartsheet/types.py +323 -0
- smartsheet/users.py +490 -0
- smartsheet/util.py +199 -0
- smartsheet/version.py +34 -0
- smartsheet/webhooks.py +161 -0
- smartsheet/workspaces.py +647 -0
- smartsheet_python_sdk-3.5.5.dist-info/METADATA +120 -0
- smartsheet_python_sdk-3.5.5.dist-info/RECORD +195 -0
- smartsheet_python_sdk-3.5.5.dist-info/WHEEL +5 -0
- smartsheet_python_sdk-3.5.5.dist-info/licenses/LICENSE.md +201 -0
- smartsheet_python_sdk-3.5.5.dist-info/licenses/NOTICE +10 -0
- smartsheet_python_sdk-3.5.5.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
|
|
2
|
+
# Smartsheet Python SDK.
|
|
3
|
+
#
|
|
4
|
+
# Copyright 2018 Smartsheet.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"): you may
|
|
7
|
+
# not use this file except in compliance with the License. You may obtain
|
|
8
|
+
# a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
14
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
15
|
+
# License for the specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
from enum import Enum
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class UpdateRequestStatus(Enum):
|
|
21
|
+
PENDING = 1
|
|
22
|
+
COMPLETE = 2
|
|
23
|
+
CANCELED = 3
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
|
|
2
|
+
# Smartsheet Python SDK.
|
|
3
|
+
#
|
|
4
|
+
# Copyright 2018 Smartsheet.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"): you may
|
|
7
|
+
# not use this file except in compliance with the License. You may obtain
|
|
8
|
+
# a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
14
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
15
|
+
# License for the specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
from enum import Enum
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class UserStatus(Enum):
|
|
21
|
+
ACTIVE = 1
|
|
22
|
+
PENDING = 2
|
|
23
|
+
DECLINED = 3
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
|
|
2
|
+
# Smartsheet Python SDK.
|
|
3
|
+
#
|
|
4
|
+
# Copyright 2018 Smartsheet.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"): you may
|
|
7
|
+
# not use this file except in compliance with the License. You may obtain
|
|
8
|
+
# a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
14
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
15
|
+
# License for the specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
from enum import Enum
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class WidgetType(Enum):
|
|
21
|
+
CHART = 1
|
|
22
|
+
IMAGE = 2
|
|
23
|
+
METRIC = 3
|
|
24
|
+
GRIDGANTT = 4
|
|
25
|
+
RICHTEXT = 5
|
|
26
|
+
SHORTCUT = 6
|
|
27
|
+
TITLE = 7
|
|
28
|
+
WEBCONTENT = 8
|
|
29
|
+
# NOTE: These are level=0 widget types that should be supported for now
|
|
30
|
+
SHORTCUTLIST = 9 # SHORTCUTLIST --> SHORTCUT
|
|
31
|
+
SHORTCUTICON = 10 # SHORTCUTICON --> SHORTCUT
|
|
32
|
+
SHEETSUMMARY = 11 # SHEETSUMMARY --> METRIC
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
|
|
2
|
+
# Smartsheet Python SDK.
|
|
3
|
+
#
|
|
4
|
+
# Copyright 2018 Smartsheet.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"): you may
|
|
7
|
+
# not use this file except in compliance with the License. You may obtain
|
|
8
|
+
# a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
14
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
15
|
+
# License for the specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from __future__ import absolute_import
|
|
19
|
+
|
|
20
|
+
import json
|
|
21
|
+
|
|
22
|
+
from ..types import TypedObject
|
|
23
|
+
from ..util import deserialize, serialize
|
|
24
|
+
from .error_result import ErrorResult
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class Error:
|
|
28
|
+
|
|
29
|
+
"""Smartsheet Error data model."""
|
|
30
|
+
|
|
31
|
+
def __init__(self, props=None, base_obj=None):
|
|
32
|
+
"""Initialize the Error model."""
|
|
33
|
+
self._base = None
|
|
34
|
+
if base_obj is not None:
|
|
35
|
+
self._base = base_obj
|
|
36
|
+
|
|
37
|
+
self._request_response = None
|
|
38
|
+
self._result = TypedObject(ErrorResult)
|
|
39
|
+
|
|
40
|
+
if props:
|
|
41
|
+
deserialize(self, props)
|
|
42
|
+
|
|
43
|
+
self.message = "ERROR"
|
|
44
|
+
|
|
45
|
+
# requests package Response object
|
|
46
|
+
self.request_response = None
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def request_response(self):
|
|
50
|
+
return self._request_response
|
|
51
|
+
|
|
52
|
+
@request_response.setter
|
|
53
|
+
def request_response(self, value):
|
|
54
|
+
if isinstance(value, object):
|
|
55
|
+
self._request_response = value
|
|
56
|
+
else:
|
|
57
|
+
self._request_response = object(value, self._base)
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def result(self):
|
|
61
|
+
return self._result.value
|
|
62
|
+
|
|
63
|
+
@result.setter
|
|
64
|
+
def result(self, value):
|
|
65
|
+
self._result.value = value
|
|
66
|
+
|
|
67
|
+
def to_dict(self):
|
|
68
|
+
return serialize(self)
|
|
69
|
+
|
|
70
|
+
def to_json(self):
|
|
71
|
+
return json.dumps(self.to_dict())
|
|
72
|
+
|
|
73
|
+
def __str__(self):
|
|
74
|
+
return self.to_json()
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
|
|
2
|
+
# Smartsheet Python SDK.
|
|
3
|
+
#
|
|
4
|
+
# Copyright 2018 Smartsheet.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"): you may
|
|
7
|
+
# not use this file except in compliance with the License. You may obtain
|
|
8
|
+
# a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
14
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
15
|
+
# License for the specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from __future__ import absolute_import
|
|
19
|
+
|
|
20
|
+
from ..types import Boolean, Number, String, json
|
|
21
|
+
from ..util import deserialize, serialize
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class ErrorResult:
|
|
25
|
+
|
|
26
|
+
"""Smartsheet ErrorResult data model."""
|
|
27
|
+
|
|
28
|
+
def __init__(self, props=None, base_obj=None):
|
|
29
|
+
"""Initialize the ErrorResult model."""
|
|
30
|
+
self._base = None
|
|
31
|
+
if base_obj is not None:
|
|
32
|
+
self._base = base_obj
|
|
33
|
+
|
|
34
|
+
self._code = Number()
|
|
35
|
+
self._message = String()
|
|
36
|
+
self._name = String()
|
|
37
|
+
self._recommendation = String()
|
|
38
|
+
self._ref_id = String()
|
|
39
|
+
self._should_retry = Boolean()
|
|
40
|
+
self._status_code = Number()
|
|
41
|
+
|
|
42
|
+
if props:
|
|
43
|
+
deserialize(self, props)
|
|
44
|
+
# account for alternate variable names from raw API response
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def code(self):
|
|
48
|
+
return self._code.value
|
|
49
|
+
|
|
50
|
+
@code.setter
|
|
51
|
+
def code(self, value):
|
|
52
|
+
self._code.value = value
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def error_code(self):
|
|
56
|
+
return self.code
|
|
57
|
+
|
|
58
|
+
@error_code.setter
|
|
59
|
+
def error_code(self, value):
|
|
60
|
+
self.code = value
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def message(self):
|
|
64
|
+
return self._message.value
|
|
65
|
+
|
|
66
|
+
@message.setter
|
|
67
|
+
def message(self, value):
|
|
68
|
+
self._message.value = value
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def name(self):
|
|
72
|
+
return self._name.value
|
|
73
|
+
|
|
74
|
+
@name.setter
|
|
75
|
+
def name(self, value):
|
|
76
|
+
self._name.value = value
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def recommendation(self):
|
|
80
|
+
return self._recommendation.value
|
|
81
|
+
|
|
82
|
+
@recommendation.setter
|
|
83
|
+
def recommendation(self, value):
|
|
84
|
+
self._recommendation.value = value
|
|
85
|
+
|
|
86
|
+
@property
|
|
87
|
+
def ref_id(self):
|
|
88
|
+
return self._ref_id.value
|
|
89
|
+
|
|
90
|
+
@ref_id.setter
|
|
91
|
+
def ref_id(self, value):
|
|
92
|
+
self._ref_id.value = value
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def should_retry(self):
|
|
96
|
+
return self._should_retry.value
|
|
97
|
+
|
|
98
|
+
@should_retry.setter
|
|
99
|
+
def should_retry(self, value):
|
|
100
|
+
self._should_retry.value = value
|
|
101
|
+
|
|
102
|
+
@property
|
|
103
|
+
def status_code(self):
|
|
104
|
+
return self._status_code.value
|
|
105
|
+
|
|
106
|
+
@status_code.setter
|
|
107
|
+
def status_code(self, value):
|
|
108
|
+
self._status_code.value = value
|
|
109
|
+
|
|
110
|
+
def to_dict(self):
|
|
111
|
+
return serialize(self)
|
|
112
|
+
|
|
113
|
+
def to_json(self):
|
|
114
|
+
return json.dumps(self.to_dict())
|
|
115
|
+
|
|
116
|
+
def __str__(self):
|
|
117
|
+
return self.to_json()
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
|
|
2
|
+
# Smartsheet Python SDK.
|
|
3
|
+
#
|
|
4
|
+
# Copyright 2019 Smartsheet.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"): you may
|
|
7
|
+
# not use this file except in compliance with the License. You may obtain
|
|
8
|
+
# a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
14
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
15
|
+
# License for the specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from __future__ import absolute_import
|
|
19
|
+
|
|
20
|
+
from ..types import EnumeratedValue, Number, String, Timestamp, json, six
|
|
21
|
+
from ..util import deserialize, serialize
|
|
22
|
+
from .enums import EventAction, EventObjectType, EventSource
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Event:
|
|
26
|
+
|
|
27
|
+
"""Smartsheet Event data model."""
|
|
28
|
+
|
|
29
|
+
def __init__(self, props=None, base_obj=None):
|
|
30
|
+
"""Initialize the Event model."""
|
|
31
|
+
self._base = None
|
|
32
|
+
if base_obj is not None:
|
|
33
|
+
self._base = base_obj
|
|
34
|
+
|
|
35
|
+
self._access_token_name = String()
|
|
36
|
+
self._action = EnumeratedValue(EventAction)
|
|
37
|
+
self._additional_details = None
|
|
38
|
+
self._event_id = String()
|
|
39
|
+
self._event_timestamp = None
|
|
40
|
+
self._object_id = None
|
|
41
|
+
self._object_type = EnumeratedValue(EventObjectType)
|
|
42
|
+
self._request_user_id = Number()
|
|
43
|
+
self._source = EnumeratedValue(EventSource)
|
|
44
|
+
self._user_id = Number()
|
|
45
|
+
|
|
46
|
+
if props:
|
|
47
|
+
deserialize(self, props)
|
|
48
|
+
|
|
49
|
+
# requests package Response object
|
|
50
|
+
self.request_response = None
|
|
51
|
+
self.__initialized = True
|
|
52
|
+
|
|
53
|
+
def __getattr__(self, key):
|
|
54
|
+
raise AttributeError(key)
|
|
55
|
+
|
|
56
|
+
def __setattr__(self, key, value):
|
|
57
|
+
super().__setattr__(key, value)
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def access_token_name(self):
|
|
61
|
+
return self._access_token_name.value
|
|
62
|
+
|
|
63
|
+
@access_token_name.setter
|
|
64
|
+
def access_token_name(self, value):
|
|
65
|
+
self._access_token_name.value = value
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def action(self):
|
|
69
|
+
return self._action
|
|
70
|
+
|
|
71
|
+
@action.setter
|
|
72
|
+
def action(self, value):
|
|
73
|
+
self._action.set(value)
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def additional_details(self):
|
|
77
|
+
return self._additional_details
|
|
78
|
+
|
|
79
|
+
@additional_details.setter
|
|
80
|
+
def additional_details(self, value):
|
|
81
|
+
self._additional_details = value
|
|
82
|
+
|
|
83
|
+
@property
|
|
84
|
+
def event_id(self):
|
|
85
|
+
return self._event_id.value
|
|
86
|
+
|
|
87
|
+
@event_id.setter
|
|
88
|
+
def event_id(self, value):
|
|
89
|
+
self._event_id.value = value
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def event_timestamp(self):
|
|
93
|
+
if self._event_timestamp is not None:
|
|
94
|
+
return self._event_timestamp.value
|
|
95
|
+
else:
|
|
96
|
+
return None
|
|
97
|
+
|
|
98
|
+
@event_timestamp.setter
|
|
99
|
+
def event_timestamp(self, value):
|
|
100
|
+
if isinstance(value, six.string_types):
|
|
101
|
+
self._event_timestamp = Timestamp()
|
|
102
|
+
else:
|
|
103
|
+
self._event_timestamp = Number()
|
|
104
|
+
self._event_timestamp.value = value
|
|
105
|
+
|
|
106
|
+
@property
|
|
107
|
+
def object_id(self):
|
|
108
|
+
return self._object_id
|
|
109
|
+
|
|
110
|
+
@object_id.setter
|
|
111
|
+
def object_id(self, value):
|
|
112
|
+
self._object_id = value
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def object_type(self):
|
|
116
|
+
return self._object_type
|
|
117
|
+
|
|
118
|
+
@object_type.setter
|
|
119
|
+
def object_type(self, value):
|
|
120
|
+
self._object_type.set(value)
|
|
121
|
+
|
|
122
|
+
@property
|
|
123
|
+
def request_user_id(self):
|
|
124
|
+
return self._request_user_id.value
|
|
125
|
+
|
|
126
|
+
@request_user_id.setter
|
|
127
|
+
def request_user_id(self, value):
|
|
128
|
+
self._request_user_id.value = value
|
|
129
|
+
|
|
130
|
+
@property
|
|
131
|
+
def source(self):
|
|
132
|
+
return self._source
|
|
133
|
+
|
|
134
|
+
@source.setter
|
|
135
|
+
def source(self, value):
|
|
136
|
+
self._source.set(value)
|
|
137
|
+
|
|
138
|
+
@property
|
|
139
|
+
def user_id(self):
|
|
140
|
+
return self._user_id.value
|
|
141
|
+
|
|
142
|
+
@user_id.setter
|
|
143
|
+
def user_id(self, value):
|
|
144
|
+
self._user_id.value = value
|
|
145
|
+
|
|
146
|
+
def to_dict(self):
|
|
147
|
+
return serialize(self)
|
|
148
|
+
|
|
149
|
+
def to_json(self):
|
|
150
|
+
return json.dumps(self.to_dict())
|
|
151
|
+
|
|
152
|
+
def __str__(self):
|
|
153
|
+
return self.to_json()
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
|
|
2
|
+
# Smartsheet Python SDK.
|
|
3
|
+
#
|
|
4
|
+
# Copyright 2019 Smartsheet.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"): you may
|
|
7
|
+
# not use this file except in compliance with the License. You may obtain
|
|
8
|
+
# a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
14
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
15
|
+
# License for the specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from __future__ import absolute_import
|
|
19
|
+
|
|
20
|
+
from ..types import Boolean, String, TypedList, importlib, json
|
|
21
|
+
from ..util import deserialize, serialize
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class EventResult:
|
|
25
|
+
|
|
26
|
+
"""Smartsheet EventResult data model."""
|
|
27
|
+
|
|
28
|
+
def __init__(self, props=None, dynamic_data_type=None, base_obj=None):
|
|
29
|
+
"""Initialize the EventResult model."""
|
|
30
|
+
self._base = None
|
|
31
|
+
if base_obj is not None:
|
|
32
|
+
self._base = base_obj
|
|
33
|
+
|
|
34
|
+
self._dynamic_data_type = None
|
|
35
|
+
if dynamic_data_type is not None:
|
|
36
|
+
self._dynamic_data_type = dynamic_data_type
|
|
37
|
+
|
|
38
|
+
self._data = TypedList(object)
|
|
39
|
+
self._more_available = Boolean()
|
|
40
|
+
self._next_stream_position = String()
|
|
41
|
+
|
|
42
|
+
if props:
|
|
43
|
+
deserialize(self, props)
|
|
44
|
+
# account for alternate variable names from raw API response
|
|
45
|
+
|
|
46
|
+
# requests package Response object
|
|
47
|
+
self.request_response = None
|
|
48
|
+
|
|
49
|
+
@property
|
|
50
|
+
def data(self):
|
|
51
|
+
return self._data
|
|
52
|
+
|
|
53
|
+
@data.setter
|
|
54
|
+
def data(self, value):
|
|
55
|
+
class_ = getattr(
|
|
56
|
+
importlib.import_module("smartsheet.models"), self._dynamic_data_type
|
|
57
|
+
)
|
|
58
|
+
if isinstance(value, list):
|
|
59
|
+
self._data = [class_(x, self._base) for x in value]
|
|
60
|
+
else:
|
|
61
|
+
self._data = class_(value, self._base)
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def more_available(self):
|
|
65
|
+
return self._more_available.value
|
|
66
|
+
|
|
67
|
+
@more_available.setter
|
|
68
|
+
def more_available(self, value):
|
|
69
|
+
self._more_available.value = value
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def next_stream_position(self):
|
|
73
|
+
return self._next_stream_position.value
|
|
74
|
+
|
|
75
|
+
@next_stream_position.setter
|
|
76
|
+
def next_stream_position(self, value):
|
|
77
|
+
self._next_stream_position.value = value
|
|
78
|
+
|
|
79
|
+
def to_dict(self):
|
|
80
|
+
return serialize(self)
|
|
81
|
+
|
|
82
|
+
def to_json(self):
|
|
83
|
+
return json.dumps(self.to_dict())
|
|
84
|
+
|
|
85
|
+
def __str__(self):
|
|
86
|
+
return self.to_json()
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
|
|
2
|
+
# Smartsheet Python SDK.
|
|
3
|
+
#
|
|
4
|
+
# Copyright 2018 Smartsheet.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"): you may
|
|
7
|
+
# not use this file except in compliance with the License. You may obtain
|
|
8
|
+
# a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
14
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
15
|
+
# License for the specific language governing permissions and limitations
|
|
16
|
+
# under the License
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ExplicitNull:
|
|
20
|
+
def __init__(self):
|
|
21
|
+
pass
|
|
22
|
+
|
|
23
|
+
def is_explicit_null(self):
|
|
24
|
+
pass
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
|
|
2
|
+
# Smartsheet Python SDK.
|
|
3
|
+
#
|
|
4
|
+
# Copyright 2018 Smartsheet.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"): you may
|
|
7
|
+
# not use this file except in compliance with the License. You may obtain
|
|
8
|
+
# a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
14
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
15
|
+
# License for the specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from __future__ import absolute_import
|
|
19
|
+
|
|
20
|
+
from ..types import Number, String, json
|
|
21
|
+
from ..util import deserialize, serialize
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Favorite:
|
|
25
|
+
|
|
26
|
+
"""Smartsheet Favorite data model."""
|
|
27
|
+
|
|
28
|
+
def __init__(self, props=None, base_obj=None):
|
|
29
|
+
"""Initialize the Favorite model."""
|
|
30
|
+
self._base = None
|
|
31
|
+
if base_obj is not None:
|
|
32
|
+
self._base = base_obj
|
|
33
|
+
|
|
34
|
+
self.allowed_values = {
|
|
35
|
+
"_type": ["workspace", "folder", "sheet", "report", "template", "sight"]
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
self._object_id = Number()
|
|
39
|
+
self._type_ = String(accept=self.allowed_values["_type"])
|
|
40
|
+
|
|
41
|
+
if props:
|
|
42
|
+
deserialize(self, props)
|
|
43
|
+
|
|
44
|
+
self.__initialized = True
|
|
45
|
+
|
|
46
|
+
def __getattr__(self, key):
|
|
47
|
+
if key == "type":
|
|
48
|
+
return self.type_
|
|
49
|
+
else:
|
|
50
|
+
raise AttributeError(key)
|
|
51
|
+
|
|
52
|
+
def __setattr__(self, key, value):
|
|
53
|
+
if key == "type":
|
|
54
|
+
self.type_ = value
|
|
55
|
+
else:
|
|
56
|
+
super().__setattr__(key, value)
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def object_id(self):
|
|
60
|
+
return self._object_id.value
|
|
61
|
+
|
|
62
|
+
@object_id.setter
|
|
63
|
+
def object_id(self, value):
|
|
64
|
+
self._object_id.value = value
|
|
65
|
+
|
|
66
|
+
@property
|
|
67
|
+
def type_(self):
|
|
68
|
+
return self._type_.value
|
|
69
|
+
|
|
70
|
+
@type_.setter
|
|
71
|
+
def type_(self, value):
|
|
72
|
+
self._type_.value = value
|
|
73
|
+
|
|
74
|
+
def to_dict(self):
|
|
75
|
+
return serialize(self)
|
|
76
|
+
|
|
77
|
+
def to_json(self):
|
|
78
|
+
return json.dumps(self.to_dict())
|
|
79
|
+
|
|
80
|
+
def __str__(self):
|
|
81
|
+
return self.to_json()
|