memos-script/memos/models/v1_activity.py
2024-04-30 10:31:09 +08:00

251 lines
6.7 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 V1Activity(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 = {
'id': 'int',
'creator_id': 'int',
'type': 'str',
'level': 'str',
'create_time': 'datetime',
'payload': 'Apiv1ActivityPayload'
}
attribute_map = {
'id': 'id',
'creator_id': 'creatorId',
'type': 'type',
'level': 'level',
'create_time': 'createTime',
'payload': 'payload'
}
def __init__(self, id=None, creator_id=None, type=None, level=None, create_time=None, payload=None): # noqa: E501
"""V1Activity - a model defined in Swagger""" # noqa: E501
self._id = None
self._creator_id = None
self._type = None
self._level = None
self._create_time = None
self._payload = None
self.discriminator = None
if id is not None:
self.id = id
if creator_id is not None:
self.creator_id = creator_id
if type is not None:
self.type = type
if level is not None:
self.level = level
if create_time is not None:
self.create_time = create_time
if payload is not None:
self.payload = payload
@property
def id(self):
"""Gets the id of this V1Activity. # noqa: E501
The system-generated unique identifier for the activity. # noqa: E501
:return: The id of this V1Activity. # noqa: E501
:rtype: int
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this V1Activity.
The system-generated unique identifier for the activity. # noqa: E501
:param id: The id of this V1Activity. # noqa: E501
:type: int
"""
self._id = id
@property
def creator_id(self):
"""Gets the creator_id of this V1Activity. # noqa: E501
The system-generated unique identifier for the user who created the activity. # noqa: E501
:return: The creator_id of this V1Activity. # noqa: E501
:rtype: int
"""
return self._creator_id
@creator_id.setter
def creator_id(self, creator_id):
"""Sets the creator_id of this V1Activity.
The system-generated unique identifier for the user who created the activity. # noqa: E501
:param creator_id: The creator_id of this V1Activity. # noqa: E501
:type: int
"""
self._creator_id = creator_id
@property
def type(self):
"""Gets the type of this V1Activity. # noqa: E501
The type of the activity. # noqa: E501
:return: The type of this V1Activity. # noqa: E501
:rtype: str
"""
return self._type
@type.setter
def type(self, type):
"""Sets the type of this V1Activity.
The type of the activity. # noqa: E501
:param type: The type of this V1Activity. # noqa: E501
:type: str
"""
self._type = type
@property
def level(self):
"""Gets the level of this V1Activity. # noqa: E501
The level of the activity. # noqa: E501
:return: The level of this V1Activity. # noqa: E501
:rtype: str
"""
return self._level
@level.setter
def level(self, level):
"""Sets the level of this V1Activity.
The level of the activity. # noqa: E501
:param level: The level of this V1Activity. # noqa: E501
:type: str
"""
self._level = level
@property
def create_time(self):
"""Gets the create_time of this V1Activity. # noqa: E501
The create time of the activity. # noqa: E501
:return: The create_time of this V1Activity. # noqa: E501
:rtype: datetime
"""
return self._create_time
@create_time.setter
def create_time(self, create_time):
"""Sets the create_time of this V1Activity.
The create time of the activity. # noqa: E501
:param create_time: The create_time of this V1Activity. # noqa: E501
:type: datetime
"""
self._create_time = create_time
@property
def payload(self):
"""Gets the payload of this V1Activity. # noqa: E501
:return: The payload of this V1Activity. # noqa: E501
:rtype: Apiv1ActivityPayload
"""
return self._payload
@payload.setter
def payload(self, payload):
"""Sets the payload of this V1Activity.
:param payload: The payload of this V1Activity. # noqa: E501
:type: Apiv1ActivityPayload
"""
self._payload = payload
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(V1Activity, 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, V1Activity):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other