|
| 1 | +# coding: utf-8 |
| 2 | +# ----------------------------------------------------------------------------------- |
| 3 | +# <copyright company="Aspose" file="PrimaveraActivityType.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 PrimaveraActivityType(object): |
| 33 | + """Specifies type of Primavera activity. |
| 34 | + """ |
| 35 | + |
| 36 | + """ |
| 37 | + allowed enum values |
| 38 | + """ |
| 39 | + NONE = "None" |
| 40 | + STARTMILESTONE = "StartMilestone" |
| 41 | + FINISHMILESTONE = "FinishMilestone" |
| 42 | + TASKDEPENDENT = "TaskDependent" |
| 43 | + RESOURCEDEPENDENT = "ResourceDependent" |
| 44 | + LEVELOFEFFORT = "LevelOfEffort" |
| 45 | + WBSSUMMARY = "WbsSummary" |
| 46 | + |
| 47 | + """ |
| 48 | + Attributes: |
| 49 | + swagger_types (dict): The key is attribute name |
| 50 | + and the value is attribute type. |
| 51 | + attribute_map (dict): The key is attribute name |
| 52 | + and the value is json key in definition. |
| 53 | + """ |
| 54 | + swagger_types = { |
| 55 | + } |
| 56 | + |
| 57 | + attribute_map = { |
| 58 | + } |
| 59 | + |
| 60 | + def __init__(self): # noqa: E501 |
| 61 | + """PrimaveraActivityType - a model defined in Swagger""" # noqa: E501 |
| 62 | + self.discriminator = None |
| 63 | + |
| 64 | + def to_dict(self): |
| 65 | + """Returns the model properties as a dict""" |
| 66 | + result = {} |
| 67 | + |
| 68 | + for attr, _ in six.iteritems(self.swagger_types): |
| 69 | + value = getattr(self, attr) |
| 70 | + if isinstance(value, list): |
| 71 | + result[attr] = list(map( |
| 72 | + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
| 73 | + value |
| 74 | + )) |
| 75 | + elif hasattr(value, "to_dict"): |
| 76 | + result[attr] = value.to_dict() |
| 77 | + elif isinstance(value, dict): |
| 78 | + result[attr] = dict(map( |
| 79 | + lambda item: (item[0], item[1].to_dict()) |
| 80 | + if hasattr(item[1], "to_dict") else item, |
| 81 | + value.items() |
| 82 | + )) |
| 83 | + else: |
| 84 | + result[attr] = value |
| 85 | + |
| 86 | + return result |
| 87 | + |
| 88 | + def to_str(self): |
| 89 | + """Returns the string representation of the model""" |
| 90 | + return pprint.pformat(self.to_dict()) |
| 91 | + |
| 92 | + def __repr__(self): |
| 93 | + """For `print` and `pprint`""" |
| 94 | + return self.to_str() |
| 95 | + |
| 96 | + def __eq__(self, other): |
| 97 | + """Returns true if both objects are equal""" |
| 98 | + if not isinstance(other, PrimaveraActivityType): |
| 99 | + return False |
| 100 | + |
| 101 | + return self.__dict__ == other.__dict__ |
| 102 | + |
| 103 | + def __ne__(self, other): |
| 104 | + """Returns true if both objects are not equal""" |
| 105 | + return not self == other |
0 commit comments