python-gitea/gitea/models/create_push_mirror_option.py
2025-10-21 21:45:29 +02:00

228 lines
6.6 KiB
Python

# 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 CreatePushMirrorOption(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 = {
'interval': 'str',
'remote_address': 'str',
'remote_password': 'str',
'remote_username': 'str',
'sync_on_commit': 'bool'
}
attribute_map = {
'interval': 'interval',
'remote_address': 'remote_address',
'remote_password': 'remote_password',
'remote_username': 'remote_username',
'sync_on_commit': 'sync_on_commit'
}
def __init__(self, interval=None, remote_address=None, remote_password=None, remote_username=None, sync_on_commit=None, _configuration=None): # noqa: E501
"""CreatePushMirrorOption - a model defined in Swagger""" # noqa: E501
if _configuration is None:
_configuration = Configuration()
self._configuration = _configuration
self._interval = None
self._remote_address = None
self._remote_password = None
self._remote_username = None
self._sync_on_commit = None
self.discriminator = None
if interval is not None:
self.interval = interval
if remote_address is not None:
self.remote_address = remote_address
if remote_password is not None:
self.remote_password = remote_password
if remote_username is not None:
self.remote_username = remote_username
if sync_on_commit is not None:
self.sync_on_commit = sync_on_commit
@property
def interval(self):
"""Gets the interval of this CreatePushMirrorOption. # noqa: E501
:return: The interval of this CreatePushMirrorOption. # noqa: E501
:rtype: str
"""
return self._interval
@interval.setter
def interval(self, interval):
"""Sets the interval of this CreatePushMirrorOption.
:param interval: The interval of this CreatePushMirrorOption. # noqa: E501
:type: str
"""
self._interval = interval
@property
def remote_address(self):
"""Gets the remote_address of this CreatePushMirrorOption. # noqa: E501
:return: The remote_address of this CreatePushMirrorOption. # noqa: E501
:rtype: str
"""
return self._remote_address
@remote_address.setter
def remote_address(self, remote_address):
"""Sets the remote_address of this CreatePushMirrorOption.
:param remote_address: The remote_address of this CreatePushMirrorOption. # noqa: E501
:type: str
"""
self._remote_address = remote_address
@property
def remote_password(self):
"""Gets the remote_password of this CreatePushMirrorOption. # noqa: E501
:return: The remote_password of this CreatePushMirrorOption. # noqa: E501
:rtype: str
"""
return self._remote_password
@remote_password.setter
def remote_password(self, remote_password):
"""Sets the remote_password of this CreatePushMirrorOption.
:param remote_password: The remote_password of this CreatePushMirrorOption. # noqa: E501
:type: str
"""
self._remote_password = remote_password
@property
def remote_username(self):
"""Gets the remote_username of this CreatePushMirrorOption. # noqa: E501
:return: The remote_username of this CreatePushMirrorOption. # noqa: E501
:rtype: str
"""
return self._remote_username
@remote_username.setter
def remote_username(self, remote_username):
"""Sets the remote_username of this CreatePushMirrorOption.
:param remote_username: The remote_username of this CreatePushMirrorOption. # noqa: E501
:type: str
"""
self._remote_username = remote_username
@property
def sync_on_commit(self):
"""Gets the sync_on_commit of this CreatePushMirrorOption. # noqa: E501
:return: The sync_on_commit of this CreatePushMirrorOption. # 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 CreatePushMirrorOption.
:param sync_on_commit: The sync_on_commit of this CreatePushMirrorOption. # 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(CreatePushMirrorOption, 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, CreatePushMirrorOption):
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, CreatePushMirrorOption):
return True
return self.to_dict() != other.to_dict()