Vašek Šraier
6 years ago
46 changed files with 3454 additions and 18 deletions
@ -0,0 +1,16 @@ |
|||||
|
# Commit |
||||
|
|
||||
|
## Properties |
||||
|
Name | Type | Description | Notes |
||||
|
------------ | ------------- | ------------- | ------------- |
||||
|
**author** | [**User**](User.md) | | [optional] |
||||
|
**commit** | [**RepoCommit**](RepoCommit.md) | | [optional] |
||||
|
**committer** | [**User**](User.md) | | [optional] |
||||
|
**html_url** | **str** | | [optional] |
||||
|
**parents** | [**list[CommitMeta]**](CommitMeta.md) | | [optional] |
||||
|
**sha** | **str** | | [optional] |
||||
|
**url** | **str** | | [optional] |
||||
|
|
||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
||||
|
|
||||
|
|
@ -0,0 +1,11 @@ |
|||||
|
# CommitMeta |
||||
|
|
||||
|
## Properties |
||||
|
Name | Type | Description | Notes |
||||
|
------------ | ------------- | ------------- | ------------- |
||||
|
**sha** | **str** | | [optional] |
||||
|
**url** | **str** | | [optional] |
||||
|
|
||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
||||
|
|
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
# CommitUser |
||||
|
|
||||
|
## Properties |
||||
|
Name | Type | Description | Notes |
||||
|
------------ | ------------- | ------------- | ------------- |
||||
|
**_date** | **str** | | [optional] |
||||
|
**email** | **str** | | [optional] |
||||
|
**name** | **str** | | [optional] |
||||
|
|
||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
||||
|
|
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
# MergePullRequestOption |
||||
|
|
||||
|
## Properties |
||||
|
Name | Type | Description | Notes |
||||
|
------------ | ------------- | ------------- | ------------- |
||||
|
**do** | **str** | | |
||||
|
**merge_message_field** | **str** | | [optional] |
||||
|
**merge_title_field** | **str** | | [optional] |
||||
|
|
||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
||||
|
|
||||
|
|
@ -0,0 +1,14 @@ |
|||||
|
# RepoCommit |
||||
|
|
||||
|
## Properties |
||||
|
Name | Type | Description | Notes |
||||
|
------------ | ------------- | ------------- | ------------- |
||||
|
**author** | [**CommitUser**](CommitUser.md) | | [optional] |
||||
|
**committer** | [**CommitUser**](CommitUser.md) | | [optional] |
||||
|
**message** | **str** | | [optional] |
||||
|
**tree** | [**CommitMeta**](CommitMeta.md) | | [optional] |
||||
|
**url** | **str** | | [optional] |
||||
|
|
||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
||||
|
|
||||
|
|
@ -0,0 +1,13 @@ |
|||||
|
# Tag |
||||
|
|
||||
|
## Properties |
||||
|
Name | Type | Description | Notes |
||||
|
------------ | ------------- | ------------- | ------------- |
||||
|
**commit** | [**TagCommit**](TagCommit.md) | | [optional] |
||||
|
**name** | **str** | | [optional] |
||||
|
**tarball_url** | **str** | | [optional] |
||||
|
**zipball_url** | **str** | | [optional] |
||||
|
|
||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
||||
|
|
||||
|
|
@ -0,0 +1,11 @@ |
|||||
|
# TagCommit |
||||
|
|
||||
|
## Properties |
||||
|
Name | Type | Description | Notes |
||||
|
------------ | ------------- | ------------- | ------------- |
||||
|
**sha** | **str** | | [optional] |
||||
|
**url** | **str** | | [optional] |
||||
|
|
||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
||||
|
|
||||
|
|
@ -0,0 +1,275 @@ |
|||||
|
# 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.commit_meta import CommitMeta # noqa: F401,E501 |
||||
|
from swagger_client.models.repo_commit import RepoCommit # noqa: F401,E501 |
||||
|
from swagger_client.models.user import User # noqa: F401,E501 |
||||
|
|
||||
|
|
||||
|
class Commit(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 = { |
||||
|
'author': 'User', |
||||
|
'commit': 'RepoCommit', |
||||
|
'committer': 'User', |
||||
|
'html_url': 'str', |
||||
|
'parents': 'list[CommitMeta]', |
||||
|
'sha': 'str', |
||||
|
'url': 'str' |
||||
|
} |
||||
|
|
||||
|
attribute_map = { |
||||
|
'author': 'author', |
||||
|
'commit': 'commit', |
||||
|
'committer': 'committer', |
||||
|
'html_url': 'html_url', |
||||
|
'parents': 'parents', |
||||
|
'sha': 'sha', |
||||
|
'url': 'url' |
||||
|
} |
||||
|
|
||||
|
def __init__(self, author=None, commit=None, committer=None, html_url=None, parents=None, sha=None, url=None): # noqa: E501 |
||||
|
"""Commit - a model defined in Swagger""" # noqa: E501 |
||||
|
|
||||
|
self._author = None |
||||
|
self._commit = None |
||||
|
self._committer = None |
||||
|
self._html_url = None |
||||
|
self._parents = None |
||||
|
self._sha = None |
||||
|
self._url = None |
||||
|
self.discriminator = None |
||||
|
|
||||
|
if author is not None: |
||||
|
self.author = author |
||||
|
if commit is not None: |
||||
|
self.commit = commit |
||||
|
if committer is not None: |
||||
|
self.committer = committer |
||||
|
if html_url is not None: |
||||
|
self.html_url = html_url |
||||
|
if parents is not None: |
||||
|
self.parents = parents |
||||
|
if sha is not None: |
||||
|
self.sha = sha |
||||
|
if url is not None: |
||||
|
self.url = url |
||||
|
|
||||
|
@property |
||||
|
def author(self): |
||||
|
"""Gets the author of this Commit. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The author of this Commit. # noqa: E501 |
||||
|
:rtype: User |
||||
|
""" |
||||
|
return self._author |
||||
|
|
||||
|
@author.setter |
||||
|
def author(self, author): |
||||
|
"""Sets the author of this Commit. |
||||
|
|
||||
|
|
||||
|
:param author: The author of this Commit. # noqa: E501 |
||||
|
:type: User |
||||
|
""" |
||||
|
|
||||
|
self._author = author |
||||
|
|
||||
|
@property |
||||
|
def commit(self): |
||||
|
"""Gets the commit of this Commit. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The commit of this Commit. # noqa: E501 |
||||
|
:rtype: RepoCommit |
||||
|
""" |
||||
|
return self._commit |
||||
|
|
||||
|
@commit.setter |
||||
|
def commit(self, commit): |
||||
|
"""Sets the commit of this Commit. |
||||
|
|
||||
|
|
||||
|
:param commit: The commit of this Commit. # noqa: E501 |
||||
|
:type: RepoCommit |
||||
|
""" |
||||
|
|
||||
|
self._commit = commit |
||||
|
|
||||
|
@property |
||||
|
def committer(self): |
||||
|
"""Gets the committer of this Commit. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The committer of this Commit. # noqa: E501 |
||||
|
:rtype: User |
||||
|
""" |
||||
|
return self._committer |
||||
|
|
||||
|
@committer.setter |
||||
|
def committer(self, committer): |
||||
|
"""Sets the committer of this Commit. |
||||
|
|
||||
|
|
||||
|
:param committer: The committer of this Commit. # noqa: E501 |
||||
|
:type: User |
||||
|
""" |
||||
|
|
||||
|
self._committer = committer |
||||
|
|
||||
|
@property |
||||
|
def html_url(self): |
||||
|
"""Gets the html_url of this Commit. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The html_url of this Commit. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._html_url |
||||
|
|
||||
|
@html_url.setter |
||||
|
def html_url(self, html_url): |
||||
|
"""Sets the html_url of this Commit. |
||||
|
|
||||
|
|
||||
|
:param html_url: The html_url of this Commit. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._html_url = html_url |
||||
|
|
||||
|
@property |
||||
|
def parents(self): |
||||
|
"""Gets the parents of this Commit. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The parents of this Commit. # noqa: E501 |
||||
|
:rtype: list[CommitMeta] |
||||
|
""" |
||||
|
return self._parents |
||||
|
|
||||
|
@parents.setter |
||||
|
def parents(self, parents): |
||||
|
"""Sets the parents of this Commit. |
||||
|
|
||||
|
|
||||
|
:param parents: The parents of this Commit. # noqa: E501 |
||||
|
:type: list[CommitMeta] |
||||
|
""" |
||||
|
|
||||
|
self._parents = parents |
||||
|
|
||||
|
@property |
||||
|
def sha(self): |
||||
|
"""Gets the sha of this Commit. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The sha of this Commit. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._sha |
||||
|
|
||||
|
@sha.setter |
||||
|
def sha(self, sha): |
||||
|
"""Sets the sha of this Commit. |
||||
|
|
||||
|
|
||||
|
:param sha: The sha of this Commit. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._sha = sha |
||||
|
|
||||
|
@property |
||||
|
def url(self): |
||||
|
"""Gets the url of this Commit. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The url of this Commit. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._url |
||||
|
|
||||
|
@url.setter |
||||
|
def url(self, url): |
||||
|
"""Sets the url of this Commit. |
||||
|
|
||||
|
|
||||
|
:param url: The url of this Commit. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._url = url |
||||
|
|
||||
|
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(Commit, 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, Commit): |
||||
|
return False |
||||
|
|
||||
|
return self.__dict__ == other.__dict__ |
||||
|
|
||||
|
def __ne__(self, other): |
||||
|
"""Returns true if both objects are not equal""" |
||||
|
return not self == other |
@ -0,0 +1,141 @@ |
|||||
|
# 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 |
||||
|
|
||||
|
|
||||
|
class CommitMeta(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 = { |
||||
|
'sha': 'str', |
||||
|
'url': 'str' |
||||
|
} |
||||
|
|
||||
|
attribute_map = { |
||||
|
'sha': 'sha', |
||||
|
'url': 'url' |
||||
|
} |
||||
|
|
||||
|
def __init__(self, sha=None, url=None): # noqa: E501 |
||||
|
"""CommitMeta - a model defined in Swagger""" # noqa: E501 |
||||
|
|
||||
|
self._sha = None |
||||
|
self._url = None |
||||
|
self.discriminator = None |
||||
|
|
||||
|
if sha is not None: |
||||
|
self.sha = sha |
||||
|
if url is not None: |
||||
|
self.url = url |
||||
|
|
||||
|
@property |
||||
|
def sha(self): |
||||
|
"""Gets the sha of this CommitMeta. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The sha of this CommitMeta. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._sha |
||||
|
|
||||
|
@sha.setter |
||||
|
def sha(self, sha): |
||||
|
"""Sets the sha of this CommitMeta. |
||||
|
|
||||
|
|
||||
|
:param sha: The sha of this CommitMeta. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._sha = sha |
||||
|
|
||||
|
@property |
||||
|
def url(self): |
||||
|
"""Gets the url of this CommitMeta. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The url of this CommitMeta. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._url |
||||
|
|
||||
|
@url.setter |
||||
|
def url(self, url): |
||||
|
"""Sets the url of this CommitMeta. |
||||
|
|
||||
|
|
||||
|
:param url: The url of this CommitMeta. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._url = url |
||||
|
|
||||
|
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(CommitMeta, 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, CommitMeta): |
||||
|
return False |
||||
|
|
||||
|
return self.__dict__ == other.__dict__ |
||||
|
|
||||
|
def __ne__(self, other): |
||||
|
"""Returns true if both objects are not equal""" |
||||
|
return not self == other |
@ -0,0 +1,167 @@ |
|||||
|
# 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 |
||||
|
|
||||
|
|
||||
|
class CommitUser(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 = { |
||||
|
'_date': 'str', |
||||
|
'email': 'str', |
||||
|
'name': 'str' |
||||
|
} |
||||
|
|
||||
|
attribute_map = { |
||||
|
'_date': 'date', |
||||
|
'email': 'email', |
||||
|
'name': 'name' |
||||
|
} |
||||
|
|
||||
|
def __init__(self, _date=None, email=None, name=None): # noqa: E501 |
||||
|
"""CommitUser - a model defined in Swagger""" # noqa: E501 |
||||
|
|
||||
|
self.__date = None |
||||
|
self._email = None |
||||
|
self._name = None |
||||
|
self.discriminator = None |
||||
|
|
||||
|
if _date is not None: |
||||
|
self._date = _date |
||||
|
if email is not None: |
||||
|
self.email = email |
||||
|
if name is not None: |
||||
|
self.name = name |
||||
|
|
||||
|
@property |
||||
|
def _date(self): |
||||
|
"""Gets the _date of this CommitUser. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The _date of this CommitUser. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self.__date |
||||
|
|
||||
|
@_date.setter |
||||
|
def _date(self, _date): |
||||
|
"""Sets the _date of this CommitUser. |
||||
|
|
||||
|
|
||||
|
:param _date: The _date of this CommitUser. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self.__date = _date |
||||
|
|
||||
|
@property |
||||
|
def email(self): |
||||
|
"""Gets the email of this CommitUser. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The email of this CommitUser. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._email |
||||
|
|
||||
|
@email.setter |
||||
|
def email(self, email): |
||||
|
"""Sets the email of this CommitUser. |
||||
|
|
||||
|
|
||||
|
:param email: The email of this CommitUser. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._email = email |
||||
|
|
||||
|
@property |
||||
|
def name(self): |
||||
|
"""Gets the name of this CommitUser. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The name of this CommitUser. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._name |
||||
|
|
||||
|
@name.setter |
||||
|
def name(self, name): |
||||
|
"""Sets the name of this CommitUser. |
||||
|
|
||||
|
|
||||
|
:param name: The name of this CommitUser. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._name = name |
||||
|
|
||||
|
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(CommitUser, 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, CommitUser): |
||||
|
return False |
||||
|
|
||||
|
return self.__dict__ == other.__dict__ |
||||
|
|
||||
|
def __ne__(self, other): |
||||
|
"""Returns true if both objects are not equal""" |
||||
|
return not self == other |
@ -0,0 +1,174 @@ |
|||||
|
# 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 |
||||
|
|
||||
|
|
||||
|
class MergePullRequestOption(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 = { |
||||
|
'do': 'str', |
||||
|
'merge_message_field': 'str', |
||||
|
'merge_title_field': 'str' |
||||
|
} |
||||
|
|
||||
|
attribute_map = { |
||||
|
'do': 'Do', |
||||
|
'merge_message_field': 'MergeMessageField', |
||||
|
'merge_title_field': 'MergeTitleField' |
||||
|
} |
||||
|
|
||||
|
def __init__(self, do=None, merge_message_field=None, merge_title_field=None): # noqa: E501 |
||||
|
"""MergePullRequestOption - a model defined in Swagger""" # noqa: E501 |
||||
|
|
||||
|
self._do = None |
||||
|
self._merge_message_field = None |
||||
|
self._merge_title_field = None |
||||
|
self.discriminator = None |
||||
|
|
||||
|
self.do = do |
||||
|
if merge_message_field is not None: |
||||
|
self.merge_message_field = merge_message_field |
||||
|
if merge_title_field is not None: |
||||
|
self.merge_title_field = merge_title_field |
||||
|
|
||||
|
@property |
||||
|
def do(self): |
||||
|
"""Gets the do of this MergePullRequestOption. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The do of this MergePullRequestOption. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._do |
||||
|
|
||||
|
@do.setter |
||||
|
def do(self, do): |
||||
|
"""Sets the do of this MergePullRequestOption. |
||||
|
|
||||
|
|
||||
|
:param do: The do of this MergePullRequestOption. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
if do is None: |
||||
|
raise ValueError("Invalid value for `do`, must not be `None`") # noqa: E501 |
||||
|
allowed_values = ["merge", "rebase", "rebase-merge", "squash"] # noqa: E501 |
||||
|
if do not in allowed_values: |
||||
|
raise ValueError( |
||||
|
"Invalid value for `do` ({0}), must be one of {1}" # noqa: E501 |
||||
|
.format(do, allowed_values) |
||||
|
) |
||||
|
|
||||
|
self._do = do |
||||
|
|
||||
|
@property |
||||
|
def merge_message_field(self): |
||||
|
"""Gets the merge_message_field of this MergePullRequestOption. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The merge_message_field of this MergePullRequestOption. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._merge_message_field |
||||
|
|
||||
|
@merge_message_field.setter |
||||
|
def merge_message_field(self, merge_message_field): |
||||
|
"""Sets the merge_message_field of this MergePullRequestOption. |
||||
|
|
||||
|
|
||||
|
:param merge_message_field: The merge_message_field of this MergePullRequestOption. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._merge_message_field = merge_message_field |
||||
|
|
||||
|
@property |
||||
|
def merge_title_field(self): |
||||
|
"""Gets the merge_title_field of this MergePullRequestOption. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The merge_title_field of this MergePullRequestOption. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._merge_title_field |
||||
|
|
||||
|
@merge_title_field.setter |
||||
|
def merge_title_field(self, merge_title_field): |
||||
|
"""Sets the merge_title_field of this MergePullRequestOption. |
||||
|
|
||||
|
|
||||
|
:param merge_title_field: The merge_title_field of this MergePullRequestOption. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._merge_title_field = merge_title_field |
||||
|
|
||||
|
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(MergePullRequestOption, 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, MergePullRequestOption): |
||||
|
return False |
||||
|
|
||||
|
return self.__dict__ == other.__dict__ |
||||
|
|
||||
|
def __ne__(self, other): |
||||
|
"""Returns true if both objects are not equal""" |
||||
|
return not self == other |
@ -0,0 +1,222 @@ |
|||||
|
# 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.commit_meta import CommitMeta # noqa: F401,E501 |
||||
|
from swagger_client.models.commit_user import CommitUser # noqa: F401,E501 |
||||
|
|
||||
|
|
||||
|
class RepoCommit(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 = { |
||||
|
'author': 'CommitUser', |
||||
|
'committer': 'CommitUser', |
||||
|
'message': 'str', |
||||
|
'tree': 'CommitMeta', |
||||
|
'url': 'str' |
||||
|
} |
||||
|
|
||||
|
attribute_map = { |
||||
|
'author': 'author', |
||||
|
'committer': 'committer', |
||||
|
'message': 'message', |
||||
|
'tree': 'tree', |
||||
|
'url': 'url' |
||||
|
} |
||||
|
|
||||
|
def __init__(self, author=None, committer=None, message=None, tree=None, url=None): # noqa: E501 |
||||
|
"""RepoCommit - a model defined in Swagger""" # noqa: E501 |
||||
|
|
||||
|
self._author = None |
||||
|
self._committer = None |
||||
|
self._message = None |
||||
|
self._tree = None |
||||
|
self._url = None |
||||
|
self.discriminator = None |
||||
|
|
||||
|
if author is not None: |
||||
|
self.author = author |
||||
|
if committer is not None: |
||||
|
self.committer = committer |
||||
|
if message is not None: |
||||
|
self.message = message |
||||
|
if tree is not None: |
||||
|
self.tree = tree |
||||
|
if url is not None: |
||||
|
self.url = url |
||||
|
|
||||
|
@property |
||||
|
def author(self): |
||||
|
"""Gets the author of this RepoCommit. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The author of this RepoCommit. # noqa: E501 |
||||
|
:rtype: CommitUser |
||||
|
""" |
||||
|
return self._author |
||||
|
|
||||
|
@author.setter |
||||
|
def author(self, author): |
||||
|
"""Sets the author of this RepoCommit. |
||||
|
|
||||
|
|
||||
|
:param author: The author of this RepoCommit. # noqa: E501 |
||||
|
:type: CommitUser |
||||
|
""" |
||||
|
|
||||
|
self._author = author |
||||
|
|
||||
|
@property |
||||
|
def committer(self): |
||||
|
"""Gets the committer of this RepoCommit. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The committer of this RepoCommit. # noqa: E501 |
||||
|
:rtype: CommitUser |
||||
|
""" |
||||
|
return self._committer |
||||
|
|
||||
|
@committer.setter |
||||
|
def committer(self, committer): |
||||
|
"""Sets the committer of this RepoCommit. |
||||
|
|
||||
|
|
||||
|
:param committer: The committer of this RepoCommit. # noqa: E501 |
||||
|
:type: CommitUser |
||||
|
""" |
||||
|
|
||||
|
self._committer = committer |
||||
|
|
||||
|
@property |
||||
|
def message(self): |
||||
|
"""Gets the message of this RepoCommit. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The message of this RepoCommit. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._message |
||||
|
|
||||
|
@message.setter |
||||
|
def message(self, message): |
||||
|
"""Sets the message of this RepoCommit. |
||||
|
|
||||
|
|
||||
|
:param message: The message of this RepoCommit. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._message = message |
||||
|
|
||||
|
@property |
||||
|
def tree(self): |
||||
|
"""Gets the tree of this RepoCommit. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The tree of this RepoCommit. # noqa: E501 |
||||
|
:rtype: CommitMeta |
||||
|
""" |
||||
|
return self._tree |
||||
|
|
||||
|
@tree.setter |
||||
|
def tree(self, tree): |
||||
|
"""Sets the tree of this RepoCommit. |
||||
|
|
||||
|
|
||||
|
:param tree: The tree of this RepoCommit. # noqa: E501 |
||||
|
:type: CommitMeta |
||||
|
""" |
||||
|
|
||||
|
self._tree = tree |
||||
|
|
||||
|
@property |
||||
|
def url(self): |
||||
|
"""Gets the url of this RepoCommit. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The url of this RepoCommit. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._url |
||||
|
|
||||
|
@url.setter |
||||
|
def url(self, url): |
||||
|
"""Sets the url of this RepoCommit. |
||||
|
|
||||
|
|
||||
|
:param url: The url of this RepoCommit. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._url = url |
||||
|
|
||||
|
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(RepoCommit, 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, RepoCommit): |
||||
|
return False |
||||
|
|
||||
|
return self.__dict__ == other.__dict__ |
||||
|
|
||||
|
def __ne__(self, other): |
||||
|
"""Returns true if both objects are not equal""" |
||||
|
return not self == other |
@ -0,0 +1,195 @@ |
|||||
|
# 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.tag_commit import TagCommit # noqa: F401,E501 |
||||
|
|
||||
|
|
||||
|
class Tag(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 = { |
||||
|
'commit': 'TagCommit', |
||||
|
'name': 'str', |
||||
|
'tarball_url': 'str', |
||||
|
'zipball_url': 'str' |
||||
|
} |
||||
|
|
||||
|
attribute_map = { |
||||
|
'commit': 'commit', |
||||
|
'name': 'name', |
||||
|
'tarball_url': 'tarball_url', |
||||
|
'zipball_url': 'zipball_url' |
||||
|
} |
||||
|
|
||||
|
def __init__(self, commit=None, name=None, tarball_url=None, zipball_url=None): # noqa: E501 |
||||
|
"""Tag - a model defined in Swagger""" # noqa: E501 |
||||
|
|
||||
|
self._commit = None |
||||
|
self._name = None |
||||
|
self._tarball_url = None |
||||
|
self._zipball_url = None |
||||
|
self.discriminator = None |
||||
|
|
||||
|
if commit is not None: |
||||
|
self.commit = commit |
||||
|
if name is not None: |
||||
|
self.name = name |
||||
|
if tarball_url is not None: |
||||
|
self.tarball_url = tarball_url |
||||
|
if zipball_url is not None: |
||||
|
self.zipball_url = zipball_url |
||||
|
|
||||
|
@property |
||||
|
def commit(self): |
||||
|
"""Gets the commit of this Tag. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The commit of this Tag. # noqa: E501 |
||||
|
:rtype: TagCommit |
||||
|
""" |
||||
|
return self._commit |
||||
|
|
||||
|
@commit.setter |
||||
|
def commit(self, commit): |
||||
|
"""Sets the commit of this Tag. |
||||
|
|
||||
|
|
||||
|
:param commit: The commit of this Tag. # noqa: E501 |
||||
|
:type: TagCommit |
||||
|
""" |
||||
|
|
||||
|
self._commit = commit |
||||
|
|
||||
|
@property |
||||
|
def name(self): |
||||
|
"""Gets the name of this Tag. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The name of this Tag. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._name |
||||
|
|
||||
|
@name.setter |
||||
|
def name(self, name): |
||||
|
"""Sets the name of this Tag. |
||||
|
|
||||
|
|
||||
|
:param name: The name of this Tag. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._name = name |
||||
|
|
||||
|
@property |
||||
|
def tarball_url(self): |
||||
|
"""Gets the tarball_url of this Tag. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The tarball_url of this Tag. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._tarball_url |
||||
|
|
||||
|
@tarball_url.setter |
||||
|
def tarball_url(self, tarball_url): |
||||
|
"""Sets the tarball_url of this Tag. |
||||
|
|
||||
|
|
||||
|
:param tarball_url: The tarball_url of this Tag. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._tarball_url = tarball_url |
||||
|
|
||||
|
@property |
||||
|
def zipball_url(self): |
||||
|
"""Gets the zipball_url of this Tag. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The zipball_url of this Tag. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._zipball_url |
||||
|
|
||||
|
@zipball_url.setter |
||||
|
def zipball_url(self, zipball_url): |
||||
|
"""Sets the zipball_url of this Tag. |
||||
|
|
||||
|
|
||||
|
:param zipball_url: The zipball_url of this Tag. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._zipball_url = zipball_url |
||||
|
|
||||
|
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(Tag, 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, Tag): |
||||
|
return False |
||||
|
|
||||
|
return self.__dict__ == other.__dict__ |
||||
|
|
||||
|
def __ne__(self, other): |
||||
|
"""Returns true if both objects are not equal""" |
||||
|
return not self == other |
@ -0,0 +1,141 @@ |
|||||
|
# 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 |
||||
|
|
||||
|
|
||||
|
class TagCommit(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 = { |
||||
|
'sha': 'str', |
||||
|
'url': 'str' |
||||
|
} |
||||
|
|
||||
|
attribute_map = { |
||||
|
'sha': 'sha', |
||||
|
'url': 'url' |
||||
|
} |
||||
|
|
||||
|
def __init__(self, sha=None, url=None): # noqa: E501 |
||||
|
"""TagCommit - a model defined in Swagger""" # noqa: E501 |
||||
|
|
||||
|
self._sha = None |
||||
|
self._url = None |
||||
|
self.discriminator = None |
||||
|
|
||||
|
if sha is not None: |
||||
|
self.sha = sha |
||||
|
if url is not None: |
||||
|
self.url = url |
||||
|
|
||||
|
@property |
||||
|
def sha(self): |
||||
|
"""Gets the sha of this TagCommit. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The sha of this TagCommit. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._sha |
||||
|
|
||||
|
@sha.setter |
||||
|
def sha(self, sha): |
||||
|
"""Sets the sha of this TagCommit. |
||||
|
|
||||
|
|
||||
|
:param sha: The sha of this TagCommit. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._sha = sha |
||||
|
|
||||
|
@property |
||||
|
def url(self): |
||||
|
"""Gets the url of this TagCommit. # noqa: E501 |
||||
|
|
||||
|
|
||||
|
:return: The url of this TagCommit. # noqa: E501 |
||||
|
:rtype: str |
||||
|
""" |
||||
|
return self._url |
||||
|
|
||||
|
@url.setter |
||||
|
def url(self, url): |
||||
|
"""Sets the url of this TagCommit. |
||||
|
|
||||
|
|
||||
|
:param url: The url of this TagCommit. # noqa: E501 |
||||
|
:type: str |
||||
|
""" |
||||
|
|
||||
|
self._url = url |
||||
|
|
||||
|
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(TagCommit, 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, TagCommit): |
||||
|
return False |
||||
|
|
||||
|
return self.__dict__ == other.__dict__ |
||||
|
|
||||
|
def __ne__(self, other): |
||||
|
"""Returns true if both objects are not equal""" |
||||
|
return not self == other |
@ -0,0 +1,40 @@ |
|||||
|
# 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 |
||||
|
""" |
||||
|
|
||||
|
|
||||
|
from __future__ import absolute_import |
||||
|
|
||||
|
import unittest |
||||
|
|
||||
|
import swagger_client |
||||
|
from swagger_client.models.commit import Commit # noqa: E501 |
||||
|
from swagger_client.rest import ApiException |
||||
|
|
||||
|
|
||||
|
class TestCommit(unittest.TestCase): |
||||
|
"""Commit unit test stubs""" |
||||
|
|
||||
|
def setUp(self): |
||||
|
pass |
||||
|
|
||||
|
def tearDown(self): |
||||
|
pass |
||||
|
|
||||
|
def testCommit(self): |
||||
|
"""Test Commit""" |
||||
|
# FIXME: construct object with mandatory attributes with example values |
||||
|
# model = swagger_client.models.commit.Commit() # noqa: E501 |
||||
|
pass |
||||
|
|
||||
|
|
||||
|
if __name__ == '__main__': |
||||
|
unittest.main() |
@ -0,0 +1,40 @@ |
|||||
|
# 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 |
||||
|
""" |
||||
|
|
||||
|
|
||||
|
from __future__ import absolute_import |
||||
|
|
||||
|
import unittest |
||||
|
|
||||
|
import swagger_client |
||||
|
from swagger_client.models.commit_meta import CommitMeta # noqa: E501 |
||||
|
from swagger_client.rest import ApiException |
||||
|
|
||||
|
|
||||
|
class TestCommitMeta(unittest.TestCase): |
||||
|
"""CommitMeta unit test stubs""" |
||||
|
|
||||
|
def setUp(self): |
||||
|
pass |
||||
|
|
||||
|
def tearDown(self): |
||||
|
pass |
||||
|
|
||||
|
def testCommitMeta(self): |
||||
|
"""Test CommitMeta""" |
||||
|
# FIXME: construct object with mandatory attributes with example values |
||||
|
# model = swagger_client.models.commit_meta.CommitMeta() # noqa: E501 |
||||
|
pass |
||||
|
|
||||
|
|
||||
|
if __name__ == '__main__': |
||||
|
unittest.main() |
@ -0,0 +1,40 @@ |
|||||
|
# 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 |
||||
|
""" |
||||
|
|
||||
|
|
||||
|
from __future__ import absolute_import |
||||
|
|
||||
|
import unittest |
||||
|
|
||||
|
import swagger_client |
||||
|
from swagger_client.models.commit_user import CommitUser # noqa: E501 |
||||
|
from swagger_client.rest import ApiException |
||||
|
|
||||
|
|
||||
|
class TestCommitUser(unittest.TestCase): |
||||
|
"""CommitUser unit test stubs""" |
||||
|
|
||||
|
def setUp(self): |
||||
|
pass |
||||
|
|
||||
|
def tearDown(self): |
||||
|
pass |
||||
|
|
||||
|
def testCommitUser(self): |
||||
|
"""Test CommitUser""" |
||||
|
# FIXME: construct object with mandatory attributes with example values |
||||
|
# model = swagger_client.models.commit_user.CommitUser() # noqa: E501 |
||||
|
pass |
||||
|
|
||||
|
|
||||
|
if __name__ == '__main__': |
||||
|
unittest.main() |
@ -0,0 +1,40 @@ |
|||||
|
# 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 |
||||
|
""" |
||||
|
|
||||
|
|
||||
|
from __future__ import absolute_import |
||||
|
|
||||
|
import unittest |
||||
|
|
||||
|
import swagger_client |
||||
|
from swagger_client.models.merge_pull_request_option import MergePullRequestOption # noqa: E501 |
||||
|
from swagger_client.rest import ApiException |
||||
|
|
||||
|
|
||||
|
class TestMergePullRequestOption(unittest.TestCase): |
||||
|
"""MergePullRequestOption unit test stubs""" |
||||
|
|
||||
|
def setUp(self): |
||||
|
pass |
||||
|
|
||||
|
def tearDown(self): |
||||
|
pass |
||||
|
|
||||
|
def testMergePullRequestOption(self): |
||||
|
"""Test MergePullRequestOption""" |
||||
|
# FIXME: construct object with mandatory attributes with example values |
||||
|
# model = swagger_client.models.merge_pull_request_option.MergePullRequestOption() # noqa: E501 |
||||
|
pass |
||||
|
|
||||
|
|
||||
|
if __name__ == '__main__': |
||||
|
unittest.main() |
@ -0,0 +1,40 @@ |
|||||
|
# 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 |
||||
|
""" |
||||
|
|
||||
|
|
||||
|
from __future__ import absolute_import |
||||
|
|
||||
|
import unittest |
||||
|
|
||||
|
import swagger_client |
||||
|
from swagger_client.models.repo_commit import RepoCommit # noqa: E501 |
||||
|
from swagger_client.rest import ApiException |
||||
|
|
||||
|
|
||||
|
class TestRepoCommit(unittest.TestCase): |
||||
|
"""RepoCommit unit test stubs""" |
||||
|
|
||||
|
def setUp(self): |
||||
|
pass |
||||
|
|
||||
|
def tearDown(self): |
||||
|
pass |
||||
|
|
||||
|
def testRepoCommit(self): |
||||
|
"""Test RepoCommit""" |
||||
|
# FIXME: construct object with mandatory attributes with example values |
||||
|
# model = swagger_client.models.repo_commit.RepoCommit() # noqa: E501 |
||||
|
pass |
||||
|
|
||||
|
|
||||
|
if __name__ == '__main__': |
||||
|
unittest.main() |
@ -0,0 +1,40 @@ |
|||||
|
# 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 |
||||
|
""" |
||||
|
|
||||
|
|
||||
|
from __future__ import absolute_import |
||||
|
|
||||
|
import unittest |
||||
|
|
||||
|
import swagger_client |
||||
|
from swagger_client.models.tag import Tag # noqa: E501 |
||||
|
from swagger_client.rest import ApiException |
||||
|
|
||||
|
|
||||
|
class TestTag(unittest.TestCase): |
||||
|
"""Tag unit test stubs""" |
||||
|
|
||||
|
def setUp(self): |
||||
|
pass |
||||
|
|
||||
|
def tearDown(self): |
||||
|
pass |
||||
|
|
||||
|
def testTag(self): |
||||
|
"""Test Tag""" |
||||
|
# FIXME: construct object with mandatory attributes with example values |
||||
|
# model = swagger_client.models.tag.Tag() # noqa: E501 |
||||
|
pass |
||||
|
|
||||
|
|
||||
|
if __name__ == '__main__': |
||||
|
unittest.main() |
@ -0,0 +1,40 @@ |
|||||
|
# 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 |
||||
|
""" |
||||
|
|
||||
|
|
||||
|
from __future__ import absolute_import |
||||
|
|
||||
|
import unittest |
||||
|
|
||||
|
import swagger_client |
||||
|
from swagger_client.models.tag_commit import TagCommit # noqa: E501 |
||||
|
from swagger_client.rest import ApiException |
||||
|
|
||||
|
|
||||
|
class TestTagCommit(unittest.TestCase): |
||||
|
"""TagCommit unit test stubs""" |
||||
|
|
||||
|
def setUp(self): |
||||
|
pass |
||||
|
|
||||
|
def tearDown(self): |
||||
|
pass |
||||
|
|
||||
|
def testTagCommit(self): |
||||
|
"""Test TagCommit""" |
||||
|
# FIXME: construct object with mandatory attributes with example values |
||||
|
# model = swagger_client.models.tag_commit.TagCommit() # noqa: E501 |
||||
|
pass |
||||
|
|
||||
|
|
||||
|
if __name__ == '__main__': |
||||
|
unittest.main() |
Loading…
Reference in new issue