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.

287 lines
7.7 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
class CreateRepoOption(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 = {
'auto_init': 'bool',
'description': 'str',
'gitignores': 'str',
'license': 'str',
'name': 'str',
'private': 'bool',
'readme': 'str'
}
attribute_map = {
'auto_init': 'auto_init',
'description': 'description',
'gitignores': 'gitignores',
'license': 'license',
'name': 'name',
'private': 'private',
'readme': 'readme'
}
def __init__(self, auto_init=None, description=None, gitignores=None, license=None, name=None, private=None, readme=None): # noqa: E501
"""CreateRepoOption - a model defined in Swagger""" # noqa: E501
self._auto_init = None
self._description = None
self._gitignores = None
self._license = None
self._name = None
self._private = None
self._readme = None
self.discriminator = None
if auto_init is not None:
self.auto_init = auto_init
if description is not None:
self.description = description
if gitignores is not None:
self.gitignores = gitignores
if license is not None:
self.license = license
self.name = name
if private is not None:
self.private = private
if readme is not None:
self.readme = readme
@property
def auto_init(self):
"""Gets the auto_init of this CreateRepoOption. # noqa: E501
Whether the repository should be auto-intialized? # noqa: E501
:return: The auto_init of this CreateRepoOption. # noqa: E501
:rtype: bool
"""
return self._auto_init
@auto_init.setter
def auto_init(self, auto_init):
"""Sets the auto_init of this CreateRepoOption.
Whether the repository should be auto-intialized? # noqa: E501
:param auto_init: The auto_init of this CreateRepoOption. # noqa: E501
:type: bool
"""
self._auto_init = auto_init
@property
def description(self):
"""Gets the description of this CreateRepoOption. # noqa: E501
Description of the repository to create # noqa: E501
:return: The description of this CreateRepoOption. # noqa: E501
:rtype: str
"""
return self._description
@description.setter
def description(self, description):
"""Sets the description of this CreateRepoOption.
Description of the repository to create # noqa: E501
:param description: The description of this CreateRepoOption. # noqa: E501
:type: str
"""
self._description = description
@property
def gitignores(self):
"""Gets the gitignores of this CreateRepoOption. # noqa: E501
Gitignores to use # noqa: E501
:return: The gitignores of this CreateRepoOption. # noqa: E501
:rtype: str
"""
return self._gitignores
@gitignores.setter
def gitignores(self, gitignores):
"""Sets the gitignores of this CreateRepoOption.
Gitignores to use # noqa: E501
:param gitignores: The gitignores of this CreateRepoOption. # noqa: E501
:type: str
"""
self._gitignores = gitignores
@property
def license(self):
"""Gets the license of this CreateRepoOption. # noqa: E501
License to use # noqa: E501
:return: The license of this CreateRepoOption. # noqa: E501
:rtype: str
"""
return self._license
@license.setter
def license(self, license):
"""Sets the license of this CreateRepoOption.
License to use # noqa: E501
:param license: The license of this CreateRepoOption. # noqa: E501
:type: str
"""
self._license = license
@property
def name(self):
"""Gets the name of this CreateRepoOption. # noqa: E501
Name of the repository to create # noqa: E501
:return: The name of this CreateRepoOption. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this CreateRepoOption.
Name of the repository to create # noqa: E501
:param name: The name of this CreateRepoOption. # noqa: E501
:type: str
"""
if name is None:
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
self._name = name
@property
def private(self):
"""Gets the private of this CreateRepoOption. # noqa: E501
Whether the repository is private # noqa: E501
:return: The private of this CreateRepoOption. # noqa: E501
:rtype: bool
"""
return self._private
@private.setter
def private(self, private):
"""Sets the private of this CreateRepoOption.
Whether the repository is private # noqa: E501
:param private: The private of this CreateRepoOption. # noqa: E501
:type: bool
"""
self._private = private
@property
def readme(self):
"""Gets the readme of this CreateRepoOption. # noqa: E501
Readme of the repository to create # noqa: E501
:return: The readme of this CreateRepoOption. # noqa: E501
:rtype: str
"""
return self._readme
@readme.setter
def readme(self, readme):
"""Sets the readme of this CreateRepoOption.
Readme of the repository to create # noqa: E501
:param readme: The readme of this CreateRepoOption. # noqa: E501
:type: str
"""
self._readme = readme
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(CreateRepoOption, 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, CreateRepoOption):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other