|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | +Copyright (c) 2021 Aspose.Cells Cloud |
| 5 | +Permission is hereby granted, free of charge, to any person obtaining a copy |
| 6 | +of this software and associated documentation files (the "Software"), to deal |
| 7 | +in the Software without restriction, including without limitation the rights |
| 8 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 9 | +copies of the Software, and to permit persons to whom the Software is |
| 10 | +furnished to do so, subject to the following conditions: |
| 11 | +
|
| 12 | +The above copyright notice and this permission notice shall be included in all |
| 13 | +copies or substantial portions of the Software. |
| 14 | +
|
| 15 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 18 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 20 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 21 | +""" |
| 22 | + |
| 23 | + |
| 24 | +from pprint import pformat |
| 25 | +from six import iteritems |
| 26 | +import re |
| 27 | +from . import OperateParameter |
| 28 | + |
| 29 | +class WorksheetOperateParameter(OperateParameter): |
| 30 | + """ |
| 31 | + NOTE: This class is auto generated by the swagger code generator program. |
| 32 | + Do not edit the class manually. |
| 33 | + """ |
| 34 | + |
| 35 | + |
| 36 | + """ |
| 37 | + Attributes: |
| 38 | + swagger_types (dict): The key is attribute name |
| 39 | + and the value is attribute type. |
| 40 | + attribute_map (dict): The key is attribute name |
| 41 | + and the value is json key in definition. |
| 42 | + """ |
| 43 | + swagger_types = { |
| 44 | + 'name': 'str', |
| 45 | + 'sheet_type': 'str', |
| 46 | + 'new_name': 'str', |
| 47 | + 'moving_request': 'WorksheetMovingRequest' |
| 48 | + } |
| 49 | + |
| 50 | + attribute_map = { |
| 51 | + 'name': 'Name', |
| 52 | + 'sheet_type': 'SheetType', |
| 53 | + 'new_name': 'NewName', |
| 54 | + 'moving_request': 'MovingRequest' |
| 55 | + } |
| 56 | + |
| 57 | + @staticmethod |
| 58 | + def get_swagger_types(): |
| 59 | + return dict(WorksheetOperateParameter.swagger_types, **OperateParameter.get_swagger_types()) |
| 60 | + |
| 61 | + @staticmethod |
| 62 | + def get_attribute_map(): |
| 63 | + return dict(WorksheetOperateParameter.attribute_map, **OperateParameter.get_attribute_map()) |
| 64 | + |
| 65 | + def get_from_container(self, attr): |
| 66 | + if attr in self.container: |
| 67 | + return self.container[attr] |
| 68 | + return None |
| 69 | + |
| 70 | + def __init__(self, name=None, sheet_type=None, new_name=None, moving_request=None, **kw): |
| 71 | + super(WorksheetOperateParameter, self).__init__(**kw) |
| 72 | + |
| 73 | + """ |
| 74 | + WorksheetOperateParameter - a model defined in Swagger |
| 75 | + """ |
| 76 | + |
| 77 | + self.container['name'] = None |
| 78 | + self.container['sheet_type'] = None |
| 79 | + self.container['new_name'] = None |
| 80 | + self.container['moving_request'] = None |
| 81 | + |
| 82 | + if name is not None: |
| 83 | + self.name = name |
| 84 | + if sheet_type is not None: |
| 85 | + self.sheet_type = sheet_type |
| 86 | + if new_name is not None: |
| 87 | + self.new_name = new_name |
| 88 | + if moving_request is not None: |
| 89 | + self.moving_request = moving_request |
| 90 | + |
| 91 | + @property |
| 92 | + def name(self): |
| 93 | + """ |
| 94 | + Gets the name of this WorksheetOperateParameter. |
| 95 | +
|
| 96 | + :return: The name of this WorksheetOperateParameter. |
| 97 | + :rtype: str |
| 98 | + """ |
| 99 | + return self.container['name'] |
| 100 | + |
| 101 | + @name.setter |
| 102 | + def name(self, name): |
| 103 | + """ |
| 104 | + Sets the name of this WorksheetOperateParameter. |
| 105 | +
|
| 106 | + :param name: The name of this WorksheetOperateParameter. |
| 107 | + :type: str |
| 108 | + """ |
| 109 | + |
| 110 | + self.container['name'] = name |
| 111 | + |
| 112 | + @property |
| 113 | + def sheet_type(self): |
| 114 | + """ |
| 115 | + Gets the sheet_type of this WorksheetOperateParameter. |
| 116 | +
|
| 117 | + :return: The sheet_type of this WorksheetOperateParameter. |
| 118 | + :rtype: str |
| 119 | + """ |
| 120 | + return self.container['sheet_type'] |
| 121 | + |
| 122 | + @sheet_type.setter |
| 123 | + def sheet_type(self, sheet_type): |
| 124 | + """ |
| 125 | + Sets the sheet_type of this WorksheetOperateParameter. |
| 126 | +
|
| 127 | + :param sheet_type: The sheet_type of this WorksheetOperateParameter. |
| 128 | + :type: str |
| 129 | + """ |
| 130 | + |
| 131 | + self.container['sheet_type'] = sheet_type |
| 132 | + |
| 133 | + @property |
| 134 | + def new_name(self): |
| 135 | + """ |
| 136 | + Gets the new_name of this WorksheetOperateParameter. |
| 137 | +
|
| 138 | + :return: The new_name of this WorksheetOperateParameter. |
| 139 | + :rtype: str |
| 140 | + """ |
| 141 | + return self.container['new_name'] |
| 142 | + |
| 143 | + @new_name.setter |
| 144 | + def new_name(self, new_name): |
| 145 | + """ |
| 146 | + Sets the new_name of this WorksheetOperateParameter. |
| 147 | +
|
| 148 | + :param new_name: The new_name of this WorksheetOperateParameter. |
| 149 | + :type: str |
| 150 | + """ |
| 151 | + |
| 152 | + self.container['new_name'] = new_name |
| 153 | + |
| 154 | + @property |
| 155 | + def moving_request(self): |
| 156 | + """ |
| 157 | + Gets the moving_request of this WorksheetOperateParameter. |
| 158 | +
|
| 159 | + :return: The moving_request of this WorksheetOperateParameter. |
| 160 | + :rtype: WorksheetMovingRequest |
| 161 | + """ |
| 162 | + return self.container['moving_request'] |
| 163 | + |
| 164 | + @moving_request.setter |
| 165 | + def moving_request(self, moving_request): |
| 166 | + """ |
| 167 | + Sets the moving_request of this WorksheetOperateParameter. |
| 168 | +
|
| 169 | + :param moving_request: The moving_request of this WorksheetOperateParameter. |
| 170 | + :type: WorksheetMovingRequest |
| 171 | + """ |
| 172 | + |
| 173 | + self.container['moving_request'] = moving_request |
| 174 | + |
| 175 | + def to_dict(self): |
| 176 | + """ |
| 177 | + Returns the model properties as a dict |
| 178 | + """ |
| 179 | + result = {} |
| 180 | + |
| 181 | + for attr, _ in iteritems(self.get_swagger_types()): |
| 182 | + value = self.get_from_container(attr) |
| 183 | + if isinstance(value, list): |
| 184 | + result[attr] = list(map( |
| 185 | + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
| 186 | + value |
| 187 | + )) |
| 188 | + elif hasattr(value, "to_dict"): |
| 189 | + result[attr] = value.to_dict() |
| 190 | + elif isinstance(value, dict): |
| 191 | + result[attr] = dict(map( |
| 192 | + lambda item: (item[0], item[1].to_dict()) |
| 193 | + if hasattr(item[1], "to_dict") else item, |
| 194 | + value.items() |
| 195 | + )) |
| 196 | + else: |
| 197 | + result[attr] = value |
| 198 | + |
| 199 | + return result |
| 200 | + |
| 201 | + def to_str(self): |
| 202 | + """ |
| 203 | + Returns the string representation of the model |
| 204 | + """ |
| 205 | + return pformat(self.to_dict()) |
| 206 | + |
| 207 | + def __repr__(self): |
| 208 | + """ |
| 209 | + For `print` and `pprint` |
| 210 | + """ |
| 211 | + return self.to_str() |
| 212 | + |
| 213 | + def __eq__(self, other): |
| 214 | + """ |
| 215 | + Returns true if both objects are equal |
| 216 | + """ |
| 217 | + if not isinstance(other, WorksheetOperateParameter): |
| 218 | + return False |
| 219 | + |
| 220 | + return self.__dict__ == other.__dict__ |
| 221 | + |
| 222 | + def __ne__(self, other): |
| 223 | + """ |
| 224 | + Returns true if both objects are not equal |
| 225 | + """ |
| 226 | + return not self == other |
0 commit comments