[python-experimental] generate model if type != object if enums/validations exist (#2757)

* Python-experimental adds model_utils module, refactors python api class

* Fixes python-experimental so the sample sare generated in the petstore_api folder

* FIxes python samples tests

* Updates python and python-experimental tests

* Fixes python-experimental tests

* Adds newlines back to python templates + samples

* Reverts files with newline tweaks back to master branch versions

* Fixes indentation errors in python-experimental api_client

* Removes unused files

* Python files now generated in correct folders

* Adds logging when the user tries to set generateAliasAsModel in python-experimental

* Fixes typo
This commit is contained in:
Justin Black
2019-09-24 03:44:28 -07:00
committed by William Cheng
parent 002da8d9f9
commit 252c3e58be
106 changed files with 9581 additions and 7758 deletions

View File

@@ -71,9 +71,11 @@ from petstore_api.models.number_only import NumberOnly
from petstore_api.models.order import Order
from petstore_api.models.outer_composite import OuterComposite
from petstore_api.models.outer_enum import OuterEnum
from petstore_api.models.outer_number import OuterNumber
from petstore_api.models.pet import Pet
from petstore_api.models.read_only_first import ReadOnlyFirst
from petstore_api.models.special_model_name import SpecialModelName
from petstore_api.models.string_boolean_map import StringBooleanMap
from petstore_api.models.tag import Tag
from petstore_api.models.type_holder_default import TypeHolderDefault
from petstore_api.models.type_holder_example import TypeHolderExample

View File

@@ -18,10 +18,14 @@ import re # noqa: F401
import six
from petstore_api.api_client import ApiClient
from petstore_api.exceptions import ( # noqa: F401
from petstore_api.exceptions import (
ApiTypeError,
ApiValueError
)
from petstore_api.model_utils import (
check_allowed_values,
check_validations
)
class AnotherFakeApi(object):
@@ -36,122 +40,269 @@ class AnotherFakeApi(object):
api_client = ApiClient()
self.api_client = api_client
def call_123_test_special_tags(self, body, **kwargs): # noqa: E501
"""To test special tags # noqa: E501
def __call_123_test_special_tags(self, body, **kwargs): # noqa: E501
"""To test special tags # noqa: E501
To test special tags and operation ID starting with number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.call_123_test_special_tags(body, async_req=True)
>>> result = thread.get()
To test special tags and operation ID starting with number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.call_123_test_special_tags(body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param Client body: client model (required)
:param _return_http_data_only: response data without head status
code and headers
:param _preload_content: if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
:return: Client
If the method is called asynchronously, returns the request
thread.
"""
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['body'] = body
return self.call_with_http_info(**kwargs)
self.call_123_test_special_tags = Endpoint(
settings={
'response_type': 'Client',
'auth': [],
'endpoint_path': '/another-fake/dummy',
'operation_id': 'call_123_test_special_tags',
'http_method': 'PATCH',
'servers': [],
},
params_map={
'all': [
'body',
],
'required': [
'body',
],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
'body': 'Client',
},
'attribute_map': {
},
'location_map': {
'body': 'body',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [
'application/json'
]
},
api_client=api_client,
callable=__call_123_test_special_tags
)
class Endpoint(object):
def __init__(self, settings=None, params_map=None, root_map=None,
headers_map=None, api_client=None, callable=None):
"""Creates an endpoint
Args:
body (Client): client model
Keyword Args:
async_req (bool): execute request asynchronously
param _preload_content (bool): if False, the urllib3.HTTPResponse
object will be returned without reading/decoding response data.
Default is True.
param _request_timeout (float/tuple): timeout setting for this
request. If one number provided, it will be total request
timeout. It can also be a pair (tuple) of (connection, read)
timeouts.
Returns:
Client:
settings (dict): see below key value pairs
'response_type' (str): response type
'auth' (list): a list of auth type keys
'endpoint_path' (str): the endpoint path
'operation_id' (str): endpoint string identifier
'http_method' (str): POST/PUT/PATCH/GET etc
'servers' (list): list of str servers that this endpoint is at
params_map (dict): see below key value pairs
'all' (list): list of str endpoint parameter names
'required' (list): list of required parameter names
'nullable' (list): list of nullable parameter names
'enum' (list): list of parameters with enum values
'validation' (list): list of parameters with validations
root_map
'validations' (dict): the dict mapping endpoint parameter tuple
paths to their validation dictionaries
'allowed_values' (dict): the dict mapping endpoint parameter
tuple paths to their allowed_values (enum) dictionaries
'openapi_types' (dict): param_name to openapi type
'attribute_map' (dict): param_name to camelCase name
'location_map' (dict): param_name to 'body', 'file', 'form',
'header', 'path', 'query'
collection_format_map (dict): param_name to `csv` etc.
headers_map (dict): see below key value pairs
'accept' (list): list of Accept header strings
'content_type' (list): list of Content-Type header strings
api_client (ApiClient) api client instance
callable (function): the function which is invoked when the
Endpoint is called
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.call_123_test_special_tags_with_http_info(body, **kwargs) # noqa: E501
return data
self.settings = settings
self.params_map = params_map
self.params_map['all'].extend([
'async_req',
'_host_index',
'_preload_content',
'_request_timeout',
'_return_http_data_only'
])
self.validations = root_map['validations']
self.allowed_values = root_map['allowed_values']
self.openapi_types = root_map['openapi_types']
self.attribute_map = root_map['attribute_map']
self.location_map = root_map['location_map']
self.collection_format_map = root_map['collection_format_map']
self.headers_map = headers_map
self.api_client = api_client
self.callable = callable
def call_123_test_special_tags_with_http_info(self, body, **kwargs): # noqa: E501
"""To test special tags # noqa: E501
To test special tags and operation ID starting with number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.call_123_test_special_tags_with_http_info(body, async_req=True)
>>> result = thread.get()
Args:
body (Client): client model
Keyword Args:
async_req (bool): execute request asynchronously
param _preload_content (bool): if False, the urllib3.HTTPResponse
object will be returned without reading/decoding response data.
Default is True.
param _request_timeout (float/tuple): timeout setting for this
request. If one number provided, it will be total request
timeout. It can also be a pair (tuple) of (connection, read)
timeouts.
Returns:
Client:
"""
local_var_params = locals()
all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method call_123_test_special_tags" % key
def __validate_inputs(self, kwargs):
for param in self.params_map['enum']:
if param in kwargs:
check_allowed_values(
self.allowed_values,
(param,),
kwargs[param],
self.validations
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
raise ApiValueError("Missing the required parameter `body` when calling `call_123_test_special_tags`") # noqa: E501
collection_formats = {}
for param in self.params_map['validation']:
if param in kwargs:
check_validations(
self.validations,
(param,),
kwargs[param]
)
path_params = {}
def __gather_params(self, kwargs):
params = {
'body': None,
'collection_format': {},
'file': {},
'form': [],
'header': {},
'path': {},
'query': []
}
query_params = []
for param_name, param_value in six.iteritems(kwargs):
param_location = self.location_map.get(param_name)
if param_location:
if param_location == 'body':
params['body'] = param_value
continue
base_name = self.attribute_map[param_name]
if (param_location == 'form' and
self.openapi_types[param_name] == 'file'):
param_location = 'file'
elif param_location in {'form', 'query'}:
param_value_full = (base_name, param_value)
params[param_location].append(param_value_full)
if param_location not in {'form', 'query'}:
params[param_location][base_name] = param_value
collection_format = self.collection_format_map.get(param_name)
if collection_format:
params['collection_format'][base_name] = collection_format
header_params = {}
return params
form_params = []
local_var_files = {}
def __call__(self, *args, **kwargs):
""" This method is invoked when endpoints are called
Example:
pet_api = PetApi()
pet_api.add_pet # this is an instance of the class Endpoint
pet_api.add_pet() # this invokes pet_api.add_pet.__call__()
which then invokes the callable functions stored in that endpoint at
pet_api.add_pet.callable or self.callable in this class
"""
return self.callable(self, *args, **kwargs)
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
def call_with_http_info(self, **kwargs):
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
if kwargs.get('_host_index') and self.settings['servers']:
_host_index = kwargs.get('_host_index')
try:
_host = self.settings['servers'][_host_index]
except IndexError:
raise ApiValueError(
"Invalid host index. Must be 0 <= index < %s" %
len(self.settings['servers'])
)
else:
try:
_host = self.settings['servers'][0]
except IndexError:
_host = None
# Authentication setting
auth_settings = [] # noqa: E501
for key, value in six.iteritems(kwargs):
if key not in self.params_map['all']:
raise ApiTypeError(
"Got an unexpected parameter '%s'"
" to method `%s`" %
(key, self.settings['operation_id'])
)
if key not in self.params_map['nullable'] and value is None:
raise ApiValueError(
"Value may not be None for non-nullable parameter `%s`"
" when calling `%s`" %
(key, self.settings['operation_id'])
)
for key in self.params_map['required']:
if key not in kwargs.keys():
raise ApiValueError(
"Missing the required parameter `%s` when calling "
"`%s`" % (key, self.settings['operation_id'])
)
self.__validate_inputs(kwargs)
params = self.__gather_params(kwargs)
accept_headers_list = self.headers_map['accept']
if accept_headers_list:
params['header']['Accept'] = self.api_client.select_header_accept(
accept_headers_list)
content_type_headers_list = self.headers_map['content_type']
if content_type_headers_list:
header_list = self.api_client.select_header_content_type(
content_type_headers_list)
params['header']['Content-Type'] = header_list
return self.api_client.call_api(
'/another-fake/dummy', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Client', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
self.settings['endpoint_path'], self.settings['http_method'],
params['path'],
params['query'],
params['header'],
body=params['body'],
post_params=params['form'],
files=params['file'],
response_type=self.settings['response_type'],
auth_settings=self.settings['auth'],
async_req=kwargs.get('async_req'),
_return_http_data_only=kwargs.get('_return_http_data_only'),
_preload_content=kwargs.get('_preload_content', True),
_request_timeout=kwargs.get('_request_timeout'),
_host=_host,
collection_formats=params['collection_format'])

View File

@@ -18,10 +18,14 @@ import re # noqa: F401
import six
from petstore_api.api_client import ApiClient
from petstore_api.exceptions import ( # noqa: F401
from petstore_api.exceptions import (
ApiTypeError,
ApiValueError
)
from petstore_api.model_utils import (
check_allowed_values,
check_validations
)
class FakeClassnameTags123Api(object):
@@ -36,122 +40,271 @@ class FakeClassnameTags123Api(object):
api_client = ApiClient()
self.api_client = api_client
def test_classname(self, body, **kwargs): # noqa: E501
"""To test class name in snake case # noqa: E501
def __test_classname(self, body, **kwargs): # noqa: E501
"""To test class name in snake case # noqa: E501
To test class name in snake case # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.test_classname(body, async_req=True)
>>> result = thread.get()
To test class name in snake case # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.test_classname(body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param Client body: client model (required)
:param _return_http_data_only: response data without head status
code and headers
:param _preload_content: if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
:return: Client
If the method is called asynchronously, returns the request
thread.
"""
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['body'] = body
return self.call_with_http_info(**kwargs)
self.test_classname = Endpoint(
settings={
'response_type': 'Client',
'auth': [
'api_key_query'
],
'endpoint_path': '/fake_classname_test',
'operation_id': 'test_classname',
'http_method': 'PATCH',
'servers': [],
},
params_map={
'all': [
'body',
],
'required': [
'body',
],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
'body': 'Client',
},
'attribute_map': {
},
'location_map': {
'body': 'body',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [
'application/json'
]
},
api_client=api_client,
callable=__test_classname
)
class Endpoint(object):
def __init__(self, settings=None, params_map=None, root_map=None,
headers_map=None, api_client=None, callable=None):
"""Creates an endpoint
Args:
body (Client): client model
Keyword Args:
async_req (bool): execute request asynchronously
param _preload_content (bool): if False, the urllib3.HTTPResponse
object will be returned without reading/decoding response data.
Default is True.
param _request_timeout (float/tuple): timeout setting for this
request. If one number provided, it will be total request
timeout. It can also be a pair (tuple) of (connection, read)
timeouts.
Returns:
Client:
settings (dict): see below key value pairs
'response_type' (str): response type
'auth' (list): a list of auth type keys
'endpoint_path' (str): the endpoint path
'operation_id' (str): endpoint string identifier
'http_method' (str): POST/PUT/PATCH/GET etc
'servers' (list): list of str servers that this endpoint is at
params_map (dict): see below key value pairs
'all' (list): list of str endpoint parameter names
'required' (list): list of required parameter names
'nullable' (list): list of nullable parameter names
'enum' (list): list of parameters with enum values
'validation' (list): list of parameters with validations
root_map
'validations' (dict): the dict mapping endpoint parameter tuple
paths to their validation dictionaries
'allowed_values' (dict): the dict mapping endpoint parameter
tuple paths to their allowed_values (enum) dictionaries
'openapi_types' (dict): param_name to openapi type
'attribute_map' (dict): param_name to camelCase name
'location_map' (dict): param_name to 'body', 'file', 'form',
'header', 'path', 'query'
collection_format_map (dict): param_name to `csv` etc.
headers_map (dict): see below key value pairs
'accept' (list): list of Accept header strings
'content_type' (list): list of Content-Type header strings
api_client (ApiClient) api client instance
callable (function): the function which is invoked when the
Endpoint is called
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.test_classname_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.test_classname_with_http_info(body, **kwargs) # noqa: E501
return data
self.settings = settings
self.params_map = params_map
self.params_map['all'].extend([
'async_req',
'_host_index',
'_preload_content',
'_request_timeout',
'_return_http_data_only'
])
self.validations = root_map['validations']
self.allowed_values = root_map['allowed_values']
self.openapi_types = root_map['openapi_types']
self.attribute_map = root_map['attribute_map']
self.location_map = root_map['location_map']
self.collection_format_map = root_map['collection_format_map']
self.headers_map = headers_map
self.api_client = api_client
self.callable = callable
def test_classname_with_http_info(self, body, **kwargs): # noqa: E501
"""To test class name in snake case # noqa: E501
To test class name in snake case # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.test_classname_with_http_info(body, async_req=True)
>>> result = thread.get()
Args:
body (Client): client model
Keyword Args:
async_req (bool): execute request asynchronously
param _preload_content (bool): if False, the urllib3.HTTPResponse
object will be returned without reading/decoding response data.
Default is True.
param _request_timeout (float/tuple): timeout setting for this
request. If one number provided, it will be total request
timeout. It can also be a pair (tuple) of (connection, read)
timeouts.
Returns:
Client:
"""
local_var_params = locals()
all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method test_classname" % key
def __validate_inputs(self, kwargs):
for param in self.params_map['enum']:
if param in kwargs:
check_allowed_values(
self.allowed_values,
(param,),
kwargs[param],
self.validations
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
raise ApiValueError("Missing the required parameter `body` when calling `test_classname`") # noqa: E501
collection_formats = {}
for param in self.params_map['validation']:
if param in kwargs:
check_validations(
self.validations,
(param,),
kwargs[param]
)
path_params = {}
def __gather_params(self, kwargs):
params = {
'body': None,
'collection_format': {},
'file': {},
'form': [],
'header': {},
'path': {},
'query': []
}
query_params = []
for param_name, param_value in six.iteritems(kwargs):
param_location = self.location_map.get(param_name)
if param_location:
if param_location == 'body':
params['body'] = param_value
continue
base_name = self.attribute_map[param_name]
if (param_location == 'form' and
self.openapi_types[param_name] == 'file'):
param_location = 'file'
elif param_location in {'form', 'query'}:
param_value_full = (base_name, param_value)
params[param_location].append(param_value_full)
if param_location not in {'form', 'query'}:
params[param_location][base_name] = param_value
collection_format = self.collection_format_map.get(param_name)
if collection_format:
params['collection_format'][base_name] = collection_format
header_params = {}
return params
form_params = []
local_var_files = {}
def __call__(self, *args, **kwargs):
""" This method is invoked when endpoints are called
Example:
pet_api = PetApi()
pet_api.add_pet # this is an instance of the class Endpoint
pet_api.add_pet() # this invokes pet_api.add_pet.__call__()
which then invokes the callable functions stored in that endpoint at
pet_api.add_pet.callable or self.callable in this class
"""
return self.callable(self, *args, **kwargs)
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
def call_with_http_info(self, **kwargs):
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
if kwargs.get('_host_index') and self.settings['servers']:
_host_index = kwargs.get('_host_index')
try:
_host = self.settings['servers'][_host_index]
except IndexError:
raise ApiValueError(
"Invalid host index. Must be 0 <= index < %s" %
len(self.settings['servers'])
)
else:
try:
_host = self.settings['servers'][0]
except IndexError:
_host = None
# Authentication setting
auth_settings = ['api_key_query'] # noqa: E501
for key, value in six.iteritems(kwargs):
if key not in self.params_map['all']:
raise ApiTypeError(
"Got an unexpected parameter '%s'"
" to method `%s`" %
(key, self.settings['operation_id'])
)
if key not in self.params_map['nullable'] and value is None:
raise ApiValueError(
"Value may not be None for non-nullable parameter `%s`"
" when calling `%s`" %
(key, self.settings['operation_id'])
)
for key in self.params_map['required']:
if key not in kwargs.keys():
raise ApiValueError(
"Missing the required parameter `%s` when calling "
"`%s`" % (key, self.settings['operation_id'])
)
self.__validate_inputs(kwargs)
params = self.__gather_params(kwargs)
accept_headers_list = self.headers_map['accept']
if accept_headers_list:
params['header']['Accept'] = self.api_client.select_header_accept(
accept_headers_list)
content_type_headers_list = self.headers_map['content_type']
if content_type_headers_list:
header_list = self.api_client.select_header_content_type(
content_type_headers_list)
params['header']['Content-Type'] = header_list
return self.api_client.call_api(
'/fake_classname_test', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Client', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
self.settings['endpoint_path'], self.settings['http_method'],
params['path'],
params['query'],
params['header'],
body=params['body'],
post_params=params['form'],
files=params['file'],
response_type=self.settings['response_type'],
auth_settings=self.settings['auth'],
async_req=kwargs.get('async_req'),
_return_http_data_only=kwargs.get('_return_http_data_only'),
_preload_content=kwargs.get('_preload_content', True),
_request_timeout=kwargs.get('_request_timeout'),
_host=_host,
collection_formats=params['collection_format'])

View File

@@ -18,10 +18,14 @@ import re # noqa: F401
import six
from petstore_api.api_client import ApiClient
from petstore_api.exceptions import ( # noqa: F401
from petstore_api.exceptions import (
ApiTypeError,
ApiValueError
)
from petstore_api.model_utils import (
check_allowed_values,
check_validations
)
class StoreApi(object):
@@ -36,456 +40,503 @@ class StoreApi(object):
api_client = ApiClient()
self.api_client = api_client
def delete_order(self, order_id, **kwargs): # noqa: E501
"""Delete purchase order by ID # noqa: E501
def __delete_order(self, order_id, **kwargs): # noqa: E501
"""Delete purchase order by ID # noqa: E501
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order(order_id, async_req=True)
>>> result = thread.get()
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order(order_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str order_id: ID of the order that needs to be deleted (required)
:param _return_http_data_only: response data without head status
code and headers
:param _preload_content: if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
:return: None
If the method is called asynchronously, returns the request
thread.
"""
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['order_id'] = order_id
return self.call_with_http_info(**kwargs)
self.delete_order = Endpoint(
settings={
'response_type': None,
'auth': [],
'endpoint_path': '/store/order/{order_id}',
'operation_id': 'delete_order',
'http_method': 'DELETE',
'servers': [],
},
params_map={
'all': [
'order_id',
],
'required': [
'order_id',
],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
'order_id': 'str',
},
'attribute_map': {
'order_id': 'order_id',
},
'location_map': {
'order_id': 'path',
},
'collection_format_map': {
}
},
headers_map={
'accept': [],
'content_type': [],
},
api_client=api_client,
callable=__delete_order
)
def __get_inventory(self, **kwargs): # noqa: E501
"""Returns pet inventories by status # noqa: E501
Returns a map of status codes to quantities # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_inventory(async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param _return_http_data_only: response data without head status
code and headers
:param _preload_content: if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
:return: dict(str, int)
If the method is called asynchronously, returns the request
thread.
"""
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
return self.call_with_http_info(**kwargs)
self.get_inventory = Endpoint(
settings={
'response_type': 'dict(str, int)',
'auth': [
'api_key'
],
'endpoint_path': '/store/inventory',
'operation_id': 'get_inventory',
'http_method': 'GET',
'servers': [],
},
params_map={
'all': [
],
'required': [],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
},
'attribute_map': {
},
'location_map': {
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/json'
],
'content_type': [],
},
api_client=api_client,
callable=__get_inventory
)
def __get_order_by_id(self, order_id, **kwargs): # noqa: E501
"""Find purchase order by ID # noqa: E501
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order_by_id(order_id, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param int order_id: ID of pet that needs to be fetched (required)
:param _return_http_data_only: response data without head status
code and headers
:param _preload_content: if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
:return: Order
If the method is called asynchronously, returns the request
thread.
"""
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['order_id'] = order_id
return self.call_with_http_info(**kwargs)
self.get_order_by_id = Endpoint(
settings={
'response_type': 'Order',
'auth': [],
'endpoint_path': '/store/order/{order_id}',
'operation_id': 'get_order_by_id',
'http_method': 'GET',
'servers': [],
},
params_map={
'all': [
'order_id',
],
'required': [
'order_id',
],
'nullable': [
],
'enum': [
],
'validation': [
'order_id',
]
},
root_map={
'validations': {
('order_id',): {
'inclusive_maximum': 5,
'inclusive_minimum': 1,
},
},
'allowed_values': {
},
'openapi_types': {
'order_id': 'int',
},
'attribute_map': {
'order_id': 'order_id',
},
'location_map': {
'order_id': 'path',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/xml',
'application/json'
],
'content_type': [],
},
api_client=api_client,
callable=__get_order_by_id
)
def __place_order(self, body, **kwargs): # noqa: E501
"""Place an order for a pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.place_order(body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param Order body: order placed for purchasing the pet (required)
:param _return_http_data_only: response data without head status
code and headers
:param _preload_content: if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
:return: Order
If the method is called asynchronously, returns the request
thread.
"""
kwargs['_return_http_data_only'] = kwargs.get(
'_return_http_data_only', True
)
kwargs['body'] = body
return self.call_with_http_info(**kwargs)
self.place_order = Endpoint(
settings={
'response_type': 'Order',
'auth': [],
'endpoint_path': '/store/order',
'operation_id': 'place_order',
'http_method': 'POST',
'servers': [],
},
params_map={
'all': [
'body',
],
'required': [
'body',
],
'nullable': [
],
'enum': [
],
'validation': [
]
},
root_map={
'validations': {
},
'allowed_values': {
},
'openapi_types': {
'body': 'Order',
},
'attribute_map': {
},
'location_map': {
'body': 'body',
},
'collection_format_map': {
}
},
headers_map={
'accept': [
'application/xml',
'application/json'
],
'content_type': [],
},
api_client=api_client,
callable=__place_order
)
class Endpoint(object):
def __init__(self, settings=None, params_map=None, root_map=None,
headers_map=None, api_client=None, callable=None):
"""Creates an endpoint
Args:
order_id (str): ID of the order that needs to be deleted
Keyword Args:
async_req (bool): execute request asynchronously
param _preload_content (bool): if False, the urllib3.HTTPResponse
object will be returned without reading/decoding response data.
Default is True.
param _request_timeout (float/tuple): timeout setting for this
request. If one number provided, it will be total request
timeout. It can also be a pair (tuple) of (connection, read)
timeouts.
Returns:
None:
settings (dict): see below key value pairs
'response_type' (str): response type
'auth' (list): a list of auth type keys
'endpoint_path' (str): the endpoint path
'operation_id' (str): endpoint string identifier
'http_method' (str): POST/PUT/PATCH/GET etc
'servers' (list): list of str servers that this endpoint is at
params_map (dict): see below key value pairs
'all' (list): list of str endpoint parameter names
'required' (list): list of required parameter names
'nullable' (list): list of nullable parameter names
'enum' (list): list of parameters with enum values
'validation' (list): list of parameters with validations
root_map
'validations' (dict): the dict mapping endpoint parameter tuple
paths to their validation dictionaries
'allowed_values' (dict): the dict mapping endpoint parameter
tuple paths to their allowed_values (enum) dictionaries
'openapi_types' (dict): param_name to openapi type
'attribute_map' (dict): param_name to camelCase name
'location_map' (dict): param_name to 'body', 'file', 'form',
'header', 'path', 'query'
collection_format_map (dict): param_name to `csv` etc.
headers_map (dict): see below key value pairs
'accept' (list): list of Accept header strings
'content_type' (list): list of Content-Type header strings
api_client (ApiClient) api client instance
callable (function): the function which is invoked when the
Endpoint is called
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501
else:
(data) = self.delete_order_with_http_info(order_id, **kwargs) # noqa: E501
return data
self.settings = settings
self.params_map = params_map
self.params_map['all'].extend([
'async_req',
'_host_index',
'_preload_content',
'_request_timeout',
'_return_http_data_only'
])
self.validations = root_map['validations']
self.allowed_values = root_map['allowed_values']
self.openapi_types = root_map['openapi_types']
self.attribute_map = root_map['attribute_map']
self.location_map = root_map['location_map']
self.collection_format_map = root_map['collection_format_map']
self.headers_map = headers_map
self.api_client = api_client
self.callable = callable
def delete_order_with_http_info(self, order_id, **kwargs): # noqa: E501
"""Delete purchase order by ID # noqa: E501
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_order_with_http_info(order_id, async_req=True)
>>> result = thread.get()
Args:
order_id (str): ID of the order that needs to be deleted
Keyword Args:
async_req (bool): execute request asynchronously
param _preload_content (bool): if False, the urllib3.HTTPResponse
object will be returned without reading/decoding response data.
Default is True.
param _request_timeout (float/tuple): timeout setting for this
request. If one number provided, it will be total request
timeout. It can also be a pair (tuple) of (connection, read)
timeouts.
Returns:
None:
"""
local_var_params = locals()
all_params = ['order_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_order" % key
def __validate_inputs(self, kwargs):
for param in self.params_map['enum']:
if param in kwargs:
check_allowed_values(
self.allowed_values,
(param,),
kwargs[param],
self.validations
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'order_id' is set
if ('order_id' not in local_var_params or
local_var_params['order_id'] is None):
raise ApiValueError("Missing the required parameter `order_id` when calling `delete_order`") # noqa: E501
collection_formats = {}
for param in self.params_map['validation']:
if param in kwargs:
check_validations(
self.validations,
(param,),
kwargs[param]
)
path_params = {}
if 'order_id' in local_var_params:
path_params['order_id'] = local_var_params['order_id'] # noqa: E501
def __gather_params(self, kwargs):
params = {
'body': None,
'collection_format': {},
'file': {},
'form': [],
'header': {},
'path': {},
'query': []
}
query_params = []
for param_name, param_value in six.iteritems(kwargs):
param_location = self.location_map.get(param_name)
if param_location:
if param_location == 'body':
params['body'] = param_value
continue
base_name = self.attribute_map[param_name]
if (param_location == 'form' and
self.openapi_types[param_name] == 'file'):
param_location = 'file'
elif param_location in {'form', 'query'}:
param_value_full = (base_name, param_value)
params[param_location].append(param_value_full)
if param_location not in {'form', 'query'}:
params[param_location][base_name] = param_value
collection_format = self.collection_format_map.get(param_name)
if collection_format:
params['collection_format'][base_name] = collection_format
header_params = {}
return params
form_params = []
local_var_files = {}
def __call__(self, *args, **kwargs):
""" This method is invoked when endpoints are called
Example:
pet_api = PetApi()
pet_api.add_pet # this is an instance of the class Endpoint
pet_api.add_pet() # this invokes pet_api.add_pet.__call__()
which then invokes the callable functions stored in that endpoint at
pet_api.add_pet.callable or self.callable in this class
"""
return self.callable(self, *args, **kwargs)
body_params = None
# Authentication setting
auth_settings = [] # noqa: E501
def call_with_http_info(self, **kwargs):
if kwargs.get('_host_index') and self.settings['servers']:
_host_index = kwargs.get('_host_index')
try:
_host = self.settings['servers'][_host_index]
except IndexError:
raise ApiValueError(
"Invalid host index. Must be 0 <= index < %s" %
len(self.settings['servers'])
)
else:
try:
_host = self.settings['servers'][0]
except IndexError:
_host = None
for key, value in six.iteritems(kwargs):
if key not in self.params_map['all']:
raise ApiTypeError(
"Got an unexpected parameter '%s'"
" to method `%s`" %
(key, self.settings['operation_id'])
)
if key not in self.params_map['nullable'] and value is None:
raise ApiValueError(
"Value may not be None for non-nullable parameter `%s`"
" when calling `%s`" %
(key, self.settings['operation_id'])
)
for key in self.params_map['required']:
if key not in kwargs.keys():
raise ApiValueError(
"Missing the required parameter `%s` when calling "
"`%s`" % (key, self.settings['operation_id'])
)
self.__validate_inputs(kwargs)
params = self.__gather_params(kwargs)
accept_headers_list = self.headers_map['accept']
if accept_headers_list:
params['header']['Accept'] = self.api_client.select_header_accept(
accept_headers_list)
content_type_headers_list = self.headers_map['content_type']
if content_type_headers_list:
header_list = self.api_client.select_header_content_type(
content_type_headers_list)
params['header']['Content-Type'] = header_list
return self.api_client.call_api(
'/store/order/{order_id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def get_inventory(self, **kwargs): # noqa: E501
"""Returns pet inventories by status # noqa: E501
Returns a map of status codes to quantities # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_inventory(async_req=True)
>>> result = thread.get()
Keyword Args:
async_req (bool): execute request asynchronously
param _preload_content (bool): if False, the urllib3.HTTPResponse
object will be returned without reading/decoding response data.
Default is True.
param _request_timeout (float/tuple): timeout setting for this
request. If one number provided, it will be total request
timeout. It can also be a pair (tuple) of (connection, read)
timeouts.
Returns:
dict(str, int):
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_inventory_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.get_inventory_with_http_info(**kwargs) # noqa: E501
return data
def get_inventory_with_http_info(self, **kwargs): # noqa: E501
"""Returns pet inventories by status # noqa: E501
Returns a map of status codes to quantities # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_inventory_with_http_info(async_req=True)
>>> result = thread.get()
Keyword Args:
async_req (bool): execute request asynchronously
param _preload_content (bool): if False, the urllib3.HTTPResponse
object will be returned without reading/decoding response data.
Default is True.
param _request_timeout (float/tuple): timeout setting for this
request. If one number provided, it will be total request
timeout. It can also be a pair (tuple) of (connection, read)
timeouts.
Returns:
dict(str, int):
"""
local_var_params = locals()
all_params = [] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_inventory" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['api_key'] # noqa: E501
return self.api_client.call_api(
'/store/inventory', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='dict(str, int)', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def get_order_by_id(self, order_id, **kwargs): # noqa: E501
"""Find purchase order by ID # noqa: E501
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order_by_id(order_id, async_req=True)
>>> result = thread.get()
Args:
order_id (int): ID of pet that needs to be fetched
Keyword Args:
async_req (bool): execute request asynchronously
param _preload_content (bool): if False, the urllib3.HTTPResponse
object will be returned without reading/decoding response data.
Default is True.
param _request_timeout (float/tuple): timeout setting for this
request. If one number provided, it will be total request
timeout. It can also be a pair (tuple) of (connection, read)
timeouts.
Returns:
Order:
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501
else:
(data) = self.get_order_by_id_with_http_info(order_id, **kwargs) # noqa: E501
return data
def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501
"""Find purchase order by ID # noqa: E501
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_order_by_id_with_http_info(order_id, async_req=True)
>>> result = thread.get()
Args:
order_id (int): ID of pet that needs to be fetched
Keyword Args:
async_req (bool): execute request asynchronously
param _preload_content (bool): if False, the urllib3.HTTPResponse
object will be returned without reading/decoding response data.
Default is True.
param _request_timeout (float/tuple): timeout setting for this
request. If one number provided, it will be total request
timeout. It can also be a pair (tuple) of (connection, read)
timeouts.
Returns:
Order:
"""
local_var_params = locals()
all_params = ['order_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_order_by_id" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'order_id' is set
if ('order_id' not in local_var_params or
local_var_params['order_id'] is None):
raise ApiValueError("Missing the required parameter `order_id` when calling `get_order_by_id`") # noqa: E501
if 'order_id' in local_var_params and local_var_params['order_id'] > 5: # noqa: E501
raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value less than or equal to `5`") # noqa: E501
if 'order_id' in local_var_params and local_var_params['order_id'] < 1: # noqa: E501
raise ApiValueError("Invalid value for parameter `order_id` when calling `get_order_by_id`, must be a value greater than or equal to `1`") # noqa: E501
collection_formats = {}
path_params = {}
if 'order_id' in local_var_params:
path_params['order_id'] = local_var_params['order_id'] # noqa: E501
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/xml', 'application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
'/store/order/{order_id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Order', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def place_order(self, body, **kwargs): # noqa: E501
"""Place an order for a pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.place_order(body, async_req=True)
>>> result = thread.get()
Args:
body (Order): order placed for purchasing the pet
Keyword Args:
async_req (bool): execute request asynchronously
param _preload_content (bool): if False, the urllib3.HTTPResponse
object will be returned without reading/decoding response data.
Default is True.
param _request_timeout (float/tuple): timeout setting for this
request. If one number provided, it will be total request
timeout. It can also be a pair (tuple) of (connection, read)
timeouts.
Returns:
Order:
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.place_order_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.place_order_with_http_info(body, **kwargs) # noqa: E501
return data
def place_order_with_http_info(self, body, **kwargs): # noqa: E501
"""Place an order for a pet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.place_order_with_http_info(body, async_req=True)
>>> result = thread.get()
Args:
body (Order): order placed for purchasing the pet
Keyword Args:
async_req (bool): execute request asynchronously
param _preload_content (bool): if False, the urllib3.HTTPResponse
object will be returned without reading/decoding response data.
Default is True.
param _request_timeout (float/tuple): timeout setting for this
request. If one number provided, it will be total request
timeout. It can also be a pair (tuple) of (connection, read)
timeouts.
Returns:
Order:
"""
local_var_params = locals()
all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method place_order" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'body' is set
if ('body' not in local_var_params or
local_var_params['body'] is None):
raise ApiValueError("Missing the required parameter `body` when calling `place_order`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'body' in local_var_params:
body_params = local_var_params['body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/xml', 'application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
'/store/order', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='Order', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
self.settings['endpoint_path'], self.settings['http_method'],
params['path'],
params['query'],
params['header'],
body=params['body'],
post_params=params['form'],
files=params['file'],
response_type=self.settings['response_type'],
auth_settings=self.settings['auth'],
async_req=kwargs.get('async_req'),
_return_http_data_only=kwargs.get('_return_http_data_only'),
_preload_content=kwargs.get('_preload_content', True),
_request_timeout=kwargs.get('_request_timeout'),
_host=_host,
collection_formats=params['collection_format'])

View File

@@ -11,6 +11,7 @@
from __future__ import absolute_import
import datetime
import inspect
import json
import mimetypes
from multiprocessing.pool import ThreadPool
@@ -22,9 +23,13 @@ import tempfile
import six
from six.moves.urllib.parse import quote
from petstore_api.configuration import Configuration
import petstore_api.models
from petstore_api import rest
from petstore_api.configuration import Configuration
from petstore_api.model_utils import (
ModelNormal,
ModelSimple
)
from petstore_api.exceptions import ApiValueError
@@ -216,7 +221,7 @@ class ApiClient(object):
if isinstance(obj, dict):
obj_dict = obj
else:
elif isinstance(obj, ModelNormal):
# Convert model obj to dict except
# attributes `openapi_types`, `attribute_map`
# and attributes which value is not None.
@@ -225,6 +230,8 @@ class ApiClient(object):
obj_dict = {obj.attribute_map[attr]: getattr(obj, attr)
for attr, _ in six.iteritems(obj.openapi_types)
if getattr(obj, attr) is not None}
elif isinstance(obj, ModelSimple):
return self.sanitize_for_serialization(obj.value)
return {key: self.sanitize_for_serialization(val)
for key, val in six.iteritems(obj_dict)}
@@ -563,6 +570,8 @@ class ApiClient(object):
return six.text_type(data)
except TypeError:
return data
except ValueError as exc:
raise ApiValueError(str(exc))
def __deserialize_object(self, value):
"""Return an original value.
@@ -614,25 +623,39 @@ class ApiClient(object):
"""Deserializes list or dict to model.
:param data: dict, list.
:param klass: class literal.
:param klass: class literal, ModelSimple or ModelNormal
:return: model object.
"""
if not klass.openapi_types and not hasattr(klass,
'get_real_child_model'):
return data
if issubclass(klass, ModelSimple):
value = self.__deserialize(data, klass.openapi_types['value'])
return klass(value)
kwargs = {}
# code to handle ModelNormal
used_data = data
if not isinstance(data, (list, dict)):
used_data = [data]
keyword_args = {}
positional_args = []
if klass.openapi_types is not None:
for attr, attr_type in six.iteritems(klass.openapi_types):
if (data is not None and
klass.attribute_map[attr] in data and
isinstance(data, (list, dict))):
value = data[klass.attribute_map[attr]]
kwargs[attr] = self.__deserialize(value, attr_type)
instance = klass(**kwargs)
klass.attribute_map[attr] in used_data):
value = used_data[klass.attribute_map[attr]]
keyword_args[attr] = self.__deserialize(value, attr_type)
end_index = None
argspec = inspect.getargspec(getattr(klass, '__init__'))
if argspec.defaults:
end_index = -len(argspec.defaults)
required_positional_args = argspec.args[1:end_index]
for index, req_positional_arg in enumerate(required_positional_args):
if keyword_args and req_positional_arg in keyword_args:
positional_args.append(keyword_args[req_positional_arg])
del keyword_args[req_positional_arg]
elif (not keyword_args and index < len(used_data) and
isinstance(used_data, list)):
positional_args.append(used_data[index])
instance = klass(*positional_args, **keyword_args)
if hasattr(instance, 'get_real_child_model'):
klass_name = instance.get_real_child_model(data)
if klass_name:

View File

@@ -67,6 +67,9 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
self.api_key_prefix = api_key_prefix
"""dict to store API prefix (e.g. Bearer)
"""
self.refresh_api_key_hook = None
"""function hook to refresh API key if expired
"""
self.username = username
"""Username for HTTP basic authentication
"""
@@ -227,11 +230,15 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
:param identifier: The identifier of apiKey.
:return: The token for api key authentication.
"""
if (self.api_key.get(identifier) and
self.api_key_prefix.get(identifier)):
return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501
elif self.api_key.get(identifier):
return self.api_key[identifier]
if self.refresh_api_key_hook is not None:
self.refresh_api_key_hook(self)
key = self.api_key.get(identifier)
if key:
prefix = self.api_key_prefix.get(identifier)
if prefix:
return "%s %s" % (prefix, key)
else:
return key
def get_basic_auth_token(self):
"""Gets HTTP basic authentication header (string).

View File

@@ -0,0 +1,183 @@
# coding: utf-8
"""
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
import re
from petstore_api.exceptions import ApiValueError
def check_allowed_values(allowed_values, input_variable_path, input_values,
validations):
"""Raises an exception if the input_values are not allowed
Args:
allowed_values (dict): the allowed_values dict
input_variable_path (tuple): the path to the input variable
input_values (list/str/int/float/date/datetime): the values that we
are checking to see if they are in allowed_values
validations (dict): the validations dict
"""
min_collection_length = (
validations.get(input_variable_path, {}).get('min_length') or
validations.get(input_variable_path, {}).get('min_items', 0))
these_allowed_values = list(allowed_values[input_variable_path].values())
if (isinstance(input_values, list)
and len(input_values) > min_collection_length
and not set(input_values).issubset(
set(these_allowed_values))):
invalid_values = ", ".join(
map(str, set(input_values) - set(these_allowed_values))),
raise ApiValueError(
"Invalid values for `%s` [%s], must be a subset of [%s]" %
(
input_variable_path[0],
invalid_values,
", ".join(map(str, these_allowed_values))
)
)
elif (isinstance(input_values, dict)
and len(input_values) > min_collection_length
and not set(
input_values.keys()).issubset(set(these_allowed_values))):
invalid_values = ", ".join(
map(str, set(input_values.keys()) - set(these_allowed_values)))
raise ApiValueError(
"Invalid keys in `%s` [%s], must be a subset of [%s]" %
(
input_variable_path[0],
invalid_values,
", ".join(map(str, these_allowed_values))
)
)
elif (not isinstance(input_values, (list, dict))
and input_values not in these_allowed_values):
raise ApiValueError(
"Invalid value for `%s` (%s), must be one of %s" %
(
input_variable_path[0],
input_values,
these_allowed_values
)
)
def check_validations(validations, input_variable_path, input_values):
"""Raises an exception if the input_values are invalid
Args:
validations (dict): the validation dictionary
input_variable_path (tuple): the path to the input variable
input_values (list/str/int/float/date/datetime): the values that we
are checking
"""
current_validations = validations[input_variable_path]
if ('max_length' in current_validations and
len(input_values) > current_validations['max_length']):
raise ApiValueError(
"Invalid value for `%s`, length must be less than or equal to "
"`%s`" % (
input_variable_path[0],
current_validations['max_length']
)
)
if ('min_length' in current_validations and
len(input_values) < current_validations['min_length']):
raise ApiValueError(
"Invalid value for `%s`, length must be greater than or equal to "
"`%s`" % (
input_variable_path[0],
current_validations['min_length']
)
)
if ('max_items' in current_validations and
len(input_values) > current_validations['max_items']):
raise ApiValueError(
"Invalid value for `%s`, number of items must be less than or "
"equal to `%s`" % (
input_variable_path[0],
current_validations['max_items']
)
)
if ('min_items' in current_validations and
len(input_values) < current_validations['min_items']):
raise ValueError(
"Invalid value for `%s`, number of items must be greater than or "
"equal to `%s`" % (
input_variable_path[0],
current_validations['min_items']
)
)
if ('exclusive_maximum' in current_validations and
input_values >= current_validations['exclusive_maximum']):
raise ApiValueError(
"Invalid value for `%s`, must be a value less than `%s`" % (
input_variable_path[0],
current_validations['exclusive_maximum']
)
)
if ('inclusive_maximum' in current_validations and
input_values > current_validations['inclusive_maximum']):
raise ApiValueError(
"Invalid value for `%s`, must be a value less than or equal to "
"`%s`" % (
input_variable_path[0],
current_validations['inclusive_maximum']
)
)
if ('exclusive_minimum' in current_validations and
input_values <= current_validations['exclusive_minimum']):
raise ApiValueError(
"Invalid value for `%s`, must be a value greater than `%s`" %
(
input_variable_path[0],
current_validations['exclusive_maximum']
)
)
if ('inclusive_minimum' in current_validations and
input_values < current_validations['inclusive_minimum']):
raise ApiValueError(
"Invalid value for `%s`, must be a value greater than or equal "
"to `%s`" % (
input_variable_path[0],
current_validations['inclusive_minimum']
)
)
flags = current_validations.get('regex', {}).get('flags', 0)
if ('regex' in current_validations and
not re.search(current_validations['regex']['pattern'],
input_values, flags=flags)):
raise ApiValueError(
r"Invalid value for `%s`, must be a follow pattern or equal to "
r"`%s` with flags=`%s`" % (
input_variable_path[0],
current_validations['regex']['pattern'],
flags
)
)
class ModelSimple(object):
# the parent class of models whose type != object in their swagger/openapi
# spec
pass
class ModelNormal(object):
# the parent class of models whose type == object in their swagger/openapi
# spec
pass

View File

@@ -52,9 +52,11 @@ from petstore_api.models.number_only import NumberOnly
from petstore_api.models.order import Order
from petstore_api.models.outer_composite import OuterComposite
from petstore_api.models.outer_enum import OuterEnum
from petstore_api.models.outer_number import OuterNumber
from petstore_api.models.pet import Pet
from petstore_api.models.read_only_first import ReadOnlyFirst
from petstore_api.models.special_model_name import SpecialModelName
from petstore_api.models.string_boolean_map import StringBooleanMap
from petstore_api.models.tag import Tag
from petstore_api.models.type_holder_default import TypeHolderDefault
from petstore_api.models.type_holder_example import TypeHolderExample

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class AdditionalPropertiesAnyType(object):
class AdditionalPropertiesAnyType(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'name': 'str',
allowed_values = {
}
attribute_map = {
'name': 'name', # noqa: E501
'name': 'name' # noqa: E501
}
openapi_types = {
'name': 'str'
}
validations = {
}
def __init__(self, name=None): # noqa: E501
"""AdditionalPropertiesAnyType - a model defined in OpenAPI
Keyword Args:
name (str): [optional] # noqa: E501
"""
"""AdditionalPropertiesAnyType - a model defined in OpenAPI""" # noqa: E501
self._name = None
self.discriminator = None
if name is not None:
self.name = name # noqa: E501
self.name = (
name
)
@property
def name(self):
@@ -64,9 +84,7 @@ class AdditionalPropertiesAnyType(object):
return self._name
@name.setter
def name(
self,
name):
def name(self, name): # noqa: E501
"""Sets the name of this AdditionalPropertiesAnyType.
@@ -75,7 +93,8 @@ class AdditionalPropertiesAnyType(object):
"""
self._name = (
name)
name
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class AdditionalPropertiesArray(object):
class AdditionalPropertiesArray(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'name': 'str',
allowed_values = {
}
attribute_map = {
'name': 'name', # noqa: E501
'name': 'name' # noqa: E501
}
openapi_types = {
'name': 'str'
}
validations = {
}
def __init__(self, name=None): # noqa: E501
"""AdditionalPropertiesArray - a model defined in OpenAPI
Keyword Args:
name (str): [optional] # noqa: E501
"""
"""AdditionalPropertiesArray - a model defined in OpenAPI""" # noqa: E501
self._name = None
self.discriminator = None
if name is not None:
self.name = name # noqa: E501
self.name = (
name
)
@property
def name(self):
@@ -64,9 +84,7 @@ class AdditionalPropertiesArray(object):
return self._name
@name.setter
def name(
self,
name):
def name(self, name): # noqa: E501
"""Sets the name of this AdditionalPropertiesArray.
@@ -75,7 +93,8 @@ class AdditionalPropertiesArray(object):
"""
self._name = (
name)
name
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class AdditionalPropertiesBoolean(object):
class AdditionalPropertiesBoolean(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'name': 'str',
allowed_values = {
}
attribute_map = {
'name': 'name', # noqa: E501
'name': 'name' # noqa: E501
}
openapi_types = {
'name': 'str'
}
validations = {
}
def __init__(self, name=None): # noqa: E501
"""AdditionalPropertiesBoolean - a model defined in OpenAPI
Keyword Args:
name (str): [optional] # noqa: E501
"""
"""AdditionalPropertiesBoolean - a model defined in OpenAPI""" # noqa: E501
self._name = None
self.discriminator = None
if name is not None:
self.name = name # noqa: E501
self.name = (
name
)
@property
def name(self):
@@ -64,9 +84,7 @@ class AdditionalPropertiesBoolean(object):
return self._name
@name.setter
def name(
self,
name):
def name(self, name): # noqa: E501
"""Sets the name of this AdditionalPropertiesBoolean.
@@ -75,7 +93,8 @@ class AdditionalPropertiesBoolean(object):
"""
self._name = (
name)
name
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,38 +10,45 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class AdditionalPropertiesClass(object):
class AdditionalPropertiesClass(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'map_string': 'dict(str, str)',
'map_number': 'dict(str, float)',
'map_integer': 'dict(str, int)',
'map_boolean': 'dict(str, bool)',
'map_array_integer': 'dict(str, list[int])',
'map_array_anytype': 'dict(str, list[object])',
'map_map_string': 'dict(str, dict(str, str))',
'map_map_anytype': 'dict(str, dict(str, object))',
'anytype_1': 'object',
'anytype_2': 'object',
'anytype_3': 'object',
allowed_values = {
}
attribute_map = {
@@ -55,27 +62,28 @@ class AdditionalPropertiesClass(object):
'map_map_anytype': 'map_map_anytype', # noqa: E501
'anytype_1': 'anytype_1', # noqa: E501
'anytype_2': 'anytype_2', # noqa: E501
'anytype_3': 'anytype_3', # noqa: E501
'anytype_3': 'anytype_3' # noqa: E501
}
openapi_types = {
'map_string': 'dict(str, str)',
'map_number': 'dict(str, float)',
'map_integer': 'dict(str, int)',
'map_boolean': 'dict(str, bool)',
'map_array_integer': 'dict(str, list[int])',
'map_array_anytype': 'dict(str, list[object])',
'map_map_string': 'dict(str, dict(str, str))',
'map_map_anytype': 'dict(str, dict(str, object))',
'anytype_1': 'object',
'anytype_2': 'object',
'anytype_3': 'object'
}
validations = {
}
def __init__(self, map_string=None, map_number=None, map_integer=None, map_boolean=None, map_array_integer=None, map_array_anytype=None, map_map_string=None, map_map_anytype=None, anytype_1=None, anytype_2=None, anytype_3=None): # noqa: E501
"""AdditionalPropertiesClass - a model defined in OpenAPI
Keyword Args:
map_string (dict(str, str)): [optional] # noqa: E501
map_number (dict(str, float)): [optional] # noqa: E501
map_integer (dict(str, int)): [optional] # noqa: E501
map_boolean (dict(str, bool)): [optional] # noqa: E501
map_array_integer (dict(str, list[int])): [optional] # noqa: E501
map_array_anytype (dict(str, list[object])): [optional] # noqa: E501
map_map_string (dict(str, dict(str, str))): [optional] # noqa: E501
map_map_anytype (dict(str, dict(str, object))): [optional] # noqa: E501
anytype_1 (object): [optional] # noqa: E501
anytype_2 (object): [optional] # noqa: E501
anytype_3 (object): [optional] # noqa: E501
"""
"""AdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501
self._map_string = None
self._map_number = None
@@ -91,27 +99,49 @@ class AdditionalPropertiesClass(object):
self.discriminator = None
if map_string is not None:
self.map_string = map_string # noqa: E501
self.map_string = (
map_string
)
if map_number is not None:
self.map_number = map_number # noqa: E501
self.map_number = (
map_number
)
if map_integer is not None:
self.map_integer = map_integer # noqa: E501
self.map_integer = (
map_integer
)
if map_boolean is not None:
self.map_boolean = map_boolean # noqa: E501
self.map_boolean = (
map_boolean
)
if map_array_integer is not None:
self.map_array_integer = map_array_integer # noqa: E501
self.map_array_integer = (
map_array_integer
)
if map_array_anytype is not None:
self.map_array_anytype = map_array_anytype # noqa: E501
self.map_array_anytype = (
map_array_anytype
)
if map_map_string is not None:
self.map_map_string = map_map_string # noqa: E501
self.map_map_string = (
map_map_string
)
if map_map_anytype is not None:
self.map_map_anytype = map_map_anytype # noqa: E501
self.map_map_anytype = (
map_map_anytype
)
if anytype_1 is not None:
self.anytype_1 = anytype_1 # noqa: E501
self.anytype_1 = (
anytype_1
)
if anytype_2 is not None:
self.anytype_2 = anytype_2 # noqa: E501
self.anytype_2 = (
anytype_2
)
if anytype_3 is not None:
self.anytype_3 = anytype_3 # noqa: E501
self.anytype_3 = (
anytype_3
)
@property
def map_string(self):
@@ -124,9 +154,7 @@ class AdditionalPropertiesClass(object):
return self._map_string
@map_string.setter
def map_string(
self,
map_string):
def map_string(self, map_string): # noqa: E501
"""Sets the map_string of this AdditionalPropertiesClass.
@@ -135,7 +163,8 @@ class AdditionalPropertiesClass(object):
"""
self._map_string = (
map_string)
map_string
)
@property
def map_number(self):
@@ -148,9 +177,7 @@ class AdditionalPropertiesClass(object):
return self._map_number
@map_number.setter
def map_number(
self,
map_number):
def map_number(self, map_number): # noqa: E501
"""Sets the map_number of this AdditionalPropertiesClass.
@@ -159,7 +186,8 @@ class AdditionalPropertiesClass(object):
"""
self._map_number = (
map_number)
map_number
)
@property
def map_integer(self):
@@ -172,9 +200,7 @@ class AdditionalPropertiesClass(object):
return self._map_integer
@map_integer.setter
def map_integer(
self,
map_integer):
def map_integer(self, map_integer): # noqa: E501
"""Sets the map_integer of this AdditionalPropertiesClass.
@@ -183,7 +209,8 @@ class AdditionalPropertiesClass(object):
"""
self._map_integer = (
map_integer)
map_integer
)
@property
def map_boolean(self):
@@ -196,9 +223,7 @@ class AdditionalPropertiesClass(object):
return self._map_boolean
@map_boolean.setter
def map_boolean(
self,
map_boolean):
def map_boolean(self, map_boolean): # noqa: E501
"""Sets the map_boolean of this AdditionalPropertiesClass.
@@ -207,7 +232,8 @@ class AdditionalPropertiesClass(object):
"""
self._map_boolean = (
map_boolean)
map_boolean
)
@property
def map_array_integer(self):
@@ -220,9 +246,7 @@ class AdditionalPropertiesClass(object):
return self._map_array_integer
@map_array_integer.setter
def map_array_integer(
self,
map_array_integer):
def map_array_integer(self, map_array_integer): # noqa: E501
"""Sets the map_array_integer of this AdditionalPropertiesClass.
@@ -231,7 +255,8 @@ class AdditionalPropertiesClass(object):
"""
self._map_array_integer = (
map_array_integer)
map_array_integer
)
@property
def map_array_anytype(self):
@@ -244,9 +269,7 @@ class AdditionalPropertiesClass(object):
return self._map_array_anytype
@map_array_anytype.setter
def map_array_anytype(
self,
map_array_anytype):
def map_array_anytype(self, map_array_anytype): # noqa: E501
"""Sets the map_array_anytype of this AdditionalPropertiesClass.
@@ -255,7 +278,8 @@ class AdditionalPropertiesClass(object):
"""
self._map_array_anytype = (
map_array_anytype)
map_array_anytype
)
@property
def map_map_string(self):
@@ -268,9 +292,7 @@ class AdditionalPropertiesClass(object):
return self._map_map_string
@map_map_string.setter
def map_map_string(
self,
map_map_string):
def map_map_string(self, map_map_string): # noqa: E501
"""Sets the map_map_string of this AdditionalPropertiesClass.
@@ -279,7 +301,8 @@ class AdditionalPropertiesClass(object):
"""
self._map_map_string = (
map_map_string)
map_map_string
)
@property
def map_map_anytype(self):
@@ -292,9 +315,7 @@ class AdditionalPropertiesClass(object):
return self._map_map_anytype
@map_map_anytype.setter
def map_map_anytype(
self,
map_map_anytype):
def map_map_anytype(self, map_map_anytype): # noqa: E501
"""Sets the map_map_anytype of this AdditionalPropertiesClass.
@@ -303,7 +324,8 @@ class AdditionalPropertiesClass(object):
"""
self._map_map_anytype = (
map_map_anytype)
map_map_anytype
)
@property
def anytype_1(self):
@@ -316,9 +338,7 @@ class AdditionalPropertiesClass(object):
return self._anytype_1
@anytype_1.setter
def anytype_1(
self,
anytype_1):
def anytype_1(self, anytype_1): # noqa: E501
"""Sets the anytype_1 of this AdditionalPropertiesClass.
@@ -327,7 +347,8 @@ class AdditionalPropertiesClass(object):
"""
self._anytype_1 = (
anytype_1)
anytype_1
)
@property
def anytype_2(self):
@@ -340,9 +361,7 @@ class AdditionalPropertiesClass(object):
return self._anytype_2
@anytype_2.setter
def anytype_2(
self,
anytype_2):
def anytype_2(self, anytype_2): # noqa: E501
"""Sets the anytype_2 of this AdditionalPropertiesClass.
@@ -351,7 +370,8 @@ class AdditionalPropertiesClass(object):
"""
self._anytype_2 = (
anytype_2)
anytype_2
)
@property
def anytype_3(self):
@@ -364,9 +384,7 @@ class AdditionalPropertiesClass(object):
return self._anytype_3
@anytype_3.setter
def anytype_3(
self,
anytype_3):
def anytype_3(self, anytype_3): # noqa: E501
"""Sets the anytype_3 of this AdditionalPropertiesClass.
@@ -375,7 +393,8 @@ class AdditionalPropertiesClass(object):
"""
self._anytype_3 = (
anytype_3)
anytype_3
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class AdditionalPropertiesInteger(object):
class AdditionalPropertiesInteger(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'name': 'str',
allowed_values = {
}
attribute_map = {
'name': 'name', # noqa: E501
'name': 'name' # noqa: E501
}
openapi_types = {
'name': 'str'
}
validations = {
}
def __init__(self, name=None): # noqa: E501
"""AdditionalPropertiesInteger - a model defined in OpenAPI
Keyword Args:
name (str): [optional] # noqa: E501
"""
"""AdditionalPropertiesInteger - a model defined in OpenAPI""" # noqa: E501
self._name = None
self.discriminator = None
if name is not None:
self.name = name # noqa: E501
self.name = (
name
)
@property
def name(self):
@@ -64,9 +84,7 @@ class AdditionalPropertiesInteger(object):
return self._name
@name.setter
def name(
self,
name):
def name(self, name): # noqa: E501
"""Sets the name of this AdditionalPropertiesInteger.
@@ -75,7 +93,8 @@ class AdditionalPropertiesInteger(object):
"""
self._name = (
name)
name
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class AdditionalPropertiesNumber(object):
class AdditionalPropertiesNumber(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'name': 'str',
allowed_values = {
}
attribute_map = {
'name': 'name', # noqa: E501
'name': 'name' # noqa: E501
}
openapi_types = {
'name': 'str'
}
validations = {
}
def __init__(self, name=None): # noqa: E501
"""AdditionalPropertiesNumber - a model defined in OpenAPI
Keyword Args:
name (str): [optional] # noqa: E501
"""
"""AdditionalPropertiesNumber - a model defined in OpenAPI""" # noqa: E501
self._name = None
self.discriminator = None
if name is not None:
self.name = name # noqa: E501
self.name = (
name
)
@property
def name(self):
@@ -64,9 +84,7 @@ class AdditionalPropertiesNumber(object):
return self._name
@name.setter
def name(
self,
name):
def name(self, name): # noqa: E501
"""Sets the name of this AdditionalPropertiesNumber.
@@ -75,7 +93,8 @@ class AdditionalPropertiesNumber(object):
"""
self._name = (
name)
name
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class AdditionalPropertiesObject(object):
class AdditionalPropertiesObject(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'name': 'str',
allowed_values = {
}
attribute_map = {
'name': 'name', # noqa: E501
'name': 'name' # noqa: E501
}
openapi_types = {
'name': 'str'
}
validations = {
}
def __init__(self, name=None): # noqa: E501
"""AdditionalPropertiesObject - a model defined in OpenAPI
Keyword Args:
name (str): [optional] # noqa: E501
"""
"""AdditionalPropertiesObject - a model defined in OpenAPI""" # noqa: E501
self._name = None
self.discriminator = None
if name is not None:
self.name = name # noqa: E501
self.name = (
name
)
@property
def name(self):
@@ -64,9 +84,7 @@ class AdditionalPropertiesObject(object):
return self._name
@name.setter
def name(
self,
name):
def name(self, name): # noqa: E501
"""Sets the name of this AdditionalPropertiesObject.
@@ -75,7 +93,8 @@ class AdditionalPropertiesObject(object):
"""
self._name = (
name)
name
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class AdditionalPropertiesString(object):
class AdditionalPropertiesString(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'name': 'str',
allowed_values = {
}
attribute_map = {
'name': 'name', # noqa: E501
'name': 'name' # noqa: E501
}
openapi_types = {
'name': 'str'
}
validations = {
}
def __init__(self, name=None): # noqa: E501
"""AdditionalPropertiesString - a model defined in OpenAPI
Keyword Args:
name (str): [optional] # noqa: E501
"""
"""AdditionalPropertiesString - a model defined in OpenAPI""" # noqa: E501
self._name = None
self.discriminator = None
if name is not None:
self.name = name # noqa: E501
self.name = (
name
)
@property
def name(self):
@@ -64,9 +84,7 @@ class AdditionalPropertiesString(object):
return self._name
@name.setter
def name(
self,
name):
def name(self, name): # noqa: E501
"""Sets the name of this AdditionalPropertiesString.
@@ -75,7 +93,8 @@ class AdditionalPropertiesString(object):
"""
self._name = (
name)
name
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,34 +10,50 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class Animal(object):
class Animal(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'class_name': 'str',
'color': 'str',
allowed_values = {
}
attribute_map = {
'class_name': 'className', # noqa: E501
'color': 'color', # noqa: E501
'color': 'color' # noqa: E501
}
discriminator_value_class_map = {
@@ -45,15 +61,16 @@ class Animal(object):
'Cat': 'Cat'
}
def __init__(self, class_name, color=None): # noqa: E501
"""Animal - a model defined in OpenAPI
openapi_types = {
'class_name': 'str',
'color': 'str'
}
Args:
class_name (str):
validations = {
}
Keyword Args: # noqa: E501
color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501
"""
def __init__(self, class_name=None, color='red'): # noqa: E501
"""Animal - a model defined in OpenAPI""" # noqa: E501
self._class_name = None
self._color = None
@@ -61,7 +78,9 @@ class Animal(object):
self.class_name = class_name
if color is not None:
self.color = color # noqa: E501
self.color = (
color
)
@property
def class_name(self):
@@ -74,9 +93,7 @@ class Animal(object):
return self._class_name
@class_name.setter
def class_name(
self,
class_name):
def class_name(self, class_name): # noqa: E501
"""Sets the class_name of this Animal.
@@ -84,10 +101,11 @@ class Animal(object):
:type: str
"""
if class_name is None:
raise ValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501
raise ApiValueError("Invalid value for `class_name`, must not be `None`") # noqa: E501
self._class_name = (
class_name)
class_name
)
@property
def color(self):
@@ -100,9 +118,7 @@ class Animal(object):
return self._color
@color.setter
def color(
self,
color):
def color(self, color): # noqa: E501
"""Sets the color of this Animal.
@@ -111,7 +127,8 @@ class Animal(object):
"""
self._color = (
color)
color
)
def get_real_child_model(self, data):
"""Returns the real base class specified by the discriminator"""

View File

@@ -10,48 +10,64 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class ApiResponse(object):
class ApiResponse(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'code': 'int',
'type': 'str',
'message': 'str',
allowed_values = {
}
attribute_map = {
'code': 'code', # noqa: E501
'type': 'type', # noqa: E501
'message': 'message', # noqa: E501
'message': 'message' # noqa: E501
}
openapi_types = {
'code': 'int',
'type': 'str',
'message': 'str'
}
validations = {
}
def __init__(self, code=None, type=None, message=None): # noqa: E501
"""ApiResponse - a model defined in OpenAPI
Keyword Args:
code (int): [optional] # noqa: E501
type (str): [optional] # noqa: E501
message (str): [optional] # noqa: E501
"""
"""ApiResponse - a model defined in OpenAPI""" # noqa: E501
self._code = None
self._type = None
@@ -59,11 +75,17 @@ class ApiResponse(object):
self.discriminator = None
if code is not None:
self.code = code # noqa: E501
self.code = (
code
)
if type is not None:
self.type = type # noqa: E501
self.type = (
type
)
if message is not None:
self.message = message # noqa: E501
self.message = (
message
)
@property
def code(self):
@@ -76,9 +98,7 @@ class ApiResponse(object):
return self._code
@code.setter
def code(
self,
code):
def code(self, code): # noqa: E501
"""Sets the code of this ApiResponse.
@@ -87,7 +107,8 @@ class ApiResponse(object):
"""
self._code = (
code)
code
)
@property
def type(self):
@@ -100,9 +121,7 @@ class ApiResponse(object):
return self._type
@type.setter
def type(
self,
type):
def type(self, type): # noqa: E501
"""Sets the type of this ApiResponse.
@@ -111,7 +130,8 @@ class ApiResponse(object):
"""
self._type = (
type)
type
)
@property
def message(self):
@@ -124,9 +144,7 @@ class ApiResponse(object):
return self._message
@message.setter
def message(
self,
message):
def message(self, message): # noqa: E501
"""Sets the message of this ApiResponse.
@@ -135,7 +153,8 @@ class ApiResponse(object):
"""
self._message = (
message)
message
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class ArrayOfArrayOfNumberOnly(object):
class ArrayOfArrayOfNumberOnly(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'array_array_number': 'list[list[float]]',
allowed_values = {
}
attribute_map = {
'array_array_number': 'ArrayArrayNumber', # noqa: E501
'array_array_number': 'ArrayArrayNumber' # noqa: E501
}
openapi_types = {
'array_array_number': 'list[list[float]]'
}
validations = {
}
def __init__(self, array_array_number=None): # noqa: E501
"""ArrayOfArrayOfNumberOnly - a model defined in OpenAPI
Keyword Args:
array_array_number (list[list[float]]): [optional] # noqa: E501
"""
"""ArrayOfArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501
self._array_array_number = None
self.discriminator = None
if array_array_number is not None:
self.array_array_number = array_array_number # noqa: E501
self.array_array_number = (
array_array_number
)
@property
def array_array_number(self):
@@ -64,9 +84,7 @@ class ArrayOfArrayOfNumberOnly(object):
return self._array_array_number
@array_array_number.setter
def array_array_number(
self,
array_array_number):
def array_array_number(self, array_array_number): # noqa: E501
"""Sets the array_array_number of this ArrayOfArrayOfNumberOnly.
@@ -75,7 +93,8 @@ class ArrayOfArrayOfNumberOnly(object):
"""
self._array_array_number = (
array_array_number)
array_array_number
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class ArrayOfNumberOnly(object):
class ArrayOfNumberOnly(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'array_number': 'list[float]',
allowed_values = {
}
attribute_map = {
'array_number': 'ArrayNumber', # noqa: E501
'array_number': 'ArrayNumber' # noqa: E501
}
openapi_types = {
'array_number': 'list[float]'
}
validations = {
}
def __init__(self, array_number=None): # noqa: E501
"""ArrayOfNumberOnly - a model defined in OpenAPI
Keyword Args:
array_number (list[float]): [optional] # noqa: E501
"""
"""ArrayOfNumberOnly - a model defined in OpenAPI""" # noqa: E501
self._array_number = None
self.discriminator = None
if array_number is not None:
self.array_number = array_number # noqa: E501
self.array_number = (
array_number
)
@property
def array_number(self):
@@ -64,9 +84,7 @@ class ArrayOfNumberOnly(object):
return self._array_number
@array_number.setter
def array_number(
self,
array_number):
def array_number(self, array_number): # noqa: E501
"""Sets the array_number of this ArrayOfNumberOnly.
@@ -75,7 +93,8 @@ class ArrayOfNumberOnly(object):
"""
self._array_number = (
array_number)
array_number
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,64 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class ArrayTest(object):
class ArrayTest(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'array_of_string': 'list[str]',
'array_array_of_integer': 'list[list[int]]',
'array_array_of_model': 'list[list[ReadOnlyFirst]]',
allowed_values = {
}
attribute_map = {
'array_of_string': 'array_of_string', # noqa: E501
'array_array_of_integer': 'array_array_of_integer', # noqa: E501
'array_array_of_model': 'array_array_of_model', # noqa: E501
'array_array_of_model': 'array_array_of_model' # noqa: E501
}
openapi_types = {
'array_of_string': 'list[str]',
'array_array_of_integer': 'list[list[int]]',
'array_array_of_model': 'list[list[ReadOnlyFirst]]'
}
validations = {
}
def __init__(self, array_of_string=None, array_array_of_integer=None, array_array_of_model=None): # noqa: E501
"""ArrayTest - a model defined in OpenAPI
Keyword Args:
array_of_string (list[str]): [optional] # noqa: E501
array_array_of_integer (list[list[int]]): [optional] # noqa: E501
array_array_of_model (list[list[ReadOnlyFirst]]): [optional] # noqa: E501
"""
"""ArrayTest - a model defined in OpenAPI""" # noqa: E501
self._array_of_string = None
self._array_array_of_integer = None
@@ -59,11 +75,17 @@ class ArrayTest(object):
self.discriminator = None
if array_of_string is not None:
self.array_of_string = array_of_string # noqa: E501
self.array_of_string = (
array_of_string
)
if array_array_of_integer is not None:
self.array_array_of_integer = array_array_of_integer # noqa: E501
self.array_array_of_integer = (
array_array_of_integer
)
if array_array_of_model is not None:
self.array_array_of_model = array_array_of_model # noqa: E501
self.array_array_of_model = (
array_array_of_model
)
@property
def array_of_string(self):
@@ -76,9 +98,7 @@ class ArrayTest(object):
return self._array_of_string
@array_of_string.setter
def array_of_string(
self,
array_of_string):
def array_of_string(self, array_of_string): # noqa: E501
"""Sets the array_of_string of this ArrayTest.
@@ -87,7 +107,8 @@ class ArrayTest(object):
"""
self._array_of_string = (
array_of_string)
array_of_string
)
@property
def array_array_of_integer(self):
@@ -100,9 +121,7 @@ class ArrayTest(object):
return self._array_array_of_integer
@array_array_of_integer.setter
def array_array_of_integer(
self,
array_array_of_integer):
def array_array_of_integer(self, array_array_of_integer): # noqa: E501
"""Sets the array_array_of_integer of this ArrayTest.
@@ -111,7 +130,8 @@ class ArrayTest(object):
"""
self._array_array_of_integer = (
array_array_of_integer)
array_array_of_integer
)
@property
def array_array_of_model(self):
@@ -124,9 +144,7 @@ class ArrayTest(object):
return self._array_array_of_model
@array_array_of_model.setter
def array_array_of_model(
self,
array_array_of_model):
def array_array_of_model(self, array_array_of_model): # noqa: E501
"""Sets the array_array_of_model of this ArrayTest.
@@ -135,7 +153,8 @@ class ArrayTest(object):
"""
self._array_array_of_model = (
array_array_of_model)
array_array_of_model
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,33 +10,45 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class Capitalization(object):
class Capitalization(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'small_camel': 'str',
'capital_camel': 'str',
'small_snake': 'str',
'capital_snake': 'str',
'sca_eth_flow_points': 'str',
'att_name': 'str',
allowed_values = {
}
attribute_map = {
@@ -45,22 +57,23 @@ class Capitalization(object):
'small_snake': 'small_Snake', # noqa: E501
'capital_snake': 'Capital_Snake', # noqa: E501
'sca_eth_flow_points': 'SCA_ETH_Flow_Points', # noqa: E501
'att_name': 'ATT_NAME', # noqa: E501
'att_name': 'ATT_NAME' # noqa: E501
}
openapi_types = {
'small_camel': 'str',
'capital_camel': 'str',
'small_snake': 'str',
'capital_snake': 'str',
'sca_eth_flow_points': 'str',
'att_name': 'str'
}
validations = {
}
def __init__(self, small_camel=None, capital_camel=None, small_snake=None, capital_snake=None, sca_eth_flow_points=None, att_name=None): # noqa: E501
"""Capitalization - a model defined in OpenAPI
Keyword Args:
small_camel (str): [optional] # noqa: E501
capital_camel (str): [optional] # noqa: E501
small_snake (str): [optional] # noqa: E501
capital_snake (str): [optional] # noqa: E501
sca_eth_flow_points (str): [optional] # noqa: E501
att_name (str): Name of the pet . [optional] # noqa: E501
"""
"""Capitalization - a model defined in OpenAPI""" # noqa: E501
self._small_camel = None
self._capital_camel = None
@@ -71,17 +84,29 @@ class Capitalization(object):
self.discriminator = None
if small_camel is not None:
self.small_camel = small_camel # noqa: E501
self.small_camel = (
small_camel
)
if capital_camel is not None:
self.capital_camel = capital_camel # noqa: E501
self.capital_camel = (
capital_camel
)
if small_snake is not None:
self.small_snake = small_snake # noqa: E501
self.small_snake = (
small_snake
)
if capital_snake is not None:
self.capital_snake = capital_snake # noqa: E501
self.capital_snake = (
capital_snake
)
if sca_eth_flow_points is not None:
self.sca_eth_flow_points = sca_eth_flow_points # noqa: E501
self.sca_eth_flow_points = (
sca_eth_flow_points
)
if att_name is not None:
self.att_name = att_name # noqa: E501
self.att_name = (
att_name
)
@property
def small_camel(self):
@@ -94,9 +119,7 @@ class Capitalization(object):
return self._small_camel
@small_camel.setter
def small_camel(
self,
small_camel):
def small_camel(self, small_camel): # noqa: E501
"""Sets the small_camel of this Capitalization.
@@ -105,7 +128,8 @@ class Capitalization(object):
"""
self._small_camel = (
small_camel)
small_camel
)
@property
def capital_camel(self):
@@ -118,9 +142,7 @@ class Capitalization(object):
return self._capital_camel
@capital_camel.setter
def capital_camel(
self,
capital_camel):
def capital_camel(self, capital_camel): # noqa: E501
"""Sets the capital_camel of this Capitalization.
@@ -129,7 +151,8 @@ class Capitalization(object):
"""
self._capital_camel = (
capital_camel)
capital_camel
)
@property
def small_snake(self):
@@ -142,9 +165,7 @@ class Capitalization(object):
return self._small_snake
@small_snake.setter
def small_snake(
self,
small_snake):
def small_snake(self, small_snake): # noqa: E501
"""Sets the small_snake of this Capitalization.
@@ -153,7 +174,8 @@ class Capitalization(object):
"""
self._small_snake = (
small_snake)
small_snake
)
@property
def capital_snake(self):
@@ -166,9 +188,7 @@ class Capitalization(object):
return self._capital_snake
@capital_snake.setter
def capital_snake(
self,
capital_snake):
def capital_snake(self, capital_snake): # noqa: E501
"""Sets the capital_snake of this Capitalization.
@@ -177,7 +197,8 @@ class Capitalization(object):
"""
self._capital_snake = (
capital_snake)
capital_snake
)
@property
def sca_eth_flow_points(self):
@@ -190,9 +211,7 @@ class Capitalization(object):
return self._sca_eth_flow_points
@sca_eth_flow_points.setter
def sca_eth_flow_points(
self,
sca_eth_flow_points):
def sca_eth_flow_points(self, sca_eth_flow_points): # noqa: E501
"""Sets the sca_eth_flow_points of this Capitalization.
@@ -201,7 +220,8 @@ class Capitalization(object):
"""
self._sca_eth_flow_points = (
sca_eth_flow_points)
sca_eth_flow_points
)
@property
def att_name(self):
@@ -215,9 +235,7 @@ class Capitalization(object):
return self._att_name
@att_name.setter
def att_name(
self,
att_name):
def att_name(self, att_name): # noqa: E501
"""Sets the att_name of this Capitalization.
Name of the pet # noqa: E501
@@ -227,7 +245,8 @@ class Capitalization(object):
"""
self._att_name = (
att_name)
att_name
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,54 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class Cat(object):
class Cat(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'class_name': 'str',
'declawed': 'bool',
'color': 'str',
allowed_values = {
}
attribute_map = {
'class_name': 'className', # noqa: E501
'declawed': 'declawed', # noqa: E501
'color': 'color', # noqa: E501
'declawed': 'declawed' # noqa: E501
}
def __init__(self, class_name, declawed=None, color=None): # noqa: E501
"""Cat - a model defined in OpenAPI
openapi_types = {
'declawed': 'bool'
}
Args:
class_name (str):
validations = {
}
Keyword Args: # noqa: E501
declawed (bool): [optional] # noqa: E501
color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501
"""
def __init__(self, declawed=None): # noqa: E501
"""Cat - a model defined in OpenAPI""" # noqa: E501
self._declawed = None
self.discriminator = None
if declawed is not None:
self.declawed = declawed # noqa: E501
self.declawed = (
declawed
)
@property
def declawed(self):
@@ -70,9 +84,7 @@ class Cat(object):
return self._declawed
@declawed.setter
def declawed(
self,
declawed):
def declawed(self, declawed): # noqa: E501
"""Sets the declawed of this Cat.
@@ -81,7 +93,8 @@ class Cat(object):
"""
self._declawed = (
declawed)
declawed
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class CatAllOf(object):
class CatAllOf(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'declawed': 'bool',
allowed_values = {
}
attribute_map = {
'declawed': 'declawed', # noqa: E501
'declawed': 'declawed' # noqa: E501
}
openapi_types = {
'declawed': 'bool'
}
validations = {
}
def __init__(self, declawed=None): # noqa: E501
"""CatAllOf - a model defined in OpenAPI
Keyword Args:
declawed (bool): [optional] # noqa: E501
"""
"""CatAllOf - a model defined in OpenAPI""" # noqa: E501
self._declawed = None
self.discriminator = None
if declawed is not None:
self.declawed = declawed # noqa: E501
self.declawed = (
declawed
)
@property
def declawed(self):
@@ -64,9 +84,7 @@ class CatAllOf(object):
return self._declawed
@declawed.setter
def declawed(
self,
declawed):
def declawed(self, declawed): # noqa: E501
"""Sets the declawed of this CatAllOf.
@@ -75,7 +93,8 @@ class CatAllOf(object):
"""
self._declawed = (
declawed)
declawed
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,52 +10,71 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class Category(object):
class Category(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'name': 'str',
'id': 'int',
allowed_values = {
}
attribute_map = {
'name': 'name', # noqa: E501
'id': 'id', # noqa: E501
'name': 'name' # noqa: E501
}
def __init__(self, name='default-name', id=None): # noqa: E501
"""Category - a model defined in OpenAPI
openapi_types = {
'id': 'int',
'name': 'str'
}
Args:
validations = {
}
Keyword Args:
name (str): defaults to 'default-name', must be one of ['default-name'] # noqa: E501
id (int): [optional] # noqa: E501
"""
def __init__(self, id=None, name='default-name'): # noqa: E501
"""Category - a model defined in OpenAPI""" # noqa: E501
self._id = None
self._name = None
self.discriminator = None
if id is not None:
self.id = id # noqa: E501
self.id = (
id
)
self.name = name
@property
@@ -69,9 +88,7 @@ class Category(object):
return self._id
@id.setter
def id(
self,
id):
def id(self, id): # noqa: E501
"""Sets the id of this Category.
@@ -80,7 +97,8 @@ class Category(object):
"""
self._id = (
id)
id
)
@property
def name(self):
@@ -93,9 +111,7 @@ class Category(object):
return self._name
@name.setter
def name(
self,
name):
def name(self, name): # noqa: E501
"""Sets the name of this Category.
@@ -103,10 +119,11 @@ class Category(object):
:type: str
"""
if name is None:
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
raise ApiValueError("Invalid value for `name`, must not be `None`") # noqa: E501
self._name = (
name)
name
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class ClassModel(object):
class ClassModel(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'_class': 'str',
allowed_values = {
}
attribute_map = {
'_class': '_class', # noqa: E501
'_class': '_class' # noqa: E501
}
openapi_types = {
'_class': 'str'
}
validations = {
}
def __init__(self, _class=None): # noqa: E501
"""ClassModel - a model defined in OpenAPI
Keyword Args:
_class (str): [optional] # noqa: E501
"""
"""ClassModel - a model defined in OpenAPI""" # noqa: E501
self.__class = None
self.discriminator = None
if _class is not None:
self._class = _class # noqa: E501
self._class = (
_class
)
@property
def _class(self):
@@ -64,9 +84,7 @@ class ClassModel(object):
return self.__class
@_class.setter
def _class(
self,
_class):
def _class(self, _class): # noqa: E501
"""Sets the _class of this ClassModel.
@@ -75,7 +93,8 @@ class ClassModel(object):
"""
self.__class = (
_class)
_class
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class Client(object):
class Client(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'client': 'str',
allowed_values = {
}
attribute_map = {
'client': 'client', # noqa: E501
'client': 'client' # noqa: E501
}
openapi_types = {
'client': 'str'
}
validations = {
}
def __init__(self, client=None): # noqa: E501
"""Client - a model defined in OpenAPI
Keyword Args:
client (str): [optional] # noqa: E501
"""
"""Client - a model defined in OpenAPI""" # noqa: E501
self._client = None
self.discriminator = None
if client is not None:
self.client = client # noqa: E501
self.client = (
client
)
@property
def client(self):
@@ -64,9 +84,7 @@ class Client(object):
return self._client
@client.setter
def client(
self,
client):
def client(self, client): # noqa: E501
"""Sets the client of this Client.
@@ -75,7 +93,8 @@ class Client(object):
"""
self._client = (
client)
client
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,54 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class Dog(object):
class Dog(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'class_name': 'str',
'breed': 'str',
'color': 'str',
allowed_values = {
}
attribute_map = {
'class_name': 'className', # noqa: E501
'breed': 'breed', # noqa: E501
'color': 'color', # noqa: E501
'breed': 'breed' # noqa: E501
}
def __init__(self, class_name, breed=None, color=None): # noqa: E501
"""Dog - a model defined in OpenAPI
openapi_types = {
'breed': 'str'
}
Args:
class_name (str):
validations = {
}
Keyword Args: # noqa: E501
breed (str): [optional] # noqa: E501
color (str): [optional] if omitted the server will use the default value of 'red' # noqa: E501
"""
def __init__(self, breed=None): # noqa: E501
"""Dog - a model defined in OpenAPI""" # noqa: E501
self._breed = None
self.discriminator = None
if breed is not None:
self.breed = breed # noqa: E501
self.breed = (
breed
)
@property
def breed(self):
@@ -70,9 +84,7 @@ class Dog(object):
return self._breed
@breed.setter
def breed(
self,
breed):
def breed(self, breed): # noqa: E501
"""Sets the breed of this Dog.
@@ -81,7 +93,8 @@ class Dog(object):
"""
self._breed = (
breed)
breed
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class DogAllOf(object):
class DogAllOf(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'breed': 'str',
allowed_values = {
}
attribute_map = {
'breed': 'breed', # noqa: E501
'breed': 'breed' # noqa: E501
}
openapi_types = {
'breed': 'str'
}
validations = {
}
def __init__(self, breed=None): # noqa: E501
"""DogAllOf - a model defined in OpenAPI
Keyword Args:
breed (str): [optional] # noqa: E501
"""
"""DogAllOf - a model defined in OpenAPI""" # noqa: E501
self._breed = None
self.discriminator = None
if breed is not None:
self.breed = breed # noqa: E501
self.breed = (
breed
)
@property
def breed(self):
@@ -64,9 +84,7 @@ class DogAllOf(object):
return self._breed
@breed.setter
def breed(
self,
breed):
def breed(self, breed): # noqa: E501
"""Sets the breed of this DogAllOf.
@@ -75,7 +93,8 @@ class DogAllOf(object):
"""
self._breed = (
breed)
breed
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,54 +10,83 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class EnumArrays(object):
class EnumArrays(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'just_symbol': 'str',
'array_enum': 'list[str]',
allowed_values = {
('just_symbol',): {
'&gt;&#x3D;': ">=",
'$': "$"
},
('array_enum',): {
'FISH': "fish",
'CRAB': "crab"
},
}
attribute_map = {
'just_symbol': 'just_symbol', # noqa: E501
'array_enum': 'array_enum', # noqa: E501
'array_enum': 'array_enum' # noqa: E501
}
openapi_types = {
'just_symbol': 'str',
'array_enum': 'list[str]'
}
validations = {
}
def __init__(self, just_symbol=None, array_enum=None): # noqa: E501
"""EnumArrays - a model defined in OpenAPI
Keyword Args:
just_symbol (str): [optional] # noqa: E501
array_enum (list[str]): [optional] # noqa: E501
"""
"""EnumArrays - a model defined in OpenAPI""" # noqa: E501
self._just_symbol = None
self._array_enum = None
self.discriminator = None
if just_symbol is not None:
self.just_symbol = just_symbol # noqa: E501
self.just_symbol = (
just_symbol
)
if array_enum is not None:
self.array_enum = array_enum # noqa: E501
self.array_enum = (
array_enum
)
@property
def just_symbol(self):
@@ -70,24 +99,23 @@ class EnumArrays(object):
return self._just_symbol
@just_symbol.setter
def just_symbol(
self,
just_symbol):
def just_symbol(self, just_symbol): # noqa: E501
"""Sets the just_symbol of this EnumArrays.
:param just_symbol: The just_symbol of this EnumArrays. # noqa: E501
:type: str
"""
allowed_values = [">=", "$"] # noqa: E501
if just_symbol not in allowed_values:
raise ValueError(
"Invalid value for `just_symbol` ({0}), must be one of {1}" # noqa: E501
.format(just_symbol, allowed_values)
)
check_allowed_values(
self.allowed_values,
('just_symbol',),
just_symbol,
self.validations
)
self._just_symbol = (
just_symbol)
just_symbol
)
@property
def array_enum(self):
@@ -100,25 +128,23 @@ class EnumArrays(object):
return self._array_enum
@array_enum.setter
def array_enum(
self,
array_enum):
def array_enum(self, array_enum): # noqa: E501
"""Sets the array_enum of this EnumArrays.
:param array_enum: The array_enum of this EnumArrays. # noqa: E501
:type: list[str]
"""
allowed_values = ["fish", "crab"] # noqa: E501
if not set(array_enum).issubset(set(allowed_values)):
raise ValueError(
"Invalid values for `array_enum` [{0}], must be a subset of [{1}]" # noqa: E501
.format(", ".join(map(str, set(array_enum) - set(allowed_values))), # noqa: E501
", ".join(map(str, allowed_values)))
)
check_allowed_values(
self.allowed_values,
('array_enum',),
array_enum,
self.validations
)
self._array_enum = (
array_enum)
array_enum
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,75 +10,97 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class EnumClass(object):
class EnumClass(ModelSimple):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
allowed enum values
"""
_ABC = "_abc"
_EFG = "-efg"
_XYZ_ = "(xyz)"
"""
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
openapi_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.
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
allowed_values = {
('value',): {
'_ABC': "_abc",
'-EFG': "-efg",
'(XYZ)': "(xyz)"
},
}
openapi_types = {
'value': 'str'
}
attribute_map = {
validations = {
}
def __init__(self): # noqa: E501
"""EnumClass - a model defined in OpenAPI
def __init__(self, value='-efg'): # noqa: E501
"""EnumClass - a model defined in OpenAPI""" # noqa: E501
Keyword Args:
"""
self._value = None
self.discriminator = None
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
self.value = value
for attr, _ in six.iteritems(self.openapi_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
@property
def value(self):
"""Gets the value of this EnumClass. # noqa: E501
return result
:return: The value of this EnumClass. # noqa: E501
:rtype: str
"""
return self._value
@value.setter
def value(self, value): # noqa: E501
"""Sets the value of this EnumClass.
:param value: The value of this EnumClass. # noqa: E501
:type: str
"""
if value is None:
raise ApiValueError("Invalid value for `value`, must not be `None`") # noqa: E501
check_allowed_values(
self.allowed_values,
('value',),
value,
self.validations
)
self._value = (
value
)
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
return str(self._value)
def __repr__(self):
"""For `print` and `pprint`"""

View File

@@ -10,54 +10,86 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class EnumTest(object):
class EnumTest(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'enum_string_required': 'str',
'enum_string': 'str',
'enum_integer': 'int',
'enum_number': 'float',
'outer_enum': 'OuterEnum',
allowed_values = {
('enum_string',): {
'UPPER': "UPPER",
'LOWER': "lower",
'EMPTY': ""
},
('enum_string_required',): {
'UPPER': "UPPER",
'LOWER': "lower",
'EMPTY': ""
},
('enum_integer',): {
'1': 1,
'-1': -1
},
('enum_number',): {
'1.1': 1.1,
'-1.2': -1.2
},
}
attribute_map = {
'enum_string_required': 'enum_string_required', # noqa: E501
'enum_string': 'enum_string', # noqa: E501
'enum_string_required': 'enum_string_required', # noqa: E501
'enum_integer': 'enum_integer', # noqa: E501
'enum_number': 'enum_number', # noqa: E501
'outer_enum': 'outerEnum', # noqa: E501
'outer_enum': 'outerEnum' # noqa: E501
}
def __init__(self, enum_string_required, enum_string=None, enum_integer=None, enum_number=None, outer_enum=None): # noqa: E501
"""EnumTest - a model defined in OpenAPI
openapi_types = {
'enum_string': 'str',
'enum_string_required': 'str',
'enum_integer': 'int',
'enum_number': 'float',
'outer_enum': 'OuterEnum'
}
Args:
enum_string_required (str):
validations = {
}
Keyword Args: # noqa: E501
enum_string (str): [optional] # noqa: E501
enum_integer (int): [optional] # noqa: E501
enum_number (float): [optional] # noqa: E501
outer_enum (OuterEnum): [optional] # noqa: E501
"""
def __init__(self, enum_string=None, enum_string_required=None, enum_integer=None, enum_number=None, outer_enum=None): # noqa: E501
"""EnumTest - a model defined in OpenAPI""" # noqa: E501
self._enum_string = None
self._enum_string_required = None
@@ -67,14 +99,22 @@ class EnumTest(object):
self.discriminator = None
if enum_string is not None:
self.enum_string = enum_string # noqa: E501
self.enum_string = (
enum_string
)
self.enum_string_required = enum_string_required
if enum_integer is not None:
self.enum_integer = enum_integer # noqa: E501
self.enum_integer = (
enum_integer
)
if enum_number is not None:
self.enum_number = enum_number # noqa: E501
self.enum_number = (
enum_number
)
if outer_enum is not None:
self.outer_enum = outer_enum # noqa: E501
self.outer_enum = (
outer_enum
)
@property
def enum_string(self):
@@ -87,24 +127,23 @@ class EnumTest(object):
return self._enum_string
@enum_string.setter
def enum_string(
self,
enum_string):
def enum_string(self, enum_string): # noqa: E501
"""Sets the enum_string of this EnumTest.
:param enum_string: The enum_string of this EnumTest. # noqa: E501
:type: str
"""
allowed_values = ["UPPER", "lower", ""] # noqa: E501
if enum_string not in allowed_values:
raise ValueError(
"Invalid value for `enum_string` ({0}), must be one of {1}" # noqa: E501
.format(enum_string, allowed_values)
)
check_allowed_values(
self.allowed_values,
('enum_string',),
enum_string,
self.validations
)
self._enum_string = (
enum_string)
enum_string
)
@property
def enum_string_required(self):
@@ -117,9 +156,7 @@ class EnumTest(object):
return self._enum_string_required
@enum_string_required.setter
def enum_string_required(
self,
enum_string_required):
def enum_string_required(self, enum_string_required): # noqa: E501
"""Sets the enum_string_required of this EnumTest.
@@ -127,16 +164,17 @@ class EnumTest(object):
:type: str
"""
if enum_string_required is None:
raise ValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501
allowed_values = ["UPPER", "lower", ""] # noqa: E501
if enum_string_required not in allowed_values:
raise ValueError(
"Invalid value for `enum_string_required` ({0}), must be one of {1}" # noqa: E501
.format(enum_string_required, allowed_values)
)
raise ApiValueError("Invalid value for `enum_string_required`, must not be `None`") # noqa: E501
check_allowed_values(
self.allowed_values,
('enum_string_required',),
enum_string_required,
self.validations
)
self._enum_string_required = (
enum_string_required)
enum_string_required
)
@property
def enum_integer(self):
@@ -149,24 +187,23 @@ class EnumTest(object):
return self._enum_integer
@enum_integer.setter
def enum_integer(
self,
enum_integer):
def enum_integer(self, enum_integer): # noqa: E501
"""Sets the enum_integer of this EnumTest.
:param enum_integer: The enum_integer of this EnumTest. # noqa: E501
:type: int
"""
allowed_values = [1, -1] # noqa: E501
if enum_integer not in allowed_values:
raise ValueError(
"Invalid value for `enum_integer` ({0}), must be one of {1}" # noqa: E501
.format(enum_integer, allowed_values)
)
check_allowed_values(
self.allowed_values,
('enum_integer',),
enum_integer,
self.validations
)
self._enum_integer = (
enum_integer)
enum_integer
)
@property
def enum_number(self):
@@ -179,24 +216,23 @@ class EnumTest(object):
return self._enum_number
@enum_number.setter
def enum_number(
self,
enum_number):
def enum_number(self, enum_number): # noqa: E501
"""Sets the enum_number of this EnumTest.
:param enum_number: The enum_number of this EnumTest. # noqa: E501
:type: float
"""
allowed_values = [1.1, -1.2] # noqa: E501
if enum_number not in allowed_values:
raise ValueError(
"Invalid value for `enum_number` ({0}), must be one of {1}" # noqa: E501
.format(enum_number, allowed_values)
)
check_allowed_values(
self.allowed_values,
('enum_number',),
enum_number,
self.validations
)
self._enum_number = (
enum_number)
enum_number
)
@property
def outer_enum(self):
@@ -209,9 +245,7 @@ class EnumTest(object):
return self._outer_enum
@outer_enum.setter
def outer_enum(
self,
outer_enum):
def outer_enum(self, outer_enum): # noqa: E501
"""Sets the outer_enum of this EnumTest.
@@ -220,7 +254,8 @@ class EnumTest(object):
"""
self._outer_enum = (
outer_enum)
outer_enum
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class File(object):
class File(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'source_uri': 'str',
allowed_values = {
}
attribute_map = {
'source_uri': 'sourceURI', # noqa: E501
'source_uri': 'sourceURI' # noqa: E501
}
openapi_types = {
'source_uri': 'str'
}
validations = {
}
def __init__(self, source_uri=None): # noqa: E501
"""File - a model defined in OpenAPI
Keyword Args:
source_uri (str): Test capitalization. [optional] # noqa: E501
"""
"""File - a model defined in OpenAPI""" # noqa: E501
self._source_uri = None
self.discriminator = None
if source_uri is not None:
self.source_uri = source_uri # noqa: E501
self.source_uri = (
source_uri
)
@property
def source_uri(self):
@@ -65,9 +85,7 @@ class File(object):
return self._source_uri
@source_uri.setter
def source_uri(
self,
source_uri):
def source_uri(self, source_uri): # noqa: E501
"""Sets the source_uri of this File.
Test capitalization # noqa: E501
@@ -77,7 +95,8 @@ class File(object):
"""
self._source_uri = (
source_uri)
source_uri
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,54 +10,75 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class FileSchemaTestClass(object):
class FileSchemaTestClass(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'file': 'File',
'files': 'list[File]',
allowed_values = {
}
attribute_map = {
'file': 'file', # noqa: E501
'files': 'files', # noqa: E501
'files': 'files' # noqa: E501
}
openapi_types = {
'file': 'File',
'files': 'list[File]'
}
validations = {
}
def __init__(self, file=None, files=None): # noqa: E501
"""FileSchemaTestClass - a model defined in OpenAPI
Keyword Args:
file (File): [optional] # noqa: E501
files (list[File]): [optional] # noqa: E501
"""
"""FileSchemaTestClass - a model defined in OpenAPI""" # noqa: E501
self._file = None
self._files = None
self.discriminator = None
if file is not None:
self.file = file # noqa: E501
self.file = (
file
)
if files is not None:
self.files = files # noqa: E501
self.files = (
files
)
@property
def file(self):
@@ -70,9 +91,7 @@ class FileSchemaTestClass(object):
return self._file
@file.setter
def file(
self,
file):
def file(self, file): # noqa: E501
"""Sets the file of this FileSchemaTestClass.
@@ -81,7 +100,8 @@ class FileSchemaTestClass(object):
"""
self._file = (
file)
file
)
@property
def files(self):
@@ -94,9 +114,7 @@ class FileSchemaTestClass(object):
return self._files
@files.setter
def files(
self,
files):
def files(self, files): # noqa: E501
"""Sets the files of this FileSchemaTestClass.
@@ -105,7 +123,8 @@ class FileSchemaTestClass(object):
"""
self._files = (
files)
files
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,78 +10,126 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class FormatTest(object):
class FormatTest(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'number': 'float',
'byte': 'str',
'date': 'date',
'password': 'str',
'integer': 'int',
'int32': 'int',
'int64': 'int',
'float': 'float',
'double': 'float',
'string': 'str',
'binary': 'file',
'date_time': 'datetime',
'uuid': 'str',
allowed_values = {
}
attribute_map = {
'number': 'number', # noqa: E501
'byte': 'byte', # noqa: E501
'date': 'date', # noqa: E501
'password': 'password', # noqa: E501
'integer': 'integer', # noqa: E501
'int32': 'int32', # noqa: E501
'int64': 'int64', # noqa: E501
'number': 'number', # noqa: E501
'float': 'float', # noqa: E501
'double': 'double', # noqa: E501
'string': 'string', # noqa: E501
'byte': 'byte', # noqa: E501
'binary': 'binary', # noqa: E501
'date': 'date', # noqa: E501
'date_time': 'dateTime', # noqa: E501
'uuid': 'uuid', # noqa: E501
'password': 'password' # noqa: E501
}
def __init__(self, number, byte, date, password, integer=None, int32=None, int64=None, float=None, double=None, string=None, binary=None, date_time=None, uuid=None): # noqa: E501
"""FormatTest - a model defined in OpenAPI
openapi_types = {
'integer': 'int',
'int32': 'int',
'int64': 'int',
'number': 'float',
'float': 'float',
'double': 'float',
'string': 'str',
'byte': 'str',
'binary': 'file',
'date': 'date',
'date_time': 'datetime',
'uuid': 'str',
'password': 'str'
}
Args:
number (float):
byte (str):
date (date):
password (str):
validations = {
('integer',): {
Keyword Args: # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501
integer (int): [optional] # noqa: E501
int32 (int): [optional] # noqa: E501
int64 (int): [optional] # noqa: E501
float (float): [optional] # noqa: E501
double (float): [optional] # noqa: E501
string (str): [optional] # noqa: E501
binary (file): [optional] # noqa: E501
date_time (datetime): [optional] # noqa: E501
uuid (str): [optional] # noqa: E501
"""
'inclusive_maximum': 100,
'inclusive_minimum': 10,
},
('int32',): {
'inclusive_maximum': 200,
'inclusive_minimum': 20,
},
('number',): {
'inclusive_maximum': 543.2,
'inclusive_minimum': 32.1,
},
('float',): {
'inclusive_maximum': 987.6,
'inclusive_minimum': 54.3,
},
('double',): {
'inclusive_maximum': 123.4,
'inclusive_minimum': 67.8,
},
('string',): {
'regex': {
'pattern': r'^[a-z]+$', # noqa: E501
'flags': (re.IGNORECASE)
},
},
('byte',): {
'regex': {
'pattern': r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', # noqa: E501
},
},
('password',): {
'max_length': 64,
'min_length': 10,
},
}
def __init__(self, integer=None, int32=None, int64=None, number=None, float=None, double=None, string=None, byte=None, binary=None, date=None, date_time=None, uuid=None, password=None): # noqa: E501
"""FormatTest - a model defined in OpenAPI""" # noqa: E501
self._integer = None
self._int32 = None
@@ -99,26 +147,44 @@ class FormatTest(object):
self.discriminator = None
if integer is not None:
self.integer = integer # noqa: E501
self.integer = (
integer
)
if int32 is not None:
self.int32 = int32 # noqa: E501
self.int32 = (
int32
)
if int64 is not None:
self.int64 = int64 # noqa: E501
self.int64 = (
int64
)
self.number = number
if float is not None:
self.float = float # noqa: E501
self.float = (
float
)
if double is not None:
self.double = double # noqa: E501
self.double = (
double
)
if string is not None:
self.string = string # noqa: E501
self.string = (
string
)
self.byte = byte
if binary is not None:
self.binary = binary # noqa: E501
self.binary = (
binary
)
self.date = date
if date_time is not None:
self.date_time = date_time # noqa: E501
self.date_time = (
date_time
)
if uuid is not None:
self.uuid = uuid # noqa: E501
self.uuid = (
uuid
)
self.password = password
@property
@@ -132,22 +198,22 @@ class FormatTest(object):
return self._integer
@integer.setter
def integer(
self,
integer):
def integer(self, integer): # noqa: E501
"""Sets the integer of this FormatTest.
:param integer: The integer of this FormatTest. # noqa: E501
:type: int
"""
if integer is not None and integer > 100: # noqa: E501
raise ValueError("Invalid value for `integer`, must be a value less than or equal to `100`") # noqa: E501
if integer is not None and integer < 10: # noqa: E501
raise ValueError("Invalid value for `integer`, must be a value greater than or equal to `10`") # noqa: E501
check_validations(
self.validations,
('integer',),
integer
)
self._integer = (
integer)
integer
)
@property
def int32(self):
@@ -160,22 +226,22 @@ class FormatTest(object):
return self._int32
@int32.setter
def int32(
self,
int32):
def int32(self, int32): # noqa: E501
"""Sets the int32 of this FormatTest.
:param int32: The int32 of this FormatTest. # noqa: E501
:type: int
"""
if int32 is not None and int32 > 200: # noqa: E501
raise ValueError("Invalid value for `int32`, must be a value less than or equal to `200`") # noqa: E501
if int32 is not None and int32 < 20: # noqa: E501
raise ValueError("Invalid value for `int32`, must be a value greater than or equal to `20`") # noqa: E501
check_validations(
self.validations,
('int32',),
int32
)
self._int32 = (
int32)
int32
)
@property
def int64(self):
@@ -188,9 +254,7 @@ class FormatTest(object):
return self._int64
@int64.setter
def int64(
self,
int64):
def int64(self, int64): # noqa: E501
"""Sets the int64 of this FormatTest.
@@ -199,7 +263,8 @@ class FormatTest(object):
"""
self._int64 = (
int64)
int64
)
@property
def number(self):
@@ -212,9 +277,7 @@ class FormatTest(object):
return self._number
@number.setter
def number(
self,
number):
def number(self, number): # noqa: E501
"""Sets the number of this FormatTest.
@@ -222,14 +285,16 @@ class FormatTest(object):
:type: float
"""
if number is None:
raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501
if number is not None and number > 543.2: # noqa: E501
raise ValueError("Invalid value for `number`, must be a value less than or equal to `543.2`") # noqa: E501
if number is not None and number < 32.1: # noqa: E501
raise ValueError("Invalid value for `number`, must be a value greater than or equal to `32.1`") # noqa: E501
raise ApiValueError("Invalid value for `number`, must not be `None`") # noqa: E501
check_validations(
self.validations,
('number',),
number
)
self._number = (
number)
number
)
@property
def float(self):
@@ -242,22 +307,22 @@ class FormatTest(object):
return self._float
@float.setter
def float(
self,
float):
def float(self, float): # noqa: E501
"""Sets the float of this FormatTest.
:param float: The float of this FormatTest. # noqa: E501
:type: float
"""
if float is not None and float > 987.6: # noqa: E501
raise ValueError("Invalid value for `float`, must be a value less than or equal to `987.6`") # noqa: E501
if float is not None and float < 54.3: # noqa: E501
raise ValueError("Invalid value for `float`, must be a value greater than or equal to `54.3`") # noqa: E501
check_validations(
self.validations,
('float',),
float
)
self._float = (
float)
float
)
@property
def double(self):
@@ -270,22 +335,22 @@ class FormatTest(object):
return self._double
@double.setter
def double(
self,
double):
def double(self, double): # noqa: E501
"""Sets the double of this FormatTest.
:param double: The double of this FormatTest. # noqa: E501
:type: float
"""
if double is not None and double > 123.4: # noqa: E501
raise ValueError("Invalid value for `double`, must be a value less than or equal to `123.4`") # noqa: E501
if double is not None and double < 67.8: # noqa: E501
raise ValueError("Invalid value for `double`, must be a value greater than or equal to `67.8`") # noqa: E501
check_validations(
self.validations,
('double',),
double
)
self._double = (
double)
double
)
@property
def string(self):
@@ -298,20 +363,22 @@ class FormatTest(object):
return self._string
@string.setter
def string(
self,
string):
def string(self, string): # noqa: E501
"""Sets the string of this FormatTest.
:param string: The string of this FormatTest. # noqa: E501
:type: str
"""
if string is not None and not re.search(r'[a-z]', string, flags=re.IGNORECASE): # noqa: E501
raise ValueError(r"Invalid value for `string`, must be a follow pattern or equal to `/[a-z]/i`") # noqa: E501
check_validations(
self.validations,
('string',),
string
)
self._string = (
string)
string
)
@property
def byte(self):
@@ -324,9 +391,7 @@ class FormatTest(object):
return self._byte
@byte.setter
def byte(
self,
byte):
def byte(self, byte): # noqa: E501
"""Sets the byte of this FormatTest.
@@ -334,12 +399,16 @@ class FormatTest(object):
:type: str
"""
if byte is None:
raise ValueError("Invalid value for `byte`, must not be `None`") # noqa: E501
if byte is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', byte): # noqa: E501
raise ValueError(r"Invalid value for `byte`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501
raise ApiValueError("Invalid value for `byte`, must not be `None`") # noqa: E501
check_validations(
self.validations,
('byte',),
byte
)
self._byte = (
byte)
byte
)
@property
def binary(self):
@@ -352,9 +421,7 @@ class FormatTest(object):
return self._binary
@binary.setter
def binary(
self,
binary):
def binary(self, binary): # noqa: E501
"""Sets the binary of this FormatTest.
@@ -363,7 +430,8 @@ class FormatTest(object):
"""
self._binary = (
binary)
binary
)
@property
def date(self):
@@ -376,9 +444,7 @@ class FormatTest(object):
return self._date
@date.setter
def date(
self,
date):
def date(self, date): # noqa: E501
"""Sets the date of this FormatTest.
@@ -386,10 +452,11 @@ class FormatTest(object):
:type: date
"""
if date is None:
raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501
raise ApiValueError("Invalid value for `date`, must not be `None`") # noqa: E501
self._date = (
date)
date
)
@property
def date_time(self):
@@ -402,9 +469,7 @@ class FormatTest(object):
return self._date_time
@date_time.setter
def date_time(
self,
date_time):
def date_time(self, date_time): # noqa: E501
"""Sets the date_time of this FormatTest.
@@ -413,7 +478,8 @@ class FormatTest(object):
"""
self._date_time = (
date_time)
date_time
)
@property
def uuid(self):
@@ -426,9 +492,7 @@ class FormatTest(object):
return self._uuid
@uuid.setter
def uuid(
self,
uuid):
def uuid(self, uuid): # noqa: E501
"""Sets the uuid of this FormatTest.
@@ -437,7 +501,8 @@ class FormatTest(object):
"""
self._uuid = (
uuid)
uuid
)
@property
def password(self):
@@ -450,9 +515,7 @@ class FormatTest(object):
return self._password
@password.setter
def password(
self,
password):
def password(self, password): # noqa: E501
"""Sets the password of this FormatTest.
@@ -460,14 +523,16 @@ class FormatTest(object):
:type: str
"""
if password is None:
raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501
if password is not None and len(password) > 64:
raise ValueError("Invalid value for `password`, length must be less than or equal to `64`") # noqa: E501
if password is not None and len(password) < 10:
raise ValueError("Invalid value for `password`, length must be greater than or equal to `10`") # noqa: E501
raise ApiValueError("Invalid value for `password`, must not be `None`") # noqa: E501
check_validations(
self.validations,
('password',),
password
)
self._password = (
password)
password
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,54 +10,75 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class HasOnlyReadOnly(object):
class HasOnlyReadOnly(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'bar': 'str',
'foo': 'str',
allowed_values = {
}
attribute_map = {
'bar': 'bar', # noqa: E501
'foo': 'foo', # noqa: E501
'foo': 'foo' # noqa: E501
}
openapi_types = {
'bar': 'str',
'foo': 'str'
}
validations = {
}
def __init__(self, bar=None, foo=None): # noqa: E501
"""HasOnlyReadOnly - a model defined in OpenAPI
Keyword Args:
bar (str): [optional] # noqa: E501
foo (str): [optional] # noqa: E501
"""
"""HasOnlyReadOnly - a model defined in OpenAPI""" # noqa: E501
self._bar = None
self._foo = None
self.discriminator = None
if bar is not None:
self.bar = bar # noqa: E501
self.bar = (
bar
)
if foo is not None:
self.foo = foo # noqa: E501
self.foo = (
foo
)
@property
def bar(self):
@@ -70,9 +91,7 @@ class HasOnlyReadOnly(object):
return self._bar
@bar.setter
def bar(
self,
bar):
def bar(self, bar): # noqa: E501
"""Sets the bar of this HasOnlyReadOnly.
@@ -81,7 +100,8 @@ class HasOnlyReadOnly(object):
"""
self._bar = (
bar)
bar
)
@property
def foo(self):
@@ -94,9 +114,7 @@ class HasOnlyReadOnly(object):
return self._foo
@foo.setter
def foo(
self,
foo):
def foo(self, foo): # noqa: E501
"""Sets the foo of this HasOnlyReadOnly.
@@ -105,7 +123,8 @@ class HasOnlyReadOnly(object):
"""
self._foo = (
foo)
foo
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class List(object):
class List(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'_123_list': 'str',
allowed_values = {
}
attribute_map = {
'_123_list': '123-list', # noqa: E501
'_123_list': '123-list' # noqa: E501
}
openapi_types = {
'_123_list': 'str'
}
validations = {
}
def __init__(self, _123_list=None): # noqa: E501
"""List - a model defined in OpenAPI
Keyword Args:
_123_list (str): [optional] # noqa: E501
"""
"""List - a model defined in OpenAPI""" # noqa: E501
self.__123_list = None
self.discriminator = None
if _123_list is not None:
self._123_list = _123_list # noqa: E501
self._123_list = (
_123_list
)
@property
def _123_list(self):
@@ -64,9 +84,7 @@ class List(object):
return self.__123_list
@_123_list.setter
def _123_list(
self,
_123_list):
def _123_list(self, _123_list): # noqa: E501
"""Sets the _123_list of this List.
@@ -75,7 +93,8 @@ class List(object):
"""
self.__123_list = (
_123_list)
_123_list
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,51 +10,70 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class MapTest(object):
class MapTest(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'map_map_of_string': 'dict(str, dict(str, str))',
'map_of_enum_string': 'dict(str, str)',
'direct_map': 'dict(str, bool)',
'indirect_map': 'dict(str, bool)',
allowed_values = {
('map_of_enum_string',): {
'UPPER': "UPPER",
'LOWER': "lower"
},
}
attribute_map = {
'map_map_of_string': 'map_map_of_string', # noqa: E501
'map_of_enum_string': 'map_of_enum_string', # noqa: E501
'direct_map': 'direct_map', # noqa: E501
'indirect_map': 'indirect_map', # noqa: E501
'indirect_map': 'indirect_map' # noqa: E501
}
openapi_types = {
'map_map_of_string': 'dict(str, dict(str, str))',
'map_of_enum_string': 'dict(str, str)',
'direct_map': 'dict(str, bool)',
'indirect_map': 'StringBooleanMap'
}
validations = {
}
def __init__(self, map_map_of_string=None, map_of_enum_string=None, direct_map=None, indirect_map=None): # noqa: E501
"""MapTest - a model defined in OpenAPI
Keyword Args:
map_map_of_string (dict(str, dict(str, str))): [optional] # noqa: E501
map_of_enum_string (dict(str, str)): [optional] # noqa: E501
direct_map (dict(str, bool)): [optional] # noqa: E501
indirect_map (dict(str, bool)): [optional] # noqa: E501
"""
"""MapTest - a model defined in OpenAPI""" # noqa: E501
self._map_map_of_string = None
self._map_of_enum_string = None
@@ -63,13 +82,21 @@ class MapTest(object):
self.discriminator = None
if map_map_of_string is not None:
self.map_map_of_string = map_map_of_string # noqa: E501
self.map_map_of_string = (
map_map_of_string
)
if map_of_enum_string is not None:
self.map_of_enum_string = map_of_enum_string # noqa: E501
self.map_of_enum_string = (
map_of_enum_string
)
if direct_map is not None:
self.direct_map = direct_map # noqa: E501
self.direct_map = (
direct_map
)
if indirect_map is not None:
self.indirect_map = indirect_map # noqa: E501
self.indirect_map = (
indirect_map
)
@property
def map_map_of_string(self):
@@ -82,9 +109,7 @@ class MapTest(object):
return self._map_map_of_string
@map_map_of_string.setter
def map_map_of_string(
self,
map_map_of_string):
def map_map_of_string(self, map_map_of_string): # noqa: E501
"""Sets the map_map_of_string of this MapTest.
@@ -93,7 +118,8 @@ class MapTest(object):
"""
self._map_map_of_string = (
map_map_of_string)
map_map_of_string
)
@property
def map_of_enum_string(self):
@@ -106,25 +132,23 @@ class MapTest(object):
return self._map_of_enum_string
@map_of_enum_string.setter
def map_of_enum_string(
self,
map_of_enum_string):
def map_of_enum_string(self, map_of_enum_string): # noqa: E501
"""Sets the map_of_enum_string of this MapTest.
:param map_of_enum_string: The map_of_enum_string of this MapTest. # noqa: E501
:type: dict(str, str)
"""
allowed_values = ["UPPER", "lower"] # noqa: E501
if not set(map_of_enum_string.keys()).issubset(set(allowed_values)):
raise ValueError(
"Invalid keys in `map_of_enum_string` [{0}], must be a subset of [{1}]" # noqa: E501
.format(", ".join(map(str, set(map_of_enum_string.keys()) - set(allowed_values))), # noqa: E501
", ".join(map(str, allowed_values)))
)
check_allowed_values(
self.allowed_values,
('map_of_enum_string',),
map_of_enum_string,
self.validations
)
self._map_of_enum_string = (
map_of_enum_string)
map_of_enum_string
)
@property
def direct_map(self):
@@ -137,9 +161,7 @@ class MapTest(object):
return self._direct_map
@direct_map.setter
def direct_map(
self,
direct_map):
def direct_map(self, direct_map): # noqa: E501
"""Sets the direct_map of this MapTest.
@@ -148,7 +170,8 @@ class MapTest(object):
"""
self._direct_map = (
direct_map)
direct_map
)
@property
def indirect_map(self):
@@ -156,23 +179,22 @@ class MapTest(object):
:return: The indirect_map of this MapTest. # noqa: E501
:rtype: dict(str, bool)
:rtype: StringBooleanMap
"""
return self._indirect_map
@indirect_map.setter
def indirect_map(
self,
indirect_map):
def indirect_map(self, indirect_map): # noqa: E501
"""Sets the indirect_map of this MapTest.
:param indirect_map: The indirect_map of this MapTest. # noqa: E501
:type: dict(str, bool)
:type: StringBooleanMap
"""
self._indirect_map = (
indirect_map)
indirect_map
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,64 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class MixedPropertiesAndAdditionalPropertiesClass(object):
class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'uuid': 'str',
'date_time': 'datetime',
'map': 'dict(str, Animal)',
allowed_values = {
}
attribute_map = {
'uuid': 'uuid', # noqa: E501
'date_time': 'dateTime', # noqa: E501
'map': 'map', # noqa: E501
'map': 'map' # noqa: E501
}
openapi_types = {
'uuid': 'str',
'date_time': 'datetime',
'map': 'dict(str, Animal)'
}
validations = {
}
def __init__(self, uuid=None, date_time=None, map=None): # noqa: E501
"""MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI
Keyword Args:
uuid (str): [optional] # noqa: E501
date_time (datetime): [optional] # noqa: E501
map (dict(str, Animal)): [optional] # noqa: E501
"""
"""MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI""" # noqa: E501
self._uuid = None
self._date_time = None
@@ -59,11 +75,17 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
self.discriminator = None
if uuid is not None:
self.uuid = uuid # noqa: E501
self.uuid = (
uuid
)
if date_time is not None:
self.date_time = date_time # noqa: E501
self.date_time = (
date_time
)
if map is not None:
self.map = map # noqa: E501
self.map = (
map
)
@property
def uuid(self):
@@ -76,9 +98,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
return self._uuid
@uuid.setter
def uuid(
self,
uuid):
def uuid(self, uuid): # noqa: E501
"""Sets the uuid of this MixedPropertiesAndAdditionalPropertiesClass.
@@ -87,7 +107,8 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
"""
self._uuid = (
uuid)
uuid
)
@property
def date_time(self):
@@ -100,9 +121,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
return self._date_time
@date_time.setter
def date_time(
self,
date_time):
def date_time(self, date_time): # noqa: E501
"""Sets the date_time of this MixedPropertiesAndAdditionalPropertiesClass.
@@ -111,7 +130,8 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
"""
self._date_time = (
date_time)
date_time
)
@property
def map(self):
@@ -124,9 +144,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
return self._map
@map.setter
def map(
self,
map):
def map(self, map): # noqa: E501
"""Sets the map of this MixedPropertiesAndAdditionalPropertiesClass.
@@ -135,7 +153,8 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
"""
self._map = (
map)
map
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,54 +10,75 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class Model200Response(object):
class Model200Response(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'name': 'int',
'_class': 'str',
allowed_values = {
}
attribute_map = {
'name': 'name', # noqa: E501
'_class': 'class', # noqa: E501
'_class': 'class' # noqa: E501
}
openapi_types = {
'name': 'int',
'_class': 'str'
}
validations = {
}
def __init__(self, name=None, _class=None): # noqa: E501
"""Model200Response - a model defined in OpenAPI
Keyword Args:
name (int): [optional] # noqa: E501
_class (str): [optional] # noqa: E501
"""
"""Model200Response - a model defined in OpenAPI""" # noqa: E501
self._name = None
self.__class = None
self.discriminator = None
if name is not None:
self.name = name # noqa: E501
self.name = (
name
)
if _class is not None:
self._class = _class # noqa: E501
self._class = (
_class
)
@property
def name(self):
@@ -70,9 +91,7 @@ class Model200Response(object):
return self._name
@name.setter
def name(
self,
name):
def name(self, name): # noqa: E501
"""Sets the name of this Model200Response.
@@ -81,7 +100,8 @@ class Model200Response(object):
"""
self._name = (
name)
name
)
@property
def _class(self):
@@ -94,9 +114,7 @@ class Model200Response(object):
return self.__class
@_class.setter
def _class(
self,
_class):
def _class(self, _class): # noqa: E501
"""Sets the _class of this Model200Response.
@@ -105,7 +123,8 @@ class Model200Response(object):
"""
self.__class = (
_class)
_class
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class ModelReturn(object):
class ModelReturn(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'_return': 'int',
allowed_values = {
}
attribute_map = {
'_return': 'return', # noqa: E501
'_return': 'return' # noqa: E501
}
openapi_types = {
'_return': 'int'
}
validations = {
}
def __init__(self, _return=None): # noqa: E501
"""ModelReturn - a model defined in OpenAPI
Keyword Args:
_return (int): [optional] # noqa: E501
"""
"""ModelReturn - a model defined in OpenAPI""" # noqa: E501
self.__return = None
self.discriminator = None
if _return is not None:
self._return = _return # noqa: E501
self._return = (
_return
)
@property
def _return(self):
@@ -64,9 +84,7 @@ class ModelReturn(object):
return self.__return
@_return.setter
def _return(
self,
_return):
def _return(self, _return): # noqa: E501
"""Sets the _return of this ModelReturn.
@@ -75,7 +93,8 @@ class ModelReturn(object):
"""
self.__return = (
_return)
_return
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,51 +10,66 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class Name(object):
class Name(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'name': 'int',
'snake_case': 'int',
'_property': 'str',
'_123_number': 'int',
allowed_values = {
}
attribute_map = {
'name': 'name', # noqa: E501
'snake_case': 'snake_case', # noqa: E501
'_property': 'property', # noqa: E501
'_123_number': '123Number', # noqa: E501
'_123_number': '123Number' # noqa: E501
}
def __init__(self, name, snake_case=None, _property=None, _123_number=None): # noqa: E501
"""Name - a model defined in OpenAPI
openapi_types = {
'name': 'int',
'snake_case': 'int',
'_property': 'str',
'_123_number': 'int'
}
Args:
name (int):
validations = {
}
Keyword Args: # noqa: E501
snake_case (int): [optional] # noqa: E501
_property (str): [optional] # noqa: E501
_123_number (int): [optional] # noqa: E501
"""
def __init__(self, name=None, snake_case=None, _property=None, _123_number=None): # noqa: E501
"""Name - a model defined in OpenAPI""" # noqa: E501
self._name = None
self._snake_case = None
@@ -64,11 +79,17 @@ class Name(object):
self.name = name
if snake_case is not None:
self.snake_case = snake_case # noqa: E501
self.snake_case = (
snake_case
)
if _property is not None:
self._property = _property # noqa: E501
self._property = (
_property
)
if _123_number is not None:
self._123_number = _123_number # noqa: E501
self._123_number = (
_123_number
)
@property
def name(self):
@@ -81,9 +102,7 @@ class Name(object):
return self._name
@name.setter
def name(
self,
name):
def name(self, name): # noqa: E501
"""Sets the name of this Name.
@@ -91,10 +110,11 @@ class Name(object):
:type: int
"""
if name is None:
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
raise ApiValueError("Invalid value for `name`, must not be `None`") # noqa: E501
self._name = (
name)
name
)
@property
def snake_case(self):
@@ -107,9 +127,7 @@ class Name(object):
return self._snake_case
@snake_case.setter
def snake_case(
self,
snake_case):
def snake_case(self, snake_case): # noqa: E501
"""Sets the snake_case of this Name.
@@ -118,7 +136,8 @@ class Name(object):
"""
self._snake_case = (
snake_case)
snake_case
)
@property
def _property(self):
@@ -131,9 +150,7 @@ class Name(object):
return self.__property
@_property.setter
def _property(
self,
_property):
def _property(self, _property): # noqa: E501
"""Sets the _property of this Name.
@@ -142,7 +159,8 @@ class Name(object):
"""
self.__property = (
_property)
_property
)
@property
def _123_number(self):
@@ -155,9 +173,7 @@ class Name(object):
return self.__123_number
@_123_number.setter
def _123_number(
self,
_123_number):
def _123_number(self, _123_number): # noqa: E501
"""Sets the _123_number of this Name.
@@ -166,7 +182,8 @@ class Name(object):
"""
self.__123_number = (
_123_number)
_123_number
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class NumberOnly(object):
class NumberOnly(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'just_number': 'float',
allowed_values = {
}
attribute_map = {
'just_number': 'JustNumber', # noqa: E501
'just_number': 'JustNumber' # noqa: E501
}
openapi_types = {
'just_number': 'float'
}
validations = {
}
def __init__(self, just_number=None): # noqa: E501
"""NumberOnly - a model defined in OpenAPI
Keyword Args:
just_number (float): [optional] # noqa: E501
"""
"""NumberOnly - a model defined in OpenAPI""" # noqa: E501
self._just_number = None
self.discriminator = None
if just_number is not None:
self.just_number = just_number # noqa: E501
self.just_number = (
just_number
)
@property
def just_number(self):
@@ -64,9 +84,7 @@ class NumberOnly(object):
return self._just_number
@just_number.setter
def just_number(
self,
just_number):
def just_number(self, just_number): # noqa: E501
"""Sets the just_number of this NumberOnly.
@@ -75,7 +93,8 @@ class NumberOnly(object):
"""
self._just_number = (
just_number)
just_number
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,33 +10,50 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class Order(object):
class Order(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'id': 'int',
'pet_id': 'int',
'quantity': 'int',
'ship_date': 'datetime',
'status': 'str',
'complete': 'bool',
allowed_values = {
('status',): {
'PLACED': "placed",
'APPROVED': "approved",
'DELIVERED': "delivered"
},
}
attribute_map = {
@@ -45,22 +62,23 @@ class Order(object):
'quantity': 'quantity', # noqa: E501
'ship_date': 'shipDate', # noqa: E501
'status': 'status', # noqa: E501
'complete': 'complete', # noqa: E501
'complete': 'complete' # noqa: E501
}
def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=None): # noqa: E501
"""Order - a model defined in OpenAPI
openapi_types = {
'id': 'int',
'pet_id': 'int',
'quantity': 'int',
'ship_date': 'datetime',
'status': 'str',
'complete': 'bool'
}
validations = {
}
Keyword Args:
id (int): [optional] # noqa: E501
pet_id (int): [optional] # noqa: E501
quantity (int): [optional] # noqa: E501
ship_date (datetime): [optional] # noqa: E501
status (str): Order Status. [optional] # noqa: E501
complete (bool): [optional] if omitted the server will use the default value of False # noqa: E501
"""
def __init__(self, id=None, pet_id=None, quantity=None, ship_date=None, status=None, complete=False): # noqa: E501
"""Order - a model defined in OpenAPI""" # noqa: E501
self._id = None
self._pet_id = None
@@ -71,17 +89,29 @@ class Order(object):
self.discriminator = None
if id is not None:
self.id = id # noqa: E501
self.id = (
id
)
if pet_id is not None:
self.pet_id = pet_id # noqa: E501
self.pet_id = (
pet_id
)
if quantity is not None:
self.quantity = quantity # noqa: E501
self.quantity = (
quantity
)
if ship_date is not None:
self.ship_date = ship_date # noqa: E501
self.ship_date = (
ship_date
)
if status is not None:
self.status = status # noqa: E501
self.status = (
status
)
if complete is not None:
self.complete = complete # noqa: E501
self.complete = (
complete
)
@property
def id(self):
@@ -94,9 +124,7 @@ class Order(object):
return self._id
@id.setter
def id(
self,
id):
def id(self, id): # noqa: E501
"""Sets the id of this Order.
@@ -105,7 +133,8 @@ class Order(object):
"""
self._id = (
id)
id
)
@property
def pet_id(self):
@@ -118,9 +147,7 @@ class Order(object):
return self._pet_id
@pet_id.setter
def pet_id(
self,
pet_id):
def pet_id(self, pet_id): # noqa: E501
"""Sets the pet_id of this Order.
@@ -129,7 +156,8 @@ class Order(object):
"""
self._pet_id = (
pet_id)
pet_id
)
@property
def quantity(self):
@@ -142,9 +170,7 @@ class Order(object):
return self._quantity
@quantity.setter
def quantity(
self,
quantity):
def quantity(self, quantity): # noqa: E501
"""Sets the quantity of this Order.
@@ -153,7 +179,8 @@ class Order(object):
"""
self._quantity = (
quantity)
quantity
)
@property
def ship_date(self):
@@ -166,9 +193,7 @@ class Order(object):
return self._ship_date
@ship_date.setter
def ship_date(
self,
ship_date):
def ship_date(self, ship_date): # noqa: E501
"""Sets the ship_date of this Order.
@@ -177,7 +202,8 @@ class Order(object):
"""
self._ship_date = (
ship_date)
ship_date
)
@property
def status(self):
@@ -191,9 +217,7 @@ class Order(object):
return self._status
@status.setter
def status(
self,
status):
def status(self, status): # noqa: E501
"""Sets the status of this Order.
Order Status # noqa: E501
@@ -201,15 +225,16 @@ class Order(object):
:param status: The status of this Order. # noqa: E501
:type: str
"""
allowed_values = ["placed", "approved", "delivered"] # noqa: E501
if status not in allowed_values:
raise ValueError(
"Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
.format(status, allowed_values)
)
check_allowed_values(
self.allowed_values,
('status',),
status,
self.validations
)
self._status = (
status)
status
)
@property
def complete(self):
@@ -222,9 +247,7 @@ class Order(object):
return self._complete
@complete.setter
def complete(
self,
complete):
def complete(self, complete): # noqa: E501
"""Sets the complete of this Order.
@@ -233,7 +256,8 @@ class Order(object):
"""
self._complete = (
complete)
complete
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,64 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class OuterComposite(object):
class OuterComposite(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'my_number': 'float',
'my_string': 'str',
'my_boolean': 'bool',
allowed_values = {
}
attribute_map = {
'my_number': 'my_number', # noqa: E501
'my_string': 'my_string', # noqa: E501
'my_boolean': 'my_boolean', # noqa: E501
'my_boolean': 'my_boolean' # noqa: E501
}
openapi_types = {
'my_number': 'OuterNumber',
'my_string': 'str',
'my_boolean': 'bool'
}
validations = {
}
def __init__(self, my_number=None, my_string=None, my_boolean=None): # noqa: E501
"""OuterComposite - a model defined in OpenAPI
Keyword Args:
my_number (float): [optional] # noqa: E501
my_string (str): [optional] # noqa: E501
my_boolean (bool): [optional] # noqa: E501
"""
"""OuterComposite - a model defined in OpenAPI""" # noqa: E501
self._my_number = None
self._my_string = None
@@ -59,11 +75,17 @@ class OuterComposite(object):
self.discriminator = None
if my_number is not None:
self.my_number = my_number # noqa: E501
self.my_number = (
my_number
)
if my_string is not None:
self.my_string = my_string # noqa: E501
self.my_string = (
my_string
)
if my_boolean is not None:
self.my_boolean = my_boolean # noqa: E501
self.my_boolean = (
my_boolean
)
@property
def my_number(self):
@@ -71,23 +93,22 @@ class OuterComposite(object):
:return: The my_number of this OuterComposite. # noqa: E501
:rtype: float
:rtype: OuterNumber
"""
return self._my_number
@my_number.setter
def my_number(
self,
my_number):
def my_number(self, my_number): # noqa: E501
"""Sets the my_number of this OuterComposite.
:param my_number: The my_number of this OuterComposite. # noqa: E501
:type: float
:type: OuterNumber
"""
self._my_number = (
my_number)
my_number
)
@property
def my_string(self):
@@ -100,9 +121,7 @@ class OuterComposite(object):
return self._my_string
@my_string.setter
def my_string(
self,
my_string):
def my_string(self, my_string): # noqa: E501
"""Sets the my_string of this OuterComposite.
@@ -111,7 +130,8 @@ class OuterComposite(object):
"""
self._my_string = (
my_string)
my_string
)
@property
def my_boolean(self):
@@ -124,9 +144,7 @@ class OuterComposite(object):
return self._my_boolean
@my_boolean.setter
def my_boolean(
self,
my_boolean):
def my_boolean(self, my_boolean): # noqa: E501
"""Sets the my_boolean of this OuterComposite.
@@ -135,7 +153,8 @@ class OuterComposite(object):
"""
self._my_boolean = (
my_boolean)
my_boolean
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,75 +10,97 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class OuterEnum(object):
class OuterEnum(ModelSimple):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
allowed enum values
"""
PLACED = "placed"
APPROVED = "approved"
DELIVERED = "delivered"
"""
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
openapi_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.
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
allowed_values = {
('value',): {
'PLACED': "placed",
'APPROVED': "approved",
'DELIVERED': "delivered"
},
}
openapi_types = {
'value': 'str'
}
attribute_map = {
validations = {
}
def __init__(self): # noqa: E501
"""OuterEnum - a model defined in OpenAPI
def __init__(self, value=None): # noqa: E501
"""OuterEnum - a model defined in OpenAPI""" # noqa: E501
Keyword Args:
"""
self._value = None
self.discriminator = None
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
self.value = value
for attr, _ in six.iteritems(self.openapi_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
@property
def value(self):
"""Gets the value of this OuterEnum. # noqa: E501
return result
:return: The value of this OuterEnum. # noqa: E501
:rtype: str
"""
return self._value
@value.setter
def value(self, value): # noqa: E501
"""Sets the value of this OuterEnum.
:param value: The value of this OuterEnum. # noqa: E501
:type: str
"""
if value is None:
raise ApiValueError("Invalid value for `value`, must not be `None`") # noqa: E501
check_allowed_values(
self.allowed_values,
('value',),
value,
self.validations
)
self._value = (
value
)
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
return str(self._value)
def __repr__(self):
"""For `print` and `pprint`"""

View File

@@ -0,0 +1,117 @@
# coding: utf-8
"""
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
import pprint # noqa: F401
import re # noqa: F401
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class OuterNumber(ModelSimple):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
allowed_values = {
}
openapi_types = {
'value': 'float'
}
validations = {
('value',): {
'inclusive_maximum': 2E+1,
'inclusive_minimum': 1E+1,
},
}
def __init__(self, value=None): # noqa: E501
"""OuterNumber - a model defined in OpenAPI""" # noqa: E501
self._value = None
self.discriminator = None
self.value = value
@property
def value(self):
"""Gets the value of this OuterNumber. # noqa: E501
:return: The value of this OuterNumber. # noqa: E501
:rtype: float
"""
return self._value
@value.setter
def value(self, value): # noqa: E501
"""Sets the value of this OuterNumber.
:param value: The value of this OuterNumber. # noqa: E501
:type: float
"""
if value is None:
raise ApiValueError("Invalid value for `value`, must not be `None`") # noqa: E501
check_validations(
self.validations,
('value',),
value
)
self._value = (
value
)
def to_str(self):
"""Returns the string representation of the model"""
return str(self._value)
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, OuterNumber):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@@ -10,57 +10,75 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class Pet(object):
class Pet(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'name': 'str',
'photo_urls': 'list[str]',
'id': 'int',
'category': 'Category',
'tags': 'list[Tag]',
'status': 'str',
allowed_values = {
('status',): {
'AVAILABLE': "available",
'PENDING': "pending",
'SOLD': "sold"
},
}
attribute_map = {
'name': 'name', # noqa: E501
'photo_urls': 'photoUrls', # noqa: E501
'id': 'id', # noqa: E501
'category': 'category', # noqa: E501
'name': 'name', # noqa: E501
'photo_urls': 'photoUrls', # noqa: E501
'tags': 'tags', # noqa: E501
'status': 'status', # noqa: E501
'status': 'status' # noqa: E501
}
def __init__(self, name, photo_urls, id=None, category=None, tags=None, status=None): # noqa: E501
"""Pet - a model defined in OpenAPI
openapi_types = {
'id': 'int',
'category': 'Category',
'name': 'str',
'photo_urls': 'list[str]',
'tags': 'list[Tag]',
'status': 'str'
}
Args:
name (str):
photo_urls (list[str]):
validations = {
}
Keyword Args: # noqa: E501 # noqa: E501
id (int): [optional] # noqa: E501
category (Category): [optional] # noqa: E501
tags (list[Tag]): [optional] # noqa: E501
status (str): pet status in the store. [optional] # noqa: E501
"""
def __init__(self, id=None, category=None, name=None, photo_urls=None, tags=None, status=None): # noqa: E501
"""Pet - a model defined in OpenAPI""" # noqa: E501
self._id = None
self._category = None
@@ -71,15 +89,23 @@ class Pet(object):
self.discriminator = None
if id is not None:
self.id = id # noqa: E501
self.id = (
id
)
if category is not None:
self.category = category # noqa: E501
self.category = (
category
)
self.name = name
self.photo_urls = photo_urls
if tags is not None:
self.tags = tags # noqa: E501
self.tags = (
tags
)
if status is not None:
self.status = status # noqa: E501
self.status = (
status
)
@property
def id(self):
@@ -92,9 +118,7 @@ class Pet(object):
return self._id
@id.setter
def id(
self,
id):
def id(self, id): # noqa: E501
"""Sets the id of this Pet.
@@ -103,7 +127,8 @@ class Pet(object):
"""
self._id = (
id)
id
)
@property
def category(self):
@@ -116,9 +141,7 @@ class Pet(object):
return self._category
@category.setter
def category(
self,
category):
def category(self, category): # noqa: E501
"""Sets the category of this Pet.
@@ -127,7 +150,8 @@ class Pet(object):
"""
self._category = (
category)
category
)
@property
def name(self):
@@ -140,9 +164,7 @@ class Pet(object):
return self._name
@name.setter
def name(
self,
name):
def name(self, name): # noqa: E501
"""Sets the name of this Pet.
@@ -150,10 +172,11 @@ class Pet(object):
:type: str
"""
if name is None:
raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
raise ApiValueError("Invalid value for `name`, must not be `None`") # noqa: E501
self._name = (
name)
name
)
@property
def photo_urls(self):
@@ -166,9 +189,7 @@ class Pet(object):
return self._photo_urls
@photo_urls.setter
def photo_urls(
self,
photo_urls):
def photo_urls(self, photo_urls): # noqa: E501
"""Sets the photo_urls of this Pet.
@@ -176,10 +197,11 @@ class Pet(object):
:type: list[str]
"""
if photo_urls is None:
raise ValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501
raise ApiValueError("Invalid value for `photo_urls`, must not be `None`") # noqa: E501
self._photo_urls = (
photo_urls)
photo_urls
)
@property
def tags(self):
@@ -192,9 +214,7 @@ class Pet(object):
return self._tags
@tags.setter
def tags(
self,
tags):
def tags(self, tags): # noqa: E501
"""Sets the tags of this Pet.
@@ -203,7 +223,8 @@ class Pet(object):
"""
self._tags = (
tags)
tags
)
@property
def status(self):
@@ -217,9 +238,7 @@ class Pet(object):
return self._status
@status.setter
def status(
self,
status):
def status(self, status): # noqa: E501
"""Sets the status of this Pet.
pet status in the store # noqa: E501
@@ -227,15 +246,16 @@ class Pet(object):
:param status: The status of this Pet. # noqa: E501
:type: str
"""
allowed_values = ["available", "pending", "sold"] # noqa: E501
if status not in allowed_values:
raise ValueError(
"Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
.format(status, allowed_values)
)
check_allowed_values(
self.allowed_values,
('status',),
status,
self.validations
)
self._status = (
status)
status
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,54 +10,75 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class ReadOnlyFirst(object):
class ReadOnlyFirst(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'bar': 'str',
'baz': 'str',
allowed_values = {
}
attribute_map = {
'bar': 'bar', # noqa: E501
'baz': 'baz', # noqa: E501
'baz': 'baz' # noqa: E501
}
openapi_types = {
'bar': 'str',
'baz': 'str'
}
validations = {
}
def __init__(self, bar=None, baz=None): # noqa: E501
"""ReadOnlyFirst - a model defined in OpenAPI
Keyword Args:
bar (str): [optional] # noqa: E501
baz (str): [optional] # noqa: E501
"""
"""ReadOnlyFirst - a model defined in OpenAPI""" # noqa: E501
self._bar = None
self._baz = None
self.discriminator = None
if bar is not None:
self.bar = bar # noqa: E501
self.bar = (
bar
)
if baz is not None:
self.baz = baz # noqa: E501
self.baz = (
baz
)
@property
def bar(self):
@@ -70,9 +91,7 @@ class ReadOnlyFirst(object):
return self._bar
@bar.setter
def bar(
self,
bar):
def bar(self, bar): # noqa: E501
"""Sets the bar of this ReadOnlyFirst.
@@ -81,7 +100,8 @@ class ReadOnlyFirst(object):
"""
self._bar = (
bar)
bar
)
@property
def baz(self):
@@ -94,9 +114,7 @@ class ReadOnlyFirst(object):
return self._baz
@baz.setter
def baz(
self,
baz):
def baz(self, baz): # noqa: E501
"""Sets the baz of this ReadOnlyFirst.
@@ -105,7 +123,8 @@ class ReadOnlyFirst(object):
"""
self._baz = (
baz)
baz
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,48 +10,68 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class SpecialModelName(object):
class SpecialModelName(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'special_property_name': 'int',
allowed_values = {
}
attribute_map = {
'special_property_name': '$special[property.name]', # noqa: E501
'special_property_name': '$special[property.name]' # noqa: E501
}
openapi_types = {
'special_property_name': 'int'
}
validations = {
}
def __init__(self, special_property_name=None): # noqa: E501
"""SpecialModelName - a model defined in OpenAPI
Keyword Args:
special_property_name (int): [optional] # noqa: E501
"""
"""SpecialModelName - a model defined in OpenAPI""" # noqa: E501
self._special_property_name = None
self.discriminator = None
if special_property_name is not None:
self.special_property_name = special_property_name # noqa: E501
self.special_property_name = (
special_property_name
)
@property
def special_property_name(self):
@@ -64,9 +84,7 @@ class SpecialModelName(object):
return self._special_property_name
@special_property_name.setter
def special_property_name(
self,
special_property_name):
def special_property_name(self, special_property_name): # noqa: E501
"""Sets the special_property_name of this SpecialModelName.
@@ -75,7 +93,8 @@ class SpecialModelName(object):
"""
self._special_property_name = (
special_property_name)
special_property_name
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -0,0 +1,108 @@
# coding: utf-8
"""
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
import pprint # noqa: F401
import re # noqa: F401
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class StringBooleanMap(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
allowed_values = {
}
attribute_map = {
}
openapi_types = {
}
validations = {
}
def __init__(self): # noqa: E501
"""StringBooleanMap - a model defined in OpenAPI""" # noqa: E501
self.discriminator = None
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_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
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, StringBooleanMap):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other

View File

@@ -10,54 +10,75 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class Tag(object):
class Tag(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'id': 'int',
'name': 'str',
allowed_values = {
}
attribute_map = {
'id': 'id', # noqa: E501
'name': 'name', # noqa: E501
'name': 'name' # noqa: E501
}
openapi_types = {
'id': 'int',
'name': 'str'
}
validations = {
}
def __init__(self, id=None, name=None): # noqa: E501
"""Tag - a model defined in OpenAPI
Keyword Args:
id (int): [optional] # noqa: E501
name (str): [optional] # noqa: E501
"""
"""Tag - a model defined in OpenAPI""" # noqa: E501
self._id = None
self._name = None
self.discriminator = None
if id is not None:
self.id = id # noqa: E501
self.id = (
id
)
if name is not None:
self.name = name # noqa: E501
self.name = (
name
)
@property
def id(self):
@@ -70,9 +91,7 @@ class Tag(object):
return self._id
@id.setter
def id(
self,
id):
def id(self, id): # noqa: E501
"""Sets the id of this Tag.
@@ -81,7 +100,8 @@ class Tag(object):
"""
self._id = (
id)
id
)
@property
def name(self):
@@ -94,9 +114,7 @@ class Tag(object):
return self._name
@name.setter
def name(
self,
name):
def name(self, name): # noqa: E501
"""Sets the name of this Tag.
@@ -105,7 +123,8 @@ class Tag(object):
"""
self._name = (
name)
name
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,34 +10,45 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class TypeHolderDefault(object):
class TypeHolderDefault(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'string_item': 'str',
'number_item': 'float',
'integer_item': 'int',
'bool_item': 'bool',
'array_item': 'list[int]',
'date_item': 'date',
'datetime_item': 'datetime',
allowed_values = {
}
attribute_map = {
@@ -45,25 +56,26 @@ class TypeHolderDefault(object):
'number_item': 'number_item', # noqa: E501
'integer_item': 'integer_item', # noqa: E501
'bool_item': 'bool_item', # noqa: E501
'array_item': 'array_item', # noqa: E501
'date_item': 'date_item', # noqa: E501
'datetime_item': 'datetime_item', # noqa: E501
'array_item': 'array_item' # noqa: E501
}
def __init__(self, array_item, string_item='what', number_item=1.234, integer_item=-2, bool_item=True, date_item=None, datetime_item=None): # noqa: E501
"""TypeHolderDefault - a model defined in OpenAPI
openapi_types = {
'string_item': 'str',
'number_item': 'float',
'integer_item': 'int',
'bool_item': 'bool',
'date_item': 'date',
'datetime_item': 'datetime',
'array_item': 'list[int]'
}
Args:
array_item (list[int]):
validations = {
}
Keyword Args:
string_item (str): defaults to 'what', must be one of ['what'] # noqa: E501
number_item (float): defaults to 1.234, must be one of [1.234] # noqa: E501
integer_item (int): defaults to -2, must be one of [-2] # noqa: E501
bool_item (bool): defaults to True, must be one of [True] # noqa: E501 # noqa: E501
date_item (date): [optional] # noqa: E501
datetime_item (datetime): [optional] # noqa: E501
"""
def __init__(self, string_item='what', number_item=1.234, integer_item=-2, bool_item=True, date_item=None, datetime_item=None, array_item=None): # noqa: E501
"""TypeHolderDefault - a model defined in OpenAPI""" # noqa: E501
self._string_item = None
self._number_item = None
@@ -79,9 +91,13 @@ class TypeHolderDefault(object):
self.integer_item = integer_item
self.bool_item = bool_item
if date_item is not None:
self.date_item = date_item # noqa: E501
self.date_item = (
date_item
)
if datetime_item is not None:
self.datetime_item = datetime_item # noqa: E501
self.datetime_item = (
datetime_item
)
self.array_item = array_item
@property
@@ -95,9 +111,7 @@ class TypeHolderDefault(object):
return self._string_item
@string_item.setter
def string_item(
self,
string_item):
def string_item(self, string_item): # noqa: E501
"""Sets the string_item of this TypeHolderDefault.
@@ -105,10 +119,11 @@ class TypeHolderDefault(object):
:type: str
"""
if string_item is None:
raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
raise ApiValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
self._string_item = (
string_item)
string_item
)
@property
def number_item(self):
@@ -121,9 +136,7 @@ class TypeHolderDefault(object):
return self._number_item
@number_item.setter
def number_item(
self,
number_item):
def number_item(self, number_item): # noqa: E501
"""Sets the number_item of this TypeHolderDefault.
@@ -131,10 +144,11 @@ class TypeHolderDefault(object):
:type: float
"""
if number_item is None:
raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
raise ApiValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
self._number_item = (
number_item)
number_item
)
@property
def integer_item(self):
@@ -147,9 +161,7 @@ class TypeHolderDefault(object):
return self._integer_item
@integer_item.setter
def integer_item(
self,
integer_item):
def integer_item(self, integer_item): # noqa: E501
"""Sets the integer_item of this TypeHolderDefault.
@@ -157,10 +169,11 @@ class TypeHolderDefault(object):
:type: int
"""
if integer_item is None:
raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
raise ApiValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
self._integer_item = (
integer_item)
integer_item
)
@property
def bool_item(self):
@@ -173,9 +186,7 @@ class TypeHolderDefault(object):
return self._bool_item
@bool_item.setter
def bool_item(
self,
bool_item):
def bool_item(self, bool_item): # noqa: E501
"""Sets the bool_item of this TypeHolderDefault.
@@ -183,10 +194,11 @@ class TypeHolderDefault(object):
:type: bool
"""
if bool_item is None:
raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
raise ApiValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
self._bool_item = (
bool_item)
bool_item
)
@property
def date_item(self):
@@ -199,9 +211,7 @@ class TypeHolderDefault(object):
return self._date_item
@date_item.setter
def date_item(
self,
date_item):
def date_item(self, date_item): # noqa: E501
"""Sets the date_item of this TypeHolderDefault.
@@ -210,7 +220,8 @@ class TypeHolderDefault(object):
"""
self._date_item = (
date_item)
date_item
)
@property
def datetime_item(self):
@@ -223,9 +234,7 @@ class TypeHolderDefault(object):
return self._datetime_item
@datetime_item.setter
def datetime_item(
self,
datetime_item):
def datetime_item(self, datetime_item): # noqa: E501
"""Sets the datetime_item of this TypeHolderDefault.
@@ -234,7 +243,8 @@ class TypeHolderDefault(object):
"""
self._datetime_item = (
datetime_item)
datetime_item
)
@property
def array_item(self):
@@ -247,9 +257,7 @@ class TypeHolderDefault(object):
return self._array_item
@array_item.setter
def array_item(
self,
array_item):
def array_item(self, array_item): # noqa: E501
"""Sets the array_item of this TypeHolderDefault.
@@ -257,10 +265,11 @@ class TypeHolderDefault(object):
:type: list[int]
"""
if array_item is None:
raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
raise ApiValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
self._array_item = (
array_item)
array_item
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,32 +10,54 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class TypeHolderExample(object):
class TypeHolderExample(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'string_item': 'str',
'number_item': 'float',
'integer_item': 'int',
'bool_item': 'bool',
'array_item': 'list[int]',
allowed_values = {
('string_item',): {
'WHAT': "what"
},
('number_item',): {
'1.234': 1.234
},
('integer_item',): {
'-2': -2
},
}
attribute_map = {
@@ -43,21 +65,22 @@ class TypeHolderExample(object):
'number_item': 'number_item', # noqa: E501
'integer_item': 'integer_item', # noqa: E501
'bool_item': 'bool_item', # noqa: E501
'array_item': 'array_item', # noqa: E501
'array_item': 'array_item' # noqa: E501
}
def __init__(self, bool_item, array_item, string_item='what', number_item=1.234, integer_item=-2): # noqa: E501
"""TypeHolderExample - a model defined in OpenAPI
openapi_types = {
'string_item': 'str',
'number_item': 'float',
'integer_item': 'int',
'bool_item': 'bool',
'array_item': 'list[int]'
}
Args:
bool_item (bool):
array_item (list[int]):
validations = {
}
Keyword Args:
string_item (str): defaults to 'what', must be one of ['what'] # noqa: E501
number_item (float): defaults to 1.234, must be one of [1.234] # noqa: E501
integer_item (int): defaults to -2, must be one of [-2] # noqa: E501 # noqa: E501 # noqa: E501
"""
def __init__(self, string_item='what', number_item=1.234, integer_item=-2, bool_item=None, array_item=None): # noqa: E501
"""TypeHolderExample - a model defined in OpenAPI""" # noqa: E501
self._string_item = None
self._number_item = None
@@ -83,9 +106,7 @@ class TypeHolderExample(object):
return self._string_item
@string_item.setter
def string_item(
self,
string_item):
def string_item(self, string_item): # noqa: E501
"""Sets the string_item of this TypeHolderExample.
@@ -93,16 +114,17 @@ class TypeHolderExample(object):
:type: str
"""
if string_item is None:
raise ValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
allowed_values = ["what"] # noqa: E501
if string_item not in allowed_values:
raise ValueError(
"Invalid value for `string_item` ({0}), must be one of {1}" # noqa: E501
.format(string_item, allowed_values)
)
raise ApiValueError("Invalid value for `string_item`, must not be `None`") # noqa: E501
check_allowed_values(
self.allowed_values,
('string_item',),
string_item,
self.validations
)
self._string_item = (
string_item)
string_item
)
@property
def number_item(self):
@@ -115,9 +137,7 @@ class TypeHolderExample(object):
return self._number_item
@number_item.setter
def number_item(
self,
number_item):
def number_item(self, number_item): # noqa: E501
"""Sets the number_item of this TypeHolderExample.
@@ -125,16 +145,17 @@ class TypeHolderExample(object):
:type: float
"""
if number_item is None:
raise ValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
allowed_values = [1.234] # noqa: E501
if number_item not in allowed_values:
raise ValueError(
"Invalid value for `number_item` ({0}), must be one of {1}" # noqa: E501
.format(number_item, allowed_values)
)
raise ApiValueError("Invalid value for `number_item`, must not be `None`") # noqa: E501
check_allowed_values(
self.allowed_values,
('number_item',),
number_item,
self.validations
)
self._number_item = (
number_item)
number_item
)
@property
def integer_item(self):
@@ -147,9 +168,7 @@ class TypeHolderExample(object):
return self._integer_item
@integer_item.setter
def integer_item(
self,
integer_item):
def integer_item(self, integer_item): # noqa: E501
"""Sets the integer_item of this TypeHolderExample.
@@ -157,16 +176,17 @@ class TypeHolderExample(object):
:type: int
"""
if integer_item is None:
raise ValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
allowed_values = [-2] # noqa: E501
if integer_item not in allowed_values:
raise ValueError(
"Invalid value for `integer_item` ({0}), must be one of {1}" # noqa: E501
.format(integer_item, allowed_values)
)
raise ApiValueError("Invalid value for `integer_item`, must not be `None`") # noqa: E501
check_allowed_values(
self.allowed_values,
('integer_item',),
integer_item,
self.validations
)
self._integer_item = (
integer_item)
integer_item
)
@property
def bool_item(self):
@@ -179,9 +199,7 @@ class TypeHolderExample(object):
return self._bool_item
@bool_item.setter
def bool_item(
self,
bool_item):
def bool_item(self, bool_item): # noqa: E501
"""Sets the bool_item of this TypeHolderExample.
@@ -189,10 +207,11 @@ class TypeHolderExample(object):
:type: bool
"""
if bool_item is None:
raise ValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
raise ApiValueError("Invalid value for `bool_item`, must not be `None`") # noqa: E501
self._bool_item = (
bool_item)
bool_item
)
@property
def array_item(self):
@@ -205,9 +224,7 @@ class TypeHolderExample(object):
return self._array_item
@array_item.setter
def array_item(
self,
array_item):
def array_item(self, array_item): # noqa: E501
"""Sets the array_item of this TypeHolderExample.
@@ -215,10 +232,11 @@ class TypeHolderExample(object):
:type: list[int]
"""
if array_item is None:
raise ValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
raise ApiValueError("Invalid value for `array_item`, must not be `None`") # noqa: E501
self._array_item = (
array_item)
array_item
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,35 +10,45 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class User(object):
class User(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'id': 'int',
'username': 'str',
'first_name': 'str',
'last_name': 'str',
'email': 'str',
'password': 'str',
'phone': 'str',
'user_status': 'int',
allowed_values = {
}
attribute_map = {
@@ -49,24 +59,25 @@ class User(object):
'email': 'email', # noqa: E501
'password': 'password', # noqa: E501
'phone': 'phone', # noqa: E501
'user_status': 'userStatus', # noqa: E501
'user_status': 'userStatus' # noqa: E501
}
openapi_types = {
'id': 'int',
'username': 'str',
'first_name': 'str',
'last_name': 'str',
'email': 'str',
'password': 'str',
'phone': 'str',
'user_status': 'int'
}
validations = {
}
def __init__(self, id=None, username=None, first_name=None, last_name=None, email=None, password=None, phone=None, user_status=None): # noqa: E501
"""User - a model defined in OpenAPI
Keyword Args:
id (int): [optional] # noqa: E501
username (str): [optional] # noqa: E501
first_name (str): [optional] # noqa: E501
last_name (str): [optional] # noqa: E501
email (str): [optional] # noqa: E501
password (str): [optional] # noqa: E501
phone (str): [optional] # noqa: E501
user_status (int): User Status. [optional] # noqa: E501
"""
"""User - a model defined in OpenAPI""" # noqa: E501
self._id = None
self._username = None
@@ -79,21 +90,37 @@ class User(object):
self.discriminator = None
if id is not None:
self.id = id # noqa: E501
self.id = (
id
)
if username is not None:
self.username = username # noqa: E501
self.username = (
username
)
if first_name is not None:
self.first_name = first_name # noqa: E501
self.first_name = (
first_name
)
if last_name is not None:
self.last_name = last_name # noqa: E501
self.last_name = (
last_name
)
if email is not None:
self.email = email # noqa: E501
self.email = (
email
)
if password is not None:
self.password = password # noqa: E501
self.password = (
password
)
if phone is not None:
self.phone = phone # noqa: E501
self.phone = (
phone
)
if user_status is not None:
self.user_status = user_status # noqa: E501
self.user_status = (
user_status
)
@property
def id(self):
@@ -106,9 +133,7 @@ class User(object):
return self._id
@id.setter
def id(
self,
id):
def id(self, id): # noqa: E501
"""Sets the id of this User.
@@ -117,7 +142,8 @@ class User(object):
"""
self._id = (
id)
id
)
@property
def username(self):
@@ -130,9 +156,7 @@ class User(object):
return self._username
@username.setter
def username(
self,
username):
def username(self, username): # noqa: E501
"""Sets the username of this User.
@@ -141,7 +165,8 @@ class User(object):
"""
self._username = (
username)
username
)
@property
def first_name(self):
@@ -154,9 +179,7 @@ class User(object):
return self._first_name
@first_name.setter
def first_name(
self,
first_name):
def first_name(self, first_name): # noqa: E501
"""Sets the first_name of this User.
@@ -165,7 +188,8 @@ class User(object):
"""
self._first_name = (
first_name)
first_name
)
@property
def last_name(self):
@@ -178,9 +202,7 @@ class User(object):
return self._last_name
@last_name.setter
def last_name(
self,
last_name):
def last_name(self, last_name): # noqa: E501
"""Sets the last_name of this User.
@@ -189,7 +211,8 @@ class User(object):
"""
self._last_name = (
last_name)
last_name
)
@property
def email(self):
@@ -202,9 +225,7 @@ class User(object):
return self._email
@email.setter
def email(
self,
email):
def email(self, email): # noqa: E501
"""Sets the email of this User.
@@ -213,7 +234,8 @@ class User(object):
"""
self._email = (
email)
email
)
@property
def password(self):
@@ -226,9 +248,7 @@ class User(object):
return self._password
@password.setter
def password(
self,
password):
def password(self, password): # noqa: E501
"""Sets the password of this User.
@@ -237,7 +257,8 @@ class User(object):
"""
self._password = (
password)
password
)
@property
def phone(self):
@@ -250,9 +271,7 @@ class User(object):
return self._phone
@phone.setter
def phone(
self,
phone):
def phone(self, phone): # noqa: E501
"""Sets the phone of this User.
@@ -261,7 +280,8 @@ class User(object):
"""
self._phone = (
phone)
phone
)
@property
def user_status(self):
@@ -275,9 +295,7 @@ class User(object):
return self._user_status
@user_status.setter
def user_status(
self,
user_status):
def user_status(self, user_status): # noqa: E501
"""Sets the user_status of this User.
User Status # noqa: E501
@@ -287,7 +305,8 @@ class User(object):
"""
self._user_status = (
user_status)
user_status
)
def to_dict(self):
"""Returns the model properties as a dict"""

View File

@@ -10,56 +10,45 @@
"""
import pprint
import pprint # noqa: F401
import re # noqa: F401
import six
import six # noqa: F401
from petstore_api.exceptions import ApiValueError # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
ModelNormal,
ModelSimple,
check_allowed_values,
check_validations
)
class XmlItem(object):
class XmlItem(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
openapi_types (dict): The key is attribute name
and the value is attribute type.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
"""
"""
Attributes:
openapi_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.
"""
openapi_types = {
'attribute_string': 'str',
'attribute_number': 'float',
'attribute_integer': 'int',
'attribute_boolean': 'bool',
'wrapped_array': 'list[int]',
'name_string': 'str',
'name_number': 'float',
'name_integer': 'int',
'name_boolean': 'bool',
'name_array': 'list[int]',
'name_wrapped_array': 'list[int]',
'prefix_string': 'str',
'prefix_number': 'float',
'prefix_integer': 'int',
'prefix_boolean': 'bool',
'prefix_array': 'list[int]',
'prefix_wrapped_array': 'list[int]',
'namespace_string': 'str',
'namespace_number': 'float',
'namespace_integer': 'int',
'namespace_boolean': 'bool',
'namespace_array': 'list[int]',
'namespace_wrapped_array': 'list[int]',
'prefix_ns_string': 'str',
'prefix_ns_number': 'float',
'prefix_ns_integer': 'int',
'prefix_ns_boolean': 'bool',
'prefix_ns_array': 'list[int]',
'prefix_ns_wrapped_array': 'list[int]',
allowed_values = {
}
attribute_map = {
@@ -91,45 +80,46 @@ class XmlItem(object):
'prefix_ns_integer': 'prefix_ns_integer', # noqa: E501
'prefix_ns_boolean': 'prefix_ns_boolean', # noqa: E501
'prefix_ns_array': 'prefix_ns_array', # noqa: E501
'prefix_ns_wrapped_array': 'prefix_ns_wrapped_array', # noqa: E501
'prefix_ns_wrapped_array': 'prefix_ns_wrapped_array' # noqa: E501
}
openapi_types = {
'attribute_string': 'str',
'attribute_number': 'float',
'attribute_integer': 'int',
'attribute_boolean': 'bool',
'wrapped_array': 'list[int]',
'name_string': 'str',
'name_number': 'float',
'name_integer': 'int',
'name_boolean': 'bool',
'name_array': 'list[int]',
'name_wrapped_array': 'list[int]',
'prefix_string': 'str',
'prefix_number': 'float',
'prefix_integer': 'int',
'prefix_boolean': 'bool',
'prefix_array': 'list[int]',
'prefix_wrapped_array': 'list[int]',
'namespace_string': 'str',
'namespace_number': 'float',
'namespace_integer': 'int',
'namespace_boolean': 'bool',
'namespace_array': 'list[int]',
'namespace_wrapped_array': 'list[int]',
'prefix_ns_string': 'str',
'prefix_ns_number': 'float',
'prefix_ns_integer': 'int',
'prefix_ns_boolean': 'bool',
'prefix_ns_array': 'list[int]',
'prefix_ns_wrapped_array': 'list[int]'
}
validations = {
}
def __init__(self, attribute_string=None, attribute_number=None, attribute_integer=None, attribute_boolean=None, wrapped_array=None, name_string=None, name_number=None, name_integer=None, name_boolean=None, name_array=None, name_wrapped_array=None, prefix_string=None, prefix_number=None, prefix_integer=None, prefix_boolean=None, prefix_array=None, prefix_wrapped_array=None, namespace_string=None, namespace_number=None, namespace_integer=None, namespace_boolean=None, namespace_array=None, namespace_wrapped_array=None, prefix_ns_string=None, prefix_ns_number=None, prefix_ns_integer=None, prefix_ns_boolean=None, prefix_ns_array=None, prefix_ns_wrapped_array=None): # noqa: E501
"""XmlItem - a model defined in OpenAPI
Keyword Args:
attribute_string (str): [optional] # noqa: E501
attribute_number (float): [optional] # noqa: E501
attribute_integer (int): [optional] # noqa: E501
attribute_boolean (bool): [optional] # noqa: E501
wrapped_array (list[int]): [optional] # noqa: E501
name_string (str): [optional] # noqa: E501
name_number (float): [optional] # noqa: E501
name_integer (int): [optional] # noqa: E501
name_boolean (bool): [optional] # noqa: E501
name_array (list[int]): [optional] # noqa: E501
name_wrapped_array (list[int]): [optional] # noqa: E501
prefix_string (str): [optional] # noqa: E501
prefix_number (float): [optional] # noqa: E501
prefix_integer (int): [optional] # noqa: E501
prefix_boolean (bool): [optional] # noqa: E501
prefix_array (list[int]): [optional] # noqa: E501
prefix_wrapped_array (list[int]): [optional] # noqa: E501
namespace_string (str): [optional] # noqa: E501
namespace_number (float): [optional] # noqa: E501
namespace_integer (int): [optional] # noqa: E501
namespace_boolean (bool): [optional] # noqa: E501
namespace_array (list[int]): [optional] # noqa: E501
namespace_wrapped_array (list[int]): [optional] # noqa: E501
prefix_ns_string (str): [optional] # noqa: E501
prefix_ns_number (float): [optional] # noqa: E501
prefix_ns_integer (int): [optional] # noqa: E501
prefix_ns_boolean (bool): [optional] # noqa: E501
prefix_ns_array (list[int]): [optional] # noqa: E501
prefix_ns_wrapped_array (list[int]): [optional] # noqa: E501
"""
"""XmlItem - a model defined in OpenAPI""" # noqa: E501
self._attribute_string = None
self._attribute_number = None
@@ -163,63 +153,121 @@ class XmlItem(object):
self.discriminator = None
if attribute_string is not None:
self.attribute_string = attribute_string # noqa: E501
self.attribute_string = (
attribute_string
)
if attribute_number is not None:
self.attribute_number = attribute_number # noqa: E501
self.attribute_number = (
attribute_number
)
if attribute_integer is not None:
self.attribute_integer = attribute_integer # noqa: E501
self.attribute_integer = (
attribute_integer
)
if attribute_boolean is not None:
self.attribute_boolean = attribute_boolean # noqa: E501
self.attribute_boolean = (
attribute_boolean
)
if wrapped_array is not None:
self.wrapped_array = wrapped_array # noqa: E501
self.wrapped_array = (
wrapped_array
)
if name_string is not None:
self.name_string = name_string # noqa: E501
self.name_string = (
name_string
)
if name_number is not None:
self.name_number = name_number # noqa: E501
self.name_number = (
name_number
)
if name_integer is not None:
self.name_integer = name_integer # noqa: E501
self.name_integer = (
name_integer
)
if name_boolean is not None:
self.name_boolean = name_boolean # noqa: E501
self.name_boolean = (
name_boolean
)
if name_array is not None:
self.name_array = name_array # noqa: E501
self.name_array = (
name_array
)
if name_wrapped_array is not None:
self.name_wrapped_array = name_wrapped_array # noqa: E501
self.name_wrapped_array = (
name_wrapped_array
)
if prefix_string is not None:
self.prefix_string = prefix_string # noqa: E501
self.prefix_string = (
prefix_string
)
if prefix_number is not None:
self.prefix_number = prefix_number # noqa: E501
self.prefix_number = (
prefix_number
)
if prefix_integer is not None:
self.prefix_integer = prefix_integer # noqa: E501
self.prefix_integer = (
prefix_integer
)
if prefix_boolean is not None:
self.prefix_boolean = prefix_boolean # noqa: E501
self.prefix_boolean = (
prefix_boolean
)
if prefix_array is not None:
self.prefix_array = prefix_array # noqa: E501
self.prefix_array = (
prefix_array
)
if prefix_wrapped_array is not None:
self.prefix_wrapped_array = prefix_wrapped_array # noqa: E501
self.prefix_wrapped_array = (
prefix_wrapped_array
)
if namespace_string is not None:
self.namespace_string = namespace_string # noqa: E501
self.namespace_string = (
namespace_string
)
if namespace_number is not None:
self.namespace_number = namespace_number # noqa: E501
self.namespace_number = (
namespace_number
)
if namespace_integer is not None:
self.namespace_integer = namespace_integer # noqa: E501
self.namespace_integer = (
namespace_integer
)
if namespace_boolean is not None:
self.namespace_boolean = namespace_boolean # noqa: E501
self.namespace_boolean = (
namespace_boolean
)
if namespace_array is not None:
self.namespace_array = namespace_array # noqa: E501
self.namespace_array = (
namespace_array
)
if namespace_wrapped_array is not None:
self.namespace_wrapped_array = namespace_wrapped_array # noqa: E501
self.namespace_wrapped_array = (
namespace_wrapped_array
)
if prefix_ns_string is not None:
self.prefix_ns_string = prefix_ns_string # noqa: E501
self.prefix_ns_string = (
prefix_ns_string
)
if prefix_ns_number is not None:
self.prefix_ns_number = prefix_ns_number # noqa: E501
self.prefix_ns_number = (
prefix_ns_number
)
if prefix_ns_integer is not None:
self.prefix_ns_integer = prefix_ns_integer # noqa: E501
self.prefix_ns_integer = (
prefix_ns_integer
)
if prefix_ns_boolean is not None:
self.prefix_ns_boolean = prefix_ns_boolean # noqa: E501
self.prefix_ns_boolean = (
prefix_ns_boolean
)
if prefix_ns_array is not None:
self.prefix_ns_array = prefix_ns_array # noqa: E501
self.prefix_ns_array = (
prefix_ns_array
)
if prefix_ns_wrapped_array is not None:
self.prefix_ns_wrapped_array = prefix_ns_wrapped_array # noqa: E501
self.prefix_ns_wrapped_array = (
prefix_ns_wrapped_array
)
@property
def attribute_string(self):
@@ -232,9 +280,7 @@ class XmlItem(object):
return self._attribute_string
@attribute_string.setter
def attribute_string(
self,
attribute_string):
def attribute_string(self, attribute_string): # noqa: E501
"""Sets the attribute_string of this XmlItem.
@@ -243,7 +289,8 @@ class XmlItem(object):
"""
self._attribute_string = (
attribute_string)
attribute_string
)
@property
def attribute_number(self):
@@ -256,9 +303,7 @@ class XmlItem(object):
return self._attribute_number
@attribute_number.setter
def attribute_number(
self,
attribute_number):
def attribute_number(self, attribute_number): # noqa: E501
"""Sets the attribute_number of this XmlItem.
@@ -267,7 +312,8 @@ class XmlItem(object):
"""
self._attribute_number = (
attribute_number)
attribute_number
)
@property
def attribute_integer(self):
@@ -280,9 +326,7 @@ class XmlItem(object):
return self._attribute_integer
@attribute_integer.setter
def attribute_integer(
self,
attribute_integer):
def attribute_integer(self, attribute_integer): # noqa: E501
"""Sets the attribute_integer of this XmlItem.
@@ -291,7 +335,8 @@ class XmlItem(object):
"""
self._attribute_integer = (
attribute_integer)
attribute_integer
)
@property
def attribute_boolean(self):
@@ -304,9 +349,7 @@ class XmlItem(object):
return self._attribute_boolean
@attribute_boolean.setter
def attribute_boolean(
self,
attribute_boolean):
def attribute_boolean(self, attribute_boolean): # noqa: E501
"""Sets the attribute_boolean of this XmlItem.
@@ -315,7 +358,8 @@ class XmlItem(object):
"""
self._attribute_boolean = (
attribute_boolean)
attribute_boolean
)
@property
def wrapped_array(self):
@@ -328,9 +372,7 @@ class XmlItem(object):
return self._wrapped_array
@wrapped_array.setter
def wrapped_array(
self,
wrapped_array):
def wrapped_array(self, wrapped_array): # noqa: E501
"""Sets the wrapped_array of this XmlItem.
@@ -339,7 +381,8 @@ class XmlItem(object):
"""
self._wrapped_array = (
wrapped_array)
wrapped_array
)
@property
def name_string(self):
@@ -352,9 +395,7 @@ class XmlItem(object):
return self._name_string
@name_string.setter
def name_string(
self,
name_string):
def name_string(self, name_string): # noqa: E501
"""Sets the name_string of this XmlItem.
@@ -363,7 +404,8 @@ class XmlItem(object):
"""
self._name_string = (
name_string)
name_string
)
@property
def name_number(self):
@@ -376,9 +418,7 @@ class XmlItem(object):
return self._name_number
@name_number.setter
def name_number(
self,
name_number):
def name_number(self, name_number): # noqa: E501
"""Sets the name_number of this XmlItem.
@@ -387,7 +427,8 @@ class XmlItem(object):
"""
self._name_number = (
name_number)
name_number
)
@property
def name_integer(self):
@@ -400,9 +441,7 @@ class XmlItem(object):
return self._name_integer
@name_integer.setter
def name_integer(
self,
name_integer):
def name_integer(self, name_integer): # noqa: E501
"""Sets the name_integer of this XmlItem.
@@ -411,7 +450,8 @@ class XmlItem(object):
"""
self._name_integer = (
name_integer)
name_integer
)
@property
def name_boolean(self):
@@ -424,9 +464,7 @@ class XmlItem(object):
return self._name_boolean
@name_boolean.setter
def name_boolean(
self,
name_boolean):
def name_boolean(self, name_boolean): # noqa: E501
"""Sets the name_boolean of this XmlItem.
@@ -435,7 +473,8 @@ class XmlItem(object):
"""
self._name_boolean = (
name_boolean)
name_boolean
)
@property
def name_array(self):
@@ -448,9 +487,7 @@ class XmlItem(object):
return self._name_array
@name_array.setter
def name_array(
self,
name_array):
def name_array(self, name_array): # noqa: E501
"""Sets the name_array of this XmlItem.
@@ -459,7 +496,8 @@ class XmlItem(object):
"""
self._name_array = (
name_array)
name_array
)
@property
def name_wrapped_array(self):
@@ -472,9 +510,7 @@ class XmlItem(object):
return self._name_wrapped_array
@name_wrapped_array.setter
def name_wrapped_array(
self,
name_wrapped_array):
def name_wrapped_array(self, name_wrapped_array): # noqa: E501
"""Sets the name_wrapped_array of this XmlItem.
@@ -483,7 +519,8 @@ class XmlItem(object):
"""
self._name_wrapped_array = (
name_wrapped_array)
name_wrapped_array
)
@property
def prefix_string(self):
@@ -496,9 +533,7 @@ class XmlItem(object):
return self._prefix_string
@prefix_string.setter
def prefix_string(
self,
prefix_string):
def prefix_string(self, prefix_string): # noqa: E501
"""Sets the prefix_string of this XmlItem.
@@ -507,7 +542,8 @@ class XmlItem(object):
"""
self._prefix_string = (
prefix_string)
prefix_string
)
@property
def prefix_number(self):
@@ -520,9 +556,7 @@ class XmlItem(object):
return self._prefix_number
@prefix_number.setter
def prefix_number(
self,
prefix_number):
def prefix_number(self, prefix_number): # noqa: E501
"""Sets the prefix_number of this XmlItem.
@@ -531,7 +565,8 @@ class XmlItem(object):
"""
self._prefix_number = (
prefix_number)
prefix_number
)
@property
def prefix_integer(self):
@@ -544,9 +579,7 @@ class XmlItem(object):
return self._prefix_integer
@prefix_integer.setter
def prefix_integer(
self,
prefix_integer):
def prefix_integer(self, prefix_integer): # noqa: E501
"""Sets the prefix_integer of this XmlItem.
@@ -555,7 +588,8 @@ class XmlItem(object):
"""
self._prefix_integer = (
prefix_integer)
prefix_integer
)
@property
def prefix_boolean(self):
@@ -568,9 +602,7 @@ class XmlItem(object):
return self._prefix_boolean
@prefix_boolean.setter
def prefix_boolean(
self,
prefix_boolean):
def prefix_boolean(self, prefix_boolean): # noqa: E501
"""Sets the prefix_boolean of this XmlItem.
@@ -579,7 +611,8 @@ class XmlItem(object):
"""
self._prefix_boolean = (
prefix_boolean)
prefix_boolean
)
@property
def prefix_array(self):
@@ -592,9 +625,7 @@ class XmlItem(object):
return self._prefix_array
@prefix_array.setter
def prefix_array(
self,
prefix_array):
def prefix_array(self, prefix_array): # noqa: E501
"""Sets the prefix_array of this XmlItem.
@@ -603,7 +634,8 @@ class XmlItem(object):
"""
self._prefix_array = (
prefix_array)
prefix_array
)
@property
def prefix_wrapped_array(self):
@@ -616,9 +648,7 @@ class XmlItem(object):
return self._prefix_wrapped_array
@prefix_wrapped_array.setter
def prefix_wrapped_array(
self,
prefix_wrapped_array):
def prefix_wrapped_array(self, prefix_wrapped_array): # noqa: E501
"""Sets the prefix_wrapped_array of this XmlItem.
@@ -627,7 +657,8 @@ class XmlItem(object):
"""
self._prefix_wrapped_array = (
prefix_wrapped_array)
prefix_wrapped_array
)
@property
def namespace_string(self):
@@ -640,9 +671,7 @@ class XmlItem(object):
return self._namespace_string
@namespace_string.setter
def namespace_string(
self,
namespace_string):
def namespace_string(self, namespace_string): # noqa: E501
"""Sets the namespace_string of this XmlItem.
@@ -651,7 +680,8 @@ class XmlItem(object):
"""
self._namespace_string = (
namespace_string)
namespace_string
)
@property
def namespace_number(self):
@@ -664,9 +694,7 @@ class XmlItem(object):
return self._namespace_number
@namespace_number.setter
def namespace_number(
self,
namespace_number):
def namespace_number(self, namespace_number): # noqa: E501
"""Sets the namespace_number of this XmlItem.
@@ -675,7 +703,8 @@ class XmlItem(object):
"""
self._namespace_number = (
namespace_number)
namespace_number
)
@property
def namespace_integer(self):
@@ -688,9 +717,7 @@ class XmlItem(object):
return self._namespace_integer
@namespace_integer.setter
def namespace_integer(
self,
namespace_integer):
def namespace_integer(self, namespace_integer): # noqa: E501
"""Sets the namespace_integer of this XmlItem.
@@ -699,7 +726,8 @@ class XmlItem(object):
"""
self._namespace_integer = (
namespace_integer)
namespace_integer
)
@property
def namespace_boolean(self):
@@ -712,9 +740,7 @@ class XmlItem(object):
return self._namespace_boolean
@namespace_boolean.setter
def namespace_boolean(
self,
namespace_boolean):
def namespace_boolean(self, namespace_boolean): # noqa: E501
"""Sets the namespace_boolean of this XmlItem.
@@ -723,7 +749,8 @@ class XmlItem(object):
"""
self._namespace_boolean = (
namespace_boolean)
namespace_boolean
)
@property
def namespace_array(self):
@@ -736,9 +763,7 @@ class XmlItem(object):
return self._namespace_array
@namespace_array.setter
def namespace_array(
self,
namespace_array):
def namespace_array(self, namespace_array): # noqa: E501
"""Sets the namespace_array of this XmlItem.
@@ -747,7 +772,8 @@ class XmlItem(object):
"""
self._namespace_array = (
namespace_array)
namespace_array
)
@property
def namespace_wrapped_array(self):
@@ -760,9 +786,7 @@ class XmlItem(object):
return self._namespace_wrapped_array
@namespace_wrapped_array.setter
def namespace_wrapped_array(
self,
namespace_wrapped_array):
def namespace_wrapped_array(self, namespace_wrapped_array): # noqa: E501
"""Sets the namespace_wrapped_array of this XmlItem.
@@ -771,7 +795,8 @@ class XmlItem(object):
"""
self._namespace_wrapped_array = (
namespace_wrapped_array)
namespace_wrapped_array
)
@property
def prefix_ns_string(self):
@@ -784,9 +809,7 @@ class XmlItem(object):
return self._prefix_ns_string
@prefix_ns_string.setter
def prefix_ns_string(
self,
prefix_ns_string):
def prefix_ns_string(self, prefix_ns_string): # noqa: E501
"""Sets the prefix_ns_string of this XmlItem.
@@ -795,7 +818,8 @@ class XmlItem(object):
"""
self._prefix_ns_string = (
prefix_ns_string)
prefix_ns_string
)
@property
def prefix_ns_number(self):
@@ -808,9 +832,7 @@ class XmlItem(object):
return self._prefix_ns_number
@prefix_ns_number.setter
def prefix_ns_number(
self,
prefix_ns_number):
def prefix_ns_number(self, prefix_ns_number): # noqa: E501
"""Sets the prefix_ns_number of this XmlItem.
@@ -819,7 +841,8 @@ class XmlItem(object):
"""
self._prefix_ns_number = (
prefix_ns_number)
prefix_ns_number
)
@property
def prefix_ns_integer(self):
@@ -832,9 +855,7 @@ class XmlItem(object):
return self._prefix_ns_integer
@prefix_ns_integer.setter
def prefix_ns_integer(
self,
prefix_ns_integer):
def prefix_ns_integer(self, prefix_ns_integer): # noqa: E501
"""Sets the prefix_ns_integer of this XmlItem.
@@ -843,7 +864,8 @@ class XmlItem(object):
"""
self._prefix_ns_integer = (
prefix_ns_integer)
prefix_ns_integer
)
@property
def prefix_ns_boolean(self):
@@ -856,9 +878,7 @@ class XmlItem(object):
return self._prefix_ns_boolean
@prefix_ns_boolean.setter
def prefix_ns_boolean(
self,
prefix_ns_boolean):
def prefix_ns_boolean(self, prefix_ns_boolean): # noqa: E501
"""Sets the prefix_ns_boolean of this XmlItem.
@@ -867,7 +887,8 @@ class XmlItem(object):
"""
self._prefix_ns_boolean = (
prefix_ns_boolean)
prefix_ns_boolean
)
@property
def prefix_ns_array(self):
@@ -880,9 +901,7 @@ class XmlItem(object):
return self._prefix_ns_array
@prefix_ns_array.setter
def prefix_ns_array(
self,
prefix_ns_array):
def prefix_ns_array(self, prefix_ns_array): # noqa: E501
"""Sets the prefix_ns_array of this XmlItem.
@@ -891,7 +910,8 @@ class XmlItem(object):
"""
self._prefix_ns_array = (
prefix_ns_array)
prefix_ns_array
)
@property
def prefix_ns_wrapped_array(self):
@@ -904,9 +924,7 @@ class XmlItem(object):
return self._prefix_ns_wrapped_array
@prefix_ns_wrapped_array.setter
def prefix_ns_wrapped_array(
self,
prefix_ns_wrapped_array):
def prefix_ns_wrapped_array(self, prefix_ns_wrapped_array): # noqa: E501
"""Sets the prefix_ns_wrapped_array of this XmlItem.
@@ -915,7 +933,8 @@ class XmlItem(object):
"""
self._prefix_ns_wrapped_array = (
prefix_ns_wrapped_array)
prefix_ns_wrapped_array
)
def to_dict(self):
"""Returns the model properties as a dict"""