# coding: utf-8 """ Gitea API This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.23.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from gitea.configuration import Configuration class PushMirror(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 = { 'created': 'datetime', 'interval': 'str', 'last_error': 'str', 'last_update': 'datetime', 'remote_address': 'str', 'remote_name': 'str', 'repo_name': 'str', 'sync_on_commit': 'bool' } attribute_map = { 'created': 'created', 'interval': 'interval', 'last_error': 'last_error', 'last_update': 'last_update', 'remote_address': 'remote_address', 'remote_name': 'remote_name', 'repo_name': 'repo_name', 'sync_on_commit': 'sync_on_commit' } def __init__(self, created=None, interval=None, last_error=None, last_update=None, remote_address=None, remote_name=None, repo_name=None, sync_on_commit=None, _configuration=None): # noqa: E501 """PushMirror - a model defined in Swagger""" # noqa: E501 if _configuration is None: _configuration = Configuration() self._configuration = _configuration self._created = None self._interval = None self._last_error = None self._last_update = None self._remote_address = None self._remote_name = None self._repo_name = None self._sync_on_commit = None self.discriminator = None if created is not None: self.created = created if interval is not None: self.interval = interval if last_error is not None: self.last_error = last_error if last_update is not None: self.last_update = last_update if remote_address is not None: self.remote_address = remote_address if remote_name is not None: self.remote_name = remote_name if repo_name is not None: self.repo_name = repo_name if sync_on_commit is not None: self.sync_on_commit = sync_on_commit @property def created(self): """Gets the created of this PushMirror. # noqa: E501 :return: The created of this PushMirror. # noqa: E501 :rtype: datetime """ return self._created @created.setter def created(self, created): """Sets the created of this PushMirror. :param created: The created of this PushMirror. # noqa: E501 :type: datetime """ self._created = created @property def interval(self): """Gets the interval of this PushMirror. # noqa: E501 :return: The interval of this PushMirror. # noqa: E501 :rtype: str """ return self._interval @interval.setter def interval(self, interval): """Sets the interval of this PushMirror. :param interval: The interval of this PushMirror. # noqa: E501 :type: str """ self._interval = interval @property def last_error(self): """Gets the last_error of this PushMirror. # noqa: E501 :return: The last_error of this PushMirror. # noqa: E501 :rtype: str """ return self._last_error @last_error.setter def last_error(self, last_error): """Sets the last_error of this PushMirror. :param last_error: The last_error of this PushMirror. # noqa: E501 :type: str """ self._last_error = last_error @property def last_update(self): """Gets the last_update of this PushMirror. # noqa: E501 :return: The last_update of this PushMirror. # noqa: E501 :rtype: datetime """ return self._last_update @last_update.setter def last_update(self, last_update): """Sets the last_update of this PushMirror. :param last_update: The last_update of this PushMirror. # noqa: E501 :type: datetime """ self._last_update = last_update @property def remote_address(self): """Gets the remote_address of this PushMirror. # noqa: E501 :return: The remote_address of this PushMirror. # noqa: E501 :rtype: str """ return self._remote_address @remote_address.setter def remote_address(self, remote_address): """Sets the remote_address of this PushMirror. :param remote_address: The remote_address of this PushMirror. # noqa: E501 :type: str """ self._remote_address = remote_address @property def remote_name(self): """Gets the remote_name of this PushMirror. # noqa: E501 :return: The remote_name of this PushMirror. # noqa: E501 :rtype: str """ return self._remote_name @remote_name.setter def remote_name(self, remote_name): """Sets the remote_name of this PushMirror. :param remote_name: The remote_name of this PushMirror. # noqa: E501 :type: str """ self._remote_name = remote_name @property def repo_name(self): """Gets the repo_name of this PushMirror. # noqa: E501 :return: The repo_name of this PushMirror. # noqa: E501 :rtype: str """ return self._repo_name @repo_name.setter def repo_name(self, repo_name): """Sets the repo_name of this PushMirror. :param repo_name: The repo_name of this PushMirror. # noqa: E501 :type: str """ self._repo_name = repo_name @property def sync_on_commit(self): """Gets the sync_on_commit of this PushMirror. # noqa: E501 :return: The sync_on_commit of this PushMirror. # noqa: E501 :rtype: bool """ return self._sync_on_commit @sync_on_commit.setter def sync_on_commit(self, sync_on_commit): """Sets the sync_on_commit of this PushMirror. :param sync_on_commit: The sync_on_commit of this PushMirror. # noqa: E501 :type: bool """ self._sync_on_commit = sync_on_commit 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(PushMirror, 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, PushMirror): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, PushMirror): return True return self.to_dict() != other.to_dict()