forked from loafle/openapi-generator-original
Format python client using pep8
This commit is contained in:
@@ -6,4 +6,3 @@ from .category import Category
|
||||
from .pet import Pet
|
||||
from .tag import Tag
|
||||
from .order import Order
|
||||
|
||||
|
||||
@@ -17,18 +17,20 @@ Copyright 2015 SmartBear Software
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
|
||||
class Category(object):
|
||||
"""
|
||||
NOTE: This class is auto generated by the swagger code generator program.
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
Swagger model
|
||||
|
||||
:param dict swaggerTypes: The key is attribute name and the value is attribute type.
|
||||
:param dict attributeMap: The key is attribute name and the value is json key in definition.
|
||||
:param dict swaggerTypes: The key is attribute name
|
||||
and the value is attribute type.
|
||||
:param dict attributeMap: The key is attribute name
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
self.swagger_types = {
|
||||
'id': 'int',
|
||||
@@ -39,38 +41,32 @@ class Category(object):
|
||||
'id': 'id',
|
||||
'name': 'name'
|
||||
}
|
||||
|
||||
|
||||
self._id = None # int
|
||||
|
||||
|
||||
self._name = None # str
|
||||
|
||||
|
||||
|
||||
self._id = None
|
||||
self._name = None
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
return self._id
|
||||
|
||||
@id.setter
|
||||
def id(self, id):
|
||||
|
||||
self._id = id
|
||||
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self._name
|
||||
|
||||
@name.setter
|
||||
def name(self, name):
|
||||
|
||||
self._name = name
|
||||
|
||||
|
||||
def __repr__(self):
|
||||
properties = []
|
||||
for p in self.__dict__:
|
||||
if p != 'swaggerTypes' and p != 'attributeMap':
|
||||
properties.append('{prop}={val!r}'.format(prop=p, val=self.__dict__[p]))
|
||||
|
||||
return '<{name} {props}>'.format(name=__name__, props=' '.join(properties))
|
||||
|
||||
properties.append('{prop}={val!r}'
|
||||
.format(prop=p, val=self.__dict__[p]))
|
||||
|
||||
return '<{name} {props}>'.format(name=__name__,
|
||||
props=' '.join(properties))
|
||||
|
||||
@@ -17,18 +17,20 @@ Copyright 2015 SmartBear Software
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
|
||||
class Order(object):
|
||||
"""
|
||||
NOTE: This class is auto generated by the swagger code generator program.
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
Swagger model
|
||||
|
||||
:param dict swaggerTypes: The key is attribute name and the value is attribute type.
|
||||
:param dict attributeMap: The key is attribute name and the value is json key in definition.
|
||||
:param dict swaggerTypes: The key is attribute name
|
||||
and the value is attribute type.
|
||||
:param dict attributeMap: The key is attribute name
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
self.swagger_types = {
|
||||
'id': 'int',
|
||||
@@ -47,62 +49,46 @@ class Order(object):
|
||||
'status': 'status',
|
||||
'complete': 'complete'
|
||||
}
|
||||
|
||||
|
||||
self._id = None # int
|
||||
|
||||
|
||||
self._pet_id = None # int
|
||||
|
||||
|
||||
self._quantity = None # int
|
||||
|
||||
|
||||
self._ship_date = None # datetime
|
||||
|
||||
# Order Status
|
||||
self._status = None # str
|
||||
|
||||
|
||||
self._complete = None # bool
|
||||
|
||||
|
||||
|
||||
self._id = None
|
||||
self._pet_id = None
|
||||
self._quantity = None
|
||||
self._ship_date = None
|
||||
self._status = None # Order Status
|
||||
self._complete = None
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
return self._id
|
||||
|
||||
@id.setter
|
||||
def id(self, id):
|
||||
|
||||
self._id = id
|
||||
|
||||
|
||||
@property
|
||||
def pet_id(self):
|
||||
return self._pet_id
|
||||
|
||||
@pet_id.setter
|
||||
def pet_id(self, pet_id):
|
||||
|
||||
self._pet_id = pet_id
|
||||
|
||||
|
||||
@property
|
||||
def quantity(self):
|
||||
return self._quantity
|
||||
|
||||
@quantity.setter
|
||||
def quantity(self, quantity):
|
||||
|
||||
self._quantity = quantity
|
||||
|
||||
|
||||
@property
|
||||
def ship_date(self):
|
||||
return self._ship_date
|
||||
|
||||
@ship_date.setter
|
||||
def ship_date(self, ship_date):
|
||||
|
||||
self._ship_date = ship_date
|
||||
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
return self._status
|
||||
@@ -111,25 +97,26 @@ class Order(object):
|
||||
def status(self, status):
|
||||
allowed_values = ["placed", "approved", "delivered"]
|
||||
if status not in allowed_values:
|
||||
raise ValueError("Invalid value for `status`, must be one of {0}".format(allowed_values))
|
||||
|
||||
raise ValueError(
|
||||
"Invalid value for `status`, must be one of {0}"
|
||||
.format(allowed_values)
|
||||
)
|
||||
self._status = status
|
||||
|
||||
|
||||
@property
|
||||
def complete(self):
|
||||
return self._complete
|
||||
|
||||
@complete.setter
|
||||
def complete(self, complete):
|
||||
|
||||
self._complete = complete
|
||||
|
||||
|
||||
def __repr__(self):
|
||||
properties = []
|
||||
for p in self.__dict__:
|
||||
if p != 'swaggerTypes' and p != 'attributeMap':
|
||||
properties.append('{prop}={val!r}'.format(prop=p, val=self.__dict__[p]))
|
||||
|
||||
return '<{name} {props}>'.format(name=__name__, props=' '.join(properties))
|
||||
|
||||
properties.append('{prop}={val!r}'
|
||||
.format(prop=p, val=self.__dict__[p]))
|
||||
|
||||
return '<{name} {props}>'.format(name=__name__,
|
||||
props=' '.join(properties))
|
||||
|
||||
@@ -17,18 +17,20 @@ Copyright 2015 SmartBear Software
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
|
||||
class Pet(object):
|
||||
"""
|
||||
NOTE: This class is auto generated by the swagger code generator program.
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
Swagger model
|
||||
|
||||
:param dict swaggerTypes: The key is attribute name and the value is attribute type.
|
||||
:param dict attributeMap: The key is attribute name and the value is json key in definition.
|
||||
:param dict swaggerTypes: The key is attribute name
|
||||
and the value is attribute type.
|
||||
:param dict attributeMap: The key is attribute name
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
self.swagger_types = {
|
||||
'id': 'int',
|
||||
@@ -47,71 +49,54 @@ class Pet(object):
|
||||
'tags': 'tags',
|
||||
'status': 'status'
|
||||
}
|
||||
|
||||
|
||||
self._id = None # int
|
||||
|
||||
|
||||
self._category = None # Category
|
||||
|
||||
|
||||
self._name = None # str
|
||||
|
||||
|
||||
self._photo_urls = None # list[str]
|
||||
|
||||
|
||||
self._tags = None # list[Tag]
|
||||
|
||||
# pet status in the store
|
||||
self._status = None # str
|
||||
|
||||
|
||||
|
||||
self._id = None
|
||||
self._category = None
|
||||
self._name = None
|
||||
self._photo_urls = None
|
||||
self._tags = None
|
||||
self._status = None # pet status in the store
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
return self._id
|
||||
|
||||
@id.setter
|
||||
def id(self, id):
|
||||
|
||||
self._id = id
|
||||
|
||||
|
||||
@property
|
||||
def category(self):
|
||||
return self._category
|
||||
|
||||
@category.setter
|
||||
def category(self, category):
|
||||
|
||||
self._category = category
|
||||
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self._name
|
||||
|
||||
@name.setter
|
||||
def name(self, name):
|
||||
|
||||
self._name = name
|
||||
|
||||
|
||||
@property
|
||||
def photo_urls(self):
|
||||
return self._photo_urls
|
||||
|
||||
@photo_urls.setter
|
||||
def photo_urls(self, photo_urls):
|
||||
|
||||
self._photo_urls = photo_urls
|
||||
|
||||
|
||||
@property
|
||||
def tags(self):
|
||||
return self._tags
|
||||
|
||||
@tags.setter
|
||||
def tags(self, tags):
|
||||
|
||||
self._tags = tags
|
||||
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
return self._status
|
||||
@@ -120,16 +105,18 @@ class Pet(object):
|
||||
def status(self, status):
|
||||
allowed_values = ["available", "pending", "sold"]
|
||||
if status not in allowed_values:
|
||||
raise ValueError("Invalid value for `status`, must be one of {0}".format(allowed_values))
|
||||
|
||||
raise ValueError(
|
||||
"Invalid value for `status`, must be one of {0}"
|
||||
.format(allowed_values)
|
||||
)
|
||||
self._status = status
|
||||
|
||||
|
||||
def __repr__(self):
|
||||
properties = []
|
||||
for p in self.__dict__:
|
||||
if p != 'swaggerTypes' and p != 'attributeMap':
|
||||
properties.append('{prop}={val!r}'.format(prop=p, val=self.__dict__[p]))
|
||||
|
||||
return '<{name} {props}>'.format(name=__name__, props=' '.join(properties))
|
||||
|
||||
properties.append('{prop}={val!r}'
|
||||
.format(prop=p, val=self.__dict__[p]))
|
||||
|
||||
return '<{name} {props}>'.format(name=__name__,
|
||||
props=' '.join(properties))
|
||||
|
||||
@@ -17,18 +17,20 @@ Copyright 2015 SmartBear Software
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
|
||||
class Tag(object):
|
||||
"""
|
||||
NOTE: This class is auto generated by the swagger code generator program.
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
Swagger model
|
||||
|
||||
:param dict swaggerTypes: The key is attribute name and the value is attribute type.
|
||||
:param dict attributeMap: The key is attribute name and the value is json key in definition.
|
||||
:param dict swaggerTypes: The key is attribute name
|
||||
and the value is attribute type.
|
||||
:param dict attributeMap: The key is attribute name
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
self.swagger_types = {
|
||||
'id': 'int',
|
||||
@@ -39,38 +41,32 @@ class Tag(object):
|
||||
'id': 'id',
|
||||
'name': 'name'
|
||||
}
|
||||
|
||||
|
||||
self._id = None # int
|
||||
|
||||
|
||||
self._name = None # str
|
||||
|
||||
|
||||
|
||||
self._id = None
|
||||
self._name = None
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
return self._id
|
||||
|
||||
@id.setter
|
||||
def id(self, id):
|
||||
|
||||
self._id = id
|
||||
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self._name
|
||||
|
||||
@name.setter
|
||||
def name(self, name):
|
||||
|
||||
self._name = name
|
||||
|
||||
|
||||
def __repr__(self):
|
||||
properties = []
|
||||
for p in self.__dict__:
|
||||
if p != 'swaggerTypes' and p != 'attributeMap':
|
||||
properties.append('{prop}={val!r}'.format(prop=p, val=self.__dict__[p]))
|
||||
|
||||
return '<{name} {props}>'.format(name=__name__, props=' '.join(properties))
|
||||
|
||||
properties.append('{prop}={val!r}'
|
||||
.format(prop=p, val=self.__dict__[p]))
|
||||
|
||||
return '<{name} {props}>'.format(name=__name__,
|
||||
props=' '.join(properties))
|
||||
|
||||
@@ -17,18 +17,20 @@ Copyright 2015 SmartBear Software
|
||||
limitations under the License.
|
||||
"""
|
||||
|
||||
|
||||
class User(object):
|
||||
"""
|
||||
NOTE: This class is auto generated by the swagger code generator program.
|
||||
Do not edit the class manually.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
Swagger model
|
||||
|
||||
:param dict swaggerTypes: The key is attribute name and the value is attribute type.
|
||||
:param dict attributeMap: The key is attribute name and the value is json key in definition.
|
||||
:param dict swaggerTypes: The key is attribute name
|
||||
and the value is attribute type.
|
||||
:param dict attributeMap: The key is attribute name
|
||||
and the value is json key in definition.
|
||||
"""
|
||||
self.swagger_types = {
|
||||
'id': 'int',
|
||||
@@ -51,110 +53,86 @@ class User(object):
|
||||
'phone': 'phone',
|
||||
'user_status': 'userStatus'
|
||||
}
|
||||
|
||||
|
||||
self._id = None # int
|
||||
|
||||
|
||||
self._username = None # str
|
||||
|
||||
|
||||
self._first_name = None # str
|
||||
|
||||
|
||||
self._last_name = None # str
|
||||
|
||||
|
||||
self._email = None # str
|
||||
|
||||
|
||||
self._password = None # str
|
||||
|
||||
|
||||
self._phone = None # str
|
||||
|
||||
# User Status
|
||||
self._user_status = None # int
|
||||
|
||||
|
||||
|
||||
self._id = None
|
||||
self._username = None
|
||||
self._first_name = None
|
||||
self._last_name = None
|
||||
self._email = None
|
||||
self._password = None
|
||||
self._phone = None
|
||||
self._user_status = None # User Status
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
return self._id
|
||||
|
||||
@id.setter
|
||||
def id(self, id):
|
||||
|
||||
self._id = id
|
||||
|
||||
|
||||
@property
|
||||
def username(self):
|
||||
return self._username
|
||||
|
||||
@username.setter
|
||||
def username(self, username):
|
||||
|
||||
self._username = username
|
||||
|
||||
|
||||
@property
|
||||
def first_name(self):
|
||||
return self._first_name
|
||||
|
||||
@first_name.setter
|
||||
def first_name(self, first_name):
|
||||
|
||||
self._first_name = first_name
|
||||
|
||||
|
||||
@property
|
||||
def last_name(self):
|
||||
return self._last_name
|
||||
|
||||
@last_name.setter
|
||||
def last_name(self, last_name):
|
||||
|
||||
self._last_name = last_name
|
||||
|
||||
|
||||
@property
|
||||
def email(self):
|
||||
return self._email
|
||||
|
||||
@email.setter
|
||||
def email(self, email):
|
||||
|
||||
self._email = email
|
||||
|
||||
|
||||
@property
|
||||
def password(self):
|
||||
return self._password
|
||||
|
||||
@password.setter
|
||||
def password(self, password):
|
||||
|
||||
self._password = password
|
||||
|
||||
|
||||
@property
|
||||
def phone(self):
|
||||
return self._phone
|
||||
|
||||
@phone.setter
|
||||
def phone(self, phone):
|
||||
|
||||
self._phone = phone
|
||||
|
||||
|
||||
@property
|
||||
def user_status(self):
|
||||
return self._user_status
|
||||
|
||||
@user_status.setter
|
||||
def user_status(self, user_status):
|
||||
|
||||
self._user_status = user_status
|
||||
|
||||
|
||||
def __repr__(self):
|
||||
properties = []
|
||||
for p in self.__dict__:
|
||||
if p != 'swaggerTypes' and p != 'attributeMap':
|
||||
properties.append('{prop}={val!r}'.format(prop=p, val=self.__dict__[p]))
|
||||
|
||||
return '<{name} {props}>'.format(name=__name__, props=' '.join(properties))
|
||||
|
||||
properties.append('{prop}={val!r}'
|
||||
.format(prop=p, val=self.__dict__[p]))
|
||||
|
||||
return '<{name} {props}>'.format(name=__name__,
|
||||
props=' '.join(properties))
|
||||
|
||||
Reference in New Issue
Block a user