|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | + Clever API |
| 5 | +
|
| 6 | + The Clever API |
| 7 | +
|
| 8 | + OpenAPI spec version: 2.0.0 |
| 9 | +
|
| 10 | + Generated by: https://github.com/swagger-api/swagger-codegen.git |
| 11 | +""" |
| 12 | + |
| 13 | + |
| 14 | +from pprint import pformat |
| 15 | +from six import iteritems |
| 16 | +import re |
| 17 | + |
| 18 | + |
| 19 | +class Event(object): |
| 20 | + """ |
| 21 | + NOTE: This class is auto generated by the swagger code generator program. |
| 22 | + Do not edit the class manually. |
| 23 | + """ |
| 24 | + |
| 25 | + |
| 26 | + """ |
| 27 | + Attributes: |
| 28 | + swagger_types (dict): The key is attribute name |
| 29 | + and the value is attribute type. |
| 30 | + attribute_map (dict): The key is attribute name |
| 31 | + and the value is json key in definition. |
| 32 | + """ |
| 33 | + swagger_types = { |
| 34 | + 'created': 'str', |
| 35 | + 'id': 'str', |
| 36 | + 'type': 'str' |
| 37 | + } |
| 38 | + |
| 39 | + attribute_map = { |
| 40 | + 'created': 'created', |
| 41 | + 'id': 'id', |
| 42 | + 'type': 'type' |
| 43 | + } |
| 44 | + |
| 45 | + def __init__(self, created=None, id=None, type=None): |
| 46 | + """ |
| 47 | + Event - a model defined in Swagger |
| 48 | + """ |
| 49 | + |
| 50 | + self._created = None |
| 51 | + self._id = None |
| 52 | + self._type = None |
| 53 | + |
| 54 | + if created is not None: |
| 55 | + self.created = created |
| 56 | + if id is not None: |
| 57 | + self.id = id |
| 58 | + self.type = type |
| 59 | + |
| 60 | + @property |
| 61 | + def created(self): |
| 62 | + """ |
| 63 | + Gets the created of this Event. |
| 64 | +
|
| 65 | + :return: The created of this Event. |
| 66 | + :rtype: str |
| 67 | + """ |
| 68 | + return self._created |
| 69 | + |
| 70 | + @created.setter |
| 71 | + def created(self, created): |
| 72 | + """ |
| 73 | + Sets the created of this Event. |
| 74 | +
|
| 75 | + :param created: The created of this Event. |
| 76 | + :type: str |
| 77 | + """ |
| 78 | + |
| 79 | + self._created = created |
| 80 | + |
| 81 | + @property |
| 82 | + def id(self): |
| 83 | + """ |
| 84 | + Gets the id of this Event. |
| 85 | +
|
| 86 | + :return: The id of this Event. |
| 87 | + :rtype: str |
| 88 | + """ |
| 89 | + return self._id |
| 90 | + |
| 91 | + @id.setter |
| 92 | + def id(self, id): |
| 93 | + """ |
| 94 | + Sets the id of this Event. |
| 95 | +
|
| 96 | + :param id: The id of this Event. |
| 97 | + :type: str |
| 98 | + """ |
| 99 | + |
| 100 | + self._id = id |
| 101 | + |
| 102 | + @property |
| 103 | + def type(self): |
| 104 | + """ |
| 105 | + Gets the type of this Event. |
| 106 | +
|
| 107 | + :return: The type of this Event. |
| 108 | + :rtype: str |
| 109 | + """ |
| 110 | + return self._type |
| 111 | + |
| 112 | + @type.setter |
| 113 | + def type(self, type): |
| 114 | + """ |
| 115 | + Sets the type of this Event. |
| 116 | +
|
| 117 | + :param type: The type of this Event. |
| 118 | + :type: str |
| 119 | + """ |
| 120 | + if type is None: |
| 121 | + raise ValueError("Invalid value for `type`, must not be `None`") |
| 122 | + |
| 123 | + self._type = type |
| 124 | + |
| 125 | + def to_dict(self): |
| 126 | + """ |
| 127 | + Returns the model properties as a dict |
| 128 | + """ |
| 129 | + result = {} |
| 130 | + |
| 131 | + for attr, _ in iteritems(self.swagger_types): |
| 132 | + value = getattr(self, attr) |
| 133 | + if isinstance(value, list): |
| 134 | + result[attr] = list(map( |
| 135 | + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
| 136 | + value |
| 137 | + )) |
| 138 | + elif hasattr(value, "to_dict"): |
| 139 | + result[attr] = value.to_dict() |
| 140 | + elif isinstance(value, dict): |
| 141 | + result[attr] = dict(map( |
| 142 | + lambda item: (item[0], item[1].to_dict()) |
| 143 | + if hasattr(item[1], "to_dict") else item, |
| 144 | + value.items() |
| 145 | + )) |
| 146 | + else: |
| 147 | + result[attr] = value |
| 148 | + |
| 149 | + return result |
| 150 | + |
| 151 | + def to_str(self): |
| 152 | + """ |
| 153 | + Returns the string representation of the model |
| 154 | + """ |
| 155 | + return pformat(self.to_dict()) |
| 156 | + |
| 157 | + def __repr__(self): |
| 158 | + """ |
| 159 | + For `print` and `pprint` |
| 160 | + """ |
| 161 | + return self.to_str() |
| 162 | + |
| 163 | + def __eq__(self, other): |
| 164 | + """ |
| 165 | + Returns true if both objects are equal |
| 166 | + """ |
| 167 | + if not isinstance(other, Event): |
| 168 | + return False |
| 169 | + |
| 170 | + return self.__dict__ == other.__dict__ |
| 171 | + |
| 172 | + def __ne__(self, other): |
| 173 | + """ |
| 174 | + Returns true if both objects are not equal |
| 175 | + """ |
| 176 | + return not self == other |
0 commit comments