|
| 1 | +# coding: utf-8 |
| 2 | +# ----------------------------------------------------------------------------------- |
| 3 | +# <copyright company="Aspose" file="ProjectServerSaveOptionsDTO.py"> |
| 4 | +# Copyright (c) 2020 Aspose.Tasks 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 six |
| 30 | + |
| 31 | + |
| 32 | +class ProjectServerSaveOptionsDTO(object): |
| 33 | + """Allows to specify additional options when project is saved to Project Server or Project Online. |
| 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 | + 'project_name': 'str', |
| 45 | + 'project_guid': 'str', |
| 46 | + 'timeout': 'str', |
| 47 | + 'polling_interval': 'str' |
| 48 | + } |
| 49 | + |
| 50 | + attribute_map = { |
| 51 | + 'project_name': 'projectName', |
| 52 | + 'project_guid': 'projectGuid', |
| 53 | + 'timeout': 'timeout', |
| 54 | + 'polling_interval': 'pollingInterval' |
| 55 | + } |
| 56 | + |
| 57 | + def __init__(self, project_name=None, project_guid=None, timeout=None, polling_interval=None): # noqa: E501 |
| 58 | + """ProjectServerSaveOptionsDTO - a model defined in Swagger""" # noqa: E501 |
| 59 | + |
| 60 | + self._project_name = None |
| 61 | + self._project_guid = None |
| 62 | + self._timeout = None |
| 63 | + self._polling_interval = None |
| 64 | + self.discriminator = None |
| 65 | + |
| 66 | + if project_name is not None: |
| 67 | + self.project_name = project_name |
| 68 | + if project_guid is not None: |
| 69 | + self.project_guid = project_guid |
| 70 | + if timeout is not None: |
| 71 | + self.timeout = timeout |
| 72 | + if polling_interval is not None: |
| 73 | + self.polling_interval = polling_interval |
| 74 | + |
| 75 | + @property |
| 76 | + def project_name(self): |
| 77 | + """Gets the project_name of this ProjectServerSaveOptionsDTO. # noqa: E501 |
| 78 | +
|
| 79 | + Gets or sets name of a project which is displayed in Project Server \\ Project Online projects list. Should be unique within Project Server \\ Project Online instance. Is the value is omitted, the value of Prj.Name property will be used instead. # noqa: E501 |
| 80 | +
|
| 81 | + :return: The project_name of this ProjectServerSaveOptionsDTO. # noqa: E501 |
| 82 | + :rtype: str |
| 83 | + """ |
| 84 | + return self._project_name |
| 85 | + |
| 86 | + @project_name.setter |
| 87 | + def project_name(self, project_name): |
| 88 | + """Sets the project_name of this ProjectServerSaveOptionsDTO. |
| 89 | +
|
| 90 | + Gets or sets name of a project which is displayed in Project Server \\ Project Online projects list. Should be unique within Project Server \\ Project Online instance. Is the value is omitted, the value of Prj.Name property will be used instead. # noqa: E501 |
| 91 | +
|
| 92 | + :param project_name: The project_name of this ProjectServerSaveOptionsDTO. # noqa: E501 |
| 93 | + :type: str |
| 94 | + """ |
| 95 | + self._project_name = project_name |
| 96 | + @property |
| 97 | + def project_guid(self): |
| 98 | + """Gets the project_guid of this ProjectServerSaveOptionsDTO. # noqa: E501 |
| 99 | +
|
| 100 | + Gets or sets unique identifier of a project. Should be unique within Project Server \\ Project Online instance. # noqa: E501 |
| 101 | +
|
| 102 | + :return: The project_guid of this ProjectServerSaveOptionsDTO. # noqa: E501 |
| 103 | + :rtype: str |
| 104 | + """ |
| 105 | + return self._project_guid |
| 106 | + |
| 107 | + @project_guid.setter |
| 108 | + def project_guid(self, project_guid): |
| 109 | + """Sets the project_guid of this ProjectServerSaveOptionsDTO. |
| 110 | +
|
| 111 | + Gets or sets unique identifier of a project. Should be unique within Project Server \\ Project Online instance. # noqa: E501 |
| 112 | +
|
| 113 | + :param project_guid: The project_guid of this ProjectServerSaveOptionsDTO. # noqa: E501 |
| 114 | + :type: str |
| 115 | + """ |
| 116 | + self._project_guid = project_guid |
| 117 | + @property |
| 118 | + def timeout(self): |
| 119 | + """Gets the timeout of this ProjectServerSaveOptionsDTO. # noqa: E501 |
| 120 | +
|
| 121 | + Gets or sets timeout used when waiting for processing of save project request by a Project Server's queue processing service. The default value for this property is 1 minute. The processing time may be longer for large projects or in case when Project Server instance is too busy responding to other requests. # noqa: E501 |
| 122 | +
|
| 123 | + :return: The timeout of this ProjectServerSaveOptionsDTO. # noqa: E501 |
| 124 | + :rtype: str |
| 125 | + """ |
| 126 | + return self._timeout |
| 127 | + |
| 128 | + @timeout.setter |
| 129 | + def timeout(self, timeout): |
| 130 | + """Sets the timeout of this ProjectServerSaveOptionsDTO. |
| 131 | +
|
| 132 | + Gets or sets timeout used when waiting for processing of save project request by a Project Server's queue processing service. The default value for this property is 1 minute. The processing time may be longer for large projects or in case when Project Server instance is too busy responding to other requests. # noqa: E501 |
| 133 | +
|
| 134 | + :param timeout: The timeout of this ProjectServerSaveOptionsDTO. # noqa: E501 |
| 135 | + :type: str |
| 136 | + """ |
| 137 | + if timeout is None: |
| 138 | + raise ValueError("Invalid value for `timeout`, must not be `None`") # noqa: E501 |
| 139 | + self._timeout = timeout |
| 140 | + @property |
| 141 | + def polling_interval(self): |
| 142 | + """Gets the polling_interval of this ProjectServerSaveOptionsDTO. # noqa: E501 |
| 143 | +
|
| 144 | + Gets or sets interval between queue job status requests. The default value is 2 seconds. # noqa: E501 |
| 145 | +
|
| 146 | + :return: The polling_interval of this ProjectServerSaveOptionsDTO. # noqa: E501 |
| 147 | + :rtype: str |
| 148 | + """ |
| 149 | + return self._polling_interval |
| 150 | + |
| 151 | + @polling_interval.setter |
| 152 | + def polling_interval(self, polling_interval): |
| 153 | + """Sets the polling_interval of this ProjectServerSaveOptionsDTO. |
| 154 | +
|
| 155 | + Gets or sets interval between queue job status requests. The default value is 2 seconds. # noqa: E501 |
| 156 | +
|
| 157 | + :param polling_interval: The polling_interval of this ProjectServerSaveOptionsDTO. # noqa: E501 |
| 158 | + :type: str |
| 159 | + """ |
| 160 | + if polling_interval is None: |
| 161 | + raise ValueError("Invalid value for `polling_interval`, must not be `None`") # noqa: E501 |
| 162 | + self._polling_interval = polling_interval |
| 163 | + def to_dict(self): |
| 164 | + """Returns the model properties as a dict""" |
| 165 | + result = {} |
| 166 | + |
| 167 | + for attr, _ in six.iteritems(self.swagger_types): |
| 168 | + value = getattr(self, attr) |
| 169 | + if isinstance(value, list): |
| 170 | + result[attr] = list(map( |
| 171 | + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
| 172 | + value |
| 173 | + )) |
| 174 | + elif hasattr(value, "to_dict"): |
| 175 | + result[attr] = value.to_dict() |
| 176 | + elif isinstance(value, dict): |
| 177 | + result[attr] = dict(map( |
| 178 | + lambda item: (item[0], item[1].to_dict()) |
| 179 | + if hasattr(item[1], "to_dict") else item, |
| 180 | + value.items() |
| 181 | + )) |
| 182 | + else: |
| 183 | + result[attr] = value |
| 184 | + |
| 185 | + return result |
| 186 | + |
| 187 | + def to_str(self): |
| 188 | + """Returns the string representation of the model""" |
| 189 | + return pprint.pformat(self.to_dict()) |
| 190 | + |
| 191 | + def __repr__(self): |
| 192 | + """For `print` and `pprint`""" |
| 193 | + return self.to_str() |
| 194 | + |
| 195 | + def __eq__(self, other): |
| 196 | + """Returns true if both objects are equal""" |
| 197 | + if not isinstance(other, ProjectServerSaveOptionsDTO): |
| 198 | + return False |
| 199 | + |
| 200 | + return self.__dict__ == other.__dict__ |
| 201 | + |
| 202 | + def __ne__(self, other): |
| 203 | + """Returns true if both objects are not equal""" |
| 204 | + return not self == other |
0 commit comments