Commit f6905282 authored by Spiros Koulouzis's avatar Spiros Koulouzis

Set-Cookie for auth

parent 9eab6201
......@@ -7,12 +7,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
# import apis into sdk package
......@@ -21,7 +20,6 @@ from semaphore_client.api.default_api import DefaultApi
from semaphore_client.api.project_api import ProjectApi
from semaphore_client.api.projects_api import ProjectsApi
from semaphore_client.api.user_api import UserApi
# import ApiClient
from semaphore_client.api_client import ApiClient
from semaphore_client.configuration import Configuration
......@@ -29,6 +27,10 @@ from semaphore_client.configuration import Configuration
from semaphore_client.models.api_token import APIToken
from semaphore_client.models.access_key import AccessKey
from semaphore_client.models.access_key_request import AccessKeyRequest
from semaphore_client.models.body import Body
from semaphore_client.models.body1 import Body1
from semaphore_client.models.body2 import Body2
from semaphore_client.models.body3 import Body3
from semaphore_client.models.environment import Environment
from semaphore_client.models.environment_request import EnvironmentRequest
from semaphore_client.models.event import Event
......@@ -37,10 +39,8 @@ from semaphore_client.models.info_type_update import InfoTypeUpdate
from semaphore_client.models.inventory import Inventory
from semaphore_client.models.inventory_request import InventoryRequest
from semaphore_client.models.login import Login
from semaphore_client.models.password import Password
from semaphore_client.models.pong import Pong
from semaphore_client.models.project import Project
from semaphore_client.models.project1 import Project1
from semaphore_client.models.project_request import ProjectRequest
from semaphore_client.models.repository import Repository
from semaphore_client.models.repository_request import RepositoryRequest
......@@ -49,5 +49,4 @@ from semaphore_client.models.task_output import TaskOutput
from semaphore_client.models.template import Template
from semaphore_client.models.template_request import TemplateRequest
from semaphore_client.models.user import User
from semaphore_client.models.user1 import User1
from semaphore_client.models.user_request import UserRequest
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
......@@ -22,10 +21,10 @@ from semaphore_client.api_client import ApiClient
class AuthenticationApi(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/semaphore-api/semaphore-codegen
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client=None):
......@@ -33,45 +32,45 @@ class AuthenticationApi(object):
api_client = ApiClient()
self.api_client = api_client
def auth_login_post(self, login_body, **kwargs): # noqa: E501
def auth_login_post(self, body, **kwargs): # noqa: E501
"""Performs Login # noqa: E501
Upon success you will be logged in # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.auth_login_post(login_body, async_req=True)
>>> thread = api.auth_login_post(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param Login login_body: (required)
:param Login body: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.auth_login_post_with_http_info(login_body, **kwargs) # noqa: E501
return self.auth_login_post_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.auth_login_post_with_http_info(login_body, **kwargs) # noqa: E501
(data) = self.auth_login_post_with_http_info(body, **kwargs) # noqa: E501
return data
def auth_login_post_with_http_info(self, login_body, **kwargs): # noqa: E501
def auth_login_post_with_http_info(self, body, **kwargs): # noqa: E501
"""Performs Login # noqa: E501
Upon success you will be logged in # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.auth_login_post_with_http_info(login_body, async_req=True)
>>> thread = api.auth_login_post_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param Login login_body: (required)
:param Login body: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['login_body'] # noqa: E501
all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
......@@ -86,10 +85,10 @@ class AuthenticationApi(object):
)
params[key] = val
del params['kwargs']
# verify the required parameter 'login_body' is set
if ('login_body' not in params or
params['login_body'] is None):
raise ValueError("Missing the required parameter `login_body` when calling `auth_login_post`") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling `auth_login_post`") # noqa: E501
collection_formats = {}
......@@ -103,12 +102,8 @@ class AuthenticationApi(object):
local_var_files = {}
body_params = None
if 'login_body' in params:
body_params = params['login_body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/plain; charset=utf-8']) # noqa: E501
if 'body' in params:
body_params = params['body']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
......@@ -194,14 +189,6 @@ class AuthenticationApi(object):
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/plain; charset=utf-8']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['bearer', 'cookie'] # noqa: E501
......@@ -291,14 +278,6 @@ class AuthenticationApi(object):
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/plain; charset=utf-8']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['bearer', 'cookie'] # noqa: E501
......@@ -384,10 +363,6 @@ class AuthenticationApi(object):
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/plain; charset=utf-8']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['bearer', 'cookie'] # noqa: E501
......@@ -473,10 +448,6 @@ class AuthenticationApi(object):
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/plain; charset=utf-8']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['bearer', 'cookie'] # noqa: E501
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
......@@ -22,10 +21,10 @@ from semaphore_client.api_client import ApiClient
class DefaultApi(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/semaphore-api/semaphore-codegen
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client=None):
......@@ -99,10 +98,6 @@ class DefaultApi(object):
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/plain; charset=utf-8']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['bearer', 'cookie'] # noqa: E501
......@@ -188,10 +183,6 @@ class DefaultApi(object):
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/plain; charset=utf-8']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['bearer', 'cookie'] # noqa: E501
......@@ -279,10 +270,6 @@ class DefaultApi(object):
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/plain; charset=utf-8']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['bearer', 'cookie'] # noqa: E501
......@@ -368,10 +355,6 @@ class DefaultApi(object):
header_params['Accept'] = self.api_client.select_header_accept(
['text/plain']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
......@@ -457,10 +440,6 @@ class DefaultApi(object):
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/plain; charset=utf-8']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['bearer', 'cookie'] # noqa: E501
......@@ -542,14 +521,6 @@ class DefaultApi(object):
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/plain; charset=utf-8']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['bearer', 'cookie'] # noqa: E501
......@@ -631,14 +602,6 @@ class DefaultApi(object):
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/plain; charset=utf-8']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['bearer', 'cookie'] # noqa: E501
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
......@@ -22,10 +21,10 @@ from semaphore_client.api_client import ApiClient
class ProjectsApi(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/semaphore-api/semaphore-codegen
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client=None):
......@@ -99,10 +98,6 @@ class ProjectsApi(object):
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/plain; charset=utf-8']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['bearer', 'cookie'] # noqa: E501
......@@ -122,43 +117,43 @@ class ProjectsApi(object):
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def projects_post(self, project, **kwargs): # noqa: E501
def projects_post(self, body, **kwargs): # noqa: E501
"""Create a new project # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.projects_post(project, async_req=True)
>>> thread = api.projects_post(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param ProjectRequest project: (required)
:param ProjectRequest body: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.projects_post_with_http_info(project, **kwargs) # noqa: E501
return self.projects_post_with_http_info(body, **kwargs) # noqa: E501
else:
(data) = self.projects_post_with_http_info(project, **kwargs) # noqa: E501
(data) = self.projects_post_with_http_info(body, **kwargs) # noqa: E501
return data
def projects_post_with_http_info(self, project, **kwargs): # noqa: E501
def projects_post_with_http_info(self, body, **kwargs): # noqa: E501
"""Create a new project # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.projects_post_with_http_info(project, async_req=True)
>>> thread = api.projects_post_with_http_info(body, async_req=True)
>>> result = thread.get()
:param async_req bool
:param ProjectRequest project: (required)
:param ProjectRequest body: (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['project'] # noqa: E501
all_params = ['body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
......@@ -173,10 +168,10 @@ class ProjectsApi(object):
)
params[key] = val
del params['kwargs']
# verify the required parameter 'project' is set
if ('project' not in params or
params['project'] is None):
raise ValueError("Missing the required parameter `project` when calling `projects_post`") # noqa: E501
# verify the required parameter 'body' is set
if ('body' not in params or
params['body'] is None):
raise ValueError("Missing the required parameter `body` when calling `projects_post`") # noqa: E501
collection_formats = {}
......@@ -190,12 +185,8 @@ class ProjectsApi(object):
local_var_files = {}
body_params = None
if 'project' in params:
body_params = params['project']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/plain; charset=utf-8']) # noqa: E501
if 'body' in params:
body_params = params['body']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
......
......@@ -4,11 +4,10 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import datetime
......@@ -36,8 +35,8 @@ class ApiClient(object):
the methods and models for each application are generated from the Swagger
templates.
NOTE: This class is auto generated by the semaphore code generator program.
Ref: https://github.com/semaphore-api/semaphore-codegen
NOTE: This class is auto generated by the swagger code generator program.
Ref: https://github.com/swagger-api/swagger-codegen
Do not edit the class manually.
:param configuration: .Configuration object for this client
......@@ -66,8 +65,7 @@ class ApiClient(object):
configuration = Configuration()
self.configuration = configuration
# Use the pool property to lazily initialize the ThreadPool.
self._pool = None
self.pool = ThreadPool()
self.rest_client = rest.RESTClientObject(configuration)
self.default_headers = {}
if header_name is not None:
......@@ -77,15 +75,8 @@ class ApiClient(object):
self.user_agent = 'Swagger-Codegen/1.0.0/python'
def __del__(self):
if self._pool is not None:
self._pool.close()
self._pool.join()
@property
def pool(self):
if self._pool is None:
self._pool = ThreadPool()
return self._pool
self.pool.close()
self.pool.join()
@property
def user_agent(self):
......@@ -187,7 +178,7 @@ class ApiClient(object):
convert to string in iso8601 format.
If obj is list, sanitize each element in the list.
If obj is dict, return the dict.
If obj is semaphore model, return the properties dict.
If obj is swagger model, return the properties dict.
:param obj: The data to serialize.
:return: The serialized form of data.
......@@ -209,12 +200,12 @@ class ApiClient(object):
obj_dict = obj
else:
# Convert model obj to dict except
# attributes `semaphore_types`, `attribute_map`
# attributes `swagger_types`, `attribute_map`
# and attributes which value is not None.
# Convert attribute name to json key in
# model definition for request.
obj_dict = {obj.attribute_map[attr]: getattr(obj, attr)
for attr, _ in six.iteritems(obj.semaphore_types)
for attr, _ in six.iteritems(obj.swagger_types)
if getattr(obj, attr) is not None}
return {key: self.sanitize_for_serialization(val)
......@@ -367,12 +358,12 @@ class ApiClient(object):
body=body)
elif method == "POST":
return self.rest_client.POST(url,
query_params=query_params,
headers=headers,
post_params=post_params,
_preload_content=_preload_content,
_request_timeout=_request_timeout,
body=body)
query_params=query_params,
headers=headers,
post_params=post_params,
_preload_content=_preload_content,
_request_timeout=_request_timeout,
body=body)
elif method == "PUT":
return self.rest_client.PUT(url,
query_params=query_params,
......@@ -602,7 +593,7 @@ class ApiClient(object):
)
def __hasattr(self, object, name):
return name in object.__class__.__dict__
return name in object.__class__.__dict__
def __deserialize_model(self, data, klass):
"""Deserializes list or dict to model.
......@@ -612,13 +603,12 @@ class ApiClient(object):
:return: model object.
"""
if (not klass.semaphore_types and
not self.__hasattr(klass, 'get_real_child_model')):
if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'):
return data
kwargs = {}
if klass.semaphore_types is not None:
for attr, attr_type in six.iteritems(klass.semaphore_types):
if klass.swagger_types is not None:
for attr, attr_type in six.iteritems(klass.swagger_types):
if (data is not None and
klass.attribute_map[attr] in data and
isinstance(data, (list, dict))):
......@@ -628,16 +618,13 @@ class ApiClient(object):
instance = klass(**kwargs)
if (isinstance(instance, dict) and
klass.semaphore_types is not None and
klass.swagger_types is not None and
isinstance(data, dict)):
for key, value in data.items():
if key not in klass.semaphore_types:
if key not in klass.swagger_types:
instance[key] = value
if self.__hasattr(instance, 'get_real_child_model'):
klass_name = instance.get_real_child_model(data)
if klass_name:
instance = self.__deserialize(data, klass_name)
return instance
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import copy
......@@ -23,22 +22,29 @@ import six
from six.moves import http_client as httplib
class Configuration(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
class TypeWithDefault(type):
def __init__(cls, name, bases, dct):
super(TypeWithDefault, cls).__init__(name, bases, dct)
cls._default = None
def __call__(cls):
if cls._default is None:
cls._default = type.__call__(cls)
return copy.copy(cls._default)
def set_default(cls, default):
cls._default = copy.copy(default)
Ref: https://github.com/semaphore-api/semaphore-codegen
class Configuration(six.with_metaclass(TypeWithDefault, object)):
"""NOTE: This class is auto generated by the swagger code generator program.
Ref: https://github.com/swagger-api/swagger-codegen
Do not edit the class manually.
"""
_default = None
def __init__(self):
"""Constructor"""
if self._default:
for key in self._default.__dict__.keys():
self.__dict__[key] = copy.copy(self._default.__dict__[key])
return
# Default Base url
self.host = "http://localhost:3000/api"
# Temp file folder for downloading files
......@@ -55,7 +61,6 @@ class Configuration(object):
self.username = ""
# Password for HTTP basic authentication
self.password = ""
# Logging Settings
self.logger = {}
self.logger["package_logger"] = logging.getLogger("semaphore_client")
......@@ -96,10 +101,6 @@ class Configuration(object):
# Safe chars for path_param
self.safe_chars_for_path_param = ''
@classmethod
def set_default(cls, default):
cls._default = default
@property
def logger_file(self):
"""The logger file.
......@@ -202,10 +203,9 @@ class Configuration(object):
:param identifier: The identifier of apiKey.
:return: The token for api key authentication.
"""
if self.refresh_api_key_hook:
self.refresh_api_key_hook(self)
key = self.api_key.get(identifier)
if key:
prefix = self.api_key_prefix.get(identifier)
......@@ -243,7 +243,6 @@ class Configuration(object):
'key': 'Cookie',
'value': self.get_api_key_with_prefix('Cookie')
},
}
def to_debug_report(self):
......@@ -254,6 +253,6 @@ class Configuration(object):
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 2.2.0\n"\
"Version of the API: 2.2.0-oas3\n"\
"SDK Package Version: 1.0.0".\
format(env=sys.platform, pyversion=sys.version)
......@@ -6,18 +6,21 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
# import models into model package
from semaphore_client.models.api_token import APIToken
from semaphore_client.models.access_key import AccessKey
from semaphore_client.models.access_key_request import AccessKeyRequest
from semaphore_client.models.body import Body
from semaphore_client.models.body1 import Body1
from semaphore_client.models.body2 import Body2
from semaphore_client.models.body3 import Body3
from semaphore_client.models.environment import Environment
from semaphore_client.models.environment_request import EnvironmentRequest
from semaphore_client.models.event import Event
......@@ -26,10 +29,8 @@ from semaphore_client.models.info_type_update import InfoTypeUpdate
from semaphore_client.models.inventory import Inventory
from semaphore_client.models.inventory_request import InventoryRequest
from semaphore_client.models.login import Login
from semaphore_client.models.password import Password
from semaphore_client.models.pong import Pong
from semaphore_client.models.project import Project
from semaphore_client.models.project1 import Project1
from semaphore_client.models.project_request import ProjectRequest
from semaphore_client.models.repository import Repository
from semaphore_client.models.repository_request import RepositoryRequest
......@@ -38,5 +39,4 @@ from semaphore_client.models.task_output import TaskOutput
from semaphore_client.models.template import Template
from semaphore_client.models.template_request import TemplateRequest
from semaphore_client.models.user import User
from semaphore_client.models.user1 import User1
from semaphore_client.models.user_request import UserRequest
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class AccessKey(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'id': 'int',
'name': 'str',
'type': 'str',
......@@ -50,7 +48,6 @@ class AccessKey(object):
def __init__(self, id=None, name=None, type=None, project_id=None, key=None, secret=None): # noqa: E501
"""AccessKey - a model defined in Swagger""" # noqa: E501
self._id = None
self._name = None
self._type = None
......@@ -58,7 +55,6 @@ class AccessKey(object):
self._key = None
self._secret = None
self.discriminator = None
if id is not None:
self.id = id
if name is not None:
......@@ -208,7 +204,7 @@ class AccessKey(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class AccessKeyRequest(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'name': 'str',
'type': 'str',
'project_id': 'int',
......@@ -48,14 +46,12 @@ class AccessKeyRequest(object):
def __init__(self, name=None, type=None, project_id=None, key=None, secret=None): # noqa: E501
"""AccessKeyRequest - a model defined in Swagger""" # noqa: E501
self._name = None
self._type = None
self._project_id = None
self._key = None
self._secret = None
self.discriminator = None
if name is not None:
self.name = name
if type is not None:
......@@ -133,8 +129,6 @@ class AccessKeyRequest(object):
:param project_id: The project_id of this AccessKeyRequest. # noqa: E501
:type: int
"""
if project_id is not None and project_id < 1: # noqa: E501
raise ValueError("Invalid value for `project_id`, must be a value greater than or equal to `1`") # noqa: E501
self._project_id = project_id
......@@ -184,7 +178,7 @@ class AccessKeyRequest(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class APIToken(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'id': 'str',
'created': 'str',
'expired': 'bool',
......@@ -46,13 +44,11 @@ class APIToken(object):
def __init__(self, id=None, created=None, expired=None, user_id=None): # noqa: E501
"""APIToken - a model defined in Swagger""" # noqa: E501
self._id = None
self._created = None
self._expired = None
self._user_id = None
self.discriminator = None
if id is not None:
self.id = id
if created is not None:
......@@ -101,8 +97,6 @@ class APIToken(object):
:param created: The created of this APIToken. # noqa: E501
:type: str
"""
# if created is not None and not re.search(r'^\\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}T\\d{2}:\\d{2}:\\d{2}Z$', created): # noqa: E501
# raise ValueError(r"Invalid value for `created`, must be a follow pattern or equal to `/^\\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}T\\d{2}:\\d{2}:\\d{2}Z$/`") # noqa: E501
self._created = created
......@@ -145,8 +139,6 @@ class APIToken(object):
:param user_id: The user_id of this APIToken. # noqa: E501
:type: int
"""
if user_id is not None and user_id < 1: # noqa: E501
raise ValueError("Invalid value for `user_id`, must be a value greater than or equal to `1`") # noqa: E501
self._user_id = user_id
......@@ -154,7 +146,7 @@ class APIToken(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
# coding: utf-8
"""
SEMAPHORE
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class Body(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'password': 'str'
}
attribute_map = {
'password': 'password'
}
def __init__(self, password=None): # noqa: E501
"""Body - a model defined in Swagger""" # noqa: E501
self._password = None
self.discriminator = None
if password is not None:
self.password = password
@property
def password(self):
"""Gets the password of this Body. # noqa: E501
:return: The password of this Body. # noqa: E501
:rtype: str
"""
return self._password
@password.setter
def password(self, password):
"""Sets the password of this Body.
:param password: The password of this Body. # noqa: E501
:type: str
"""
self._password = password
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(Body, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, Body):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
# coding: utf-8
"""
SEMAPHORE
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class Body1(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'name': 'str'
}
attribute_map = {
'name': 'name'
}
def __init__(self, name=None): # noqa: E501
"""Body1 - a model defined in Swagger""" # noqa: E501
self._name = None
self.discriminator = None
if name is not None:
self.name = name
@property
def name(self):
"""Gets the name of this Body1. # noqa: E501
:return: The name of this Body1. # noqa: E501
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this Body1.
:param name: The name of this Body1. # noqa: E501
:type: str
"""
self._name = name
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(Body1, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, Body1):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
# coding: utf-8
"""
SEMAPHORE
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class Body2(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'user_id': 'int',
'admin': 'bool'
}
attribute_map = {
'user_id': 'user_id',
'admin': 'admin'
}
def __init__(self, user_id=None, admin=None): # noqa: E501
"""Body2 - a model defined in Swagger""" # noqa: E501
self._user_id = None
self._admin = None
self.discriminator = None
if user_id is not None:
self.user_id = user_id
if admin is not None:
self.admin = admin
@property
def user_id(self):
"""Gets the user_id of this Body2. # noqa: E501
:return: The user_id of this Body2. # noqa: E501
:rtype: int
"""
return self._user_id
@user_id.setter
def user_id(self, user_id):
"""Sets the user_id of this Body2.
:param user_id: The user_id of this Body2. # noqa: E501
:type: int
"""
self._user_id = user_id
@property
def admin(self):
"""Gets the admin of this Body2. # noqa: E501
:return: The admin of this Body2. # noqa: E501
:rtype: bool
"""
return self._admin
@admin.setter
def admin(self, admin):
"""Sets the admin of this Body2.
:param admin: The admin of this Body2. # noqa: E501
:type: bool
"""
self._admin = admin
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(Body2, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, Body2):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
# coding: utf-8
"""
SEMAPHORE
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class Body3(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'template_id': 'int',
'debug': 'bool',
'dry_run': 'bool',
'playbook': 'str',
'environment': 'str'
}
attribute_map = {
'template_id': 'template_id',
'debug': 'debug',
'dry_run': 'dry_run',
'playbook': 'playbook',
'environment': 'environment'
}
def __init__(self, template_id=None, debug=None, dry_run=None, playbook=None, environment=None): # noqa: E501
"""Body3 - a model defined in Swagger""" # noqa: E501
self._template_id = None
self._debug = None
self._dry_run = None
self._playbook = None
self._environment = None
self.discriminator = None
if template_id is not None:
self.template_id = template_id
if debug is not None:
self.debug = debug
if dry_run is not None:
self.dry_run = dry_run
if playbook is not None:
self.playbook = playbook
if environment is not None:
self.environment = environment
@property
def template_id(self):
"""Gets the template_id of this Body3. # noqa: E501
:return: The template_id of this Body3. # noqa: E501
:rtype: int
"""
return self._template_id
@template_id.setter
def template_id(self, template_id):
"""Sets the template_id of this Body3.
:param template_id: The template_id of this Body3. # noqa: E501
:type: int
"""
self._template_id = template_id
@property
def debug(self):
"""Gets the debug of this Body3. # noqa: E501
:return: The debug of this Body3. # noqa: E501
:rtype: bool
"""
return self._debug
@debug.setter
def debug(self, debug):
"""Sets the debug of this Body3.
:param debug: The debug of this Body3. # noqa: E501
:type: bool
"""
self._debug = debug
@property
def dry_run(self):
"""Gets the dry_run of this Body3. # noqa: E501
:return: The dry_run of this Body3. # noqa: E501
:rtype: bool
"""
return self._dry_run
@dry_run.setter
def dry_run(self, dry_run):
"""Sets the dry_run of this Body3.
:param dry_run: The dry_run of this Body3. # noqa: E501
:type: bool
"""
self._dry_run = dry_run
@property
def playbook(self):
"""Gets the playbook of this Body3. # noqa: E501
:return: The playbook of this Body3. # noqa: E501
:rtype: str
"""
return self._playbook
@playbook.setter
def playbook(self, playbook):
"""Sets the playbook of this Body3.
:param playbook: The playbook of this Body3. # noqa: E501
:type: str
"""
self._playbook = playbook
@property
def environment(self):
"""Gets the environment of this Body3. # noqa: E501
:return: The environment of this Body3. # noqa: E501
:rtype: str
"""
return self._environment
@environment.setter
def environment(self, environment):
"""Sets the environment of this Body3.
:param environment: The environment of this Body3. # noqa: E501
:type: str
"""
self._environment = environment
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(Body3, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, Body3):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class Environment(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'id': 'int',
'name': 'str',
'project_id': 'int',
......@@ -48,14 +46,12 @@ class Environment(object):
def __init__(self, id=None, name=None, project_id=None, password=None, json=None): # noqa: E501
"""Environment - a model defined in Swagger""" # noqa: E501
self._id = None
self._name = None
self._project_id = None
self._password = None
self._json = None
self.discriminator = None
if id is not None:
self.id = id
if name is not None:
......@@ -85,8 +81,6 @@ class Environment(object):
:param id: The id of this Environment. # noqa: E501
:type: int
"""
if id is not None and id < 1: # noqa: E501
raise ValueError("Invalid value for `id`, must be a value greater than or equal to `1`") # noqa: E501
self._id = id
......@@ -129,8 +123,6 @@ class Environment(object):
:param project_id: The project_id of this Environment. # noqa: E501
:type: int
"""
if project_id is not None and project_id < 1: # noqa: E501
raise ValueError("Invalid value for `project_id`, must be a value greater than or equal to `1`") # noqa: E501
self._project_id = project_id
......@@ -180,7 +172,7 @@ class Environment(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class EnvironmentRequest(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'name': 'str',
'project_id': 'int',
'password': 'str',
......@@ -46,13 +44,11 @@ class EnvironmentRequest(object):
def __init__(self, name=None, project_id=None, password=None, json=None): # noqa: E501
"""EnvironmentRequest - a model defined in Swagger""" # noqa: E501
self._name = None
self._project_id = None
self._password = None
self._json = None
self.discriminator = None
if name is not None:
self.name = name
if project_id is not None:
......@@ -101,8 +97,6 @@ class EnvironmentRequest(object):
:param project_id: The project_id of this EnvironmentRequest. # noqa: E501
:type: int
"""
if project_id is not None and project_id < 1: # noqa: E501
raise ValueError("Invalid value for `project_id`, must be a value greater than or equal to `1`") # noqa: E501
self._project_id = project_id
......@@ -152,7 +146,7 @@ class EnvironmentRequest(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,37 +17,44 @@ import six
class Event(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'project_id': 'int',
'object_id': 'int',
'object_type': 'str',
'description': 'str'
}
attribute_map = {
'project_id': 'project_id',
'object_id': 'object_id',
'object_type': 'object_type',
'description': 'description'
}
def __init__(self, project_id=None, description=None): # noqa: E501
def __init__(self, project_id=None, object_id=None, object_type=None, description=None): # noqa: E501
"""Event - a model defined in Swagger""" # noqa: E501
self._project_id = None
self._object_id = None
self._object_type = None
self._description = None
self.discriminator = None
if project_id is not None:
self.project_id = project_id
if object_id is not None:
self.object_id = object_id
if object_type is not None:
self.object_type = object_type
if description is not None:
self.description = description
......@@ -73,6 +79,48 @@ class Event(object):
self._project_id = project_id
@property
def object_id(self):
"""Gets the object_id of this Event. # noqa: E501
:return: The object_id of this Event. # noqa: E501
:rtype: int
"""
return self._object_id
@object_id.setter
def object_id(self, object_id):
"""Sets the object_id of this Event.
:param object_id: The object_id of this Event. # noqa: E501
:type: int
"""
self._object_id = object_id
@property
def object_type(self):
"""Gets the object_type of this Event. # noqa: E501
:return: The object_type of this Event. # noqa: E501
:rtype: str
"""
return self._object_type
@object_type.setter
def object_type(self, object_type):
"""Sets the object_type of this Event.
:param object_type: The object_type of this Event. # noqa: E501
:type: str
"""
self._object_type = object_type
@property
def description(self):
"""Gets the description of this Event. # noqa: E501
......@@ -98,7 +146,7 @@ class Event(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class InfoType(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'version': 'str',
'update_body': 'str',
'update': 'InfoTypeUpdate'
......@@ -44,12 +42,10 @@ class InfoType(object):
def __init__(self, version=None, update_body=None, update=None): # noqa: E501
"""InfoType - a model defined in Swagger""" # noqa: E501
self._version = None
self._update_body = None
self._update = None
self.discriminator = None
if version is not None:
self.version = version
if update_body is not None:
......@@ -124,7 +120,7 @@ class InfoType(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class InfoTypeUpdate(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'tag_name': 'str'
}
......@@ -40,10 +38,8 @@ class InfoTypeUpdate(object):
def __init__(self, tag_name=None): # noqa: E501
"""InfoTypeUpdate - a model defined in Swagger""" # noqa: E501
self._tag_name = None
self.discriminator = None
if tag_name is not None:
self.tag_name = tag_name
......@@ -72,7 +68,7 @@ class InfoTypeUpdate(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class Inventory(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'id': 'int',
'name': 'str',
'project_id': 'int',
......@@ -52,7 +50,6 @@ class Inventory(object):
def __init__(self, id=None, name=None, project_id=None, inventory=None, key_id=None, ssh_key_id=None, type=None): # noqa: E501
"""Inventory - a model defined in Swagger""" # noqa: E501
self._id = None
self._name = None
self._project_id = None
......@@ -61,7 +58,6 @@ class Inventory(object):
self._ssh_key_id = None
self._type = None
self.discriminator = None
if id is not None:
self.id = id
if name is not None:
......@@ -234,7 +230,7 @@ class Inventory(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class InventoryRequest(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'name': 'str',
'project_id': 'int',
'inventory': 'str',
......@@ -50,7 +48,6 @@ class InventoryRequest(object):
def __init__(self, name=None, project_id=None, inventory=None, key_id=None, ssh_key_id=None, type=None): # noqa: E501
"""InventoryRequest - a model defined in Swagger""" # noqa: E501
self._name = None
self._project_id = None
self._inventory = None
......@@ -58,7 +55,6 @@ class InventoryRequest(object):
self._ssh_key_id = None
self._type = None
self.discriminator = None
if name is not None:
self.name = name
if project_id is not None:
......@@ -111,8 +107,6 @@ class InventoryRequest(object):
:param project_id: The project_id of this InventoryRequest. # noqa: E501
:type: int
"""
if project_id is not None and project_id < 1: # noqa: E501
raise ValueError("Invalid value for `project_id`, must be a value greater than or equal to `1`") # noqa: E501
self._project_id = project_id
......@@ -155,8 +149,6 @@ class InventoryRequest(object):
:param key_id: The key_id of this InventoryRequest. # noqa: E501
:type: int
"""
if key_id is not None and key_id < 1: # noqa: E501
raise ValueError("Invalid value for `key_id`, must be a value greater than or equal to `1`") # noqa: E501
self._key_id = key_id
......@@ -178,8 +170,6 @@ class InventoryRequest(object):
:param ssh_key_id: The ssh_key_id of this InventoryRequest. # noqa: E501
:type: int
"""
if ssh_key_id is not None and ssh_key_id < 1: # noqa: E501
raise ValueError("Invalid value for `ssh_key_id`, must be a value greater than or equal to `1`") # noqa: E501
self._ssh_key_id = ssh_key_id
......@@ -214,7 +204,7 @@ class InventoryRequest(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class Login(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'auth': 'str',
'password': 'str'
}
......@@ -42,11 +40,9 @@ class Login(object):
def __init__(self, auth=None, password=None): # noqa: E501
"""Login - a model defined in Swagger""" # noqa: E501
self._auth = None
self._password = None
self.discriminator = None
if auth is not None:
self.auth = auth
if password is not None:
......@@ -102,7 +98,7 @@ class Login(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class Pong(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
}
attribute_map = {
......@@ -44,7 +42,7 @@ class Pong(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class Project(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'id': 'int',
'name': 'str',
'created': 'str',
......@@ -46,13 +44,11 @@ class Project(object):
def __init__(self, id=None, name=None, created=None, alert=None): # noqa: E501
"""Project - a model defined in Swagger""" # noqa: E501
self._id = None
self._name = None
self._created = None
self._alert = None
self.discriminator = None
if id is not None:
self.id = id
if name is not None:
......@@ -80,8 +76,6 @@ class Project(object):
:param id: The id of this Project. # noqa: E501
:type: int
"""
if id is not None and id < 1: # noqa: E501
raise ValueError("Invalid value for `id`, must be a value greater than or equal to `1`") # noqa: E501
self._id = id
......@@ -124,8 +118,6 @@ class Project(object):
:param created: The created of this Project. # noqa: E501
:type: str
"""
# if created is not None and not re.search(r'^\\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}T\\d{2}:\\d{2}:\\d{2}Z$', created): # noqa: E501
# raise ValueError(r"Invalid value for `created`, must be a follow pattern or equal to `/^\\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}T\\d{2}:\\d{2}:\\d{2}Z$/`") # noqa: E501
self._created = created
......@@ -154,7 +146,7 @@ class Project(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class ProjectRequest(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'name': 'str',
'alert': 'bool'
}
......@@ -42,11 +40,9 @@ class ProjectRequest(object):
def __init__(self, name=None, alert=None): # noqa: E501
"""ProjectRequest - a model defined in Swagger""" # noqa: E501
self._name = None
self._alert = None
self.discriminator = None
if name is not None:
self.name = name
if alert is not None:
......@@ -98,7 +94,7 @@ class ProjectRequest(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class Repository(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'id': 'int',
'name': 'str',
'project_id': 'int',
......@@ -48,14 +46,12 @@ class Repository(object):
def __init__(self, id=None, name=None, project_id=None, git_url=None, ssh_key_id=None): # noqa: E501
"""Repository - a model defined in Swagger""" # noqa: E501
self._id = None
self._name = None
self._project_id = None
self._git_url = None
self._ssh_key_id = None
self.discriminator = None
if id is not None:
self.id = id
if name is not None:
......@@ -176,7 +172,7 @@ class Repository(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class RepositoryRequest(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'name': 'str',
'project_id': 'int',
'git_url': 'str',
......@@ -46,13 +44,11 @@ class RepositoryRequest(object):
def __init__(self, name=None, project_id=None, git_url=None, ssh_key_id=None): # noqa: E501
"""RepositoryRequest - a model defined in Swagger""" # noqa: E501
self._name = None
self._project_id = None
self._git_url = None
self._ssh_key_id = None
self.discriminator = None
if name is not None:
self.name = name
if project_id is not None:
......@@ -150,7 +146,7 @@ class RepositoryRequest(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,55 +17,78 @@ import six
class Task(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'id': 'int',
'template_id': 'int',
'status': 'str',
'debug': 'bool',
'dry_run': 'bool',
'playbook': 'str',
'environment': 'str'
}
attribute_map = {
'id': 'id',
'template_id': 'template_id',
'status': 'status',
'debug': 'debug',
'dry_run': 'dry_run',
'playbook': 'playbook',
'environment': 'environment'
}
def __init__(self, template_id=None, debug=None, dry_run=None, playbook=None, environment=None): # noqa: E501
def __init__(self, id=None, template_id=None, status=None, debug=None, playbook=None, environment=None): # noqa: E501
"""Task - a model defined in Swagger""" # noqa: E501
self._id = None
self._template_id = None
self._status = None
self._debug = None
self._dry_run = None
self._playbook = None
self._environment = None
self.discriminator = None
if id is not None:
self.id = id
if template_id is not None:
self.template_id = template_id
if status is not None:
self.status = status
if debug is not None:
self.debug = debug
if dry_run is not None:
self.dry_run = dry_run
if playbook is not None:
self.playbook = playbook
if environment is not None:
self.environment = environment
@property
def id(self):
"""Gets the id of this Task. # noqa: E501
:return: The id of this Task. # noqa: E501
:rtype: int
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this Task.
:param id: The id of this Task. # noqa: E501
:type: int
"""
self._id = id
@property
def template_id(self):
"""Gets the template_id of this Task. # noqa: E501
......@@ -89,46 +111,46 @@ class Task(object):
self._template_id = template_id
@property
def debug(self):
"""Gets the debug of this Task. # noqa: E501
def status(self):
"""Gets the status of this Task. # noqa: E501
:return: The debug of this Task. # noqa: E501
:rtype: bool
:return: The status of this Task. # noqa: E501
:rtype: str
"""
return self._debug
return self._status
@debug.setter
def debug(self, debug):
"""Sets the debug of this Task.
@status.setter
def status(self, status):
"""Sets the status of this Task.
:param debug: The debug of this Task. # noqa: E501
:type: bool
:param status: The status of this Task. # noqa: E501
:type: str
"""
self._debug = debug
self._status = status
@property
def dry_run(self):
"""Gets the dry_run of this Task. # noqa: E501
def debug(self):
"""Gets the debug of this Task. # noqa: E501
:return: The dry_run of this Task. # noqa: E501
:return: The debug of this Task. # noqa: E501
:rtype: bool
"""
return self._dry_run
return self._debug
@dry_run.setter
def dry_run(self, dry_run):
"""Sets the dry_run of this Task.
@debug.setter
def debug(self, debug):
"""Sets the debug of this Task.
:param dry_run: The dry_run of this Task. # noqa: E501
:param debug: The debug of this Task. # noqa: E501
:type: bool
"""
self._dry_run = dry_run
self._debug = debug
@property
def playbook(self):
......@@ -176,7 +198,7 @@ class Task(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class TaskOutput(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'task_id': 'int',
'task': 'str',
'time': 'datetime',
......@@ -46,13 +44,11 @@ class TaskOutput(object):
def __init__(self, task_id=None, task=None, time=None, output=None): # noqa: E501
"""TaskOutput - a model defined in Swagger""" # noqa: E501
self._task_id = None
self._task = None
self._time = None
self._output = None
self.discriminator = None
if task_id is not None:
self.task_id = task_id
if task is not None:
......@@ -150,7 +146,7 @@ class TaskOutput(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class Template(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'id': 'int',
'ssh_key_id': 'int',
'project_id': 'int',
......@@ -58,7 +56,6 @@ class Template(object):
def __init__(self, id=None, ssh_key_id=None, project_id=None, inventory_id=None, repository_id=None, environment_id=None, alias=None, playbook=None, arguments=None, override_args=None): # noqa: E501
"""Template - a model defined in Swagger""" # noqa: E501
self._id = None
self._ssh_key_id = None
self._project_id = None
......@@ -70,7 +67,6 @@ class Template(object):
self._arguments = None
self._override_args = None
self.discriminator = None
if id is not None:
self.id = id
if ssh_key_id is not None:
......@@ -110,8 +106,6 @@ class Template(object):
:param id: The id of this Template. # noqa: E501
:type: int
"""
if id is not None and id < 1: # noqa: E501
raise ValueError("Invalid value for `id`, must be a value greater than or equal to `1`") # noqa: E501
self._id = id
......@@ -133,8 +127,6 @@ class Template(object):
:param ssh_key_id: The ssh_key_id of this Template. # noqa: E501
:type: int
"""
if ssh_key_id is not None and ssh_key_id < 1: # noqa: E501
raise ValueError("Invalid value for `ssh_key_id`, must be a value greater than or equal to `1`") # noqa: E501
self._ssh_key_id = ssh_key_id
......@@ -156,8 +148,6 @@ class Template(object):
:param project_id: The project_id of this Template. # noqa: E501
:type: int
"""
if project_id is not None and project_id < 1: # noqa: E501
raise ValueError("Invalid value for `project_id`, must be a value greater than or equal to `1`") # noqa: E501
self._project_id = project_id
......@@ -179,8 +169,6 @@ class Template(object):
:param inventory_id: The inventory_id of this Template. # noqa: E501
:type: int
"""
if inventory_id is not None and inventory_id < 1: # noqa: E501
raise ValueError("Invalid value for `inventory_id`, must be a value greater than or equal to `1`") # noqa: E501
self._inventory_id = inventory_id
......@@ -223,8 +211,6 @@ class Template(object):
:param environment_id: The environment_id of this Template. # noqa: E501
:type: int
"""
if environment_id is not None and environment_id < 1: # noqa: E501
raise ValueError("Invalid value for `environment_id`, must be a value greater than or equal to `1`") # noqa: E501
self._environment_id = environment_id
......@@ -316,7 +302,7 @@ class Template(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class TemplateRequest(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'ssh_key_id': 'int',
'project_id': 'int',
'inventory_id': 'int',
......@@ -56,7 +54,6 @@ class TemplateRequest(object):
def __init__(self, ssh_key_id=None, project_id=None, inventory_id=None, repository_id=None, environment_id=None, alias=None, playbook=None, arguments=None, override_args=None): # noqa: E501
"""TemplateRequest - a model defined in Swagger""" # noqa: E501
self._ssh_key_id = None
self._project_id = None
self._inventory_id = None
......@@ -67,7 +64,6 @@ class TemplateRequest(object):
self._arguments = None
self._override_args = None
self.discriminator = None
if ssh_key_id is not None:
self.ssh_key_id = ssh_key_id
if project_id is not None:
......@@ -105,8 +101,6 @@ class TemplateRequest(object):
:param ssh_key_id: The ssh_key_id of this TemplateRequest. # noqa: E501
:type: int
"""
if ssh_key_id is not None and ssh_key_id < 1: # noqa: E501
raise ValueError("Invalid value for `ssh_key_id`, must be a value greater than or equal to `1`") # noqa: E501
self._ssh_key_id = ssh_key_id
......@@ -128,8 +122,6 @@ class TemplateRequest(object):
:param project_id: The project_id of this TemplateRequest. # noqa: E501
:type: int
"""
if project_id is not None and project_id < 1: # noqa: E501
raise ValueError("Invalid value for `project_id`, must be a value greater than or equal to `1`") # noqa: E501
self._project_id = project_id
......@@ -151,8 +143,6 @@ class TemplateRequest(object):
:param inventory_id: The inventory_id of this TemplateRequest. # noqa: E501
:type: int
"""
if inventory_id is not None and inventory_id < 1: # noqa: E501
raise ValueError("Invalid value for `inventory_id`, must be a value greater than or equal to `1`") # noqa: E501
self._inventory_id = inventory_id
......@@ -174,8 +164,6 @@ class TemplateRequest(object):
:param repository_id: The repository_id of this TemplateRequest. # noqa: E501
:type: int
"""
if repository_id is not None and repository_id < 1: # noqa: E501
raise ValueError("Invalid value for `repository_id`, must be a value greater than or equal to `1`") # noqa: E501
self._repository_id = repository_id
......@@ -197,8 +185,6 @@ class TemplateRequest(object):
:param environment_id: The environment_id of this TemplateRequest. # noqa: E501
:type: int
"""
if environment_id is not None and environment_id < 1: # noqa: E501
raise ValueError("Invalid value for `environment_id`, must be a value greater than or equal to `1`") # noqa: E501
self._environment_id = environment_id
......@@ -290,7 +276,7 @@ class TemplateRequest(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class User(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'id': 'int',
'name': 'str',
'username': 'str',
......@@ -52,7 +50,6 @@ class User(object):
def __init__(self, id=None, name=None, username=None, email=None, created=None, alert=None, admin=None): # noqa: E501
"""User - a model defined in Swagger""" # noqa: E501
self._id = None
self._name = None
self._username = None
......@@ -61,7 +58,6 @@ class User(object):
self._alert = None
self._admin = None
self.discriminator = None
if id is not None:
self.id = id
if name is not None:
......@@ -95,8 +91,6 @@ class User(object):
:param id: The id of this User. # noqa: E501
:type: int
"""
if id is not None and id < 1: # noqa: E501
raise ValueError("Invalid value for `id`, must be a value greater than or equal to `1`") # noqa: E501
self._id = id
......@@ -181,8 +175,6 @@ class User(object):
:param created: The created of this User. # noqa: E501
:type: str
"""
# if created is not None and not re.search(r'^\\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}T\\d{2}:\\d{2}:\\d{2}Z$', created): # noqa: E501
# raise ValueError(r"Invalid value for `created`, must be a follow pattern or equal to `/^\\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}T\\d{2}:\\d{2}:\\d{2}Z$/`") # noqa: E501
self._created = created
......@@ -232,7 +224,7 @@ class User(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
......@@ -18,19 +17,18 @@ import six
class UserRequest(object):
"""NOTE: This class is auto generated by the semaphore code generator program.
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
semaphore_types (dict): The key is attribute name
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
semaphore_types = {
swagger_types = {
'name': 'str',
'username': 'str',
'email': 'str',
......@@ -48,14 +46,12 @@ class UserRequest(object):
def __init__(self, name=None, username=None, email=None, alert=None, admin=None): # noqa: E501
"""UserRequest - a model defined in Swagger""" # noqa: E501
self._name = None
self._username = None
self._email = None
self._alert = None
self._admin = None
self.discriminator = None
if name is not None:
self.name = name
if username is not None:
......@@ -176,7 +172,7 @@ class UserRequest(object):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.semaphore_types):
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
......
......@@ -5,12 +5,11 @@
Semaphore API # noqa: E501
OpenAPI spec version: 2.2.0
OpenAPI spec version: 2.2.0-oas3
Generated by: https://github.com/semaphore-api/semaphore-codegen.git
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import io
......@@ -36,14 +35,11 @@ logger = logging.getLogger(__name__)
class RESTResponse(io.IOBase):
def __init__(self, resp):
# if resp.headers and 'Set-Cookie' in resp.headers:
# self.auth_cookie = resp.headers['Set-Cookie']
self.urllib3_response = resp
self.status = resp.status
self.reason = resp.reason
self.data = resp.data
def getheaders(self):
"""Returns a dictionary of the response headers."""
return self.urllib3_response.getheaders()
......@@ -162,15 +158,14 @@ class RESTClientObject(object):
request_body = None
if body is not None:
request_body = json.dumps(body)
response = self.pool_manager.request(
r = self.pool_manager.request(
method, url,
body=request_body,
preload_content=_preload_content,
timeout=timeout,
headers=headers)
elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501
response = self.pool_manager.request(
r = self.pool_manager.request(
method, url,
fields=post_params,
encode_multipart=False,
......@@ -182,7 +177,7 @@ class RESTClientObject(object):
# Content-Type which generated by urllib3 will be
# overwritten.
del headers['Content-Type']
response = self.pool_manager.request(
r = self.pool_manager.request(
method, url,
fields=post_params,
encode_multipart=True,
......@@ -194,7 +189,7 @@ class RESTClientObject(object):
# provided in serialized form
elif isinstance(body, str):
request_body = body
response = self.pool_manager.request(
r = self.pool_manager.request(
method, url,
body=request_body,
preload_content=_preload_content,
......@@ -208,30 +203,30 @@ class RESTClientObject(object):
raise ApiException(status=0, reason=msg)
# For `GET`, `HEAD`
else:
response = self.pool_manager.request(method, url,
r = self.pool_manager.request(method, url,
fields=query_params,
preload_content=_preload_content,
timeout=timeout,
headers=headers)
except urllib3.exceptions.SSLError as e:
msg = "{0}\n{1}".format(type(e).__name__, str(e))
raise ApiException(status=0, reason=msg)
if _preload_content:
response = RESTResponse(response)
if _preload_content:
r = RESTResponse(r)
# In the python 3, the response.data is bytes.
# we need to decode it to string.
if six.PY3:
response.data = response.data.decode('utf8')
r.data = r.data.decode('utf8')
# log response body
logger.debug("response body: %s", response.data)
logger.debug("response body: %s", r.data)
if not 200 <= r.status <= 299:
raise ApiException(http_resp=r)
if not 200 <= response.status <= 299:
raise ApiException(http_resp=response)
return response
return r
def GET(self, url, headers=None, query_params=None, _preload_content=True,
_request_timeout=None):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment