Automatically generated Python client for Gitea. DO NOT UPDATE MANUALLY!!!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

717 lines
18 KiB

# coding: utf-8
"""
Gitea API.
This documentation describes the Gitea API. # noqa: E501
OpenAPI spec version: 1.1.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from swagger_client.models.permission import Permission # noqa: F401,E501
from swagger_client.models.repository import Repository # noqa: F401,E501
from swagger_client.models.user import User # noqa: F401,E501
class Repository(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 = {
'archived': 'bool',
'clone_url': 'str',
'created_at': 'datetime',
'default_branch': 'str',
'description': 'str',
'empty': 'bool',
'fork': 'bool',
'forks_count': 'int',
'full_name': 'str',
'html_url': 'str',
'id': 'int',
'mirror': 'bool',
'name': 'str',
'open_issues_count': 'int',
'owner': 'User',
'parent': 'Repository',
'permissions': 'Permission',
'private': 'bool',
'size': 'int',
'ssh_url': 'str',
'stars_count': 'int',
'updated_at': 'datetime',
'watchers_count': 'int',
'website': 'str'
}
attribute_map = {
'archived': 'archived',
'clone_url': 'clone_url',
'created_at': 'created_at',
'default_branch': 'default_branch',
'description': 'description',
'empty': 'empty',
'fork': 'fork',
'forks_count': 'forks_count',
'full_name': 'full_name',
'html_url': 'html_url',
'id': 'id',
'mirror': 'mirror',
'name': 'name',
'open_issues_count': 'open_issues_count',
'owner': 'owner',
'parent': 'parent',
'permissions': 'permissions',
'private': 'private',
'size': 'size',
'ssh_url': 'ssh_url',
'stars_count': 'stars_count',
'updated_at': 'updated_at',
'watchers_count': 'watchers_count',
'website': 'website'
}
def __init__(self, archived=None, clone_url=None, created_at=None, default_branch=None, description=None, empty=None, fork=None, forks_count=None, full_name=None, html_url=None, id=None, mirror=None, name=None, open_issues_count=None, owner=None, parent=None, permissions=None, private=None, size=None, ssh_url=None, stars_count=None, updated_at=None, watchers_count=None, website=None): # noqa: E501
"""Repository - a model defined in Swagger""" # noqa: E501
self._archived = None
self._clone_url = None
self._created_at = None
self._default_branch = None
self._description = None
self._empty = None
self._fork = None
self._forks_count = None
self._full_name = None
self._html_url = None
self._id = None
self._mirror = None
self._name = None
self._open_issues_count = None
self._owner = None
self._parent = None
self._permissions = None
self._private = None
self._size = None
self._ssh_url = None
self._stars_count = None
self._updated_at = None
self._watchers_count = None
self._website = None
self.discriminator = None
if archived is not None:
self.archived = archived
if clone_url is not None:
self.clone_url = clone_url
if created_at is not None:
self.created_at = created_at
if default_branch is not None:
self.default_branch = default_branch
if description is not None:
self.description = description
if empty is not None:
self.empty = empty
if fork is not None:
self.fork = fork
if forks_count is not None:
self.forks_count = forks_count
if full_name is not None:
self.full_name = full_name
if html_url is not None:
self.html_url = html_url
if id is not None:
self.id = id
if mirror is not None:
self.mirror = mirror
if name is not None:
self.name = name
if open_issues_count is not None:
self.open_issues_count = open_issues_count
if owner is not None:
self.owner = owner
if parent is not None:
self.parent = parent
if permissions is not None:
self.permissions = permissions
if private is not None:
self.private = private
if size is not None:
self.size = size
if ssh_url is not None:
self.ssh_url = ssh_url
if stars_count is not None:
self.stars_count = stars_count
if updated_at is not None:
self.updated_at = updated_at
if watchers_count is not None:
self.watchers_count = watchers_count
if website is not None:
self.website = website
@property
def archived(self):
"""Gets the archived of this Repository. # noqa: E501
:return: The archived of this Repository. # noqa: E501
:rtype: bool
"""
return self._archived
@archived.setter
def archived(self, archived):
"""Sets the archived of this Repository.
:param archived: The archived of this Repository. # noqa: E501
:type: bool
"""
self._archived = archived
@property
def clone_url(self):
"""Gets the clone_url of this Repository. # noqa: E501
:return: The clone_url of this Repository. # noqa: E501
:rtype: str
"""
return self._clone_url
@clone_url.setter
def clone_url(self, clone_url):
"""Sets the clone_url of this Repository.
:param clone_url: The clone_url of this Repository. # noqa: E501
:type: str
"""
self._clone_url = clone_url
@property
def created_at(self):
"""Gets the created_at of this Repository. # noqa: E501
:return: The created_at of this Repository. # noqa: E501
:rtype: datetime
"""
return self._created_at
@created_at.setter
def created_at(self, created_at):
"""Sets the created_at of this Repository.
:param created_at: The created_at of this Repository. # noqa: E501
:type: datetime
"""
self._created_at = created_at
@property
def default_branch(self):
"""Gets the default_branch of this Repository. # noqa: E501
:return: The default_branch of this Repository. # noqa: E501
:rtype: str
"""
return self._default_branch
@default_branch.setter
def default_branch(self, default_branch):
"""Sets the default_branch of this Repository.
:param default_branch: The default_branch of this Repository. # noqa: E501
:type: str
"""
self._default_branch = default_branch
@property
def description(self):
"""Gets the description of this Repository. # noqa: E501
:return: The description of this Repository. # noqa: E501
:rtype: str
"""
return self._description
@description.setter
def description(self, description):
"""Sets the description of this Repository.
:param description: The description of this Repository. # noqa: E501
:type: str
"""
self._description = description
@property
def empty(self):
"""Gets the empty of this Repository. # noqa: E501
:return: The empty of this Repository. # noqa: E501
:rtype: bool
"""
return self._empty
@empty.setter
def empty(self, empty):
"""Sets the empty of this Repository.
:param empty: The empty of this Repository. # noqa: E501
:type: bool
"""
self._empty = empty
@property
def fork(self):
"""Gets the fork of this Repository. # noqa: E501
:return: The fork of this Repository. # noqa: E501
:rtype: bool
"""
return self._fork
@fork.setter
def fork(self, fork):
"""Sets the fork of this Repository.
:param fork: The fork of this Repository. # noqa: E501
:type: bool
"""
self._fork = fork
@property
def forks_count(self):
"""Gets the forks_count of this Repository. # noqa: E501
:return: The forks_count of this Repository. # noqa: E501
:rtype: int
"""
return self._forks_count
@forks_count.setter
def forks_count(self, forks_count):
"""Sets the forks_count of this Repository.
:param forks_count: The forks_count of this Repository. # noqa: E501
:type: int
"""
self._forks_count = forks_count
@property
def full_name(self):
"""Gets the full_name of this Repository. # noqa: E501
:return: The full_name of this Repository. # noqa: E501
:rtype: str
"""
return self._full_name
@full_name.setter
def full_name(self, full_name):
"""Sets the full_name of this Repository.
:param full_name: The full_name of this Repository. # noqa: E501
:type: str
"""
self._full_name = full_name
@property
def html_url(self):
"""Gets the html_url of this Repository. # noqa: E501
:return: The html_url of this Repository. # noqa: E501
:rtype: str
"""
return self._html_url
@html_url.setter
def html_url(self, html_url):
"""Sets the html_url of this Repository.
:param html_url: The html_url of this Repository. # noqa: E501
:type: str
"""
self._html_url = html_url
@property
def id(self):
"""Gets the id of this Repository. # noqa: E501
:return: The id of this Repository. # noqa: E501
:rtype: int
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this Repository.
:param id: The id of this Repository. # noqa: E501
:type: int
"""
self._id = id
@property
def mirror(self):
"""Gets the mirror of this Repository. # noqa: E501
:return: The mirror of this Repository. # noqa: E501
:rtype: bool
"""
return self._mirror
@mirror.setter
def mirror(self, mirror):
"""Sets the mirror of this Repository.
:param mirror: The mirror of this Repository. # noqa: E501
:type: bool
"""
self._mirror = mirror
@property
def name(self):
"""Gets the name of this Repository. # noqa: E501
:return: The name of this Repository. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this Repository.
:param name: The name of this Repository. # noqa: E501
:type: str
"""
self._name = name
@property
def open_issues_count(self):
"""Gets the open_issues_count of this Repository. # noqa: E501
:return: The open_issues_count of this Repository. # noqa: E501
:rtype: int
"""
return self._open_issues_count
@open_issues_count.setter
def open_issues_count(self, open_issues_count):
"""Sets the open_issues_count of this Repository.
:param open_issues_count: The open_issues_count of this Repository. # noqa: E501
:type: int
"""
self._open_issues_count = open_issues_count
@property
def owner(self):
"""Gets the owner of this Repository. # noqa: E501
:return: The owner of this Repository. # noqa: E501
:rtype: User
"""
return self._owner
@owner.setter
def owner(self, owner):
"""Sets the owner of this Repository.
:param owner: The owner of this Repository. # noqa: E501
:type: User
"""
self._owner = owner
@property
def parent(self):
"""Gets the parent of this Repository. # noqa: E501
:return: The parent of this Repository. # noqa: E501
:rtype: Repository
"""
return self._parent
@parent.setter
def parent(self, parent):
"""Sets the parent of this Repository.
:param parent: The parent of this Repository. # noqa: E501
:type: Repository
"""
self._parent = parent
@property
def permissions(self):
"""Gets the permissions of this Repository. # noqa: E501
:return: The permissions of this Repository. # noqa: E501
:rtype: Permission
"""
return self._permissions
@permissions.setter
def permissions(self, permissions):
"""Sets the permissions of this Repository.
:param permissions: The permissions of this Repository. # noqa: E501
:type: Permission
"""
self._permissions = permissions
@property
def private(self):
"""Gets the private of this Repository. # noqa: E501
:return: The private of this Repository. # noqa: E501
:rtype: bool
"""
return self._private
@private.setter
def private(self, private):
"""Sets the private of this Repository.
:param private: The private of this Repository. # noqa: E501
:type: bool
"""
self._private = private
@property
def size(self):
"""Gets the size of this Repository. # noqa: E501
:return: The size of this Repository. # noqa: E501
:rtype: int
"""
return self._size
@size.setter
def size(self, size):
"""Sets the size of this Repository.
:param size: The size of this Repository. # noqa: E501
:type: int
"""
self._size = size
@property
def ssh_url(self):
"""Gets the ssh_url of this Repository. # noqa: E501
:return: The ssh_url of this Repository. # noqa: E501
:rtype: str
"""
return self._ssh_url
@ssh_url.setter
def ssh_url(self, ssh_url):
"""Sets the ssh_url of this Repository.
:param ssh_url: The ssh_url of this Repository. # noqa: E501
:type: str
"""
self._ssh_url = ssh_url
@property
def stars_count(self):
"""Gets the stars_count of this Repository. # noqa: E501
:return: The stars_count of this Repository. # noqa: E501
:rtype: int
"""
return self._stars_count
@stars_count.setter
def stars_count(self, stars_count):
"""Sets the stars_count of this Repository.
:param stars_count: The stars_count of this Repository. # noqa: E501
:type: int
"""
self._stars_count = stars_count
@property
def updated_at(self):
"""Gets the updated_at of this Repository. # noqa: E501
:return: The updated_at of this Repository. # noqa: E501
:rtype: datetime
"""
return self._updated_at
@updated_at.setter
def updated_at(self, updated_at):
"""Sets the updated_at of this Repository.
:param updated_at: The updated_at of this Repository. # noqa: E501
:type: datetime
"""
self._updated_at = updated_at
@property
def watchers_count(self):
"""Gets the watchers_count of this Repository. # noqa: E501
:return: The watchers_count of this Repository. # noqa: E501
:rtype: int
"""
return self._watchers_count
@watchers_count.setter
def watchers_count(self, watchers_count):
"""Sets the watchers_count of this Repository.
:param watchers_count: The watchers_count of this Repository. # noqa: E501
:type: int
"""
self._watchers_count = watchers_count
@property
def website(self):
"""Gets the website of this Repository. # noqa: E501
:return: The website of this Repository. # noqa: E501
:rtype: str
"""
return self._website
@website.setter
def website(self, website):
"""Sets the website of this Repository.
:param website: The website of this Repository. # noqa: E501
:type: str
"""
self._website = website
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(Repository, 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, Repository):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other