# coding: utf-8 """ eLabFTW REST API v2 Documentation This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class Upload(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', 'real_name': 'str', 'long_name': 'str', 'comment': 'str', 'item_id': 'int', 'userid': 'int', 'type': 'str', 'created_at': 'str', 'hash': 'str', 'hash_algorithm': 'str', 'storage': 'int', 'filesize': 'int', 'state': 'int', 'immutable': 'int', 'fullname': 'str' } attribute_map = { 'id': 'id', 'real_name': 'real_name', 'long_name': 'long_name', 'comment': 'comment', 'item_id': 'item_id', 'userid': 'userid', 'type': 'type', 'created_at': 'created_at', 'hash': 'hash', 'hash_algorithm': 'hash_algorithm', 'storage': 'storage', 'filesize': 'filesize', 'state': 'state', 'immutable': 'immutable', 'fullname': 'fullname' } def __init__(self, id=None, real_name=None, long_name=None, comment=None, item_id=None, userid=None, type=None, created_at=None, hash=None, hash_algorithm=None, storage=None, filesize=None, state=None, immutable=None, fullname=None): # noqa: E501 """Upload - a model defined in Swagger""" # noqa: E501 self._id = None self._real_name = None self._long_name = None self._comment = None self._item_id = None self._userid = None self._type = None self._created_at = None self._hash = None self._hash_algorithm = None self._storage = None self._filesize = None self._state = None self._immutable = None self._fullname = None self.discriminator = None if id is not None: self.id = id if real_name is not None: self.real_name = real_name if long_name is not None: self.long_name = long_name if comment is not None: self.comment = comment if item_id is not None: self.item_id = item_id if userid is not None: self.userid = userid if type is not None: self.type = type if created_at is not None: self.created_at = created_at if hash is not None: self.hash = hash if hash_algorithm is not None: self.hash_algorithm = hash_algorithm if storage is not None: self.storage = storage if filesize is not None: self.filesize = filesize if state is not None: self.state = state if immutable is not None: self.immutable = immutable if fullname is not None: self.fullname = fullname @property def id(self): """Gets the id of this Upload. # noqa: E501 :return: The id of this Upload. # noqa: E501 :rtype: int """ return self._id @id.setter def id(self, id): """Sets the id of this Upload. :param id: The id of this Upload. # noqa: E501 :type: int """ self._id = id @property def real_name(self): """Gets the real_name of this Upload. # noqa: E501 :return: The real_name of this Upload. # noqa: E501 :rtype: str """ return self._real_name @real_name.setter def real_name(self, real_name): """Sets the real_name of this Upload. :param real_name: The real_name of this Upload. # noqa: E501 :type: str """ self._real_name = real_name @property def long_name(self): """Gets the long_name of this Upload. # noqa: E501 :return: The long_name of this Upload. # noqa: E501 :rtype: str """ return self._long_name @long_name.setter def long_name(self, long_name): """Sets the long_name of this Upload. :param long_name: The long_name of this Upload. # noqa: E501 :type: str """ self._long_name = long_name @property def comment(self): """Gets the comment of this Upload. # noqa: E501 :return: The comment of this Upload. # noqa: E501 :rtype: str """ return self._comment @comment.setter def comment(self, comment): """Sets the comment of this Upload. :param comment: The comment of this Upload. # noqa: E501 :type: str """ self._comment = comment @property def item_id(self): """Gets the item_id of this Upload. # noqa: E501 :return: The item_id of this Upload. # noqa: E501 :rtype: int """ return self._item_id @item_id.setter def item_id(self, item_id): """Sets the item_id of this Upload. :param item_id: The item_id of this Upload. # noqa: E501 :type: int """ self._item_id = item_id @property def userid(self): """Gets the userid of this Upload. # noqa: E501 :return: The userid of this Upload. # noqa: E501 :rtype: int """ return self._userid @userid.setter def userid(self, userid): """Sets the userid of this Upload. :param userid: The userid of this Upload. # noqa: E501 :type: int """ self._userid = userid @property def type(self): """Gets the type of this Upload. # noqa: E501 :return: The type of this Upload. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this Upload. :param type: The type of this Upload. # noqa: E501 :type: str """ self._type = type @property def created_at(self): """Gets the created_at of this Upload. # noqa: E501 :return: The created_at of this Upload. # noqa: E501 :rtype: str """ return self._created_at @created_at.setter def created_at(self, created_at): """Sets the created_at of this Upload. :param created_at: The created_at of this Upload. # noqa: E501 :type: str """ self._created_at = created_at @property def hash(self): """Gets the hash of this Upload. # noqa: E501 :return: The hash of this Upload. # noqa: E501 :rtype: str """ return self._hash @hash.setter def hash(self, hash): """Sets the hash of this Upload. :param hash: The hash of this Upload. # noqa: E501 :type: str """ self._hash = hash @property def hash_algorithm(self): """Gets the hash_algorithm of this Upload. # noqa: E501 :return: The hash_algorithm of this Upload. # noqa: E501 :rtype: str """ return self._hash_algorithm @hash_algorithm.setter def hash_algorithm(self, hash_algorithm): """Sets the hash_algorithm of this Upload. :param hash_algorithm: The hash_algorithm of this Upload. # noqa: E501 :type: str """ self._hash_algorithm = hash_algorithm @property def storage(self): """Gets the storage of this Upload. # noqa: E501 :return: The storage of this Upload. # noqa: E501 :rtype: int """ return self._storage @storage.setter def storage(self, storage): """Sets the storage of this Upload. :param storage: The storage of this Upload. # noqa: E501 :type: int """ self._storage = storage @property def filesize(self): """Gets the filesize of this Upload. # noqa: E501 :return: The filesize of this Upload. # noqa: E501 :rtype: int """ return self._filesize @filesize.setter def filesize(self, filesize): """Sets the filesize of this Upload. :param filesize: The filesize of this Upload. # noqa: E501 :type: int """ self._filesize = filesize @property def state(self): """Gets the state of this Upload. # noqa: E501 :return: The state of this Upload. # noqa: E501 :rtype: int """ return self._state @state.setter def state(self, state): """Sets the state of this Upload. :param state: The state of this Upload. # noqa: E501 :type: int """ self._state = state @property def immutable(self): """Gets the immutable of this Upload. # noqa: E501 :return: The immutable of this Upload. # noqa: E501 :rtype: int """ return self._immutable @immutable.setter def immutable(self, immutable): """Sets the immutable of this Upload. :param immutable: The immutable of this Upload. # noqa: E501 :type: int """ self._immutable = immutable @property def fullname(self): """Gets the fullname of this Upload. # noqa: E501 :return: The fullname of this Upload. # noqa: E501 :rtype: str """ return self._fullname @fullname.setter def fullname(self, fullname): """Sets the fullname of this Upload. :param fullname: The fullname of this Upload. # noqa: E501 :type: str """ self._fullname = fullname 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(Upload, 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, Upload): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other