Commit f6905282 authored by Spiros Koulouzis's avatar Spiros Koulouzis

Set-Cookie for auth

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