|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | + BIMData API |
| 5 | +
|
| 6 | + BIMData API is a tool to interact with your models stored on BIMData’s servers. Through the API, you can manage your projects, the clouds, upload your IFC files and manage them through endpoints. # noqa: E501 |
| 7 | +
|
| 8 | + The version of the OpenAPI document: v1 |
| 9 | + Contact: support@bimdata.io |
| 10 | + Generated by: https://openapi-generator.tech |
| 11 | +""" |
| 12 | + |
| 13 | + |
| 14 | +import pprint |
| 15 | +import re # noqa: F401 |
| 16 | + |
| 17 | +import six |
| 18 | + |
| 19 | +from bimdata_api_client.configuration import Configuration |
| 20 | + |
| 21 | + |
| 22 | +class UserProject(object): |
| 23 | + """NOTE: This class is auto generated by OpenAPI Generator. |
| 24 | + Ref: https://openapi-generator.tech |
| 25 | +
|
| 26 | + Do not edit the class manually. |
| 27 | + """ |
| 28 | + |
| 29 | + """ |
| 30 | + Attributes: |
| 31 | + openapi_types (dict): The key is attribute name |
| 32 | + and the value is attribute type. |
| 33 | + attribute_map (dict): The key is attribute name |
| 34 | + and the value is json key in definition. |
| 35 | + """ |
| 36 | + openapi_types = { |
| 37 | + 'role': 'int', |
| 38 | + 'user': 'User', |
| 39 | + 'invitation': 'ProjectInvitation', |
| 40 | + 'project': 'int' |
| 41 | + } |
| 42 | + |
| 43 | + attribute_map = { |
| 44 | + 'role': 'role', |
| 45 | + 'user': 'user', |
| 46 | + 'invitation': 'invitation', |
| 47 | + 'project': 'project' |
| 48 | + } |
| 49 | + |
| 50 | + def __init__(self, role=None, user=None, invitation=None, project=None, local_vars_configuration=None): # noqa: E501 |
| 51 | + """UserProject - a model defined in OpenAPI""" # noqa: E501 |
| 52 | + if local_vars_configuration is None: |
| 53 | + local_vars_configuration = Configuration() |
| 54 | + self.local_vars_configuration = local_vars_configuration |
| 55 | + |
| 56 | + self._role = None |
| 57 | + self._user = None |
| 58 | + self._invitation = None |
| 59 | + self._project = None |
| 60 | + self.discriminator = None |
| 61 | + |
| 62 | + if role is not None: |
| 63 | + self.role = role |
| 64 | + if user is not None: |
| 65 | + self.user = user |
| 66 | + if invitation is not None: |
| 67 | + self.invitation = invitation |
| 68 | + self.project = project |
| 69 | + |
| 70 | + @property |
| 71 | + def role(self): |
| 72 | + """Gets the role of this UserProject. # noqa: E501 |
| 73 | +
|
| 74 | + User's role in the project # noqa: E501 |
| 75 | +
|
| 76 | + :return: The role of this UserProject. # noqa: E501 |
| 77 | + :rtype: int |
| 78 | + """ |
| 79 | + return self._role |
| 80 | + |
| 81 | + @role.setter |
| 82 | + def role(self, role): |
| 83 | + """Sets the role of this UserProject. |
| 84 | +
|
| 85 | + User's role in the project # noqa: E501 |
| 86 | +
|
| 87 | + :param role: The role of this UserProject. # noqa: E501 |
| 88 | + :type: int |
| 89 | + """ |
| 90 | + |
| 91 | + self._role = role |
| 92 | + |
| 93 | + @property |
| 94 | + def user(self): |
| 95 | + """Gets the user of this UserProject. # noqa: E501 |
| 96 | +
|
| 97 | +
|
| 98 | + :return: The user of this UserProject. # noqa: E501 |
| 99 | + :rtype: User |
| 100 | + """ |
| 101 | + return self._user |
| 102 | + |
| 103 | + @user.setter |
| 104 | + def user(self, user): |
| 105 | + """Sets the user of this UserProject. |
| 106 | +
|
| 107 | +
|
| 108 | + :param user: The user of this UserProject. # noqa: E501 |
| 109 | + :type: User |
| 110 | + """ |
| 111 | + |
| 112 | + self._user = user |
| 113 | + |
| 114 | + @property |
| 115 | + def invitation(self): |
| 116 | + """Gets the invitation of this UserProject. # noqa: E501 |
| 117 | +
|
| 118 | +
|
| 119 | + :return: The invitation of this UserProject. # noqa: E501 |
| 120 | + :rtype: ProjectInvitation |
| 121 | + """ |
| 122 | + return self._invitation |
| 123 | + |
| 124 | + @invitation.setter |
| 125 | + def invitation(self, invitation): |
| 126 | + """Sets the invitation of this UserProject. |
| 127 | +
|
| 128 | +
|
| 129 | + :param invitation: The invitation of this UserProject. # noqa: E501 |
| 130 | + :type: ProjectInvitation |
| 131 | + """ |
| 132 | + |
| 133 | + self._invitation = invitation |
| 134 | + |
| 135 | + @property |
| 136 | + def project(self): |
| 137 | + """Gets the project of this UserProject. # noqa: E501 |
| 138 | +
|
| 139 | +
|
| 140 | + :return: The project of this UserProject. # noqa: E501 |
| 141 | + :rtype: int |
| 142 | + """ |
| 143 | + return self._project |
| 144 | + |
| 145 | + @project.setter |
| 146 | + def project(self, project): |
| 147 | + """Sets the project of this UserProject. |
| 148 | +
|
| 149 | +
|
| 150 | + :param project: The project of this UserProject. # noqa: E501 |
| 151 | + :type: int |
| 152 | + """ |
| 153 | + if self.local_vars_configuration.client_side_validation and project is None: # noqa: E501 |
| 154 | + raise ValueError("Invalid value for `project`, must not be `None`") # noqa: E501 |
| 155 | + |
| 156 | + self._project = project |
| 157 | + |
| 158 | + def to_dict(self): |
| 159 | + """Returns the model properties as a dict""" |
| 160 | + result = {} |
| 161 | + |
| 162 | + for attr, _ in six.iteritems(self.openapi_types): |
| 163 | + value = getattr(self, attr) |
| 164 | + if isinstance(value, list): |
| 165 | + result[attr] = list(map( |
| 166 | + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
| 167 | + value |
| 168 | + )) |
| 169 | + elif hasattr(value, "to_dict"): |
| 170 | + result[attr] = value.to_dict() |
| 171 | + elif isinstance(value, dict): |
| 172 | + result[attr] = dict(map( |
| 173 | + lambda item: (item[0], item[1].to_dict()) |
| 174 | + if hasattr(item[1], "to_dict") else item, |
| 175 | + value.items() |
| 176 | + )) |
| 177 | + else: |
| 178 | + result[attr] = value |
| 179 | + |
| 180 | + return result |
| 181 | + |
| 182 | + def to_str(self): |
| 183 | + """Returns the string representation of the model""" |
| 184 | + return pprint.pformat(self.to_dict()) |
| 185 | + |
| 186 | + def __repr__(self): |
| 187 | + """For `print` and `pprint`""" |
| 188 | + return self.to_str() |
| 189 | + |
| 190 | + def __eq__(self, other): |
| 191 | + """Returns true if both objects are equal""" |
| 192 | + if not isinstance(other, UserProject): |
| 193 | + return False |
| 194 | + |
| 195 | + return self.to_dict() == other.to_dict() |
| 196 | + |
| 197 | + def __ne__(self, other): |
| 198 | + """Returns true if both objects are not equal""" |
| 199 | + if not isinstance(other, UserProject): |
| 200 | + return True |
| 201 | + |
| 202 | + return self.to_dict() != other.to_dict() |
0 commit comments