2024-04-30 10:31:09 +08:00

399 lines
9.9 KiB
Python

# coding: utf-8
"""
api/v1/activity_service.proto
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: version not set
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class V1User(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'name': 'str',
'id': 'int',
'role': 'UserRole',
'username': 'str',
'email': 'str',
'nickname': 'str',
'avatar_url': 'str',
'description': 'str',
'password': 'str',
'row_status': 'V1RowStatus',
'create_time': 'datetime',
'update_time': 'datetime'
}
attribute_map = {
'name': 'name',
'id': 'id',
'role': 'role',
'username': 'username',
'email': 'email',
'nickname': 'nickname',
'avatar_url': 'avatarUrl',
'description': 'description',
'password': 'password',
'row_status': 'rowStatus',
'create_time': 'createTime',
'update_time': 'updateTime'
}
def __init__(self, name=None, id=None, role=None, username=None, email=None, nickname=None, avatar_url=None, description=None, password=None, row_status=None, create_time=None, update_time=None): # noqa: E501
"""V1User - a model defined in Swagger""" # noqa: E501
self._name = None
self._id = None
self._role = None
self._username = None
self._email = None
self._nickname = None
self._avatar_url = None
self._description = None
self._password = None
self._row_status = None
self._create_time = None
self._update_time = None
self.discriminator = None
if name is not None:
self.name = name
if id is not None:
self.id = id
if role is not None:
self.role = role
if username is not None:
self.username = username
if email is not None:
self.email = email
if nickname is not None:
self.nickname = nickname
if avatar_url is not None:
self.avatar_url = avatar_url
if description is not None:
self.description = description
if password is not None:
self.password = password
if row_status is not None:
self.row_status = row_status
if create_time is not None:
self.create_time = create_time
if update_time is not None:
self.update_time = update_time
@property
def name(self):
"""Gets the name of this V1User. # noqa: E501
:return: The name of this V1User. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this V1User.
:param name: The name of this V1User. # noqa: E501
:type: str
"""
self._name = name
@property
def id(self):
"""Gets the id of this V1User. # noqa: E501
The system generated uid of the user. # noqa: E501
:return: The id of this V1User. # noqa: E501
:rtype: int
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this V1User.
The system generated uid of the user. # noqa: E501
:param id: The id of this V1User. # noqa: E501
:type: int
"""
self._id = id
@property
def role(self):
"""Gets the role of this V1User. # noqa: E501
:return: The role of this V1User. # noqa: E501
:rtype: UserRole
"""
return self._role
@role.setter
def role(self, role):
"""Sets the role of this V1User.
:param role: The role of this V1User. # noqa: E501
:type: UserRole
"""
self._role = role
@property
def username(self):
"""Gets the username of this V1User. # noqa: E501
:return: The username of this V1User. # noqa: E501
:rtype: str
"""
return self._username
@username.setter
def username(self, username):
"""Sets the username of this V1User.
:param username: The username of this V1User. # noqa: E501
:type: str
"""
self._username = username
@property
def email(self):
"""Gets the email of this V1User. # noqa: E501
:return: The email of this V1User. # noqa: E501
:rtype: str
"""
return self._email
@email.setter
def email(self, email):
"""Sets the email of this V1User.
:param email: The email of this V1User. # noqa: E501
:type: str
"""
self._email = email
@property
def nickname(self):
"""Gets the nickname of this V1User. # noqa: E501
:return: The nickname of this V1User. # noqa: E501
:rtype: str
"""
return self._nickname
@nickname.setter
def nickname(self, nickname):
"""Sets the nickname of this V1User.
:param nickname: The nickname of this V1User. # noqa: E501
:type: str
"""
self._nickname = nickname
@property
def avatar_url(self):
"""Gets the avatar_url of this V1User. # noqa: E501
:return: The avatar_url of this V1User. # noqa: E501
:rtype: str
"""
return self._avatar_url
@avatar_url.setter
def avatar_url(self, avatar_url):
"""Sets the avatar_url of this V1User.
:param avatar_url: The avatar_url of this V1User. # noqa: E501
:type: str
"""
self._avatar_url = avatar_url
@property
def description(self):
"""Gets the description of this V1User. # noqa: E501
:return: The description of this V1User. # noqa: E501
:rtype: str
"""
return self._description
@description.setter
def description(self, description):
"""Sets the description of this V1User.
:param description: The description of this V1User. # noqa: E501
:type: str
"""
self._description = description
@property
def password(self):
"""Gets the password of this V1User. # noqa: E501
:return: The password of this V1User. # noqa: E501
:rtype: str
"""
return self._password
@password.setter
def password(self, password):
"""Sets the password of this V1User.
:param password: The password of this V1User. # noqa: E501
:type: str
"""
self._password = password
@property
def row_status(self):
"""Gets the row_status of this V1User. # noqa: E501
:return: The row_status of this V1User. # noqa: E501
:rtype: V1RowStatus
"""
return self._row_status
@row_status.setter
def row_status(self, row_status):
"""Sets the row_status of this V1User.
:param row_status: The row_status of this V1User. # noqa: E501
:type: V1RowStatus
"""
self._row_status = row_status
@property
def create_time(self):
"""Gets the create_time of this V1User. # noqa: E501
:return: The create_time of this V1User. # noqa: E501
:rtype: datetime
"""
return self._create_time
@create_time.setter
def create_time(self, create_time):
"""Sets the create_time of this V1User.
:param create_time: The create_time of this V1User. # noqa: E501
:type: datetime
"""
self._create_time = create_time
@property
def update_time(self):
"""Gets the update_time of this V1User. # noqa: E501
:return: The update_time of this V1User. # noqa: E501
:rtype: datetime
"""
return self._update_time
@update_time.setter
def update_time(self, update_time):
"""Sets the update_time of this V1User.
:param update_time: The update_time of this V1User. # noqa: E501
:type: datetime
"""
self._update_time = update_time
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(V1User, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, V1User):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other