index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
9,156
lioenel/mybookshelf2
refs/heads/master
/app/schema.py
import app from flask_marshmallow import Marshmallow from marshmallow import fields, post_dump, validate, Schema, post_load import app.model as model from sqlalchemy import desc from collections import namedtuple schema = Marshmallow(app.app) BaseModelSchema = schema.ModelSchema class ModelSchema(BaseModelSchema): @post_dump def remove_nones(self, data): return { key: value for key, value in data.items() if value is not None } class Meta: sqla_session = app.db.session class AuthorSchema(ModelSchema): class Meta: model = model.Author class SeriesSchema(ModelSchema): class Meta: model = model.Series class LanguageSchema(ModelSchema): class Meta: model = model.Language exclude = ('version_id',) class GenreSchema(ModelSchema): class Meta: model = model.Genre exclude = ('version_id',) class FormatSchema(ModelSchema): class Meta: model = model.Format exclude = ('version_id',) class UserSchema(ModelSchema): email = fields.Email(validate=validate.Length(max=256)) class Meta: model = model.User class RoleSchema(ModelSchema): class Meta: model = model.Role exclude = ('version_id',) class UploadSchema(ModelSchema): class Meta: model = model.Upload exclude = ('version_id',) class SourceSchema(ModelSchema): format = fields.Function(serialize=lambda o: o.format.extension) class Meta: model = model.Source def lang_from_code(c): return model.Language.query.filter_by(code=c).one() class EbookSchema(ModelSchema): authors = fields.Nested( AuthorSchema, many=True, only=('id', 'first_name', 'last_name')) series = fields.Nested(SeriesSchema, only=('id', 'title')) language = fields.Function( serialize=lambda o: o.language.name, deserialize=lang_from_code) genres = fields.Nested(GenreSchema, many=True) sources = fields.Nested(SourceSchema, many=True, only=( 'id', 'format', 'location', 'quality', 'modified', 'size')) full_text = None class Meta: model = model.Ebook exclude = ('full_text',) class FileInfoSchema(Schema): mime_type = fields.String(required=True, validate=validate.Length(max=255)) size = fields.Integer(required=True, validate=validate.Range(min=1)) # hash = fields.String(validate=validate.Length(max=128)) # schemas are probably not thread safe, better to have new instance per # each use ebook_serializer = lambda: EbookSchema() ebook_deserializer_update = lambda: EbookSchema() ebook_deserializer_insert = lambda: EbookSchema(exclude=('version_id',)) ebooks_list_serializer = lambda: EbookSchema(many=True, only=( 'id', 'title', 'authors', 'series', 'series_index', 'language', 'genres')) authors_list_serializer = lambda: AuthorSchema( many=True, only=('id', 'first_name', 'last_name')) author_serializer = lambda: AuthorSchema() series_list_serializer = lambda: SeriesSchema(many=True, only=('id', 'title')) upload_serializer = lambda: UploadSchema()
{"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal.py": ["/settings.py"], "/engine/tests/test_meta.py": ["/engine/dal.py", "/settings.py", "/engine/tasks.py"], "/app/minimal.py": ["/app/logic.py", "/app/access.py"], "/engine/backend.py": ["/engine/dal.py", "/app/utils.py", "/settings.py"], "/engine/dal2.py": ["/settings.py"], "/app/access.py": ["/app/utils.py"], "/engine/tests/test_dal.py": ["/engine/dal.py", "/settings.py"], "/engine/client.py": ["/app/utils.py"], "/app/logic.py": ["/app/schema.py", "/app/utils.py"]}
9,157
Yaambs18/Python_assignment
refs/heads/main
/assignment1.py
import requests import bs4 from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from string import punctuation import re import csv import os import logging logging.basicConfig(filename="assignment_file.log", format='%(asctime)s %(message)s', filemode='w') logger=logging.getLogger() logger.setLevel(logging.DEBUG) # Fetching the Movie ids for top 5 movies base_url = "https://www.imdb.com/chart/top/" movies_ids = [] movies_synopsis = [] dictionary_movie_data = {} def movies_id_func(url): try: request_res = requests.get(url) soup = bs4.BeautifulSoup(request_res.text, 'lxml') for i in range(5): movie_id = soup.select(".titleColumn")[i]('a')[0]['href'][7:-1] movies_ids.append(movie_id) return movies_ids except requests.exceptions.ConnectionError: logging.error("Connection Error, Check your Internet connectivity") except requests.exceptions.MissingSchema: logging.error("Invalid URL") # Fetching the synposis for the above movies and storings def movies_synopsis_func(movie_id): try: for i in movie_id: request_movie_link = requests.get(f"https://www.imdb.com/title/{i}") if request_movie_link.status_code == 200: format_response = bs4.BeautifulSoup(request_movie_link.text, 'lxml') movies_synopsis.append(format_response.select('.ipc-html-content')[1].getText()) else: logging.info("Incorrect URL") return movies_synopsis except TypeError: logging.error("None object returned") # creating a bag of words of synopsis and addin that in the dictionary with key as film_id def bag_of_words(string): try: stop_words = set(stopwords.words('english')) word_tokens = word_tokenize(string) filtered_sentence = [word for word in word_tokens if not word.lower() in stop_words] bag_of_word = ' '.join(filtered_sentence) return bag_of_word except TypeError: logging.error("Missing argument") # api data fetching def fetch_api_data(movie_ids): try: for id in movie_ids: pattern = r"\D{2}\d{7}" if re.compile(pattern).match(id).group()==id: response = requests.get(f"http://www.omdbapi.com/?i={id}&apikey=1db04143") api_info = response.json() try: dictionary_movie_data[id]['Genre'] = api_info['Genre'] dictionary_movie_data[id]['Actors'] = api_info['Actors'] dictionary_movie_data[id]['Title'] = api_info['Title'] except KeyError: logging.error("json file returned None") except TypeError: logging.error("Missing arguments or Unexpected argument") return dictionary_movie_data fields = ['movie_id','Title', 'Synopsis', 'Genre', 'Actors'] # csv file creation def write_csv(): if os.path.exists('movies_data.csv'): csvfile = open("movies_data.csv", "r") reader = csv.DictReader(csvfile) for row in reader: for item in movies_ids: if row['movie_id']==item: dictionary_movie_data.pop(item) csvfile.close() if len(dictionary_movie_data)>0: with open("movies_data.csv", "a") as file: writer = csv.DictWriter(file, fields) for key in dictionary_movie_data: writer.writerow({field: dictionary_movie_data[key].get(field) or key for field in fields}) else: with open("movies_data.csv", "w") as csvfile: writer = csv.DictWriter(csvfile, fields) writer.writeheader() for key in dictionary_movie_data: writer.writerow({field: dictionary_movie_data[key].get(field) or key for field in fields}) def fetch_movies_data(): item = input("Enter Genre or Actor name for data fetching: ") if item and not item.isdigit(): with open("movies_data.csv", 'r') as file: reader = csv.DictReader(file) movie_names = [] for row in reader: if item in row['Actors'] or item in row['Genre']: movie_names.append(row['Title']) return movie_names if __name__ == "__main__": logging.info(movies_id_func(base_url)) logging.info(movies_synopsis_func(movies_ids)) i = 0 for string in movies_synopsis: my_punctuation = punctuation.replace("'", "") new_str = string.translate(str.maketrans("", "", my_punctuation)) dictionary_movie_data[movies_ids[i]] = {"Synopsis" : bag_of_words(new_str)} i+=1 logging.info(fetch_api_data(movies_ids)) write_csv() fetched_data = fetch_movies_data() print(fetched_data) logging.info(fetched_data)
{"/assignment1_unit_test.py": ["/assignment1.py"]}
9,158
Yaambs18/Python_assignment
refs/heads/main
/assignment1_unit_test.py
import unittest import assignment1 import requests from unittest import mock from unittest.mock import patch class Test_assignment(unittest.TestCase): def test_top_movie(self): self.assertRaises(TypeError,assignment1.movies_id_func("https://www.imdb")) def test_api_fetch(self): self.assertRaises(TypeError, assignment1.fetch_api_data(123)) def test_synopsis_func(self): self.assertRaises(TypeError, assignment1.movies_synopsis_func(123)) def test_bag_of_words(self): self.assertEqual(assignment1.bag_of_words('ram is shyam'),'ram shyam') def test_fetch_data(self): with mock.patch('builtins.input', return_value="Drama"): assert assignment1.fetch_movies_data() == ['The Shawshank Redemption', 'The Godfather', 'The Godfather: Part II', 'The Dark Knight', '12 Angry Men'] if __name__ == "__main__": unittest.main()
{"/assignment1_unit_test.py": ["/assignment1.py"]}
9,162
silverasm/python-superfastmatch
refs/heads/master
/superfastmatch/client.py
""" Python library for interacting with SuperFastMatch server. """ __author__ = "James Turk (jturk@sunlightfoundation.com)" __version__ = "0.1.0-dev" __copyright__ = "Copyright (c) 2011 Sunlight Labs" __license__ = "BSD" import logging import urllib import urlparse import httplib import httplib2 import json import stream log = logging.getLogger(__name__) class SuperFastMatchError(Exception): """ Exception for SFM API errors """ def __init__(self, msg, status, expected_status, *args, **kwargs): super(SuperFastMatchError, self).__init__(msg, *args, **kwargs) self.status = status self.expected_status = expected_status def parse_doctype_range(rangestr): """Return a list of the doctypes in the range specified expanded as a list of integers. This is used to validate arguments. The actual range strings are passed onto the superfastmatch server. >>> parse_doctype_range('1-2:5:7-9') [1, 2, 5, 7, 8, 9] >>> parse_doctype_range('') >>> parse_doctype_range('1') [1] >>> parse_doctype_range('7-7') [7] """ if not rangestr: raise Exception('Invalid doctype range ({0})'.format(rangestr)) split_on_hyphen = lambda s: s.split('-') def expand(rng): if len(rng) == 1: return int(rng[0]) elif len(rng) == 2: return range(int(rng[0]), int(rng[1]) + 1) else: raise Exception('Unrecognized range data type') return (stream.Stream(rangestr.split(':')) >> stream.map(split_on_hyphen) >> stream.map(expand) >> stream.flatten >> list) def ensure_sequence(arg): if hasattr(arg, 'strip'): return [arg] if hasattr(arg, '__getitem__'): return arg elif hasattr(arg, '__iter__'): return list(arg) else: return [arg] class Client(object): def __init__(self, url='http://127.0.0.1:8080/', parse_response=True, username=None, password=None): self.url = url if not self.url.endswith('/'): self.url += '/' self._http = httplib2.Http() if username is not None and password is not None: self._http.add_credentials(username, password) self.parse_response = parse_response def _apicall(self, method, path, expected_status, params=''): expected_status = ensure_sequence(expected_status) if params: for (key, value) in params.iteritems(): if isinstance(value, unicode): params[key] = value.encode('utf-8') params = urllib.urlencode(params, doseq=True) elif params == {}: params = '' uri = urlparse.urljoin(self.url, path) headers = {} if method == 'GET' and params: uri = uri + '?' + params params = None log.debug('httplib2.Http.request(uri={uri!r}, method={method!r}, params={params!r}, headers={headers!r})'.format(**locals())) resp, content = self._http.request(uri, method, params, headers) status = int(resp['status']) if status in expected_status: if self.parse_response == True: if resp['content-type'] in 'application/json': obj = json.loads(content) return obj return content else: tmpl = "Unexpected HTTP status. Expecting {0!r} but got {1!r} on {2!r}" msg = tmpl.format(str(expected_status), status, uri) raise SuperFastMatchError(msg, status, expected_status) def add(self, doctype, docid, text, defer=False, **kwargs): method = 'POST' if defer else 'PUT' kwargs['text'] = text return self._apicall(method, 'document/%s/%s/' % (doctype, docid), httplib.ACCEPTED, kwargs) def delete(self, doctype, docid): return self._apicall('DELETE', 'document/%s/%s/' % (doctype, docid), [httplib.ACCEPTED, httplib.NOT_FOUND]) def get(self, doctype, docid): return self._apicall('GET', 'document/%s/%s/' % (doctype, docid), [httplib.OK, httplib.NOT_FOUND, httplib.NOT_MODIFIED], {}) def associations(self, doctype=None, page=None): url = 'association/' if doctype is not None: url = '%s%s' % (url, doctype) params = {} if page is not None: params['cursor'] = page return self._apicall('GET', url, httplib.OK, params) def update_associations(self, doctype=None, doctype2=None, skip_validation=False): url = 'associations/' if doctype: if not skip_validation: parse_doctype_range(doctype) url = '%s%s/' % (url, doctype) if doctype2: if not skip_validation: parse_doctype_range(doctype2) url = '%s%s/' % (url, doctype2) return self._apicall('POST', url, httplib.ACCEPTED) def document(self, doctype, docid): url = 'document/%s/%s' % (doctype, docid) return self._apicall('GET', url, [httplib.OK, httplib.NOT_MODIFIED, httplib.NOT_FOUND]) def documents(self, doctype=None, page=None, order_by=None, limit=None): url = 'document/' if doctype is not None: url = "%s%s/" % (url, doctype) params = {} if page is not None: params['cursor'] = page if order_by is not None: params['order_by'] = order_by if limit is not None: params['limit'] = limit return self._apicall('GET', url, httplib.OK, params) def search(self, text, doctype=None, **kwargs): url = 'search/' params = kwargs if text is not None: params['text'] = text if doctype: url = '%s/%s/' % (url, doctype) params['doctype'] = str(doctype) return self._apicall('POST', url, httplib.OK, params) def queue(self): return self._apicall('GET', 'queue/', httplib.OK)
{"/superfastmatch/iterators.py": ["/superfastmatch/client.py"], "/superfastmatch/djangoclient.py": ["/superfastmatch/client.py"], "/superfastmatch/__init__.py": ["/superfastmatch/client.py", "/superfastmatch/iterators.py", "/superfastmatch/djangoclient.py"]}
9,163
silverasm/python-superfastmatch
refs/heads/master
/superfastmatch/iterators.py
import logging from .client import Client log = logging.getLogger(__name__) def maxindexof(l): return len(l) - 1 class DocumentIterator(object): """Iterates through the documents on a superfastmatch server. The order is determined by the `order_by` argument. It should be the name of a metadata field, optionally prefixed by a hyphen (-) to indicate a reversal of the natural order. The `chunksize` option is available for optimization. It determines how many documents are retrieved from the server per request. The `doctype` argument can be used to limit the iteration to the a specific range of doctypes. """ def __init__(self, client, order_by, doctype=None, chunksize=100): assert isinstance(client, Client), 'The first argument to DocumentIterator() must be an instance of superfastmatch.client.Client.' self.client = client # response: the most recent response from the server self.response = None # chunk: a list of documents returned from the server self.chunk = None # index: the index into `chunk` of the previously-returned document self.index = None self.chunksize = chunksize self.doctype = doctype self.order_by = order_by def __iter__(self): return self def next(self): if self.chunk is None or self.index == maxindexof(self.chunk): self.fetch_chunk() else: self.index += 1 return self.current() def current(self): if self.chunk is None or self.index is None: return None return self.chunk[self.index] def fetch_chunk(self): if self.response is None: log.debug('Fetching first chunk of size {limit} ordered by {order_by}'.format( limit=self.chunksize, order_by=self.order_by)) response = self.client.documents(doctype=self.doctype, order_by=self.order_by, limit=self.chunksize) self.accept_response(response) else: next_cursor = self.response['cursors']['next'] if next_cursor == u'': raise StopIteration() log.debug('Fetching chunk of size {limit} at {next_cursor} ordered by {order_by}'.format( limit=self.chunksize, next_cursor=next_cursor, order_by=self.order_by)) response = self.client.documents(doctype=self.doctype, page=next_cursor, order_by=self.order_by, limit=self.chunksize) self.accept_response(response) def accept_response(self, response): if response['success'] == False or len(response['rows']) == 0: raise StopIteration() self.response = response self.chunk = response['rows'] self.index = 0
{"/superfastmatch/iterators.py": ["/superfastmatch/client.py"], "/superfastmatch/djangoclient.py": ["/superfastmatch/client.py"], "/superfastmatch/__init__.py": ["/superfastmatch/client.py", "/superfastmatch/iterators.py", "/superfastmatch/djangoclient.py"]}
9,164
silverasm/python-superfastmatch
refs/heads/master
/superfastmatch/djangoclient.py
import superfastmatch.client from django.conf import settings class Client(superfastmatch.client.Client): def __init__(self, confkey='default', *args, **kwargs): assert hasattr(settings, 'SUPERFASTMATCH'), "You must configure the Django Superfastmatch client." assert confkey in settings.SUPERFASTMATCH, "You must configure the '{0}' Django Superfastmatch client.".format(confkey) def copy_setting(key): if key not in kwargs and key in settings.SUPERFASTMATCH[confkey]: kwargs[key] = settings.SUPERFASTMATCH[confkey][key] copy_setting('url') copy_setting('username') copy_setting('password') copy_setting('parse_response') super(Client, self).__init__(*args, **kwargs) if __name__ == "__main__": client = Client()
{"/superfastmatch/iterators.py": ["/superfastmatch/client.py"], "/superfastmatch/djangoclient.py": ["/superfastmatch/client.py"], "/superfastmatch/__init__.py": ["/superfastmatch/client.py", "/superfastmatch/iterators.py", "/superfastmatch/djangoclient.py"]}
9,165
silverasm/python-superfastmatch
refs/heads/master
/superfastmatch/__init__.py
from .client import Client from .client import SuperFastMatchError try: from .djangoclient import Client as DjangoClient except ImportError: pass from .iterators import DocumentIterator
{"/superfastmatch/iterators.py": ["/superfastmatch/client.py"], "/superfastmatch/djangoclient.py": ["/superfastmatch/client.py"], "/superfastmatch/__init__.py": ["/superfastmatch/client.py", "/superfastmatch/iterators.py", "/superfastmatch/djangoclient.py"]}
9,180
zhaoyufrank8825/item_alert
refs/heads/master
/models/user/user.py
from models.blog import Blog import uuid from flask import flash, redirect, url_for, render_template from dataclasses import dataclass, field from common.utils import Utils import models.user.errors as UserErrors from models.model import Model @dataclass class User(Model): collection: str = field(init=False, default="users") email: str password: str username: str _id: str = field(default_factory=lambda: uuid.uuid4().hex) def json(self): return { "email": self.email, "password": self.password, "_id": self._id, "username": self.username } @classmethod def find_by_email(cls, email): try: return cls.find_one_by("email", email) except TypeError: # flash("A user with this email was not found.", "danger") # return render_template("users/register.html") raise UserErrors.UserNotFoundError("A user with this email was not found.") @classmethod def register(cls, email, password, username): if not Utils.email_valid(email): flash("The email does not have the righ format.", "danger") return render_template("users/register.html") # raise UserErrors.InvalidEmailError("The email does not have the righ format.") try: cls.find_by_email(email) flash("The email you used to register already exists.", "danger") return render_template("users/register.html") # raise UserErrors.UserAlreadyRegisteredError("The email you used to register already exists.") except UserErrors.UserNotFoundError: flash("Create new user.", "danger") User(email, Utils.hash_password(password), username).save_to_mongo() @classmethod def is_login_valid(cls, email, password): user = User.find_by_email(email) if not Utils.check_hashed_password(password, user.password): flash("The password was incorrect.", "danger") return render_template("users/login.html") # raise UserErrors.IncorrectPasswordError("The password was incorrect.") return True def get_blogs(self): return Blog.find_by_author_id(self._id) def new_blog(self, title, description): blog = Blog(self.email, title, description, self._id) blog.save_to_mongo() @staticmethod def new_post(blog_id, title, content): blog = Blog.from_mongo(blog_id) blog.new_post(title, content) @classmethod def get_by_email(cls, email): return cls.find_one_by("email", email)
{"/models/user/user.py": ["/models/blog.py", "/common/utils.py", "/models/user/errors.py", "/models/model.py"], "/models/user/__init__.py": ["/models/user/user.py", "/models/user/errors.py", "/models/user/decorator.py"], "/views/stores.py": ["/models/user/decorator.py", "/models/store.py", "/models/user/__init__.py"], "/models/alert.py": ["/models/model.py", "/models/item.py"], "/models/blog.py": ["/models/post.py", "/models/model.py"], "/models/post.py": ["/models/model.py"], "/models/item.py": ["/models/model.py"], "/views/blogs.py": ["/models/post.py", "/models/blog.py", "/models/user/__init__.py"], "/views/alerts.py": ["/models/alert.py", "/models/store.py", "/models/item.py", "/models/user/__init__.py"], "/views/users.py": ["/models/user/__init__.py"], "/models/store.py": ["/models/model.py"]}
9,181
zhaoyufrank8825/item_alert
refs/heads/master
/models/user/__init__.py
from models.user.user import User import models.user.errors as UserErrors from models.user.decorator import require_login, require_admin
{"/models/user/user.py": ["/models/blog.py", "/common/utils.py", "/models/user/errors.py", "/models/model.py"], "/models/user/__init__.py": ["/models/user/user.py", "/models/user/errors.py", "/models/user/decorator.py"], "/views/stores.py": ["/models/user/decorator.py", "/models/store.py", "/models/user/__init__.py"], "/models/alert.py": ["/models/model.py", "/models/item.py"], "/models/blog.py": ["/models/post.py", "/models/model.py"], "/models/post.py": ["/models/model.py"], "/models/item.py": ["/models/model.py"], "/views/blogs.py": ["/models/post.py", "/models/blog.py", "/models/user/__init__.py"], "/views/alerts.py": ["/models/alert.py", "/models/store.py", "/models/item.py", "/models/user/__init__.py"], "/views/users.py": ["/models/user/__init__.py"], "/models/store.py": ["/models/model.py"]}
9,182
zhaoyufrank8825/item_alert
refs/heads/master
/views/stores.py
from models.user.decorator import require_admin from flask import Blueprint, render_template, request, redirect, url_for from werkzeug.utils import redirect from models.store import Store from models.user import require_admin import json store_blueprint = Blueprint("stores", __name__) @store_blueprint.route("/") def index(): stores = Store.all() return render_template("stores/index.html", stores = stores) @store_blueprint.route("/new", methods=['GET', 'POST']) @require_admin def new_store(): if request.method == 'POST': url_prefix = request.form['url_pre'] name = request.form['name'] tag = request.form['tag'] query = json.loads(request.form['query']) img = request.form['img'] description = request.form['description'] Store(url_prefix, name, tag, query, img, description).save_to_mongo() return redirect(url_for(".index")) return render_template("stores/new_store.html") @store_blueprint.route("/edit/<string:store_id>", methods=['GET', 'POST']) @require_admin def edit_store(store_id): store = Store.get_by_id(store_id) if request.method == 'POST': store.url_prefix = request.form['url_pre'] store.tag = request.form['tag'] store.query = json.loads(request.form['query']) store.img = request.form['img'] store.description = request.form['description'] store.save_to_mongo() return redirect(url_for(".index")) return render_template("stores/edit_store.html", store=store) @store_blueprint.route("/remove/<string:store_id>") @require_admin def remove_store(store_id): store = Store.get_by_id(store_id) store.remove_from_mongo() return redirect(url_for(".index")) @store_blueprint.route("/show/<string:store_id>") def show(store_id): store = Store.get_by_id(store_id) return render_template("stores/show.html", store=store)
{"/models/user/user.py": ["/models/blog.py", "/common/utils.py", "/models/user/errors.py", "/models/model.py"], "/models/user/__init__.py": ["/models/user/user.py", "/models/user/errors.py", "/models/user/decorator.py"], "/views/stores.py": ["/models/user/decorator.py", "/models/store.py", "/models/user/__init__.py"], "/models/alert.py": ["/models/model.py", "/models/item.py"], "/models/blog.py": ["/models/post.py", "/models/model.py"], "/models/post.py": ["/models/model.py"], "/models/item.py": ["/models/model.py"], "/views/blogs.py": ["/models/post.py", "/models/blog.py", "/models/user/__init__.py"], "/views/alerts.py": ["/models/alert.py", "/models/store.py", "/models/item.py", "/models/user/__init__.py"], "/views/users.py": ["/models/user/__init__.py"], "/models/store.py": ["/models/model.py"]}
9,183
zhaoyufrank8825/item_alert
refs/heads/master
/models/alert.py
from models.model import Model from models.item import Item from dataclasses import dataclass, field import uuid @dataclass class Alert(Model): collection: str = field(init=False, default="alerts") name: str item_id: str price_limit: float email: str img: str _id: str = field(default_factory=lambda: uuid.uuid4().hex ) def __post_init__(self): self.item = Item.get_by_id(self.item_id) def json(self): return { "item_id": self.item_id, "price_limit": self.price_limit, "_id": self._id, "name": self.name, "email": self.email, "img": self.img } def load_item_price(self): return self.item.load_price() def notify_if_reached(self): if self.item.price < self.price_limit: print( f"Item {self.item} has reached a price under {self.price_limit}. new price: {self.item.price}.")
{"/models/user/user.py": ["/models/blog.py", "/common/utils.py", "/models/user/errors.py", "/models/model.py"], "/models/user/__init__.py": ["/models/user/user.py", "/models/user/errors.py", "/models/user/decorator.py"], "/views/stores.py": ["/models/user/decorator.py", "/models/store.py", "/models/user/__init__.py"], "/models/alert.py": ["/models/model.py", "/models/item.py"], "/models/blog.py": ["/models/post.py", "/models/model.py"], "/models/post.py": ["/models/model.py"], "/models/item.py": ["/models/model.py"], "/views/blogs.py": ["/models/post.py", "/models/blog.py", "/models/user/__init__.py"], "/views/alerts.py": ["/models/alert.py", "/models/store.py", "/models/item.py", "/models/user/__init__.py"], "/views/users.py": ["/models/user/__init__.py"], "/models/store.py": ["/models/model.py"]}
9,184
zhaoyufrank8825/item_alert
refs/heads/master
/models/user/errors.py
class UserError(Exception): def __init__(self, msg): self.msg = msg class UserNotFoundError(UserError): pass class UserAlreadyRegisteredError(UserError): pass class InvalidEmailError(UserError): pass class PasswordDonotMatchError(UserError): pass class IncorrectPasswordError(UserError): pass
{"/models/user/user.py": ["/models/blog.py", "/common/utils.py", "/models/user/errors.py", "/models/model.py"], "/models/user/__init__.py": ["/models/user/user.py", "/models/user/errors.py", "/models/user/decorator.py"], "/views/stores.py": ["/models/user/decorator.py", "/models/store.py", "/models/user/__init__.py"], "/models/alert.py": ["/models/model.py", "/models/item.py"], "/models/blog.py": ["/models/post.py", "/models/model.py"], "/models/post.py": ["/models/model.py"], "/models/item.py": ["/models/model.py"], "/views/blogs.py": ["/models/post.py", "/models/blog.py", "/models/user/__init__.py"], "/views/alerts.py": ["/models/alert.py", "/models/store.py", "/models/item.py", "/models/user/__init__.py"], "/views/users.py": ["/models/user/__init__.py"], "/models/store.py": ["/models/model.py"]}
9,185
zhaoyufrank8825/item_alert
refs/heads/master
/models/user/decorator.py
from typing import Callable import functools from flask import session, flash, url_for, redirect, current_app def require_login(f: Callable): @functools.wraps(f) def decorated_function(*args, **kwargs): if not session.get('email'): flash("You need to be signed in for this page.", "danger") return redirect(url_for("users.login")) return f(*args, **kwargs) return decorated_function def require_admin(f: Callable): @functools.wraps(f) def decorated_function(*args, **kwargs): # print(session.get('email'), current_app.config.get("ADMIN", "")) if session.get('email') != current_app.config.get("ADMIN", ""): flash("You need to be the administrator to access this page.", "danger") return redirect(url_for("users.login")) return f(*args, **kwargs) return decorated_function
{"/models/user/user.py": ["/models/blog.py", "/common/utils.py", "/models/user/errors.py", "/models/model.py"], "/models/user/__init__.py": ["/models/user/user.py", "/models/user/errors.py", "/models/user/decorator.py"], "/views/stores.py": ["/models/user/decorator.py", "/models/store.py", "/models/user/__init__.py"], "/models/alert.py": ["/models/model.py", "/models/item.py"], "/models/blog.py": ["/models/post.py", "/models/model.py"], "/models/post.py": ["/models/model.py"], "/models/item.py": ["/models/model.py"], "/views/blogs.py": ["/models/post.py", "/models/blog.py", "/models/user/__init__.py"], "/views/alerts.py": ["/models/alert.py", "/models/store.py", "/models/item.py", "/models/user/__init__.py"], "/views/users.py": ["/models/user/__init__.py"], "/models/store.py": ["/models/model.py"]}
9,186
zhaoyufrank8825/item_alert
refs/heads/master
/models/blog.py
import datetime, uuid from models.post import Post from models.model import Model from dataclasses import dataclass, field @dataclass class Blog(Model): collection: str = field(init=False, default="blogs") email: str author: str author_id: str title: float description: str img: str _id: str = field(default_factory=lambda: uuid.uuid4().hex ) def new_post(self, title, content): post = Post(blog_id = self._id, title=title, content=content, author=self.author, img=self.img, date=datetime.datetime.utcnow()) post.save_to_mongo() def get_posts(self): return Post.from_blog(self._id) def json(self): return { "author": self.author, "title": self.title, "description": self.description, "author_id": self.author_id, "_id": self._id, "email": self.email, "img": self.img } @classmethod def from_mongo(cls, id): return cls.find_one_by("_id", id) @classmethod def find_by_author_id(cls, id): return cls.find_many_by("author_id", id)
{"/models/user/user.py": ["/models/blog.py", "/common/utils.py", "/models/user/errors.py", "/models/model.py"], "/models/user/__init__.py": ["/models/user/user.py", "/models/user/errors.py", "/models/user/decorator.py"], "/views/stores.py": ["/models/user/decorator.py", "/models/store.py", "/models/user/__init__.py"], "/models/alert.py": ["/models/model.py", "/models/item.py"], "/models/blog.py": ["/models/post.py", "/models/model.py"], "/models/post.py": ["/models/model.py"], "/models/item.py": ["/models/model.py"], "/views/blogs.py": ["/models/post.py", "/models/blog.py", "/models/user/__init__.py"], "/views/alerts.py": ["/models/alert.py", "/models/store.py", "/models/item.py", "/models/user/__init__.py"], "/views/users.py": ["/models/user/__init__.py"], "/models/store.py": ["/models/model.py"]}
9,187
zhaoyufrank8825/item_alert
refs/heads/master
/models/post.py
import uuid, datetime from models.model import Model from dataclasses import dataclass, field @dataclass class Post(Model): collection: str = field(init=False, default="posts") blog_id: str title: str content: str author: str img: str date: str = field(default_factory=lambda: datetime.datetime.utcnow() ) _id: str = field(default_factory=lambda: uuid.uuid4().hex ) def json(self): return { "_id": self._id, "blog_id": self.blog_id, "title": self.title, "author": self.author, "content": self.content, "date": self.date, "img": self.img } @classmethod def from_mongo(cls, id): return cls.find_one_by('_id', id) @classmethod def from_blog(cls, id): return cls.find_many_by("blog_id", id)
{"/models/user/user.py": ["/models/blog.py", "/common/utils.py", "/models/user/errors.py", "/models/model.py"], "/models/user/__init__.py": ["/models/user/user.py", "/models/user/errors.py", "/models/user/decorator.py"], "/views/stores.py": ["/models/user/decorator.py", "/models/store.py", "/models/user/__init__.py"], "/models/alert.py": ["/models/model.py", "/models/item.py"], "/models/blog.py": ["/models/post.py", "/models/model.py"], "/models/post.py": ["/models/model.py"], "/models/item.py": ["/models/model.py"], "/views/blogs.py": ["/models/post.py", "/models/blog.py", "/models/user/__init__.py"], "/views/alerts.py": ["/models/alert.py", "/models/store.py", "/models/item.py", "/models/user/__init__.py"], "/views/users.py": ["/models/user/__init__.py"], "/models/store.py": ["/models/model.py"]}
9,188
zhaoyufrank8825/item_alert
refs/heads/master
/common/utils.py
import re from passlib.hash import pbkdf2_sha512 class Utils: @staticmethod def email_valid(email): pattern = re.compile(r"^[\w-]+@([\w-]+\.)+[\w]+$") return True if pattern.match(email) else False @staticmethod def hash_password(password): return pbkdf2_sha512.encrypt(password) @staticmethod def check_hashed_password(password, hashed_password): return pbkdf2_sha512.verify(password, hashed_password)
{"/models/user/user.py": ["/models/blog.py", "/common/utils.py", "/models/user/errors.py", "/models/model.py"], "/models/user/__init__.py": ["/models/user/user.py", "/models/user/errors.py", "/models/user/decorator.py"], "/views/stores.py": ["/models/user/decorator.py", "/models/store.py", "/models/user/__init__.py"], "/models/alert.py": ["/models/model.py", "/models/item.py"], "/models/blog.py": ["/models/post.py", "/models/model.py"], "/models/post.py": ["/models/model.py"], "/models/item.py": ["/models/model.py"], "/views/blogs.py": ["/models/post.py", "/models/blog.py", "/models/user/__init__.py"], "/views/alerts.py": ["/models/alert.py", "/models/store.py", "/models/item.py", "/models/user/__init__.py"], "/views/users.py": ["/models/user/__init__.py"], "/models/store.py": ["/models/model.py"]}
9,189
zhaoyufrank8825/item_alert
refs/heads/master
/models/item.py
from models.model import Model import uuid, requests from bs4 import BeautifulSoup from typing import Dict from dataclasses import dataclass, field @dataclass(eq=False) class Item(Model): collection: str = field(init=False, default="items") url: str tag: str query: Dict _id: str = field(default_factory=lambda: uuid.uuid4().hex) price: float = field(default=None) def load_price(self) -> float: # request = requests.get(self.url, headers = {'User-Agent': 'Mozilla/5.0'}) content = requests.get(self.url).content soup = BeautifulSoup(content, "html.parser") element = soup.find(self.tag, self.query) str_price = element.text.strip() # pattern = re.compile(r"(\d+,?\d+\.\d\d)") # found_price = pattern.search(str_price).group(1) # price = float(found_price.replace(",", "")) self.price = float(str_price[1:]) return self.price def json(self) -> Dict: return { "_id":self._id, "url":self.url, "tag":self.tag, "query":self.query, "price":self.price }
{"/models/user/user.py": ["/models/blog.py", "/common/utils.py", "/models/user/errors.py", "/models/model.py"], "/models/user/__init__.py": ["/models/user/user.py", "/models/user/errors.py", "/models/user/decorator.py"], "/views/stores.py": ["/models/user/decorator.py", "/models/store.py", "/models/user/__init__.py"], "/models/alert.py": ["/models/model.py", "/models/item.py"], "/models/blog.py": ["/models/post.py", "/models/model.py"], "/models/post.py": ["/models/model.py"], "/models/item.py": ["/models/model.py"], "/views/blogs.py": ["/models/post.py", "/models/blog.py", "/models/user/__init__.py"], "/views/alerts.py": ["/models/alert.py", "/models/store.py", "/models/item.py", "/models/user/__init__.py"], "/views/users.py": ["/models/user/__init__.py"], "/models/store.py": ["/models/model.py"]}
9,190
zhaoyufrank8825/item_alert
refs/heads/master
/views/blogs.py
from flask import render_template, request, session, make_response, Blueprint, redirect, url_for from models.post import Post from models.blog import Blog from models.user import User from models.user import require_login blog_blueprint = Blueprint("blogs", __name__) @blog_blueprint.route("/") def index(): users = User.all() blogs = [] for user in users: user_blogs = user.get_blogs() blogs.extend(user_blogs) return render_template("blogs/index.html", blogs=blogs, users=users) @blog_blueprint.route("/new_blog", methods=["GET", "POST"]) @require_login def new_blog(): if request.method == "GET": return render_template("blogs/new_blog.html") else: user=User.get_by_email(session['email']) title = request.form['title'] description = request.form['description'] img = request.form['img'] blog = Blog(user.email, user.username, user._id, title, description, img) blog.save_to_mongo() return make_response(index()) @blog_blueprint.route("/edit/<string:blog_id>", methods=['GET', 'POST']) @require_login def edit_blog(blog_id): blog = Blog.get_by_id(blog_id) if request.method == 'POST': blog.description = request.form['description'] blog.img = request.form['img'] blog.save_to_mongo() return redirect(url_for(".index")) return render_template("blogs/edit_blog.html", blog=blog) @blog_blueprint.route("/remove/<string:blog_id>") @require_login def remove_blog(blog_id): blog = Blog.get_by_id(blog_id) if blog.email == session['email']: blog.remove_from_mongo() return redirect(url_for(".index")) @blog_blueprint.route("/<string:blog_id>/posts") def posts(blog_id): blog = Blog.from_mongo(blog_id) posts = blog.get_posts() return render_template("posts/index.html", posts=posts, blog=blog) @blog_blueprint.route("/<string:blog_id>/posts/new_post", methods=['GET', 'POST']) @require_login def new_post(blog_id): blog = Blog.get_by_id(blog_id) if request.method == "GET": return render_template("posts/new_post.html", blog_id=blog_id) else: title = request.form['title'] content = request.form['content'] img = request.form['img'] post = Post(blog_id, title, content, blog.author, img) post.save_to_mongo() return make_response(posts(blog_id)) @blog_blueprint.route("/<string:blog_id>/posts/edit/<string:post_id>", methods=['GET', 'POST']) @require_login def edit_post(blog_id, post_id): post = Post.get_by_id(post_id) if request.method == 'POST': post.content = request.form['content'] post.img = request.form['img'] post.save_to_mongo() return redirect(url_for(".posts", blog_id = blog_id)) return render_template("posts/edit_post.html", post=post) @blog_blueprint.route("/<string:blog_id>/posts/remove/<string:post_id>") @require_login def remove_post(blog_id, post_id): blog = Blog.get_by_id(blog_id) if blog.email == session['email']: post = Post.get_by_id(post_id) post.remove_from_mongo() return redirect(url_for(".posts", blog_id = blog_id)) @blog_blueprint.route("/<string:blog_id>/posts/show/<string:post_id>") def show_post(blog_id, post_id): blog = Blog.get_by_id(blog_id) post = Post.get_by_id(post_id) return render_template("posts/show.html", post=post, blog=blog)
{"/models/user/user.py": ["/models/blog.py", "/common/utils.py", "/models/user/errors.py", "/models/model.py"], "/models/user/__init__.py": ["/models/user/user.py", "/models/user/errors.py", "/models/user/decorator.py"], "/views/stores.py": ["/models/user/decorator.py", "/models/store.py", "/models/user/__init__.py"], "/models/alert.py": ["/models/model.py", "/models/item.py"], "/models/blog.py": ["/models/post.py", "/models/model.py"], "/models/post.py": ["/models/model.py"], "/models/item.py": ["/models/model.py"], "/views/blogs.py": ["/models/post.py", "/models/blog.py", "/models/user/__init__.py"], "/views/alerts.py": ["/models/alert.py", "/models/store.py", "/models/item.py", "/models/user/__init__.py"], "/views/users.py": ["/models/user/__init__.py"], "/models/store.py": ["/models/model.py"]}
9,191
zhaoyufrank8825/item_alert
refs/heads/master
/views/alerts.py
from flask import Blueprint, render_template, request, redirect, url_for, session from models.alert import Alert from models.store import Store from models.item import Item from models.user import require_login, User alert_blueprint = Blueprint("alerts", __name__) @alert_blueprint.route("/") def index(): users = User.all() alerts = [] for user in users: user_alerts = Alert.find_many_by("email", user.email) alerts.extend(user_alerts) return render_template("alerts/index.html", alerts = alerts) # def index(): # alerts = Alert.find_many_by("email", session['email']) # return render_template("alerts/index.html", alerts = alerts) @alert_blueprint.route("/new", methods=['GET', 'POST']) @require_login def new_alert(): if request.method == 'POST': item_url = request.form['item_url'] name = request.form['name'] img = request.form['img'] price_limit = float(request.form['price_limit']) store = Store.find_by_url(item_url) item = Item(item_url, store.tag, store.query) item.load_price() item.save_to_mongo() Alert(name, item._id, price_limit, session['email'], img).save_to_mongo() return redirect(url_for(".index")) return render_template("alerts/new_alert.html") @alert_blueprint.route("/edit/<string:alert_id>", methods=['GET', 'POST']) @require_login def edit_alert(alert_id): alert = Alert.get_by_id(alert_id) if request.method == 'POST': alert.price_limit = float(request.form['price_limit']) alert.img = request.form['img'] alert.save_to_mongo() return redirect(url_for(".index")) return render_template("alerts/edit_alert.html", alert=alert) @alert_blueprint.route("/remove/<string:alert_id>") @require_login def remove_alert(alert_id): alert = Alert.get_by_id(alert_id) if alert.email == session['email']: alert.remove_from_mongo() return redirect(url_for(".index"))
{"/models/user/user.py": ["/models/blog.py", "/common/utils.py", "/models/user/errors.py", "/models/model.py"], "/models/user/__init__.py": ["/models/user/user.py", "/models/user/errors.py", "/models/user/decorator.py"], "/views/stores.py": ["/models/user/decorator.py", "/models/store.py", "/models/user/__init__.py"], "/models/alert.py": ["/models/model.py", "/models/item.py"], "/models/blog.py": ["/models/post.py", "/models/model.py"], "/models/post.py": ["/models/model.py"], "/models/item.py": ["/models/model.py"], "/views/blogs.py": ["/models/post.py", "/models/blog.py", "/models/user/__init__.py"], "/views/alerts.py": ["/models/alert.py", "/models/store.py", "/models/item.py", "/models/user/__init__.py"], "/views/users.py": ["/models/user/__init__.py"], "/models/store.py": ["/models/model.py"]}
9,192
zhaoyufrank8825/item_alert
refs/heads/master
/models/model.py
from abc import ABCMeta, abstractmethod from common.database import Database from typing import Type, TypeVar T = TypeVar('T', bound="Model") class Model(metaclass=ABCMeta): collection: str _id: str def __init__(self, *args, **kwargs) -> None: pass def save_to_mongo(self): Database.update(self.collection, {"_id":self._id}, self.json()) def remove_from_mongo(self): Database.remove(self.collection, {"_id":self._id}) @abstractmethod def json(self): raise NotImplementedError @classmethod def get_by_id(cls: Type[T], id: str) -> T: return cls.find_one_by("_id", id) @classmethod def all(cls): elements = Database.find(cls.collection, {}) return [cls(**elem) for elem in elements] @classmethod def find_one_by(cls, attr, value): elem = Database.find_one(cls.collection, {attr: value}) return cls(**elem) @classmethod def find_many_by(cls, attr, value): elements = Database.find(cls.collection, {attr: value}) return [cls(**elem) for elem in elements]
{"/models/user/user.py": ["/models/blog.py", "/common/utils.py", "/models/user/errors.py", "/models/model.py"], "/models/user/__init__.py": ["/models/user/user.py", "/models/user/errors.py", "/models/user/decorator.py"], "/views/stores.py": ["/models/user/decorator.py", "/models/store.py", "/models/user/__init__.py"], "/models/alert.py": ["/models/model.py", "/models/item.py"], "/models/blog.py": ["/models/post.py", "/models/model.py"], "/models/post.py": ["/models/model.py"], "/models/item.py": ["/models/model.py"], "/views/blogs.py": ["/models/post.py", "/models/blog.py", "/models/user/__init__.py"], "/views/alerts.py": ["/models/alert.py", "/models/store.py", "/models/item.py", "/models/user/__init__.py"], "/views/users.py": ["/models/user/__init__.py"], "/models/store.py": ["/models/model.py"]}
9,193
zhaoyufrank8825/item_alert
refs/heads/master
/views/users.py
from flask import Blueprint, flash, request, render_template, session, redirect, url_for from models.user import User, UserErrors # import models.user.errors as UserErrors user_blueprint = Blueprint("users", __name__) @user_blueprint.route("/register", methods=['GET', 'POST']) def register(): if request.method == 'POST': email = request.form['email'] password = request.form['password'] password2 = request.form['password2'] username = request.form['username'] if password == password2: try: User.register(email, password, username) session['email']=email return render_template("alerts/index.html") except UserErrors.UserError as e: return e.msg else: flash("The confirmed password doesn't match with password.", "danger") return render_template("users/register.html") # raise UserErrors.PasswordDonotMatchError("The confirmed password doesn't match with password.") return render_template("users/register.html") @user_blueprint.route("/login", methods=['GET', 'POST']) def login(): if request.method == 'POST': email = request.form['email'] password = request.form['password'] try: if User.is_login_valid(email, password): session['email']=email return redirect(url_for("blogs.index")) except UserErrors.UserError as e: return e.msg return render_template("users/login.html") @user_blueprint.route("/logout") def logout(): session['email'] = None return redirect(url_for(".login"))
{"/models/user/user.py": ["/models/blog.py", "/common/utils.py", "/models/user/errors.py", "/models/model.py"], "/models/user/__init__.py": ["/models/user/user.py", "/models/user/errors.py", "/models/user/decorator.py"], "/views/stores.py": ["/models/user/decorator.py", "/models/store.py", "/models/user/__init__.py"], "/models/alert.py": ["/models/model.py", "/models/item.py"], "/models/blog.py": ["/models/post.py", "/models/model.py"], "/models/post.py": ["/models/model.py"], "/models/item.py": ["/models/model.py"], "/views/blogs.py": ["/models/post.py", "/models/blog.py", "/models/user/__init__.py"], "/views/alerts.py": ["/models/alert.py", "/models/store.py", "/models/item.py", "/models/user/__init__.py"], "/views/users.py": ["/models/user/__init__.py"], "/models/store.py": ["/models/model.py"]}
9,194
zhaoyufrank8825/item_alert
refs/heads/master
/models/store.py
from models.model import Model from typing import Dict import uuid, re from dataclasses import dataclass, field @dataclass(eq=False) class Store(Model): collection: str = field(init=False, default="stores") url_prefix: str name: str tag: str query: Dict img: str description: str _id: str = field(default_factory=lambda: uuid.uuid4().hex) def json(self): return { "url_prefix": self.url_prefix, "name": self.name, "tag": self.tag, "query": self.query, "_id": self._id, "img": self.img, "description": self.description } @classmethod def get_by_name(cls, name): return cls.find_one_by("name", name) @classmethod def get_by_url_prefix(cls, url_prefix): url_pre = {"$regex": '^{}'.format(url_prefix)} print(url_pre, "in get_by_url_prefix", url_prefix) return cls.find_one_by("url_prefix", url_pre) @classmethod def find_by_url(cls, url): pattern = re.compile(r"(https?://.*?/)") url_pre = pattern.search(url).group(1) print(url_pre, "in find_by_url") return cls.get_by_url_prefix(url_pre)
{"/models/user/user.py": ["/models/blog.py", "/common/utils.py", "/models/user/errors.py", "/models/model.py"], "/models/user/__init__.py": ["/models/user/user.py", "/models/user/errors.py", "/models/user/decorator.py"], "/views/stores.py": ["/models/user/decorator.py", "/models/store.py", "/models/user/__init__.py"], "/models/alert.py": ["/models/model.py", "/models/item.py"], "/models/blog.py": ["/models/post.py", "/models/model.py"], "/models/post.py": ["/models/model.py"], "/models/item.py": ["/models/model.py"], "/views/blogs.py": ["/models/post.py", "/models/blog.py", "/models/user/__init__.py"], "/views/alerts.py": ["/models/alert.py", "/models/store.py", "/models/item.py", "/models/user/__init__.py"], "/views/users.py": ["/models/user/__init__.py"], "/models/store.py": ["/models/model.py"]}
9,197
jiwoongim/ft-SNE
refs/heads/master
/core.py
""" Code taken from https://raw.githubusercontent.com/hma02/thesne/master/model/tsne.py And then modified. """ import os, sys import theano.tensor as T import theano import numpy as np from utils import dist2hy import theano.sandbox.rng_mrg as RNG_MRG import theano.tensor.shared_randomstreams as RNG_TRG from theano.tensor.shared_randomstreams import RandomStreams RNG = np.random.RandomState(0) MRG = RNG_MRG.MRG_RandomStreams(RNG.randint(2 ** 30)) TRG = RNG_TRG.RandomStreams(seed=1234) epsilon = 1e-6 floath = np.float32 def sqeuclidean_var(X): N = X.shape[0] ss = (X ** 2).sum(axis=1) return ss.reshape((N, 1)) + ss.reshape((1, N)) - 2*X.dot(X.T) def discrete_sample(preds, num_sam, temperature=1.0): # function to sample an index from a probability array probas = TRG.choice(a=np.arange(3), size=[num_sam,], p=preds) return np.argmax(probas, axis=1) def euclidean2_np(X): N = X.shape[0] ss = np.sum(X**2, axis=1) dist = np.reshape(ss, [N, 1]) + np.reshape(ss, [1, N]) - 2*np.dot(X, X.T) dist = dist * np.asarray(dist>0,'float32') return dist def p_Xp_given_X_np(X, sigma, metric, approxF=0): N = X.shape[0] if metric == 'euclidean': sqdistance = euclidean2_np(X) elif metric == 'precomputed': sqdistance = X**2 else: raise Exception('Invalid metric') euc_dist = np.exp(-sqdistance / (np.reshape(2*(sigma**2), [N, 1]))) np.fill_diagonal(euc_dist, 0.0 ) if approxF > 0: sorted_euc_dist = euc_dist[:,:] np.sort(sorted_euc_dist, axis=1) row_sum = np.reshape(np.sum(sorted_euc_dist[:,1:approxF+1], axis=1), [N, 1]) else: row_sum = np.reshape(np.sum(euc_dist, axis=1), [N, 1]) return euc_dist/row_sum # Possibly dangerous def p_Xp_given_X_var(X, sigma, metric): N = X.shape[0] if metric == 'euclidean': sqdistance = sqeuclidean_var(X) elif metric == 'precomputed': sqdistance = X**2 else: raise Exception('Invalid metric') esqdistance = T.exp(-sqdistance / ((2 * (sigma**2)).reshape((N, 1)))) esqdistance_zd = T.fill_diagonal(esqdistance, 0) row_sum = T.sum(esqdistance_zd, axis=1).reshape((N, 1)) return esqdistance_zd/row_sum def p_Xp_X_var(p_Xp_given_X): return (p_Xp_given_X + p_Xp_given_X.T) / 2.0 def p_Yp_Y_var(Y): N = Y.shape[0] sqdistance = sqeuclidean_var(Y) one_over = T.fill_diagonal(1/(sqdistance + 1), 0) p_Yp_given_Y = one_over/one_over.sum(axis=1).reshape((N, 1)) return p_Yp_given_Y def p_Yp_Y_var_np(Y): N = Y.shape[0] sqdistance = euclidean2_np(Y) one_over = 1./(sqdistance + 1) p_Yp_given_Y = one_over/one_over.sum(axis=1).reshape((N, 1)) return p_Yp_given_Y def kl_cost_var(X, Y, sigma, metric): p_Xp_given_X = p_Xp_given_X_var(X, sigma, metric) PX = p_Xp_X_var(p_Xp_given_X) PY = p_Yp_Y_var(Y) PXc = T.maximum(PX, epsilon) PYc = T.maximum(PY, epsilon) return T.mean(T.sum(PX * T.log(PXc / PYc),-1)) def reverse_kl_cost_var(X, Y, sigma, metric): p_Xp_given_X = p_Xp_given_X_var(X, sigma, metric) PX = p_Xp_X_var(p_Xp_given_X) PY = p_Yp_Y_var(Y) PXc = T.maximum(PX, epsilon) PYc = T.maximum(PY, epsilon) return -T.mean(T.sum(PY * T.log(PXc / PYc),-1)) def js_cost_var(X, Y, sigma, metric): return kl_cost_var(X, Y, sigma, metric) * 0.5 + \ reverse_kl_cost_var(X, Y, sigma, metric) * 0.5 def chi_square_cost_var(X, Y, sigma, metric): p_Xp_given_X = p_Xp_given_X_var(X, sigma, metric) PX = p_Xp_X_var(p_Xp_given_X) PY = p_Yp_Y_var(Y) PXc = T.maximum(PX, epsilon) PYc = T.maximum(PY, epsilon) return T.mean(T.sum(PY * (PXc / PYc - 1.)**2, -1)) def hellinger_cost_var(X, Y, sigma, metric): p_Xp_given_X = p_Xp_given_X_var(X, sigma, metric) PX = p_Xp_X_var(p_Xp_given_X) PY = p_Yp_Y_var(Y) PXc = T.maximum(PX, epsilon) PYc = T.maximum(PY, epsilon) return T.mean(T.sum(PY * (T.sqrt(PXc / PYc) - 1.)**2,-1)) def find_sigma(X_shared, sigma_shared, N, perplexity, sigma_iters, metric, verbose=0): """Binary search on sigma for a given perplexity.""" X = T.fmatrix('X') sigma = T.fvector('sigma') target = np.log(perplexity) P = T.maximum(p_Xp_given_X_var(X, sigma, metric), epsilon) entropy = -T.sum(P*T.log(P), axis=1) # Setting update for binary search interval sigmin_shared = theano.shared(np.full(N, np.sqrt(epsilon), dtype=floath)) sigmax_shared = theano.shared(np.full(N, np.inf, dtype=floath)) sigmin = T.fvector('sigmin') sigmax = T.fvector('sigmax') upmin = T.switch(T.lt(entropy, target), sigma, sigmin) upmax = T.switch(T.gt(entropy, target), sigma, sigmax) givens = {X: X_shared, sigma: sigma_shared, sigmin: sigmin_shared, sigmax: sigmax_shared} updates = [(sigmin_shared, upmin), (sigmax_shared, upmax)] update_intervals = theano.function([], entropy, givens=givens, updates=updates) # Setting update for sigma according to search interval upsigma = T.switch(T.isinf(sigmax), sigma*2, (sigmin + sigmax)/2.) givens = {sigma: sigma_shared, sigmin: sigmin_shared, sigmax: sigmax_shared} updates = [(sigma_shared, upsigma)] update_sigma = theano.function([], sigma, givens=givens, updates=updates) for i in range(sigma_iters): e = update_intervals() update_sigma() if verbose: print('Iteration: {0}.'.format(i+1)) print('Perplexities in [{0:.4f}, {1:.4f}].'.format(np.exp(e.min()), np.exp(e.max()))) if np.any(np.isnan(np.exp(e))): raise Exception('Invalid sigmas. The perplexity is probably too low.') def find_sigma_np(X, sigma, N, perplexity, sigma_iters, metric, verbose=1, approxF=0): """Binary search on sigma for a given perplexity.""" target = np.log(perplexity) # Setting update for binary search interval sigmin = np.full(N, np.sqrt(epsilon), dtype='float32') sigmax = np.full(N, np.inf, dtype='float32') for i in range(sigma_iters): P = np.maximum(p_Xp_given_X_np(X, sigma, metric, approxF), epsilon) entropy = -np.sum(P*np.log(P), axis=1) minind = np.argwhere(entropy < target).flatten() maxind = np.argwhere(entropy > target).flatten() sigmin[minind] = sigma[minind] sigmax[maxind] = sigma[maxind] infmask = np.argwhere(np.isinf(sigmax)).flatten() old_sigma = sigma[infmask] sigma = (sigmin + sigmax)/2. sigma[infmask] = old_sigma*2 if verbose: print('Iteration: {0}.'.format(i+1)) print('Perplexities in [{0:.4f}, {1:.4f}].'.format(np.exp(entropy.min()), np.exp(entropy.max()))) if np.any(np.isnan(np.exp(entropy))): raise Exception('Invalid sigmas. The perplexity is probably too low.') return sigma if __name__ == '__main__': asdf = discrete_sample(np.asarray([0.3,0.2,0.5]), 1000) import pdb; pdb.set_trace()
{"/core.py": ["/utils.py"], "/utils_sne.py": ["/utils.py", "/core.py"]}
9,198
jiwoongim/ft-SNE
refs/heads/master
/utils_sne.py
import os, sys, gzip, pickle, cPickle import matplotlib matplotlib.use('Agg') import matplotlib.cm as cm import matplotlib.pyplot as plt import numpy as np from utils import unpickle from core import p_Xp_given_X_np, p_Yp_Y_var_np import matplotlib.cm as cm import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D def plot_map_news(xx, colors, color_dict, fname): plt.figure() ax = plt.subplot(111) area = np.pi * 4 #* (15 * np.random.rand(N))**2 # 0 to 15 point radii #jfor i, x in enumerate(xx): #j plt.scatter(xx[i,0], xx[i,1], s=area, c=colors[i], alpha=0.5, cmap=plt.cm.Spectral) for i, x in enumerate(xx): plt.scatter(x[0], x[1], s=area, c=color_dict[colors[i]], alpha=0.7, facecolor='0.8', lw = 0) box = ax.get_position() ax.set_position([box.x0, box.y0, box.width * 1., box.height]) ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.1), fancybox=True, shadow=True, ncol=3) plt.axis('off') plt.savefig(fname, bbox_inches='tight', format='pdf') def plot_map_c(xx, colors, fname): plt.figure() ax = plt.subplot(111) area = np.pi * 4 #* (15 * np.random.rand(N))**2 # 0 to 15 point radii #jfor i, x in enumerate(xx): #j plt.scatter(xx[i,0], xx[i,1], s=area, c=colors[i], alpha=0.5, cmap=plt.cm.Spectral) plt.scatter(xx[:,0], xx[:,1], s=area, c=colors, alpha=1.0, cmap=plt.cm.Spectral, \ facecolor='0.5', lw = 0) box = ax.get_position() ax.set_position([box.x0, box.y0, box.width * 1., box.height]) ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.1), fancybox=True, shadow=True, ncol=3) plt.axis('off') plt.savefig(fname, bbox_inches='tight', format='pdf') def plot1D(xx, colors, fname): plt.figure() ax = plt.subplot(111) area = np.pi * 5 #* (15 * np.random.rand(N))**2 # 0 to 15 point radii #jfor i, x in enumerate(xx): #j plt.scatter(xx[i,0], xx[i,1], s=area, c=colors[i], alpha=0.5, cmap=plt.cm.Spectral) #plt.plot(xx, c=colorVal, alpha=0.9, lw = 0) dummy = np.zeros_like(xx) plt.scatter(xx, dummy, s=area, c=colors, alpha=0.9, cmap=plt.cm.Spectral, facecolor='0.5', lw = 0) box = ax.get_position() ax.set_position([box.x0, box.y0, box.width * 1., box.height]) ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.1), fancybox=True, shadow=True, ncol=3) plt.savefig(fname, bbox_inches='tight', format='pdf') def plot3D(xx, colors, fname): fig = plt.figure() ax = fig.add_subplot(111, projection='3d') area = np.pi *5 #* (15 * np.random.rand(N))**2 # 0 to 15 point radii ax.scatter(xx[:,0], xx[:,1], xx[:,2], c=colors, s=area, alpha=0.5, cmap=plt.cm.Spectral, \ facecolor='0.5', lw = 0) box = ax.get_position() ax.set_position([box.x0, box.y0, box.width * 1., box.height]) ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.1), fancybox=True, shadow=True, ncol=3) plt.axis('off') plt.savefig(fname, bbox_inches='tight', format='pdf', transparent=True) def precision_K(p_sorted_ind, q_sorted_ind, Ks, K=3): p_sorted_ind = p_sorted_ind[:, :K] q_sorted_ind = q_sorted_ind[:, :K] N = p_sorted_ind.shape[0] accuracy = np.zeros((N,len(Ks))) # For each point in x compute the distance of K points in P and Q for j,kk in enumerate(Ks): for i in xrange(N): for k in xrange(kk): ind_k = q_sorted_ind[i, k] tmp_k = np.argwhere(ind_k == p_sorted_ind[i,:kk]).flatten() if tmp_k.shape[0] > 0: accuracy[i,j] += 1.0 # Count the number of correct indices outputs = [] for jj in xrange(len(Ks)): outputs += [[np.mean(accuracy[:,jj]), np.std(accuracy[:,jj])]] return outputs def K_neighbours(data, maxK=10, revF=False, sigma=None): from utils import dist2hy_np #dists = dist2hy_np(data, data) if sigma is not None: dists = p_Xp_given_X_np(data, sigma, 'euclidean') else: dists = p_Yp_Y_var_np(data) N, _ = dists.shape sorted_ind_p = np.zeros((N,maxK), dtype='int32') for i in xrange(N):sorted_ind_p[i,:] = np.argsort(dists[i,:])[1:maxK+1] if revF: sorted_ind_p = sorted_ind_p[:,::-1] return sorted_ind_p, dists def neighbour_accuracy_K(data, labels, Ks, maxK=10): #from utils import dist2hy_np #dists = dist2hy_np(data, data) N, _ = data.shape fractions = [] for i in xrange(N): #ind_sort = np.argsort(dists[i,:])[1:maxK+1] ind_sort = data[i,:] label = labels[i] neighbor_labels = labels[ind_sort] fraction = np.asarray(neighbor_labels == label) * 1.0 fractions.append(fraction) fractions = np.asarray(fractions) output = [] for K in Ks: output += [np.mean(np.sum(fractions[:,:K], axis=1) / K), \ np.std(np.sum(fractions[:,:K], axis=1) / K)] return output def get_iris_data(): data, label = [], [] f = open('/groups/branson/home/imd/Documents/data/embedding_data/iris.txt', 'r') line = f.readline() data.append(line[:-1]) label.append(line[-1]) while line.strip() != '': line = f.readline() data.append(line[:-1]) label.append(line[-1]) return np.asarray(data), np.asarrya(label)
{"/core.py": ["/utils.py"], "/utils_sne.py": ["/utils.py", "/core.py"]}
9,199
jiwoongim/ft-SNE
refs/heads/master
/run.py
import os, sys, gzip, pickle, cPickle, argparse import matplotlib matplotlib.use('Agg') import matplotlib.cm as cm import matplotlib.pyplot as plt import numpy as np from tsne import tsne from utils import unpickle, plot_map from utils_sne import precision_K, K_neighbours from sklearn.decomposition import PCA RNG = np.random.RandomState(0) def parse_args(): desc = "Pytorch implementation of AAE collections" parser = argparse.ArgumentParser(description=desc) parser.add_argument('--dataset_path', type=str, \ default='./data/',\ help='Dataset directory') parser.add_argument('--divtypet', type=str, default='kl', \ choices=['kl','rkl','js','hl', 'ch'], help='Choose your f-divergence') parser.add_argument('--perplexity_tsne', type=int, default=100, \ help='Perplexity') return parser.parse_args() if __name__ == '__main__': args = parse_args() divtypet = args.divtypet dataset_path = args.dataset_path perplexity_tsne = args.perplexity_tsne dataset_path = dataset_path data = np.load(dataset_path+'/data.npy') label = np.load(dataset_path+'/label.npy') datatype='mydata' pca = PCA(n_components=30) pcastr = 'pca30' data = pca.fit(data).transform(data) perm = RNG.permutation(data.shape[0]) data = data [perm][:6000] color= label[perm][:6000] initial_momentum=0.5 n_epochs_tsne=2000; if divtypet=='hl': initial_lr_tsne=300 momentum_switch=200 lrDecay=100 elif divtypet=='ch': initial_lr_tsne=10; momentum_switch=200 lrDecay=100 elif divtypet=='rkl': initial_lr_tsne=1000; momentum_switch=200 lrDecay=100 elif divtypet=='js': initial_lr_tsne=1000; momentum_switch=200 lrDecay=100 else: initial_lr_tsne=2500 momentum_switch=200 lrDecay=100 print 'Divtype %s, Perplexity %d' % (divtypet, perplexity_tsne) fname = '/'+datatype+'/'+divtypet+'/tsne_'+str(perplexity_tsne)+'perp'+str(n_epochs_tsne)+'epoch_initlr'+str(initial_lr_tsne)+pcastr projX = tsne(data, initial_lr=initial_lr_tsne, \ final_lr=initial_lr_tsne,\ lrDecay=lrDecay,\ initial_momentum=initial_momentum,\ momentum_switch=momentum_switch,\ perplexity=perplexity_tsne, \ n_epochs=n_epochs_tsne, fname=fname, \ color=color, divtype=divtypet, datatype=datatype) print(fname) pass
{"/core.py": ["/utils.py"], "/utils_sne.py": ["/utils.py", "/core.py"]}
9,200
jiwoongim/ft-SNE
refs/heads/master
/main.py
import os, sys, gzip, pickle, cPickle, argparse import matplotlib matplotlib.use('Agg') import matplotlib.cm as cm import matplotlib.pyplot as plt import numpy as np from tsne import tsne from utils import unpickle, plot_map from utils_sne import precision_K, K_neighbours from sklearn.decomposition import PCA RNG = np.random.RandomState(0) def parse_args(): desc = "Pytorch implementation of AAE collections" parser = argparse.ArgumentParser(description=desc) parser.add_argument('--datatype', type=str, default='mnist', \ choices=['mnist','mnist1','face','news'], help='The name of dataset') parser.add_argument('--dataset_path', type=str, \ default='./data/',\ help='Dataset directory') parser.add_argument('--divtypet', type=str, default='kl', \ choices=['kl','rkl','js','hl', 'ch'], help='Choose your f-divergence') parser.add_argument('--perplexity_tsne', type=int, default=100, \ help='Perplexity') return parser.parse_args() if __name__ == '__main__': args = parse_args() divtypet = args.divtypet dataset_path = args.dataset_path perplexity_tsne = args.perplexity_tsne if args.datatype == 'mnist': dataset_path = dataset_path + '/mnist.pkl.gz' f = gzip.open(dataset_path, 'rb') train_set_np, valid_set_np, test_set_np = cPickle.load(f) ind0 = np.argwhere(train_set_np[1] == 0).flatten() ind1 = np.argwhere(train_set_np[1] == 1).flatten() ind2 = np.argwhere(train_set_np[1] == 2).flatten() ind3 = np.argwhere(train_set_np[1] == 4).flatten() ind4 = np.argwhere(train_set_np[1] == 5).flatten() ind = np.concatenate([ind0, ind1, ind2, ind3, ind4]) data = train_set_np[0][ind] label= train_set_np[1][ind] pca = PCA(n_components=30) pcastr = 'pca30_5class' data = pca.fit(data).transform(data) perm = RNG.permutation(data.shape[0]) data = data [perm][:6000] color= label[perm][:6000] initial_momentum=0.5 n_epochs_tsne=2000; if divtypet=='hl': initial_lr_tsne=300 momentum_switch=200 lrDecay=100 elif divtypet=='ch': initial_lr_tsne=10; momentum_switch=200 lrDecay=100 elif divtypet=='rkl': initial_lr_tsne=1000; momentum_switch=200 lrDecay=100 elif divtypet=='js': initial_lr_tsne=1000; momentum_switch=200 lrDecay=100 else: initial_lr_tsne=2500 momentum_switch=200 lrDecay=100 elif args.datatype == 'mnist1': dataset_path = dataset_path + '/MNIST/mnist.pkl.gz' f = gzip.open(dataset_path, 'rb') train_set_np, valid_set_np, test_set_np = cPickle.load(f) ind = np.argwhere(train_set_np[1] == 1).flatten() data = train_set_np[0][ind] label= train_set_np[1][ind] pca = PCA(n_components=30) pcastr = 'pca30_1class' data = pca.fit(data).transform(data) perm = RNG.permutation(data.shape[0]) data = data [perm][:5000] color= label[perm][:5000] initial_momentum=0.5; momentum_switch=200 n_epochs_tsne=200; if divtypet=='hl': initial_lr_tsne=300 lrDecay=100 elif divtypet=='ch': initial_lr_tsne=5; momentum_switch=1 lrDecay=100 elif divtypet=='rkl': initial_lr_tsne=1000; lrDecay=100 elif divtypet=='js': initial_lr_tsne=1000; lrDecay=100 else: initial_lr_tsne=1000 lrDecay=100 elif args.datatype == 'face': import scipy.io as sio mat_contents = sio.loadmat(dataset_path+'/face_data.mat') data = mat_contents['images'].T light = (mat_contents['lights'].T - mat_contents['lights'].T.min()) / mat_contents['lights'].T.max() poses = (mat_contents['poses'].T - mat_contents['poses'].T.min()) / (mat_contents['poses'].T.max() - mat_contents['poses'].T.min()) color = poses[:,0] n_epochs_tsne=1000; pcastr = 'pose1' if divtypet=='hl': initial_momentum=0.5 initial_lr_tsne=100 momentum_switch=100 lrDecay=10.0 elif divtypet=='ch': initial_momentum=0.5 initial_lr_tsne=100 momentum_switch=100 lrDecay=10 elif divtypet=='rkl': initial_momentum=0.5 initial_lr_tsne=1000; momentum_switch=25 lrDecay=50 elif divtypet=='js': initial_momentum=0.5 initial_lr_tsne=1000; momentum_switch=200 lrDecay=100 else: initial_momentum=0.5 initial_lr_tsne=1000 momentum_switch=200 lrDecay=100 elif args.datatype == 'news': from sklearn.datasets import fetch_20newsgroups from sklearn.feature_extraction.text import TfidfVectorizer categories = ['rec.autos', 'rec.motorcycles', 'rec.sport.baseball', 'rec.sport.hockey', \ 'sci.crypt', 'sci.electronics', 'sci.med', 'sci.space', 'soc.religion.christian', \ 'talk.politics.guns', 'talk.politics.mideast', 'talk.politics.misc', 'talk.religion.misc'] newsgroups_train = fetch_20newsgroups(subset='train', categories=categories) vectorizer = TfidfVectorizer() data = vectorizer.fit_transform(newsgroups_train.data).todense().astype('float32') color = newsgroups_train.target pca = PCA(n_components=30) pcastr = '_pca30_3hier' data = pca.fit(data).transform(data) data, color = data[:6000], color[:6000] data = data / (data.max()-data.min()) n_epochs_tsne=300; if divtypet=='hl': initial_momentum=0.5 initial_lr_tsne=100 momentum_switch=200 lrDecay=5 elif divtypet=='ch': initial_momentum=0.5 initial_lr_tsne=100 momentum_switch=200 lrDecay=100 elif divtypet=='rkl': initial_momentum=0.5 initial_lr_tsne=1000 momentum_switch=100 lrDecay=25 elif divtypet=='js': initial_momentum=0.5 initial_lr_tsne=3000; momentum_switch=200 lrDecay=100 else: initial_momentum=0.5 initial_lr_tsne=1500 momentum_switch=200 lrDecay=100 print 'Divtype %s, Perplexity %d' % (divtypet, perplexity_tsne) fname = args.datatype+'/'+divtypet+'/tsne_'+str(perplexity_tsne)+'perp'+str(n_epochs_tsne)+'epoch_initlr'+str(initial_lr_tsne)+pcastr projX = tsne(data, initial_lr=initial_lr_tsne, \ final_lr=initial_lr_tsne,\ lrDecay=lrDecay,\ initial_momentum=initial_momentum,\ momentum_switch=momentum_switch,\ perplexity=perplexity_tsne, \ n_epochs=n_epochs_tsne, fname=fname, \ color=color, divtype=divtypet, datatype=args.datatype) print(fname) pass
{"/core.py": ["/utils.py"], "/utils_sne.py": ["/utils.py", "/core.py"]}
9,201
jiwoongim/ft-SNE
refs/heads/master
/utils.py
''' Version 1.000 Code provided by Daniel Jiwoong Im Permission is granted for anyone to copy, use, modify, or distribute this program and accompanying programs and documents for any purpose, provided this copyright notice is retained and prominently displayed, along with a note saying that the original programs are available from our web page. The programs and documents are distributed without any warranty, express or implied. As the programs were written for research purposes only, they have not been tested to the degree that would be advisable in any important application. All use of these programs is entirely at the user's own risk.''' import os, sys, cPickle, math, pylab #, PIL import matplotlib as mp import matplotlib.pyplot as plt import numpy as np from numpy.lib import stride_tricks import theano import theano.tensor as T from theano.tensor.shared_randomstreams import RandomStreams import theano.sandbox.rng_mrg as RNG_MRG #from subnets.layers.utils import rng rng = np.random.RandomState(0) MRG = RNG_MRG.MRG_RandomStreams(rng.randint(2 ** 30)) def plot_map(xx, fname): plt.figure() ax = plt.subplot(111) area = np.pi colors = cm.rainbow(np.linspace(0, 1, len(xx))) for i, x in enumerate(xx): plt.scatter(x[:,0], x[:,1], s=area, c=colors[i, :], alpha=0.8, cmap=plt.cm.Spectral, \ facecolor='0.5', lw = 0) box = ax.get_position() ax.set_position([box.x0, box.y0, box.width * 1., box.height]) ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.1), fancybox=True, shadow=True, ncol=3) plt.savefig(fname, bbox_inches='tight', format='pdf') def divide_by_labels(xx, yy, num_class=10): xx_list = [] for i in xrange(num_class): indice = np.argwhere(yy==i).flatten() xx_list.append(xx[indice]) return xx_list def prob_K_per(prob, Ks): N = prob.shape[0] sorted_prob_ind = np.argsort(prob, axis=1)[:,::-1] probKs = [] for k in Ks: probK = prob[j, sorted_prob_ind[:,k]] probKs.append([np.mean(probK, axis=0), np.std(probK, axis=0)]) probKs = np.asarray(probKs) return probKs def uncompress_sparseMatrix(matrice): data = []; labels = [] n = matrice.shape[0] for i in xrange(n): data.append(matrice[i][0].todense()) labels.append(np.ones(matrice[i][0].shape[0]) * i) data = np.vstack(data).astype('float32') perm = rng.permutation(data.shape[0]) labels = np.hstack(labels) return data[perm], labels[perm] def floatX(X): return np.asarray(X, dtype=theano.config.floatX) def conv_cond_concat(x, y): """ concatenate conditioning vector on feature map axis """ return T.concatenate([x, y*T.ones((x.shape[0], y.shape[1], x.shape[2], x.shape[3]))], axis=1) def init_conv_weights(W_low, W_high, filter_shape, numpy_rng, rng_dist='normal'): """ initializes the convnet weights. """ if 'uniform' in rng_dist: return np.asarray( numpy_rng.uniform(low=W_low, high=W_high, size=filter_shape), dtype=theano.config.floatX) elif rng_dist == 'normal': return 0.01 * numpy_rng.normal(size=filter_shape).astype(theano.config.floatX) def initialize_weight(n_vis, n_hid, W_name, numpy_rng, rng_dist): """ """ if 'uniform' in rng_dist: W = numpy_rng.uniform(low=-np.sqrt(6. / (n_vis + n_hid)),\ high=np.sqrt(6. / (n_vis + n_hid)), size=(n_vis, n_hid)).astype(theano.config.floatX) elif rng_dist == 'normal': W = 0.01 * numpy_rng.normal(size=(n_vis, n_hid)).astype(theano.config.floatX) elif rng_dist == 'ortho': ### Note that this only works for square matrices N_ = int(n_vis / float(n_hid)) sz = np.minimum(n_vis, n_hid) W = np.zeros((n_vis, n_hid), dtype=theano.config.floatX) for i in xrange(N_): temp = 0.01 * numpy_rng.normal(size=(sz, sz)).astype(theano.config.floatX) W[:, i*sz:(i+1)*sz] = sp.linalg.orth(temp) return theano.shared(value = np.cast[theano.config.floatX](W), name=W_name) def init_uniform(shape, rng, scale=0.05, name='W'): return theano.shared(rng.uniform(low=-scale, high=scale, size=shape).astype('float32'), name=name) '''Initialize the bias''' def initialize_bias(n, b_name): return theano.shared(value = np.cast[theano.config.floatX](np.zeros((n,)), \ dtype=theano.config.floatX), name=b_name) def init_zero(shape, dtype=theano.config.floatX, name=None): return theano.shared(np.zeros(shape, dtype='float32'), name=name) '''Convolve Gaussian filters''' def convolve2D(F1,F2, Z): Fz = (F1.dimshuffle([0,1,2,'x']) * Z.dimshuffle([0,'x',1,2])).sum(axis=-2) FzF = (Fz.dimshuffle([0,1,2,'x']) * F2.dimshuffle([0,'x',1,2])).sum(axis=-2) return FzF def unpickle(path): ''' For cifar-10 data, it will return dictionary''' #Load the cifar 10 f = open(path, 'rb') data = cPickle.load(f) f.close() return data def share_input(x): return theano.shared(np.asarray(x, dtype=theano.config.floatX)) def shared_dataset(data_xy): """ Function that loads the dataset into shared variables The reason we store our dataset in shared variables is to allow Theano to copy it into the GPU memory (when code is run on GPU). Since copying data into the GPU is slow, copying a minibatch everytime is needed (the default behaviour if the data is not in a shared variable) would lead to a large decrease in performance. """ data_x, data_y = data_xy shared_x = theano.shared(np.asarray(data_x, dtype=theano.config.floatX)) shared_y = theano.shared(np.asarray(data_y, dtype=theano.config.floatX)) #When storing data on the GPU it has to be stored as floats # therefore we will store the labels as ``floatX`` as well # (``shared_y`` does exactly that). But during our computations # we need them as ints (we use labels as index, and if they are # floats it doesn't make sense) therefore instead of returning # ``shared_y`` we will have to cast it to int. This little hack # lets us get around this issue return shared_x, T.cast(shared_y, 'int32') def repmat_tensor(x,k): return T.tile(x.dimshuffle([0,1, 2,'x']), [1,1,1,k]) def repmat_vec(x,k): return T.tile(x.dimshuffle([0,'x']), [1,k]).T def activation_fn_th(X,atype='sigmoid', leak_thrd=0.2): '''collection of useful activation functions''' if atype == 'softmax': return T.nnet.softmax(X) elif atype == 'sigmoid': return T.nnet.sigmoid(X) elif atype == 'tanh': return T.tanh(X) elif atype == 'softplus': return T.nnet.softplus(X) elif atype == 'relu': return (X + abs(X)) / 2.0 elif atype == 'linear': return X elif atype =='leaky': f1 = 0.5 * (1 + leak_thrd) f2 = 0.5 * (1 - leak_thrd) return f1 * X + f2 * abs(X) elif atype == 'elu': return T.switch(X > 0, X, T.expm1(X)) elif atype =='selu': alpha = 1.6732632423543772848170429916717 scale = 1.0507009873554804934193349852946 return scale*T.where(X>=0.0, X, alpha*T.switch(X > 0, X, T.expm1(X))) def save_the_weight(x,fname): '''save pickled weights''' f = file(fname+'.save', 'wb') cPickle.dump(x, f, protocol=cPickle.HIGHEST_PROTOCOL) print("saved!") f.close() def save_the_numpy_params(model,size,rank,epoch, model_path): tmp = [] for param in model.gen_network.params: if rank==0: print param.get_value().shape tmp.append(param.get_value()) np.save(model_path+'/%d%dgen_params_e%d.npy' % (size, rank, epoch),tmp) # comm.Barrier() print 'saved' # exit(0) '''Display the data. data - n_dim X 3 , n_dim = dim_x * dim_y ''' def display_data(data, img_sz, RGB_flag=False, ): if RGB_flag: pic = data.reshape(img_sz[0],img_sz[1],3) else: pic = data.reshape(img_sz[0],img_sz[1]) plt.figure() plt.imshow(pic, cmap='gray') '''Display dataset as a tiles''' def display_dataset(data, patch_sz, tile_shape, scale_rows_to_unit_interval=False, \ binary=False, i=1, fname='dataset'): x = tile_raster_images(data, img_shape=patch_sz, \ tile_shape=tile_shape, tile_spacing=(1,1), output_pixel_vals=False, scale_rows_to_unit_interval=scale_rows_to_unit_interval) if binary: x[x==1] = 255 ## For MNIST if fname != None: plt.figure() plt.imshow(x,cmap='gray') plt.axis('off') plt.savefig(fname+'.png', bbox_inches='tight') else: plt.figure() plt.imshow(x,cmap='gray') plt.axis('off') plt.show(block=True) def scale_to_unit_interval(ndar, eps=1e-8): """ Scales all values in the ndarray ndar to be between 0 and 1 """ ndar = ndar.copy() ndar -= ndar.min() ndar *= 1.0 / (ndar.max() + eps) return ndar def tile_raster_images(X, img_shape, tile_shape, tile_spacing=(0, 0), scale_rows_to_unit_interval=False, output_pixel_vals=True): """ Transform an array with one flattened image per row, into an array in which images are reshaped and layed out like tiles on a floor. This function is useful for visualizing datasets whose rows are images, and also columns of matrices for transforming those rows (such as the first layer of a neural net). :type X: a 2-D ndarray or a tuple of 4 channels, elements of which can be 2-D ndarrays or None; :param X: a 2-D array in which every row is a flattened image. :type img_shape: tuple; (height, width) :param img_shape: the original shape of each image :type tile_shape: tuple; (rows, cols) :param tile_shape: the number of images to tile (rows, cols) :param output_pixel_vals: if output should be pixel values (i.e. int8 values) or floats :param scale_rows_to_unit_interval: if the values need to be scaled before being plotted to [0,1] or not :returns: array suitable for viewing as an image. (See:`PIL.Image.fromarray`.) :rtype: a 2-d array with same dtype as X. """ assert len(img_shape) == 2 assert len(tile_shape) == 2 assert len(tile_spacing) == 2 # The expression below can be re-written in a more C style as # follows : # # out_shape = [0,0] # out_shape[0] = (img_shape[0]+tile_spacing[0])*tile_shape[0] - # tile_spacing[0] # out_shape[1] = (img_shape[1]+tile_spacing[1])*tile_shape[1] - # tile_spacing[1] out_shape = [(ishp + tsp) * tshp - tsp for ishp, tshp, tsp in zip(img_shape, tile_shape, tile_spacing)] if isinstance(X, tuple): assert len(X) == 4 # Create an output numpy ndarray to store the image if output_pixel_vals: out_array = np.zeros((out_shape[0], out_shape[1], 4), dtype='uint8') else: out_array = np.zeros((out_shape[0], out_shape[1], 4), dtype=X[0].dtype) #colors default to 0, alpha defaults to 1 (opaque) if output_pixel_vals: channel_defaults = [0, 0, 0, 255] else: channel_defaults = [0., 0., 0., 1.] for i in xrange(4): if X[i] is None: # if channel is None, fill it with zeros of the correct # dtype dt = out_array.dtype if output_pixel_vals: dt = 'uint8' out_array[:, :, i] = np.zeros(out_shape, dtype=dt) + channel_defaults[i] else: # use a recurrent call to compute the channel and store it # in the output out_array[:, :, i] = tile_raster_images( X[i], img_shape, tile_shape, tile_spacing, scale_rows_to_unit_interval, output_pixel_vals) return out_array else: # if we are dealing with only one channel H, W = img_shape Hs, Ws = tile_spacing # generate a matrix to store the output dt = X.dtype if output_pixel_vals: dt = 'uint8' out_array = np.zeros(out_shape, dtype=dt) for tile_row in xrange(tile_shape[0]): for tile_col in xrange(tile_shape[1]): #print tile_row, tile_shape[1], tile_col, X.shape[0] #print tile_row * tile_shape[1] + tile_col < X.shape[0] if tile_row * tile_shape[1] + tile_col < X.shape[0]: this_x = X[tile_row * tile_shape[1] + tile_col] #print this_x #print scale_rows_to_unit_interval if scale_rows_to_unit_interval: # if we should scale values to be between 0 and 1 # do this by calling the `scale_to_unit_interval` # function this_img = scale_to_unit_interval( this_x.reshape(img_shape)) #print this_x.shape #print this_img else: this_img = this_x.reshape(img_shape) # add the slice to the corresponding position in the # output array #print this_x.shape #print this_img c = 1 if output_pixel_vals: c = 255 out_array[ tile_row * (H + Hs): tile_row * (H + Hs) + H, tile_col * (W + Ws): tile_col * (W + Ws) + W ] = this_img * c return out_array def corrupt_input(rng, input, corruption_level, ntype='gaussian'): return input + rng.normal(size = input.shape, loc = 0.0, scale= corruption_level) def get_corrupted_input(rng, input, corruption_level, ntype='zeromask'): ''' depending on requirement, returns input corrupted by zeromask/gaussian/salt&pepper''' MRG = RNG_MRG.MRG_RandomStreams(rng.randint(2 ** 30)) #theano_rng = RandomStreams() if corruption_level == 0.0: return input if ntype=='zeromask': return MRG.binomial(size=input.shape, n=1, p=1-corruption_level,dtype=theano.config.floatX) * input elif ntype=='gaussian': return input + MRG.normal(size = input.shape, avg = 0.0, std = corruption_level, dtype = theano.config.floatX) elif ntype=='salt_pepper': # salt and pepper noise print 'DAE uses salt and pepper noise' a = MRG.binomial(size=input.shape, n=1,\ p=1-corruption_level,dtype=theano.config.floatX) b = MRG.binomial(size=input.shape, n=1,\ p=corruption_level,dtype=theano.config.floatX) c = T.eq(a,0) * b return input * a + c ''' improving learning rate''' def get_epsilon_inc(epsilon, n, i): """ n: total num of epoch i: current epoch num """ return epsilon / ( 1 - i/float(n)) '''decaying learning rate''' def get_epsilon(epsilon, n, i): """ n: total num of epoch i: current epoch num """ return epsilon / ( 1 + i/float(n)) def get_epsilon_decay(i, num_epoch, constant=4): c = np.log(num_epoch/2)/ np.log(constant) return 10.**(1-(i-1)/(float(c))) '''Given tiles of raw data, this function will return training, validation, and test sets. r_train - ratio of train set r_valid - ratio of valid set r_test - ratio of test set''' def gen_train_valid_test(raw_data, raw_target, r_train, r_valid, r_test): N = raw_data.shape[0] perms = np.random.permutation(N) raw_data = raw_data[perms,:] raw_target = raw_target[perms] tot = float(r_train + r_valid + r_test) #Denominator p_train = r_train / tot #train data ratio p_valid = r_valid / tot #valid data ratio p_test = r_test / tot #test data ratio n_raw = raw_data.shape[0] #total number of data n_train =int( math.floor(n_raw * p_train)) # number of train n_valid =int( math.floor(n_raw * p_valid)) # number of valid n_test =int( math.floor(n_raw * p_test) ) # number of test train = raw_data[0:n_train, :] valid = raw_data[n_train:n_train+n_valid, :] test = raw_data[n_train+n_valid: n_train+n_valid+n_test,:] train_target = raw_target[0:n_train] valid_target = raw_target[n_train:n_train+n_valid] test_target = raw_target[n_train+n_valid: n_train+n_valid+n_test] print 'Among ', n_raw, 'raw data, we generated: ' print train.shape[0], ' training data' print valid.shape[0], ' validation data' print test.shape[0], ' test data\n' train_set = [train, train_target] valid_set = [valid, valid_target] test_set = [test, test_target] return [train_set, valid_set, test_set] def dist2hy(x,y): '''Distance matrix computation Hybrid of the two, switches based on dimensionality ''' d = T.dot(x,y.T) d *= -2.0 d += T.sum(x*x, axis=1).dimshuffle(0,'x') d += T.sum(y*y, axis=1) # Rounding errors occasionally cause negative entries in d d = d * T.cast(d>0,theano.config.floatX) return d def dist2hy_np(x,y): '''Distance matrix computation Hybrid of the two, switches based on dimensionality ''' d = np.dot(x,y.T) d *= -2.0 d += np.sum(x*x, axis=1)[:,None] d += np.sum(y*y, axis=1) # Rounding errors occasionally cause negative entries in d d = d * np.asarray(d>0,'float32') return np.sqrt(d) def save_the_env(dir_to_save, path): import fnmatch import os matches = [] for root, dirnames, filenames in os.walk(dir_to_save): for extension in ('*.py', '*.sh'): for filename in fnmatch.filter(filenames, extension): matches.append(os.path.join(root, filename)) # print matches # print 'creating archive' import tarfile out = tarfile.open('env.tar', mode='w') try: # print 'adding files into tar' for f in matches: out.add(f) except Exception as e: raise e # print 'closing' out.close() import shutil tar_to_save = 'env.tar' shutil.copy2(tar_to_save, path)
{"/core.py": ["/utils.py"], "/utils_sne.py": ["/utils.py", "/core.py"]}
9,202
jiwoongim/ft-SNE
refs/heads/master
/tsne.py
""" Code taken from https://github.com/hma02/thesne/blob/master/model/tsne.py And then modified. """ import os, sys import numpy as np import theano import theano.tensor as T from sklearn.utils import check_random_state from core import kl_cost_var, reverse_kl_cost_var, js_cost_var, \ hellinger_cost_var, chi_square_cost_var, \ p_Yp_Y_var_np, floath, find_sigma from utils import get_epsilon from utils_sne import precision_K, K_neighbours, neighbour_accuracy_K, plot_map_c, plot_map_news def tsne(X, perplexity=30, Y=None, output_dims=2, n_epochs=1000, initial_lr=1000, final_lr=50, lr_switch=250, init_stdev=1e-3, sigma_iters=50, initial_momentum=0.95, final_momentum=0.0, lrDecay=100,\ momentum_switch=250, metric='euclidean', random_state=None, verbose=1, fname=None, color=None, divtype='kl', num_folds=2, datatype='mnist'): """Compute projection from a matrix of observations (or distances) using t-SNE. Parameters ---------- X : array-like, shape (n_observations, n_features), \ or (n_observations, n_observations) if `metric` == 'precomputed'. Matrix containing the observations (one per row). If `metric` is 'precomputed', pairwise dissimilarity (distance) matrix. perplexity : float, optional (default = 30) Target perplexity for binary search for sigmas. Y : array-like, shape (n_observations, output_dims), optional \ (default = None) Matrix containing the starting position for each point. output_dims : int, optional (default = 2) Target dimension. n_epochs : int, optional (default = 1000) Number of gradient descent iterations. initial_lr : float, optional (default = 2400) The initial learning rate for gradient descent. final_lr : float, optional (default = 200) The final learning rate for gradient descent. lr_switch : int, optional (default = 250) Iteration in which the learning rate changes from initial to final. This option effectively subsumes early exaggeration. init_stdev : float, optional (default = 1e-4) Standard deviation for a Gaussian distribution with zero mean from which the initial coordinates are sampled. sigma_iters : int, optional (default = 50) Number of binary search iterations for target perplexity. initial_momentum : float, optional (default = 0.5) The initial momentum for gradient descent. final_momentum : float, optional (default = 0.8) The final momentum for gradient descent. momentum_switch : int, optional (default = 250) Iteration in which the momentum changes from initial to final. metric : 'euclidean' or 'precomputed', optional (default = 'euclidean') Indicates whether `X` is composed of observations ('euclidean') or distances ('precomputed'). random_state : int or np.RandomState, optional (default = None) Integer seed or np.RandomState object used to initialize the position of each point. Defaults to a random seed. verbose : bool (default = 1) Indicates whether progress information should be sent to standard output. Returns ------- Y : array-like, shape (n_observations, output_dims) Matrix representing the projection. Each row (point) corresponds to a row (observation or distance to other observations) in the input matrix. """ N = X.shape[0] X_shared = theano.shared(np.asarray(X, dtype=floath)) sigma_shared = theano.shared(np.ones(N, dtype=floath)) find_sigma(X_shared, sigma_shared, N, perplexity, sigma_iters, metric, verbose) sorted_ind_p, pdist = K_neighbours(X, sigma=sigma_shared.get_value(), maxK=10) rev_sorted_ind_p, pdist = K_neighbours(X, maxK=100, revF=True, sigma=sigma_shared.get_value()) figs_path = './figs/'+datatype+'/'+divtype result_path = './results/'+datatype+'/'+divtype embedd_path = './embeddings/'+datatype+'/'+divtype if not os.path.exists(figs_path): os.makedirs(figs_path) if not os.path.exists(result_path): os.makedirs(result_path) if not os.path.exists(embedd_path): os.makedirs(embedd_path) np.save(result_path+'/'+datatype+'_probM_seed0_v2_perp'+str(perplexity), pdist) np.save(result_path+'/'+datatype+'_data_sorted_v2_seed0_perp'+str(perplexity), sorted_ind_p) for i in xrange(1,num_folds): print '%s FOLD %d' % (divtype, i) random_state = check_random_state(i) Y = random_state.normal(0, init_stdev, size=(N, output_dims)) Y_shared = theano.shared(np.asarray(Y, dtype=floath)) Y = find_Y(X_shared, Y_shared, sigma_shared, N, output_dims, \ n_epochs, initial_lr, final_lr, lr_switch, \ init_stdev, initial_momentum, final_momentum, \ momentum_switch, metric, sorted_ind_p, \ rev_sorted_ind_p, verbose, \ fname=fname+'_fold'+str(i), color=color, \ divtype=divtype, lrDecay=lrDecay, \ datatype=datatype) return Y def find_Y(X_shared, Y_shared, sigma_shared, N, output_dims, n_epochs, initial_lr, final_lr, lr_switch, init_stdev, initial_momentum, final_momentum, momentum_switch, metric, sorted_ind_p, rev_sorted_ind_p,\ verbose=0, fname=None, color=None, divtype='kl', lrDecay=100,\ visLossF=0, naccuracyF=1, datatype='mnist'): """Optimize cost wrt Y""" # Optimization hyperparameters initial_lr = np.array(initial_lr, dtype=floath) final_lr = np.array(final_lr, dtype=floath) initial_momentum = np.array(initial_momentum, dtype=floath) final_momentum = np.array(final_momentum, dtype=floath) lr = T.fscalar('lr') lr_shared = theano.shared(initial_lr) X = T.fmatrix('X') Y = T.fmatrix('Y') Yv = T.fmatrix('Yv') Yv_shared = theano.shared(np.zeros((N, output_dims), dtype=floath)) sigma = T.fvector('sigma') momentum = T.fscalar('momentum') momentum_shared = theano.shared(initial_momentum) # Cost if divtype == 'kl': cost = kl_cost_var(X, Y, sigma, metric) elif divtype == 'rkl': cost = reverse_kl_cost_var(X, Y, sigma, metric) elif divtype == 'js': cost = js_cost_var(X, Y, sigma, metric) elif divtype == 'hl': cost = hellinger_cost_var(X, Y, sigma, metric) elif divtype == 'ch': cost = chi_square_cost_var(X, Y, sigma, metric) # Setting update for Y velocities grad_Y = T.grad(cost, Y) norm_gs = abs(grad_Y).sum() updates = [(Yv_shared, momentum*Yv - lr*grad_Y)] givens = {X: X_shared, sigma: sigma_shared, Y: Y_shared, Yv: Yv_shared} update_Yv = theano.function([lr, momentum], [cost, norm_gs], givens=givens, updates=updates) Y_len = T.mean(T.sum(Y**2, axis=1)) # Setting update for Y get_y_i = theano.function([], Y, givens={Y: Y_shared}) get_cost_i = theano.function([Y], cost, givens={X: X_shared, sigma: sigma_shared}) givens = {Y: Y_shared, Yv: Yv_shared} updates = [(Y_shared, Y + Yv)] update_Y = theano.function([], Y_len, givens=givens, updates=updates) loss, gnorms = [], [] for epoch in range(n_epochs): lrY = max(float(get_epsilon(initial_lr, lrDecay, epoch)), min(0.001, initial_lr)) mom = float(get_epsilon(initial_momentum, lrDecay, epoch)) \ if epoch < momentum_switch else 0.85 c, grad_len = update_Yv(lrY, mom) gnorms.append(grad_len) y_len = update_Y() loss.append(c) if verbose: projX = np.array(Y_shared.get_value()) if epoch % 25 == 0 or epoch < 20: projX = np.array(Y_shared.get_value()) np.save('./embeddings/'+fname, projX) ffname = './figs/'+fname+'_epoch'+str(epoch)+'.pdf' if datatype == 'sbow': color_dict = [\ 'lightblue', 'darkblue', 'indianred', 'darkred', 'red', 'magenta', 'hotpink', 'silver', 'darkgray', 'gray'] plot_map_news(projX, color, color_dict, ffname) else: plot_map_c(projX, color, ffname) print 'Epoch %d, SNE J %f, |GS| %f, |Y| %f, LRY %f, MOM %f' \ % (epoch, c, grad_len, y_len, lrY, mom) np.save('./results/'+fname+'_loss', np.asarray(loss)) np.save('./results/'+fname+'_gnorm', np.asarray(gnorms)) return np.array(Y_shared.get_value())
{"/core.py": ["/utils.py"], "/utils_sne.py": ["/utils.py", "/core.py"]}
9,220
riya2802/newapp
refs/heads/master
/employeeDetails/validation_function.py
import re from datetime import date, datetime, timedelta from django.contrib.auth.models import User from dateutil.parser import parse def checkForNone(fieldvalue): if fieldvalue is not None and fieldvalue !="": print(" fieldvalue",fieldvalue) data= fieldvalue return (data) else: data = None return (data) def is_valid_email(email): if email == "": return True else : if re.search(r'\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b', email, re.I): print('kkkk') return True else: return False #return bool(re.se("^.+@(\[?)[a-zA-Z0-9-.]+.([a-zA-Z]{2,3}|[0-9]{1,3})(]?)$", email)) def is_valid_phone(phone): if phone == "" or phone == None: print("blank") return True else: Pattern = re.compile("(0/91)?[7-9][0-9]{9}") if Pattern.match(phone): return True return False def is_valid_username(username): if re.search(' +', username): ## return true when user name contain space print('is_valid_username function call') return False else: return True def check_is_valid_name(name): if name is None or name =="": return True if name.isalpha(): return True if name.isalnum(): return False return False def date_to_string(date1): date_obj = datetime.strptime(date1, '%Y-%m-%d').date() print('date_obj',date_obj,type(date_obj)) print() return date_obj def is_date(string, fuzzy=False): try: parse(string, fuzzy=fuzzy) return True except ValueError: return False def calculateAge(born): if born == "": return True today = datetime.today() try: birthday = born.replace(year = today.year) except ValueError: # raised when birth date is February 29 # and the current year is not a leap year birthday = born.replace(year = today.year, month = born.month + 1, day = 1) if birthday > today: return today.year - born.year - 1 else: return today.year - born.year def is_valid_passport(passport): if passport == "" or passport is None : return True if len(str(passport)) != 12: print("passport Len",len(str(passport))) print("2") return False if str(passport).isalpha(): print("1") return False print("3") return True def is_valid_national(nationaid): if nationaid == "": return False if len(str(nationaid)) != 8: print("2") return False if str(nationaid).isalpha(): print("1") return False if str(nationaid).isdigit(): return True return True def check_join_date(joindate, birthdate): if not is_date(joindate): return False current_date=datetime.today() mindate =data = add_years(birthdate,18) print('mindate',mindate,type(mindate)) if date_to_string(joindate) < mindate or date_to_string(joindate) > current_date.date() : print('correct') return False return True def calculate_Effective_date(effectivedate): if not is_date(effectivedate): return False c_date = datetime.date(datetime.today()) month = c_date-timedelta(days=30) print('c_date',c_date,type(c_date)) print('month',month,type(month)) #print('effectivedate',date_to_string(effectivedate),type(date_to_string(effectivedate))) edate = date_to_string(effectivedate) print(edate) if date_to_string(effectivedate) < month or date_to_string(effectivedate) > c_date : #print(date_to_string(effectivedate) > current_date - (datetime.timedelta(1*365/12)).isofornat()) return False return True def check_employeeId(employeeid): if employeeid.isalpha(): return False if employeeid.isdigit(): return True else: return False # def is_valid_health(health): # if str(height).isalpha(): # return False # pass def add_years(d, years): """Return a date that's `years` years after the date (or datetime) object `d`. Return the same calendar date (month and day) in the destination year, if it exists, otherwise use the following day (thus changing February 29 to March 1). """ try: return d.replace(year = d.year + years) except ValueError: return d + (date(d.year + years, 1, 1) - date(d.year, 1, 1)) def end_of_probation(probationdate,joindate): if not is_date(probationdate): return False days1 = 30*3+2 ## probation date is b/w joining date and from 3 months later print('date_to_string(probationdate)',date_to_string(probationdate)) newprobationdate=date_to_string(probationdate) joinDate = date_to_string(joindate) print(type(joinDate),type(newprobationdate)) afterdate = joinDate+timedelta(days=days1) print('afterdate',afterdate, type(afterdate)) if newprobationdate < joinDate or newprobationdate > afterdate: return False return True def is_valid_postcode(postcode): if postcode == "" or postcode is None : return True if postcode.isalpha(): return False if len(postcode) != 6 : return False return True def is_valid_height(height): if height =="" or height is None: return True if height.isalpha(): return False if float(height) > 122 and float(height) <= 325: return True return False def is_valid_weight(weight): if weight =="" or weight is None: return True if weight.isalpha(): return False if float(weight) > 25 and float(weight) <=120 : return True return False
{"/employeeDetails/personaldetails.py": ["/employeeDetails/models.py"], "/employeeDetails/views.py": ["/employeeDetails/models.py"]}
9,221
riya2802/newapp
refs/heads/master
/employeeDetails/personaldetails.py
from django import forms from .models import employee,employeeFamily,employeeChildren,employeeHealth class login_class(forms.Form): email = forms.EmailField(required=True) password = forms.CharField(required=True) class personalDetails(forms.ModelForm): class Meta: model = employee fields=['employeementId','employeeFirstName','employeeMiddelName','employeeLastName','employeeGender','employeeBirthDate','employeeNationality','employeeNationalId','employeePassport','employeeEthnicity','employeeReligion'] class familyDetails(forms.ModelForm): class Meta: model = employeeFamily fields=['employeeFamilyMaritalStatus','employeeFamilyNumberOfChild','employeeFamilySpouseWorking','employeeFamilySpouseFirstName','employeeFamilySpouseMiddelName','employeeFamilySpouseLastName','employeeFamilySpouseBirthDate','employeeFamilySpouseNationality','employeeFamilySpouseNationalId','employeeFamilySpousePassport','employeeFamilySpouseEthnicity','employeeFamilySpouseReligion'] class childrenDetails(forms.ModelForm): class Meta: model = employeeChildren fields=['employeeChildrenFirstName','employeeChildrenMiddelName','employeeChildrenLastName','employeeChildrenBirthDate','employeeChildrenGender','employeeChildrenMaritalStatus'] class healthDetails(forms.ModelForm): class Meta: model = employeeHealth fields=['employeeHealthHeight','employeeHealthWeight','employeeHealthBloodGroup'] # class updateDetails(forms.Form): # employeeFname=forms.CharField(max_length=255, required=True) # employeeMname=form.CharField(max_length=255) # employeeLname=forms.CharField(max_length=255, required=True) # employeeGender=forms.CharField(max_length=255, required=True) # employeeBithday=forms.DateField(max_length=255, required=True) # employeeNationality=forms.CharField(max_length=255,required=True) # employeeNationalId=forms.IntegerField(null=False,blank=False) # employeePassport=forms.IntegerField(null=True,blank=True) # employeeEthnicity=forms.CharField(max_length=255 ,null=True,blank=True) # employeeReligion=forms.CharField(max_length=15,null=True,blank=True) # employeePhoto=forms.ImageField( blank=True,) # employeeMaritalstatu=forms.CharField(max_length=15,) # employeeNumberOfChild=forms.CharField(max_length=15) # employeeSpouseWorking=forms.CharField(max_length=15,null=True) # employeeSpouseFirstName=forms.CharField(max_length=255,blank=True,null=True) # employeeSpouseLastName=forms.CharField(max_length=255,null=True,blank=True) # employeeSpouseMiddelName=forms.CharField( max_length=255,blank=True,null=True) # employeeSpouseBirthDate=forms.DateField(null=True) # employeeSpouseNationality=forms.CharField(max_length=15,blank=False,null=False) # employeeSpouseNationalId=forms.IntegerField(null=True,blank=True) # employeeSpousePassport=forms.IntegerField(null=True,blank=True) # employeeSpouseEthnicity=forms.CharField(max_length=15,null=True,blank=True) # employeeSpouseReligion=forms.CharField(max_length=15,null=True,blank=True) # employeeChildrenFirstName=forms.CharField(max_length=255,blank=True,null=True) # employeeChildrenMiddelName=forms.CharField(max_length=255,null=True,blank=True) # employeeChildrenLastName=forms.CharField( max_length=255,blank=True,null=True) # employeeChildrenBirthDate=forms.DateField(blank=True,null=True) # employeeChildrenGender=forms.CharField(max_length=15,blank=True,null=True) # employeeChildrenMaritalStatus=forms.CharField(max_length=1,) # employeeHealthHeight=forms.CharField(max_length=255,blank=True,null=True) # employeeHealthWeight=forms.CharField(max_length=255,blank=True,null=True) # employeeHealthBloodGroup=forms.CharField(max_length=5,blank=True,null=True)
{"/employeeDetails/personaldetails.py": ["/employeeDetails/models.py"], "/employeeDetails/views.py": ["/employeeDetails/models.py"]}
9,222
riya2802/newapp
refs/heads/master
/employeeDetails/urls.py
from django.urls import path from . import views from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('isuseridcorrect',views.isuserIdcorrect), path('login',views.loginFun), path('logout',views.logoutFun), path('submit',views.submit),# add new employee path('addemployee',views.addEmployee),#show html path('editemployee/<employeeId>',views.editHtmlForm),#call edit form with data # path('editFun/<employeementId>',views.editFun),#save edit form data in database , update data in database path('employeeList',views.employeeList), path('emplyeeDelete/<employeementId>',views.emplyeeDelete), path('home',views.home), path('persoanldetails',views.personalAjaxRequest), #call ajax function path('familydetails',views.familyAjaxRequest), path('jobdetails',views.jobAjaxRequest), #call ajax function path('contactdetails',views.contactAjaxRequest), path('healthdetails',views.healthAjaxRequest), path('preview',views.preview), path('directory',views.directory), path('pdf/<employeeId>',views.createPdf),#create pdf files path('data',views.data), path('view/<employeeId>',views.employeeView), # path('remark',views.remark), ]+static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
{"/employeeDetails/personaldetails.py": ["/employeeDetails/models.py"], "/employeeDetails/views.py": ["/employeeDetails/models.py"]}
9,223
riya2802/newapp
refs/heads/master
/employeeDetails/migrations/0037_auto_20190712_1502.py
# Generated by Django 2.2.2 on 2019-07-12 09:32 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('employeeDetails', '0036_auto_20190710_1520'), ] operations = [ migrations.AlterField( model_name='contact', name='employeeForeignId', field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='employeeDetails.employee'), ), migrations.AlterField( model_name='employee', name='employeementId', field=models.IntegerField(unique=True), ), migrations.AlterField( model_name='employeefamily', name='employeeForeignId', field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='employeeDetails.employee'), ), migrations.AlterField( model_name='employeehealth', name='employeeForeignId', field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='employeeDetails.employee'), ), migrations.AlterField( model_name='job', name='employeeForeignId', field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='employeeDetails.employee'), ), ]
{"/employeeDetails/personaldetails.py": ["/employeeDetails/models.py"], "/employeeDetails/views.py": ["/employeeDetails/models.py"]}
9,224
riya2802/newapp
refs/heads/master
/employeeDetails/viewextra.py
from django.shortcuts import render from django.contrib.auth.models import User from .models import employee,employeeFamily,employeeChildren,employeeHealth,Contact,Job from . import personaldetails from django.shortcuts import render, redirect from . import validation_function from django.http import HttpResponse, JsonResponse from django.views.decorators.csrf import csrf_exempt import base64 from django.contrib.auth import authenticate, login, logout # Create your views here. @csrf_exempt def isuserIdcorrect(request): strdata= request.POST.get('request_data') print('strdata',strdata) user_obj = employee.objects.filter(employeementId = strdata).first() if user_obj: return JsonResponse({'data':True}) else: return JsonResponse({'data':False}) # def personalDetails(request): # if request.method=="POST": # form = personaldetails.personalDetails(request.POST,request.FILES) # employeeId= request.POST.get('employeeid') # firstName= request.POST.get('firstname',None) # middelName= request.POST.get('middlename',None) # lastName= request.POST.get('lastname',None) # gender= request.POST.get('gender',None) # birthDate= request.POST.get('birthdate',None) # nationality= request.POST.get('nationality',None) # passport= request.POST.get('passport',None) # nationalId= request.POST.get('nationalid',None) # ethnicity= request.POST.get('ethnicity',None) # religion= request.POST.get('religion',None) # photo=request.FILES.get('photo') # print('photo',photo) # #image = open('deer.gif', 'rb') # if employeeId is None or employeeId =="" or firstName is None or firstName=="" or lastName is None or lastName=="" or gender is None or gender=="" or birthDate is None or birthDate=="" or nationality=="" or nationality is None or nationalId is None or nationalId =="" : # error = "This fields are required" # return render(request, 'Employee.html',{'form':form,'error':error}) # data= employee.objects.filter(employeementId = employeeId).first() # if data is not None: # return render(request, 'Employee.html',{'form':form}) # msg = "Available" # employeeUID = employee.objects.filter(employeeNationalId=nationalId).first() # if employeeUID is not None: # return render(request, 'Employee.html',{'form':form}) # passportcheck=passport.isalpha() # if passportcheck : # passmsg="It takes only numeric value " # return render(request, 'Employee.html',{'form':form},{'passmsg':passmsg }) # nationalIdcheck =nationalId.isalpha() # if nationalIdcheck: # nationalmsg="It takes only numeric value " # return render(request, 'Employee.html',{'form':form},{'nationalmsg':nationalmsg }) # employee.objects.create(employeementId=employeeId,employeeFirstName=firstName,employeeMiddelName=middelName,employeeLastName=lastName,employeeGender=gender,employeeBirthDate=birthDate,employeeNationality=nationality,employeeNationalId=nationalId,employeePassport=passport,employeeEthnicity=ethnicity,employeeReligion=religion, employeePhoto=photo) # return render(request, 'Employee.html',{'form':form,'msg':msg}) # else: # print("get") # form= personaldetails.personalDetails() # return render(request, 'Employee.html',{'form':form,}) # def FamilyDetails(request,employeeid): # if request.method=="POST": # employee_obj =employee.objects.filter(employeementId = employeeid).first() # obj=employeeFamily.objects.filter(employeeForeignId=employee_obj).first() # familyform = personaldetails.familyDetails(request.POST) # create object of family form # childform = personaldetails.childrenDetails(request.POST) #create object of children form # maritalStatus=request.POST.get('maritalstatus',None) # numberOfChild=request.POST.get('numbeofchild',None) # spouseWorking=request.POST.get('spouseworking',None) # spousefirstName= request.POST.get('spousefirstname',None) # spousemiddelName= request.POST.get('spousemiddlename',None) # spouselastName= request.POST.get('spouselastname',None) # spousebirthDate= request.POST.get('spousebirthdate',None) # spousenationality= request.POST.get('spousenationality',None) # spousepassport= request.POST.get('spousepassport',None) # spousenationalId= request.POST.get('spousenationalid',None) # spouseethnicity= request.POST.get('spouseethnicity',None) # spousereligion= request.POST.get('spousereligion',None) # query_dict_childfirstname=request.POST.getlist('childfirstname') # query_dict_childmiddlename=request.POST.getlist('childmiddlename') # query_dict_childlastname=request.POST.getlist('childlastname') # query_dict_childbirthdate=request.POST.getlist('childbirthdate') # query_dict_childgender=request.POST.getlist('childgender') # query_dict_childmaritalstatus=request.POST.getlist('childmaritalstatus') # spousedob = validation_function.checkForNone(spousebirthDate) # newspousepassport = validation_function.checkForNone(spousepassport) # newspousenationalId =validation_function.checkForNone(spousenationalId) # employeeFamily.objects.create(employeeForeignId=employee_obj,employeeFamilyMaritalStatus=maritalStatus,employeeFamilyNumberOfChild=numberOfChild,employeeFamilySpouseWorking=spouseWorking,employeeFamilySpouseFirstName=spousefirstName,employeeFamilySpouseMiddelName=spousemiddelName,employeeFamilySpouseLastName=spouselastName,employeeFamilySpouseBirthDate=spousedob,employeeFamilySpouseNationality=spousenationality,employeeFamilySpouseNationalId=newspousenationalId,employeeFamilySpousePassport=newspousepassport,employeeFamilySpouseEthnicity=spouseethnicity,employeeFamilySpouseReligion=spousereligion) # for i in range(len(query_dict_childfirstname)): # newchildbirthdate = validation_function.checkForNone(query_dict_childbirthdate[i]) # employeeChildren.objects.bulk_create([employeeChildren(employeeForeignId=employee_obj,employeeChildrenFirstName=query_dict_childfirstname[i],employeeChildrenMiddelName=query_dict_childmiddlename[i],employeeChildrenLastName=query_dict_childlastname[i],employeeChildrenBirthDate=newchildbirthdate,employeeChildrenGender=query_dict_childgender[i],employeeChildrenMaritalStatus=query_dict_childmaritalstatus[i]),]) # healthform= personaldetails.healthDetails() # return render(request,"health.html",{'healthform':healthform}) # else: # familyform = personaldetails.familyDetails() # childform = personaldetails.childrenDetails() # return render(request,"Family.html",{'familyform':familyform,'childform':childform}) # def HealthDetails(request,employeeid): # if request.method== "POST": # employee_obj =employee.objects.filter(employeementId = employeeid).first() # check_user = employeeHealth.objects.filter(employeeForeignId=employee_obj) # if check_user: # return redirect('/newapp/persoanldetails' ) # healthform = personaldetails.healthDetails(request.POST) # height= request.POST.get('height',None) # weight=request.POST.get('weight',None) # bloodGroup= request.POST.get('bloodgroup',None) # employeeHealth.objects.create(employeeForeignId=employee_obj,employeeHealthHeight=height,employeeHealthWeight=weight,employeeHealthBloodGroup=bloodGroup) # return render(request,"health.html",{'healthform':healthform}) # else: # healthform = personaldetails.healthDetails() # return render(request,"health.html",{'healthform':healthform}) @csrf_exempt def loginFun(request): print(request.method) if request.method =="POST": login_form=personaldetails.login_class(request.POST) username = request.POST.get('username') password = login_form['password'].value() user_obj =User.objects.filter(username=username).first() if user_obj is None: redirect('/login') user = authenticate(username =user_obj.username, password= password ) if user is not None: login(request,user) return redirect('/newapp/persoanldetails') else: login_form = personaldetails.login_class() return render(request, 'login.html', {'form': login_form}) else: login_form = personaldetails.login_class() return render(request, 'login.html', {'form': login_form}) @csrf_exempt def logoutFun(request): logout(request) return redirect('/register/login') # @csrf_exempt # def editFun(request) # if not request.user.is_authenticated: # return redirect('/newapp/login') # else: # if request.method == "POST": # employee_obj =employee.objects.filter(employeementId = employeeid).first() # if employee_obj is None: # return redirect('/newapp/login') # firstName= request.POST.get('firstname',None) # middelName= request.POST.get('middlename',None) # lastName= request.POST.get('lastname',None) # gender= request.POST.get('gender',None) # birthDate= request.POST.get('birthdate',None) # nationality= request.POST.get('nationality',None) # passport= request.POST.get('passport',None) # nationalId= request.POST.get('nationalid',None) # ethnicity= request.POST.get('ethnicity',None) # religion= request.POST.get('religion',None) # photo=request.FILES.get('photo') # maritalStatus=request.POST.get('maritalstatus',None) # numberOfChild=request.POST.get('numbeofchild',None) # spouseWorking=request.POST.get('spouseworking',None) # spousefirstName= request.POST.get('spousefirstname',None) # spousemiddelName= request.POST.get('spousemiddlename',None) # spouselastName= request.POST.get('spouselastname',None) # spousebirthDate= request.POST.get('spousebirthdate',None) # spousenationality= request.POST.get('spousenationality',None) # spousepassport= request.POST.get('spousepassport',None) # spousenationalId= request.POST.get('spousenationalid',None) # spouseethnicity= request.POST.get('spouseethnicity',None) # spousereligion= request.POST.get('spousereligion',None) # query_dict_childfirstname=request.POST.getlist('childfirstname') # query_dict_childmiddlename=request.POST.getlist('childmiddlename') # query_dict_childlastname=request.POST.getlist('childlastname') # query_dict_childbirthdate=request.POST.getlist('childbirthdate') # query_dict_childgender=request.POST.getlist('childgender') # query_dict_childmaritalstatus=request.POST.getlist('childmaritalstatus') # spousedob = validation_function.checkForNone(spousebirthDate) # newspousepassport = validation_function.checkForNone(spousepassport) # newspousenationalId =validation_function.checkForNone(spousenationalId) # DateJoined = request.POST.get('datejoin') # EndofProbation = request.POST.get('endofprobation') # Position = request.POST.get('positiondd') # JobStatusEffectiveDate = request.POST.get('jobstatuseffectivedate') # LineManager = request.POST.get('linemanagedd') # Department = request.POST.get('departmentdd') # Branch = request.POST.get('branchdd') # Level = request.POST.get('leveldd') # JobType = request.POST.get('jobtypedd') # EmploymentStatusEffectiveDate = request.POST.get('employmentstatuseffectivedate') # JobStatus = request.POST.get('jobstatusdd') # LeaveWorkflow = request.POST.get('leaveworkflowdd') # Workdays = request.POST.get('workdays') # Holidays = request.POST.get('holidaysdd') # TermStart = request.POST.get('termstartdd') # TermEnd = request.POST.get('termenddd') # if DateJoined is not None or DateJoined != "" and Position is not None or Position != "" and JobStatusEffectiveDate is not None or JobStatusEffectiveDate != "" and EmploymentStatusEffectiveDate is not None or EmploymentStatusEffectiveDate != "": # if EndofProbation is not None and EndofProbation != '': # endofProbation=EndofProbation # Email = request.POST.get('email') # BlogHomepage = request.POST.get('bloghomepage') # Office = request.POST.get('office') # OfficeExtention = request.POST.get('officeextention') # Mobile = request.POST.get('mobile') # Home = request.POST.get('home') # Address1 = request.POST.get('address1') # Address2 = request.POST.get('address2') # City = request.POST.get('city') # PostCode = request.POST.get('postcode') # State = request.POST.get('state') # Country = request.POST.get('countrydd') # FirstName = request.POST.get('firstname') # LastName = request.POST.get('lastname') # MiddleName = request.POST.get('middlename') # Relationship = request.POST.get('relationship') # MobilePhone = request.POST.get('mobilephone') # HousePhone = request.POST.get('housephone') # OfficePhone = request.POST.get('officephone') # if Country is not None or Country != "" and Mobile.isnumeric() and PostCode.isnumeric() and MobilePhone.isnumeric() and HousePhone.isnumeric() and OfficePhone.isnumeric(): # if Office is not None and Office != '': # Office =Office # if Mobile is not None and Mobile != '': # Mobile =Mobile # if Home is not None and Home != '': # PostCode =PostCode # if MobilePhone is not None and MobilePhone != '': # MobilePhone=MobilePhone # if HousePhone is not None and HousePhone != '': # HousePhone =HousePhone # if OfficePhone is not None and OfficePhone != '': # OfficePhone =OfficePhone # Contact.objects.filter(employeeForeignId=employee_obj).update(email=Email,blogHomepage=BlogHomepage,office=Office,officeExtention=OfficeExtention,mobile=Mobile,home=Home,address1=Address1,address2=Address2,city=City,postCode=PostCode,state=State,country=Country, firstName=FirstName,lastName=LastName,middleName=MiddleName,relationship=Relationship,mobilePhone=MobilePhone,housePhone=HousePhone,officePhone=OfficePhone) # employee.objects.filter(employeementId=employee_obj).update(employeeFirstName=firstName,employeeMiddelName=middelName,employeeLastName=lastName,employeeGender=gender,employeeBirthDate=birthDate,employeeNationality=nationality,employeeNationalId=nationalId,employeePassport=passport,employeeEthnicity=ethnicity,employeeReligion=religion, employeePhoto=photo) # employeeFamily.objects.filter(employeeForeignId=employee_obj).update(employeeFamilyMaritalStatus=maritalStatus,employeeFamilyNumberOfChild=numberOfChild,employeeFamilySpouseWorking=spouseWorking,employeeFamilySpouseFirstName=spousefirstName,employeeFamilySpouseMiddelName=spousemiddelName,employeeFamilySpouseLastName=spouselastName,employeeFamilySpouseBirthDate=spousedob,employeeFamilySpouseNationality=spousenationality,employeeFamilySpouseNationalId=newspousenationalId,employeeFamilySpousePassport=newspousepassport,employeeFamilySpouseEthnicity=spouseethnicity,employeeFamilySpouseReligion=spousereligion) # for i in range(len(query_dict_childfirstname)): # newchildbirthdate = validation_function.checkForNone(query_dict_childbirthdate[i]) # employeeChildren.objects.bulk_create([employeeChildren(employeeForeignId=employee_obj,employeeChildrenFirstName=query_dict_childfirstname[i],employeeChildrenMiddelName=query_dict_childmiddlename[i],employeeChildrenLastName=query_dict_childlastname[i],employeeChildrenBirthDate=newchildbirthdate,employeeChildrenGender=query_dict_childgender[i],employeeChildrenMaritalStatus=query_dict_childmaritalstatus[i]),]) # Job.objects.filter(employeeForeignId=employee_obj).update(dateJoined=DateJoined,endofProbation=EndofProbation,position=Position,jobStatusEffectiveDate=JobStatusEffectiveDate,lineManager=department=Department,branch=Branch,level=Level,jobType=JobType,employmentStatusEffectiveDate=EmploymentStatusEffectiveDate,jobStatus=jobStatus,leaveWorkflow=LeaveWorkflow,workdays=Workdays,holidays=Holidays,termStart=TermStart,termEnd=TermEnd) # @csrf_exempt # def forgotPassword(request): # username = request.POST.get('username', None) # if username is None or username == '': # return redirect('/newapp/login') # user= User.objects.filter(username=username).first() # if user is None : # return render(request,'login.html',{''}) # else: # if user.userMetaEmailVerified is not None: # mailsend.forgotMail(user) # return Response({'message': 'Reset Link send successfully '}) # else: # return Response({'message': 'Email verification Fail'},status= HTTP_400_BAD_REQUEST) #befor ## -------------------------------------------------------------------------------------------------------- # after def editFun(request): if not request.user.is_authenticated: return redirect('/newapp/login') else: if request.method == "POST": employee_obj =employee.objects.filter(employeementId = employeeid).first() if employee_obj is None: return render(request,'error.html',{'error':'User not exist'}) firstName= request.POST.get('firstname',None) middelName= request.POST.get('middlename',None) lastName= request.POST.get('lastname',None) gender= request.POST.get('gender',None) birthDate= request.POST.get('birthdate',None) nationality= request.POST.get('nationality',None) passport= request.POST.get('passport',None) nationalId= request.POST.get('nationalid',None) ethnicity= request.POST.get('ethnicity',None) religion= request.POST.get('religion',None) photo=request.FILES.get('photo') maritalStatus=request.POST.get('maritalstatus',None) numberOfChild=request.POST.get('numbeofchild',None) spouseWorking=request.POST.get('spouseworking',None) spousefirstName= request.POST.get('spousefirstname',None) spousemiddelName= request.POST.get('spousemiddlename',None) spouselastName= request.POST.get('spouselastname',None) spousebirthDate= request.POST.get('spousebirthdate',None) spousenationality= request.POST.get('spousenationality',None) spousepassport= request.POST.get('spousepassport',None) spousenationalId= request.POST.get('spousenationalid',None) spouseethnicity= request.POST.get('spouseethnicity',None) spousereligion= request.POST.get('spousereligion',None) query_dict_childfirstname=request.POST.getlist('childfirstname') query_dict_childmiddlename=request.POST.getlist('childmiddlename') query_dict_childlastname=request.POST.getlist('childlastname') query_dict_childbirthdate=request.POST.getlist('childbirthdate') query_dict_childgender=request.POST.getlist('childgender') query_dict_childmaritalstatus=request.POST.getlist('childmaritalstatus') spousedob = validation_function.checkForNone(spousebirthDate) newspousepassport = validation_function.checkForNone(spousepassport) newspousenationalId =validation_function.checkForNone(spousenationalId) DateJoined = request.POST.get('datejoin') EndofProbation = request.POST.get('endofprobation') Position = request.POST.get('positiondd') JobStatusEffectiveDate = request.POST.get('jobstatuseffectivedate') LineManager = request.POST.get('linemanagedd') Department = request.POST.get('departmentdd') Branch = request.POST.get('branchdd') Level = request.POST.get('leveldd') JobType = request.POST.get('jobtypedd') EmploymentStatusEffectiveDate = request.POST.get('employmentstatuseffectivedate') JobStatus = request.POST.get('jobstatusdd') LeaveWorkflow = request.POST.get('leaveworkflowdd') Workdays = request.POST.get('workdays') Holidays = request.POST.get('holidaysdd') TermStart = request.POST.get('termstartdd') TermEnd = request.POST.get('termenddd') if DateJoined is not None or DateJoined != "" and Position is not None or Position != "" and JobStatusEffectiveDate is not None or JobStatusEffectiveDate != "" and EmploymentStatusEffectiveDate is not None or EmploymentStatusEffectiveDate != "": if EndofProbation is not None and EndofProbation != '': newendofProbation=EndofProbation Email = request.POST.get('email') BlogHomepage = request.POST.get('bloghomepage') Office = request.POST.get('office') OfficeExtention = request.POST.get('officeextention') Mobile = request.POST.get('mobile') Home = request.POST.get('home') Address1 = request.POST.get('address1') Address2 = request.POST.get('address2') City = request.POST.get('city') PostCode = request.POST.get('postcode') State = request.POST.get('state') Country = request.POST.get('countrydd') FirstName = request.POST.get('firstname') LastName = request.POST.get('lastname') MiddleName = request.POST.get('middlename') Relationship = request.POST.get('relationship') MobilePhone = request.POST.get('mobilephone') HousePhone = request.POST.get('housephone') OfficePhone = request.POST.get('officephone') if Country is not None or Country != "" and Mobile.isnumeric() and PostCode.isnumeric() and MobilePhone.isnumeric() and HousePhone.isnumeric() and OfficePhone.isnumeric(): if Office is not None and Office != '': newOffice =Office if Mobile is not None and Mobile != '': newMobile =Mobile if Home is not None and Home != '': newPostCode =PostCode if MobilePhone is not None and MobilePhone != '': newMobilePhone=MobilePhone if HousePhone is not None and HousePhone != '': newHousePhone =HousePhone if OfficePhone is not None and OfficePhone != '': newOfficePhone =OfficePhone height= request.POST.get('height',None) weight=request.POST.get('weight',None) bloodGroup= request.POST.get('bloodgroup',None) employeeHealth.objects.filter(employeeForeignId=employee_obj).update(employeeHealthHeight=height,employeeHealthWeight=weight,employeeHealthBloodGroup=bloodGroup) Contact.objects.filter(employeeForeignId=employee_obj).update(email=Email,blogHomepage=BlogHomepage,office=newOffice,officeExtention=OfficeExtention,mobile=newMobile,home=Home,address1=Address1,address2=Address2,city=City,postCode=newPostCode,state=State,country=Country, firstName=FirstName,lastName=LastName,middleName=MiddleName,relationship=Relationship,mobilePhone=newMobilePhone,housePhone=HousePhone,officePhone=newOfficePhone) employee.objects.filter(employeementId=employee_obj).update(employeeFirstName=firstName,employeeMiddelName=middelName,employeeLastName=lastName,employeeGender=gender,employeeBirthDate=birthDate,employeeNationality=nationality,employeeNationalId=nationalId,employeePassport=passport,employeeEthnicity=ethnicity,employeeReligion=religion, employeePhoto=photo) employeeFamily.objects.filter(employeeForeignId=employee_obj).update(employeeFamilyMaritalStatus=maritalStatus,employeeFamilyNumberOfChild=numberOfChild,employeeFamilySpouseWorking=spouseWorking,employeeFamilySpouseFirstName=spousefirstName,employeeFamilySpouseMiddelName=spousemiddelName,employeeFamilySpouseLastName=spouselastName,employeeFamilySpouseBirthDate=spousedob,employeeFamilySpouseNationality=spousenationality,employeeFamilySpouseNationalId=newspousenationalId,employeeFamilySpousePassport=newspousepassport,employeeFamilySpouseEthnicity=spouseethnicity,employeeFamilySpouseReligion=spousereligion) # for i in range(len(query_dict_childfirstname)): # newchildbirthdate = validation_function.checkForNone(query_dict_childbirthdate[i]) # # employeeChildren.objects.bulk_update([employeeForeignId=employee_obj,[employeeChildrenFirstName=query_dict_childfirstname[i]],[employeeChildrenMiddelName=query_dict_childmiddlename[i]],[employeeChildrenLastName=query_dict_childlastname[i]],[employeeChildrenBirthDate=newchildbirthdate],[employeeChildrenGender=query_dict_childgender[i]],[employeeChildrenMaritalStatus=query_dict_childmaritalstatus[i]]]) Job.objects.filter(employeeForeignId=employee_obj).update(dateJoined=DateJoined,endofProbation=newendofProbation,position=Position,jobStatusEffectiveDate=JobStatusEffectiveDate,lineManager=LineManager,department=Department,branch=Branch,level=Level,jobType=JobType,employmentStatusEffectiveDate=EmploymentStatusEffectiveDate,jobStatus=jobStatus,leaveWorkflow=LeaveWorkflow,workdays=Workdays,holidays=Holidays,termStart=TermStart,termEnd=TermEnd) ##function for calling edit html form with data in text box def editHtmlForm(request,employeeid): if not request.user.is_authenticated: return redirect('/newapp/login') objEmployeePersonal=employee.objects.filter(employeementId = employeeid).first() if objEmployee: objEmployeeFamily=mployeeFamily.objects.filter(employeeForeignId=employee_obj) objEmployeeChildren=employeeChildren.objects.filter(employeeForeignId=employee_obj) objEmployeeHealth=employeeHealth.objects.filter(employeeForeignId=employee_obj) objEmployeeJob=Job.objects.filter(employeeForeignId=employee_obj) objEmployeeContact=Contact.objects.filter(employeeForeignId=employee_obj) return render(request,'editform.html',{'objEmployeePersonal':objEmployeePersonal,'objEmployeeFamily':objEmployeeFamily,'objEmployeeChildren':objEmployeeChildren,'objEmployeeHealth':objEmployeeHealth,'objEmployeeJob':objEmployeeJob,'objEmployeeContact':objEmployeeContact}) else: return render(request,'error.html',{'error':'User not exist'}) ##add new employee @csrf_exempt def addFun(request): if request.method=="POST": print("post") employeeId= request.POST.get('employeeid') fname= request.POST['fname'] print(fname) firstName= request.POST.get('fname',None) print('firstName',firstName) middelName= request.POST.get('middlename',None) lastName= request.POST.get('lname',None) gender= request.POST.get('gender',None) birthDate= request.POST.get('birthdate',None) nationality= request.POST.get('nationality',None) passport= request.POST.get('passport',None) nationalId= request.POST.get('nationalid',None) ethnicity= request.POST.get('ethnicity',None) religion= request.POST.get('religion',None) photo=request.FILES.get('photo') print('employeeId',employeeId) if employeeId is None or employeeId =="" or firstName is None or firstName=="" or lastName is None or lastName=="" or gender is None or gender=="" or birthDate is None or birthDate=="" or nationality=="" or nationality is None or nationalId is None or nationalId =="" : error = "This field is required" print(employeeId) print(firstName) print(lastName) print(gender) print(nationalId) print(nationality) return render(request, 'form.html',{'error':error}) employeeObj= employee.objects.filter(employeementId = employeeId).first()#check username is exist or not # if employeeObj is not None and employeeObj != "": # return render(request, 'form.html',{'form':form})#user already exist #employeeNationalID = employee.objects.filter(employeeNationalId=nationalId).first() # if employeeNationalID is not None: # return render(request, 'form.html',{'form':form})#user already exist passportcheck=passport.isalpha() if passportcheck : passmsg="It takes only numeric value " return render(request, 'Employee.html',{'form':form},{'passmsg':passmsg }) nationalIdcheck =nationalId.isalpha() if nationalIdcheck: nationalmsg="It takes only numeric value" return render(request, 'Employee.html',{'form':form},{'nationalmsg':nationalmsg }) # employeeFamilyObj=employeeFamily.objects.filter(employeeForeignId=employeeObj).first()#check user is exist in family table # if employeeFamilyObj is not None : # return render(request, 'form.html') print('personal done') maritalStatus=request.POST.get('maritalstatus',None) numberOfChild=request.POST.get('numbeofchild',None) spouseWorking=request.POST.get('spouseworking',None) spousefirstName= request.POST.get('spousefirstname',None) spousemiddelName= request.POST.get('spousemiddlename',None) spouselastName= request.POST.get('spouselastname',None) spousebirthDate= request.POST.get('spousebirthdate',None) spousenationality= request.POST.get('spousenationality',None) spousepassport= request.POST.get('spousepassport',None) spousenationalId= request.POST.get('spousenationalid',None) spouseethnicity= request.POST.get('spouseethnicity',None) spousereligion= request.POST.get('spousereligion',None) query_dict_childfirstname=request.POST.getlist('childfirstname') query_dict_childmiddlename=request.POST.getlist('childmiddlename') query_dict_childlastname=request.POST.getlist('childlastname') query_dict_childbirthdate=request.POST.getlist('childbirthdate') query_dict_childgender=request.POST.getlist('childgender') query_dict_childmaritalstatus=request.POST.getlist('childmaritalstatus') spousedob = validation_function.checkForNone(spousebirthDate) newspousepassport = validation_function.checkForNone(spousepassport) newspousenationalId =validation_function.checkForNone(spousenationalId) #employeeHealthObj= employeeHealth.objects.filter(employeeForeignId=employeeObj)#check user is exist in Health table # if employeeHealthObj is not None : # print('health') # print('employeeHealthObj',employeeHealthObj) # return render(request, 'form.html') height= request.POST.get('height',None) weight=request.POST.get('weight',None) bloodGroup= request.POST.get('bloodgroup',None) # employeeJobObj= Job.objects.filter(employeeForeignId=employeeObj)#check user is exist in Job table # if employeeJobObj is not None: # print("job") # return render(request, 'form.html') print('family done') DateJoined = request.POST.get('datejoin') EndofProbation = request.POST.get('endofprobation') Position = request.POST.get('positiondd') JobStatusEffectiveDate = request.POST.get('jobstatuseffectivedate') LineManager = request.POST.get('linemanagedd') Department = request.POST.get('departmentdd') Branch = request.POST.get('branchdd') Level = request.POST.get('leveldd') JobType = request.POST.get('jobtypedd') EmploymentStatusEffectiveDate = request.POST.get('employmentstatuseffectivedate') JobStatus = request.POST.get('jobstatusdd') LeaveWorkflow = request.POST.get('leaveworkflowdd') Workdays = request.POST.get('workdays') Holidays = request.POST.get('holidaysdd') TermStart = request.POST.get('termstartdd') TermEnd = request.POST.get('termenddd') print(DateJoined,EndofProbation,Position,JobStatusEffectiveDate,LineManager,Department,Branch,Level,JobType,EmploymentStatusEffectiveDate,JobStatus,LeaveWorkflow,Workdays,Holidays,TermStart,TermEnd) if DateJoined is not None or DateJoined != "" and Position is not None or Position != "" and JobStatusEffectiveDate is not None or JobStatusEffectiveDate != "" and EmploymentStatusEffectiveDate is not None or EmploymentStatusEffectiveDate != "": if EndofProbation is not None and EndofProbation != '': newendofProbation=EndofProbation # employeeContactObj=Contact.objects.filter(employeeForeignId=employeeObj) # if employeeContactObj is not None: # return render(request, 'Employee.html',{'form':form}) print('Job done') Email = request.POST.get('email') BlogHomepage = request.POST.get('bloghomepage') Office = request.POST.get('office') OfficeExtention = request.POST.get('officeextention') Mobile = request.POST.get('mobile') Home = request.POST.get('home') Address1 = request.POST.get('address1') Address2 = request.POST.get('address2') City = request.POST.get('city') PostCode = request.POST.get('postcode') State = request.POST.get('state') Country = request.POST.get('countrydd') FirstName = request.POST.get('firstname') LastName = request.POST.get('lastname') MiddleName = request.POST.get('middlename') Relationship = request.POST.get('relationship') MobilePhone = request.POST.get('mobilephone') HousePhone = request.POST.get('housephone') OfficePhone = request.POST.get('officephone') if Country is not None or Country != "" and Mobile.isnumeric() and PostCode.isnumeric() and MobilePhone.isnumeric() and HousePhone.isnumeric() and OfficePhone.isnumeric(): if Office is not None and Office != '': newOffice =Office else:newOffice=None if Mobile is not None and Mobile != '': newMobile =Mobile else:newMobile=None if Home is not None and Home != '': newPostCode =PostCode else:newPostCode=None if MobilePhone is not None and MobilePhone != '': newMobilePhone=MobilePhone else:newMobilePhone=None if HousePhone is not None and HousePhone != '': newHousePhone =HousePhone else:newHousePhone=None if OfficePhone is not None and OfficePhone != '': newOfficePhone =OfficePhone else:newOfficePhone=None print('Contact done') obj = employee.objects.create(employeementId=employeeId,employeeFirstName=firstName,employeeMiddelName=middelName,employeeLastName=lastName,employeeGender=gender,employeeBirthDate=birthDate,employeeNationality=nationality,employeeNationalId=nationalId,employeePassport=passport,employeeEthnicity=ethnicity,employeeReligion=religion, employeePhoto=photo) employeeHealth.objects.create(employeeForeignId=obj,employeeHealthHeight=height,employeeHealthWeight=weight,employeeHealthBloodGroup=bloodGroup) employeeFamily.objects.create(employeeForeignId=obj,employeeFamilyMaritalStatus=maritalStatus,employeeFamilyNumberOfChild=numberOfChild,employeeFamilySpouseWorking=spouseWorking,employeeFamilySpouseFirstName=spousefirstName,employeeFamilySpouseMiddelName=spousemiddelName,employeeFamilySpouseLastName=spouselastName,employeeFamilySpouseBirthDate=spousedob,employeeFamilySpouseNationality=spousenationality,employeeFamilySpouseNationalId=newspousenationalId,employeeFamilySpousePassport=newspousepassport,employeeFamilySpouseEthnicity=spouseethnicity,employeeFamilySpouseReligion=spousereligion) inser_list=[] for i in range(len(query_dict_childfirstname)): newchildbirthdate = validation_function.checkForNone(query_dict_childbirthdate[i]) inser_list.append(employeeChildren(employeeForeignId=obj,employeeChildrenFirstName=query_dict_childfirstname[i],employeeChildrenMiddelName=query_dict_childmiddlename[i],employeeChildrenLastName=query_dict_childlastname[i],employeeChildrenBirthDate=newchildbirthdate,employeeChildrenGender=query_dict_childgender[i],employeeChildrenMaritalStatus=query_dict_childmaritalstatus[i]),) employeeChildren.objects.bulk_create(inser_list) Job.objects.create(employeeForeignId=obj,dateJoined=DateJoined,endofProbation=newendofProbation,position=Position,jobStatusEffectiveDate=JobStatusEffectiveDate,lineManager=LineManager,department=Department,branch=Branch,level=Level,jobType=JobType,employmentStatusEffectiveDate=EmploymentStatusEffectiveDate,jobStatus=jobStatus,leaveWorkflow=LeaveWorkflow,workdays=Workdays,holidays=Holidays,termStart=TermStart,termEnd=TermEnd) Contact.objects.create(employeeForeignId=obj,email=Email,blogHomepage=BlogHomepage,office=newOffice,officeExtention=OfficeExtention,mobile=newMobile,home=Home,address1=Address1,address2=Address2,city=City,postCode=newPostCode,state=State,country=Country, firstName=FirstName,lastName=LastName,middleName=MiddleName,relationship=Relationship,mobilePhone=newMobilePhone,housePhone=HousePhone,officePhone=newOfficePhone) return redirect('/newapp/login') else: print("get") ## show list of all employee def employeeList(request): if not request.user.is_authenticated: return redirect('/newapp/login') employeeObj= employee.objects.all() if employeeObj is None:## if no employee is addedd return render(request, 'Employee.html',{'form':form}) return render(request, 'list.html',{'employeeObj':employeeObj}) def emplyeeDelete(request,employeeid ): if not request.user.is_authenticated: return redirect('/newapp/login') emp_object = employee.objects.filter(employeementId=employeeId).first() if emp_object is None : return render(request,'Employee.html') employee.objects.filter(employeementId=employeeId).delete() return render(request, 'list.html') def addEmployee(request): if not request.user.is_authenticated: return redirect('/newapp/login') action = "addFun" return render(request,'form.html' , {'action':action}) # @csrf_exempt # def forgotPassword(request): # username = request.POST.get('username', None) # if username is None or username == '': # return redirect('/newapp/login') # user= User.objects.filter(username=username).first() # if user is None : # return render(request,'login.html') # else: # return render(request, 'newpassword.html' ) ## addFunDuplicate or addFunCopy @csrf_exempt def addFun(request,): if not request.user.is_authenticated: print("no one is login") return redirect('/newapp/login') if request.method=="POST": print("post") employeeId= request.POST.get('employeeid') print(employeeId) firstName= request.POST.get('firstname',None) print(firstName) middelName= request.POST.get('middlename',None) print(middelName) lastName= request.POST.get('lastname',None) print(lastName) gender= request.POST.get('gendern',None) print(gender) birthDate= request.POST.get('birthdate',None) print(birthDate) nationality= request.POST.get('nationalitydd',None) print(nationality) passport= request.POST.get('passport',None) print(passport) nationalId= request.POST.get('nationalid',None) print(nationalId) ethnicity= request.POST.get('ethnicity',None) religion= request.POST.get('religion',None) photo=request.FILES.get('photo') if employeeId is None or employeeId =="" or firstName is None or firstName=="" or lastName is None or lastName=="" or gender is None or gender=="" or birthDate is None or birthDate=="" or nationality=="" or nationality is None or nationalId is None or nationalId =="" : print('error') return render(request, 'form.html', {'errorrequired':"This field is required"}) try: employeeObj= employee.objects.filter(employeementId = employeeId).first() except: if employeeObj: print('error1') return render(request, 'form.html',{'error':'user already exist'}) else: if employeeObj: print('error1') return render(request, 'form.html',{'error':'user already exist'}) validate_username = validation_function.is_valid_username(employeeId) if validate_username is None: ## true when name contain spaces return render(request,'form.html',{'username_errorq':'Enter Valid user name'}) validfirstname=validation_function.check_is_valid_name(firstName) if validfirstname is None : return render(request, 'form.html',{'firstname_error':'Invalid name' }) validlastname=validation_function.check_is_valid_name(lastName) if validlastname is None : return render(request, 'form.html',{'lastname_error':'Invalid name' }) validmiddelname=validation_function.check_is_valid_name(middelName) if validmiddelname is None : return render(request, 'form.html',{'middelname_error':'Invalid name' }) # passport validation if str(passport).isnumeric(): if len(str(passport)) == 12: passport=passport print(passport) else: passportmsg="Invalid number" print(passportmsg) return render(request, 'form.html',{'passportmsg':passportmsg }) elif passport== "": passport = None else: passportmsg="Enter number" print(nationalmsg) return render(request, 'form.html',{'passportmsg':passportmsg }) ## national validation if str(nationalId).isnumeric() if len(str(nationalId)) == 8 : nationalId =nationalId else: nationalmsg="Enter valid number" print(nationalmsg) return render(request, 'form.html',{'nationalmsg':nationalmsg }) elif nationalId =="": nationalId = None else: print('error3') nationalmsg="It takes only numeric value" print(nationalmsg) return render(request, 'form.html',{'nationalmsg':nationalmsg }) print('personal done') maritalStatus=request.POST.get('maritalstatus',None) numberOfChild=request.POST.get('numbeofchild',None) spouseWorking=request.POST.get('spouseworking',None) spousefirstName= request.POST.get('spousefirstname',None) spousemiddelName= request.POST.get('spousemiddlename',None) spouselastName= request.POST.get('spouselastname',None) spousebirthDate= request.POST.get('spousebirthdate',None) spousenationality= request.POST.get('spousenationality',None) spousepassport= request.POST.get('spousepassport',None) spousenationalId= request.POST.get('spousenationalid',None) spouseethnicity= request.POST.get('spouseethnicity',None) spousereligion= request.POST.get('spousereligion',None) query_dict_childfirstname=request.POST.getlist('childfirstname') print(query_dict_childfirstname) query_dict_childmiddlename=request.POST.getlist('childmiddlename') print(query_dict_childmiddlename) query_dict_childlastname=request.POST.getlist('childlastname') print('query_dict_childlastname',query_dict_childlastname) query_dict_childbirthdate=request.POST.getlist('childbirthdate') print('query_dict_childbirthdate',query_dict_childbirthdate) query_dict_childgender=request.POST.getlist('childgender') print('query_dict_childbirthdate',query_dict_childbirthdate) query_dict_childmaritalstatus=request.POST.getlist('childmaritalstatus') print('query_dict_childmaritalstatus',query_dict_childmaritalstatus) spousedob = validation_function.checkForNone(spousebirthDate) validspousefirstname=validation_function.check_is_valid_name(spousefirstName) if validspousefirstname is None : return render(request, 'form.html',{'spousefirstname_error':'Invalid name' }) validspouselastname=validation_function.check_is_valid_name(spouselastName) if validspouselastname is None : return render(request, 'form.html',{'spouselastname_error':'Invalid name' }) validspousemiddelname=validation_function.check_is_valid_name(spousemiddelName) if validspousemiddelname is None : return render(request, 'form.html',{'spousemiddelname_error':'Invalid name' }) # if spousepassport is not None and spousepassport.isalpha(): # #newspousepassport=spousepassport.isalpha() # print('spousepassport',spousepassport,'spousenationalId',spousenationalId) # #if newspousepassport : # print('error4') # passmsg="It takes only numeric value " # return render(request, 'form.html',{'passmsg':passmsg }) # elif spousepassport is not None and spousepassport.isnumeric(): # spousepassport=spousepassport # else: # spousepassport = None # if spousenationalId is not None and spousenationalId.isalpha(): # print('error5') # nationalmsg="It takes only numeric value" # return render(request, 'form.html',{'nationalmsg':nationalmsg }) # if spousenationalId is not None and spousenationalId.isnumeric(): # spousenationalId=spousenationalId # else: # spousenationalId = None spousepassportcheck=spousepassport.isalpha() if spousepassportcheck : print('error4') passmsg="It takes only numeric value " return render(request, 'form.html',{'passmsg':passmsg }) elif spousepassport =="": spousepassport = None else: spousepassport =spousepassport spousenationalIdcheck =spousenationalId.isalpha() if spousenationalIdcheck: print('error5') nationalmsg="It takes only numeric value" return render(request, 'Employee.html',{'nationalmsg':nationalmsg }) elif spousenationalId =="": spousenationalId = None else: spousenationalId =spousenationalId print('personal done') height= request.POST.get('height',None) weight=request.POST.get('weight',None) bloodGroup= request.POST.get('bloodgroup',None) print('family done') DateJoined = request.POST.get('datejoin',None) EndofProbation = request.POST.get('endofprobation',None) Position = request.POST.get('positiondd',None) JobStatusEffectiveDate = request.POST.get('jobstatuseffectivedate',None) LineManager = request.POST.get('linemanagedd',None) Department = request.POST.get('departmentdd',None) Branch = request.POST.get('branchdd',None) Level = request.POST.get('leveldd',None) JobType = request.POST.get('jobtypedd',None) EmploymentStatusEffectiveDate = request.POST.get('employmentstatuseffectivedate',None) JobStatus = request.POST.get('jobstatusdd',None) LeaveWorkflow = request.POST.get('leaveworkflowdd',None) Workdays = request.POST.get('workdays',None) Holidays = request.POST.get('holidaysdd',None) TermStart = request.POST.get('termstartdd',None) TermEnd = request.POST.get('termenddd',None) print(DateJoined,EndofProbation,Position,JobStatusEffectiveDate,LineManager,Department,Branch,Level,JobType,EmploymentStatusEffectiveDate,JobStatus,LeaveWorkflow,Workdays,Holidays,TermStart,TermEnd) if DateJoined is not None or DateJoined != "" and Position is not None or Position != "" and JobStatusEffectiveDate is not None or JobStatusEffectiveDate != "" and EmploymentStatusEffectiveDate is not None or EmploymentStatusEffectiveDate != "": newendofProbation=validation_function.checkForNone(EndofProbation) else: error6 = "This field is required" print('error6') return render(request,'form.html',{'error6':error6}) print('Job done') Email = request.POST.get('email') BlogHomepage = request.POST.get('bloghomepage') Office = request.POST.get('office') OfficeExtention = request.POST.get('officeextention') Mobile = request.POST.get('mobile') Home = request.POST.get('home') Address1 = request.POST.get('address1') Address2 = request.POST.get('address2') City = request.POST.get('city') PostCode = request.POST.get('postcode') State = request.POST.get('state') Country = request.POST.get('countrydd') FirstName = request.POST.get('firstname') LastName = request.POST.get('lastname') MiddleName = request.POST.get('middlename') Relationship = request.POST.get('coerelationship') MobilePhone = request.POST.get('coemobile') HousePhone = request.POST.get('coehousephone') OfficePhone = request.POST.get('officephone') if Country is not None or Country != "" and Mobile.isnumeric() and PostCode.isnumeric() and MobilePhone.isnumeric() and HousePhone.isnumeric() and OfficePhone.isnumeric(): print("valiate contact fields") # newOffice =validation_function.is_valid_phone(Office) # print('Office',Office) # print('newOffice',newOffice) # newMobile =validation_function.is_valid_phone(Mobile) # print('newMobile',newMobile) # newMobilePhone=validation_function.is_valid_phone(str(MobilePhone)) # newHousePhone =validation_function.is_valid_phone(str(HousePhone)) # newOfficePhone =validation_function.is_valid_phone(str(OfficePhone)) # validEmail=validation_function.is_valid_email(Email) # if validEmail is None: # emailfild=None # elif validEmail : # emailfild=Email # else: # print("error7") # return render(request, 'form.html',{'emailerror':'Invalid Email'}) # if newOffice is None: # officefield=None # elif newOffice: # officefield=Office # else: # print("error8") # return render(request, 'form.html',{'mobileerror':"Invalid Mobile no"}) # if newMobile is None: # mobilefield=None # elif newMobile: # mobilefield=mobile # else: # print("error9") # return render(request,'form.html',{'mobileerror':"Invalid Mobile no "}) # if newMobilePhone is None: # mobilePhonefield=None # elif newMobilePhone: # mobilePhonefield=mobilephone # else: # print("error10") # return render(request, 'form.html',{'mobileerror':"Invalid Mobile no "}) # if newHousePhone is None: # housephonefield=None # elif newHousePhone: # housephonefield=housephone # else: # print("error11") # return render(request, 'form.html',{'mobileerror':"Invalid Mobile no "}) # if newOfficePhone is None: # officephonefield=None # elif newOfficePhone: # officephonefield=officephone # else: # print("error12") # return render('request', form.html,{'mobileerror':"Invalid Mobile no "}) res = validation_function.is_valid_phone(str(Office)) if res is None or res != "errormsg" : officefield=res print(officefield, res) else: return render(request,'form1edit.html',{'contact_officeerror':"Enter valid number"}) res1 = validation_function.is_valid_phone(str(Mobile)) if res1 is None or res1 != "errormsg": mobilefield=res1 print(mobilefield,res1) else: return render(request,'form1edit.html',{'contact_officeerror':"Enter valid number"}) res2 = validation_function.is_valid_phone(str(Home)) if res2 is None or res2 != "errormsg": home=res2 print(home,res2) else: return render(request,'form1edit.html',{'contact_officeerror':"Enter valid number"}) res3 = validation_function.is_valid_phone(str(MobilePhone)) if res3 is None or res3 != "errormsg": mobilePhonefield=res3 print(mobilePhonefield,res3) else: return render(request,'form1edit.html',{'contact_officeerror':"Enter valid number"}) res4 = validation_function.is_valid_phone(str(HousePhone)) if res4 is None or res4 != "errormsg": housephonefield=res4 print(housephonefield,res4) else: return render(request,'form1edit.html',{'contact_officeerror':"Enter valid number"}) res5 = validation_function.is_valid_phone(str(OfficePhone)) if res5 is None or res5 != "errormsg": officephonefield=res5 print(officephonefield,res5) else: return render(request,'form1edit.html',{'contact_officeerror':"Enter valid number"}) email_check = validation_function.is_valid_email(Email) if email_check is None or email_check != "errormsg": emailfild=email_check print(emailfild,email_check) else: return render(request,'form.html',{'contact_officeerror':"Enter valid number"}) newPostCode =validation_function.checkForNone(PostCode) print('newPostCode',newPostCode) print('Contact done') obj = employee.objects.create(employeementId=employeeId,employeeFirstName=firstName,employeeMiddelName=middelName,employeeLastName=lastName,employeeGender=gender,employeeBirthDate=birthDate,employeeNationality=nationality,employeeNationalId=nationalId,employeePassport=passport,employeeEthnicity=ethnicity,employeeReligion=religion, employeePhoto=photo) employeeHealth.objects.create(employeeForeignId=obj,employeeHealthHeight=height,employeeHealthWeight=weight,employeeHealthBloodGroup=bloodGroup) employeeFamily.objects.create(employeeForeignId=obj,employeeFamilyMaritalStatus=maritalStatus,employeeFamilyNumberOfChild=numberOfChild,employeeFamilySpouseWorking=spouseWorking,employeeFamilySpouseFirstName=spousefirstName,employeeFamilySpouseMiddelName=spousemiddelName,employeeFamilySpouseLastName=spouselastName,employeeFamilySpouseBirthDate=spousedob,employeeFamilySpouseNationality=spousenationality,employeeFamilySpouseNationalId=spousenationalId ,employeeFamilySpousePassport=spousepassport,employeeFamilySpouseEthnicity=spouseethnicity,employeeFamilySpouseReligion=spousereligion) insert_list=[] print("obj", obj) for i in range(len(query_dict_childfirstname)): newchildbirthdate = validation_function.checkForNone(query_dict_childbirthdate[i]) insert_list.append(employeeChildren(employeeForeignId=obj,employeeChildrenFirstName=query_dict_childfirstname[i],employeeChildrenMiddelName=query_dict_childmiddlename[i],employeeChildrenLastName=query_dict_childlastname[i],employeeChildrenBirthDate=newchildbirthdate,employeeChildrenGender=query_dict_childgender[i],employeeChildrenMaritalStatus=query_dict_childmaritalstatus[i]),) employeeChildren.objects.bulk_create(insert_list) print('insert_list',insert_list) Job.objects.create(employeeForeignId=obj,dateJoined=DateJoined,endofProbation=newendofProbation,position=Position,jobStatusEffectiveDate=JobStatusEffectiveDate,lineManager=LineManager,department=Department,branch=Branch,level=Level,jobType=JobType,employmentStatusEffectiveDate=EmploymentStatusEffectiveDate,jobStatus=JobStatus,leaveWorkflow=LeaveWorkflow,workdays=Workdays,holidays=Holidays,termStart=TermStart,termEnd=TermEnd) Contact.objects.create(employeeForeignId=obj,email=emailfild,blogHomepage=BlogHomepage,office=officefield,officeExtention=OfficeExtention,mobile=mobilefield,home=Home,address1=Address1,address2=Address2,city=City,postCode=newPostCode,state=State,country=Country, firstName=FirstName,lastName=LastName,middleName=MiddleName,relationship=Relationship,mobilePhone=mobilePhonefield,housePhone=housephonefield,officePhone=officephonefield) return redirect('/newapp/home') else: print("get") def editFun(request,employeementId): if not request.user.is_authenticated: return redirect('/newapp/login') else: if request.method == "POST": print(employeementId) employee_obj =employee.objects.filter(employeementId = employeementId).first() if employee_obj is None: print("user is not exist") return render(request,'error.html',{'error':'User not exist'}) firstName= request.POST.get('firstname',None) middelName= request.POST.get('middlename',None) lastName= request.POST.get('lastname',None) gender= request.POST.get('gender',None) birthDate= request.POST.get('birthdate',None) nationality= request.POST.get('nationality',None) passport= request.POST.get('passport',None) nationalId= request.POST.get('nationalid',None) ethnicity= request.POST.get('ethnicity',None) religion= request.POST.get('religion',None) photo=request.FILES.get('photo') passportcheck=passport.isalpha() if passportcheck : print('error2') passmsg="It takes only numeric value " return render(request ,'form1edit.html ',{'action':"/newapp/editFun" ,'spousepassport_error':"Only numeric values are allowed"}) nationalIdcheck =nationalId.isalpha() if nationalIdcheck: print('error3') nationalmsg="It takes only numeric value" return render(request ,'form1edit.html ',{'action':"/newapp/editFun" ,'spousepassport_error':"Only numeric values are allowed"}) maritalStatus=request.POST.get('maritalstatus',None) numberOfChild=request.POST.get('numbeofchild',None) spouseWorking=request.POST.get('spouseworking',None) spousefirstName= request.POST.get('spousefirstname',None) spousemiddelName= request.POST.get('spousemiddlename',None) spouselastName= request.POST.get('spouselastname',None) spousebirthDate= request.POST.get('spousebirthdate',None) spousenationality= request.POST.get('spousenationality',None) spousepassport= request.POST.get('spousepassport',None) spousenationalId= request.POST.get('spousenationalid',None) spouseethnicity= request.POST.get('spouseethnicity',None) spousereligion= request.POST.get('spousereligion',None) query_dict_childfirstname=request.POST.getlist('childfirstname') query_dict_childmiddlename=request.POST.getlist('childmiddlename') query_dict_childlastname=request.POST.getlist('childlastname') query_dict_childbirthdate=request.POST.getlist('childbirthdate') query_dict_childgender=request.POST.getlist('childgender') query_dict_childmaritalstatus=request.POST.getlist('childmaritalstatus') spousedob = validation_function.checkForNone(spousebirthDate) if spousepassport is None or spousepassport =="": newspousepassport=None else: if spousepassport.isnumeric(): newspousepassport=spousepassport else: print("in spousepassport") error ="Only numeric values are allowed " return render(request ,'form1edit.html ',{'action':"/newapp/editFun" ,'spousepassport_error':error}) print('spousepassport-->',spousepassport, type(spousepassport),'newspousepassport',newspousepassport) if spousenationalId is None or spousenationalId =="": newspousenationalId=None else: if spousenationalId.isnumeric(): newspousenationalId=spousenationalId else: print("in spousenationalid") error ="Only numeric values are allowed " return render(request,'form1edit.html',{'action':"/newapp/editFun",'newspousenationalId_error':error}) print('spousenationalId-->',spousenationalId, type(spousenationalId),'newspousenationalId-->',newspousenationalId) DateJoined = request.POST.get('datejoin',None) EndofProbation = request.POST.get('endofprobation',None) Position = request.POST.get('positiondd',None) JobStatusEffectiveDate = request.POST.get('jobstatuseffectivedate',None) LineManager = request.POST.get('linemanagedd',None) Department = request.POST.get('departmentdd',None) Branch = request.POST.get('branchdd',None) Level = request.POST.get('leveldd',None) JobType = request.POST.get('jobtypedd',None) EmploymentStatusEffectiveDate = request.POST.get('employmentstatuseffectivedate',None) SpouseJobStatus = request.POST.get('jobstatusdd',None) LeaveWorkflow = request.POST.get('leaveworkflowdd',None) Workdays = request.POST.get('workdays',None) Holidays = request.POST.get('holidaysdd',None) TermStart = request.POST.get('termstartdd',None) TermEnd = request.POST.get('termenddd',None) if DateJoined is not None or DateJoined != "" and Position is not None or Position != "" and JobStatusEffectiveDate is not None or JobStatusEffectiveDate != "" and EmploymentStatusEffectiveDate is not None or EmploymentStatusEffectiveDate != "": if EndofProbation is not None and EndofProbation != '': newendofProbation=EndofProbation else: print("in EndofProbation") error= "This filed is required" return render(request,'form1edit.html',{'action':"/newapp/editFun",'joberror':error}) print('newendofProbation',newendofProbation) Email = request.POST.get('email') BlogHomepage = request.POST.get('bloghomepage') Office = request.POST.get('office') OfficeExtention = request.POST.get('officeextention') Mobile = request.POST.get('mobile') print('Mobile',Mobile) Home = request.POST.get('home') print('Home',Home) Address1 = request.POST.get('address1') Address2 = request.POST.get('address2') City = request.POST.get('city') PostCode = request.POST.get('postcode') print('PostCode',PostCode) State = request.POST.get('state') Country = request.POST.get('countrydd') FirstName = request.POST.get('firstname') LastName = request.POST.get('lastname') MiddleName = request.POST.get('middlename') Relationship = request.POST.get('coerelationship') MobilePhone = request.POST.get('coemobile') HousePhone = request.POST.get('coehousephone') OfficePhone = request.POST.get('officephone') print(Email,"OfficePhone->", type(OfficePhone),OfficePhone,"HousePhone",HousePhone, type(HousePhone),MobilePhone,type(MobilePhone),PostCode,type(PostCode),Mobile,type(Mobile)) if Country is not None or Country != "" and Mobile.isnumeric() and PostCode.isnumeric() and MobilePhone.isnumeric() and HousePhone.isnumeric() and OfficePhone.isnumeric(): res = validation_function.is_valid_phone(Office) if res is None or res != "errormsg": newOffice=res else: return render(request,'form1edit.html',{'contact_officeerror':"Enter valid number"}) res1 = validation_function.is_valid_phone(Mobile) if res1 is None or res1 != "errormsg": newMobile=res1 else: return render(request,'form1edit.html',{'contact_officeerror':"Enter valid number"}) res2 = validation_function.is_valid_phone(Home) if res2 is None or res2 != "errormsg": newHome=res2 else: return render(request,'form1edit.html',{'contact_officeerror':"Enter valid number"}) res3 = validation_function.is_valid_phone(MobilePhone) if res3 is None or res3 != "errormsg": newMobilePhone=res3 else: return render(request,'form1edit.html',{'contact_officeerror':"Enter valid number"}) res4 = validation_function.is_valid_phone(HousePhone) if res4 is None or res4 != "errormsg": newHousePhone=res4 else: return render(request,'form1edit.html',{'contact_officeerror':"Enter valid number"}) res5 = validation_function.is_valid_phone(OfficePhone) if res5 is None or res5 != "errormsg": newOfficePhone_edit=res5 else: return render(request,'form1edit.html',{'contact_officeerror':"Enter valid number"}) email_check = validation_function.is_valid_email(Email) if email_check is None or email_check != "errormsg": verifiedemail=email_check else: return render(request,'form1edit.html',{'contact_officeerror':"Enter valid number"}) height= request.POST.get('height',None) weight=request.POST.get('weight',None) bloodGroup= request.POST.get('bloodgroup',None) print('newOffice---->',newOffice,'newMobile--->',newMobile,'newOfficePhone_edit-->',newOfficePhone_edit,'newPostCode---->',newPostCode,'newMobilePhone--->',newMobilePhone,'HousePhone-->',newHousePhone) employeeHealth.objects.filter(employeeForeignId=employee_obj).update(employeeHealthHeight=height,employeeHealthWeight=weight,employeeHealthBloodGroup=bloodGroup) Contact.objects.filter(employeeForeignId=employee_obj).update(email=verifiedemail,blogHomepage=BlogHomepage,office=newOffice,officeExtention=OfficeExtention,mobile=newMobile,home=Home,address1=Address1,address2=Address2,city=City,postCode=newPostCode,state=State,country=Country, firstName=FirstName,lastName=LastName,middleName=MiddleName,relationship=Relationship,mobilePhone=newMobilePhone,housePhone=HousePhone,officePhone=newOfficePhone_edit) employee.objects.filter(employeementId=employee_obj).update(employeeFirstName=firstName,employeeMiddelName=middelName,employeeLastName=lastName,employeeGender=gender,employeeBirthDate=birthDate,employeeNationality=nationality,employeeNationalId=nationalId,employeePassport=newpassport,employeeEthnicity=ethnicity,employeeReligion=religion, employeePhoto=photo) employeeFamily.objects.filter(employeeForeignId=employee_obj).update(employeeFamilyMaritalStatus=maritalStatus,employeeFamilyNumberOfChild=numberOfChild,employeeFamilySpouseWorking=spouseWorking,employeeFamilySpouseFirstName=spousefirstName,employeeFamilySpouseMiddelName=spousemiddelName,employeeFamilySpouseLastName=spouselastName,employeeFamilySpouseBirthDate=spousedob,employeeFamilySpouseNationality=spousenationality,employeeFamilySpouseNationalId=newspousenationalId,employeeFamilySpousePassport=newspousepassport,employeeFamilySpouseEthnicity=spouseethnicity,employeeFamilySpouseReligion=spousereligion) Job.objects.filter(employeeForeignId=employee_obj).update(dateJoined=DateJoined,endofProbation=newendofProbation,position=Position,jobStatusEffectiveDate=JobStatusEffectiveDate,lineManager=LineManager,department=Department,branch=Branch,level=Level,jobType=JobType,employmentStatusEffectiveDate=EmploymentStatusEffectiveDate,jobStatus=SpouseJobStatus,leaveWorkflow=LeaveWorkflow,workdays=Workdays,holidays=Holidays,termStart=TermStart,termEnd=TermEnd) for i in range(len(query_dict_childfirstname)): newchildbirthdate = validation_function.checkForNone(query_dict_childbirthdate[i]) # employeeChildren.objects.bulk_update([employeeForeignId=employee_obj,[employeeChildrenFirstName=query_dict_childfirstname[i]],[employeeChildrenMiddelName=query_dict_childmiddlename[i]],[employeeChildrenLastName=query_dict_childlastname[i]],[employeeChildrenBirthDate=newchildbirthdate],[employeeChildrenGender=query_dict_childgender[i]],[employeeChildrenMaritalStatus=query_dict_childmaritalstatus[i]]]) # @csrf_exempt # def forgotPassword(request): # username = request.POST.get('username', None) # if username is None or username == '': # return redirect('/newapp/login') # user= User.objects.filter(username=username).first() # if user is None : # return render(request,'login.html') # else: # return render(request, 'newpassword.html' )
{"/employeeDetails/personaldetails.py": ["/employeeDetails/models.py"], "/employeeDetails/views.py": ["/employeeDetails/models.py"]}
9,225
riya2802/newapp
refs/heads/master
/employeeDetails/views.py
from django.shortcuts import render from django.contrib.auth.models import User from .models import numberOfChild, maritalStatus,bloodGroup,department, branch, position,level,lineManager, holiDays,leaveWorkFlow,workDays,jobStatus, jobType, religion, ethnicity, country, employee,employeeFamily,employeeChildren,employeeHealth,Contact,Job,nationality from . import personaldetails from django.shortcuts import render, redirect from . import validation_function from django.http import HttpResponse, JsonResponse from django.views.decorators.csrf import csrf_exempt import base64 from datetime import date,datetime from django.contrib.auth import authenticate, login, logout import json from django.core.paginator import Paginator import io from django.http import FileResponse from reportlab.pdfgen import canvas from django.shortcuts import render import reportlab from django.template.loader import get_template from . import createpdf from createpdf import render_to_pdf from django_xhtml2pdf.utils import pdf_decorator # accept ajax request to check username is valid @csrf_exempt def isuserIdcorrect(request): strdata= request.POST.get('request_data') print('strdata',strdata) print("requestcome") user_obj = employee.objects.filter(employeementId = strdata).first() checkUsername= validation_function.is_valid_username(strdata) if user_obj: return JsonResponse({'data':True}) elif checkUsername is None: return JsonResponse({'data':False}) else: return JsonResponse({'data':False}) @csrf_exempt def loginFun(request): print(request.method) if request.method == "POST": username = request.POST.get('username') password = request.POST.get('password') user_obj =User.objects.filter(username=username).first() if user_obj is None: return redirect('/newapp/login') user = authenticate(username =user_obj.username, password= password ) if not user: return render(request, 'login.html',) login(request,user) return redirect('/newapp/home') # print(request.user.username) # return JsonResponse({'msg':'login user','status':200}) else: error="Method is not allow" return render(request,'login.html') #return render(request, 'error.html', {'error':error }) @csrf_exempt def logoutFun(request): logout(request) return redirect('/newapp/home') @csrf_exempt def checking(request): return render(request,'old correct form - Copy.html') def home(request): if not request.user.is_authenticated: return render(request,'home.html',{'login_button_url':'/newapp/login','button_text':'Login'}) return render(request,'home.html',{'login_button_url':'/newapp/logout','button_text':'Logout'}) ## -------------------------------------------------------------------------------------------------------- #persondetails validation @csrf_exempt def personalAjaxRequest(request): # if not request.user.is_authenticated: # print('not authenticate') # #return redirect('/newapp/login') # return JsonResponse({'msg':'User is not authenticated','status':400}) print(request.POST) if request.method == "POST": employeementId= request.POST.get('employeeid',None) print('employeementId',employeementId) firstName= request.POST.get('firstname',None) print('firstName',firstName) middelName= request.POST.get('middlename',None) print('middelName',middelName) lastName= request.POST.get('lastname',None) print('lastName',lastName) gender= request.POST.get('gendern',None) print('gender',gender) birthDate= request.POST.get('birthdate',None) print('birthDate',birthDate) print('birthDate',birthDate, type(birthDate)) nationality= request.POST.get('nationalitydd',None) print('nationality',nationality) passport= request.POST.get('passport') print('passport',passport) nationalId= request.POST.get('nationalid',None) print('nationalId',nationalId) ethnicity= request.POST.get('ethnicity',None) print('ethnicity',ethnicity) religion= request.POST.get('religion',None) print('religion',religion) photo=request.FILES.get('image') print('photo',photo) print("passport",passport) print('nationalId',nationalId) print('middelName',middelName) if employeementId is None or employeementId =="" or firstName is None or firstName=="" or lastName is None or lastName=="" or gender is None or gender=="" or birthDate is None or birthDate=="" or nationality=="" or nationality is None or nationalId is None or nationalId =="" : print('employeementId',employeementId,'firstName',firstName,'lastName',lastName,'gender',gender,'birthDate',birthDate,'nationality',nationality,'nationalId',nationalId) return JsonResponse({'msg':'Required fields empty !','status':400}) if not validation_function.check_employeeId(employeementId): return JsonResponse({'msg':'Invalid Id , Id should be numeric ','status':400}) if not validation_function.check_is_valid_name(firstName) : return JsonResponse({'msg':'Invalid First name !','status':400}) if not validation_function.check_is_valid_name(middelName): return JsonResponse({'msg':'Invalid Middle Name !','status':400}) if not validation_function.check_is_valid_name(lastName): return JsonResponse({'msg':'Invalid Last Name !','status':400}) if not validation_function.is_date(birthDate): return JsonResponse({'msg':'Invalid Date Format !','status':400}) if validation_function.calculateAge(datetime.strptime(birthDate, '%Y-%m-%d')) < 18 : return JsonResponse({'msg':'Your age is less then 18 years !','status':400}) if not validation_function.is_valid_passport(passport): return JsonResponse({'msg':' passport no is not valid !','status':400}) if not validation_function.is_valid_national(nationalId): return JsonResponse({'msg':' National no is not valid !','status':400}) employee_obj =employee.objects.filter(employeementId = employeementId,status='Success').first()#check request is comming for edit user details print('employee_obj',employee_obj) if employee_obj: employee_obj.employeeFirstName=firstName employee_obj.employeeMiddelName=middelName employee_obj.employeeLastName=lastName employee_obj.employeeGender=gender employee_obj.employeeBirthDate=birthDate employee_obj.employeeNationality=nationality employee_obj.employeeNationalId=nationalId employee_obj.employeePassport=passport employee_obj.employeeEthnicity=ethnicity employee_obj.employeeReligion=religion # employee_obj.employeePhoto=photo employee_obj.status="Pending" employee_obj.save() old_image_Name = employee_obj.employeePhoto if 'image' in request.FILES: employee_obj.employeePhoto=photo else: employee_obj.employeePhoto=old_image_Name employee_obj.save() return JsonResponse({'msg':'success','status':200,'empID':employee_obj.employeeId}) updateobj = employee.objects.filter(employeementId = employeementId,status='Pending').first() if updateobj: # old_image_Name = employee_obj.employeePhoto # if 'image' in request.FILES: # updateobj.employeePhoto=photo # else: # updateobj.employeePhoto=old_image_Name updateobj.employeeFirstName=firstName updateobj.employeeMiddelName=middelName updateobj.employeeLastName=lastName updateobj.employeeGender=gender updateobj.employeeBirthDate=birthDate updateobj.employeeNationalId=nationalId updateobj.employeeNationality=nationality updateobj.employeePassport=passport updateobj.employeeEthnicity=ethnicity updateobj.employeeReligion=religion updateobj.employeePhoto=photo updateobj.status="Pending" updateobj.save() # if 'image' in request.FILES: # employee_obj.employeePhoto=photo # else: # employee_obj.employeePhoto=old_image_Name # employee_obj.save() print('updateobj.employeeFirstName',updateobj.employeeId) print(type(updateobj)) print("updateobj.employeeId",updateobj.employeeId) return JsonResponse({'msg':'success','status':200,'empID':updateobj.employeeId}) obj_E = employee.objects.create(employeementId=employeementId,employeeFirstName=firstName,employeeMiddelName=middelName,employeeLastName=lastName,employeeGender=gender,employeeBirthDate=birthDate,employeeNationality=nationality,employeeNationalId=nationalId,employeePassport=passport,employeeEthnicity=ethnicity,employeeReligion=religion,employeePhoto=photo,status="Pending") print('empID',obj_E.employeeId) return JsonResponse({'msg':'success','status':200,'empID':obj_E.employeeId}) #------------------------------------------------------ @csrf_exempt def familyAjaxRequest(request): # if not request.user.is_authenticated: # return redirect('/newapp/login') print(request.POST.get('data[empid]')) if request.method == "POST": employee_empid=request.POST.get('data[empid]',None) print('employee_empid',employee_empid) print('request.POST',request.POST) obj =employee.objects.filter(employeeId = employee_empid).first() if not obj: return JsonResponse({'msg':'Id not exist!','status':400}) maritalStatus=request.POST.get('data[maritalstatus]',None) print('maritalStatus',maritalStatus) numberOfChild=request.POST.get('data[numberofchild]',None) print('numberOfChild',numberOfChild,type(numberOfChild)) spouseWorking=request.POST.get('data[spouseworking]',None) print('spouseWorking',spouseWorking) spousefirstName= request.POST.get('data[spousefirstname]',None) print('spousefirstName',spousefirstName) spousemiddelName= request.POST.get('data[spousemiddlename]',None) print('spousemiddelName',spousemiddelName) spouselastName= request.POST.get('data[spouselastname]',None) print('spouselastName',spouselastName) spousebirthDate= request.POST.get('data[spousebirthdate]',None) print('spousebirthDate',spousebirthDate) print('spousebirthDate',spousebirthDate,type(spousebirthDate)) spousenationality= request.POST.get('data[spousenationality]',None) print('spousenationality',spousenationality) spousepassport= request.POST.get('data[spousepassport]') print('spousepassport',spousepassport) spousenationalId= request.POST.get('data[spousenationalid]') print('spousenationalId',spousenationalId) spouseethnicity= request.POST.get('data[spouseethnicity]',None) print('spouseethnicity',spouseethnicity) spousereligion= request.POST.get('data[spouserelegion]',None) print('spousereligion',spousereligion) if not employee_empid: return JsonResponse({'msg':' Employee Id field Empty!','status':400}) # if spousenationality is None or spousenationality =="": # return JsonResponse({'msg':' spouse Nationality number is Required field !','status':400}) if not validation_function.check_is_valid_name(spousefirstName) : print("error1") return JsonResponse({'msg':'First name only takes alphabets !','status':400}) if not validation_function.check_is_valid_name(spousemiddelName): print("error2") return JsonResponse({'msg':'Middle Name name only takes alphabets !','status':400}) if not validation_function.check_is_valid_name(spouselastName): print("error3") return JsonResponse({'msg':'Last name only takes alphabets !','status':400}) if spousebirthDate is not None and spousebirthDate != '': spousebirthDate=spousebirthDate else: spousebirthDate=None if not validation_function.is_valid_passport(spousepassport): print("error5") return JsonResponse({'msg':' passport no is not valid !','status':400}) if spousenationalId == None or spousenationalId =="": spousenationalId = spousenationalId else: if not validation_function.is_valid_national(spousenationalId): print("error6") return JsonResponse({'msg':' national ID is not valid !','status':400}) print('maritalStatus',maritalStatus,'numberOfChild',numberOfChild,'spouseWorking',spouseWorking,'spousefirstName',spousefirstName,'spousemiddelName') #if numberOfChild > 0 and maritalStatus == "Merried": # query_dict_childkey = request.POST.getlist('childkey[]') query_dict_childfirstname=request.POST.getlist('childfirstname[]') query_dict_childmiddlename=request.POST.getlist('childmiddlename[]') query_dict_childlastname=request.POST.getlist('childlastname[]') query_dict_childbirthdate=request.POST.getlist('childbirthdate[]') query_dict_childgender=request.POST.getlist('childgender[]') query_dict_childmaritalstatus=request.POST.getlist('childmaritalstatus[]') print("check") print('query_dict_childfirstname',query_dict_childfirstname) print('query_dict_childmiddlename',query_dict_childmiddlename) print('query_dict_childmiddlename',query_dict_childmiddlename) print('query_dict_childbirthdate',query_dict_childbirthdate) print('query_dict_childgender',query_dict_childgender) print('query_dict_childmaritalstatus',query_dict_childmaritalstatus) insert_list=[] check_child = employeeChildren.objects.filter(employeeForeignId=obj) for i in range(len(query_dict_childfirstname)): if check_child : print(check_child) employeeChildren.objects.filter(employeeForeignId=obj).delete() print(query_dict_childfirstname[i]) newchildbirthdate = validation_function.checkForNone(query_dict_childbirthdate[i]) if not validation_function.check_is_valid_name(query_dict_childfirstname[i]) : return JsonResponse({'msg':' child First name only takes alphabets !','status':400}) if not validation_function.check_is_valid_name(query_dict_childmiddlename[i]): return JsonResponse({'msg':' childMiddle Name name only takes alphabets !','status':400}) if not validation_function.check_is_valid_name(query_dict_childlastname[i]): return JsonResponse({'msg':'childLast name only takes alphabets !','status':400}) insert_list.append(employeeChildren(employeeForeignId=obj,employeeChildrenFirstName=query_dict_childfirstname[i],employeeChildrenMiddelName=query_dict_childmiddlename[i],employeeChildrenLastName=query_dict_childlastname[i],employeeChildrenBirthDate=newchildbirthdate,employeeChildrenGender=query_dict_childgender[i],employeeChildrenMaritalStatus=query_dict_childmaritalstatus[i]),) employeeChildren.objects.bulk_create(insert_list) print('insert_list',insert_list) checkEmployee =employeeFamily.objects.filter(employeeForeignId = obj).update(employeeFamilyMaritalStatus=maritalStatus,employeeFamilyNumberOfChild=numberOfChild,employeeFamilySpouseWorking=spouseWorking,employeeFamilySpouseFirstName=spousefirstName,employeeFamilySpouseMiddelName=spousemiddelName,employeeFamilySpouseLastName=spouselastName,employeeFamilySpouseBirthDate=spousebirthDate,employeeFamilySpouseNationality=spousenationality,employeeFamilySpouseNationalId=spousenationalId ,employeeFamilySpousePassport=spousepassport,employeeFamilySpouseEthnicity=spouseethnicity,employeeFamilySpouseReligion=spousereligion) if checkEmployee: return JsonResponse({'msg':'success','status':200,'empID':employee_empid}) employeeFamily.objects.create(employeeForeignId=obj, employeeFamilyMaritalStatus=maritalStatus,employeeFamilyNumberOfChild=numberOfChild,employeeFamilySpouseWorking=spouseWorking,employeeFamilySpouseFirstName=spousefirstName,employeeFamilySpouseMiddelName=spousemiddelName,employeeFamilySpouseLastName=spouselastName,employeeFamilySpouseBirthDate=spousebirthDate,employeeFamilySpouseNationality=spousenationality,employeeFamilySpouseNationalId=spousenationalId ,employeeFamilySpousePassport=spousepassport,employeeFamilySpouseEthnicity=spouseethnicity,employeeFamilySpouseReligion=spousereligion) return JsonResponse({'msg':'success','status':200,'empID':employee_empid}) #---------------------------------------------------------------- @csrf_exempt def jobAjaxRequest(request): print("in") # if not request.user.is_authenticated: # return redirect('/newapp/login') if request.method == "POST": employeementId_obj=request.POST.get('empid') print('employeementId_obj',employeementId_obj) if not employeementId_obj: return JsonResponse({'msg':' emplaoyee Id field Empty!','status':400}) obj =employee.objects.filter(employeeId = employeementId_obj).first() if not obj: return JsonResponse({'msg':'Id not exist!','status':400}) print('request.POST',request.POST) DateJoined = request.POST.get('datejoin',None) print('DateJoined',DateJoined) EndofProbation = request.POST.get('endofprobation',None) print('EndofProbation',EndofProbation) print('EndofProbation',EndofProbation,type(EndofProbation)) Position = request.POST.get('positiondd',None) print('Position',Position) JobStatusEffectiveDate = request.POST.get('jobstatuseffectivedate',None) print('JobStatusEffectiveDate',JobStatusEffectiveDate) print('JobStatusEffectiveDate',JobStatusEffectiveDate,type(JobStatusEffectiveDate)) LineManager = request.POST.get('linemanagedd',None) print('LineManager',LineManager) Department = request.POST.get('departmentdd',None) print('Department',Department) Branch = request.POST.get('branchdd',None) print('Branch',Branch) Level = request.POST.get('leveldd',None) print('Level',Level) JobType = request.POST.get('jobtypedd',None) print('JobType',religion) EmploymentStatusEffectiveDate = request.POST.get('employmentstatuseffectivedate',None) print('EmploymentStatusEffectiveDate',EmploymentStatusEffectiveDate, type(EmploymentStatusEffectiveDate)) JobStatus = request.POST.get('jobstatusdd',None) print('JobStatus',JobStatus) LeaveWorkflow = request.POST.get('leaveworkflowdd',None) print('LeaveWorkflow',LeaveWorkflow) Workdays = request.POST.get('workdays',None) print('Workdays',Workdays) Holidays = request.POST.get('holidaysdd',None) print('Holidays',Holidays) TermStart = request.POST.get('termstartdd',None) print('TermStart',TermStart) TermEnd = request.POST.get('termend',None) print('TermEnd',TermEnd) print('EmploymentStatusEffectiveDate',EmploymentStatusEffectiveDate,'DateJoined',DateJoined,'Position',Position,'JobStatusEffectiveDate',JobStatusEffectiveDate) if employeementId_obj is None or employeementId_obj=="" and DateJoined is None or DateJoined == "" and Position is None or Position == "" and JobStatusEffectiveDate is None or JobStatusEffectiveDate == "" and EmploymentStatusEffectiveDate is None or EmploymentStatusEffectiveDate == "": return JsonResponse({'msg':'Required fields empty !','status':400}) if EndofProbation is not None and EndofProbation != '': if not validation_function.end_of_probation(EndofProbation,DateJoined): return JsonResponse({'msg':'Invalid probation date','status':400}) else: newendofProbation = EndofProbation else: newendofProbation=None if not validation_function.check_join_date(DateJoined,obj.employeeBirthDate): return JsonResponse({'msg':'Invalid joining date','status':400}) if not validation_function.calculate_Effective_date(JobStatusEffectiveDate): print("job status effective date") return JsonResponse({'msg':'Invalid Job Effective date','status':400}) if not validation_function.calculate_Effective_date(EmploymentStatusEffectiveDate): print("employee effective date ") return JsonResponse({'msg':'Invalid emplaoyee Effective date','status':400}) checkJob =Job.objects.filter(employeeForeignId = obj).update(dateJoined=DateJoined,endofProbation=newendofProbation,position=Position,jobStatusEffectiveDate=JobStatusEffectiveDate,lineManager=LineManager,department=Department,branch=Branch,level=Level,jobType=JobType,employmentStatusEffectiveDate=EmploymentStatusEffectiveDate,jobStatus=JobStatus,leaveWorkflow=LeaveWorkflow,workdays=Workdays,holidays=Holidays,termStart=TermStart,termEnd=TermEnd) if checkJob: return JsonResponse({'msg':'success','status':200,'empID':employeementId_obj}) Job.objects.create(employeeForeignId=obj,dateJoined=DateJoined,endofProbation=newendofProbation,position=Position,jobStatusEffectiveDate=JobStatusEffectiveDate,lineManager=LineManager,department=Department,branch=Branch,level=Level,jobType=JobType,employmentStatusEffectiveDate=EmploymentStatusEffectiveDate,jobStatus=JobStatus,leaveWorkflow=LeaveWorkflow,workdays=Workdays,holidays=Holidays,termStart=TermStart,termEnd=TermEnd) return JsonResponse({'msg':'success','status':200,'empID':employeementId_obj}) #---------------------------------------------------------------------------- @csrf_exempt def contactAjaxRequest(request): # if not request.user.is_authenticated: # return redirect('/newapp/login') if request.method == "POST": employeementId_obj=request.POST.get('empid',None) if not employeementId_obj: return JsonResponse({'msg':' emplaoyee Id field Empty!','status':400}) print('employeementId_obj',employeementId_obj) obj =employee.objects.filter(employeeId = employeementId_obj).first() print('obj',obj) Email = request.POST.get('email') print('Email',Email) BlogHomepage = request.POST.get('bloghomepage') print('BlogHomepage',BlogHomepage,type(BlogHomepage)) Office = request.POST.get('office') print('Office',Office,type(Office)) OfficeExtention = request.POST.get('officeextention') print('OfficeExtention',OfficeExtention,type(OfficeExtention)) Mobile = request.POST.get('mobile') print('Mobile',Mobile,type(Mobile)) Home = request.POST.get('home') print('Home',Home) Address1 = request.POST.get('address1') print('Address1',Address1) Address2 = request.POST.get('address2') print('Address2',Address2) City = request.POST.get('city') print('City',City) PostCode = request.POST.get('postcode') print('PostCode',PostCode,type(PostCode)) State = request.POST.get('state') print('State',State) Country = request.POST.get('countrydd') print('Country',Country) contactFirstName = request.POST.get('coefirstname') print('contactFirstName',contactFirstName) contactLastName = request.POST.get('coelastname') print('contactLastName',contactLastName) conatctMiddleName = request.POST.get('coemiddlename') print('conatctMiddleName',conatctMiddleName) Relationship = request.POST.get('coerelationship') print('Relationship',Relationship) MobilePhone = request.POST.get('coemobile') print('MobilePhone',MobilePhone) HousePhone = request.POST.get('coehousephone') print('HousePhone',HousePhone) OfficePhone = request.POST.get('coeofficephone') print('OfficePhone',OfficePhone) print('OfficePhone',OfficePhone) print(Email,"OfficePhone->", type(OfficePhone),OfficePhone,"HousePhone",HousePhone, type(HousePhone),MobilePhone,type(MobilePhone),PostCode,type(PostCode),Mobile,type(Mobile)) if Country is None or Country == "" : return JsonResponse({'msg':'Required fields empty !','status':400}) if not validation_function.is_valid_phone(str(Office)): return JsonResponse({'msg':'Invalid office Number !','status':400}) if not validation_function.is_valid_phone(str(Mobile)): return JsonResponse({'msg':'Invalid Mobile Number !','status':400}) if not validation_function.is_valid_phone(str(Home)): return JsonResponse({'msg':'Invalid Home Number !','status':400}) if not validation_function.is_valid_phone(str(MobilePhone)): return JsonResponse({'msg':'Invalid MobilePhone Number !','status':400}) if not validation_function.is_valid_phone(str(HousePhone)): return JsonResponse({'msg':'Invalid HousePhone Number !','status':400}) if not validation_function.is_valid_phone(str(OfficePhone)): return JsonResponse({'msg':'Invalid OfficePhone Number !','status':400}) if not validation_function.is_valid_phone(str(OfficeExtention)): return JsonResponse({'msg':'Invalid OfficeExtention Number !','status':400}) if not validation_function.is_valid_postcode(PostCode): return JsonResponse({'msg':'Invalid Postcode !','status':400}) if Email == "" or Email == None : Email = Email else: if not validation_function.is_valid_email(Email): return JsonResponse({'msg':'Invalid Email !','status':400}) currentuseremail = Contact.objects.filter(email=Email,employeeForeignId=employeementId_obj).first() if not currentuseremail: checkDuplicateEmail=Contact.objects.filter(email=Email).first() if checkDuplicateEmail: return JsonResponse({'msg':'Email already exist !','status':400}) if not validation_function.check_is_valid_name(contactFirstName) : return JsonResponse({'msg':'First name only takes alphabets !','status':400}) if not validation_function.check_is_valid_name(contactLastName): return JsonResponse({'msg':'LastName name only takes alphabets !','status':400}) if not validation_function.check_is_valid_name(conatctMiddleName): return JsonResponse({'msg':'Middle name only takes alphabets !','status':400}) checkContact =Contact.objects.filter(employeeForeignId = obj).update(email=Email,blogHomepage=BlogHomepage,office=Office,officeExtention=OfficeExtention,mobile=Mobile,home=Home,address1=Address1,address2=Address2,city=City,postCode=PostCode,state=State,country=Country,firstName=contactFirstName,lastName=contactLastName,middleName=conatctMiddleName,relationship=Relationship,mobilePhone=MobilePhone,housePhone=HousePhone,officePhone=OfficePhone) if checkContact: return JsonResponse({'msg':'success','status':200}) Contact.objects.create(employeeForeignId=obj,email=Email,blogHomepage=BlogHomepage,office=Office,officeExtention=OfficeExtention,mobile=Mobile,home=Home,address1=Address1,address2=Address2,city=City,postCode=PostCode,state=State,country=Country,firstName=contactFirstName,lastName=contactLastName,middleName=conatctMiddleName,relationship=Relationship,mobilePhone=MobilePhone,housePhone=HousePhone,officePhone=OfficePhone) return JsonResponse({'msg':'success','status':200}) #------------------------------------------------------------------------ @csrf_exempt def healthAjaxRequest(request): # if not request.user.is_authenticated: # return redirect('/newapp/login') if request.method == "POST": employee_empid=request.POST.get('empid',None) if not employee_empid: return JsonResponse({'msg':' emplaoyee Id field Empty!','status':400}) obj =employee.objects.filter(employeeId = employee_empid).first() height= request.POST.get('height',None) print('height',height) weight=request.POST.get('weight',None) print('weight',weight) bloodGroup= request.POST.get('bloodgroup',None) print('bloodGroup',bloodGroup) if not validation_function.is_valid_height(height): return JsonResponse({'msg':'Minimum Height should be 120 in cm and maximum should be 325 !','status':400}) if not validation_function.is_valid_weight(weight): return JsonResponse({'msg':' Minimum Weight should be 25 and maximum should be 120 kg !','status':400}) checkhealth = employeeHealth.objects.filter(employeeForeignId = obj).update(employeeHealthHeight=height,employeeHealthWeight=weight,employeeHealthBloodGroup=bloodGroup) if checkhealth : return JsonResponse({'msg':'success','status':200}) employeeHealth.objects.create(employeeForeignId=obj,employeeHealthHeight=height,employeeHealthWeight=weight,employeeHealthBloodGroup=bloodGroup) return JsonResponse({'msg':'success','status':200}) #--------------------------------------------------------------------------- ##function for calling edit html form with data in text box def editHtmlForm(request,employeeId): if not request.user.is_authenticated: return redirect('/newapp/login') objEmployeePersonal=employee.objects.filter(employeeId = employeeId).first() nationalityList = nationality.objects.filter(status="isactive") ethnicityList=ethnicity.objects.filter(status="isactive") religionList=religion.objects.filter(status="isactive") countryList = country.objects.filter(status="isactive") jobTypeList=jobType.objects.all() jobStatusList=jobStatus.objects.all() workDaysList= workDays.objects.all() leaveWorkFlowList=leaveWorkFlow.objects.all() holiDaysList=holiDays.objects.all() lineManagerList=lineManager.objects.all() levelList=level.objects.all() positionList=position.objects.all() branchList=branch.objects.all() departmentList=department.objects.all() bloodGroupList = bloodGroup.objects.all() MaritalStatusList = maritalStatus.objects.all() numberofchildList=numberOfChild.objects.all() print('numberofchildList', numberofchildList) print('nationality ',objEmployeePersonal.employeeNationality) if objEmployeePersonal: objEmployeeFamily = objEmployeePersonal.employeefamily_set.all() objEmployeeChildren = objEmployeePersonal.employeechildren_set.all() objEmployeeHealth = objEmployeePersonal.employeehealth_set.all() objEmployeeJob = objEmployeePersonal.job_set.all() objEmployeeContact = objEmployeePersonal.contact_set.all() print("objEmployeeJob",objEmployeeJob) return render(request,'formedit.html',{'MaritalStatusList':MaritalStatusList,'numberofchildList':numberofchildList,'bloodGroupList':bloodGroupList,"nationalityList":nationalityList,'countryList':countryList,'ethnicityList':ethnicityList,'religionList':religionList,'workDaysList':workDaysList,'jobStatusList':jobStatusList,'jobTypeList':jobTypeList,'lineManagerList':lineManagerList,'holiDaysList':holiDaysList,'leaveWorkFlowList':leaveWorkFlowList,'departmentList':departmentList,'branchList':branchList,'positionList':positionList,'levelList':levelList ,'action':"/newapp/submit",'objEmployeePersonal':objEmployeePersonal,'objEmployeeFamily':objEmployeeFamily,'objEmployeeChildren':objEmployeeChildren,'objEmployeeHealth':objEmployeeHealth,'objEmployeeJob':objEmployeeJob,'objEmployeeContact':objEmployeeContact}) else: return render(request,'error.html',{'error':'User not exist'}) ##add new employee @csrf_exempt def submit(request): # if not request.user.is_authenticated: # return redirect('/login') employeementId_obj=request.POST.get('empid',None) print(employeementId_obj,employeementId_obj) userCheck = employee.objects.filter(employeeId = employeementId_obj,status='Pending').first() if not userCheck: print('userCheck',userCheck) return JsonResponse({'msg':"User Not Exist", 'status':400 }) #objEmployeeFamily=employeeFamily.objects.filter(employeeForeignId=userCheck) objEmployeeFamily=userCheck.employeefamily_set.all() #objEmployeeChildren=employeeChildren.objects.filter(employeeForeignId=userCheck) objEmployeeChildren= userCheck.employeechildren_set.all() #objEmployeeHealth=employeeHealth.objects.filter(employeeForeignId=userCheck) objEmployeeHealth=userCheck.employeehealth_set.all() #objEmployeeJob=Job.objects.filter(employeeForeignId=userCheck) objEmployeeJob=userCheck.job_set.all() #objEmployeeContact=Contact.objects.filter(employeeForeignId=userCheck) objEmployeeContact=userCheck.contact_set.all() if objEmployeeFamily is None and objEmployeeChildren is None and objEmployeeHealth is None and objEmployeeJob is None and objEmployeeContact is None : return JsonResponse({'msg':"Data not save in the Database", 'status':400 }) userCheck.status='Success' userCheck.save() print('Success') return JsonResponse({'msg':"Employee Register Successfully", 'status':200 }) ## show list of all employee def employeeList(request): if not request.user.is_authenticated: return redirect('/newapp/login') employeeObj= employee.objects.filter(status='Success') if employeeObj is None:## if no employee is addedd return render(request, 'Employee.html',{'form':form}) paginator = Paginator(employeeObj, 10) # Show 25 contacts per page page = request.GET.get('page') employee_page = paginator.get_page(page) return render(request, 'Listcopy.html',{'employeeObj':employee_page}) @csrf_exempt def emplyeeDelete(request,employeementId ): if not request.user.is_authenticated: return redirect('/newapp/login') emp_object = employee.objects.filter(employeementId=employeementId).first() if emp_object is None : return render(request,'Employee.html') employee.objects.filter(employeementId=employeementId).delete() return redirect('/newapp/employeeList') ## call html form for add new user def addEmployee(request): if not request.user.is_authenticated: return redirect('/newapp/login') action = "addFun" nationalityList = nationality.objects.filter(status="isactive") #countryListList = country.objects.filter(status="isactive") ethnicityList=ethnicity.objects.filter(status="isactive") religionList=religion.objects.filter(status="isactive") jobTypeList=jobType.objects.all() jobStatusList=jobStatus.objects.all() workDaysList= workDays.objects.all() leaveWorkFlowList=leaveWorkFlow.objects.all() holiDaysList=holiDays.objects.all() lineManagerList=lineManager.objects.all() levelList=level.objects.all() positionList=position.objects.all() branchList=branch.objects.all() departmentList=department.objects.all() bloodGroupList = bloodGroup.objects.all() MaritalStatusList = maritalStatus.objects.all() numberofchildList=numberOfChild.objects.all() countryList = country.objects.filter(status='isactive') return render(request,'form.html' , {'MaritalStatusList':MaritalStatusList,'numberofchildList':numberofchildList,'bloodGroupList':bloodGroupList,"nationalityList":nationalityList,'countryList':countryList,'ethnicityList':ethnicityList,'religionList':religionList,'workDaysList':workDaysList,'jobStatusList':jobStatusList,'jobTypeList':jobTypeList,'lineManagerList':lineManagerList,'holiDaysList':holiDaysList,'leaveWorkFlowList':leaveWorkFlowList,'departmentList':departmentList,'branchList':branchList,'positionList':positionList,'levelList':levelList ,'action':"/newapp/addFun",}) @csrf_exempt def preview(request): employeementId_obj=request.POST.get('empid',None) obj =employee.objects.filter(employeeId = employeementId_obj).first() return JsonResponse({'msg':'success','status':200}) @csrf_exempt def directory(request): employeementId_obj=request.POST.get('empid',None) obj =employee.objects.filter(employeeId = employeementId_obj).first() return JsonResponse({'msg':'success','status':200}) def createPdf(request,employeeId): if not request.user.is_authenticated: return redirect('/newapp/login') objEmployeePersonal=employee.objects.filter(employeeId = employeeId).first() if objEmployeePersonal: objEmployeeFamily=employeeFamily.objects.filter(employeeForeignId=objEmployeePersonal).first() print('objEmployeeFamily',objEmployeeFamily) objEmployeeChildren=employeeChildren.objects.filter(employeeForeignId=objEmployeePersonal).first() print('objEmployeeChildren',objEmployeeChildren) objEmployeeHealth=employeeHealth.objects.filter(employeeForeignId=objEmployeePersonal).first() print('objEmployeeHealth',objEmployeeHealth) objEmployeeJob=Job.objects.filter(employeeForeignId=objEmployeePersonal).first() objEmployeeContact=Contact.objects.filter(employeeForeignId=objEmployeePersonal).first() print("objEmployeeJob",objEmployeeJob) print('objEmployeeContact',objEmployeeContact.email) response = HttpResponse(content_type='application/pdf') response['Content-Disposition'] = 'inline; filename="mypdf.pdf"' # Create a file-like buffer to receive PDF data. buffer = io.BytesIO() # Create the PDF object, using the buffer as its "file." p = canvas.Canvas(buffer) # Draw things on the PDF. Here's where the PDF generation happens. # See the ReportLab documentation for the full list of functionality. # dic = {"employee Id":objEmployeePersonal.employeementId,"Name":objEmployeePersonal.employeeFirstName} # keyList=['Emplaoyee Id', 'Name'] # #valuelist=['employeementId','employeeBirthDate'] # row = 750 # keycolumn = 50 # valuecolumn=300 # for key in range(len(keyList)): # # print(valuelist[key]) # # for i in range(len(valuelist)): # #print(key) # p.drawString(keycolumn,row,keyList[key]+":" ) # p.drawString(valuecolumn,row,"hhcxc") # row=row-30 p.setFont('Times-Bold',16) p.drawString(245,770, "Employee Details ") p.drawString(70,710, "Employee Id ") p.drawString(350,710, employeeId) p.drawString(70,680, "Name ") p.drawString(350,680,str(objEmployeePersonal.employeeFirstName+' '+objEmployeePersonal.employeeLastName).upper()) p.drawString(70,650, "DOB ") p.drawString(350,650,str(objEmployeePersonal.employeeBirthDate)) p.drawString(70,620, "Gender") p.drawString(350,620,str(objEmployeePersonal.employeeGender).upper()) p.drawString(70,590, "Nationality ") p.drawString(350,590, str(objEmployeePersonal.employeeNationality).upper()) p.drawString(70,560, "National Id") p.drawString(350,560,str(objEmployeePersonal.employeeNationalId)) p.drawString(70,530, "Joining Date") p.drawString(350,530, str(objEmployeeJob.dateJoined)) p.drawString(70,500, "Email") p.drawString(350,500,str(objEmployeeContact.email )) p.drawString(70,470, "Mobile") p.drawString(350,470,str( objEmployeeContact.mobile)) p.drawString(70,430, "Country") p.drawString(350,430,str(objEmployeeContact.country).upper()) p.showPage() p.save() pdf = buffer.getvalue() buffer.close() response.write(pdf) return response # FileResponse sets the Content-Disposition header so that browsers # present the option to save the file. #return FileResponse(buffer, as_attachment=True, filename='hello.pdf') @csrf_exempt def data(request): query_dict_childfirstname1=request.POST.getlist('childfirstname') query_dict_childfirstname3=request.POST.getlist('childfirstname[]') query_dict_childfirstname=request.POST.get('childfirstname[]') print('query_dict_childfirstname',query_dict_childfirstname) #len(query_dict_childfirstname)) print('query_dict_childfirstname1',query_dict_childfirstname1) print(query_dict_childfirstname3) query_dict_childmiddelname3=request.POST.getlist('childmiddlename[]') query_dict_childlastname3=request.POST.getlist('childlastname[]') print('query_dict_childmiddelname3',query_dict_childmiddelname3) print('query_dict_childlastname3',query_dict_childlastname3) return JsonResponse({'msg':'Success','status':200 }) @csrf_exempt def employeeView(request,employeeId, *args, **kwargs): if not request.user.is_authenticated: return redirect('/newapp/login') template = get_template('userview.html') key=['UserId','First Name','Last Name', 'Gender','BirthDate', 'Nationality' , 'NationalId','Passport', 'Ethnicity', 'Religion'] objEmployeePersonal=employee.objects.filter(employeeId = employeeId).first() if objEmployeePersonal: #objEmployeeFamily = objEmployeePersonal.employeefamily_set.all() # objEmployeeChildren = objEmployeePersonal.employeechildren_set.all() # objEmployeeHealth = objEmployeePersonal.employeehealth_set.all() # objEmployeeJob = objEmployeePersonal.job_set.all() # objEmployeeContact = objEmployeePersonal.contact_set.all() # print("objEmployeeJob",objEmployeeJob) pass name= ['FirstName','lastname'] # context ={'name':name,'key':key,'objEmployeePersonal':objEmployeePersonal,'objEmployeeFamily':objEmployeeFamily,'objEmployeeChildren':objEmployeeChildren,'objEmployeeHealth':objEmployeeHealth,'objEmployeeJob':objEmployeeJob,'objEmployeeContact':objEmployeeContact} context = {'objEmployeePersonal':objEmployeePersonal} html = template.render(context) #, 'Joining Date', End of probation , Position Effectivedate, LineManager Department Branch Level JobType JobStatusEffectiveDate, LeaveWorkflow, Workdays , Holidays, MaritalStatus,numberofchild, spouseWorking, spousefirstname, SpouseLastName,spouse Birthdate, SpouseNationality ,SpouseNationalId,SpousePassport,SpouseEthnicity,SpouseReligion pdf= createpdf.render_to_pdf('userview.html',context) return HttpResponse(pdf,content_type='application/pdf') # return render(request,'view_new.html',{'objEmployeePersonal':objEmployeePersonal,'objEmployeeFamily':objEmployeeFamily,'objEmployeeChildren':objEmployeeChildren,'objEmployeeHealth':objEmployeeHealth,'objEmployeeJob':objEmployeeJob,'objEmployeeContact':objEmployeeContact}) # @csrf_exempt # @pdf_decorator(pdfname='1.pdf') # def employeeView(request,employeeId): # print("static") # objEmployeePersonal=employee.objects.filter(employeeId = employeeId).first() # if objEmpl'oyeePersonal: # objEmployeeFamily=employeeFamily.objects.filter(employeeForeignId=objEmployeePersonal).first() # print('objEmployeeFamily',objEmployeeFamily) # objEmployeeChildren=employeeChildren.objects.filter(employeeForeignId=objEmployeePersonal).first() # print('objEmployeeChildren',objEmployeeChildren) # objEmployeeHealth=employeeHealth.objects.filter(employeeForeignId=objEmployeePersonal).first() # print('objEmployeeHealth',objEmployeeHealth) # objEmployeeJob=Job.objects.filter(employeeForeignId=objEmployeePersonal).first() # objEmployeeContact=Contact.objects.filter(employeeForeignId=objEmployeePersonal).first() # print("objEmployeeJob",objEmployeeJob) # print('objEmployeeContact',objEmployeeContact.email) # context ={'objEmployeePersonal':objEmployeePersonal,'objEmployeeFamily':objEmployeeFamily,'objEmployeeChildren':objEmployeeChildren,'objEmployeeHealth':objEmployeeHealth,'objEmployeeJob':objEmployeeJob,'objEmployeeContact':objEmployeeContact} # return render(request, 'userview.html',context) #
{"/employeeDetails/personaldetails.py": ["/employeeDetails/models.py"], "/employeeDetails/views.py": ["/employeeDetails/models.py"]}
9,226
riya2802/newapp
refs/heads/master
/employeeDetails/models.py
from django.db import models from django.contrib.auth.models import User from django.core.validators import MaxValueValidator # Create your models here. gender = [ ('M' ,'Male'), ('F', 'Female'), ('U', 'Unknown') ] Status = [ ('isactive','isactive'), ('notactive','inactive') ] employeeStatus=(('Success','Success'),('Pending','Pending')) class nationality(models.Model): nationalityName = models.CharField(max_length=30) status=models.CharField(max_length=30, choices=Status, default="notactive" ) class country(models.Model): countryName = models.CharField(max_length=30) countryCode= models.CharField(max_length = 30) status =models.CharField(max_length = 30,choices=Status,default= "inactive") class ethnicity(models.Model): ethnicityName = models.CharField(max_length = 30,unique=True) status = models.CharField(choices= Status, max_length=30, null = True, blank = True) class religion(models.Model): religionName = models.CharField(max_length = 30,unique=True) status = models.CharField(choices= Status, max_length=30, default="notactive" ) class jobType(models.Model): jobType=models.CharField(max_length=30,default='temporary',unique=True) class jobStatus(models.Model): jobStatus=models.CharField(max_length=30,default='intern',unique=True) class workDays(models.Model): workdays= models.CharField(max_length=30) class leaveWorkFlow(models.Model): leaveworkflow= models.CharField(max_length=20) class holiDays (models.Model): holidays= models.CharField(max_length=20) class lineManager(models.Model): lineManager= models.CharField(max_length=20) class level (models.Model): joblevel= models.CharField(max_length=20) class position(models.Model): position= models.CharField(max_length=20) class branch(models.Model): branchName = models.CharField(max_length=20) class department(models.Model): branchObj = models.ForeignKey(branch,models.CASCADE) department = models.CharField(max_length=20) class bloodGroup(models.Model): bloodgroup= models.CharField(max_length=30) class maritalStatus(models.Model): Maritalstatus= models.CharField(max_length=30) class numberOfChild(models.Model): numberOfchild= models.CharField(max_length=30) class employee(models.Model): employeeId= models.AutoField(primary_key=True)#primary key employeementId =models.IntegerField(null=False,blank=False,unique=True) employeeFirstName= models.CharField(max_length=255,blank=False,null=False) employeeMiddelName=models.CharField(max_length=255,null=True,blank=True) employeeLastName=models.CharField( max_length=255,blank=False,null=False) employeeGender= models.CharField(max_length=15, choices=gender, default='U',blank=False,null=False) employeeBirthDate=models.DateField(blank=False,null=False) employeeNationality=models.CharField(max_length=15, default='India',blank=False,null=False) employeeNationalId=models.IntegerField(null=False,blank=False) employeePassport=models.CharField(max_length=12,null=True,blank=True) employeeEthnicity=models.CharField(max_length=15,default='NA',null=True,blank=True) employeeReligion=models.CharField(max_length=15,default='NA',null=True,blank=True) employeePhoto=models.ImageField(upload_to='photo', blank=True,) status=models.CharField(max_length=30, choices=employeeStatus, default="Pending" ) class employeeFamily(models.Model): employeeForeignId =models.OneToOneField(employee,models.CASCADE,unique=True) employeeFamilyMaritalStatus=models.CharField(max_length=15, default='Unmarried') employeeFamilyNumberOfChild= models.CharField(max_length=15,default="0",null=True) employeeFamilySpouseWorking =models.CharField(max_length=15,default='No',null=True) employeeFamilySpouseFirstName= models.CharField(max_length=255,blank=True,null=True) employeeFamilySpouseMiddelName=models.CharField(max_length=255,null=True,blank=True) employeeFamilySpouseLastName=models.CharField( max_length=255,blank=True,null=True) employeeFamilySpouseBirthDate=models.DateField(null=True,blank = True) employeeFamilySpouseNationality=models.CharField(max_length=15, default='India',blank=False,null=False) employeeFamilySpouseNationalId=models.CharField(max_length=8, null=True,blank=True) employeeFamilySpousePassport=models.CharField(max_length=12,null=True,blank=True) employeeFamilySpouseEthnicity=models.CharField(max_length=15, default='NA',null=True,blank=True) employeeFamilySpouseReligion=models.CharField(max_length=15,default='NA',null=True,blank=True) class employeeChildren(models.Model): employeeForeignId =models.OneToOneField(employee,models.CASCADE) employeeChildrenFirstName= models.CharField(max_length=255,blank=True,null=True) employeeChildrenMiddelName=models.CharField(max_length=255,null=True,blank=True) employeeChildrenLastName=models.CharField( max_length=255,blank=True,null=True) employeeChildrenBirthDate=models.DateField(blank=True,null=True) employeeChildrenGender= models.CharField(max_length=15, choices=gender, default='U',blank=True,null=True) employeeChildrenMaritalStatus=models.CharField(max_length=1,default='Unmarried') # employeeChildKey=models.CharField(max_length=15,default=0) class employeeHealth(models.Model): employeeForeignId =models.OneToOneField(employee,models.CASCADE, unique = True) employeeHealthHeight=models.CharField(max_length=255,blank=True,null=True) employeeHealthWeight=models.CharField(max_length=255,null=True,blank=True) employeeHealthBloodGroup=models.CharField(max_length=5, default="Don't No",blank=True,null=True) class Job(models.Model): employeeForeignId =models.OneToOneField(employee,models.CASCADE, unique = True) dateJoined = models.DateField(null=False,blank=False) endofProbation = models.DateField(null=True) position = models.CharField(max_length=30, null=False, blank=False) jobStatusEffectiveDate = models.DateField(null=False,blank=False) lineManager = models.CharField(max_length=30,null = True,blank=True) department = models.CharField(max_length=30,null = True,blank=True) branch = models.CharField(max_length=30,null = True,blank=True) level = models.CharField(max_length=30,null = True,blank=True) jobType = models.CharField(max_length=30,null = True,blank=True) employmentStatusEffectiveDate = models.DateField(null=False,blank=True) jobStatus = models.CharField(max_length=30,null = True,blank=True) leaveWorkflow = models.CharField(max_length=30,null = True,blank=True) workdays = models.CharField(max_length=30,null = True,blank=True) holidays= models.CharField(max_length=30,null = True,blank=True) termStart = models.CharField(max_length=30,null = True) termEnd = models.CharField(max_length=30,null = True) class Contact(models.Model): employeeForeignId =models.OneToOneField(employee,models.CASCADE, unique = True) email= models.EmailField(max_length=55,null=True,blank=True ) blogHomepage=models.CharField(max_length=60,null=True) office=models.CharField(max_length=30,null=True) officeExtention=models.CharField(max_length=30,null=True,blank=True ) mobile=models.CharField(max_length=12,null=True,blank=True) home=models.CharField(max_length=60,null=True) address1=models.CharField(max_length=160,null=True) address2=models.CharField(max_length=160,null=True) city =models.CharField(max_length=60,null=True) postCode=models.CharField(max_length=12,null=True,blank=True) state=models.CharField(max_length=80,null=True) country=models.CharField(max_length=80, null=False) firstName=models.CharField(max_length=30,null=True) lastName=models.CharField(max_length=30,null=True) middleName=models.CharField(max_length=30,null=True) relationship=models.CharField(max_length=30,null=True) mobilePhone=models.CharField(max_length=12,null=True,blank=True) housePhone=models.CharField(max_length=12,null=True,blank=True) officePhone=models.CharField(max_length=12,null=True,blank=True)
{"/employeeDetails/personaldetails.py": ["/employeeDetails/models.py"], "/employeeDetails/views.py": ["/employeeDetails/models.py"]}
9,227
riya2802/newapp
refs/heads/master
/employeeDetails/createpdf.py
from io import BytesIO from django.http import HttpResponse from django.template.loader import get_template,render_to_string from xhtml2pdf import pisa def render_to_pdf(template_src, context_dict={}): print("1") print('template_src',template_src) template = get_template(template_src) print("2") html = template.render(context_dict) print("3") result = BytesIO() print("4") pdf = pisa.pisaDocument(BytesIO(html.encode("ISO-8859-1")), result) print("5") print("pdf",pdf) print("6") print("7") print("result.getvalue()",result.getvalue(), ) if not pdf.err: print("8") return (result.getvalue()) print("9") return None
{"/employeeDetails/personaldetails.py": ["/employeeDetails/models.py"], "/employeeDetails/views.py": ["/employeeDetails/models.py"]}
9,249
roseway/sentiment-analysis
refs/heads/master
/utils.py
import numpy as np from string import punctuation from os import listdir def load_emb(filename, vocab): f = open(filename, 'r', encoding='UTF-8') lines = f.readlines() f.close() vocab_size = len(vocab) + 1 wordlist = np.zeros((vocab_size, 300)) embedding = dict() for line in lines: x = line.split() embedding[x[0]] = np.asarray(x[1:], dtype='float32') for word, i in vocab.items(): vector = embedding.get(word) if vector is not None: wordlist[i] = vector return wordlist def load_doc(filename): # open the file as read only file = open(filename, 'r', encoding='UTF-8') # read all text text = file.read() # close the file file.close() return text def clean_doc(doc, vocab): # split into tokens by white space doc = doc.replace('<br />', ' ') tokens = doc.split() # remove punctuation from each token table = str.maketrans('', '', punctuation) tokens = [w.translate(table) for w in tokens] # filter out tokens tokens = [w for w in tokens if w in vocab] tokens = ' '.join(tokens) return tokens def prepare(directory, vocab, num=False): documents = list() if num: i = 1 for filename in listdir(directory): path = directory + '/' + filename doc = load_doc(path) tokens = clean_doc(doc, vocab) documents.append(tokens) if i >= num: break i += 1 else: for filename in listdir(directory): path = directory + '/' + filename doc = load_doc(path) tokens = clean_doc(doc, vocab) documents.append(tokens) return documents
{"/extract_vocab.py": ["/utils.py"], "/main.py": ["/utils.py"]}
9,250
roseway/sentiment-analysis
refs/heads/master
/extract_vocab.py
from utils import load_doc from string import punctuation from nltk.corpus import stopwords from collections import Counter from os import listdir min_occur = 2 doc_dir = ['data/Imdb/train/neg', 'data/Imdb/train/pos'] save_vocab = 'data/vocab.txt' def clean_doc(doc): # split into tokens by white space doc = doc.replace('<br />', ' ') tokens = doc.split() # remove punctuation from each token table = str.maketrans('', '', punctuation) tokens = [w.translate(table) for w in tokens] # remove remaining tokens that are not alphabetic tokens = [word.lower() for word in tokens if word.isalpha()] # filter out stop words stop_words = set(stopwords.words('english')) tokens = [w for w in tokens if w not in stop_words] # filter out short tokens tokens = [word for word in tokens if len(word) > 1] return tokens def add_doc_to_vocab(filename, vocab): # load doc doc = load_doc(filename) # clean doc tokens = clean_doc(doc) # update counts vocab.update(tokens) def process_docs(directory, vocab): for filename in listdir(directory): # create the full path of the file to open path = directory + '/' + filename # add doc to vocab add_doc_to_vocab(path, vocab) print("Extracting vocabulary") vocab = Counter() # add all docs to vocab for dire in doc_dir: process_docs(dire, vocab) # keep tokens with a min occurrence tokens = [k for k, c in vocab.items() if c >= min_occur] # convert lines to a single blob of text data = '\n'.join(tokens) file = open(save_vocab, 'w', encoding='UTF-8') file.write(data) file.close() print("Done")
{"/extract_vocab.py": ["/utils.py"], "/main.py": ["/utils.py"]}
9,251
roseway/sentiment-analysis
refs/heads/master
/main.py
from utils import * import numpy as np from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.models import Sequential from keras.layers import Dense from keras.layers import Flatten from keras.layers import Embedding from keras.layers.convolutional import Conv1D from keras.layers.convolutional import MaxPooling1D from keras.utils import to_categorical vocab_dir = 'data/vocab.txt' embedding_dir = 'data/glove.6B.300d.txt' train_dir = ['data/Imdb/train/neg', 'data/Imdb/train/pos'] test_dir = ['data/Imdb/test/neg', 'data/Imdb/test/pos'] # The number of reviews wanna extract, use False to extract all num = False # Get vocab vocab = load_doc(vocab_dir) vocab = set(vocab.split()) # Prepare training data print("Preparing training and test data") train_docs = list() for d in train_dir: train_docs += prepare(d, vocab, num) tokenizer = Tokenizer() tokenizer.fit_on_texts(train_docs) vocab_size = len(tokenizer.word_index) + 1 encoded_docs = tokenizer.texts_to_sequences(train_docs) max_length = max([len(s) for s in encoded_docs]) Xtrain = pad_sequences(encoded_docs, maxlen=max_length, padding='post') ytrain = np.array([0 for _ in range(num if num else 12500)] + [1 for _ in range(num if num else 12500)]) ytrain = to_categorical(ytrain, num_classes=2) # Prepare test data test_docs = list() for d in test_dir: test_docs += prepare(d, vocab, num) encoded_docs = tokenizer.texts_to_sequences(test_docs) Xtest = pad_sequences(encoded_docs, maxlen=max_length, padding='post') ytest = np.array([0 for _ in range(num if num else 12500)] + [1 for _ in range(num if num else 12500)]) ytest = to_categorical(ytest, num_classes=2) # Using pre-trained word embedding print("Loading Word Embedding") wordlist = load_emb(embedding_dir, tokenizer.word_index) embedding_layer = Embedding(vocab_size, 300, weights=[wordlist], input_length=max_length, trainable=False) # Define model model = Sequential() model.add(embedding_layer) model.add(Conv1D(filters=128, kernel_size=5, activation='relu')) model.add(MaxPooling1D(pool_size=2)) model.add(Flatten()) model.add(Dense(2, activation='softmax')) model.summary() # Compile network model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy']) # Fit network model.fit(Xtrain, ytrain, epochs=20, verbose=1) # evaluate loss, acc = model.evaluate(Xtest, ytest, verbose=0) print('Test Accuracy: %f' % (acc * 100))
{"/extract_vocab.py": ["/utils.py"], "/main.py": ["/utils.py"]}
9,257
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_invoice_rendering.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import sys import unittest import openapi_client from openapi_client.model.invoice_line_rendering import InvoiceLineRendering from openapi_client.model.organisation_member_view import OrganisationMemberView globals()['InvoiceLineRendering'] = InvoiceLineRendering globals()['OrganisationMemberView'] = OrganisationMemberView from openapi_client.model.invoice_rendering import InvoiceRendering class TestInvoiceRendering(unittest.TestCase): """InvoiceRendering unit test stubs""" def setUp(self): pass def tearDown(self): pass def testInvoiceRendering(self): """Test InvoiceRendering""" # FIXME: construct object with mandatory attributes with example values # model = InvoiceRendering() # noqa: E501 pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,258
krezreb/openapi-client-clevercloud
refs/heads/master
/openapi_client/api/products_api.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from openapi_client.api_client import ApiClient, Endpoint as _Endpoint from openapi_client.model_utils import ( # noqa: F401 check_allowed_values, check_validations, date, datetime, file_type, none_type, validate_and_convert_types ) from openapi_client.model.addon_application_info import AddonApplicationInfo from openapi_client.model.addon_application_summary import AddonApplicationSummary from openapi_client.model.addon_provider_info_full_view import AddonProviderInfoFullView from openapi_client.model.addon_view import AddonView from openapi_client.model.available_instance_view import AvailableInstanceView from openapi_client.model.drop_price_view import DropPriceView from openapi_client.model.flavor_view import FlavorView from openapi_client.model.package_view import PackageView from openapi_client.model.wannabe_addon_billing import WannabeAddonBilling from openapi_client.model.wannabe_addon_config import WannabeAddonConfig from openapi_client.model.wannabe_inter_addon_provision import WannabeInterAddonProvision from openapi_client.model.zone_view import ZoneView class ProductsApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __bill_owner( self, addon_id, wannabe_addon_billing, **kwargs ): """bill_owner # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.bill_owner(addon_id, wannabe_addon_billing, async_req=True) >>> result = thread.get() Args: addon_id (str): wannabe_addon_billing (WannabeAddonBilling): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['addon_id'] = \ addon_id kwargs['wannabe_addon_billing'] = \ wannabe_addon_billing return self.call_with_http_info(**kwargs) self.bill_owner = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/vendor/apps/{addonId}/consumptions', 'operation_id': 'bill_owner', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'addon_id', 'wannabe_addon_billing', ], 'required': [ 'addon_id', 'wannabe_addon_billing', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'addon_id': (str,), 'wannabe_addon_billing': (WannabeAddonBilling,), }, 'attribute_map': { 'addon_id': 'addonId', }, 'location_map': { 'addon_id': 'path', 'wannabe_addon_billing': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__bill_owner ) def __edit_application_configuration( self, addon_id, wannabe_addon_config, **kwargs ): """edit_application_configuration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_application_configuration(addon_id, wannabe_addon_config, async_req=True) >>> result = thread.get() Args: addon_id (str): wannabe_addon_config (WannabeAddonConfig): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['addon_id'] = \ addon_id kwargs['wannabe_addon_config'] = \ wannabe_addon_config return self.call_with_http_info(**kwargs) self.edit_application_configuration = _Endpoint( settings={ 'response_type': (AddonView,), 'auth': [], 'endpoint_path': '/vendor/apps/{addonId}', 'operation_id': 'edit_application_configuration', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'addon_id', 'wannabe_addon_config', ], 'required': [ 'addon_id', 'wannabe_addon_config', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'addon_id': (str,), 'wannabe_addon_config': (WannabeAddonConfig,), }, 'attribute_map': { 'addon_id': 'addonId', }, 'location_map': { 'addon_id': 'path', 'wannabe_addon_config': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__edit_application_configuration ) def __end_addon_migration( self, addon_id, wannabe_addon_config, **kwargs ): """end_addon_migration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.end_addon_migration(addon_id, wannabe_addon_config, async_req=True) >>> result = thread.get() Args: addon_id (str): wannabe_addon_config (WannabeAddonConfig): Keyword Args: plan_id (str): [optional] region (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['addon_id'] = \ addon_id kwargs['wannabe_addon_config'] = \ wannabe_addon_config return self.call_with_http_info(**kwargs) self.end_addon_migration = _Endpoint( settings={ 'response_type': (AddonView,), 'auth': [], 'endpoint_path': '/vendor/apps/{addonId}/migration_callback', 'operation_id': 'end_addon_migration', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'addon_id', 'wannabe_addon_config', 'plan_id', 'region', ], 'required': [ 'addon_id', 'wannabe_addon_config', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'addon_id': (str,), 'wannabe_addon_config': (WannabeAddonConfig,), 'plan_id': (str,), 'region': (str,), }, 'attribute_map': { 'addon_id': 'addonId', 'plan_id': 'plan_id', 'region': 'region', }, 'location_map': { 'addon_id': 'path', 'wannabe_addon_config': 'body', 'plan_id': 'query', 'region': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__end_addon_migration ) def __get_addon_provider( self, provider_id, **kwargs ): """get_addon_provider # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_addon_provider(provider_id, async_req=True) >>> result = thread.get() Args: provider_id (str): Keyword Args: orga_id (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonProviderInfoFullView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['provider_id'] = \ provider_id return self.call_with_http_info(**kwargs) self.get_addon_provider = _Endpoint( settings={ 'response_type': (AddonProviderInfoFullView,), 'auth': [], 'endpoint_path': '/products/addonproviders/{provider_id}', 'operation_id': 'get_addon_provider', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'provider_id', 'orga_id', ], 'required': [ 'provider_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'provider_id': (str,), 'orga_id': (str,), }, 'attribute_map': { 'provider_id': 'provider_id', 'orga_id': 'orgaId', }, 'location_map': { 'provider_id': 'path', 'orga_id': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_addon_provider ) def __get_addon_provider_infos( self, provider_id, **kwargs ): """get_addon_provider_infos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_addon_provider_infos(provider_id, async_req=True) >>> result = thread.get() Args: provider_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['provider_id'] = \ provider_id return self.call_with_http_info(**kwargs) self.get_addon_provider_infos = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/products/addonproviders/{provider_id}/informations', 'operation_id': 'get_addon_provider_infos', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'provider_id', ], 'required': [ 'provider_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'provider_id': (str,), }, 'attribute_map': { 'provider_id': 'provider_id', }, 'location_map': { 'provider_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_addon_provider_infos ) def __get_addon_provider_versions( self, provider_id, **kwargs ): """get_addon_provider_versions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_addon_provider_versions(provider_id, async_req=True) >>> result = thread.get() Args: provider_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['provider_id'] = \ provider_id return self.call_with_http_info(**kwargs) self.get_addon_provider_versions = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/products/addonproviders/{provider_id}/versions', 'operation_id': 'get_addon_provider_versions', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'provider_id', ], 'required': [ 'provider_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'provider_id': (str,), }, 'attribute_map': { 'provider_id': 'provider_id', }, 'location_map': { 'provider_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_addon_provider_versions ) def __get_addon_providers( self, **kwargs ): """get_addon_providers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_addon_providers(async_req=True) >>> result = thread.get() Keyword Args: orga_id (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [AddonProviderInfoFullView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_addon_providers = _Endpoint( settings={ 'response_type': ([AddonProviderInfoFullView],), 'auth': [], 'endpoint_path': '/products/addonproviders', 'operation_id': 'get_addon_providers', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'orga_id', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'orga_id': (str,), }, 'attribute_map': { 'orga_id': 'orgaId', }, 'location_map': { 'orga_id': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_addon_providers ) def __get_application_info( self, addon_id, **kwargs ): """get_application_info # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_application_info(addon_id, async_req=True) >>> result = thread.get() Args: addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonApplicationInfo If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.get_application_info = _Endpoint( settings={ 'response_type': (AddonApplicationInfo,), 'auth': [], 'endpoint_path': '/vendor/apps/{addonId}', 'operation_id': 'get_application_info', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'addon_id', ], 'required': [ 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'addon_id': (str,), }, 'attribute_map': { 'addon_id': 'addonId', }, 'location_map': { 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_application_info ) def __get_available_instances( self, **kwargs ): """get_available_instances # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_available_instances(async_req=True) >>> result = thread.get() Keyword Args: _for (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [AvailableInstanceView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_available_instances = _Endpoint( settings={ 'response_type': ([AvailableInstanceView],), 'auth': [], 'endpoint_path': '/products/instances', 'operation_id': 'get_available_instances', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ '_for', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { '_for': (str,), }, 'attribute_map': { '_for': 'for', }, 'location_map': { '_for': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_available_instances ) def __get_available_packages( self, **kwargs ): """get_available_packages # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_available_packages(async_req=True) >>> result = thread.get() Keyword Args: coupon (str): [optional] orga_id (str): [optional] currency (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [PackageView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_available_packages = _Endpoint( settings={ 'response_type': ([PackageView],), 'auth': [], 'endpoint_path': '/products/packages', 'operation_id': 'get_available_packages', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'coupon', 'orga_id', 'currency', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'coupon': (str,), 'orga_id': (str,), 'currency': (str,), }, 'attribute_map': { 'coupon': 'coupon', 'orga_id': 'orgaId', 'currency': 'currency', }, 'location_map': { 'coupon': 'query', 'orga_id': 'query', 'currency': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_available_packages ) def __get_countries( self, **kwargs ): """get_countries # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_countries(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_countries = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/products/countries', 'operation_id': 'get_countries', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_countries ) def __get_country_codes( self, **kwargs ): """get_country_codes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_country_codes(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_country_codes = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/products/countrycodes', 'operation_id': 'get_country_codes', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_country_codes ) def __get_excahnge_rates( self, **kwargs ): """get_excahnge_rates # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_excahnge_rates(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [DropPriceView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_excahnge_rates = _Endpoint( settings={ 'response_type': ([DropPriceView],), 'auth': [], 'endpoint_path': '/products/prices', 'operation_id': 'get_excahnge_rates', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_excahnge_rates ) def __get_flavors( self, **kwargs ): """get_flavors # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_flavors(async_req=True) >>> result = thread.get() Keyword Args: context (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [FlavorView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_flavors = _Endpoint( settings={ 'response_type': ([FlavorView],), 'auth': [], 'endpoint_path': '/products/flavors', 'operation_id': 'get_flavors', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'context', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'context': (str,), }, 'attribute_map': { 'context': 'context', }, 'location_map': { 'context': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_flavors ) def __get_instance( self, type, version, **kwargs ): """get_instance # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_instance(type, version, async_req=True) >>> result = thread.get() Args: type (str): version (str): Keyword Args: _for (str): [optional] app (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AvailableInstanceView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['type'] = \ type kwargs['version'] = \ version return self.call_with_http_info(**kwargs) self.get_instance = _Endpoint( settings={ 'response_type': (AvailableInstanceView,), 'auth': [], 'endpoint_path': '/products/instances/{type}-{version}', 'operation_id': 'get_instance', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'type', 'version', '_for', 'app', ], 'required': [ 'type', 'version', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'type': (str,), 'version': (str,), '_for': (str,), 'app': (str,), }, 'attribute_map': { 'type': 'type', 'version': 'version', '_for': 'for', 'app': 'app', }, 'location_map': { 'type': 'path', 'version': 'path', '_for': 'query', 'app': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_instance ) def __get_mfa_kinds( self, **kwargs ): """get_mfa_kinds # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_mfa_kinds(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_mfa_kinds = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/products/mfa_kinds', 'operation_id': 'get_mfa_kinds', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_mfa_kinds ) def __get_zones( self, **kwargs ): """get_zones # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_zones(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [ZoneView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_zones = _Endpoint( settings={ 'response_type': ([ZoneView],), 'auth': [], 'endpoint_path': '/products/zones', 'operation_id': 'get_zones', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_zones ) def __list_apps( self, **kwargs ): """list_apps # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_apps(async_req=True) >>> result = thread.get() Keyword Args: offset (int): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [AddonApplicationSummary] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.list_apps = _Endpoint( settings={ 'response_type': ([AddonApplicationSummary],), 'auth': [], 'endpoint_path': '/vendor/apps', 'operation_id': 'list_apps', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'offset', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'offset': (int,), }, 'attribute_map': { 'offset': 'offset', }, 'location_map': { 'offset': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__list_apps ) def __logscollector( self, addon_id, **kwargs ): """logscollector # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.logscollector(addon_id, async_req=True) >>> result = thread.get() Args: addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.logscollector = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/vendor/apps/{addonId}/logscollector', 'operation_id': 'logscollector', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'addon_id', ], 'required': [ 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'addon_id': (str,), }, 'attribute_map': { 'addon_id': 'addonId', }, 'location_map': { 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__logscollector ) def __provision_other_addon( self, wannabe_inter_addon_provision, **kwargs ): """provision_other_addon # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.provision_other_addon(wannabe_inter_addon_provision, async_req=True) >>> result = thread.get() Args: wannabe_inter_addon_provision (WannabeInterAddonProvision): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['wannabe_inter_addon_provision'] = \ wannabe_inter_addon_provision return self.call_with_http_info(**kwargs) self.provision_other_addon = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/vendor/addons', 'operation_id': 'provision_other_addon', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'wannabe_inter_addon_provision', ], 'required': [ 'wannabe_inter_addon_provision', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'wannabe_inter_addon_provision': (WannabeInterAddonProvision,), }, 'attribute_map': { }, 'location_map': { 'wannabe_inter_addon_provision': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__provision_other_addon )
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,259
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_products_api.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import unittest import openapi_client from openapi_client.api.products_api import ProductsApi # noqa: E501 class TestProductsApi(unittest.TestCase): """ProductsApi unit test stubs""" def setUp(self): self.api = ProductsApi() # noqa: E501 def tearDown(self): pass def test_bill_owner(self): """Test case for bill_owner """ pass def test_edit_application_configuration(self): """Test case for edit_application_configuration """ pass def test_end_addon_migration(self): """Test case for end_addon_migration """ pass def test_get_addon_provider(self): """Test case for get_addon_provider """ pass def test_get_addon_provider_infos(self): """Test case for get_addon_provider_infos """ pass def test_get_addon_provider_versions(self): """Test case for get_addon_provider_versions """ pass def test_get_addon_providers(self): """Test case for get_addon_providers """ pass def test_get_application_info(self): """Test case for get_application_info """ pass def test_get_available_instances(self): """Test case for get_available_instances """ pass def test_get_available_packages(self): """Test case for get_available_packages """ pass def test_get_countries(self): """Test case for get_countries """ pass def test_get_country_codes(self): """Test case for get_country_codes """ pass def test_get_excahnge_rates(self): """Test case for get_excahnge_rates """ pass def test_get_flavors(self): """Test case for get_flavors """ pass def test_get_instance(self): """Test case for get_instance """ pass def test_get_mfa_kinds(self): """Test case for get_mfa_kinds """ pass def test_get_zones(self): """Test case for get_zones """ pass def test_list_apps(self): """Test case for list_apps """ pass def test_logscollector(self): """Test case for logscollector """ pass def test_provision_other_addon(self): """Test case for provision_other_addon """ pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,260
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_default_api.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import unittest import openapi_client from openapi_client.api.default_api import DefaultApi # noqa: E501 class TestDefaultApi(unittest.TestCase): """DefaultApi unit test stubs""" def setUp(self): self.api = DefaultApi() # noqa: E501 def tearDown(self): pass def test_get_blog_feed(self): """Test case for get_blog_feed """ pass def test_get_engineering_feed(self): """Test case for get_engineering_feed """ pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,261
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_o_auth1_access_token_view.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import sys import unittest import openapi_client from openapi_client.model.o_auth1_consumer_view import OAuth1ConsumerView from openapi_client.model.o_auth_rights_view import OAuthRightsView globals()['OAuth1ConsumerView'] = OAuth1ConsumerView globals()['OAuthRightsView'] = OAuthRightsView from openapi_client.model.o_auth1_access_token_view import OAuth1AccessTokenView class TestOAuth1AccessTokenView(unittest.TestCase): """OAuth1AccessTokenView unit test stubs""" def setUp(self): pass def tearDown(self): pass def testOAuth1AccessTokenView(self): """Test OAuth1AccessTokenView""" # FIXME: construct object with mandatory attributes with example values # model = OAuth1AccessTokenView() # noqa: E501 pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,262
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_application_view.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import sys import unittest import openapi_client from openapi_client.model.deployment_info_view import DeploymentInfoView from openapi_client.model.flavor_view import FlavorView from openapi_client.model.instance_view import InstanceView from openapi_client.model.vhost_view import VhostView globals()['DeploymentInfoView'] = DeploymentInfoView globals()['FlavorView'] = FlavorView globals()['InstanceView'] = InstanceView globals()['VhostView'] = VhostView from openapi_client.model.application_view import ApplicationView class TestApplicationView(unittest.TestCase): """ApplicationView unit test stubs""" def setUp(self): pass def tearDown(self): pass def testApplicationView(self): """Test ApplicationView""" # FIXME: construct object with mandatory attributes with example values # model = ApplicationView() # noqa: E501 pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,263
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_auth_api.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import unittest import openapi_client from openapi_client.api.auth_api import AuthApi # noqa: E501 class TestAuthApi(unittest.TestCase): """AuthApi unit test stubs""" def setUp(self): self.api = AuthApi() # noqa: E501 def tearDown(self): pass def test_authorize_form(self): """Test case for authorize_form """ pass def test_authorize_token(self): """Test case for authorize_token """ pass def test_get_available_rights(self): """Test case for get_available_rights """ pass def test_get_login_data(self): """Test case for get_login_data """ pass def test_post_access_token_request(self): """Test case for post_access_token_request """ pass def test_post_access_token_request_query(self): """Test case for post_access_token_request_query """ pass def test_post_authorize(self): """Test case for post_authorize """ pass def test_post_req_token_request(self): """Test case for post_req_token_request """ pass def test_post_req_token_request_query_string(self): """Test case for post_req_token_request_query_string """ pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,264
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_organisation_member_user_view.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import sys import unittest import openapi_client from openapi_client.model.organisation_member_user_view import OrganisationMemberUserView class TestOrganisationMemberUserView(unittest.TestCase): """OrganisationMemberUserView unit test stubs""" def setUp(self): pass def tearDown(self): pass def testOrganisationMemberUserView(self): """Test OrganisationMemberUserView""" # FIXME: construct object with mandatory attributes with example values # model = OrganisationMemberUserView() # noqa: E501 pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,265
krezreb/openapi-client-clevercloud
refs/heads/master
/openapi_client/api/auth_api.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from openapi_client.api_client import ApiClient, Endpoint as _Endpoint from openapi_client.model_utils import ( # noqa: F401 check_allowed_values, check_validations, date, datetime, file_type, none_type, validate_and_convert_types ) from openapi_client.model.message import Message from openapi_client.model.wannabe_authorization import WannabeAuthorization class AuthApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __authorize_form( self, **kwargs ): """authorize_form # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.authorize_form(async_req=True) >>> result = thread.get() Keyword Args: ccid (str): [optional] cctk (str): [optional] oauth_token (str): [optional] ccid2 (str): [optional] cli_token (str): [optional] from_oauth (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.authorize_form = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/oauth/authorize', 'operation_id': 'authorize_form', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'ccid', 'cctk', 'oauth_token', 'ccid2', 'cli_token', 'from_oauth', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'ccid': (str,), 'cctk': (str,), 'oauth_token': (str,), 'ccid2': (str,), 'cli_token': (str,), 'from_oauth': (str,), }, 'attribute_map': { 'ccid': 'ccid', 'cctk': 'cctk', 'oauth_token': 'oauth_token', 'ccid2': 'ccid', 'cli_token': 'cli_token', 'from_oauth': 'from_oauth', }, 'location_map': { 'ccid': 'cookie', 'cctk': 'cookie', 'oauth_token': 'query', 'ccid2': 'query', 'cli_token': 'query', 'from_oauth': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__authorize_form ) def __authorize_token( self, **kwargs ): """authorize_token # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.authorize_token(async_req=True) >>> result = thread.get() Keyword Args: ccid (str): [optional] cctk (str): [optional] almighty (str): [optional] access_organisations (str): [optional] manage_organisations (str): [optional] manage_organisations_services (str): [optional] manage_organisations_applications (str): [optional] manage_organisations_members (str): [optional] access_organisations_bills (str): [optional] access_organisations_credit_count (str): [optional] access_organisations_consumption_statistics (str): [optional] access_personal_information (str): [optional] manage_personal_information (str): [optional] manage_ssh_keys (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.authorize_token = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/oauth/authorize', 'operation_id': 'authorize_token', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'ccid', 'cctk', 'almighty', 'access_organisations', 'manage_organisations', 'manage_organisations_services', 'manage_organisations_applications', 'manage_organisations_members', 'access_organisations_bills', 'access_organisations_credit_count', 'access_organisations_consumption_statistics', 'access_personal_information', 'manage_personal_information', 'manage_ssh_keys', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'ccid': (str,), 'cctk': (str,), 'almighty': (str,), 'access_organisations': (str,), 'manage_organisations': (str,), 'manage_organisations_services': (str,), 'manage_organisations_applications': (str,), 'manage_organisations_members': (str,), 'access_organisations_bills': (str,), 'access_organisations_credit_count': (str,), 'access_organisations_consumption_statistics': (str,), 'access_personal_information': (str,), 'manage_personal_information': (str,), 'manage_ssh_keys': (str,), }, 'attribute_map': { 'ccid': 'ccid', 'cctk': 'cctk', 'almighty': 'almighty', 'access_organisations': 'access_organisations', 'manage_organisations': 'manage_organisations', 'manage_organisations_services': 'manage_organisations_services', 'manage_organisations_applications': 'manage_organisations_applications', 'manage_organisations_members': 'manage_organisations_members', 'access_organisations_bills': 'access_organisations_bills', 'access_organisations_credit_count': 'access_organisations_credit_count', 'access_organisations_consumption_statistics': 'access_organisations_consumption_statistics', 'access_personal_information': 'access_personal_information', 'manage_personal_information': 'manage_personal_information', 'manage_ssh_keys': 'manage_ssh_keys', }, 'location_map': { 'ccid': 'cookie', 'cctk': 'cookie', 'almighty': 'form', 'access_organisations': 'form', 'manage_organisations': 'form', 'manage_organisations_services': 'form', 'manage_organisations_applications': 'form', 'manage_organisations_members': 'form', 'access_organisations_bills': 'form', 'access_organisations_credit_count': 'form', 'access_organisations_consumption_statistics': 'form', 'access_personal_information': 'form', 'manage_personal_information': 'form', 'manage_ssh_keys': 'form', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'text/html', 'application/json' ], 'content_type': [ 'application/x-www-form-urlencoded' ] }, api_client=api_client, callable=__authorize_token ) def __get_available_rights( self, **kwargs ): """get_available_rights # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_available_rights(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_available_rights = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/oauth/rights', 'operation_id': 'get_available_rights', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_available_rights ) def __get_login_data( self, **kwargs ): """get_login_data # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_login_data(async_req=True) >>> result = thread.get() Keyword Args: oauth_key (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_login_data = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/oauth/login_data', 'operation_id': 'get_login_data', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'oauth_key', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'oauth_key': (str,), }, 'attribute_map': { 'oauth_key': 'oauth_key', }, 'location_map': { 'oauth_key': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_login_data ) def __post_access_token_request( self, **kwargs ): """post_access_token_request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_access_token_request(async_req=True) >>> result = thread.get() Keyword Args: oauth_consumer_key (str): [optional] oauth_token (str): [optional] oauth_signature_method (str): [optional] oauth_signature (str): [optional] oauth_timestamp (str): [optional] oauth_nonce (str): [optional] oauth_version (str): [optional] oauth_verifier (str): [optional] oauth_callback (str): [optional] oauth_token_secret (str): [optional] oauth_callback_confirmed (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.post_access_token_request = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/oauth/access_token', 'operation_id': 'post_access_token_request', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'oauth_consumer_key', 'oauth_token', 'oauth_signature_method', 'oauth_signature', 'oauth_timestamp', 'oauth_nonce', 'oauth_version', 'oauth_verifier', 'oauth_callback', 'oauth_token_secret', 'oauth_callback_confirmed', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'oauth_consumer_key': (str,), 'oauth_token': (str,), 'oauth_signature_method': (str,), 'oauth_signature': (str,), 'oauth_timestamp': (str,), 'oauth_nonce': (str,), 'oauth_version': (str,), 'oauth_verifier': (str,), 'oauth_callback': (str,), 'oauth_token_secret': (str,), 'oauth_callback_confirmed': (str,), }, 'attribute_map': { 'oauth_consumer_key': 'oauth_consumer_key', 'oauth_token': 'oauth_token', 'oauth_signature_method': 'oauth_signature_method', 'oauth_signature': 'oauth_signature', 'oauth_timestamp': 'oauth_timestamp', 'oauth_nonce': 'oauth_nonce', 'oauth_version': 'oauth_version', 'oauth_verifier': 'oauth_verifier', 'oauth_callback': 'oauth_callback', 'oauth_token_secret': 'oauth_token_secret', 'oauth_callback_confirmed': 'oauth_callback_confirmed', }, 'location_map': { 'oauth_consumer_key': 'form', 'oauth_token': 'form', 'oauth_signature_method': 'form', 'oauth_signature': 'form', 'oauth_timestamp': 'form', 'oauth_nonce': 'form', 'oauth_version': 'form', 'oauth_verifier': 'form', 'oauth_callback': 'form', 'oauth_token_secret': 'form', 'oauth_callback_confirmed': 'form', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/x-www-form-urlencoded' ], 'content_type': [ 'application/x-www-form-urlencoded' ] }, api_client=api_client, callable=__post_access_token_request ) def __post_access_token_request_query( self, **kwargs ): """post_access_token_request_query # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_access_token_request_query(async_req=True) >>> result = thread.get() Keyword Args: oauth_consumer_key (str): [optional] oauth_token (str): [optional] oauth_signature_method (str): [optional] oauth_signature (str): [optional] oauth_timestamp (str): [optional] oauth_nonce (str): [optional] oauth_version (str): [optional] oauth_verifier (str): [optional] oauth_callback (str): [optional] oauth_token_secret (str): [optional] oauth_callback_confirmed (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.post_access_token_request_query = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/oauth/access_token_query', 'operation_id': 'post_access_token_request_query', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'oauth_consumer_key', 'oauth_token', 'oauth_signature_method', 'oauth_signature', 'oauth_timestamp', 'oauth_nonce', 'oauth_version', 'oauth_verifier', 'oauth_callback', 'oauth_token_secret', 'oauth_callback_confirmed', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'oauth_consumer_key': (str,), 'oauth_token': (str,), 'oauth_signature_method': (str,), 'oauth_signature': (str,), 'oauth_timestamp': (str,), 'oauth_nonce': (str,), 'oauth_version': (str,), 'oauth_verifier': (str,), 'oauth_callback': (str,), 'oauth_token_secret': (str,), 'oauth_callback_confirmed': (str,), }, 'attribute_map': { 'oauth_consumer_key': 'oauth_consumer_key', 'oauth_token': 'oauth_token', 'oauth_signature_method': 'oauth_signature_method', 'oauth_signature': 'oauth_signature', 'oauth_timestamp': 'oauth_timestamp', 'oauth_nonce': 'oauth_nonce', 'oauth_version': 'oauth_version', 'oauth_verifier': 'oauth_verifier', 'oauth_callback': 'oauth_callback', 'oauth_token_secret': 'oauth_token_secret', 'oauth_callback_confirmed': 'oauth_callback_confirmed', }, 'location_map': { 'oauth_consumer_key': 'query', 'oauth_token': 'query', 'oauth_signature_method': 'query', 'oauth_signature': 'query', 'oauth_timestamp': 'query', 'oauth_nonce': 'query', 'oauth_version': 'query', 'oauth_verifier': 'query', 'oauth_callback': 'query', 'oauth_token_secret': 'query', 'oauth_callback_confirmed': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/x-www-form-urlencoded' ], 'content_type': [], }, api_client=api_client, callable=__post_access_token_request_query ) def __post_authorize( self, wannabe_authorization, **kwargs ): """post_authorize # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_authorize(wannabe_authorization, async_req=True) >>> result = thread.get() Args: wannabe_authorization (WannabeAuthorization): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['wannabe_authorization'] = \ wannabe_authorization return self.call_with_http_info(**kwargs) self.post_authorize = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/authorize', 'operation_id': 'post_authorize', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'wannabe_authorization', ], 'required': [ 'wannabe_authorization', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'wannabe_authorization': (WannabeAuthorization,), }, 'attribute_map': { }, 'location_map': { 'wannabe_authorization': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__post_authorize ) def __post_req_token_request( self, **kwargs ): """post_req_token_request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_req_token_request(async_req=True) >>> result = thread.get() Keyword Args: clever_flavor (str): [optional] oauth_consumer_key (str): [optional] oauth_token (str): [optional] oauth_signature_method (str): [optional] oauth_signature (str): [optional] oauth_timestamp (str): [optional] oauth_nonce (str): [optional] oauth_version (str): [optional] oauth_verifier (str): [optional] oauth_callback (str): [optional] oauth_token_secret (str): [optional] oauth_callback_confirmed (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.post_req_token_request = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/oauth/request_token', 'operation_id': 'post_req_token_request', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'clever_flavor', 'oauth_consumer_key', 'oauth_token', 'oauth_signature_method', 'oauth_signature', 'oauth_timestamp', 'oauth_nonce', 'oauth_version', 'oauth_verifier', 'oauth_callback', 'oauth_token_secret', 'oauth_callback_confirmed', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'clever_flavor': (str,), 'oauth_consumer_key': (str,), 'oauth_token': (str,), 'oauth_signature_method': (str,), 'oauth_signature': (str,), 'oauth_timestamp': (str,), 'oauth_nonce': (str,), 'oauth_version': (str,), 'oauth_verifier': (str,), 'oauth_callback': (str,), 'oauth_token_secret': (str,), 'oauth_callback_confirmed': (str,), }, 'attribute_map': { 'clever_flavor': 'clever_flavor', 'oauth_consumer_key': 'oauth_consumer_key', 'oauth_token': 'oauth_token', 'oauth_signature_method': 'oauth_signature_method', 'oauth_signature': 'oauth_signature', 'oauth_timestamp': 'oauth_timestamp', 'oauth_nonce': 'oauth_nonce', 'oauth_version': 'oauth_version', 'oauth_verifier': 'oauth_verifier', 'oauth_callback': 'oauth_callback', 'oauth_token_secret': 'oauth_token_secret', 'oauth_callback_confirmed': 'oauth_callback_confirmed', }, 'location_map': { 'clever_flavor': 'query', 'oauth_consumer_key': 'form', 'oauth_token': 'form', 'oauth_signature_method': 'form', 'oauth_signature': 'form', 'oauth_timestamp': 'form', 'oauth_nonce': 'form', 'oauth_version': 'form', 'oauth_verifier': 'form', 'oauth_callback': 'form', 'oauth_token_secret': 'form', 'oauth_callback_confirmed': 'form', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/x-www-form-urlencoded' ], 'content_type': [ 'application/x-www-form-urlencoded' ] }, api_client=api_client, callable=__post_req_token_request ) def __post_req_token_request_query_string( self, **kwargs ): """post_req_token_request_query_string # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_req_token_request_query_string(async_req=True) >>> result = thread.get() Keyword Args: clever_flavor (str): [optional] oauth_consumer_key (str): [optional] oauth_token (str): [optional] oauth_signature_method (str): [optional] oauth_signature (str): [optional] oauth_timestamp (str): [optional] oauth_nonce (str): [optional] oauth_version (str): [optional] oauth_verifier (str): [optional] oauth_callback (str): [optional] oauth_token_secret (str): [optional] oauth_callback_confirmed (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.post_req_token_request_query_string = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/oauth/request_token_query', 'operation_id': 'post_req_token_request_query_string', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'clever_flavor', 'oauth_consumer_key', 'oauth_token', 'oauth_signature_method', 'oauth_signature', 'oauth_timestamp', 'oauth_nonce', 'oauth_version', 'oauth_verifier', 'oauth_callback', 'oauth_token_secret', 'oauth_callback_confirmed', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'clever_flavor': (str,), 'oauth_consumer_key': (str,), 'oauth_token': (str,), 'oauth_signature_method': (str,), 'oauth_signature': (str,), 'oauth_timestamp': (str,), 'oauth_nonce': (str,), 'oauth_version': (str,), 'oauth_verifier': (str,), 'oauth_callback': (str,), 'oauth_token_secret': (str,), 'oauth_callback_confirmed': (str,), }, 'attribute_map': { 'clever_flavor': 'clever_flavor', 'oauth_consumer_key': 'oauth_consumer_key', 'oauth_token': 'oauth_token', 'oauth_signature_method': 'oauth_signature_method', 'oauth_signature': 'oauth_signature', 'oauth_timestamp': 'oauth_timestamp', 'oauth_nonce': 'oauth_nonce', 'oauth_version': 'oauth_version', 'oauth_verifier': 'oauth_verifier', 'oauth_callback': 'oauth_callback', 'oauth_token_secret': 'oauth_token_secret', 'oauth_callback_confirmed': 'oauth_callback_confirmed', }, 'location_map': { 'clever_flavor': 'query', 'oauth_consumer_key': 'query', 'oauth_token': 'query', 'oauth_signature_method': 'query', 'oauth_signature': 'query', 'oauth_timestamp': 'query', 'oauth_nonce': 'query', 'oauth_version': 'query', 'oauth_verifier': 'query', 'oauth_callback': 'query', 'oauth_token_secret': 'query', 'oauth_callback_confirmed': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/x-www-form-urlencoded' ], 'content_type': [], }, api_client=api_client, callable=__post_req_token_request_query_string )
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,266
krezreb/openapi-client-clevercloud
refs/heads/master
/openapi_client/models/__init__.py
# flake8: noqa # import all models into this package # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: # from from openapi_client.model.pet import Pet # or import this package, but before doing it, use: # import sys # sys.setrecursionlimit(n) from openapi_client.model.addon_application_info import AddonApplicationInfo from openapi_client.model.addon_application_summary import AddonApplicationSummary from openapi_client.model.addon_environment_view import AddonEnvironmentView from openapi_client.model.addon_feature_instance_view import AddonFeatureInstanceView from openapi_client.model.addon_feature_view import AddonFeatureView from openapi_client.model.addon_plan_view import AddonPlanView from openapi_client.model.addon_provider_info_full_view import AddonProviderInfoFullView from openapi_client.model.addon_provider_info_view import AddonProviderInfoView from openapi_client.model.addon_provider_sso_data import AddonProviderSSOData from openapi_client.model.addon_sso_data import AddonSSOData from openapi_client.model.addon_summary import AddonSummary from openapi_client.model.addon_view import AddonView from openapi_client.model.application_summary import ApplicationSummary from openapi_client.model.application_view import ApplicationView from openapi_client.model.author import Author from openapi_client.model.available_instance_view import AvailableInstanceView from openapi_client.model.braintree_token import BraintreeToken from openapi_client.model.cli_token_view import CliTokenView from openapi_client.model.coupon_view import CouponView from openapi_client.model.deployment_info_view import DeploymentInfoView from openapi_client.model.deployment_view import DeploymentView from openapi_client.model.drop_count_view import DropCountView from openapi_client.model.drop_price_view import DropPriceView from openapi_client.model.end_of_invoice_error import EndOfInvoiceError from openapi_client.model.end_of_invoice_response import EndOfInvoiceResponse from openapi_client.model.flavor_view import FlavorView from openapi_client.model.github_commit import GithubCommit from openapi_client.model.github_webhook_payload import GithubWebhookPayload from openapi_client.model.github_webhook_pusher import GithubWebhookPusher from openapi_client.model.github_webhook_repository import GithubWebhookRepository from openapi_client.model.github_webhook_sender import GithubWebhookSender from openapi_client.model.instance_variant_view import InstanceVariantView from openapi_client.model.instance_view import InstanceView from openapi_client.model.invoice_line_rendering import InvoiceLineRendering from openapi_client.model.invoice_rendering import InvoiceRendering from openapi_client.model.linked_addon_environment_view import LinkedAddonEnvironmentView from openapi_client.model.mfa_recovery_code import MFARecoveryCode from openapi_client.model.message import Message from openapi_client.model.namespace_view import NamespaceView from openapi_client.model.next_in_payment_flow import NextInPaymentFlow from openapi_client.model.o_auth1_access_token_view import OAuth1AccessTokenView from openapi_client.model.o_auth1_consumer_summary import OAuth1ConsumerSummary from openapi_client.model.o_auth1_consumer_view import OAuth1ConsumerView from openapi_client.model.o_auth_application_view import OAuthApplicationView from openapi_client.model.o_auth_rights_view import OAuthRightsView from openapi_client.model.o_auth_transaction_view import OAuthTransactionView from openapi_client.model.organisation_member_user_view import OrganisationMemberUserView from openapi_client.model.organisation_member_view import OrganisationMemberView from openapi_client.model.organisation_summary import OrganisationSummary from openapi_client.model.organisation_view import OrganisationView from openapi_client.model.owner_view import OwnerView from openapi_client.model.package_view import PackageView from openapi_client.model.payment_data import PaymentData from openapi_client.model.payment_info_view import PaymentInfoView from openapi_client.model.payment_method_view import PaymentMethodView from openapi_client.model.payment_provider_selection import PaymentProviderSelection from openapi_client.model.payment_provider_view import PaymentProviderView from openapi_client.model.price_with_tax_info import PriceWithTaxInfo from openapi_client.model.provider_summary import ProviderSummary from openapi_client.model.recurrent_payment_view import RecurrentPaymentView from openapi_client.model.secret_view import SecretView from openapi_client.model.setup_intent_view import SetupIntentView from openapi_client.model.ssh_key_view import SshKeyView from openapi_client.model.stripe_confirmation_error_message import StripeConfirmationErrorMessage from openapi_client.model.summary import Summary from openapi_client.model.super_nova_flavor import SuperNovaFlavor from openapi_client.model.super_nova_instance_map import SuperNovaInstanceMap from openapi_client.model.super_nova_instance_view import SuperNovaInstanceView from openapi_client.model.tcp_redir_view import TcpRedirView from openapi_client.model.url_view import UrlView from openapi_client.model.user_summary import UserSummary from openapi_client.model.user_view import UserView from openapi_client.model.value_with_unit import ValueWithUnit from openapi_client.model.vat_result import VatResult from openapi_client.model.vhost_view import VhostView from openapi_client.model.wanna_buy_package import WannaBuyPackage from openapi_client.model.wannabe_addon_billing import WannabeAddonBilling from openapi_client.model.wannabe_addon_config import WannabeAddonConfig from openapi_client.model.wannabe_addon_feature import WannabeAddonFeature from openapi_client.model.wannabe_addon_plan import WannabeAddonPlan from openapi_client.model.wannabe_addon_provider import WannabeAddonProvider from openapi_client.model.wannabe_addon_provider_api import WannabeAddonProviderAPI from openapi_client.model.wannabe_addon_provider_api_url import WannabeAddonProviderAPIUrl from openapi_client.model.wannabe_addon_provider_infos import WannabeAddonProviderInfos from openapi_client.model.wannabe_addon_provision import WannabeAddonProvision from openapi_client.model.wannabe_application import WannabeApplication from openapi_client.model.wannabe_authorization import WannabeAuthorization from openapi_client.model.wannabe_avatar_source import WannabeAvatarSource from openapi_client.model.wannabe_branch import WannabeBranch from openapi_client.model.wannabe_build_flavor import WannabeBuildFlavor from openapi_client.model.wannabe_inter_addon_provision import WannabeInterAddonProvision from openapi_client.model.wannabe_mfa_creds import WannabeMFACreds from openapi_client.model.wannabe_mfa_fav import WannabeMFAFav from openapi_client.model.wannabe_max_credits import WannabeMaxCredits from openapi_client.model.wannabe_member import WannabeMember from openapi_client.model.wannabe_namespace import WannabeNamespace from openapi_client.model.wannabe_o_auth1_consumer import WannabeOAuth1Consumer from openapi_client.model.wannabe_oauth_app import WannabeOauthApp from openapi_client.model.wannabe_organisation import WannabeOrganisation from openapi_client.model.wannabe_password import WannabePassword from openapi_client.model.wannabe_plan_change import WannabePlanChange from openapi_client.model.wannabe_user import WannabeUser from openapi_client.model.wannabe_value import WannabeValue from openapi_client.model.zone_view import ZoneView
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,267
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_github_webhook_payload.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import sys import unittest import openapi_client from openapi_client.model.github_commit import GithubCommit from openapi_client.model.github_webhook_pusher import GithubWebhookPusher from openapi_client.model.github_webhook_repository import GithubWebhookRepository from openapi_client.model.github_webhook_sender import GithubWebhookSender globals()['GithubCommit'] = GithubCommit globals()['GithubWebhookPusher'] = GithubWebhookPusher globals()['GithubWebhookRepository'] = GithubWebhookRepository globals()['GithubWebhookSender'] = GithubWebhookSender from openapi_client.model.github_webhook_payload import GithubWebhookPayload class TestGithubWebhookPayload(unittest.TestCase): """GithubWebhookPayload unit test stubs""" def setUp(self): pass def tearDown(self): pass def testGithubWebhookPayload(self): """Test GithubWebhookPayload""" # FIXME: construct object with mandatory attributes with example values # model = GithubWebhookPayload() # noqa: E501 pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,268
krezreb/openapi-client-clevercloud
refs/heads/master
/openapi_client/api/organisation_api.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from openapi_client.api_client import ApiClient, Endpoint as _Endpoint from openapi_client.model_utils import ( # noqa: F401 check_allowed_values, check_validations, date, datetime, file_type, none_type, validate_and_convert_types ) from openapi_client.model.addon_environment_view import AddonEnvironmentView from openapi_client.model.addon_feature_instance_view import AddonFeatureInstanceView from openapi_client.model.addon_feature_view import AddonFeatureView from openapi_client.model.addon_plan_view import AddonPlanView from openapi_client.model.addon_provider_info_full_view import AddonProviderInfoFullView from openapi_client.model.addon_provider_info_view import AddonProviderInfoView from openapi_client.model.addon_provider_sso_data import AddonProviderSSOData from openapi_client.model.addon_view import AddonView from openapi_client.model.application_view import ApplicationView from openapi_client.model.braintree_token import BraintreeToken from openapi_client.model.deployment_view import DeploymentView from openapi_client.model.drop_count_view import DropCountView from openapi_client.model.invoice_rendering import InvoiceRendering from openapi_client.model.linked_addon_environment_view import LinkedAddonEnvironmentView from openapi_client.model.message import Message from openapi_client.model.namespace_view import NamespaceView from openapi_client.model.next_in_payment_flow import NextInPaymentFlow from openapi_client.model.o_auth1_consumer_view import OAuth1ConsumerView from openapi_client.model.organisation_member_view import OrganisationMemberView from openapi_client.model.organisation_view import OrganisationView from openapi_client.model.payment_data import PaymentData from openapi_client.model.payment_info_view import PaymentInfoView from openapi_client.model.payment_method_view import PaymentMethodView from openapi_client.model.payment_provider_selection import PaymentProviderSelection from openapi_client.model.price_with_tax_info import PriceWithTaxInfo from openapi_client.model.recurrent_payment_view import RecurrentPaymentView from openapi_client.model.secret_view import SecretView from openapi_client.model.setup_intent_view import SetupIntentView from openapi_client.model.stripe_confirmation_error_message import StripeConfirmationErrorMessage from openapi_client.model.super_nova_instance_view import SuperNovaInstanceView from openapi_client.model.tcp_redir_view import TcpRedirView from openapi_client.model.url_view import UrlView from openapi_client.model.vhost_view import VhostView from openapi_client.model.wanna_buy_package import WannaBuyPackage from openapi_client.model.wannabe_addon_feature import WannabeAddonFeature from openapi_client.model.wannabe_addon_plan import WannabeAddonPlan from openapi_client.model.wannabe_addon_provider import WannabeAddonProvider from openapi_client.model.wannabe_addon_provider_infos import WannabeAddonProviderInfos from openapi_client.model.wannabe_addon_provision import WannabeAddonProvision from openapi_client.model.wannabe_application import WannabeApplication from openapi_client.model.wannabe_branch import WannabeBranch from openapi_client.model.wannabe_build_flavor import WannabeBuildFlavor from openapi_client.model.wannabe_max_credits import WannabeMaxCredits from openapi_client.model.wannabe_member import WannabeMember from openapi_client.model.wannabe_namespace import WannabeNamespace from openapi_client.model.wannabe_o_auth1_consumer import WannabeOAuth1Consumer from openapi_client.model.wannabe_organisation import WannabeOrganisation from openapi_client.model.wannabe_plan_change import WannabePlanChange from openapi_client.model.wannabe_value import WannabeValue class OrganisationApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __abort_addon_migration( self, id, addon_id, migration_id, **kwargs ): """abort_addon_migration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.abort_addon_migration(id, addon_id, migration_id, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): migration_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id kwargs['migration_id'] = \ migration_id return self.call_with_http_info(**kwargs) self.abort_addon_migration = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}/migrations/{migrationId}', 'operation_id': 'abort_addon_migration', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', 'migration_id', ], 'required': [ 'id', 'addon_id', 'migration_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), 'migration_id': (str,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', 'migration_id': 'migrationId', }, 'location_map': { 'id': 'path', 'addon_id': 'path', 'migration_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__abort_addon_migration ) def __add_addon_tag_by_orga_and_addon_id( self, id, addon_id, tag, **kwargs ): """add_addon_tag_by_orga_and_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_addon_tag_by_orga_and_addon_id(id, addon_id, tag, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): tag (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id kwargs['tag'] = \ tag return self.call_with_http_info(**kwargs) self.add_addon_tag_by_orga_and_addon_id = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}/tags/{tag}', 'operation_id': 'add_addon_tag_by_orga_and_addon_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', 'tag', ], 'required': [ 'id', 'addon_id', 'tag', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), 'tag': (str,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', 'tag': 'tag', }, 'location_map': { 'id': 'path', 'addon_id': 'path', 'tag': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__add_addon_tag_by_orga_and_addon_id ) def __add_application_by_orga( self, id, wannabe_application, **kwargs ): """add_application_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_application_by_orga(id, wannabe_application, async_req=True) >>> result = thread.get() Args: id (str): wannabe_application (WannabeApplication): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: ApplicationView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['wannabe_application'] = \ wannabe_application return self.call_with_http_info(**kwargs) self.add_application_by_orga = _Endpoint( settings={ 'response_type': (ApplicationView,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications', 'operation_id': 'add_application_by_orga', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'id', 'wannabe_application', ], 'required': [ 'id', 'wannabe_application', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'wannabe_application': (WannabeApplication,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', 'wannabe_application': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__add_application_by_orga ) def __add_application_dependency_by_orga_and_app_id( self, id, app_id, dependency_id, **kwargs ): """add_application_dependency_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_application_dependency_by_orga_and_app_id(id, app_id, dependency_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): dependency_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['dependency_id'] = \ dependency_id return self.call_with_http_info(**kwargs) self.add_application_dependency_by_orga_and_app_id = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/dependencies/{dependencyId}', 'operation_id': 'add_application_dependency_by_orga_and_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'dependency_id', ], 'required': [ 'id', 'app_id', 'dependency_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'dependency_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'dependency_id': 'dependencyId', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'dependency_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__add_application_dependency_by_orga_and_app_id ) def __add_application_tag_by_orga_and_app_id( self, id, app_id, tag, **kwargs ): """add_application_tag_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_application_tag_by_orga_and_app_id(id, app_id, tag, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): tag (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['tag'] = \ tag return self.call_with_http_info(**kwargs) self.add_application_tag_by_orga_and_app_id = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/tags/{tag}', 'operation_id': 'add_application_tag_by_orga_and_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'tag', ], 'required': [ 'id', 'app_id', 'tag', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'tag': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'tag': 'tag', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'tag': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__add_application_tag_by_orga_and_app_id ) def __add_beta_tester( self, id, provider_id, **kwargs ): """add_beta_tester # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_beta_tester(id, provider_id, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id return self.call_with_http_info(**kwargs) self.add_beta_tester = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}/testers', 'operation_id': 'add_beta_tester', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', ], 'required': [ 'id', 'provider_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', }, 'location_map': { 'id': 'path', 'provider_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__add_beta_tester ) def __add_organisation_member( self, id, wannabe_member, **kwargs ): """add_organisation_member # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_organisation_member(id, wannabe_member, async_req=True) >>> result = thread.get() Args: id (str): wannabe_member (WannabeMember): Keyword Args: invitation_key (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['wannabe_member'] = \ wannabe_member return self.call_with_http_info(**kwargs) self.add_organisation_member = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/organisations/{id}/members', 'operation_id': 'add_organisation_member', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'id', 'wannabe_member', 'invitation_key', ], 'required': [ 'id', 'wannabe_member', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'wannabe_member': (WannabeMember,), 'invitation_key': (str,), }, 'attribute_map': { 'id': 'id', 'invitation_key': 'invitationKey', }, 'location_map': { 'id': 'path', 'wannabe_member': 'body', 'invitation_key': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__add_organisation_member ) def __add_payment_method_by_orga( self, id, payment_data, **kwargs ): """add_payment_method_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_payment_method_by_orga(id, payment_data, async_req=True) >>> result = thread.get() Args: id (str): payment_data (PaymentData): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: PaymentMethodView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['payment_data'] = \ payment_data return self.call_with_http_info(**kwargs) self.add_payment_method_by_orga = _Endpoint( settings={ 'response_type': (PaymentMethodView,), 'auth': [], 'endpoint_path': '/organisations/{id}/payments/methods', 'operation_id': 'add_payment_method_by_orga', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'id', 'payment_data', ], 'required': [ 'id', 'payment_data', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'payment_data': (PaymentData,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', 'payment_data': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__add_payment_method_by_orga ) def __add_provider_feature( self, id, provider_id, wannabe_addon_feature, **kwargs ): """add_provider_feature # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_provider_feature(id, provider_id, wannabe_addon_feature, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): wannabe_addon_feature (WannabeAddonFeature): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonFeatureView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id kwargs['wannabe_addon_feature'] = \ wannabe_addon_feature return self.call_with_http_info(**kwargs) self.add_provider_feature = _Endpoint( settings={ 'response_type': (AddonFeatureView,), 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}/features', 'operation_id': 'add_provider_feature', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', 'wannabe_addon_feature', ], 'required': [ 'id', 'provider_id', 'wannabe_addon_feature', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), 'wannabe_addon_feature': (WannabeAddonFeature,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', }, 'location_map': { 'id': 'path', 'provider_id': 'path', 'wannabe_addon_feature': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__add_provider_feature ) def __add_provider_plan( self, id, provider_id, wannabe_addon_plan, **kwargs ): """add_provider_plan # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_provider_plan(id, provider_id, wannabe_addon_plan, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): wannabe_addon_plan (WannabeAddonPlan): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonPlanView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id kwargs['wannabe_addon_plan'] = \ wannabe_addon_plan return self.call_with_http_info(**kwargs) self.add_provider_plan = _Endpoint( settings={ 'response_type': (AddonPlanView,), 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}/plans', 'operation_id': 'add_provider_plan', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', 'wannabe_addon_plan', ], 'required': [ 'id', 'provider_id', 'wannabe_addon_plan', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), 'wannabe_addon_plan': (WannabeAddonPlan,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', }, 'location_map': { 'id': 'path', 'provider_id': 'path', 'wannabe_addon_plan': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__add_provider_plan ) def __add_tcp_redir( self, id, app_id, wannabe_namespace, **kwargs ): """add_tcp_redir # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_tcp_redir(id, app_id, wannabe_namespace, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): wannabe_namespace (WannabeNamespace): Keyword Args: payment (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: TcpRedirView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['wannabe_namespace'] = \ wannabe_namespace return self.call_with_http_info(**kwargs) self.add_tcp_redir = _Endpoint( settings={ 'response_type': (TcpRedirView,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/tcpRedirs', 'operation_id': 'add_tcp_redir', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'wannabe_namespace', 'payment', ], 'required': [ 'id', 'app_id', 'wannabe_namespace', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'wannabe_namespace': (WannabeNamespace,), 'payment': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'payment': 'payment', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'wannabe_namespace': 'body', 'payment': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__add_tcp_redir ) def __add_vhosts_by_orga_and_app_id( self, id, app_id, domain, **kwargs ): """add_vhosts_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_vhosts_by_orga_and_app_id(id, app_id, domain, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): domain (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['domain'] = \ domain return self.call_with_http_info(**kwargs) self.add_vhosts_by_orga_and_app_id = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/vhosts/{domain}', 'operation_id': 'add_vhosts_by_orga_and_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'domain', ], 'required': [ 'id', 'app_id', 'domain', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'domain': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'domain': 'domain', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'domain': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__add_vhosts_by_orga_and_app_id ) def __buy_drops_by_orga( self, id, wanna_buy_package, **kwargs ): """buy_drops_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.buy_drops_by_orga(id, wanna_buy_package, async_req=True) >>> result = thread.get() Args: id (str): wanna_buy_package (WannaBuyPackage): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: InvoiceRendering If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['wanna_buy_package'] = \ wanna_buy_package return self.call_with_http_info(**kwargs) self.buy_drops_by_orga = _Endpoint( settings={ 'response_type': (InvoiceRendering,), 'auth': [], 'endpoint_path': '/organisations/{id}/payments/billings', 'operation_id': 'buy_drops_by_orga', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'id', 'wanna_buy_package', ], 'required': [ 'id', 'wanna_buy_package', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'wanna_buy_package': (WannaBuyPackage,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', 'wanna_buy_package': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__buy_drops_by_orga ) def __cancel_application_deployment_for_orga( self, id, app_id, deployment_id, **kwargs ): """cancel_application_deployment_for_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_application_deployment_for_orga(id, app_id, deployment_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): deployment_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['deployment_id'] = \ deployment_id return self.call_with_http_info(**kwargs) self.cancel_application_deployment_for_orga = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/deployments/{deploymentId}/instances', 'operation_id': 'cancel_application_deployment_for_orga', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'deployment_id', ], 'required': [ 'id', 'app_id', 'deployment_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'deployment_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'deployment_id': 'deploymentId', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'deployment_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__cancel_application_deployment_for_orga ) def __change_plan_by_orga_and_addon_id( self, id, addon_id, wannabe_plan_change, **kwargs ): """change_plan_by_orga_and_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.change_plan_by_orga_and_addon_id(id, addon_id, wannabe_plan_change, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): wannabe_plan_change (WannabePlanChange): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id kwargs['wannabe_plan_change'] = \ wannabe_plan_change return self.call_with_http_info(**kwargs) self.change_plan_by_orga_and_addon_id = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}/migrations', 'operation_id': 'change_plan_by_orga_and_addon_id', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', 'wannabe_plan_change', ], 'required': [ 'id', 'addon_id', 'wannabe_plan_change', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), 'wannabe_plan_change': (WannabePlanChange,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', }, 'location_map': { 'id': 'path', 'addon_id': 'path', 'wannabe_plan_change': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__change_plan_by_orga_and_addon_id ) def __choose_payment_provider_by_orga( self, id, bid, payment_provider_selection, **kwargs ): """choose_payment_provider_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.choose_payment_provider_by_orga(id, bid, payment_provider_selection, async_req=True) >>> result = thread.get() Args: id (str): bid (str): payment_provider_selection (PaymentProviderSelection): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: NextInPaymentFlow If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['bid'] = \ bid kwargs['payment_provider_selection'] = \ payment_provider_selection return self.call_with_http_info(**kwargs) self.choose_payment_provider_by_orga = _Endpoint( settings={ 'response_type': (NextInPaymentFlow,), 'auth': [], 'endpoint_path': '/organisations/{id}/payments/billings/{bid}', 'operation_id': 'choose_payment_provider_by_orga', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'bid', 'payment_provider_selection', ], 'required': [ 'id', 'bid', 'payment_provider_selection', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'bid': (str,), 'payment_provider_selection': (PaymentProviderSelection,), }, 'attribute_map': { 'id': 'id', 'bid': 'bid', }, 'location_map': { 'id': 'path', 'bid': 'path', 'payment_provider_selection': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__choose_payment_provider_by_orga ) def __create_consumer_by_orga( self, id, wannabe_o_auth1_consumer, **kwargs ): """create_consumer_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_consumer_by_orga(id, wannabe_o_auth1_consumer, async_req=True) >>> result = thread.get() Args: id (str): wannabe_o_auth1_consumer (WannabeOAuth1Consumer): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: OAuth1ConsumerView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['wannabe_o_auth1_consumer'] = \ wannabe_o_auth1_consumer return self.call_with_http_info(**kwargs) self.create_consumer_by_orga = _Endpoint( settings={ 'response_type': (OAuth1ConsumerView,), 'auth': [], 'endpoint_path': '/organisations/{id}/consumers', 'operation_id': 'create_consumer_by_orga', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'id', 'wannabe_o_auth1_consumer', ], 'required': [ 'id', 'wannabe_o_auth1_consumer', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'wannabe_o_auth1_consumer': (WannabeOAuth1Consumer,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', 'wannabe_o_auth1_consumer': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__create_consumer_by_orga ) def __create_organisation( self, wannabe_organisation, **kwargs ): """create_organisation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_organisation(wannabe_organisation, async_req=True) >>> result = thread.get() Args: wannabe_organisation (WannabeOrganisation): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: OrganisationView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['wannabe_organisation'] = \ wannabe_organisation return self.call_with_http_info(**kwargs) self.create_organisation = _Endpoint( settings={ 'response_type': (OrganisationView,), 'auth': [], 'endpoint_path': '/organisations', 'operation_id': 'create_organisation', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'wannabe_organisation', ], 'required': [ 'wannabe_organisation', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'wannabe_organisation': (WannabeOrganisation,), }, 'attribute_map': { }, 'location_map': { 'wannabe_organisation': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__create_organisation ) def __create_provider( self, id, wannabe_addon_provider, **kwargs ): """create_provider # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_provider(id, wannabe_addon_provider, async_req=True) >>> result = thread.get() Args: id (str): wannabe_addon_provider (WannabeAddonProvider): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonProviderInfoFullView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['wannabe_addon_provider'] = \ wannabe_addon_provider return self.call_with_http_info(**kwargs) self.create_provider = _Endpoint( settings={ 'response_type': (AddonProviderInfoFullView,), 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders', 'operation_id': 'create_provider', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'id', 'wannabe_addon_provider', ], 'required': [ 'id', 'wannabe_addon_provider', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'wannabe_addon_provider': (WannabeAddonProvider,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', 'wannabe_addon_provider': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__create_provider ) def __delete_addon_tag_by_orga_and_addon_id( self, id, addon_id, tag, **kwargs ): """delete_addon_tag_by_orga_and_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_addon_tag_by_orga_and_addon_id(id, addon_id, tag, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): tag (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id kwargs['tag'] = \ tag return self.call_with_http_info(**kwargs) self.delete_addon_tag_by_orga_and_addon_id = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}/tags/{tag}', 'operation_id': 'delete_addon_tag_by_orga_and_addon_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', 'tag', ], 'required': [ 'id', 'addon_id', 'tag', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), 'tag': (str,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', 'tag': 'tag', }, 'location_map': { 'id': 'path', 'addon_id': 'path', 'tag': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_addon_tag_by_orga_and_addon_id ) def __delete_application_by_orga_and_app_id( self, id, app_id, **kwargs ): """delete_application_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_application_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.delete_application_by_orga_and_app_id = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}', 'operation_id': 'delete_application_by_orga_and_app_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_application_by_orga_and_app_id ) def __delete_application_dependency_by_orga_and_app_id( self, id, app_id, dependency_id, **kwargs ): """delete_application_dependency_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_application_dependency_by_orga_and_app_id(id, app_id, dependency_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): dependency_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['dependency_id'] = \ dependency_id return self.call_with_http_info(**kwargs) self.delete_application_dependency_by_orga_and_app_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/dependencies/{dependencyId}', 'operation_id': 'delete_application_dependency_by_orga_and_app_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'dependency_id', ], 'required': [ 'id', 'app_id', 'dependency_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'dependency_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'dependency_id': 'dependencyId', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'dependency_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_application_dependency_by_orga_and_app_id ) def __delete_application_tag_by_orga_and_app_id( self, id, app_id, tag, **kwargs ): """delete_application_tag_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_application_tag_by_orga_and_app_id(id, app_id, tag, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): tag (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['tag'] = \ tag return self.call_with_http_info(**kwargs) self.delete_application_tag_by_orga_and_app_id = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/tags/{tag}', 'operation_id': 'delete_application_tag_by_orga_and_app_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'tag', ], 'required': [ 'id', 'app_id', 'tag', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'tag': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'tag': 'tag', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'tag': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_application_tag_by_orga_and_app_id ) def __delete_consumer_by_orga( self, id, key, **kwargs ): """delete_consumer_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_consumer_by_orga(id, key, async_req=True) >>> result = thread.get() Args: id (str): key (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['key'] = \ key return self.call_with_http_info(**kwargs) self.delete_consumer_by_orga = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/consumers/{key}', 'operation_id': 'delete_consumer_by_orga', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'key', ], 'required': [ 'id', 'key', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'key': (str,), }, 'attribute_map': { 'id': 'id', 'key': 'key', }, 'location_map': { 'id': 'path', 'key': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_consumer_by_orga ) def __delete_organisation( self, id, **kwargs ): """delete_organisation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_organisation(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.delete_organisation = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/organisations/{id}', 'operation_id': 'delete_organisation', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_organisation ) def __delete_payment_method_by_orga( self, id, m_id, **kwargs ): """delete_payment_method_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_payment_method_by_orga(id, m_id, async_req=True) >>> result = thread.get() Args: id (str): m_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['m_id'] = \ m_id return self.call_with_http_info(**kwargs) self.delete_payment_method_by_orga = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/payments/methods/{mId}', 'operation_id': 'delete_payment_method_by_orga', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'm_id', ], 'required': [ 'id', 'm_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'm_id': (str,), }, 'attribute_map': { 'id': 'id', 'm_id': 'mId', }, 'location_map': { 'id': 'path', 'm_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_payment_method_by_orga ) def __delete_provider( self, id, provider_id, **kwargs ): """delete_provider # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_provider(id, provider_id, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id return self.call_with_http_info(**kwargs) self.delete_provider = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}', 'operation_id': 'delete_provider', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', ], 'required': [ 'id', 'provider_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', }, 'location_map': { 'id': 'path', 'provider_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_provider ) def __delete_provider_feature( self, id, provider_id, feature_id, **kwargs ): """delete_provider_feature # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_provider_feature(id, provider_id, feature_id, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): feature_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id kwargs['feature_id'] = \ feature_id return self.call_with_http_info(**kwargs) self.delete_provider_feature = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}/features/{featureId}', 'operation_id': 'delete_provider_feature', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', 'feature_id', ], 'required': [ 'id', 'provider_id', 'feature_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), 'feature_id': (str,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', 'feature_id': 'featureId', }, 'location_map': { 'id': 'path', 'provider_id': 'path', 'feature_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_provider_feature ) def __delete_provider_plan( self, id, provider_id, plan_id, **kwargs ): """delete_provider_plan # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_provider_plan(id, provider_id, plan_id, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): plan_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id kwargs['plan_id'] = \ plan_id return self.call_with_http_info(**kwargs) self.delete_provider_plan = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}/plans/{planId}', 'operation_id': 'delete_provider_plan', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', 'plan_id', ], 'required': [ 'id', 'provider_id', 'plan_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), 'plan_id': (str,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', 'plan_id': 'planId', }, 'location_map': { 'id': 'path', 'provider_id': 'path', 'plan_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_provider_plan ) def __delete_provider_plan_feature( self, id, provider_id, plan_id, feature_name, **kwargs ): """delete_provider_plan_feature # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_provider_plan_feature(id, provider_id, plan_id, feature_name, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): plan_id (str): feature_name (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id kwargs['plan_id'] = \ plan_id kwargs['feature_name'] = \ feature_name return self.call_with_http_info(**kwargs) self.delete_provider_plan_feature = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}/plans/{planId}/features/{featureName}', 'operation_id': 'delete_provider_plan_feature', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', 'plan_id', 'feature_name', ], 'required': [ 'id', 'provider_id', 'plan_id', 'feature_name', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), 'plan_id': (str,), 'feature_name': (str,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', 'plan_id': 'planId', 'feature_name': 'featureName', }, 'location_map': { 'id': 'path', 'provider_id': 'path', 'plan_id': 'path', 'feature_name': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_provider_plan_feature ) def __delete_purchase_order_by_orga( self, id, bid, **kwargs ): """delete_purchase_order_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_purchase_order_by_orga(id, bid, async_req=True) >>> result = thread.get() Args: id (str): bid (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['bid'] = \ bid return self.call_with_http_info(**kwargs) self.delete_purchase_order_by_orga = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/payments/billings/{bid}', 'operation_id': 'delete_purchase_order_by_orga', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'bid', ], 'required': [ 'id', 'bid', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'bid': (str,), }, 'attribute_map': { 'id': 'id', 'bid': 'bid', }, 'location_map': { 'id': 'path', 'bid': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_purchase_order_by_orga ) def __delete_recurrent_payment_by_orga( self, id, **kwargs ): """delete_recurrent_payment_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_recurrent_payment_by_orga(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.delete_recurrent_payment_by_orga = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/payments/recurring', 'operation_id': 'delete_recurrent_payment_by_orga', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_recurrent_payment_by_orga ) def __deprovision_addon_by_orga_and_addon_id( self, id, addon_id, **kwargs ): """deprovision_addon_by_orga_and_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.deprovision_addon_by_orga_and_addon_id(id, addon_id, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.deprovision_addon_by_orga_and_addon_id = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}', 'operation_id': 'deprovision_addon_by_orga_and_addon_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', ], 'required': [ 'id', 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', }, 'location_map': { 'id': 'path', 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__deprovision_addon_by_orga_and_addon_id ) def __edit_application_by_orga_and_app_id( self, id, app_id, wannabe_application, **kwargs ): """edit_application_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_application_by_orga_and_app_id(id, app_id, wannabe_application, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): wannabe_application (WannabeApplication): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: ApplicationView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['wannabe_application'] = \ wannabe_application return self.call_with_http_info(**kwargs) self.edit_application_by_orga_and_app_id = _Endpoint( settings={ 'response_type': (ApplicationView,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}', 'operation_id': 'edit_application_by_orga_and_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'wannabe_application', ], 'required': [ 'id', 'app_id', 'wannabe_application', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'wannabe_application': (WannabeApplication,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'wannabe_application': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__edit_application_by_orga_and_app_id ) def __edit_application_env_by_orga_and_app_id_and_env_name( self, id, app_id, env_name, wannabe_value, **kwargs ): """edit_application_env_by_orga_and_app_id_and_env_name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_application_env_by_orga_and_app_id_and_env_name(id, app_id, env_name, wannabe_value, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): env_name (str): wannabe_value (WannabeValue): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: ApplicationView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['env_name'] = \ env_name kwargs['wannabe_value'] = \ wannabe_value return self.call_with_http_info(**kwargs) self.edit_application_env_by_orga_and_app_id_and_env_name = _Endpoint( settings={ 'response_type': (ApplicationView,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/env/{envName}', 'operation_id': 'edit_application_env_by_orga_and_app_id_and_env_name', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'env_name', 'wannabe_value', ], 'required': [ 'id', 'app_id', 'env_name', 'wannabe_value', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'env_name': (str,), 'wannabe_value': (WannabeValue,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'env_name': 'envName', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'env_name': 'path', 'wannabe_value': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__edit_application_env_by_orga_and_app_id_and_env_name ) def __edit_application_environment_by_orga_and_app_id( self, id, app_id, body, **kwargs ): """edit_application_environment_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_application_environment_by_orga_and_app_id(id, app_id, body, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): body (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: ApplicationView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['body'] = \ body return self.call_with_http_info(**kwargs) self.edit_application_environment_by_orga_and_app_id = _Endpoint( settings={ 'response_type': (ApplicationView,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/env', 'operation_id': 'edit_application_environment_by_orga_and_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'body', ], 'required': [ 'id', 'app_id', 'body', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'body': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__edit_application_environment_by_orga_and_app_id ) def __edit_organisation( self, id, wannabe_organisation, **kwargs ): """edit_organisation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_organisation(id, wannabe_organisation, async_req=True) >>> result = thread.get() Args: id (str): wannabe_organisation (WannabeOrganisation): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: OrganisationView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['wannabe_organisation'] = \ wannabe_organisation return self.call_with_http_info(**kwargs) self.edit_organisation = _Endpoint( settings={ 'response_type': (OrganisationView,), 'auth': [], 'endpoint_path': '/organisations/{id}', 'operation_id': 'edit_organisation', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'wannabe_organisation', ], 'required': [ 'id', 'wannabe_organisation', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'wannabe_organisation': (WannabeOrganisation,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', 'wannabe_organisation': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__edit_organisation ) def __edit_organisation_member( self, id, user_id, wannabe_member, **kwargs ): """edit_organisation_member # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_organisation_member(id, user_id, wannabe_member, async_req=True) >>> result = thread.get() Args: id (str): user_id (str): wannabe_member (WannabeMember): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['user_id'] = \ user_id kwargs['wannabe_member'] = \ wannabe_member return self.call_with_http_info(**kwargs) self.edit_organisation_member = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/organisations/{id}/members/{userId}', 'operation_id': 'edit_organisation_member', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'user_id', 'wannabe_member', ], 'required': [ 'id', 'user_id', 'wannabe_member', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'user_id': (str,), 'wannabe_member': (WannabeMember,), }, 'attribute_map': { 'id': 'id', 'user_id': 'userId', }, 'location_map': { 'id': 'path', 'user_id': 'path', 'wannabe_member': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__edit_organisation_member ) def __edit_provider_plan( self, id, provider_id, plan_id, wannabe_addon_plan, **kwargs ): """edit_provider_plan # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_provider_plan(id, provider_id, plan_id, wannabe_addon_plan, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): plan_id (str): wannabe_addon_plan (WannabeAddonPlan): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonPlanView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id kwargs['plan_id'] = \ plan_id kwargs['wannabe_addon_plan'] = \ wannabe_addon_plan return self.call_with_http_info(**kwargs) self.edit_provider_plan = _Endpoint( settings={ 'response_type': (AddonPlanView,), 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}/plans/{planId}', 'operation_id': 'edit_provider_plan', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', 'plan_id', 'wannabe_addon_plan', ], 'required': [ 'id', 'provider_id', 'plan_id', 'wannabe_addon_plan', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), 'plan_id': (str,), 'wannabe_addon_plan': (WannabeAddonPlan,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', 'plan_id': 'planId', }, 'location_map': { 'id': 'path', 'provider_id': 'path', 'plan_id': 'path', 'wannabe_addon_plan': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__edit_provider_plan ) def __edit_provider_plan_feature( self, id, provider_id, plan_id, feature_name, addon_feature_instance_view, **kwargs ): """edit_provider_plan_feature # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_provider_plan_feature(id, provider_id, plan_id, feature_name, addon_feature_instance_view, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): plan_id (str): feature_name (str): addon_feature_instance_view (AddonFeatureInstanceView): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonPlanView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id kwargs['plan_id'] = \ plan_id kwargs['feature_name'] = \ feature_name kwargs['addon_feature_instance_view'] = \ addon_feature_instance_view return self.call_with_http_info(**kwargs) self.edit_provider_plan_feature = _Endpoint( settings={ 'response_type': (AddonPlanView,), 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}/plans/{planId}/features/{featureName}', 'operation_id': 'edit_provider_plan_feature', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', 'plan_id', 'feature_name', 'addon_feature_instance_view', ], 'required': [ 'id', 'provider_id', 'plan_id', 'feature_name', 'addon_feature_instance_view', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), 'plan_id': (str,), 'feature_name': (str,), 'addon_feature_instance_view': (AddonFeatureInstanceView,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', 'plan_id': 'planId', 'feature_name': 'featureName', }, 'location_map': { 'id': 'path', 'provider_id': 'path', 'plan_id': 'path', 'feature_name': 'path', 'addon_feature_instance_view': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__edit_provider_plan_feature ) def __get_addon_by_orga_and_addon_id( self, id, addon_id, **kwargs ): """get_addon_by_orga_and_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_addon_by_orga_and_addon_id(id, addon_id, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.get_addon_by_orga_and_addon_id = _Endpoint( settings={ 'response_type': (AddonView,), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}', 'operation_id': 'get_addon_by_orga_and_addon_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', ], 'required': [ 'id', 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', }, 'location_map': { 'id': 'path', 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_addon_by_orga_and_addon_id ) def __get_addon_env_by_orga_and_addon_id( self, id, addon_id, **kwargs ): """get_addon_env_by_orga_and_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_addon_env_by_orga_and_addon_id(id, addon_id, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [AddonEnvironmentView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.get_addon_env_by_orga_and_addon_id = _Endpoint( settings={ 'response_type': ([AddonEnvironmentView],), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}/env', 'operation_id': 'get_addon_env_by_orga_and_addon_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', ], 'required': [ 'id', 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', }, 'location_map': { 'id': 'path', 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_addon_env_by_orga_and_addon_id ) def __get_addon_instance( self, id, addon_id, instance_id, **kwargs ): """get_addon_instance # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_addon_instance(id, addon_id, instance_id, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): instance_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id kwargs['instance_id'] = \ instance_id return self.call_with_http_info(**kwargs) self.get_addon_instance = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}/instances/{instanceId}', 'operation_id': 'get_addon_instance', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', 'instance_id', ], 'required': [ 'id', 'addon_id', 'instance_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), 'instance_id': (str,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', 'instance_id': 'instanceId', }, 'location_map': { 'id': 'path', 'addon_id': 'path', 'instance_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_addon_instance ) def __get_addon_instances( self, id, addon_id, **kwargs ): """get_addon_instances # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_addon_instances(id, addon_id, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): Keyword Args: deployment_id (str): [optional] with_deleted (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [SuperNovaInstanceView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.get_addon_instances = _Endpoint( settings={ 'response_type': ([SuperNovaInstanceView],), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}/instances', 'operation_id': 'get_addon_instances', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', 'deployment_id', 'with_deleted', ], 'required': [ 'id', 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), 'deployment_id': (str,), 'with_deleted': (str,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', 'deployment_id': 'deploymentId', 'with_deleted': 'withDeleted', }, 'location_map': { 'id': 'path', 'addon_id': 'path', 'deployment_id': 'query', 'with_deleted': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_addon_instances ) def __get_addon_migration( self, id, addon_id, migration_id, **kwargs ): """get_addon_migration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_addon_migration(id, addon_id, migration_id, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): migration_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id kwargs['migration_id'] = \ migration_id return self.call_with_http_info(**kwargs) self.get_addon_migration = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}/migrations/{migrationId}', 'operation_id': 'get_addon_migration', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', 'migration_id', ], 'required': [ 'id', 'addon_id', 'migration_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), 'migration_id': (str,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', 'migration_id': 'migrationId', }, 'location_map': { 'id': 'path', 'addon_id': 'path', 'migration_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_addon_migration ) def __get_addon_migrations( self, id, addon_id, **kwargs ): """get_addon_migrations # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_addon_migrations(id, addon_id, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.get_addon_migrations = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}/migrations', 'operation_id': 'get_addon_migrations', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', ], 'required': [ 'id', 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', }, 'location_map': { 'id': 'path', 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_addon_migrations ) def __get_addon_sso_data_for_orga( self, id, addon_id, **kwargs ): """get_addon_sso_data_for_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_addon_sso_data_for_orga(id, addon_id, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonProviderSSOData If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.get_addon_sso_data_for_orga = _Endpoint( settings={ 'response_type': (AddonProviderSSOData,), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}/sso', 'operation_id': 'get_addon_sso_data_for_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', ], 'required': [ 'id', 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', }, 'location_map': { 'id': 'path', 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_addon_sso_data_for_orga ) def __get_addon_tags_by_orga_id_and_addon_id( self, id, addon_id, **kwargs ): """get_addon_tags_by_orga_id_and_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_addon_tags_by_orga_id_and_addon_id(id, addon_id, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.get_addon_tags_by_orga_id_and_addon_id = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}/tags', 'operation_id': 'get_addon_tags_by_orga_id_and_addon_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', ], 'required': [ 'id', 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', }, 'location_map': { 'id': 'path', 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_addon_tags_by_orga_id_and_addon_id ) def __get_addons_by_orga_id( self, id, **kwargs ): """get_addons_by_orga_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_addons_by_orga_id(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [AddonView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_addons_by_orga_id = _Endpoint( settings={ 'response_type': ([AddonView],), 'auth': [], 'endpoint_path': '/organisations/{id}/addons', 'operation_id': 'get_addons_by_orga_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_addons_by_orga_id ) def __get_addons_linked_to_application_by_orga_and_app_id( self, id, app_id, **kwargs ): """get_addons_linked_to_application_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_addons_linked_to_application_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [AddonView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_addons_linked_to_application_by_orga_and_app_id = _Endpoint( settings={ 'response_type': ([AddonView],), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/addons', 'operation_id': 'get_addons_linked_to_application_by_orga_and_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_addons_linked_to_application_by_orga_and_app_id ) def __get_all_applications_by_orga( self, id, **kwargs ): """get_all_applications_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_all_applications_by_orga(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: instance_id (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [ApplicationView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_all_applications_by_orga = _Endpoint( settings={ 'response_type': ([ApplicationView],), 'auth': [], 'endpoint_path': '/organisations/{id}/applications', 'operation_id': 'get_all_applications_by_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'instance_id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'instance_id': (str,), }, 'attribute_map': { 'id': 'id', 'instance_id': 'instanceId', }, 'location_map': { 'id': 'path', 'instance_id': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_all_applications_by_orga ) def __get_amount_for_orga( self, id, **kwargs ): """get_amount_for_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_amount_for_orga(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: DropCountView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_amount_for_orga = _Endpoint( settings={ 'response_type': (DropCountView,), 'auth': [], 'endpoint_path': '/organisations/{id}/credits', 'operation_id': 'get_amount_for_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_amount_for_orga ) def __get_application_branches_by_orga_and_app_id( self, id, app_id, **kwargs ): """get_application_branches_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_application_branches_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_application_branches_by_orga_and_app_id = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/branches', 'operation_id': 'get_application_branches_by_orga_and_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_application_branches_by_orga_and_app_id ) def __get_application_by_orga_and_app_id( self, id, app_id, **kwargs ): """get_application_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_application_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: ApplicationView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_application_by_orga_and_app_id = _Endpoint( settings={ 'response_type': (ApplicationView,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}', 'operation_id': 'get_application_by_orga_and_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_application_by_orga_and_app_id ) def __get_application_dependencies_by_orga_and_app_id( self, id, app_id, **kwargs ): """get_application_dependencies_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_application_dependencies_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [ApplicationView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_application_dependencies_by_orga_and_app_id = _Endpoint( settings={ 'response_type': ([ApplicationView],), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/dependencies', 'operation_id': 'get_application_dependencies_by_orga_and_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_application_dependencies_by_orga_and_app_id ) def __get_application_dependencies_env_by_orga_and_app_id( self, id, app_id, **kwargs ): """get_application_dependencies_env_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_application_dependencies_env_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_application_dependencies_env_by_orga_and_app_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/dependencies/env', 'operation_id': 'get_application_dependencies_env_by_orga_and_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_application_dependencies_env_by_orga_and_app_id ) def __get_application_dependents_by_orga_and_app_id( self, id, app_id, **kwargs ): """get_application_dependents_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_application_dependents_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [ApplicationView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_application_dependents_by_orga_and_app_id = _Endpoint( settings={ 'response_type': ([ApplicationView],), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/dependents', 'operation_id': 'get_application_dependents_by_orga_and_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_application_dependents_by_orga_and_app_id ) def __get_application_deployment_for_orga( self, id, app_id, deployment_id, **kwargs ): """get_application_deployment_for_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_application_deployment_for_orga(id, app_id, deployment_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): deployment_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['deployment_id'] = \ deployment_id return self.call_with_http_info(**kwargs) self.get_application_deployment_for_orga = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/deployments/{deploymentId}', 'operation_id': 'get_application_deployment_for_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'deployment_id', ], 'required': [ 'id', 'app_id', 'deployment_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'deployment_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'deployment_id': 'deploymentId', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'deployment_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_application_deployment_for_orga ) def __get_application_deployments_for_orga( self, id, app_id, **kwargs ): """get_application_deployments_for_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_application_deployments_for_orga(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: limit (str): [optional] offset (str): [optional] action (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [DeploymentView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_application_deployments_for_orga = _Endpoint( settings={ 'response_type': ([DeploymentView],), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/deployments', 'operation_id': 'get_application_deployments_for_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'limit', 'offset', 'action', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'limit': (str,), 'offset': (str,), 'action': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'limit': 'limit', 'offset': 'offset', 'action': 'action', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'limit': 'query', 'offset': 'query', 'action': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_application_deployments_for_orga ) def __get_application_env_by_orga_and_app_id( self, id, app_id, **kwargs ): """get_application_env_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_application_env_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [AddonEnvironmentView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_application_env_by_orga_and_app_id = _Endpoint( settings={ 'response_type': ([AddonEnvironmentView],), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/env', 'operation_id': 'get_application_env_by_orga_and_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_application_env_by_orga_and_app_id ) def __get_application_instance_by_orga_and_app_and_instance_id( self, id, app_id, instance_id, **kwargs ): """get_application_instance_by_orga_and_app_and_instance_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_application_instance_by_orga_and_app_and_instance_id(id, app_id, instance_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): instance_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['instance_id'] = \ instance_id return self.call_with_http_info(**kwargs) self.get_application_instance_by_orga_and_app_and_instance_id = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/instances/{instanceId}', 'operation_id': 'get_application_instance_by_orga_and_app_and_instance_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'instance_id', ], 'required': [ 'id', 'app_id', 'instance_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'instance_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'instance_id': 'instanceId', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'instance_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_application_instance_by_orga_and_app_and_instance_id ) def __get_application_instances_by_orga_and_app_id( self, id, app_id, **kwargs ): """get_application_instances_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_application_instances_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: deployment_id (str): [optional] with_deleted (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [SuperNovaInstanceView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_application_instances_by_orga_and_app_id = _Endpoint( settings={ 'response_type': ([SuperNovaInstanceView],), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/instances', 'operation_id': 'get_application_instances_by_orga_and_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'deployment_id', 'with_deleted', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'deployment_id': (str,), 'with_deleted': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'deployment_id': 'deploymentId', 'with_deleted': 'withDeleted', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'deployment_id': 'query', 'with_deleted': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_application_instances_by_orga_and_app_id ) def __get_application_tags_by_orga_and_app_id( self, id, app_id, **kwargs ): """get_application_tags_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_application_tags_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_application_tags_by_orga_and_app_id = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/tags', 'operation_id': 'get_application_tags_by_orga_and_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_application_tags_by_orga_and_app_id ) def __get_applications_linked_to_addon_by_orga_and_addon_id( self, id, addon_id, **kwargs ): """get_applications_linked_to_addon_by_orga_and_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_applications_linked_to_addon_by_orga_and_addon_id(id, addon_id, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [ApplicationView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.get_applications_linked_to_addon_by_orga_and_addon_id = _Endpoint( settings={ 'response_type': ([ApplicationView],), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}/applications', 'operation_id': 'get_applications_linked_to_addon_by_orga_and_addon_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', ], 'required': [ 'id', 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', }, 'location_map': { 'id': 'path', 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_applications_linked_to_addon_by_orga_and_addon_id ) def __get_consumer_by_orga( self, id, key, **kwargs ): """get_consumer_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_consumer_by_orga(id, key, async_req=True) >>> result = thread.get() Args: id (str): key (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: OAuth1ConsumerView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['key'] = \ key return self.call_with_http_info(**kwargs) self.get_consumer_by_orga = _Endpoint( settings={ 'response_type': (OAuth1ConsumerView,), 'auth': [], 'endpoint_path': '/organisations/{id}/consumers/{key}', 'operation_id': 'get_consumer_by_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'key', ], 'required': [ 'id', 'key', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'key': (str,), }, 'attribute_map': { 'id': 'id', 'key': 'key', }, 'location_map': { 'id': 'path', 'key': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_consumer_by_orga ) def __get_consumer_secret_by_orga( self, id, key, **kwargs ): """get_consumer_secret_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_consumer_secret_by_orga(id, key, async_req=True) >>> result = thread.get() Args: id (str): key (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: SecretView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['key'] = \ key return self.call_with_http_info(**kwargs) self.get_consumer_secret_by_orga = _Endpoint( settings={ 'response_type': (SecretView,), 'auth': [], 'endpoint_path': '/organisations/{id}/consumers/{key}/secret', 'operation_id': 'get_consumer_secret_by_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'key', ], 'required': [ 'id', 'key', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'key': (str,), }, 'attribute_map': { 'id': 'id', 'key': 'key', }, 'location_map': { 'id': 'path', 'key': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_consumer_secret_by_orga ) def __get_consumers_by_orga( self, id, **kwargs ): """get_consumers_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_consumers_by_orga(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [OAuth1ConsumerView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_consumers_by_orga = _Endpoint( settings={ 'response_type': ([OAuth1ConsumerView],), 'auth': [], 'endpoint_path': '/organisations/{id}/consumers', 'operation_id': 'get_consumers_by_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_consumers_by_orga ) def __get_consumptions_for_orga( self, id, **kwargs ): """get_consumptions_for_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_consumptions_for_orga(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: app_id (str): [optional] _from (str): [optional] to (str): [optional] _for (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_consumptions_for_orga = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/organisations/{id}/consumptions', 'operation_id': 'get_consumptions_for_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', '_from', 'to', '_for', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), '_from': (str,), 'to': (str,), '_for': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', '_from': 'from', 'to': 'to', '_for': 'for', }, 'location_map': { 'id': 'path', 'app_id': 'query', '_from': 'query', 'to': 'query', '_for': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_consumptions_for_orga ) def __get_default_method_by_orga( self, id, **kwargs ): """get_default_method_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_default_method_by_orga(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: PaymentMethodView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_default_method_by_orga = _Endpoint( settings={ 'response_type': (PaymentMethodView,), 'auth': [], 'endpoint_path': '/organisations/{id}/payments/methods/default', 'operation_id': 'get_default_method_by_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_default_method_by_orga ) def __get_deployments_for_all_apps( self, id, **kwargs ): """get_deployments_for_all_apps # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_deployments_for_all_apps(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: limit (int): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_deployments_for_all_apps = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/deployments', 'operation_id': 'get_deployments_for_all_apps', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'limit', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'limit': (int,), }, 'attribute_map': { 'id': 'id', 'limit': 'limit', }, 'location_map': { 'id': 'path', 'limit': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_deployments_for_all_apps ) def __get_env_of_addons_linked_to_application_by_orga_and_app_id( self, id, app_id, **kwargs ): """get_env_of_addons_linked_to_application_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_env_of_addons_linked_to_application_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [LinkedAddonEnvironmentView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_env_of_addons_linked_to_application_by_orga_and_app_id = _Endpoint( settings={ 'response_type': ([LinkedAddonEnvironmentView],), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/addons/env', 'operation_id': 'get_env_of_addons_linked_to_application_by_orga_and_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_env_of_addons_linked_to_application_by_orga_and_app_id ) def __get_exposed_env_by_orga_and_app_id( self, id, app_id, **kwargs ): """get_exposed_env_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_exposed_env_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_exposed_env_by_orga_and_app_id = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/exposed_env', 'operation_id': 'get_exposed_env_by_orga_and_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_exposed_env_by_orga_and_app_id ) def __get_favourite_vhost_by_orga_and_app_id( self, id, app_id, **kwargs ): """get_favourite_vhost_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_favourite_vhost_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: VhostView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_favourite_vhost_by_orga_and_app_id = _Endpoint( settings={ 'response_type': (VhostView,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/vhosts/favourite', 'operation_id': 'get_favourite_vhost_by_orga_and_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_favourite_vhost_by_orga_and_app_id ) def __get_instances_for_all_apps_for_orga( self, id, **kwargs ): """get_instances_for_all_apps_for_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_instances_for_all_apps_for_orga(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_instances_for_all_apps_for_orga = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/organisations/{id}/instances', 'operation_id': 'get_instances_for_all_apps_for_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_instances_for_all_apps_for_orga ) def __get_invoice_by_orga( self, id, bid, **kwargs ): """get_invoice_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_invoice_by_orga(id, bid, async_req=True) >>> result = thread.get() Args: id (str): bid (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: InvoiceRendering If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['bid'] = \ bid return self.call_with_http_info(**kwargs) self.get_invoice_by_orga = _Endpoint( settings={ 'response_type': (InvoiceRendering,), 'auth': [], 'endpoint_path': '/organisations/{id}/payments/billings/{bid}', 'operation_id': 'get_invoice_by_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'bid', ], 'required': [ 'id', 'bid', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'bid': (str,), }, 'attribute_map': { 'id': 'id', 'bid': 'bid', }, 'location_map': { 'id': 'path', 'bid': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_invoice_by_orga ) def __get_invoices_by_orga( self, id, **kwargs ): """get_invoices_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_invoices_by_orga(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [InvoiceRendering] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_invoices_by_orga = _Endpoint( settings={ 'response_type': ([InvoiceRendering],), 'auth': [], 'endpoint_path': '/organisations/{id}/payments/billings', 'operation_id': 'get_invoices_by_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_invoices_by_orga ) def __get_monthly_invoice_by_orga( self, id, **kwargs ): """get_monthly_invoice_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_monthly_invoice_by_orga(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_monthly_invoice_by_orga = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/organisations/{id}/payments/monthlyinvoice', 'operation_id': 'get_monthly_invoice_by_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_monthly_invoice_by_orga ) def __get_namespaces( self, id, **kwargs ): """get_namespaces # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_namespaces(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [NamespaceView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_namespaces = _Endpoint( settings={ 'response_type': ([NamespaceView],), 'auth': [], 'endpoint_path': '/organisations/{id}/namespaces', 'operation_id': 'get_namespaces', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_namespaces ) def __get_new_setup_intent_by_orga( self, id, **kwargs ): """get_new_setup_intent_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_new_setup_intent_by_orga(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: type (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: SetupIntentView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_new_setup_intent_by_orga = _Endpoint( settings={ 'response_type': (SetupIntentView,), 'auth': [], 'endpoint_path': '/organisations/{id}/payments/methods/newintent', 'operation_id': 'get_new_setup_intent_by_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'type', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'type': (str,), }, 'attribute_map': { 'id': 'id', 'type': 'type', }, 'location_map': { 'id': 'path', 'type': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_new_setup_intent_by_orga ) def __get_organisation( self, id, **kwargs ): """get_organisation # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_organisation(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: OrganisationView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_organisation = _Endpoint( settings={ 'response_type': (OrganisationView,), 'auth': [], 'endpoint_path': '/organisations/{id}', 'operation_id': 'get_organisation', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_organisation ) def __get_organisation_members( self, id, **kwargs ): """get_organisation_members # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_organisation_members(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [OrganisationMemberView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_organisation_members = _Endpoint( settings={ 'response_type': ([OrganisationMemberView],), 'auth': [], 'endpoint_path': '/organisations/{id}/members', 'operation_id': 'get_organisation_members', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_organisation_members ) def __get_payment_info_for_orga( self, id, **kwargs ): """get_payment_info_for_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_payment_info_for_orga(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: PaymentInfoView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_payment_info_for_orga = _Endpoint( settings={ 'response_type': (PaymentInfoView,), 'auth': [], 'endpoint_path': '/organisations/{id}/payment-info', 'operation_id': 'get_payment_info_for_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_payment_info_for_orga ) def __get_pdf_invoice_by_orga( self, id, bid, **kwargs ): """get_pdf_invoice_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_pdf_invoice_by_orga(id, bid, async_req=True) >>> result = thread.get() Args: id (str): bid (str): Keyword Args: token (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['bid'] = \ bid return self.call_with_http_info(**kwargs) self.get_pdf_invoice_by_orga = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/payments/billings/{bid}.pdf', 'operation_id': 'get_pdf_invoice_by_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'bid', 'token', ], 'required': [ 'id', 'bid', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'bid': (str,), 'token': (str,), }, 'attribute_map': { 'id': 'id', 'bid': 'bid', 'token': 'token', }, 'location_map': { 'id': 'path', 'bid': 'path', 'token': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/pdf' ], 'content_type': [], }, api_client=api_client, callable=__get_pdf_invoice_by_orga ) def __get_price_with_tax_by_orga( self, id, price, **kwargs ): """get_price_with_tax_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_price_with_tax_by_orga(id, price, async_req=True) >>> result = thread.get() Args: id (str): price (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: PriceWithTaxInfo If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['price'] = \ price return self.call_with_http_info(**kwargs) self.get_price_with_tax_by_orga = _Endpoint( settings={ 'response_type': (PriceWithTaxInfo,), 'auth': [], 'endpoint_path': '/organisations/{id}/payments/fullprice/{price}', 'operation_id': 'get_price_with_tax_by_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'price', ], 'required': [ 'id', 'price', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'price': (str,), }, 'attribute_map': { 'id': 'id', 'price': 'price', }, 'location_map': { 'id': 'path', 'price': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_price_with_tax_by_orga ) def __get_provider_features( self, id, provider_id, **kwargs ): """get_provider_features # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_provider_features(id, provider_id, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [AddonFeatureView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id return self.call_with_http_info(**kwargs) self.get_provider_features = _Endpoint( settings={ 'response_type': ([AddonFeatureView],), 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}/features', 'operation_id': 'get_provider_features', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', ], 'required': [ 'id', 'provider_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', }, 'location_map': { 'id': 'path', 'provider_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_provider_features ) def __get_provider_info( self, id, provider_id, **kwargs ): """get_provider_info # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_provider_info(id, provider_id, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonProviderInfoView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id return self.call_with_http_info(**kwargs) self.get_provider_info = _Endpoint( settings={ 'response_type': (AddonProviderInfoView,), 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}', 'operation_id': 'get_provider_info', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', ], 'required': [ 'id', 'provider_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', }, 'location_map': { 'id': 'path', 'provider_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_provider_info ) def __get_provider_plan( self, id, provider_id, plan_id, **kwargs ): """get_provider_plan # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_provider_plan(id, provider_id, plan_id, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): plan_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonPlanView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id kwargs['plan_id'] = \ plan_id return self.call_with_http_info(**kwargs) self.get_provider_plan = _Endpoint( settings={ 'response_type': (AddonPlanView,), 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}/plans/{planId}', 'operation_id': 'get_provider_plan', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', 'plan_id', ], 'required': [ 'id', 'provider_id', 'plan_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), 'plan_id': (str,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', 'plan_id': 'planId', }, 'location_map': { 'id': 'path', 'provider_id': 'path', 'plan_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_provider_plan ) def __get_provider_plans( self, id, provider_id, **kwargs ): """get_provider_plans # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_provider_plans(id, provider_id, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [AddonPlanView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id return self.call_with_http_info(**kwargs) self.get_provider_plans = _Endpoint( settings={ 'response_type': ([AddonPlanView],), 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}/plans', 'operation_id': 'get_provider_plans', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', ], 'required': [ 'id', 'provider_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', }, 'location_map': { 'id': 'path', 'provider_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_provider_plans ) def __get_provider_tags( self, id, provider_id, **kwargs ): """get_provider_tags # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_provider_tags(id, provider_id, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id return self.call_with_http_info(**kwargs) self.get_provider_tags = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}/tags', 'operation_id': 'get_provider_tags', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', ], 'required': [ 'id', 'provider_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', }, 'location_map': { 'id': 'path', 'provider_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_provider_tags ) def __get_providers_info( self, id, **kwargs ): """get_providers_info # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_providers_info(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [AddonProviderInfoFullView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_providers_info = _Endpoint( settings={ 'response_type': ([AddonProviderInfoFullView],), 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders', 'operation_id': 'get_providers_info', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_providers_info ) def __get_recurrent_payment_by_orga( self, id, **kwargs ): """get_recurrent_payment_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_recurrent_payment_by_orga(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: RecurrentPaymentView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_recurrent_payment_by_orga = _Endpoint( settings={ 'response_type': (RecurrentPaymentView,), 'auth': [], 'endpoint_path': '/organisations/{id}/payments/recurring', 'operation_id': 'get_recurrent_payment_by_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_recurrent_payment_by_orga ) def __get_sso_data_for_orga( self, id, provider_id, **kwargs ): """get_sso_data_for_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sso_data_for_orga(id, provider_id, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonProviderSSOData If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id return self.call_with_http_info(**kwargs) self.get_sso_data_for_orga = _Endpoint( settings={ 'response_type': (AddonProviderSSOData,), 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}/sso', 'operation_id': 'get_sso_data_for_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', ], 'required': [ 'id', 'provider_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', }, 'location_map': { 'id': 'path', 'provider_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_sso_data_for_orga ) def __get_stripe_token_by_orga( self, id, **kwargs ): """get_stripe_token_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_stripe_token_by_orga(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: BraintreeToken If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_stripe_token_by_orga = _Endpoint( settings={ 'response_type': (BraintreeToken,), 'auth': [], 'endpoint_path': '/organisations/{id}/payments/tokens/stripe', 'operation_id': 'get_stripe_token_by_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_stripe_token_by_orga ) def __get_tcp_redirs( self, id, app_id, **kwargs ): """get_tcp_redirs # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_tcp_redirs(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [TcpRedirView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_tcp_redirs = _Endpoint( settings={ 'response_type': ([TcpRedirView],), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/tcpRedirs', 'operation_id': 'get_tcp_redirs', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_tcp_redirs ) def __get_unpaid_invoices_by_orga( self, id, **kwargs ): """get_unpaid_invoices_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_unpaid_invoices_by_orga(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [InvoiceRendering] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_unpaid_invoices_by_orga = _Endpoint( settings={ 'response_type': ([InvoiceRendering],), 'auth': [], 'endpoint_path': '/organisations/{id}/payments/billings/unpaid', 'operation_id': 'get_unpaid_invoices_by_orga', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_unpaid_invoices_by_orga ) def __get_unpaid_invoices_by_orga1( self, id, **kwargs ): """get_unpaid_invoices_by_orga1 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_unpaid_invoices_by_orga1(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [PaymentMethodView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_unpaid_invoices_by_orga1 = _Endpoint( settings={ 'response_type': ([PaymentMethodView],), 'auth': [], 'endpoint_path': '/organisations/{id}/payments/methods', 'operation_id': 'get_unpaid_invoices_by_orga1', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_unpaid_invoices_by_orga1 ) def __get_user_organisationss( self, **kwargs ): """get_user_organisationss # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_user_organisationss(async_req=True) >>> result = thread.get() Keyword Args: user (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [OrganisationView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_user_organisationss = _Endpoint( settings={ 'response_type': ([OrganisationView],), 'auth': [], 'endpoint_path': '/organisations', 'operation_id': 'get_user_organisationss', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'user', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'user': (str,), }, 'attribute_map': { 'user': 'user', }, 'location_map': { 'user': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_user_organisationss ) def __get_vhosts_by_orga_and_app_id( self, id, app_id, **kwargs ): """get_vhosts_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_vhosts_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [VhostView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_vhosts_by_orga_and_app_id = _Endpoint( settings={ 'response_type': ([VhostView],), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/vhosts', 'operation_id': 'get_vhosts_by_orga_and_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_vhosts_by_orga_and_app_id ) def __link_addon_to_application_by_orga_and_app_id( self, id, app_id, body, **kwargs ): """link_addon_to_application_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.link_addon_to_application_by_orga_and_app_id(id, app_id, body, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): body (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['body'] = \ body return self.call_with_http_info(**kwargs) self.link_addon_to_application_by_orga_and_app_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/addons', 'operation_id': 'link_addon_to_application_by_orga_and_app_id', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'body', ], 'required': [ 'id', 'app_id', 'body', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'body': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__link_addon_to_application_by_orga_and_app_id ) def __mark_favourite_vhost_by_orga_and_app_id( self, id, app_id, vhost_view, **kwargs ): """mark_favourite_vhost_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_favourite_vhost_by_orga_and_app_id(id, app_id, vhost_view, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): vhost_view (VhostView): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: VhostView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['vhost_view'] = \ vhost_view return self.call_with_http_info(**kwargs) self.mark_favourite_vhost_by_orga_and_app_id = _Endpoint( settings={ 'response_type': (VhostView,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/vhosts/favourite', 'operation_id': 'mark_favourite_vhost_by_orga_and_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'vhost_view', ], 'required': [ 'id', 'app_id', 'vhost_view', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'vhost_view': (VhostView,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'vhost_view': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__mark_favourite_vhost_by_orga_and_app_id ) def __preorder_addon_by_orga_id( self, id, wannabe_addon_provision, **kwargs ): """preorder_addon_by_orga_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.preorder_addon_by_orga_id(id, wannabe_addon_provision, async_req=True) >>> result = thread.get() Args: id (str): wannabe_addon_provision (WannabeAddonProvision): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: InvoiceRendering If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['wannabe_addon_provision'] = \ wannabe_addon_provision return self.call_with_http_info(**kwargs) self.preorder_addon_by_orga_id = _Endpoint( settings={ 'response_type': (InvoiceRendering,), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/preorders', 'operation_id': 'preorder_addon_by_orga_id', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'id', 'wannabe_addon_provision', ], 'required': [ 'id', 'wannabe_addon_provision', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'wannabe_addon_provision': (WannabeAddonProvision,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', 'wannabe_addon_provision': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__preorder_addon_by_orga_id ) def __preorder_migration( self, id, addon_id, **kwargs ): """preorder_migration # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.preorder_migration(id, addon_id, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): Keyword Args: plan_id (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.preorder_migration = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}/migrations/preorders', 'operation_id': 'preorder_migration', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', 'plan_id', ], 'required': [ 'id', 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), 'plan_id': (str,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', 'plan_id': 'planId', }, 'location_map': { 'id': 'path', 'addon_id': 'path', 'plan_id': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__preorder_migration ) def __provision_addon_by_orga_id( self, id, wannabe_addon_provision, **kwargs ): """provision_addon_by_orga_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.provision_addon_by_orga_id(id, wannabe_addon_provision, async_req=True) >>> result = thread.get() Args: id (str): wannabe_addon_provision (WannabeAddonProvision): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['wannabe_addon_provision'] = \ wannabe_addon_provision return self.call_with_http_info(**kwargs) self.provision_addon_by_orga_id = _Endpoint( settings={ 'response_type': (AddonView,), 'auth': [], 'endpoint_path': '/organisations/{id}/addons', 'operation_id': 'provision_addon_by_orga_id', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'id', 'wannabe_addon_provision', ], 'required': [ 'id', 'wannabe_addon_provision', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'wannabe_addon_provision': (WannabeAddonProvision,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', 'wannabe_addon_provision': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__provision_addon_by_orga_id ) def __redeploy_application_by_orga_and_app_id( self, id, app_id, **kwargs ): """redeploy_application_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.redeploy_application_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: commit (str): [optional] use_cache (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.redeploy_application_by_orga_and_app_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/instances', 'operation_id': 'redeploy_application_by_orga_and_app_id', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'commit', 'use_cache', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'commit': (str,), 'use_cache': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'commit': 'commit', 'use_cache': 'useCache', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'commit': 'query', 'use_cache': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__redeploy_application_by_orga_and_app_id ) def __remove_application_env_by_orga_and_app_id_and_env_name( self, id, app_id, env_name, **kwargs ): """remove_application_env_by_orga_and_app_id_and_env_name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_application_env_by_orga_and_app_id_and_env_name(id, app_id, env_name, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): env_name (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: ApplicationView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['env_name'] = \ env_name return self.call_with_http_info(**kwargs) self.remove_application_env_by_orga_and_app_id_and_env_name = _Endpoint( settings={ 'response_type': (ApplicationView,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/env/{envName}', 'operation_id': 'remove_application_env_by_orga_and_app_id_and_env_name', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'env_name', ], 'required': [ 'id', 'app_id', 'env_name', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'env_name': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'env_name': 'envName', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'env_name': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__remove_application_env_by_orga_and_app_id_and_env_name ) def __remove_organisation_member( self, id, user_id, **kwargs ): """remove_organisation_member # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_organisation_member(id, user_id, async_req=True) >>> result = thread.get() Args: id (str): user_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['user_id'] = \ user_id return self.call_with_http_info(**kwargs) self.remove_organisation_member = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/organisations/{id}/members/{userId}', 'operation_id': 'remove_organisation_member', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'user_id', ], 'required': [ 'id', 'user_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'user_id': (str,), }, 'attribute_map': { 'id': 'id', 'user_id': 'userId', }, 'location_map': { 'id': 'path', 'user_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__remove_organisation_member ) def __remove_tcp_redir( self, id, app_id, source_port, **kwargs ): """remove_tcp_redir # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_tcp_redir(id, app_id, source_port, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): source_port (int): Keyword Args: namespace (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['source_port'] = \ source_port return self.call_with_http_info(**kwargs) self.remove_tcp_redir = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/tcpRedirs/{sourcePort}', 'operation_id': 'remove_tcp_redir', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'source_port', 'namespace', ], 'required': [ 'id', 'app_id', 'source_port', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'source_port': (int,), 'namespace': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'source_port': 'sourcePort', 'namespace': 'namespace', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'source_port': 'path', 'namespace': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__remove_tcp_redir ) def __remove_vhosts_by_orga_and_app_id( self, id, app_id, domain, **kwargs ): """remove_vhosts_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_vhosts_by_orga_and_app_id(id, app_id, domain, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): domain (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['domain'] = \ domain return self.call_with_http_info(**kwargs) self.remove_vhosts_by_orga_and_app_id = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/vhosts/{domain}', 'operation_id': 'remove_vhosts_by_orga_and_app_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'domain', ], 'required': [ 'id', 'app_id', 'domain', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'domain': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'domain': 'domain', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'domain': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__remove_vhosts_by_orga_and_app_id ) def __replace_addon_tags( self, id, addon_id, **kwargs ): """replace_addon_tags # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_addon_tags(id, addon_id, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): Keyword Args: body (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.replace_addon_tags = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}/tags', 'operation_id': 'replace_addon_tags', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', 'body', ], 'required': [ 'id', 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), 'body': (str,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', }, 'location_map': { 'id': 'path', 'addon_id': 'path', 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__replace_addon_tags ) def __replace_application_tags( self, id, app_id, **kwargs ): """replace_application_tags # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_application_tags(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: body (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.replace_application_tags = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/tags', 'operation_id': 'replace_application_tags', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'body', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'body': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__replace_application_tags ) def __set_application_branch_by_orga_and_app_id( self, id, app_id, wannabe_branch, **kwargs ): """set_application_branch_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_application_branch_by_orga_and_app_id(id, app_id, wannabe_branch, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): wannabe_branch (WannabeBranch): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['wannabe_branch'] = \ wannabe_branch return self.call_with_http_info(**kwargs) self.set_application_branch_by_orga_and_app_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/branch', 'operation_id': 'set_application_branch_by_orga_and_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'wannabe_branch', ], 'required': [ 'id', 'app_id', 'wannabe_branch', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'wannabe_branch': (WannabeBranch,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'wannabe_branch': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__set_application_branch_by_orga_and_app_id ) def __set_build_instance_flavor_by_orga_and_app_id( self, id, app_id, wannabe_build_flavor, **kwargs ): """set_build_instance_flavor_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_build_instance_flavor_by_orga_and_app_id(id, app_id, wannabe_build_flavor, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): wannabe_build_flavor (WannabeBuildFlavor): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['wannabe_build_flavor'] = \ wannabe_build_flavor return self.call_with_http_info(**kwargs) self.set_build_instance_flavor_by_orga_and_app_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/buildflavor', 'operation_id': 'set_build_instance_flavor_by_orga_and_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'wannabe_build_flavor', ], 'required': [ 'id', 'app_id', 'wannabe_build_flavor', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'wannabe_build_flavor': (WannabeBuildFlavor,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'wannabe_build_flavor': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__set_build_instance_flavor_by_orga_and_app_id ) def __set_default_method_by_orga( self, id, payment_data, **kwargs ): """set_default_method_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_default_method_by_orga(id, payment_data, async_req=True) >>> result = thread.get() Args: id (str): payment_data (PaymentData): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['payment_data'] = \ payment_data return self.call_with_http_info(**kwargs) self.set_default_method_by_orga = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/payments/methods/default', 'operation_id': 'set_default_method_by_orga', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'payment_data', ], 'required': [ 'id', 'payment_data', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'payment_data': (PaymentData,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', 'payment_data': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__set_default_method_by_orga ) def __set_max_credits_per_month_by_orga( self, id, wannabe_max_credits, **kwargs ): """set_max_credits_per_month_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_max_credits_per_month_by_orga(id, wannabe_max_credits, async_req=True) >>> result = thread.get() Args: id (str): wannabe_max_credits (WannabeMaxCredits): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['wannabe_max_credits'] = \ wannabe_max_credits return self.call_with_http_info(**kwargs) self.set_max_credits_per_month_by_orga = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/organisations/{id}/payments/monthlyinvoice/maxcredit', 'operation_id': 'set_max_credits_per_month_by_orga', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'wannabe_max_credits', ], 'required': [ 'id', 'wannabe_max_credits', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'wannabe_max_credits': (WannabeMaxCredits,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', 'wannabe_max_credits': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__set_max_credits_per_month_by_orga ) def __set_orga_avatar( self, id, **kwargs ): """set_orga_avatar # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_orga_avatar(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: UrlView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.set_orga_avatar = _Endpoint( settings={ 'response_type': (UrlView,), 'auth': [], 'endpoint_path': '/organisations/{id}/avatar', 'operation_id': 'set_orga_avatar', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__set_orga_avatar ) def __undeploy_application_by_orga_and_app_id( self, id, app_id, **kwargs ): """undeploy_application_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.undeploy_application_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.undeploy_application_by_orga_and_app_id = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/instances', 'operation_id': 'undeploy_application_by_orga_and_app_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__undeploy_application_by_orga_and_app_id ) def __unlink_addon_from_application_by_orga_and_app_andd_addon_id( self, id, app_id, addon_id, **kwargs ): """unlink_addon_from_application_by_orga_and_app_andd_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unlink_addon_from_application_by_orga_and_app_andd_addon_id(id, app_id, addon_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.unlink_addon_from_application_by_orga_and_app_andd_addon_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/addons/{addonId}', 'operation_id': 'unlink_addon_from_application_by_orga_and_app_andd_addon_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'addon_id', ], 'required': [ 'id', 'app_id', 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'addon_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', 'addon_id': 'addonId', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__unlink_addon_from_application_by_orga_and_app_andd_addon_id ) def __unmark_favourite_vhost_by_orga_and_app_id( self, id, app_id, **kwargs ): """unmark_favourite_vhost_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unmark_favourite_vhost_by_orga_and_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.unmark_favourite_vhost_by_orga_and_app_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/vhosts/favourite', 'operation_id': 'unmark_favourite_vhost_by_orga_and_app_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__unmark_favourite_vhost_by_orga_and_app_id ) def __update_addon_info( self, id, addon_id, wannabe_addon_provision, **kwargs ): """update_addon_info # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_addon_info(id, addon_id, wannabe_addon_provision, async_req=True) >>> result = thread.get() Args: id (str): addon_id (str): wannabe_addon_provision (WannabeAddonProvision): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['addon_id'] = \ addon_id kwargs['wannabe_addon_provision'] = \ wannabe_addon_provision return self.call_with_http_info(**kwargs) self.update_addon_info = _Endpoint( settings={ 'response_type': (AddonView,), 'auth': [], 'endpoint_path': '/organisations/{id}/addons/{addonId}', 'operation_id': 'update_addon_info', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'addon_id', 'wannabe_addon_provision', ], 'required': [ 'id', 'addon_id', 'wannabe_addon_provision', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'addon_id': (str,), 'wannabe_addon_provision': (WannabeAddonProvision,), }, 'attribute_map': { 'id': 'id', 'addon_id': 'addonId', }, 'location_map': { 'id': 'path', 'addon_id': 'path', 'wannabe_addon_provision': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__update_addon_info ) def __update_consumer_by_orga( self, id, key, wannabe_o_auth1_consumer, **kwargs ): """update_consumer_by_orga # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_consumer_by_orga(id, key, wannabe_o_auth1_consumer, async_req=True) >>> result = thread.get() Args: id (str): key (str): wannabe_o_auth1_consumer (WannabeOAuth1Consumer): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: OAuth1ConsumerView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['key'] = \ key kwargs['wannabe_o_auth1_consumer'] = \ wannabe_o_auth1_consumer return self.call_with_http_info(**kwargs) self.update_consumer_by_orga = _Endpoint( settings={ 'response_type': (OAuth1ConsumerView,), 'auth': [], 'endpoint_path': '/organisations/{id}/consumers/{key}', 'operation_id': 'update_consumer_by_orga', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'key', 'wannabe_o_auth1_consumer', ], 'required': [ 'id', 'key', 'wannabe_o_auth1_consumer', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'key': (str,), 'wannabe_o_auth1_consumer': (WannabeOAuth1Consumer,), }, 'attribute_map': { 'id': 'id', 'key': 'key', }, 'location_map': { 'id': 'path', 'key': 'path', 'wannabe_o_auth1_consumer': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__update_consumer_by_orga ) def __update_exposed_env_by_orga_and_app_id( self, id, app_id, body, **kwargs ): """update_exposed_env_by_orga_and_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_exposed_env_by_orga_and_app_id(id, app_id, body, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): body (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id kwargs['body'] = \ body return self.call_with_http_info(**kwargs) self.update_exposed_env_by_orga_and_app_id = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/organisations/{id}/applications/{appId}/exposed_env', 'operation_id': 'update_exposed_env_by_orga_and_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', 'body', ], 'required': [ 'id', 'app_id', 'body', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), 'body': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__update_exposed_env_by_orga_and_app_id ) def __update_provider_infos( self, id, provider_id, wannabe_addon_provider_infos, **kwargs ): """update_provider_infos # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_provider_infos(id, provider_id, wannabe_addon_provider_infos, async_req=True) >>> result = thread.get() Args: id (str): provider_id (str): wannabe_addon_provider_infos (WannabeAddonProviderInfos): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonProviderInfoView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['provider_id'] = \ provider_id kwargs['wannabe_addon_provider_infos'] = \ wannabe_addon_provider_infos return self.call_with_http_info(**kwargs) self.update_provider_infos = _Endpoint( settings={ 'response_type': (AddonProviderInfoView,), 'auth': [], 'endpoint_path': '/organisations/{id}/addonproviders/{providerId}', 'operation_id': 'update_provider_infos', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'id', 'provider_id', 'wannabe_addon_provider_infos', ], 'required': [ 'id', 'provider_id', 'wannabe_addon_provider_infos', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'provider_id': (str,), 'wannabe_addon_provider_infos': (WannabeAddonProviderInfos,), }, 'attribute_map': { 'id': 'id', 'provider_id': 'providerId', }, 'location_map': { 'id': 'path', 'provider_id': 'path', 'wannabe_addon_provider_infos': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__update_provider_infos )
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,269
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_summary.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import sys import unittest import openapi_client from openapi_client.model.organisation_summary import OrganisationSummary from openapi_client.model.user_summary import UserSummary globals()['OrganisationSummary'] = OrganisationSummary globals()['UserSummary'] = UserSummary from openapi_client.model.summary import Summary class TestSummary(unittest.TestCase): """Summary unit test stubs""" def setUp(self): pass def tearDown(self): pass def testSummary(self): """Test Summary""" # FIXME: construct object with mandatory attributes with example values # model = Summary() # noqa: E501 pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,270
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_organisation_api.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import unittest import openapi_client from openapi_client.api.organisation_api import OrganisationApi # noqa: E501 class TestOrganisationApi(unittest.TestCase): """OrganisationApi unit test stubs""" def setUp(self): self.api = OrganisationApi() # noqa: E501 def tearDown(self): pass def test_abort_addon_migration(self): """Test case for abort_addon_migration """ pass def test_add_addon_tag_by_orga_and_addon_id(self): """Test case for add_addon_tag_by_orga_and_addon_id """ pass def test_add_application_by_orga(self): """Test case for add_application_by_orga """ pass def test_add_application_dependency_by_orga_and_app_id(self): """Test case for add_application_dependency_by_orga_and_app_id """ pass def test_add_application_tag_by_orga_and_app_id(self): """Test case for add_application_tag_by_orga_and_app_id """ pass def test_add_beta_tester(self): """Test case for add_beta_tester """ pass def test_add_organisation_member(self): """Test case for add_organisation_member """ pass def test_add_payment_method_by_orga(self): """Test case for add_payment_method_by_orga """ pass def test_add_provider_feature(self): """Test case for add_provider_feature """ pass def test_add_provider_plan(self): """Test case for add_provider_plan """ pass def test_add_tcp_redir(self): """Test case for add_tcp_redir """ pass def test_add_vhosts_by_orga_and_app_id(self): """Test case for add_vhosts_by_orga_and_app_id """ pass def test_buy_drops_by_orga(self): """Test case for buy_drops_by_orga """ pass def test_cancel_application_deployment_for_orga(self): """Test case for cancel_application_deployment_for_orga """ pass def test_change_plan_by_orga_and_addon_id(self): """Test case for change_plan_by_orga_and_addon_id """ pass def test_choose_payment_provider_by_orga(self): """Test case for choose_payment_provider_by_orga """ pass def test_create_consumer_by_orga(self): """Test case for create_consumer_by_orga """ pass def test_create_organisation(self): """Test case for create_organisation """ pass def test_create_provider(self): """Test case for create_provider """ pass def test_delete_addon_tag_by_orga_and_addon_id(self): """Test case for delete_addon_tag_by_orga_and_addon_id """ pass def test_delete_application_by_orga_and_app_id(self): """Test case for delete_application_by_orga_and_app_id """ pass def test_delete_application_dependency_by_orga_and_app_id(self): """Test case for delete_application_dependency_by_orga_and_app_id """ pass def test_delete_application_tag_by_orga_and_app_id(self): """Test case for delete_application_tag_by_orga_and_app_id """ pass def test_delete_consumer_by_orga(self): """Test case for delete_consumer_by_orga """ pass def test_delete_organisation(self): """Test case for delete_organisation """ pass def test_delete_payment_method_by_orga(self): """Test case for delete_payment_method_by_orga """ pass def test_delete_provider(self): """Test case for delete_provider """ pass def test_delete_provider_feature(self): """Test case for delete_provider_feature """ pass def test_delete_provider_plan(self): """Test case for delete_provider_plan """ pass def test_delete_provider_plan_feature(self): """Test case for delete_provider_plan_feature """ pass def test_delete_purchase_order_by_orga(self): """Test case for delete_purchase_order_by_orga """ pass def test_delete_recurrent_payment_by_orga(self): """Test case for delete_recurrent_payment_by_orga """ pass def test_deprovision_addon_by_orga_and_addon_id(self): """Test case for deprovision_addon_by_orga_and_addon_id """ pass def test_edit_application_by_orga_and_app_id(self): """Test case for edit_application_by_orga_and_app_id """ pass def test_edit_application_env_by_orga_and_app_id_and_env_name(self): """Test case for edit_application_env_by_orga_and_app_id_and_env_name """ pass def test_edit_application_environment_by_orga_and_app_id(self): """Test case for edit_application_environment_by_orga_and_app_id """ pass def test_edit_organisation(self): """Test case for edit_organisation """ pass def test_edit_organisation_member(self): """Test case for edit_organisation_member """ pass def test_edit_provider_plan(self): """Test case for edit_provider_plan """ pass def test_edit_provider_plan_feature(self): """Test case for edit_provider_plan_feature """ pass def test_get_addon_by_orga_and_addon_id(self): """Test case for get_addon_by_orga_and_addon_id """ pass def test_get_addon_env_by_orga_and_addon_id(self): """Test case for get_addon_env_by_orga_and_addon_id """ pass def test_get_addon_instance(self): """Test case for get_addon_instance """ pass def test_get_addon_instances(self): """Test case for get_addon_instances """ pass def test_get_addon_migration(self): """Test case for get_addon_migration """ pass def test_get_addon_migrations(self): """Test case for get_addon_migrations """ pass def test_get_addon_sso_data_for_orga(self): """Test case for get_addon_sso_data_for_orga """ pass def test_get_addon_tags_by_orga_id_and_addon_id(self): """Test case for get_addon_tags_by_orga_id_and_addon_id """ pass def test_get_addons_by_orga_id(self): """Test case for get_addons_by_orga_id """ pass def test_get_addons_linked_to_application_by_orga_and_app_id(self): """Test case for get_addons_linked_to_application_by_orga_and_app_id """ pass def test_get_all_applications_by_orga(self): """Test case for get_all_applications_by_orga """ pass def test_get_amount_for_orga(self): """Test case for get_amount_for_orga """ pass def test_get_application_branches_by_orga_and_app_id(self): """Test case for get_application_branches_by_orga_and_app_id """ pass def test_get_application_by_orga_and_app_id(self): """Test case for get_application_by_orga_and_app_id """ pass def test_get_application_dependencies_by_orga_and_app_id(self): """Test case for get_application_dependencies_by_orga_and_app_id """ pass def test_get_application_dependencies_env_by_orga_and_app_id(self): """Test case for get_application_dependencies_env_by_orga_and_app_id """ pass def test_get_application_dependents_by_orga_and_app_id(self): """Test case for get_application_dependents_by_orga_and_app_id """ pass def test_get_application_deployment_for_orga(self): """Test case for get_application_deployment_for_orga """ pass def test_get_application_deployments_for_orga(self): """Test case for get_application_deployments_for_orga """ pass def test_get_application_env_by_orga_and_app_id(self): """Test case for get_application_env_by_orga_and_app_id """ pass def test_get_application_instance_by_orga_and_app_and_instance_id(self): """Test case for get_application_instance_by_orga_and_app_and_instance_id """ pass def test_get_application_instances_by_orga_and_app_id(self): """Test case for get_application_instances_by_orga_and_app_id """ pass def test_get_application_tags_by_orga_and_app_id(self): """Test case for get_application_tags_by_orga_and_app_id """ pass def test_get_applications_linked_to_addon_by_orga_and_addon_id(self): """Test case for get_applications_linked_to_addon_by_orga_and_addon_id """ pass def test_get_consumer_by_orga(self): """Test case for get_consumer_by_orga """ pass def test_get_consumer_secret_by_orga(self): """Test case for get_consumer_secret_by_orga """ pass def test_get_consumers_by_orga(self): """Test case for get_consumers_by_orga """ pass def test_get_consumptions_for_orga(self): """Test case for get_consumptions_for_orga """ pass def test_get_default_method_by_orga(self): """Test case for get_default_method_by_orga """ pass def test_get_deployments_for_all_apps(self): """Test case for get_deployments_for_all_apps """ pass def test_get_env_of_addons_linked_to_application_by_orga_and_app_id(self): """Test case for get_env_of_addons_linked_to_application_by_orga_and_app_id """ pass def test_get_exposed_env_by_orga_and_app_id(self): """Test case for get_exposed_env_by_orga_and_app_id """ pass def test_get_favourite_vhost_by_orga_and_app_id(self): """Test case for get_favourite_vhost_by_orga_and_app_id """ pass def test_get_instances_for_all_apps_for_orga(self): """Test case for get_instances_for_all_apps_for_orga """ pass def test_get_invoice_by_orga(self): """Test case for get_invoice_by_orga """ pass def test_get_invoices_by_orga(self): """Test case for get_invoices_by_orga """ pass def test_get_monthly_invoice_by_orga(self): """Test case for get_monthly_invoice_by_orga """ pass def test_get_namespaces(self): """Test case for get_namespaces """ pass def test_get_new_setup_intent_by_orga(self): """Test case for get_new_setup_intent_by_orga """ pass def test_get_organisation(self): """Test case for get_organisation """ pass def test_get_organisation_members(self): """Test case for get_organisation_members """ pass def test_get_payment_info_for_orga(self): """Test case for get_payment_info_for_orga """ pass def test_get_pdf_invoice_by_orga(self): """Test case for get_pdf_invoice_by_orga """ pass def test_get_price_with_tax_by_orga(self): """Test case for get_price_with_tax_by_orga """ pass def test_get_provider_features(self): """Test case for get_provider_features """ pass def test_get_provider_info(self): """Test case for get_provider_info """ pass def test_get_provider_plan(self): """Test case for get_provider_plan """ pass def test_get_provider_plans(self): """Test case for get_provider_plans """ pass def test_get_provider_tags(self): """Test case for get_provider_tags """ pass def test_get_providers_info(self): """Test case for get_providers_info """ pass def test_get_recurrent_payment_by_orga(self): """Test case for get_recurrent_payment_by_orga """ pass def test_get_sso_data_for_orga(self): """Test case for get_sso_data_for_orga """ pass def test_get_stripe_token_by_orga(self): """Test case for get_stripe_token_by_orga """ pass def test_get_tcp_redirs(self): """Test case for get_tcp_redirs """ pass def test_get_unpaid_invoices_by_orga(self): """Test case for get_unpaid_invoices_by_orga """ pass def test_get_unpaid_invoices_by_orga1(self): """Test case for get_unpaid_invoices_by_orga1 """ pass def test_get_user_organisationss(self): """Test case for get_user_organisationss """ pass def test_get_vhosts_by_orga_and_app_id(self): """Test case for get_vhosts_by_orga_and_app_id """ pass def test_link_addon_to_application_by_orga_and_app_id(self): """Test case for link_addon_to_application_by_orga_and_app_id """ pass def test_mark_favourite_vhost_by_orga_and_app_id(self): """Test case for mark_favourite_vhost_by_orga_and_app_id """ pass def test_preorder_addon_by_orga_id(self): """Test case for preorder_addon_by_orga_id """ pass def test_preorder_migration(self): """Test case for preorder_migration """ pass def test_provision_addon_by_orga_id(self): """Test case for provision_addon_by_orga_id """ pass def test_redeploy_application_by_orga_and_app_id(self): """Test case for redeploy_application_by_orga_and_app_id """ pass def test_remove_application_env_by_orga_and_app_id_and_env_name(self): """Test case for remove_application_env_by_orga_and_app_id_and_env_name """ pass def test_remove_organisation_member(self): """Test case for remove_organisation_member """ pass def test_remove_tcp_redir(self): """Test case for remove_tcp_redir """ pass def test_remove_vhosts_by_orga_and_app_id(self): """Test case for remove_vhosts_by_orga_and_app_id """ pass def test_replace_addon_tags(self): """Test case for replace_addon_tags """ pass def test_replace_application_tags(self): """Test case for replace_application_tags """ pass def test_set_application_branch_by_orga_and_app_id(self): """Test case for set_application_branch_by_orga_and_app_id """ pass def test_set_build_instance_flavor_by_orga_and_app_id(self): """Test case for set_build_instance_flavor_by_orga_and_app_id """ pass def test_set_default_method_by_orga(self): """Test case for set_default_method_by_orga """ pass def test_set_max_credits_per_month_by_orga(self): """Test case for set_max_credits_per_month_by_orga """ pass def test_set_orga_avatar(self): """Test case for set_orga_avatar """ pass def test_undeploy_application_by_orga_and_app_id(self): """Test case for undeploy_application_by_orga_and_app_id """ pass def test_unlink_addon_from_application_by_orga_and_app_andd_addon_id(self): """Test case for unlink_addon_from_application_by_orga_and_app_andd_addon_id """ pass def test_unmark_favourite_vhost_by_orga_and_app_id(self): """Test case for unmark_favourite_vhost_by_orga_and_app_id """ pass def test_update_addon_info(self): """Test case for update_addon_info """ pass def test_update_consumer_by_orga(self): """Test case for update_consumer_by_orga """ pass def test_update_exposed_env_by_orga_and_app_id(self): """Test case for update_exposed_env_by_orga_and_app_id """ pass def test_update_provider_infos(self): """Test case for update_provider_infos """ pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,271
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_recurrent_payment_view.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import sys import unittest import openapi_client from openapi_client.model.owner_view import OwnerView from openapi_client.model.user_view import UserView globals()['OwnerView'] = OwnerView globals()['UserView'] = UserView from openapi_client.model.recurrent_payment_view import RecurrentPaymentView class TestRecurrentPaymentView(unittest.TestCase): """RecurrentPaymentView unit test stubs""" def setUp(self): pass def tearDown(self): pass def testRecurrentPaymentView(self): """Test RecurrentPaymentView""" # FIXME: construct object with mandatory attributes with example values # model = RecurrentPaymentView() # noqa: E501 pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,272
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_user_api.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import unittest import openapi_client from openapi_client.api.user_api import UserApi # noqa: E501 class TestUserApi(unittest.TestCase): """UserApi unit test stubs""" def setUp(self): self.api = UserApi() # noqa: E501 def tearDown(self): pass def test_ask_for_password_reset_via_form(self): """Test case for ask_for_password_reset_via_form """ pass def test_authorize_paypal_transaction(self): """Test case for authorize_paypal_transaction """ pass def test_cancel_paypal_transaction(self): """Test case for cancel_paypal_transaction """ pass def test_confirm_password_reset_request(self): """Test case for confirm_password_reset_request """ pass def test_create_user_from_form(self): """Test case for create_user_from_form """ pass def test_delete_github_link(self): """Test case for delete_github_link """ pass def test_finsih_github_signup(self): """Test case for finsih_github_signup """ pass def test_get_applications(self): """Test case for get_applications """ pass def test_get_env(self): """Test case for get_env """ pass def test_get_git_info(self): """Test case for get_git_info """ pass def test_get_github(self): """Test case for get_github """ pass def test_get_github_applications(self): """Test case for get_github_applications """ pass def test_get_github_callback(self): """Test case for get_github_callback """ pass def test_get_github_emails(self): """Test case for get_github_emails """ pass def test_get_github_keys(self): """Test case for get_github_keys """ pass def test_get_github_link(self): """Test case for get_github_link """ pass def test_get_github_login(self): """Test case for get_github_login """ pass def test_get_github_username(self): """Test case for get_github_username """ pass def test_get_login_form(self): """Test case for get_login_form """ pass def test_get_login_form1(self): """Test case for get_login_form1 """ pass def test_get_password_forgotten_form(self): """Test case for get_password_forgotten_form """ pass def test_get_signup_form(self): """Test case for get_signup_form """ pass def test_get_signup_form1(self): """Test case for get_signup_form1 """ pass def test_get_user_by_id(self): """Test case for get_user_by_id """ pass def test_github_signup(self): """Test case for github_signup """ pass def test_login(self): """Test case for login """ pass def test_login1(self): """Test case for login1 """ pass def test_mfa_login(self): """Test case for mfa_login """ pass def test_mfa_login1(self): """Test case for mfa_login1 """ pass def test_post_github_redeploy(self): """Test case for post_github_redeploy """ pass def test_reset_password_forgotten(self): """Test case for reset_password_forgotten """ pass def test_update_env(self): """Test case for update_env """ pass def test_update_invoice(self): """Test case for update_invoice """ pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,273
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_super_nova_instance_view.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import sys import unittest import openapi_client from openapi_client.model.super_nova_flavor import SuperNovaFlavor globals()['SuperNovaFlavor'] = SuperNovaFlavor from openapi_client.model.super_nova_instance_view import SuperNovaInstanceView class TestSuperNovaInstanceView(unittest.TestCase): """SuperNovaInstanceView unit test stubs""" def setUp(self): pass def tearDown(self): pass def testSuperNovaInstanceView(self): """Test SuperNovaInstanceView""" # FIXME: construct object with mandatory attributes with example values # model = SuperNovaInstanceView() # noqa: E501 pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,274
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_o_auth1_consumer_view.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import sys import unittest import openapi_client from openapi_client.model.o_auth_rights_view import OAuthRightsView globals()['OAuthRightsView'] = OAuthRightsView from openapi_client.model.o_auth1_consumer_view import OAuth1ConsumerView class TestOAuth1ConsumerView(unittest.TestCase): """OAuth1ConsumerView unit test stubs""" def setUp(self): pass def tearDown(self): pass def testOAuth1ConsumerView(self): """Test OAuth1ConsumerView""" # FIXME: construct object with mandatory attributes with example values # model = OAuth1ConsumerView() # noqa: E501 pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,275
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_wannabe_application.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import sys import unittest import openapi_client from openapi_client.model.wannabe_oauth_app import WannabeOauthApp globals()['WannabeOauthApp'] = WannabeOauthApp from openapi_client.model.wannabe_application import WannabeApplication class TestWannabeApplication(unittest.TestCase): """WannabeApplication unit test stubs""" def setUp(self): pass def tearDown(self): pass def testWannabeApplication(self): """Test WannabeApplication""" # FIXME: construct object with mandatory attributes with example values # model = WannabeApplication() # noqa: E501 pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,276
krezreb/openapi-client-clevercloud
refs/heads/master
/openapi_client/api/self_api.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from openapi_client.api_client import ApiClient, Endpoint as _Endpoint from openapi_client.model_utils import ( # noqa: F401 check_allowed_values, check_validations, date, datetime, file_type, none_type, validate_and_convert_types ) from openapi_client.model.addon_environment_view import AddonEnvironmentView from openapi_client.model.addon_sso_data import AddonSSOData from openapi_client.model.addon_view import AddonView from openapi_client.model.application_view import ApplicationView from openapi_client.model.braintree_token import BraintreeToken from openapi_client.model.cli_token_view import CliTokenView from openapi_client.model.deployment_view import DeploymentView from openapi_client.model.drop_count_view import DropCountView from openapi_client.model.invoice_rendering import InvoiceRendering from openapi_client.model.linked_addon_environment_view import LinkedAddonEnvironmentView from openapi_client.model.mfa_recovery_code import MFARecoveryCode from openapi_client.model.message import Message from openapi_client.model.next_in_payment_flow import NextInPaymentFlow from openapi_client.model.o_auth1_access_token_view import OAuth1AccessTokenView from openapi_client.model.o_auth1_consumer_view import OAuth1ConsumerView from openapi_client.model.payment_data import PaymentData from openapi_client.model.payment_info_view import PaymentInfoView from openapi_client.model.payment_method_view import PaymentMethodView from openapi_client.model.payment_provider_selection import PaymentProviderSelection from openapi_client.model.price_with_tax_info import PriceWithTaxInfo from openapi_client.model.recurrent_payment_view import RecurrentPaymentView from openapi_client.model.secret_view import SecretView from openapi_client.model.ssh_key_view import SshKeyView from openapi_client.model.summary import Summary from openapi_client.model.super_nova_instance_map import SuperNovaInstanceMap from openapi_client.model.super_nova_instance_view import SuperNovaInstanceView from openapi_client.model.url_view import UrlView from openapi_client.model.user_view import UserView from openapi_client.model.vhost_view import VhostView from openapi_client.model.wanna_buy_package import WannaBuyPackage from openapi_client.model.wannabe_addon_provision import WannabeAddonProvision from openapi_client.model.wannabe_application import WannabeApplication from openapi_client.model.wannabe_branch import WannabeBranch from openapi_client.model.wannabe_build_flavor import WannabeBuildFlavor from openapi_client.model.wannabe_mfa_creds import WannabeMFACreds from openapi_client.model.wannabe_mfa_fav import WannabeMFAFav from openapi_client.model.wannabe_max_credits import WannabeMaxCredits from openapi_client.model.wannabe_o_auth1_consumer import WannabeOAuth1Consumer from openapi_client.model.wannabe_password import WannabePassword from openapi_client.model.wannabe_plan_change import WannabePlanChange from openapi_client.model.wannabe_user import WannabeUser from openapi_client.model.wannabe_value import WannabeValue class SelfApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __add_email_address( self, email, **kwargs ): """add_email_address # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_email_address(email, async_req=True) >>> result = thread.get() Args: email (str): Keyword Args: body (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['email'] = \ email return self.call_with_http_info(**kwargs) self.add_email_address = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/emails/{email}', 'operation_id': 'add_email_address', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'email', 'body', ], 'required': [ 'email', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'email': (str,), 'body': (str,), }, 'attribute_map': { 'email': 'email', }, 'location_map': { 'email': 'path', 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__add_email_address ) def __add_self_addon_tag_by_addon_id( self, addon_id, tag, **kwargs ): """add_self_addon_tag_by_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_self_addon_tag_by_addon_id(addon_id, tag, async_req=True) >>> result = thread.get() Args: addon_id (str): tag (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['addon_id'] = \ addon_id kwargs['tag'] = \ tag return self.call_with_http_info(**kwargs) self.add_self_addon_tag_by_addon_id = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/self/addons/{addonId}/tags/{tag}', 'operation_id': 'add_self_addon_tag_by_addon_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'addon_id', 'tag', ], 'required': [ 'addon_id', 'tag', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'addon_id': (str,), 'tag': (str,), }, 'attribute_map': { 'addon_id': 'addonId', 'tag': 'tag', }, 'location_map': { 'addon_id': 'path', 'tag': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__add_self_addon_tag_by_addon_id ) def __add_self_application( self, wannabe_application, **kwargs ): """add_self_application # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_self_application(wannabe_application, async_req=True) >>> result = thread.get() Args: wannabe_application (WannabeApplication): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: ApplicationView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['wannabe_application'] = \ wannabe_application return self.call_with_http_info(**kwargs) self.add_self_application = _Endpoint( settings={ 'response_type': (ApplicationView,), 'auth': [], 'endpoint_path': '/self/applications', 'operation_id': 'add_self_application', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'wannabe_application', ], 'required': [ 'wannabe_application', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'wannabe_application': (WannabeApplication,), }, 'attribute_map': { }, 'location_map': { 'wannabe_application': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__add_self_application ) def __add_self_application_dependency_by_app_id( self, app_id, dependency_id, **kwargs ): """add_self_application_dependency_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_self_application_dependency_by_app_id(app_id, dependency_id, async_req=True) >>> result = thread.get() Args: app_id (str): dependency_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['dependency_id'] = \ dependency_id return self.call_with_http_info(**kwargs) self.add_self_application_dependency_by_app_id = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/applications/{appId}/dependencies/{dependencyId}', 'operation_id': 'add_self_application_dependency_by_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'app_id', 'dependency_id', ], 'required': [ 'app_id', 'dependency_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'dependency_id': (str,), }, 'attribute_map': { 'app_id': 'appId', 'dependency_id': 'dependencyId', }, 'location_map': { 'app_id': 'path', 'dependency_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__add_self_application_dependency_by_app_id ) def __add_self_application_tag_by_app_id( self, app_id, tag, **kwargs ): """add_self_application_tag_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_self_application_tag_by_app_id(app_id, tag, async_req=True) >>> result = thread.get() Args: app_id (str): tag (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['tag'] = \ tag return self.call_with_http_info(**kwargs) self.add_self_application_tag_by_app_id = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/self/applications/{appId}/tags/{tag}', 'operation_id': 'add_self_application_tag_by_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'app_id', 'tag', ], 'required': [ 'app_id', 'tag', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'tag': (str,), }, 'attribute_map': { 'app_id': 'appId', 'tag': 'tag', }, 'location_map': { 'app_id': 'path', 'tag': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__add_self_application_tag_by_app_id ) def __add_self_payment_method( self, payment_data, **kwargs ): """add_self_payment_method # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_self_payment_method(payment_data, async_req=True) >>> result = thread.get() Args: payment_data (PaymentData): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: PaymentMethodView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['payment_data'] = \ payment_data return self.call_with_http_info(**kwargs) self.add_self_payment_method = _Endpoint( settings={ 'response_type': (PaymentMethodView,), 'auth': [], 'endpoint_path': '/self/payments/methods', 'operation_id': 'add_self_payment_method', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'payment_data', ], 'required': [ 'payment_data', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'payment_data': (PaymentData,), }, 'attribute_map': { }, 'location_map': { 'payment_data': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__add_self_payment_method ) def __add_self_vhost_by_app_id( self, app_id, domain, **kwargs ): """add_self_vhost_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_self_vhost_by_app_id(app_id, domain, async_req=True) >>> result = thread.get() Args: app_id (str): domain (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['domain'] = \ domain return self.call_with_http_info(**kwargs) self.add_self_vhost_by_app_id = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/applications/{appId}/vhosts/{domain}', 'operation_id': 'add_self_vhost_by_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'app_id', 'domain', ], 'required': [ 'app_id', 'domain', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'domain': (str,), }, 'attribute_map': { 'app_id': 'appId', 'domain': 'domain', }, 'location_map': { 'app_id': 'path', 'domain': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__add_self_vhost_by_app_id ) def __add_ssh_key( self, key, **kwargs ): """add_ssh_key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.add_ssh_key(key, async_req=True) >>> result = thread.get() Args: key (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['key'] = \ key return self.call_with_http_info(**kwargs) self.add_ssh_key = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/keys/{key}', 'operation_id': 'add_ssh_key', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'key', ], 'required': [ 'key', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'key': (str,), }, 'attribute_map': { 'key': 'key', }, 'location_map': { 'key': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__add_ssh_key ) def __buy_self_drops( self, wanna_buy_package, **kwargs ): """buy_self_drops # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.buy_self_drops(wanna_buy_package, async_req=True) >>> result = thread.get() Args: wanna_buy_package (WannaBuyPackage): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: InvoiceRendering If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['wanna_buy_package'] = \ wanna_buy_package return self.call_with_http_info(**kwargs) self.buy_self_drops = _Endpoint( settings={ 'response_type': (InvoiceRendering,), 'auth': [], 'endpoint_path': '/self/payments/billings', 'operation_id': 'buy_self_drops', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'wanna_buy_package', ], 'required': [ 'wanna_buy_package', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'wanna_buy_package': (WannaBuyPackage,), }, 'attribute_map': { }, 'location_map': { 'wanna_buy_package': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__buy_self_drops ) def __cancel_deploy( self, app_id, deployment_id, **kwargs ): """cancel_deploy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_deploy(app_id, deployment_id, async_req=True) >>> result = thread.get() Args: app_id (str): deployment_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['deployment_id'] = \ deployment_id return self.call_with_http_info(**kwargs) self.cancel_deploy = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/applications/{appId}/deployments/{deploymentId}/instances', 'operation_id': 'cancel_deploy', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'app_id', 'deployment_id', ], 'required': [ 'app_id', 'deployment_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'deployment_id': (str,), }, 'attribute_map': { 'app_id': 'appId', 'deployment_id': 'deploymentId', }, 'location_map': { 'app_id': 'path', 'deployment_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__cancel_deploy ) def __change_self_addon_plan_by_addon_id( self, addon_id, wannabe_plan_change, **kwargs ): """change_self_addon_plan_by_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.change_self_addon_plan_by_addon_id(addon_id, wannabe_plan_change, async_req=True) >>> result = thread.get() Args: addon_id (str): wannabe_plan_change (WannabePlanChange): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['addon_id'] = \ addon_id kwargs['wannabe_plan_change'] = \ wannabe_plan_change return self.call_with_http_info(**kwargs) self.change_self_addon_plan_by_addon_id = _Endpoint( settings={ 'response_type': (AddonView,), 'auth': [], 'endpoint_path': '/self/addons/{addonId}/plan', 'operation_id': 'change_self_addon_plan_by_addon_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'addon_id', 'wannabe_plan_change', ], 'required': [ 'addon_id', 'wannabe_plan_change', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'addon_id': (str,), 'wannabe_plan_change': (WannabePlanChange,), }, 'attribute_map': { 'addon_id': 'addonId', }, 'location_map': { 'addon_id': 'path', 'wannabe_plan_change': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__change_self_addon_plan_by_addon_id ) def __change_user_password( self, wannabe_password, **kwargs ): """change_user_password # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.change_user_password(wannabe_password, async_req=True) >>> result = thread.get() Args: wannabe_password (WannabePassword): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['wannabe_password'] = \ wannabe_password return self.call_with_http_info(**kwargs) self.change_user_password = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/change_password', 'operation_id': 'change_user_password', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'wannabe_password', ], 'required': [ 'wannabe_password', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'wannabe_password': (WannabePassword,), }, 'attribute_map': { }, 'location_map': { 'wannabe_password': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__change_user_password ) def __choose_self_payment_provider( self, bid, payment_provider_selection, **kwargs ): """choose_self_payment_provider # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.choose_self_payment_provider(bid, payment_provider_selection, async_req=True) >>> result = thread.get() Args: bid (str): payment_provider_selection (PaymentProviderSelection): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: NextInPaymentFlow If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['bid'] = \ bid kwargs['payment_provider_selection'] = \ payment_provider_selection return self.call_with_http_info(**kwargs) self.choose_self_payment_provider = _Endpoint( settings={ 'response_type': (NextInPaymentFlow,), 'auth': [], 'endpoint_path': '/self/payments/billings/{bid}', 'operation_id': 'choose_self_payment_provider', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'bid', 'payment_provider_selection', ], 'required': [ 'bid', 'payment_provider_selection', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'bid': (str,), 'payment_provider_selection': (PaymentProviderSelection,), }, 'attribute_map': { 'bid': 'bid', }, 'location_map': { 'bid': 'path', 'payment_provider_selection': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__choose_self_payment_provider ) def __create_mfa( self, kind, **kwargs ): """create_mfa # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_mfa(kind, async_req=True) >>> result = thread.get() Args: kind (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['kind'] = \ kind return self.call_with_http_info(**kwargs) self.create_mfa = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/mfa/{kind}', 'operation_id': 'create_mfa', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'kind', ], 'required': [ 'kind', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'kind': (str,), }, 'attribute_map': { 'kind': 'kind', }, 'location_map': { 'kind': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__create_mfa ) def __create_self_consumer( self, wannabe_o_auth1_consumer, **kwargs ): """create_self_consumer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_self_consumer(wannabe_o_auth1_consumer, async_req=True) >>> result = thread.get() Args: wannabe_o_auth1_consumer (WannabeOAuth1Consumer): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: OAuth1ConsumerView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['wannabe_o_auth1_consumer'] = \ wannabe_o_auth1_consumer return self.call_with_http_info(**kwargs) self.create_self_consumer = _Endpoint( settings={ 'response_type': (OAuth1ConsumerView,), 'auth': [], 'endpoint_path': '/self/consumers', 'operation_id': 'create_self_consumer', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'wannabe_o_auth1_consumer', ], 'required': [ 'wannabe_o_auth1_consumer', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'wannabe_o_auth1_consumer': (WannabeOAuth1Consumer,), }, 'attribute_map': { }, 'location_map': { 'wannabe_o_auth1_consumer': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__create_self_consumer ) def __delete_mfa( self, kind, **kwargs ): """delete_mfa # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_mfa(kind, async_req=True) >>> result = thread.get() Args: kind (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['kind'] = \ kind return self.call_with_http_info(**kwargs) self.delete_mfa = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/mfa/{kind}', 'operation_id': 'delete_mfa', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'kind', ], 'required': [ 'kind', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'kind': (str,), }, 'attribute_map': { 'kind': 'kind', }, 'location_map': { 'kind': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_mfa ) def __delete_self_addon_tag_by_addon_id( self, addon_id, tag, **kwargs ): """delete_self_addon_tag_by_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_self_addon_tag_by_addon_id(addon_id, tag, async_req=True) >>> result = thread.get() Args: addon_id (str): tag (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['addon_id'] = \ addon_id kwargs['tag'] = \ tag return self.call_with_http_info(**kwargs) self.delete_self_addon_tag_by_addon_id = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/self/addons/{addonId}/tags/{tag}', 'operation_id': 'delete_self_addon_tag_by_addon_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'addon_id', 'tag', ], 'required': [ 'addon_id', 'tag', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'addon_id': (str,), 'tag': (str,), }, 'attribute_map': { 'addon_id': 'addonId', 'tag': 'tag', }, 'location_map': { 'addon_id': 'path', 'tag': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_self_addon_tag_by_addon_id ) def __delete_self_application_by_app_id( self, app_id, **kwargs ): """delete_self_application_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_self_application_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.delete_self_application_by_app_id = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/applications/{appId}', 'operation_id': 'delete_self_application_by_app_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'app_id', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_self_application_by_app_id ) def __delete_self_application_dependency_by_app_id( self, app_id, dependency_id, **kwargs ): """delete_self_application_dependency_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_self_application_dependency_by_app_id(app_id, dependency_id, async_req=True) >>> result = thread.get() Args: app_id (str): dependency_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['dependency_id'] = \ dependency_id return self.call_with_http_info(**kwargs) self.delete_self_application_dependency_by_app_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/applications/{appId}/dependencies/{dependencyId}', 'operation_id': 'delete_self_application_dependency_by_app_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'app_id', 'dependency_id', ], 'required': [ 'app_id', 'dependency_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'dependency_id': (str,), }, 'attribute_map': { 'app_id': 'appId', 'dependency_id': 'dependencyId', }, 'location_map': { 'app_id': 'path', 'dependency_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_self_application_dependency_by_app_id ) def __delete_self_application_tag_app_id( self, app_id, tag, **kwargs ): """delete_self_application_tag_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_self_application_tag_app_id(app_id, tag, async_req=True) >>> result = thread.get() Args: app_id (str): tag (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['tag'] = \ tag return self.call_with_http_info(**kwargs) self.delete_self_application_tag_app_id = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/self/applications/{appId}/tags/{tag}', 'operation_id': 'delete_self_application_tag_app_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'app_id', 'tag', ], 'required': [ 'app_id', 'tag', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'tag': (str,), }, 'attribute_map': { 'app_id': 'appId', 'tag': 'tag', }, 'location_map': { 'app_id': 'path', 'tag': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_self_application_tag_app_id ) def __delete_self_card( self, m_id, **kwargs ): """delete_self_card # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_self_card(m_id, async_req=True) >>> result = thread.get() Args: m_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['m_id'] = \ m_id return self.call_with_http_info(**kwargs) self.delete_self_card = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/payments/methods/{mId}', 'operation_id': 'delete_self_card', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'm_id', ], 'required': [ 'm_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'm_id': (str,), }, 'attribute_map': { 'm_id': 'mId', }, 'location_map': { 'm_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_self_card ) def __delete_self_consumer( self, key, **kwargs ): """delete_self_consumer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_self_consumer(key, async_req=True) >>> result = thread.get() Args: key (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['key'] = \ key return self.call_with_http_info(**kwargs) self.delete_self_consumer = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/consumers/{key}', 'operation_id': 'delete_self_consumer', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'key', ], 'required': [ 'key', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'key': (str,), }, 'attribute_map': { 'key': 'key', }, 'location_map': { 'key': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_self_consumer ) def __delete_self_purchase_order( self, bid, **kwargs ): """delete_self_purchase_order # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_self_purchase_order(bid, async_req=True) >>> result = thread.get() Args: bid (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['bid'] = \ bid return self.call_with_http_info(**kwargs) self.delete_self_purchase_order = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/payments/billings/{bid}', 'operation_id': 'delete_self_purchase_order', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'bid', ], 'required': [ 'bid', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'bid': (str,), }, 'attribute_map': { 'bid': 'bid', }, 'location_map': { 'bid': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_self_purchase_order ) def __delete_self_recurrent_payment( self, **kwargs ): """delete_self_recurrent_payment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_self_recurrent_payment(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.delete_self_recurrent_payment = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/payments/recurring', 'operation_id': 'delete_self_recurrent_payment', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_self_recurrent_payment ) def __delete_user( self, **kwargs ): """delete_user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_user(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.delete_user = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self', 'operation_id': 'delete_user', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_user ) def __deprovision_self_addon_by_id( self, addon_id, **kwargs ): """deprovision_self_addon_by_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.deprovision_self_addon_by_id(addon_id, async_req=True) >>> result = thread.get() Args: addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.deprovision_self_addon_by_id = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/addons/{addonId}', 'operation_id': 'deprovision_self_addon_by_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'addon_id', ], 'required': [ 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'addon_id': (str,), }, 'attribute_map': { 'addon_id': 'addonId', }, 'location_map': { 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__deprovision_self_addon_by_id ) def __edit_self_application_by_app_id( self, app_id, wannabe_application, **kwargs ): """edit_self_application_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_self_application_by_app_id(app_id, wannabe_application, async_req=True) >>> result = thread.get() Args: app_id (str): wannabe_application (WannabeApplication): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: ApplicationView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['wannabe_application'] = \ wannabe_application return self.call_with_http_info(**kwargs) self.edit_self_application_by_app_id = _Endpoint( settings={ 'response_type': (ApplicationView,), 'auth': [], 'endpoint_path': '/self/applications/{appId}', 'operation_id': 'edit_self_application_by_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'app_id', 'wannabe_application', ], 'required': [ 'app_id', 'wannabe_application', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'wannabe_application': (WannabeApplication,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', 'wannabe_application': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__edit_self_application_by_app_id ) def __edit_self_application_env_by_app_id( self, app_id, body, **kwargs ): """edit_self_application_env_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_self_application_env_by_app_id(app_id, body, async_req=True) >>> result = thread.get() Args: app_id (str): body (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: ApplicationView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['body'] = \ body return self.call_with_http_info(**kwargs) self.edit_self_application_env_by_app_id = _Endpoint( settings={ 'response_type': (ApplicationView,), 'auth': [], 'endpoint_path': '/self/applications/{appId}/env', 'operation_id': 'edit_self_application_env_by_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'app_id', 'body', ], 'required': [ 'app_id', 'body', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'body': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__edit_self_application_env_by_app_id ) def __edit_self_application_env_by_app_id_and_env_name( self, app_id, env_name, wannabe_value, **kwargs ): """edit_self_application_env_by_app_id_and_env_name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_self_application_env_by_app_id_and_env_name(app_id, env_name, wannabe_value, async_req=True) >>> result = thread.get() Args: app_id (str): env_name (str): wannabe_value (WannabeValue): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: ApplicationView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['env_name'] = \ env_name kwargs['wannabe_value'] = \ wannabe_value return self.call_with_http_info(**kwargs) self.edit_self_application_env_by_app_id_and_env_name = _Endpoint( settings={ 'response_type': (ApplicationView,), 'auth': [], 'endpoint_path': '/self/applications/{appId}/env/{envName}', 'operation_id': 'edit_self_application_env_by_app_id_and_env_name', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'app_id', 'env_name', 'wannabe_value', ], 'required': [ 'app_id', 'env_name', 'wannabe_value', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'env_name': (str,), 'wannabe_value': (WannabeValue,), }, 'attribute_map': { 'app_id': 'appId', 'env_name': 'envName', }, 'location_map': { 'app_id': 'path', 'env_name': 'path', 'wannabe_value': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__edit_self_application_env_by_app_id_and_env_name ) def __edit_user( self, wannabe_user, **kwargs ): """edit_user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_user(wannabe_user, async_req=True) >>> result = thread.get() Args: wannabe_user (WannabeUser): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: UserView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['wannabe_user'] = \ wannabe_user return self.call_with_http_info(**kwargs) self.edit_user = _Endpoint( settings={ 'response_type': (UserView,), 'auth': [], 'endpoint_path': '/self', 'operation_id': 'edit_user', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'wannabe_user', ], 'required': [ 'wannabe_user', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'wannabe_user': (WannabeUser,), }, 'attribute_map': { }, 'location_map': { 'wannabe_user': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__edit_user ) def __fav_mfa( self, kind, wannabe_mfa_fav, **kwargs ): """fav_mfa # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.fav_mfa(kind, wannabe_mfa_fav, async_req=True) >>> result = thread.get() Args: kind (str): wannabe_mfa_fav (WannabeMFAFav): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['kind'] = \ kind kwargs['wannabe_mfa_fav'] = \ wannabe_mfa_fav return self.call_with_http_info(**kwargs) self.fav_mfa = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/mfa/{kind}', 'operation_id': 'fav_mfa', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'kind', 'wannabe_mfa_fav', ], 'required': [ 'kind', 'wannabe_mfa_fav', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'kind': (str,), 'wannabe_mfa_fav': (WannabeMFAFav,), }, 'attribute_map': { 'kind': 'kind', }, 'location_map': { 'kind': 'path', 'wannabe_mfa_fav': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__fav_mfa ) def __get_addon_sso_data( self, addon_id, **kwargs ): """get_addon_sso_data # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_addon_sso_data(addon_id, async_req=True) >>> result = thread.get() Args: addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonSSOData If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.get_addon_sso_data = _Endpoint( settings={ 'response_type': (AddonSSOData,), 'auth': [], 'endpoint_path': '/self/addons/{addonId}/sso', 'operation_id': 'get_addon_sso_data', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'addon_id', ], 'required': [ 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'addon_id': (str,), }, 'attribute_map': { 'addon_id': 'addonId', }, 'location_map': { 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_addon_sso_data ) def __get_application_deployment( self, app_id, deployment_id, **kwargs ): """get_application_deployment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_application_deployment(app_id, deployment_id, async_req=True) >>> result = thread.get() Args: app_id (str): deployment_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['deployment_id'] = \ deployment_id return self.call_with_http_info(**kwargs) self.get_application_deployment = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/applications/{appId}/deployments/{deploymentId}', 'operation_id': 'get_application_deployment', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', 'deployment_id', ], 'required': [ 'app_id', 'deployment_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'deployment_id': (str,), }, 'attribute_map': { 'app_id': 'appId', 'deployment_id': 'deploymentId', }, 'location_map': { 'app_id': 'path', 'deployment_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_application_deployment ) def __get_application_deployments( self, app_id, **kwargs ): """get_application_deployments # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_application_deployments(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: limit (str): [optional] offset (str): [optional] action (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [DeploymentView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_application_deployments = _Endpoint( settings={ 'response_type': ([DeploymentView],), 'auth': [], 'endpoint_path': '/self/applications/{appId}/deployments', 'operation_id': 'get_application_deployments', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', 'limit', 'offset', 'action', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'limit': (str,), 'offset': (str,), 'action': (str,), }, 'attribute_map': { 'app_id': 'appId', 'limit': 'limit', 'offset': 'offset', 'action': 'action', }, 'location_map': { 'app_id': 'path', 'limit': 'query', 'offset': 'query', 'action': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_application_deployments ) def __get_backup_codes( self, kind, **kwargs ): """get_backup_codes # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_backup_codes(kind, async_req=True) >>> result = thread.get() Args: kind (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [MFARecoveryCode] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['kind'] = \ kind return self.call_with_http_info(**kwargs) self.get_backup_codes = _Endpoint( settings={ 'response_type': ([MFARecoveryCode],), 'auth': [], 'endpoint_path': '/self/mfa/{kind}/backupcodes', 'operation_id': 'get_backup_codes', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'kind', ], 'required': [ 'kind', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'kind': (str,), }, 'attribute_map': { 'kind': 'kind', }, 'location_map': { 'kind': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_backup_codes ) def __get_confirmation_email( self, **kwargs ): """get_confirmation_email # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_confirmation_email(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_confirmation_email = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/confirmation_email', 'operation_id': 'get_confirmation_email', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_confirmation_email ) def __get_consumptions( self, **kwargs ): """get_consumptions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_consumptions(async_req=True) >>> result = thread.get() Keyword Args: app_id (str): [optional] _from (str): [optional] to (str): [optional] _for (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_consumptions = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/self/consumptions', 'operation_id': 'get_consumptions', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', '_from', 'to', '_for', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), '_from': (str,), 'to': (str,), '_for': (str,), }, 'attribute_map': { 'app_id': 'appId', '_from': 'from', 'to': 'to', '_for': 'for', }, 'location_map': { 'app_id': 'query', '_from': 'query', 'to': 'query', '_for': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_consumptions ) def __get_email_addresses( self, **kwargs ): """get_email_addresses # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_email_addresses(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_email_addresses = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/self/emails', 'operation_id': 'get_email_addresses', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_email_addresses ) def __get_id( self, **kwargs ): """get_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_id(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_id = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/self/id', 'operation_id': 'get_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_id ) def __get_self_addon_by_id( self, addon_id, **kwargs ): """get_self_addon_by_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_addon_by_id(addon_id, async_req=True) >>> result = thread.get() Args: addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.get_self_addon_by_id = _Endpoint( settings={ 'response_type': (AddonView,), 'auth': [], 'endpoint_path': '/self/addons/{addonId}', 'operation_id': 'get_self_addon_by_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'addon_id', ], 'required': [ 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'addon_id': (str,), }, 'attribute_map': { 'addon_id': 'addonId', }, 'location_map': { 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_addon_by_id ) def __get_self_addon_env_by_addon_id( self, addon_id, **kwargs ): """get_self_addon_env_by_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_addon_env_by_addon_id(addon_id, async_req=True) >>> result = thread.get() Args: addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [AddonEnvironmentView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.get_self_addon_env_by_addon_id = _Endpoint( settings={ 'response_type': ([AddonEnvironmentView],), 'auth': [], 'endpoint_path': '/self/addons/{addonId}/env', 'operation_id': 'get_self_addon_env_by_addon_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'addon_id', ], 'required': [ 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'addon_id': (str,), }, 'attribute_map': { 'addon_id': 'addonId', }, 'location_map': { 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_addon_env_by_addon_id ) def __get_self_addon_tags_by_addon_id( self, addon_id, **kwargs ): """get_self_addon_tags_by_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_addon_tags_by_addon_id(addon_id, async_req=True) >>> result = thread.get() Args: addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.get_self_addon_tags_by_addon_id = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/self/addons/{addonId}/tags', 'operation_id': 'get_self_addon_tags_by_addon_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'addon_id', ], 'required': [ 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'addon_id': (str,), }, 'attribute_map': { 'addon_id': 'addonId', }, 'location_map': { 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_addon_tags_by_addon_id ) def __get_self_addons( self, **kwargs ): """get_self_addons # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_addons(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [AddonView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_self_addons = _Endpoint( settings={ 'response_type': ([AddonView],), 'auth': [], 'endpoint_path': '/self/addons', 'operation_id': 'get_self_addons', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_addons ) def __get_self_addons_linked_to_application_by_app_id( self, app_id, **kwargs ): """get_self_addons_linked_to_application_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_addons_linked_to_application_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [AddonView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_self_addons_linked_to_application_by_app_id = _Endpoint( settings={ 'response_type': ([AddonView],), 'auth': [], 'endpoint_path': '/self/applications/{appId}/addons', 'operation_id': 'get_self_addons_linked_to_application_by_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_addons_linked_to_application_by_app_id ) def __get_self_amount( self, **kwargs ): """get_self_amount # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_amount(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: DropCountView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_self_amount = _Endpoint( settings={ 'response_type': (DropCountView,), 'auth': [], 'endpoint_path': '/self/credits', 'operation_id': 'get_self_amount', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_amount ) def __get_self_application_branches_by_app_id( self, app_id, **kwargs ): """get_self_application_branches_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_application_branches_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_self_application_branches_by_app_id = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/self/applications/{appId}/branches', 'operation_id': 'get_self_application_branches_by_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_application_branches_by_app_id ) def __get_self_application_by_app_id( self, app_id, **kwargs ): """get_self_application_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_application_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: ApplicationView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_self_application_by_app_id = _Endpoint( settings={ 'response_type': (ApplicationView,), 'auth': [], 'endpoint_path': '/self/applications/{appId}', 'operation_id': 'get_self_application_by_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_application_by_app_id ) def __get_self_application_dependencies_by_app_id( self, app_id, **kwargs ): """get_self_application_dependencies_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_application_dependencies_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [ApplicationView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_self_application_dependencies_by_app_id = _Endpoint( settings={ 'response_type': ([ApplicationView],), 'auth': [], 'endpoint_path': '/self/applications/{appId}/dependencies', 'operation_id': 'get_self_application_dependencies_by_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_application_dependencies_by_app_id ) def __get_self_application_dependencies_env_by_app_id( self, id, app_id, **kwargs ): """get_self_application_dependencies_env_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_application_dependencies_env_by_app_id(id, app_id, async_req=True) >>> result = thread.get() Args: id (str): app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_self_application_dependencies_env_by_app_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/applications/{appId}/dependencies/env', 'operation_id': 'get_self_application_dependencies_env_by_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', 'app_id', ], 'required': [ 'id', 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), 'app_id': (str,), }, 'attribute_map': { 'id': 'id', 'app_id': 'appId', }, 'location_map': { 'id': 'path', 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_application_dependencies_env_by_app_id ) def __get_self_application_dependents( self, app_id, **kwargs ): """get_self_application_dependents # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_application_dependents(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [ApplicationView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_self_application_dependents = _Endpoint( settings={ 'response_type': ([ApplicationView],), 'auth': [], 'endpoint_path': '/self/applications/{appId}/dependents', 'operation_id': 'get_self_application_dependents', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_application_dependents ) def __get_self_application_env_by_app_id( self, app_id, **kwargs ): """get_self_application_env_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_application_env_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [AddonEnvironmentView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_self_application_env_by_app_id = _Endpoint( settings={ 'response_type': ([AddonEnvironmentView],), 'auth': [], 'endpoint_path': '/self/applications/{appId}/env', 'operation_id': 'get_self_application_env_by_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_application_env_by_app_id ) def __get_self_application_instance_by_app_and_instance_id( self, app_id, instance_id, **kwargs ): """get_self_application_instance_by_app_and_instance_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_application_instance_by_app_and_instance_id(app_id, instance_id, async_req=True) >>> result = thread.get() Args: app_id (str): instance_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: SuperNovaInstanceView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['instance_id'] = \ instance_id return self.call_with_http_info(**kwargs) self.get_self_application_instance_by_app_and_instance_id = _Endpoint( settings={ 'response_type': (SuperNovaInstanceView,), 'auth': [], 'endpoint_path': '/self/applications/{appId}/instances/{instanceId}', 'operation_id': 'get_self_application_instance_by_app_and_instance_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', 'instance_id', ], 'required': [ 'app_id', 'instance_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'instance_id': (str,), }, 'attribute_map': { 'app_id': 'appId', 'instance_id': 'instanceId', }, 'location_map': { 'app_id': 'path', 'instance_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_application_instance_by_app_and_instance_id ) def __get_self_application_instances_by_app_id( self, app_id, **kwargs ): """get_self_application_instances_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_application_instances_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: deployment_id (str): [optional] with_deleted (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [SuperNovaInstanceView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_self_application_instances_by_app_id = _Endpoint( settings={ 'response_type': ([SuperNovaInstanceView],), 'auth': [], 'endpoint_path': '/self/applications/{appId}/instances', 'operation_id': 'get_self_application_instances_by_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', 'deployment_id', 'with_deleted', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'deployment_id': (str,), 'with_deleted': (str,), }, 'attribute_map': { 'app_id': 'appId', 'deployment_id': 'deploymentId', 'with_deleted': 'withDeleted', }, 'location_map': { 'app_id': 'path', 'deployment_id': 'query', 'with_deleted': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_application_instances_by_app_id ) def __get_self_application_tags_by_app_id( self, app_id, **kwargs ): """get_self_application_tags_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_application_tags_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_self_application_tags_by_app_id = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/self/applications/{appId}/tags', 'operation_id': 'get_self_application_tags_by_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_application_tags_by_app_id ) def __get_self_applications( self, **kwargs ): """get_self_applications # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_applications(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [ApplicationView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_self_applications = _Endpoint( settings={ 'response_type': ([ApplicationView],), 'auth': [], 'endpoint_path': '/self/applications', 'operation_id': 'get_self_applications', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_applications ) def __get_self_applications_linked_to_addon_by_addon_id( self, addon_id, **kwargs ): """get_self_applications_linked_to_addon_by_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_applications_linked_to_addon_by_addon_id(addon_id, async_req=True) >>> result = thread.get() Args: addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [ApplicationView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.get_self_applications_linked_to_addon_by_addon_id = _Endpoint( settings={ 'response_type': ([ApplicationView],), 'auth': [], 'endpoint_path': '/self/addons/{addonId}/applications', 'operation_id': 'get_self_applications_linked_to_addon_by_addon_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'addon_id', ], 'required': [ 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'addon_id': (str,), }, 'attribute_map': { 'addon_id': 'addonId', }, 'location_map': { 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_applications_linked_to_addon_by_addon_id ) def __get_self_cli_tokens( self, **kwargs ): """get_self_cli_tokens # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_cli_tokens(async_req=True) >>> result = thread.get() Keyword Args: cli_token (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [CliTokenView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_self_cli_tokens = _Endpoint( settings={ 'response_type': ([CliTokenView],), 'auth': [], 'endpoint_path': '/self/cli_tokens', 'operation_id': 'get_self_cli_tokens', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'cli_token', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'cli_token': (str,), }, 'attribute_map': { 'cli_token': 'cli_token', }, 'location_map': { 'cli_token': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_cli_tokens ) def __get_self_consumer( self, key, **kwargs ): """get_self_consumer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_consumer(key, async_req=True) >>> result = thread.get() Args: key (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: OAuth1ConsumerView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['key'] = \ key return self.call_with_http_info(**kwargs) self.get_self_consumer = _Endpoint( settings={ 'response_type': (OAuth1ConsumerView,), 'auth': [], 'endpoint_path': '/self/consumers/{key}', 'operation_id': 'get_self_consumer', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'key', ], 'required': [ 'key', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'key': (str,), }, 'attribute_map': { 'key': 'key', }, 'location_map': { 'key': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_consumer ) def __get_self_consumer_secret( self, key, **kwargs ): """get_self_consumer_secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_consumer_secret(key, async_req=True) >>> result = thread.get() Args: key (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: SecretView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['key'] = \ key return self.call_with_http_info(**kwargs) self.get_self_consumer_secret = _Endpoint( settings={ 'response_type': (SecretView,), 'auth': [], 'endpoint_path': '/self/consumers/{key}/secret', 'operation_id': 'get_self_consumer_secret', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'key', ], 'required': [ 'key', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'key': (str,), }, 'attribute_map': { 'key': 'key', }, 'location_map': { 'key': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_consumer_secret ) def __get_self_consumers( self, **kwargs ): """get_self_consumers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_consumers(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_self_consumers = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/consumers', 'operation_id': 'get_self_consumers', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_consumers ) def __get_self_default_method( self, **kwargs ): """get_self_default_method # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_default_method(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: PaymentMethodView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_self_default_method = _Endpoint( settings={ 'response_type': (PaymentMethodView,), 'auth': [], 'endpoint_path': '/self/payments/methods/default', 'operation_id': 'get_self_default_method', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_default_method ) def __get_self_env_of_addons_linked_to_application_by_app_id( self, app_id, **kwargs ): """get_self_env_of_addons_linked_to_application_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_env_of_addons_linked_to_application_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [LinkedAddonEnvironmentView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_self_env_of_addons_linked_to_application_by_app_id = _Endpoint( settings={ 'response_type': ([LinkedAddonEnvironmentView],), 'auth': [], 'endpoint_path': '/self/applications/{appId}/addons/env', 'operation_id': 'get_self_env_of_addons_linked_to_application_by_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_env_of_addons_linked_to_application_by_app_id ) def __get_self_exposed_env_by_app_id( self, app_id, **kwargs ): """get_self_exposed_env_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_exposed_env_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_self_exposed_env_by_app_id = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/self/applications/{appId}/exposed_env', 'operation_id': 'get_self_exposed_env_by_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_exposed_env_by_app_id ) def __get_self_favourite_vhost_by_app_id( self, app_id, **kwargs ): """get_self_favourite_vhost_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_favourite_vhost_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: VhostView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_self_favourite_vhost_by_app_id = _Endpoint( settings={ 'response_type': (VhostView,), 'auth': [], 'endpoint_path': '/self/applications/{appId}/vhosts/favourite', 'operation_id': 'get_self_favourite_vhost_by_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_favourite_vhost_by_app_id ) def __get_self_instances_for_all_apps( self, **kwargs ): """get_self_instances_for_all_apps # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_instances_for_all_apps(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: SuperNovaInstanceMap If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_self_instances_for_all_apps = _Endpoint( settings={ 'response_type': (SuperNovaInstanceMap,), 'auth': [], 'endpoint_path': '/self/instances', 'operation_id': 'get_self_instances_for_all_apps', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_instances_for_all_apps ) def __get_self_invoice_by_id( self, bid, **kwargs ): """get_self_invoice_by_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_invoice_by_id(bid, async_req=True) >>> result = thread.get() Args: bid (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: InvoiceRendering If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['bid'] = \ bid return self.call_with_http_info(**kwargs) self.get_self_invoice_by_id = _Endpoint( settings={ 'response_type': (InvoiceRendering,), 'auth': [], 'endpoint_path': '/self/payments/billings/{bid}', 'operation_id': 'get_self_invoice_by_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'bid', ], 'required': [ 'bid', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'bid': (str,), }, 'attribute_map': { 'bid': 'bid', }, 'location_map': { 'bid': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_invoice_by_id ) def __get_self_invoices( self, **kwargs ): """get_self_invoices # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_invoices(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [InvoiceRendering] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_self_invoices = _Endpoint( settings={ 'response_type': ([InvoiceRendering],), 'auth': [], 'endpoint_path': '/self/payments/billings', 'operation_id': 'get_self_invoices', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_invoices ) def __get_self_monthly_invoice( self, **kwargs ): """get_self_monthly_invoice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_monthly_invoice(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_self_monthly_invoice = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/self/payments/monthlyinvoice', 'operation_id': 'get_self_monthly_invoice', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_monthly_invoice ) def __get_self_payment_info( self, **kwargs ): """get_self_payment_info # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_payment_info(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: PaymentInfoView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_self_payment_info = _Endpoint( settings={ 'response_type': (PaymentInfoView,), 'auth': [], 'endpoint_path': '/self/payment-info', 'operation_id': 'get_self_payment_info', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_payment_info ) def __get_self_payment_methods( self, **kwargs ): """get_self_payment_methods # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_payment_methods(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [PaymentMethodView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_self_payment_methods = _Endpoint( settings={ 'response_type': ([PaymentMethodView],), 'auth': [], 'endpoint_path': '/self/payments/methods', 'operation_id': 'get_self_payment_methods', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_payment_methods ) def __get_self_pdf_invoice_by_id( self, bid, **kwargs ): """get_self_pdf_invoice_by_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_pdf_invoice_by_id(bid, async_req=True) >>> result = thread.get() Args: bid (str): Keyword Args: token (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['bid'] = \ bid return self.call_with_http_info(**kwargs) self.get_self_pdf_invoice_by_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/payments/billings/{bid}.pdf', 'operation_id': 'get_self_pdf_invoice_by_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'bid', 'token', ], 'required': [ 'bid', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'bid': (str,), 'token': (str,), }, 'attribute_map': { 'bid': 'bid', 'token': 'token', }, 'location_map': { 'bid': 'path', 'token': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/pdf' ], 'content_type': [], }, api_client=api_client, callable=__get_self_pdf_invoice_by_id ) def __get_self_price_with_tax( self, price, **kwargs ): """get_self_price_with_tax # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_price_with_tax(price, async_req=True) >>> result = thread.get() Args: price (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: PriceWithTaxInfo If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['price'] = \ price return self.call_with_http_info(**kwargs) self.get_self_price_with_tax = _Endpoint( settings={ 'response_type': (PriceWithTaxInfo,), 'auth': [], 'endpoint_path': '/self/payments/fullprice/{price}', 'operation_id': 'get_self_price_with_tax', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'price', ], 'required': [ 'price', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'price': (str,), }, 'attribute_map': { 'price': 'price', }, 'location_map': { 'price': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_price_with_tax ) def __get_self_recurrent_payment( self, **kwargs ): """get_self_recurrent_payment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_recurrent_payment(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: RecurrentPaymentView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_self_recurrent_payment = _Endpoint( settings={ 'response_type': (RecurrentPaymentView,), 'auth': [], 'endpoint_path': '/self/payments/recurring', 'operation_id': 'get_self_recurrent_payment', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_recurrent_payment ) def __get_self_stripe_token( self, **kwargs ): """get_self_stripe_token # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_stripe_token(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: BraintreeToken If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_self_stripe_token = _Endpoint( settings={ 'response_type': (BraintreeToken,), 'auth': [], 'endpoint_path': '/self/payments/tokens/stripe', 'operation_id': 'get_self_stripe_token', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_stripe_token ) def __get_self_tokens( self, **kwargs ): """get_self_tokens # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_tokens(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [OAuth1AccessTokenView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_self_tokens = _Endpoint( settings={ 'response_type': ([OAuth1AccessTokenView],), 'auth': [], 'endpoint_path': '/self/tokens', 'operation_id': 'get_self_tokens', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_tokens ) def __get_self_vhost_by_app_id( self, app_id, **kwargs ): """get_self_vhost_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_self_vhost_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [VhostView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_self_vhost_by_app_id = _Endpoint( settings={ 'response_type': ([VhostView],), 'auth': [], 'endpoint_path': '/self/applications/{appId}/vhosts', 'operation_id': 'get_self_vhost_by_app_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_self_vhost_by_app_id ) def __get_ssh_keys( self, **kwargs ): """get_ssh_keys # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_ssh_keys(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [SshKeyView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_ssh_keys = _Endpoint( settings={ 'response_type': ([SshKeyView],), 'auth': [], 'endpoint_path': '/self/keys', 'operation_id': 'get_ssh_keys', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_ssh_keys ) def __get_summary( self, **kwargs ): """get_summary # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_summary(async_req=True) >>> result = thread.get() Keyword Args: full (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Summary If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_summary = _Endpoint( settings={ 'response_type': (Summary,), 'auth': [], 'endpoint_path': '/summary', 'operation_id': 'get_summary', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'full', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'full': (str,), }, 'attribute_map': { 'full': 'full', }, 'location_map': { 'full': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_summary ) def __get_user( self, **kwargs ): """get_user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_user(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: UserView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_user = _Endpoint( settings={ 'response_type': (UserView,), 'auth': [], 'endpoint_path': '/self', 'operation_id': 'get_user', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_user ) def __link_self_addon_to_application_by_app_id( self, app_id, **kwargs ): """link_self_addon_to_application_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.link_self_addon_to_application_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.link_self_addon_to_application_by_app_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/applications/{appId}/addons', 'operation_id': 'link_self_addon_to_application_by_app_id', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'app_id', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__link_self_addon_to_application_by_app_id ) def __mark_self_favourite_vhost_by_app_id( self, app_id, vhost_view, **kwargs ): """mark_self_favourite_vhost_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mark_self_favourite_vhost_by_app_id(app_id, vhost_view, async_req=True) >>> result = thread.get() Args: app_id (str): vhost_view (VhostView): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: VhostView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['vhost_view'] = \ vhost_view return self.call_with_http_info(**kwargs) self.mark_self_favourite_vhost_by_app_id = _Endpoint( settings={ 'response_type': (VhostView,), 'auth': [], 'endpoint_path': '/self/applications/{appId}/vhosts/favourite', 'operation_id': 'mark_self_favourite_vhost_by_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'app_id', 'vhost_view', ], 'required': [ 'app_id', 'vhost_view', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'vhost_view': (VhostView,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', 'vhost_view': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__mark_self_favourite_vhost_by_app_id ) def __preorder_self_addon( self, wannabe_addon_provision, **kwargs ): """preorder_self_addon # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.preorder_self_addon(wannabe_addon_provision, async_req=True) >>> result = thread.get() Args: wannabe_addon_provision (WannabeAddonProvision): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: InvoiceRendering If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['wannabe_addon_provision'] = \ wannabe_addon_provision return self.call_with_http_info(**kwargs) self.preorder_self_addon = _Endpoint( settings={ 'response_type': (InvoiceRendering,), 'auth': [], 'endpoint_path': '/self/addons/preorders', 'operation_id': 'preorder_self_addon', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'wannabe_addon_provision', ], 'required': [ 'wannabe_addon_provision', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'wannabe_addon_provision': (WannabeAddonProvision,), }, 'attribute_map': { }, 'location_map': { 'wannabe_addon_provision': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__preorder_self_addon ) def __provision_self_addon( self, wannabe_addon_provision, **kwargs ): """provision_self_addon # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.provision_self_addon(wannabe_addon_provision, async_req=True) >>> result = thread.get() Args: wannabe_addon_provision (WannabeAddonProvision): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['wannabe_addon_provision'] = \ wannabe_addon_provision return self.call_with_http_info(**kwargs) self.provision_self_addon = _Endpoint( settings={ 'response_type': (AddonView,), 'auth': [], 'endpoint_path': '/self/addons', 'operation_id': 'provision_self_addon', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'wannabe_addon_provision', ], 'required': [ 'wannabe_addon_provision', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'wannabe_addon_provision': (WannabeAddonProvision,), }, 'attribute_map': { }, 'location_map': { 'wannabe_addon_provision': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__provision_self_addon ) def __redeploy_self_application_by_app_id( self, app_id, **kwargs ): """redeploy_self_application_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.redeploy_self_application_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: commit (str): [optional] use_cache (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.redeploy_self_application_by_app_id = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/applications/{appId}/instances', 'operation_id': 'redeploy_self_application_by_app_id', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'app_id', 'commit', 'use_cache', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'commit': (str,), 'use_cache': (str,), }, 'attribute_map': { 'app_id': 'appId', 'commit': 'commit', 'use_cache': 'useCache', }, 'location_map': { 'app_id': 'path', 'commit': 'query', 'use_cache': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__redeploy_self_application_by_app_id ) def __remove_email_address( self, email, **kwargs ): """remove_email_address # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_email_address(email, async_req=True) >>> result = thread.get() Args: email (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['email'] = \ email return self.call_with_http_info(**kwargs) self.remove_email_address = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/emails/{email}', 'operation_id': 'remove_email_address', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'email', ], 'required': [ 'email', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'email': (str,), }, 'attribute_map': { 'email': 'email', }, 'location_map': { 'email': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__remove_email_address ) def __remove_self_application_env_by_app_id_and_env_name( self, app_id, env_name, **kwargs ): """remove_self_application_env_by_app_id_and_env_name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_self_application_env_by_app_id_and_env_name(app_id, env_name, async_req=True) >>> result = thread.get() Args: app_id (str): env_name (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: ApplicationView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['env_name'] = \ env_name return self.call_with_http_info(**kwargs) self.remove_self_application_env_by_app_id_and_env_name = _Endpoint( settings={ 'response_type': (ApplicationView,), 'auth': [], 'endpoint_path': '/self/applications/{appId}/env/{envName}', 'operation_id': 'remove_self_application_env_by_app_id_and_env_name', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'app_id', 'env_name', ], 'required': [ 'app_id', 'env_name', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'env_name': (str,), }, 'attribute_map': { 'app_id': 'appId', 'env_name': 'envName', }, 'location_map': { 'app_id': 'path', 'env_name': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__remove_self_application_env_by_app_id_and_env_name ) def __remove_self_vhost_by_app_id( self, app_id, domain, **kwargs ): """remove_self_vhost_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_self_vhost_by_app_id(app_id, domain, async_req=True) >>> result = thread.get() Args: app_id (str): domain (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['domain'] = \ domain return self.call_with_http_info(**kwargs) self.remove_self_vhost_by_app_id = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/applications/{appId}/vhosts/{domain}', 'operation_id': 'remove_self_vhost_by_app_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'app_id', 'domain', ], 'required': [ 'app_id', 'domain', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'domain': (str,), }, 'attribute_map': { 'app_id': 'appId', 'domain': 'domain', }, 'location_map': { 'app_id': 'path', 'domain': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__remove_self_vhost_by_app_id ) def __remove_ssh_key( self, key, **kwargs ): """remove_ssh_key # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.remove_ssh_key(key, async_req=True) >>> result = thread.get() Args: key (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['key'] = \ key return self.call_with_http_info(**kwargs) self.remove_ssh_key = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/keys/{key}', 'operation_id': 'remove_ssh_key', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'key', ], 'required': [ 'key', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'key': (str,), }, 'attribute_map': { 'key': 'key', }, 'location_map': { 'key': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__remove_ssh_key ) def __rename_addon( self, addon_id, wannabe_addon_provision, **kwargs ): """rename_addon # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.rename_addon(addon_id, wannabe_addon_provision, async_req=True) >>> result = thread.get() Args: addon_id (str): wannabe_addon_provision (WannabeAddonProvision): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: AddonView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['addon_id'] = \ addon_id kwargs['wannabe_addon_provision'] = \ wannabe_addon_provision return self.call_with_http_info(**kwargs) self.rename_addon = _Endpoint( settings={ 'response_type': (AddonView,), 'auth': [], 'endpoint_path': '/self/addons/{addonId}', 'operation_id': 'rename_addon', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'addon_id', 'wannabe_addon_provision', ], 'required': [ 'addon_id', 'wannabe_addon_provision', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'addon_id': (str,), 'wannabe_addon_provision': (WannabeAddonProvision,), }, 'attribute_map': { 'addon_id': 'addonId', }, 'location_map': { 'addon_id': 'path', 'wannabe_addon_provision': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__rename_addon ) def __revoke_all_tokens( self, **kwargs ): """revoke_all_tokens # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.revoke_all_tokens(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.revoke_all_tokens = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/tokens', 'operation_id': 'revoke_all_tokens', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__revoke_all_tokens ) def __revoke_token( self, token, **kwargs ): """revoke_token # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.revoke_token(token, async_req=True) >>> result = thread.get() Args: token (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['token'] = \ token return self.call_with_http_info(**kwargs) self.revoke_token = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/tokens/{token}', 'operation_id': 'revoke_token', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'token', ], 'required': [ 'token', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'token': (str,), }, 'attribute_map': { 'token': 'token', }, 'location_map': { 'token': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__revoke_token ) def __set_self_application_branch_by_app_id( self, app_id, wannabe_branch, **kwargs ): """set_self_application_branch_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_self_application_branch_by_app_id(app_id, wannabe_branch, async_req=True) >>> result = thread.get() Args: app_id (str): wannabe_branch (WannabeBranch): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['wannabe_branch'] = \ wannabe_branch return self.call_with_http_info(**kwargs) self.set_self_application_branch_by_app_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/applications/{appId}/branch', 'operation_id': 'set_self_application_branch_by_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'app_id', 'wannabe_branch', ], 'required': [ 'app_id', 'wannabe_branch', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'wannabe_branch': (WannabeBranch,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', 'wannabe_branch': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__set_self_application_branch_by_app_id ) def __set_self_build_instance_flavor_by_app_id( self, app_id, wannabe_build_flavor, **kwargs ): """set_self_build_instance_flavor_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_self_build_instance_flavor_by_app_id(app_id, wannabe_build_flavor, async_req=True) >>> result = thread.get() Args: app_id (str): wannabe_build_flavor (WannabeBuildFlavor): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['wannabe_build_flavor'] = \ wannabe_build_flavor return self.call_with_http_info(**kwargs) self.set_self_build_instance_flavor_by_app_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/applications/{appId}/buildflavor', 'operation_id': 'set_self_build_instance_flavor_by_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'app_id', 'wannabe_build_flavor', ], 'required': [ 'app_id', 'wannabe_build_flavor', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'wannabe_build_flavor': (WannabeBuildFlavor,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', 'wannabe_build_flavor': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__set_self_build_instance_flavor_by_app_id ) def __set_self_default_method( self, payment_data, **kwargs ): """set_self_default_method # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_self_default_method(payment_data, async_req=True) >>> result = thread.get() Args: payment_data (PaymentData): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['payment_data'] = \ payment_data return self.call_with_http_info(**kwargs) self.set_self_default_method = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/payments/methods/default', 'operation_id': 'set_self_default_method', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'payment_data', ], 'required': [ 'payment_data', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'payment_data': (PaymentData,), }, 'attribute_map': { }, 'location_map': { 'payment_data': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__set_self_default_method ) def __set_self_max_credits_per_month( self, wannabe_max_credits, **kwargs ): """set_self_max_credits_per_month # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_self_max_credits_per_month(wannabe_max_credits, async_req=True) >>> result = thread.get() Args: wannabe_max_credits (WannabeMaxCredits): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: WannabeMaxCredits If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['wannabe_max_credits'] = \ wannabe_max_credits return self.call_with_http_info(**kwargs) self.set_self_max_credits_per_month = _Endpoint( settings={ 'response_type': (WannabeMaxCredits,), 'auth': [], 'endpoint_path': '/self/payments/monthlyinvoice/maxcredit', 'operation_id': 'set_self_max_credits_per_month', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'wannabe_max_credits', ], 'required': [ 'wannabe_max_credits', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'wannabe_max_credits': (WannabeMaxCredits,), }, 'attribute_map': { }, 'location_map': { 'wannabe_max_credits': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__set_self_max_credits_per_month ) def __set_user_avatar_from_file( self, body, **kwargs ): """set_user_avatar_from_file # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.set_user_avatar_from_file(body, async_req=True) >>> result = thread.get() Args: body (file_type): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: UrlView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['body'] = \ body return self.call_with_http_info(**kwargs) self.set_user_avatar_from_file = _Endpoint( settings={ 'response_type': (UrlView,), 'auth': [], 'endpoint_path': '/self/avatar', 'operation_id': 'set_user_avatar_from_file', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'body', ], 'required': [ 'body', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'body': (file_type,), }, 'attribute_map': { }, 'location_map': { 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'image/bmp', 'image/gif', 'image/jpeg', 'image/png', 'image/tiff' ] }, api_client=api_client, callable=__set_user_avatar_from_file ) def __undeploy_self_application_by_app_id( self, app_id, **kwargs ): """undeploy_self_application_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.undeploy_self_application_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.undeploy_self_application_by_app_id = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/applications/{appId}/instances', 'operation_id': 'undeploy_self_application_by_app_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'app_id', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__undeploy_self_application_by_app_id ) def __unlink_selfddon_from_application_by_app_and_addon_id( self, app_id, addon_id, **kwargs ): """unlink_selfddon_from_application_by_app_and_addon_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unlink_selfddon_from_application_by_app_and_addon_id(app_id, addon_id, async_req=True) >>> result = thread.get() Args: app_id (str): addon_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['addon_id'] = \ addon_id return self.call_with_http_info(**kwargs) self.unlink_selfddon_from_application_by_app_and_addon_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/applications/{appId}/addons/{addonId}', 'operation_id': 'unlink_selfddon_from_application_by_app_and_addon_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'app_id', 'addon_id', ], 'required': [ 'app_id', 'addon_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'addon_id': (str,), }, 'attribute_map': { 'app_id': 'appId', 'addon_id': 'addonId', }, 'location_map': { 'app_id': 'path', 'addon_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__unlink_selfddon_from_application_by_app_and_addon_id ) def __unmark_self_favourite_vhost_by_app_id( self, app_id, **kwargs ): """unmark_self_favourite_vhost_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unmark_self_favourite_vhost_by_app_id(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.unmark_self_favourite_vhost_by_app_id = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/applications/{appId}/vhosts/favourite', 'operation_id': 'unmark_self_favourite_vhost_by_app_id', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'app_id', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__unmark_self_favourite_vhost_by_app_id ) def __update_self_consumer( self, key, wannabe_o_auth1_consumer, **kwargs ): """update_self_consumer # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_self_consumer(key, wannabe_o_auth1_consumer, async_req=True) >>> result = thread.get() Args: key (str): wannabe_o_auth1_consumer (WannabeOAuth1Consumer): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: OAuth1ConsumerView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['key'] = \ key kwargs['wannabe_o_auth1_consumer'] = \ wannabe_o_auth1_consumer return self.call_with_http_info(**kwargs) self.update_self_consumer = _Endpoint( settings={ 'response_type': (OAuth1ConsumerView,), 'auth': [], 'endpoint_path': '/self/consumers/{key}', 'operation_id': 'update_self_consumer', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'key', 'wannabe_o_auth1_consumer', ], 'required': [ 'key', 'wannabe_o_auth1_consumer', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'key': (str,), 'wannabe_o_auth1_consumer': (WannabeOAuth1Consumer,), }, 'attribute_map': { 'key': 'key', }, 'location_map': { 'key': 'path', 'wannabe_o_auth1_consumer': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__update_self_consumer ) def __update_self_exposed_env_by_app_id( self, app_id, body, **kwargs ): """update_self_exposed_env_by_app_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_self_exposed_env_by_app_id(app_id, body, async_req=True) >>> result = thread.get() Args: app_id (str): body (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['body'] = \ body return self.call_with_http_info(**kwargs) self.update_self_exposed_env_by_app_id = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/self/applications/{appId}/exposed_env', 'operation_id': 'update_self_exposed_env_by_app_id', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'app_id', 'body', ], 'required': [ 'app_id', 'body', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'body': (str,), }, 'attribute_map': { 'app_id': 'appId', }, 'location_map': { 'app_id': 'path', 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__update_self_exposed_env_by_app_id ) def __validate_email( self, **kwargs ): """validate_email # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.validate_email(async_req=True) >>> result = thread.get() Keyword Args: validation_key (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.validate_email = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/validate_email', 'operation_id': 'validate_email', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'validation_key', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'validation_key': (str,), }, 'attribute_map': { 'validation_key': 'validationKey', }, 'location_map': { 'validation_key': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__validate_email ) def __validate_mfa( self, kind, wannabe_mfa_creds, **kwargs ): """validate_mfa # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.validate_mfa(kind, wannabe_mfa_creds, async_req=True) >>> result = thread.get() Args: kind (str): wannabe_mfa_creds (WannabeMFACreds): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['kind'] = \ kind kwargs['wannabe_mfa_creds'] = \ wannabe_mfa_creds return self.call_with_http_info(**kwargs) self.validate_mfa = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/self/mfa/{kind}/confirmation', 'operation_id': 'validate_mfa', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'kind', 'wannabe_mfa_creds', ], 'required': [ 'kind', 'wannabe_mfa_creds', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'kind': (str,), 'wannabe_mfa_creds': (WannabeMFACreds,), }, 'attribute_map': { 'kind': 'kind', }, 'location_map': { 'kind': 'path', 'wannabe_mfa_creds': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__validate_mfa )
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,277
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_flavor_view.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import sys import unittest import openapi_client from openapi_client.model.value_with_unit import ValueWithUnit globals()['ValueWithUnit'] = ValueWithUnit from openapi_client.model.flavor_view import FlavorView class TestFlavorView(unittest.TestCase): """FlavorView unit test stubs""" def setUp(self): pass def tearDown(self): pass def testFlavorView(self): """Test FlavorView""" # FIXME: construct object with mandatory attributes with example values # model = FlavorView() # noqa: E501 pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,278
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_self_api.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import unittest import openapi_client from openapi_client.api.self_api import SelfApi # noqa: E501 class TestSelfApi(unittest.TestCase): """SelfApi unit test stubs""" def setUp(self): self.api = SelfApi() # noqa: E501 def tearDown(self): pass def test_add_email_address(self): """Test case for add_email_address """ pass def test_add_self_addon_tag_by_addon_id(self): """Test case for add_self_addon_tag_by_addon_id """ pass def test_add_self_application(self): """Test case for add_self_application """ pass def test_add_self_application_dependency_by_app_id(self): """Test case for add_self_application_dependency_by_app_id """ pass def test_add_self_application_tag_by_app_id(self): """Test case for add_self_application_tag_by_app_id """ pass def test_add_self_payment_method(self): """Test case for add_self_payment_method """ pass def test_add_self_vhost_by_app_id(self): """Test case for add_self_vhost_by_app_id """ pass def test_add_ssh_key(self): """Test case for add_ssh_key """ pass def test_buy_self_drops(self): """Test case for buy_self_drops """ pass def test_cancel_deploy(self): """Test case for cancel_deploy """ pass def test_change_self_addon_plan_by_addon_id(self): """Test case for change_self_addon_plan_by_addon_id """ pass def test_change_user_password(self): """Test case for change_user_password """ pass def test_choose_self_payment_provider(self): """Test case for choose_self_payment_provider """ pass def test_create_mfa(self): """Test case for create_mfa """ pass def test_create_self_consumer(self): """Test case for create_self_consumer """ pass def test_delete_mfa(self): """Test case for delete_mfa """ pass def test_delete_self_addon_tag_by_addon_id(self): """Test case for delete_self_addon_tag_by_addon_id """ pass def test_delete_self_application_by_app_id(self): """Test case for delete_self_application_by_app_id """ pass def test_delete_self_application_dependency_by_app_id(self): """Test case for delete_self_application_dependency_by_app_id """ pass def test_delete_self_application_tag_app_id(self): """Test case for delete_self_application_tag_app_id """ pass def test_delete_self_card(self): """Test case for delete_self_card """ pass def test_delete_self_consumer(self): """Test case for delete_self_consumer """ pass def test_delete_self_purchase_order(self): """Test case for delete_self_purchase_order """ pass def test_delete_self_recurrent_payment(self): """Test case for delete_self_recurrent_payment """ pass def test_delete_user(self): """Test case for delete_user """ pass def test_deprovision_self_addon_by_id(self): """Test case for deprovision_self_addon_by_id """ pass def test_edit_self_application_by_app_id(self): """Test case for edit_self_application_by_app_id """ pass def test_edit_self_application_env_by_app_id(self): """Test case for edit_self_application_env_by_app_id """ pass def test_edit_self_application_env_by_app_id_and_env_name(self): """Test case for edit_self_application_env_by_app_id_and_env_name """ pass def test_edit_user(self): """Test case for edit_user """ pass def test_fav_mfa(self): """Test case for fav_mfa """ pass def test_get_addon_sso_data(self): """Test case for get_addon_sso_data """ pass def test_get_application_deployment(self): """Test case for get_application_deployment """ pass def test_get_application_deployments(self): """Test case for get_application_deployments """ pass def test_get_backup_codes(self): """Test case for get_backup_codes """ pass def test_get_confirmation_email(self): """Test case for get_confirmation_email """ pass def test_get_consumptions(self): """Test case for get_consumptions """ pass def test_get_email_addresses(self): """Test case for get_email_addresses """ pass def test_get_id(self): """Test case for get_id """ pass def test_get_self_addon_by_id(self): """Test case for get_self_addon_by_id """ pass def test_get_self_addon_env_by_addon_id(self): """Test case for get_self_addon_env_by_addon_id """ pass def test_get_self_addon_tags_by_addon_id(self): """Test case for get_self_addon_tags_by_addon_id """ pass def test_get_self_addons(self): """Test case for get_self_addons """ pass def test_get_self_addons_linked_to_application_by_app_id(self): """Test case for get_self_addons_linked_to_application_by_app_id """ pass def test_get_self_amount(self): """Test case for get_self_amount """ pass def test_get_self_application_branches_by_app_id(self): """Test case for get_self_application_branches_by_app_id """ pass def test_get_self_application_by_app_id(self): """Test case for get_self_application_by_app_id """ pass def test_get_self_application_dependencies_by_app_id(self): """Test case for get_self_application_dependencies_by_app_id """ pass def test_get_self_application_dependencies_env_by_app_id(self): """Test case for get_self_application_dependencies_env_by_app_id """ pass def test_get_self_application_dependents(self): """Test case for get_self_application_dependents """ pass def test_get_self_application_env_by_app_id(self): """Test case for get_self_application_env_by_app_id """ pass def test_get_self_application_instance_by_app_and_instance_id(self): """Test case for get_self_application_instance_by_app_and_instance_id """ pass def test_get_self_application_instances_by_app_id(self): """Test case for get_self_application_instances_by_app_id """ pass def test_get_self_application_tags_by_app_id(self): """Test case for get_self_application_tags_by_app_id """ pass def test_get_self_applications(self): """Test case for get_self_applications """ pass def test_get_self_applications_linked_to_addon_by_addon_id(self): """Test case for get_self_applications_linked_to_addon_by_addon_id """ pass def test_get_self_cli_tokens(self): """Test case for get_self_cli_tokens """ pass def test_get_self_consumer(self): """Test case for get_self_consumer """ pass def test_get_self_consumer_secret(self): """Test case for get_self_consumer_secret """ pass def test_get_self_consumers(self): """Test case for get_self_consumers """ pass def test_get_self_default_method(self): """Test case for get_self_default_method """ pass def test_get_self_env_of_addons_linked_to_application_by_app_id(self): """Test case for get_self_env_of_addons_linked_to_application_by_app_id """ pass def test_get_self_exposed_env_by_app_id(self): """Test case for get_self_exposed_env_by_app_id """ pass def test_get_self_favourite_vhost_by_app_id(self): """Test case for get_self_favourite_vhost_by_app_id """ pass def test_get_self_instances_for_all_apps(self): """Test case for get_self_instances_for_all_apps """ pass def test_get_self_invoice_by_id(self): """Test case for get_self_invoice_by_id """ pass def test_get_self_invoices(self): """Test case for get_self_invoices """ pass def test_get_self_monthly_invoice(self): """Test case for get_self_monthly_invoice """ pass def test_get_self_payment_info(self): """Test case for get_self_payment_info """ pass def test_get_self_payment_methods(self): """Test case for get_self_payment_methods """ pass def test_get_self_pdf_invoice_by_id(self): """Test case for get_self_pdf_invoice_by_id """ pass def test_get_self_price_with_tax(self): """Test case for get_self_price_with_tax """ pass def test_get_self_recurrent_payment(self): """Test case for get_self_recurrent_payment """ pass def test_get_self_stripe_token(self): """Test case for get_self_stripe_token """ pass def test_get_self_tokens(self): """Test case for get_self_tokens """ pass def test_get_self_vhost_by_app_id(self): """Test case for get_self_vhost_by_app_id """ pass def test_get_ssh_keys(self): """Test case for get_ssh_keys """ pass def test_get_summary(self): """Test case for get_summary """ pass def test_get_user(self): """Test case for get_user """ pass def test_link_self_addon_to_application_by_app_id(self): """Test case for link_self_addon_to_application_by_app_id """ pass def test_mark_self_favourite_vhost_by_app_id(self): """Test case for mark_self_favourite_vhost_by_app_id """ pass def test_preorder_self_addon(self): """Test case for preorder_self_addon """ pass def test_provision_self_addon(self): """Test case for provision_self_addon """ pass def test_redeploy_self_application_by_app_id(self): """Test case for redeploy_self_application_by_app_id """ pass def test_remove_email_address(self): """Test case for remove_email_address """ pass def test_remove_self_application_env_by_app_id_and_env_name(self): """Test case for remove_self_application_env_by_app_id_and_env_name """ pass def test_remove_self_vhost_by_app_id(self): """Test case for remove_self_vhost_by_app_id """ pass def test_remove_ssh_key(self): """Test case for remove_ssh_key """ pass def test_rename_addon(self): """Test case for rename_addon """ pass def test_revoke_all_tokens(self): """Test case for revoke_all_tokens """ pass def test_revoke_token(self): """Test case for revoke_token """ pass def test_set_self_application_branch_by_app_id(self): """Test case for set_self_application_branch_by_app_id """ pass def test_set_self_build_instance_flavor_by_app_id(self): """Test case for set_self_build_instance_flavor_by_app_id """ pass def test_set_self_default_method(self): """Test case for set_self_default_method """ pass def test_set_self_max_credits_per_month(self): """Test case for set_self_max_credits_per_month """ pass def test_set_user_avatar_from_file(self): """Test case for set_user_avatar_from_file """ pass def test_undeploy_self_application_by_app_id(self): """Test case for undeploy_self_application_by_app_id """ pass def test_unlink_selfddon_from_application_by_app_and_addon_id(self): """Test case for unlink_selfddon_from_application_by_app_and_addon_id """ pass def test_unmark_self_favourite_vhost_by_app_id(self): """Test case for unmark_self_favourite_vhost_by_app_id """ pass def test_update_self_consumer(self): """Test case for update_self_consumer """ pass def test_update_self_exposed_env_by_app_id(self): """Test case for update_self_exposed_env_by_app_id """ pass def test_validate_email(self): """Test case for validate_email """ pass def test_validate_mfa(self): """Test case for validate_mfa """ pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,279
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_organisation_member_view.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import sys import unittest import openapi_client from openapi_client.model.organisation_member_user_view import OrganisationMemberUserView globals()['OrganisationMemberUserView'] = OrganisationMemberUserView from openapi_client.model.organisation_member_view import OrganisationMemberView class TestOrganisationMemberView(unittest.TestCase): """OrganisationMemberView unit test stubs""" def setUp(self): pass def tearDown(self): pass def testOrganisationMemberView(self): """Test OrganisationMemberView""" # FIXME: construct object with mandatory attributes with example values # model = OrganisationMemberView() # noqa: E501 pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,280
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_organisation_summary.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import sys import unittest import openapi_client from openapi_client.model.addon_summary import AddonSummary from openapi_client.model.application_summary import ApplicationSummary from openapi_client.model.o_auth1_consumer_summary import OAuth1ConsumerSummary from openapi_client.model.provider_summary import ProviderSummary globals()['AddonSummary'] = AddonSummary globals()['ApplicationSummary'] = ApplicationSummary globals()['OAuth1ConsumerSummary'] = OAuth1ConsumerSummary globals()['ProviderSummary'] = ProviderSummary from openapi_client.model.organisation_summary import OrganisationSummary class TestOrganisationSummary(unittest.TestCase): """OrganisationSummary unit test stubs""" def setUp(self): pass def tearDown(self): pass def testOrganisationSummary(self): """Test OrganisationSummary""" # FIXME: construct object with mandatory attributes with example values # model = OrganisationSummary() # noqa: E501 pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,281
krezreb/openapi-client-clevercloud
refs/heads/master
/openapi_client/api/user_api.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from openapi_client.api_client import ApiClient, Endpoint as _Endpoint from openapi_client.model_utils import ( # noqa: F401 check_allowed_values, check_validations, date, datetime, file_type, none_type, validate_and_convert_types ) from openapi_client.model.application_view import ApplicationView from openapi_client.model.end_of_invoice_response import EndOfInvoiceResponse from openapi_client.model.github_webhook_payload import GithubWebhookPayload from openapi_client.model.message import Message from openapi_client.model.o_auth_application_view import OAuthApplicationView from openapi_client.model.o_auth_transaction_view import OAuthTransactionView from openapi_client.model.payment_data import PaymentData from openapi_client.model.ssh_key_view import SshKeyView from openapi_client.model.user_view import UserView class UserApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __ask_for_password_reset_via_form( self, **kwargs ): """ask_for_password_reset_via_form # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.ask_for_password_reset_via_form(async_req=True) >>> result = thread.get() Keyword Args: login (str): [optional] drop_tokens (str): [optional] clever_flavor (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.ask_for_password_reset_via_form = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/password_forgotten', 'operation_id': 'ask_for_password_reset_via_form', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'login', 'drop_tokens', 'clever_flavor', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'login': (str,), 'drop_tokens': (str,), 'clever_flavor': (str,), }, 'attribute_map': { 'login': 'login', 'drop_tokens': 'drop_tokens', 'clever_flavor': 'clever_flavor', }, 'location_map': { 'login': 'form', 'drop_tokens': 'form', 'clever_flavor': 'form', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'text/html' ], 'content_type': [ 'application/x-www-form-urlencoded' ] }, api_client=api_client, callable=__ask_for_password_reset_via_form ) def __authorize_paypal_transaction( self, bid, payment_data, **kwargs ): """authorize_paypal_transaction # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.authorize_paypal_transaction(bid, payment_data, async_req=True) >>> result = thread.get() Args: bid (str): payment_data (PaymentData): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['bid'] = \ bid kwargs['payment_data'] = \ payment_data return self.call_with_http_info(**kwargs) self.authorize_paypal_transaction = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/invoice/external/paypal/{bid}', 'operation_id': 'authorize_paypal_transaction', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'bid', 'payment_data', ], 'required': [ 'bid', 'payment_data', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'bid': (str,), 'payment_data': (PaymentData,), }, 'attribute_map': { 'bid': 'bid', }, 'location_map': { 'bid': 'path', 'payment_data': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__authorize_paypal_transaction ) def __cancel_paypal_transaction( self, bid, **kwargs ): """cancel_paypal_transaction # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.cancel_paypal_transaction(bid, async_req=True) >>> result = thread.get() Args: bid (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['bid'] = \ bid return self.call_with_http_info(**kwargs) self.cancel_paypal_transaction = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/invoice/external/paypal/{bid}', 'operation_id': 'cancel_paypal_transaction', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ 'bid', ], 'required': [ 'bid', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'bid': (str,), }, 'attribute_map': { 'bid': 'bid', }, 'location_map': { 'bid': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__cancel_paypal_transaction ) def __confirm_password_reset_request( self, key, **kwargs ): """confirm_password_reset_request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.confirm_password_reset_request(key, async_req=True) >>> result = thread.get() Args: key (str): Keyword Args: clever_flavor (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['key'] = \ key return self.call_with_http_info(**kwargs) self.confirm_password_reset_request = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/password_forgotten/{key}', 'operation_id': 'confirm_password_reset_request', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'key', 'clever_flavor', ], 'required': [ 'key', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'key': (str,), 'clever_flavor': (str,), }, 'attribute_map': { 'key': 'key', 'clever_flavor': 'clever_flavor', }, 'location_map': { 'key': 'path', 'clever_flavor': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'text/html' ], 'content_type': [], }, api_client=api_client, callable=__confirm_password_reset_request ) def __create_user_from_form( self, **kwargs ): """create_user_from_form # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_user_from_form(async_req=True) >>> result = thread.get() Keyword Args: invitation_key (str): [optional] addon_beta_invitation_key (str): [optional] email (str): [optional] _pass (str): [optional] url_next (str): [optional] terms (str): [optional] subscription_source (str): [optional] clever_flavor (str): [optional] oauth_token (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.create_user_from_form = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/users', 'operation_id': 'create_user_from_form', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'invitation_key', 'addon_beta_invitation_key', 'email', '_pass', 'url_next', 'terms', 'subscription_source', 'clever_flavor', 'oauth_token', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'invitation_key': (str,), 'addon_beta_invitation_key': (str,), 'email': (str,), '_pass': (str,), 'url_next': (str,), 'terms': (str,), 'subscription_source': (str,), 'clever_flavor': (str,), 'oauth_token': (str,), }, 'attribute_map': { 'invitation_key': 'invitationKey', 'addon_beta_invitation_key': 'addonBetaInvitationKey', 'email': 'email', '_pass': 'pass', 'url_next': 'url_next', 'terms': 'terms', 'subscription_source': 'subscription_source', 'clever_flavor': 'clever_flavor', 'oauth_token': 'oauth_token', }, 'location_map': { 'invitation_key': 'form', 'addon_beta_invitation_key': 'form', 'email': 'form', '_pass': 'form', 'url_next': 'form', 'terms': 'form', 'subscription_source': 'form', 'clever_flavor': 'form', 'oauth_token': 'form', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/x-www-form-urlencoded' ] }, api_client=api_client, callable=__create_user_from_form ) def __delete_github_link( self, **kwargs ): """delete_github_link # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_github_link(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.delete_github_link = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/github/link', 'operation_id': 'delete_github_link', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__delete_github_link ) def __finsih_github_signup( self, **kwargs ): """finsih_github_signup # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.finsih_github_signup(async_req=True) >>> result = thread.get() Keyword Args: transaction_id (str): [optional] name (str): [optional] other_id (str): [optional] other_email (str): [optional] password (str): [optional] auto_link (str): [optional] terms (str): [optional] invitation_key (str): [optional] mfa_kind (str): [optional] mfa_attempt (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.finsih_github_signup = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/github/signup', 'operation_id': 'finsih_github_signup', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'transaction_id', 'name', 'other_id', 'other_email', 'password', 'auto_link', 'terms', 'invitation_key', 'mfa_kind', 'mfa_attempt', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'transaction_id': (str,), 'name': (str,), 'other_id': (str,), 'other_email': (str,), 'password': (str,), 'auto_link': (str,), 'terms': (str,), 'invitation_key': (str,), 'mfa_kind': (str,), 'mfa_attempt': (str,), }, 'attribute_map': { 'transaction_id': 'transactionId', 'name': 'name', 'other_id': 'otherId', 'other_email': 'otherEmail', 'password': 'password', 'auto_link': 'autoLink', 'terms': 'terms', 'invitation_key': 'invitationKey', 'mfa_kind': 'mfa_kind', 'mfa_attempt': 'mfa_attempt', }, 'location_map': { 'transaction_id': 'form', 'name': 'form', 'other_id': 'form', 'other_email': 'form', 'password': 'form', 'auto_link': 'form', 'terms': 'form', 'invitation_key': 'form', 'mfa_kind': 'form', 'mfa_attempt': 'form', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/x-www-form-urlencoded' ] }, api_client=api_client, callable=__finsih_github_signup ) def __get_applications( self, id, **kwargs ): """get_applications # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_applications(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [ApplicationView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_applications = _Endpoint( settings={ 'response_type': ([ApplicationView],), 'auth': [], 'endpoint_path': '/users/{id}/applications', 'operation_id': 'get_applications', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_applications ) def __get_env( self, app_id, **kwargs ): """get_env # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_env(app_id, async_req=True) >>> result = thread.get() Args: app_id (str): Keyword Args: token (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id return self.call_with_http_info(**kwargs) self.get_env = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/application/{appId}/environment', 'operation_id': 'get_env', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'app_id', 'token', ], 'required': [ 'app_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'token': (str,), }, 'attribute_map': { 'app_id': 'appId', 'token': 'token', }, 'location_map': { 'app_id': 'path', 'token': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_env ) def __get_git_info( self, user_id, **kwargs ): """get_git_info # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_git_info(user_id, async_req=True) >>> result = thread.get() Args: user_id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['user_id'] = \ user_id return self.call_with_http_info(**kwargs) self.get_git_info = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/users/{userId}/git-info', 'operation_id': 'get_git_info', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'user_id', ], 'required': [ 'user_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'user_id': (str,), }, 'attribute_map': { 'user_id': 'userId', }, 'location_map': { 'user_id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_git_info ) def __get_github( self, **kwargs ): """get_github # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_github(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: OAuthTransactionView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_github = _Endpoint( settings={ 'response_type': (OAuthTransactionView,), 'auth': [], 'endpoint_path': '/github', 'operation_id': 'get_github', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_github ) def __get_github_applications( self, **kwargs ): """get_github_applications # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_github_applications(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [OAuthApplicationView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_github_applications = _Endpoint( settings={ 'response_type': ([OAuthApplicationView],), 'auth': [], 'endpoint_path': '/github/applications', 'operation_id': 'get_github_applications', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_github_applications ) def __get_github_callback( self, **kwargs ): """get_github_callback # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_github_callback(async_req=True) >>> result = thread.get() Keyword Args: cc_o_auth_data (str): [optional] code (str): [optional] state (str): [optional] error (str): [optional] error_description (str): [optional] error_uri (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_github_callback = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/github/callback', 'operation_id': 'get_github_callback', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'cc_o_auth_data', 'code', 'state', 'error', 'error_description', 'error_uri', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'cc_o_auth_data': (str,), 'code': (str,), 'state': (str,), 'error': (str,), 'error_description': (str,), 'error_uri': (str,), }, 'attribute_map': { 'cc_o_auth_data': 'CcOAuthData', 'code': 'code', 'state': 'state', 'error': 'error', 'error_description': 'error_description', 'error_uri': 'error_uri', }, 'location_map': { 'cc_o_auth_data': 'cookie', 'code': 'query', 'state': 'query', 'error': 'query', 'error_description': 'query', 'error_uri': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_github_callback ) def __get_github_emails( self, **kwargs ): """get_github_emails # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_github_emails(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [str] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_github_emails = _Endpoint( settings={ 'response_type': ([str],), 'auth': [], 'endpoint_path': '/github/emails', 'operation_id': 'get_github_emails', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_github_emails ) def __get_github_keys( self, **kwargs ): """get_github_keys # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_github_keys(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [SshKeyView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_github_keys = _Endpoint( settings={ 'response_type': ([SshKeyView],), 'auth': [], 'endpoint_path': '/github/keys', 'operation_id': 'get_github_keys', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_github_keys ) def __get_github_link( self, **kwargs ): """get_github_link # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_github_link(async_req=True) >>> result = thread.get() Keyword Args: transaction_id (str): [optional] redirect_url (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_github_link = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/github/link', 'operation_id': 'get_github_link', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'transaction_id', 'redirect_url', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'transaction_id': (str,), 'redirect_url': (str,), }, 'attribute_map': { 'transaction_id': 'transactionId', 'redirect_url': 'redirectUrl', }, 'location_map': { 'transaction_id': 'query', 'redirect_url': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_github_link ) def __get_github_login( self, **kwargs ): """get_github_login # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_github_login(async_req=True) >>> result = thread.get() Keyword Args: redirect_url (str): [optional] from_authorize (str): [optional] cli_token (str): [optional] clever_flavor (str): [optional] oauth_token (str): [optional] invitation_key (str): [optional] subscription_source (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_github_login = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/github/login', 'operation_id': 'get_github_login', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'redirect_url', 'from_authorize', 'cli_token', 'clever_flavor', 'oauth_token', 'invitation_key', 'subscription_source', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'redirect_url': (str,), 'from_authorize': (str,), 'cli_token': (str,), 'clever_flavor': (str,), 'oauth_token': (str,), 'invitation_key': (str,), 'subscription_source': (str,), }, 'attribute_map': { 'redirect_url': 'redirectUrl', 'from_authorize': 'fromAuthorize', 'cli_token': 'cli_token', 'clever_flavor': 'clever_flavor', 'oauth_token': 'oauth_token', 'invitation_key': 'invitationKey', 'subscription_source': 'subscriptionSource', }, 'location_map': { 'redirect_url': 'query', 'from_authorize': 'query', 'cli_token': 'query', 'clever_flavor': 'query', 'oauth_token': 'query', 'invitation_key': 'query', 'subscription_source': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_github_login ) def __get_github_username( self, **kwargs ): """get_github_username # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_github_username(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_github_username = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/github/username', 'operation_id': 'get_github_username', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_github_username ) def __get_login_form( self, **kwargs ): """get_login_form # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_login_form(async_req=True) >>> result = thread.get() Keyword Args: secondary_email_key (str): [optional] deletion_key (str): [optional] from_authorize (str): [optional] cli_token (str): [optional] clever_flavor (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_login_form = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/session/login', 'operation_id': 'get_login_form', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'secondary_email_key', 'deletion_key', 'from_authorize', 'cli_token', 'clever_flavor', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'secondary_email_key': (str,), 'deletion_key': (str,), 'from_authorize': (str,), 'cli_token': (str,), 'clever_flavor': (str,), }, 'attribute_map': { 'secondary_email_key': 'secondaryEmailKey', 'deletion_key': 'deletionKey', 'from_authorize': 'fromAuthorize', 'cli_token': 'cli_token', 'clever_flavor': 'clever_flavor', }, 'location_map': { 'secondary_email_key': 'query', 'deletion_key': 'query', 'from_authorize': 'query', 'cli_token': 'query', 'clever_flavor': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'text/html' ], 'content_type': [], }, api_client=api_client, callable=__get_login_form ) def __get_login_form1( self, **kwargs ): """get_login_form1 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_login_form1(async_req=True) >>> result = thread.get() Keyword Args: secondary_email_key (str): [optional] deletion_key (str): [optional] from_authorize (str): [optional] cli_token (str): [optional] clever_flavor (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_login_form1 = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/sessions/login', 'operation_id': 'get_login_form1', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'secondary_email_key', 'deletion_key', 'from_authorize', 'cli_token', 'clever_flavor', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'secondary_email_key': (str,), 'deletion_key': (str,), 'from_authorize': (str,), 'cli_token': (str,), 'clever_flavor': (str,), }, 'attribute_map': { 'secondary_email_key': 'secondaryEmailKey', 'deletion_key': 'deletionKey', 'from_authorize': 'fromAuthorize', 'cli_token': 'cli_token', 'clever_flavor': 'clever_flavor', }, 'location_map': { 'secondary_email_key': 'query', 'deletion_key': 'query', 'from_authorize': 'query', 'cli_token': 'query', 'clever_flavor': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'text/html' ], 'content_type': [], }, api_client=api_client, callable=__get_login_form1 ) def __get_password_forgotten_form( self, **kwargs ): """get_password_forgotten_form # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_password_forgotten_form(async_req=True) >>> result = thread.get() Keyword Args: clever_flavor (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_password_forgotten_form = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/password_forgotten', 'operation_id': 'get_password_forgotten_form', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'clever_flavor', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'clever_flavor': (str,), }, 'attribute_map': { 'clever_flavor': 'clever_flavor', }, 'location_map': { 'clever_flavor': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'text/html' ], 'content_type': [], }, api_client=api_client, callable=__get_password_forgotten_form ) def __get_signup_form( self, **kwargs ): """get_signup_form # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_signup_form(async_req=True) >>> result = thread.get() Keyword Args: invitation_key (str): [optional] url_next (str): [optional] clever_flavor (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_signup_form = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/session/signup', 'operation_id': 'get_signup_form', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'invitation_key', 'url_next', 'clever_flavor', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'invitation_key': (str,), 'url_next': (str,), 'clever_flavor': (str,), }, 'attribute_map': { 'invitation_key': 'invitationKey', 'url_next': 'url_next', 'clever_flavor': 'clever_flavor', }, 'location_map': { 'invitation_key': 'query', 'url_next': 'query', 'clever_flavor': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'text/html' ], 'content_type': [], }, api_client=api_client, callable=__get_signup_form ) def __get_signup_form1( self, **kwargs ): """get_signup_form1 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_signup_form1(async_req=True) >>> result = thread.get() Keyword Args: invitation_key (str): [optional] url_next (str): [optional] clever_flavor (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_signup_form1 = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/sessions/signup', 'operation_id': 'get_signup_form1', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'invitation_key', 'url_next', 'clever_flavor', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'invitation_key': (str,), 'url_next': (str,), 'clever_flavor': (str,), }, 'attribute_map': { 'invitation_key': 'invitationKey', 'url_next': 'url_next', 'clever_flavor': 'clever_flavor', }, 'location_map': { 'invitation_key': 'query', 'url_next': 'query', 'clever_flavor': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'text/html' ], 'content_type': [], }, api_client=api_client, callable=__get_signup_form1 ) def __get_user_by_id( self, id, **kwargs ): """get_user_by_id # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_user_by_id(id, async_req=True) >>> result = thread.get() Args: id (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: UserView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['id'] = \ id return self.call_with_http_info(**kwargs) self.get_user_by_id = _Endpoint( settings={ 'response_type': (UserView,), 'auth': [], 'endpoint_path': '/users/{id}', 'operation_id': 'get_user_by_id', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', ], 'required': [ 'id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'id': (str,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_user_by_id ) def __github_signup( self, **kwargs ): """github_signup # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.github_signup(async_req=True) >>> result = thread.get() Keyword Args: redirect_url (str): [optional] from_authorize (str): [optional] cli_token (str): [optional] clever_flavor (str): [optional] oauth_token (str): [optional] invitation_key (str): [optional] subscription_source (str): [optional] terms (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.github_signup = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/github/signup', 'operation_id': 'github_signup', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'redirect_url', 'from_authorize', 'cli_token', 'clever_flavor', 'oauth_token', 'invitation_key', 'subscription_source', 'terms', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'redirect_url': (str,), 'from_authorize': (str,), 'cli_token': (str,), 'clever_flavor': (str,), 'oauth_token': (str,), 'invitation_key': (str,), 'subscription_source': (str,), 'terms': (str,), }, 'attribute_map': { 'redirect_url': 'redirectUrl', 'from_authorize': 'fromAuthorize', 'cli_token': 'cli_token', 'clever_flavor': 'clever_flavor', 'oauth_token': 'oauth_token', 'invitation_key': 'invitationKey', 'subscription_source': 'subscriptionSource', 'terms': 'terms', }, 'location_map': { 'redirect_url': 'query', 'from_authorize': 'query', 'cli_token': 'query', 'clever_flavor': 'query', 'oauth_token': 'query', 'invitation_key': 'query', 'subscription_source': 'query', 'terms': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__github_signup ) def __login( self, **kwargs ): """login # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.login(async_req=True) >>> result = thread.get() Keyword Args: email (str): [optional] _pass (str): [optional] from_authorize (str): [optional] cli_token (str): [optional] clever_flavor (str): [optional] oauth_token (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.login = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/session/login', 'operation_id': 'login', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'email', '_pass', 'from_authorize', 'cli_token', 'clever_flavor', 'oauth_token', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'email': (str,), '_pass': (str,), 'from_authorize': (str,), 'cli_token': (str,), 'clever_flavor': (str,), 'oauth_token': (str,), }, 'attribute_map': { 'email': 'email', '_pass': 'pass', 'from_authorize': 'from_authorize', 'cli_token': 'cli_token', 'clever_flavor': 'clever_flavor', 'oauth_token': 'oauth_token', }, 'location_map': { 'email': 'form', '_pass': 'form', 'from_authorize': 'form', 'cli_token': 'form', 'clever_flavor': 'form', 'oauth_token': 'form', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'text/html' ], 'content_type': [ 'application/x-www-form-urlencoded' ] }, api_client=api_client, callable=__login ) def __login1( self, **kwargs ): """login1 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.login1(async_req=True) >>> result = thread.get() Keyword Args: email (str): [optional] _pass (str): [optional] from_authorize (str): [optional] cli_token (str): [optional] clever_flavor (str): [optional] oauth_token (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.login1 = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/sessions/login', 'operation_id': 'login1', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'email', '_pass', 'from_authorize', 'cli_token', 'clever_flavor', 'oauth_token', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'email': (str,), '_pass': (str,), 'from_authorize': (str,), 'cli_token': (str,), 'clever_flavor': (str,), 'oauth_token': (str,), }, 'attribute_map': { 'email': 'email', '_pass': 'pass', 'from_authorize': 'from_authorize', 'cli_token': 'cli_token', 'clever_flavor': 'clever_flavor', 'oauth_token': 'oauth_token', }, 'location_map': { 'email': 'form', '_pass': 'form', 'from_authorize': 'form', 'cli_token': 'form', 'clever_flavor': 'form', 'oauth_token': 'form', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'text/html' ], 'content_type': [ 'application/x-www-form-urlencoded' ] }, api_client=api_client, callable=__login1 ) def __mfa_login( self, **kwargs ): """mfa_login # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mfa_login(async_req=True) >>> result = thread.get() Keyword Args: mfa_kind (str): [optional] mfa_attempt (str): [optional] email (str): [optional] auth_id (str): [optional] from_authorize (str): [optional] cli_token (str): [optional] clever_flavor (str): [optional] oauth_token (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [OAuthApplicationView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.mfa_login = _Endpoint( settings={ 'response_type': ([OAuthApplicationView],), 'auth': [], 'endpoint_path': '/session/mfa_login', 'operation_id': 'mfa_login', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'mfa_kind', 'mfa_attempt', 'email', 'auth_id', 'from_authorize', 'cli_token', 'clever_flavor', 'oauth_token', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'mfa_kind': (str,), 'mfa_attempt': (str,), 'email': (str,), 'auth_id': (str,), 'from_authorize': (str,), 'cli_token': (str,), 'clever_flavor': (str,), 'oauth_token': (str,), }, 'attribute_map': { 'mfa_kind': 'mfa_kind', 'mfa_attempt': 'mfa_attempt', 'email': 'email', 'auth_id': 'auth_id', 'from_authorize': 'from_authorize', 'cli_token': 'cli_token', 'clever_flavor': 'clever_flavor', 'oauth_token': 'oauth_token', }, 'location_map': { 'mfa_kind': 'form', 'mfa_attempt': 'form', 'email': 'form', 'auth_id': 'form', 'from_authorize': 'form', 'cli_token': 'form', 'clever_flavor': 'form', 'oauth_token': 'form', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'text/html' ], 'content_type': [ 'application/x-www-form-urlencoded' ] }, api_client=api_client, callable=__mfa_login ) def __mfa_login1( self, **kwargs ): """mfa_login1 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.mfa_login1(async_req=True) >>> result = thread.get() Keyword Args: mfa_kind (str): [optional] mfa_attempt (str): [optional] email (str): [optional] auth_id (str): [optional] from_authorize (str): [optional] cli_token (str): [optional] clever_flavor (str): [optional] oauth_token (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [OAuthApplicationView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.mfa_login1 = _Endpoint( settings={ 'response_type': ([OAuthApplicationView],), 'auth': [], 'endpoint_path': '/sessions/mfa_login', 'operation_id': 'mfa_login1', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'mfa_kind', 'mfa_attempt', 'email', 'auth_id', 'from_authorize', 'cli_token', 'clever_flavor', 'oauth_token', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'mfa_kind': (str,), 'mfa_attempt': (str,), 'email': (str,), 'auth_id': (str,), 'from_authorize': (str,), 'cli_token': (str,), 'clever_flavor': (str,), 'oauth_token': (str,), }, 'attribute_map': { 'mfa_kind': 'mfa_kind', 'mfa_attempt': 'mfa_attempt', 'email': 'email', 'auth_id': 'auth_id', 'from_authorize': 'from_authorize', 'cli_token': 'cli_token', 'clever_flavor': 'clever_flavor', 'oauth_token': 'oauth_token', }, 'location_map': { 'mfa_kind': 'form', 'mfa_attempt': 'form', 'email': 'form', 'auth_id': 'form', 'from_authorize': 'form', 'cli_token': 'form', 'clever_flavor': 'form', 'oauth_token': 'form', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'text/html' ], 'content_type': [ 'application/x-www-form-urlencoded' ] }, api_client=api_client, callable=__mfa_login1 ) def __post_github_redeploy( self, github_webhook_payload, **kwargs ): """post_github_redeploy # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_github_redeploy(github_webhook_payload, async_req=True) >>> result = thread.get() Args: github_webhook_payload (GithubWebhookPayload): Keyword Args: user_agent (str): [optional] x_github_event (str): [optional] x_hub_signature (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['github_webhook_payload'] = \ github_webhook_payload return self.call_with_http_info(**kwargs) self.post_github_redeploy = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/github/redeploy', 'operation_id': 'post_github_redeploy', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'github_webhook_payload', 'user_agent', 'x_github_event', 'x_hub_signature', ], 'required': [ 'github_webhook_payload', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'github_webhook_payload': (GithubWebhookPayload,), 'user_agent': (str,), 'x_github_event': (str,), 'x_hub_signature': (str,), }, 'attribute_map': { 'user_agent': 'User-Agent', 'x_github_event': 'X-Github-Event', 'x_hub_signature': 'X-Hub-Signature', }, 'location_map': { 'github_webhook_payload': 'body', 'user_agent': 'header', 'x_github_event': 'header', 'x_hub_signature': 'header', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__post_github_redeploy ) def __reset_password_forgotten( self, key, **kwargs ): """reset_password_forgotten # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.reset_password_forgotten(key, async_req=True) >>> result = thread.get() Args: key (str): Keyword Args: _pass (str): [optional] pass2 (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: str If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['key'] = \ key return self.call_with_http_info(**kwargs) self.reset_password_forgotten = _Endpoint( settings={ 'response_type': (str,), 'auth': [], 'endpoint_path': '/password_forgotten/{key}', 'operation_id': 'reset_password_forgotten', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'key', '_pass', 'pass2', ], 'required': [ 'key', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'key': (str,), '_pass': (str,), 'pass2': (str,), }, 'attribute_map': { 'key': 'key', '_pass': 'pass', 'pass2': 'pass2', }, 'location_map': { 'key': 'path', '_pass': 'form', 'pass2': 'form', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'text/html' ], 'content_type': [ 'application/x-www-form-urlencoded' ] }, api_client=api_client, callable=__reset_password_forgotten ) def __update_env( self, app_id, body, **kwargs ): """update_env # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_env(app_id, body, async_req=True) >>> result = thread.get() Args: app_id (str): body (str): Keyword Args: token (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['app_id'] = \ app_id kwargs['body'] = \ body return self.call_with_http_info(**kwargs) self.update_env = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/application/{appId}/environment', 'operation_id': 'update_env', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'app_id', 'body', 'token', ], 'required': [ 'app_id', 'body', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'app_id': (str,), 'body': (str,), 'token': (str,), }, 'attribute_map': { 'app_id': 'appId', 'token': 'token', }, 'location_map': { 'app_id': 'path', 'body': 'body', 'token': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__update_env ) def __update_invoice( self, bid, end_of_invoice_response, **kwargs ): """update_invoice # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_invoice(bid, end_of_invoice_response, async_req=True) >>> result = thread.get() Args: bid (str): end_of_invoice_response (EndOfInvoiceResponse): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['bid'] = \ bid kwargs['end_of_invoice_response'] = \ end_of_invoice_response return self.call_with_http_info(**kwargs) self.update_invoice = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/invoice/external/{bid}', 'operation_id': 'update_invoice', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'bid', 'end_of_invoice_response', ], 'required': [ 'bid', 'end_of_invoice_response', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'bid': (str,), 'end_of_invoice_response': (EndOfInvoiceResponse,), }, 'attribute_map': { 'bid': 'bid', }, 'location_map': { 'bid': 'path', 'end_of_invoice_response': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__update_invoice )
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,282
krezreb/openapi-client-clevercloud
refs/heads/master
/test/test_payment_api.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import unittest import openapi_client from openapi_client.api.payment_api import PaymentApi # noqa: E501 class TestPaymentApi(unittest.TestCase): """PaymentApi unit test stubs""" def setUp(self): self.api = PaymentApi() # noqa: E501 def tearDown(self): pass def test_check_vat(self): """Test case for check_vat """ pass def test_end_payment_with_stripe(self): """Test case for end_payment_with_stripe """ pass def test_get_available_payment_providers(self): """Test case for get_available_payment_providers """ pass def test_get_coupon(self): """Test case for get_coupon """ pass def test_get_invoice_status_button(self): """Test case for get_invoice_status_button """ pass def test_get_stripe_token(self): """Test case for get_stripe_token """ pass def test_stripe_sepa_webhook(self): """Test case for stripe_sepa_webhook """ pass def test_update_stripe_payment(self): """Test case for update_stripe_payment """ pass def test_validate(self): """Test case for validate """ pass if __name__ == '__main__': unittest.main()
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,283
krezreb/openapi-client-clevercloud
refs/heads/master
/openapi_client/api/payment_api.py
""" Clever-Cloud API Public API for managing Clever-Cloud data and products # noqa: E501 The version of the OpenAPI document: 1.0.1 Contact: support@clever-cloud.com Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from openapi_client.api_client import ApiClient, Endpoint as _Endpoint from openapi_client.model_utils import ( # noqa: F401 check_allowed_values, check_validations, date, datetime, file_type, none_type, validate_and_convert_types ) from openapi_client.model.braintree_token import BraintreeToken from openapi_client.model.coupon_view import CouponView from openapi_client.model.invoice_rendering import InvoiceRendering from openapi_client.model.message import Message from openapi_client.model.payment_data import PaymentData from openapi_client.model.payment_provider_view import PaymentProviderView from openapi_client.model.setup_intent_view import SetupIntentView from openapi_client.model.stripe_confirmation_error_message import StripeConfirmationErrorMessage from openapi_client.model.vat_result import VatResult class PaymentApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def __check_vat( self, **kwargs ): """check_vat # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.check_vat(async_req=True) >>> result = thread.get() Keyword Args: country (str): [optional] vat (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: VatResult If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.check_vat = _Endpoint( settings={ 'response_type': (VatResult,), 'auth': [], 'endpoint_path': '/vat_check', 'operation_id': 'check_vat', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'country', 'vat', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'country': (str,), 'vat': (str,), }, 'attribute_map': { 'country': 'country', 'vat': 'vat', }, 'location_map': { 'country': 'query', 'vat': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__check_vat ) def __end_payment_with_stripe( self, bid, payment_data, **kwargs ): """end_payment_with_stripe # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.end_payment_with_stripe(bid, payment_data, async_req=True) >>> result = thread.get() Args: bid (str): payment_data (PaymentData): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: InvoiceRendering If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['bid'] = \ bid kwargs['payment_data'] = \ payment_data return self.call_with_http_info(**kwargs) self.end_payment_with_stripe = _Endpoint( settings={ 'response_type': (InvoiceRendering,), 'auth': [], 'endpoint_path': '/payments/{bid}/end/stripe', 'operation_id': 'end_payment_with_stripe', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'bid', 'payment_data', ], 'required': [ 'bid', 'payment_data', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'bid': (str,), 'payment_data': (PaymentData,), }, 'attribute_map': { 'bid': 'bid', }, 'location_map': { 'bid': 'path', 'payment_data': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__end_payment_with_stripe ) def __get_available_payment_providers( self, **kwargs ): """get_available_payment_providers # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_available_payment_providers(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [PaymentProviderView] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_available_payment_providers = _Endpoint( settings={ 'response_type': ([PaymentProviderView],), 'auth': [], 'endpoint_path': '/payments/providers', 'operation_id': 'get_available_payment_providers', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_available_payment_providers ) def __get_coupon( self, name, **kwargs ): """get_coupon # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_coupon(name, async_req=True) >>> result = thread.get() Args: name (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: CouponView If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['name'] = \ name return self.call_with_http_info(**kwargs) self.get_coupon = _Endpoint( settings={ 'response_type': (CouponView,), 'auth': [], 'endpoint_path': '/payments/coupons/{name}', 'operation_id': 'get_coupon', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'name', ], 'required': [ 'name', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'name': (str,), }, 'attribute_map': { 'name': 'name', }, 'location_map': { 'name': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_coupon ) def __get_invoice_status_button( self, token, **kwargs ): """get_invoice_status_button # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_invoice_status_button(token, async_req=True) >>> result = thread.get() Args: token (str): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['token'] = \ token return self.call_with_http_info(**kwargs) self.get_invoice_status_button = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/payments/assets/pay_button/{token}/button.png', 'operation_id': 'get_invoice_status_button', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'token', ], 'required': [ 'token', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'token': (str,), }, 'attribute_map': { 'token': 'token', }, 'location_map': { 'token': 'path', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'image/png' ], 'content_type': [], }, api_client=api_client, callable=__get_invoice_status_button ) def __get_stripe_token( self, **kwargs ): """get_stripe_token # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_stripe_token(async_req=True) >>> result = thread.get() Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: BraintreeToken If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.get_stripe_token = _Endpoint( settings={ 'response_type': (BraintreeToken,), 'auth': [], 'endpoint_path': '/payments/tokens/stripe', 'operation_id': 'get_stripe_token', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { }, 'attribute_map': { }, 'location_map': { }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__get_stripe_token ) def __stripe_sepa_webhook( self, **kwargs ): """stripe_sepa_webhook # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.stripe_sepa_webhook(async_req=True) >>> result = thread.get() Keyword Args: stripe_signature (str): [optional] body (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: None If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') return self.call_with_http_info(**kwargs) self.stripe_sepa_webhook = _Endpoint( settings={ 'response_type': None, 'auth': [], 'endpoint_path': '/payments/webhooks/stripe/sepa', 'operation_id': 'stripe_sepa_webhook', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ 'stripe_signature', 'body', ], 'required': [], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'stripe_signature': (str,), 'body': (str,), }, 'attribute_map': { 'stripe_signature': 'Stripe-Signature', }, 'location_map': { 'stripe_signature': 'header', 'body': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__stripe_sepa_webhook ) def __update_stripe_payment( self, bid, setup_intent_view, **kwargs ): """update_stripe_payment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_stripe_payment(bid, setup_intent_view, async_req=True) >>> result = thread.get() Args: bid (str): setup_intent_view (SetupIntentView): Keyword Args: _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: InvoiceRendering If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['bid'] = \ bid kwargs['setup_intent_view'] = \ setup_intent_view return self.call_with_http_info(**kwargs) self.update_stripe_payment = _Endpoint( settings={ 'response_type': (InvoiceRendering,), 'auth': [], 'endpoint_path': '/payments/{bid}/end/stripe', 'operation_id': 'update_stripe_payment', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ 'bid', 'setup_intent_view', ], 'required': [ 'bid', 'setup_intent_view', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'bid': (str,), 'setup_intent_view': (SetupIntentView,), }, 'attribute_map': { 'bid': 'bid', }, 'location_map': { 'bid': 'path', 'setup_intent_view': 'body', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [ 'application/json' ] }, api_client=api_client, callable=__update_stripe_payment ) def __validate( self, key, **kwargs ): """validate # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.validate(key, async_req=True) >>> result = thread.get() Args: key (str): Keyword Args: action (str): [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. _request_timeout (float/tuple): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. Default is None. _check_input_type (bool): specifies if type checking should be done one the data sent to the server. Default is True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: Message If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', False ) kwargs['_return_http_data_only'] = kwargs.get( '_return_http_data_only', True ) kwargs['_preload_content'] = kwargs.get( '_preload_content', True ) kwargs['_request_timeout'] = kwargs.get( '_request_timeout', None ) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_host_index'] = kwargs.get('_host_index') kwargs['key'] = \ key return self.call_with_http_info(**kwargs) self.validate = _Endpoint( settings={ 'response_type': (Message,), 'auth': [], 'endpoint_path': '/validation/vat/{key}', 'operation_id': 'validate', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'key', 'action', ], 'required': [ 'key', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'key': (str,), 'action': (str,), }, 'attribute_map': { 'key': 'key', 'action': 'action', }, 'location_map': { 'key': 'path', 'action': 'query', }, 'collection_format_map': { } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client, callable=__validate )
{"/test/test_products_api.py": ["/openapi_client/api/products_api.py"], "/test/test_auth_api.py": ["/openapi_client/api/auth_api.py"], "/test/test_organisation_api.py": ["/openapi_client/api/organisation_api.py"], "/test/test_user_api.py": ["/openapi_client/api/user_api.py"], "/test/test_self_api.py": ["/openapi_client/api/self_api.py"], "/test/test_payment_api.py": ["/openapi_client/api/payment_api.py"]}
9,284
SuhasKamble/DJEVNT-Django-Project
refs/heads/master
/home/migrations/0003_event_user.py
# Generated by Django 3.0.7 on 2021-04-21 03:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('home', '0002_auto_20210420_2011'), ] operations = [ migrations.AddField( model_name='event', name='user', field=models.CharField(default='', max_length=70), preserve_default=False, ), ]
{"/home/views.py": ["/home/models.py"]}
9,285
SuhasKamble/DJEVNT-Django-Project
refs/heads/master
/home/migrations/0002_auto_20210420_2011.py
# Generated by Django 3.0.7 on 2021-04-20 14:41 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('home', '0001_initial'), ] operations = [ migrations.RenameField( model_name='event', old_name='performer', new_name='performers', ), ]
{"/home/views.py": ["/home/models.py"]}
9,286
SuhasKamble/DJEVNT-Django-Project
refs/heads/master
/home/views.py
from django.shortcuts import render, HttpResponse,redirect from .models import Event from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from django.contrib import messages # Create your views here. def home(request): allEvents = Event.objects.all()[0:4] context = {'allEvents':allEvents} return render(request,'home/index.html',context) def events(request): allEvents = Event.objects.all() context = {'allEvents':allEvents} return render(request,'home/Events.html',context) def addEvent(request): if request.user.is_authenticated: if request.method=="POST": user = request.user.username name = request.POST.get('name') performers = request.POST.get('performers') venue = request.POST.get('venue') address = request.POST.get('address') date = request.POST.get('date') time = request.POST.get('time') image = request.POST.get('image') desc = request.POST.get('desc') newEvent = Event(user=user,name=name,performers=performers,venue=venue,image=image,date=date,time=time,desc=desc) newEvent.save() messages.success(request,"You have successfully added event ") return redirect('/') return render(request,'home/AddEvent.html') else: return HttpResponse("User is not authentical") def details(request,slug): event = Event.objects.filter(name=slug).first() context = {'event':event} return render(request,'home/Detail.html',context) return render(request,'home/Detail.html',context) def dashboard(request): if request.user.is_authenticated: allEvents = Event.objects.filter(user=request.user.username) context = {'allEvents':allEvents} return render(request,'home/Dashboard.html',context) else: return HttpResponse("You are not authenticates") def handleLogin(request): if request.method == "POST": username = request.POST.get("username") password = request.POST.get("password") user = authenticate(username=username,password=password) if user is not None: login(request,user) messages.success(request,"You have successgully logged in") return redirect('/') else: messages.error(request,"Invalid Credentials. Please try again") return redirect('/login') return render(request,'home/Login.html') def handleSignin(request): if request.method== "POST": username = request.POST.get('username') email = request.POST.get("email") password = request.POST.get('password') cpassword = request.POST.get('cpassword') if password==cpassword: user = User.objects.create_user(username,email,password) user.save() messages.success(request,"You have successfully registered ") return redirect('/login') else: messages.error(request,"Password do not match ") return redirect("/register") return render(request,'home/Register.html') def handleLogout(request): logout(request) messages.success(request,"You have successfully logged out ") return redirect("/") def editEvent(request,slug): event = Event.objects.filter(name=slug).first() Event.objects.filter(name=slug).delete() context = {'event':event} return render(request,'home/AddEvent.html',context) def deleteEvent(request,slug): Event.objects.filter(name=slug).delete() messages.error(request,"You have successgully deleted a event ") return redirect("/dashboard") def search(request): query = request.POST.get('query') events = Event.objects.filter(name__icontains=query) context = {"events":events,'query':query} return render(request,'home/Search.html',context)
{"/home/views.py": ["/home/models.py"]}
9,287
SuhasKamble/DJEVNT-Django-Project
refs/heads/master
/home/migrations/0001_initial.py
# Generated by Django 3.0.7 on 2021-04-20 14:36 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Event', fields=[ ('sno', models.AutoField(primary_key=True, serialize=False)), ('name', models.CharField(max_length=200)), ('performer', models.CharField(max_length=200)), ('venue', models.CharField(max_length=200)), ('image', models.CharField(max_length=2000)), ('date', models.DateField()), ('time', models.TimeField()), ('desc', models.TextField()), ], ), ]
{"/home/views.py": ["/home/models.py"]}
9,288
SuhasKamble/DJEVNT-Django-Project
refs/heads/master
/home/models.py
from django.db import models # Create your models here. class Event(models.Model): sno = models.AutoField(primary_key=True) user = models.CharField(max_length=70) name = models.CharField(max_length=200) performers = models.CharField(max_length=200) venue = models.CharField(max_length=200) address = models.CharField(max_length=300) image = models.CharField(max_length=2000) date = models.DateField() time = models.TimeField() desc = models.TextField() def __str__(self): return self.name
{"/home/views.py": ["/home/models.py"]}
9,289
SuhasKamble/DJEVNT-Django-Project
refs/heads/master
/home/urls.py
from django.contrib import admin from django.urls import path from . import views urlpatterns = [ path('',views.home,name="Home"), path('events',views.events,name="All Events"), path('addEvent',views.addEvent,name="Add Event"), path('dashboard',views.dashboard,name="Dashboard"), path('details/<str:slug>',views.details,name="Event Details"), path('login',views.handleLogin,name="Login"), path('register',views.handleSignin,name="Register"), path('logout',views.handleLogout,name="Logout"), path("edit/<str:slug>",views.editEvent,name="Edit Event"), path("delete/<str:slug>",views.deleteEvent,name="Delete Event"), path("search",views.search,name="Search Event"), ]
{"/home/views.py": ["/home/models.py"]}
9,294
wutianyiRosun/PSPNet_PyTorch
refs/heads/master
/psp/cityscapes_datasets.py
import torch import os import os.path as osp import numpy as np import random import matplotlib.pyplot as plt import collections import torchvision import cv2 from torch.utils import data class CityscapesDataSet(data.Dataset): """ CityscapesDataSet is employed to load train set Args: root: the Cityscapes dataset path, cityscapes ├── gtFine ├── leftImg8bit list_path: cityscapes_train_list.txt, include partial path mean: bgr_mean (73.15835921, 82.90891754, 72.39239876) """ def __init__(self, root, list_path, max_iters=None, crop_size=(512, 1024), mean=(128, 128, 128), scale=True, mirror=True, ignore_label=255): self.root = root self.list_path = list_path self.crop_h, self.crop_w = crop_size self.scale = scale self.ignore_label = ignore_label self.mean = mean self.is_mirror = mirror self.img_ids = [i_id.strip() for i_id in open(list_path)] if not max_iters==None: self.img_ids = self.img_ids * int(np.ceil(float(max_iters) / len(self.img_ids))) self.files = [] # for split in ["train", "trainval", "val"]: for name in self.img_ids: img_file = osp.join(self.root, name.split()[0]) #print(img_file) label_file = osp.join(self.root, name.split()[1]) #print(label_file) self.files.append({ "img": img_file, "label": label_file, "name": name }) print("length of dataset: ",len(self.files)) def __len__(self): return len(self.files) def __getitem__(self, index): datafiles = self.files[index] image = cv2.imread(datafiles["img"], cv2.IMREAD_COLOR) label = cv2.imread(datafiles["label"], cv2.IMREAD_GRAYSCALE) size = image.shape name = datafiles["name"] if self.scale: f_scale = 0.5 + random.randint(0, 15) / 10.0 #random resize between 0.5 and 2 image = cv2.resize(image, None, fx=f_scale, fy=f_scale, interpolation = cv2.INTER_LINEAR) label = cv2.resize(label, None, fx=f_scale, fy=f_scale, interpolation = cv2.INTER_NEAREST) image = np.asarray(image, np.float32) image = image[:, :, ::-1] # change to BGR image -= self.mean img_h, img_w = label.shape pad_h = max(self.crop_h - img_h, 0) pad_w = max(self.crop_w - img_w, 0) if pad_h > 0 or pad_w > 0: img_pad = cv2.copyMakeBorder(image, 0, pad_h, 0, pad_w, cv2.BORDER_CONSTANT, value=(0.0, 0.0, 0.0)) label_pad = cv2.copyMakeBorder(label, 0, pad_h, 0, pad_w, cv2.BORDER_CONSTANT, value=(self.ignore_label,)) else: img_pad, label_pad = image, label img_h, img_w = label_pad.shape h_off = random.randint(0, img_h - self.crop_h) w_off = random.randint(0, img_w - self.crop_w) # roi = cv2.Rect(w_off, h_off, self.crop_w, self.crop_h); image = np.asarray(img_pad[h_off : h_off+self.crop_h, w_off : w_off+self.crop_w], np.float32) label = np.asarray(label_pad[h_off : h_off+self.crop_h, w_off : w_off+self.crop_w], np.float32) image = image.transpose((2, 0, 1)) # NHWC -> NCHW if self.is_mirror: flip = np.random.choice(2) * 2 - 1 image = image[:, :, ::flip] label = label[:, ::flip] return image.copy(), label.copy(), np.array(size), name class CityscapesValDataSet(data.Dataset): """ CityscapesDataSet is employed to load val set Args: root: the Cityscapes dataset path, cityscapes ├── gtFine ├── leftImg8bit list_path: cityscapes_val_list.txt, include partial path """ def __init__(self, root, list_path, f_scale=0.5, mean=(128, 128, 128), ignore_label=255): self.root = root self.list_path = list_path self.ignore_label = ignore_label self.mean = mean self.f_scale = f_scale self.img_ids = [i_id.strip() for i_id in open(list_path)] self.files = [] for name in self.img_ids: img_file = osp.join(self.root, name.split()[0]) #print(img_file) label_file = osp.join(self.root, name.split()[1]) #print(label_file) image_name = name.strip().split()[0].strip().split('/',3)[3].split('.')[0] #print("image_name: ",image_name) self.files.append({ "img": img_file, "label": label_file, "name": image_name }) print("length of dataset: ",len(self.files)) def __len__(self): return len(self.files) def __getitem__(self, index): datafiles = self.files[index] image = cv2.imread(datafiles["img"], cv2.IMREAD_COLOR) label = cv2.imread(datafiles["label"], cv2.IMREAD_GRAYSCALE) size = image.shape name = datafiles["name"] if self.f_scale !=1: image = cv2.resize(image, None, fx=self.f_scale, fy=self.f_scale, interpolation = cv2.INTER_LINEAR) #label = cv2.resize(label, None, fx=self.f_scale, fy=self.f_scale, interpolation = cv2.INTER_NEAREST) image = np.asarray(image, np.float32) image = image[:, :, ::-1] # change to BGR image -= self.mean image = image.transpose((2, 0, 1)) # NHWC -> NCHW #print('image.shape:',image.shape) return image.copy(), label.copy(), np.array(size), name class CityscapesTestDataSet(data.Dataset): """ CityscapesDataSet is employed to load test set Args: root: the Cityscapes dataset path, cityscapes ├── gtFine ├── leftImg8bit list_path: cityscapes_test_list.txt, include partial path """ def __init__(self, root, list_path='test.txt', f_scale=1, mean=(128, 128, 128), ignore_label=255, set='test'): self.root = root self.list_path = list_path self.ignore_label = ignore_label self.mean = mean self.f_scale = f_scale self.img_ids = [i_id.strip() for i_id in open(list_path)] self.files = [] self.set = set for name in self.img_ids: #img_file = osp.join(self.root, "leftImg8bit/%s/%s" % (self.set, name)) img_file = osp.join(self.root, name.strip()) image_name = name.strip().split('/')[3].split('.')[0] self.files.append({ "img": img_file, "name": image_name }) print("lenth of dataset: ", len(self.files)) def __len__(self): return len(self.files) def __getitem__(self, index): datafiles = self.files[index] #image = Image.open(datafiles["img"]).convert('RGB') image = cv2.imread(datafiles["img"], cv2.IMREAD_COLOR) name = datafiles["name"] # resize if self.f_scale !=1: image = cv2.resize(image, None, fx=self.f_scale, fy=self.f_scale, interpolation = cv2.INTER_LINEAR) image = np.asarray(image, np.float32) size = image.shape image = image[:, :, ::-1] # change to BGR image -= self.mean image = image.transpose((2, 0, 1)) return image.copy(), np.array(size), name if __name__ == '__main__': #dst = CityscapesDataSet("/home/wty/AllDataSet/CityScapes", # '/home/wty/AllDataSet/CityScapes/cityscapes_train_list.txt', scale=False) dst = CityscapesValDataSet("/home/wty/AllDataSet/CityScapes", '/home/wty/AllDataSet/CityScapes/cityscapes_val_list.txt') trainloader = data.DataLoader(dst, batch_size=3) for i, data in enumerate(trainloader): imgs, labels, size, name = data if i == 0: print(name) print(size)
{"/train.py": ["/psp/cityscapes_datasets.py"], "/test.py": ["/psp/cityscapes_datasets.py"], "/evaluate.py": ["/psp/cityscapes_datasets.py"]}
9,295
wutianyiRosun/PSPNet_PyTorch
refs/heads/master
/train.py
import argparse import torch import torch.nn as nn from torch.utils import data import numpy as np import pickle import cv2 from torch.autograd import Variable import torch.optim as optim import scipy.misc import torch.backends.cudnn as cudnn import sys import os import os.path as osp from psp.model import PSPNet from psp.loss import CrossEntropy2d from psp.voc12_datasets import VOCDataSet from psp.cityscapes_datasets import CityscapesDataSet import matplotlib.pyplot as plt import random import timeit start = timeit.default_timer() def get_arguments(): """Parse all the arguments provided from the CLI. Returns: A list of parsed arguments. """ parser = argparse.ArgumentParser(description="PSPnet Network") # optimatization configuration parser.add_argument("--is-training", action="store_true", help="Whether to updates the running means and variances during the training.") parser.add_argument("--learning-rate", type=float, default= 0.001, help="Base learning rate for training with polynomial decay.") #0.001 parser.add_argument("--weight-decay", type=float, default= 0.0001, help="Regularisation parameter for L2-loss.") # 0.0005 parser.add_argument("--momentum", type=float, default= 0.9, help="Momentum component of the optimiser.") parser.add_argument("--power", type=float, default= 0.9, help="Decay parameter to compute the learning rate.") # dataset information parser.add_argument("--dataset", type=str, default='cityscapes', help="voc12, cityscapes, or pascal-context.") parser.add_argument("--random-mirror", action="store_true", help="Whether to randomly mirror the inputs during the training.") parser.add_argument("--random-scale", action="store_true", help="Whether to randomly scale the inputs during the training.") parser.add_argument("--not-restore-last", action="store_true", help="Whether to not restore last (FC) layers.") parser.add_argument("--random-seed", type=int, default= 1234, help="Random seed to have reproducible results.") parser.add_argument('--logFile', default='log.txt', help='File that stores the training and validation logs') # GPU configuration parser.add_argument("--cuda", default=True, help="Run on CPU or GPU") parser.add_argument("--gpus", type=str, default="0,1,2,3", help="choose gpu device.") return parser.parse_args() args = get_arguments() def configure_dataset_init_model(args): if args.dataset == 'voc12': args.batch_size = 10# 1 card: 5, 2 cards: 10 Number of images sent to the network in one step, 16 on paper args.maxEpoches = 15 # 1 card: 15, 2 cards: 15 epoches, equal to 30k iterations, max iterations= maxEpoches*len(train_aug)/batch_size_per_gpu'), args.data_dir = '/home/wty/AllDataSet/VOC2012' # Path to the directory containing the PASCAL VOC dataset args.data_list = './dataset/list/VOC2012/train_aug.txt' # Path to the file listing the images in the dataset args.ignore_label = 255 #The index of the label to ignore during the training args.input_size = '473,473' #Comma-separated string with height and width of images args.num_classes = 21 #Number of classes to predict (including background) args.img_mean = np.array((104.00698793,116.66876762,122.67891434), dtype=np.float32) # saving model file and log record during the process of training #Where restore model pretrained on other dataset, such as COCO.") args.restore_from = './pretrained/MS_DeepLab_resnet_pretrained_COCO_init.pth' args.snapshot_dir = './snapshots/voc12/' #Where to save snapshots of the model args.resume = './snapshots/voc12/psp_voc12_3.pth' #checkpoint log file, helping recovering training elif args.dataset == 'cityscapes': args.batch_size = 8 #Number of images sent to the network in one step, batch_size/num_GPU=2 args.maxEpoches = 60 #epoch nums, 60 epoches is equal to 90k iterations, max iterations= maxEpoches*len(train)/batch_size') # 60x2975/2=89250 ~= 90k, single_GPU_batch_size=2 args.data_dir = '/home/wty/AllDataSet/CityScapes' # Path to the directory containing the PASCAL VOC dataset args.data_list = './dataset/list/Cityscapes/cityscapes_train_list.txt' # Path to the file listing the images in the dataset args.ignore_label = 255 #The index of the label to ignore during the training args.input_size = '720,720' #Comma-separated string with height and width of images args.num_classes = 19 #Number of classes to predict (including background) args.img_mean = np.array((73.15835921, 82.90891754, 72.39239876), dtype=np.float32) # saving model file and log record during the process of training #Where restore model pretrained on other dataset, such as coarse cityscapes args.restore_from = './pretrained/resnet101_pretrained_for_cityscapes.pth' args.snapshot_dir = './snapshots/cityscapes/' #Where to save snapshots of the model args.resume = './snapshots/cityscapes/psp_cityscapes_12_3.pth' #checkpoint log file, helping recovering training else: print("dataset error") def loss_calc(pred, label): """ This function returns cross entropy loss for semantic segmentation """ # out shape batch_size x channels x h x w -> batch_size x channels x h x w # label shape h x w x 1 x batch_size -> batch_size x 1 x h x w label = Variable(label.long()).cuda() criterion = torch.nn.CrossEntropyLoss(ignore_index=args.ignore_label).cuda() return criterion(pred, label) def lr_poly(base_lr, iter, max_iter, power): return base_lr*((1-float(iter)/max_iter)**(power)) def get_1x_lr_params_NOscale(model): """ This generator returns all the parameters of the net except for the last classification layer. Note that for each batchnorm layer, requires_grad is set to False in deeplab_resnet.py, therefore this function does not return any batchnorm parameter """ b = [] if torch.cuda.device_count() == 1: b.append(model.conv1) b.append(model.bn1) b.append(model.layer1) b.append(model.layer2) b.append(model.layer3) b.append(model.layer4) else: b.append(model.module.conv1) b.append(model.module.bn1) b.append(model.module.layer1) b.append(model.module.layer2) b.append(model.module.layer3) b.append(model.module.layer4) for i in range(len(b)): for j in b[i].modules(): jj = 0 for k in j.parameters(): jj+=1 if k.requires_grad: yield k def get_10x_lr_params(model): """ This generator returns all the parameters for the last layer of the net, which does the classification of pixel into classes """ b = [] if torch.cuda.device_count() == 1: b.append(model.pspmodule.parameters()) b.append(model.main_classifier.parameters()) else: b.append(model.module.pspmodule.parameters()) b.append(model.module.main_classifier.parameters()) for j in range(len(b)): for i in b[j]: yield i def adjust_learning_rate(optimizer, i_iter, max_iter): """Sets the learning rate to the initial LR divided by 5 at 60th, 120th and 160th epochs""" lr = lr_poly(args.learning_rate, i_iter, max_iter, args.power) optimizer.param_groups[0]['lr'] = lr optimizer.param_groups[1]['lr'] = lr * 10 return lr def netParams(model): ''' Computing total network parameters Args: model: model return: total network parameters ''' total_paramters = 0 for parameter in model.parameters(): i = len(parameter.size()) #print(parameter.size()) p = 1 for j in range(i): p *= parameter.size(j) total_paramters += p return total_paramters def main(): print("=====> Configure dataset and pretrained model") configure_dataset_init_model(args) print(args) print(" current dataset: ", args.dataset) print(" init model: ", args.restore_from) print("=====> Set GPU for training") if args.cuda: print("====> Use gpu id: '{}'".format(args.gpus)) os.environ["CUDA_VISIBLE_DEVICES"] = args.gpus if not torch.cuda.is_available(): raise Exception("No GPU found or Wrong gpu id, please run without --cuda") print("=====> Random Seed: ", args.random_seed) torch.manual_seed(args.random_seed) if args.cuda: torch.cuda.manual_seed(args.random_seed) h, w = map(int, args.input_size.split(',')) input_size = (h, w) cudnn.enabled = True print("=====> Building network") model = PSPNet(num_classes=args.num_classes) # For a small batch size, it is better to keep # the statistics of the BN layers (running means and variances) # frozen, and to not update the values provided by the pre-trained model. # If is_training=True, the statistics will be updated during the training. # Note that is_training=False still updates BN parameters gamma (scale) and beta (offset) # if they are presented in var_list of the optimiser definition. print("=====> Loading init weights, pretrained COCO for VOC2012, and pretrained Coarse cityscapes for cityscapes") saved_state_dict = torch.load(args.restore_from) new_params = model.state_dict().copy() for i in saved_state_dict: #Scale.layer5.conv2d_list.3.weight #print(saved_state_dict[i].size()) i_parts = i.split('.') #print('i_parts: ', i_parts) if not i_parts[1]=='layer5': #init model pretrained on COCO, class name=21, layer5 is ASPP new_params['.'.join(i_parts[1:])] = saved_state_dict[i] #print('copy {}'.format('.'.join(i_parts[1:]))) model.load_state_dict(new_params) if args.cuda: if torch.cuda.device_count()>1: print("torch.cuda.device_count()=",torch.cuda.device_count()) model = torch.nn.DataParallel(model).cuda() #multi-card data parallel else: print("single GPU for training") model = model.cuda() #1-card data parallel start_epoch=0 print("=====> Whether resuming from a checkpoint, for continuing training") if args.resume: if os.path.isfile(args.resume): print("=> loading checkpoint '{}'".format(args.resume)) checkpoint = torch.load(args.resume) start_epoch = checkpoint["epoch"] model.load_state_dict(checkpoint["model"]) else: print("=> no checkpoint found at '{}'".format(args.resume)) model.train() cudnn.benchmark = True if not os.path.exists(args.snapshot_dir): os.makedirs(args.snapshot_dir) print('=====> Computing network parameters') total_paramters = netParams(model) print('Total network parameters: ' + str(total_paramters)) print("=====> Preparing training data") if args.dataset == 'voc12': trainloader = data.DataLoader(VOCDataSet(args.data_dir, args.data_list, max_iters=None, crop_size=input_size, scale=args.random_scale, mirror=args.random_mirror, mean=args.img_mean), batch_size= args.batch_size, shuffle=True, num_workers=0, pin_memory=True, drop_last=True) elif args.dataset == 'cityscapes': trainloader = data.DataLoader(CityscapesDataSet(args.data_dir, args.data_list, max_iters=None, crop_size=input_size, scale=args.random_scale, mirror=args.random_mirror, mean=args.img_mean), batch_size = args.batch_size, shuffle=True, num_workers=0, pin_memory=True, drop_last=True) else: print("dataset error") optimizer = optim.SGD([{'params': get_1x_lr_params_NOscale(model), 'lr': args.learning_rate }, {'params': get_10x_lr_params(model), 'lr': 10*args.learning_rate}], lr=args.learning_rate, momentum=args.momentum,weight_decay=args.weight_decay) optimizer.zero_grad() logFileLoc = args.snapshot_dir + args.logFile if os.path.isfile(logFileLoc): logger = open(logFileLoc, 'a') else: logger = open(logFileLoc, 'w') logger.write("Parameters: %s" % (str(total_paramters))) logger.write("\n%s\t\t%s" % ('iter', 'Loss(train)\n')) logger.flush() print("=====> Begin to train") train_len=len(trainloader) print(" iteration numbers of per epoch: ", train_len) print(" epoch num: ", args.maxEpoches) print(" max iteration: ", args.maxEpoches*train_len) for epoch in range(start_epoch, int(args.maxEpoches)): for i_iter, batch in enumerate(trainloader,0): #i_iter from 0 to len-1 #print("i_iter=", i_iter, "epoch=", epoch) images, labels, _, _ = batch images = Variable(images).cuda() optimizer.zero_grad() lr = adjust_learning_rate(optimizer, i_iter+epoch*train_len, max_iter = args.maxEpoches * train_len) pred = model(images) print("model output size: ", pred.size()) loss = loss_calc(pred, labels) loss.backward() optimizer.step() print("===> Epoch[{}]({}/{}): Loss: {:.10f} lr: {:.5f}".format(epoch, i_iter, train_len, loss.data[0], lr)) logger.write("Epoch[{}]({}/{}): Loss: {:.10f} lr: {:.5f}\n".format(epoch, i_iter, train_len, loss.data[0], lr)) logger.flush() print("=====> saving model") state={"epoch": epoch+1, "model": model.state_dict()} torch.save(state, osp.join(args.snapshot_dir, 'psp_'+str(args.dataset)+"_"+str(epoch)+'.pth')) end = timeit.default_timer() print( float(end-start)/3600, 'h') logger.write("total training time: {:.2f} h\n".format(float(end-start)/3600)) logger.close() if __name__ == '__main__': main()
{"/train.py": ["/psp/cityscapes_datasets.py"], "/test.py": ["/psp/cityscapes_datasets.py"], "/evaluate.py": ["/psp/cityscapes_datasets.py"]}
9,296
wutianyiRosun/PSPNet_PyTorch
refs/heads/master
/test.py
import torch import argparse import scipy from scipy import ndimage import numpy as np import sys import cv2 from torch.autograd import Variable import torchvision.models as models import torch.nn.functional as F from torch.utils import data from psp.model import PSPNet from psp.voc12_datasets import VOCDataTestSet from psp.cityscapes_datasets import CityscapesTestDataSet from collections import OrderedDict from utils.colorize_mask import cityscapes_colorize_mask, VOCColorize import os from PIL import Image import matplotlib.pyplot as plt import torch.nn as nn def get_arguments(): """Parse all the arguments provided from the CLI. Returns: A list of parsed arguments. """ parser = argparse.ArgumentParser(description="PSPnet") parser.add_argument("--dataset", type=str, default='cityscapes', help="voc12, cityscapes, or pascal-context") # GPU configuration parser.add_argument("--cuda", default=True, help="Run on CPU or GPU") parser.add_argument("--gpus", type=str, default="3", help="choose gpu device.") return parser.parse_args() def configure_dataset_model(args): if args.dataset == 'voc12': args.data_dir ='/home/wty/AllDataSet/VOC2012' #Path to the directory containing the PASCAL VOC dataset args.data_list = './dataset/list/VOC2012/test.txt' #Path to the file listing the images in the dataset args.img_mean = np.array((104.00698793,116.66876762,122.67891434), dtype=np.float32) #RBG mean, first subtract mean and then change to BGR args.ignore_label = 255 #The index of the label to ignore during the training args.num_classes = 21 #Number of classes to predict (including background) args.restore_from = './snapshots/voc12/psp_voc12_14.pth' #Where restore model parameters from args.save_segimage = True args.seg_save_dir = "./result/test/VOC2012" args.corp_size =(505, 505) elif args.dataset == 'cityscapes': args.data_dir ='/home/wty/AllDataSet/CityScapes' #Path to the directory containing the PASCAL VOC dataset args.data_list = './dataset/list/Cityscapes/cityscapes_test_list.txt' #Path to the file listing the images in the dataset args.img_mean = np.array((73.15835921, 82.90891754, 72.39239876), dtype=np.float32) #RBG mean, first subtract mean and then change to BGR args.ignore_label = 255 #The index of the label to ignore during the training args.f_scale = 1 #resize image, and Unsample model output to original image size, label keeps args.num_classes = 19 #Number of classes to predict (including background) args.restore_from = './snapshots/cityscapes/psp_cityscapes_59.pth' #Where restore model parameters from args.save_segimage = True args.seg_save_dir = "./result/test/Cityscapes" else: print("dataset error") def convert_state_dict(state_dict): """Converts a state dict saved from a dataParallel module to normal module state_dict inplace :param state_dict is the loaded DataParallel model_state You probably saved the model using nn.DataParallel, which stores the model in module, and now you are trying to load it without DataParallel. You can either add a nn.DataParallel temporarily in your network for loading purposes, or you can load the weights file, create a new ordered dict without the module prefix, and load it back """ state_dict_new = OrderedDict() #print(type(state_dict)) for k, v in state_dict.items(): #print(k) name = k[7:] # remove the prefix module. # My heart is borken, the pytorch have no ability to do with the problem. state_dict_new[name] = v return state_dict_new def main(): args = get_arguments() print("=====> Configure dataset and model") configure_dataset_model(args) print(args) print("=====> Set GPU for training") if args.cuda: print("====> Use gpu id: '{}'".format(args.gpus)) os.environ["CUDA_VISIBLE_DEVICES"] = args.gpus if not torch.cuda.is_available(): raise Exception("No GPU found or Wrong gpu id, please run without --cuda") model = PSPNet(num_classes=args.num_classes) saved_state_dict = torch.load(args.restore_from) model.load_state_dict( convert_state_dict(saved_state_dict["model"]) ) model.eval() model.cuda() if args.dataset == 'voc12': testloader = data.DataLoader(VOCDataTestSet(args.data_dir, args.data_list, crop_size=(505, 505),mean= args.img_mean), batch_size=1, shuffle=False, pin_memory=True) interp = nn.Upsample(size=(505, 505), mode='bilinear') voc_colorize = VOCColorize() elif args.dataset == 'cityscapes': testloader = data.DataLoader(CityscapesTestDataSet(args.data_dir, args.data_list, f_scale= args.f_scale, mean= args.img_mean), batch_size=1, shuffle=False, pin_memory=True) # f_sale, meaning resize image at f_scale as input interp = nn.Upsample(size=(1024, 2048), mode='bilinear') #size = (h,w) else: print("dataset error") data_list = [] if args.save_segimage: if not os.path.exists(args.seg_save_dir): os.makedirs(args.seg_save_dir) print("======> test set size:", len(testloader)) for index, batch in enumerate(testloader): print('%d processd'%(index)) image, size, name = batch size = size[0].numpy() output = model(Variable(image, volatile=True).cuda()) output = interp(output).cpu().data[0].numpy() if args.dataset == 'voc12': print(output.shape) print(size) output = output[:,:size[0],:size[1]] output = output.transpose(1,2,0) output = np.asarray(np.argmax(output, axis=2), dtype=np.uint8) if args.save_segimage: seg_filename = os.path.join(args.seg_save_dir, '{}.png'.format(name[0])) color_file = Image.fromarray(voc_colorize(output).transpose(1, 2, 0), 'RGB') color_file.save(seg_filename) elif args.dataset == 'cityscapes': output = output.transpose(1,2,0) output = np.asarray(np.argmax(output, axis=2), dtype=np.uint8) if args.save_segimage: output_color = cityscapes_colorize_mask(output) output = Image.fromarray(output) output.save('%s/%s.png'% (args.seg_save_dir, name[0])) output_color.save('%s/%s_color.png'%(args.seg_save_dir, name[0])) else: print("dataset error") if __name__ == '__main__': main()
{"/train.py": ["/psp/cityscapes_datasets.py"], "/test.py": ["/psp/cityscapes_datasets.py"], "/evaluate.py": ["/psp/cityscapes_datasets.py"]}
9,297
wutianyiRosun/PSPNet_PyTorch
refs/heads/master
/evaluate.py
import torch import argparse import scipy from scipy import ndimage import numpy as np import sys import cv2 from torch.autograd import Variable import torchvision.models as models import torch.nn.functional as F from torch.utils import data from psp.model import PSPNet from psp.voc12_datasets import VOCDataSet from psp.cityscapes_datasets import CityscapesValDataSet from collections import OrderedDict from utils.colorize_mask import cityscapes_colorize_mask, VOCColorize import os from PIL import Image import matplotlib.pyplot as plt import torch.nn as nn import time def get_arguments(): """Parse all the arguments provided from the CLI. Returns: A list of parsed arguments. """ parser = argparse.ArgumentParser(description="PSPnet") parser.add_argument("--dataset", type=str, default='cityscapes', help="voc12, cityscapes, or pascal-context") # GPU configuration parser.add_argument("--cuda", default=True, help="Run on CPU or GPU") parser.add_argument("--gpus", type=str, default="3", help="choose gpu device.") return parser.parse_args() def configure_dataset_model(args): if args.dataset == 'voc12': args.data_dir ='/home/wty/AllDataSet/VOC2012' #Path to the directory containing the PASCAL VOC dataset args.data_list = './dataset/list/VOC2012/val.txt' #Path to the file listing the images in the dataset args.img_mean = np.array((104.00698793,116.66876762,122.67891434), dtype=np.float32) #RBG mean, first subtract mean and then change to BGR args.ignore_label = 255 #The index of the label to ignore during the training args.num_classes = 21 #Number of classes to predict (including background) args.restore_from = './snapshots/voc12/psp_voc12_10.pth' #Where restore model parameters from args.save_segimage = True args.seg_save_dir = "./result/val/VOC2012" args.corp_size =(505, 505) elif args.dataset == 'cityscapes': args.data_dir ='/home/wty/AllDataSet/CityScapes' #Path to the directory containing the PASCAL VOC dataset args.data_list = './dataset/list/Cityscapes/cityscapes_val_list.txt' #Path to the file listing the images in the dataset args.img_mean = np.array((73.15835921, 82.90891754, 72.39239876), dtype=np.float32) #RBG mean, first subtract mean and then change to BGR args.ignore_label = 255 #The index of the label to ignore during the training args.num_classes = 19 #Number of classes to predict (including background) args.f_scale = 1 #resize image, and Unsample model output to original image size args.restore_from = './snapshots/cityscapes/psp_cityscapes_20.pth' #Where restore model parameters from #args.restore_from = './pretrained/resnet101_pretrained_for_cityscapes.pth' #Where restore model parameters from args.save_segimage = True args.seg_save_dir = "./result/val/Cityscapes" else: print("dataset error when configuring dataset and model") def convert_state_dict(state_dict): """Converts a state dict saved from a dataParallel module to normal module state_dict inplace :param state_dict is the loaded DataParallel model_state You probably saved the model using nn.DataParallel, which stores the model in module, and now you are trying to load it without DataParallel. You can either add a nn.DataParallel temporarily in your network for loading purposes, or you can load the weights file, create a new ordered dict without the module prefix, and load it back """ state_dict_new = OrderedDict() #print(type(state_dict)) for k, v in state_dict.items(): #print(k) name = k[7:] # remove the prefix module. # My heart is borken, the pytorch have no ability to do with the problem. state_dict_new[name] = v return state_dict_new def get_iou(data_list, class_num, save_path=None): from multiprocessing import Pool from psp.metric import ConfusionMatrix ConfM = ConfusionMatrix(class_num) f = ConfM.generateM pool = Pool() m_list = pool.map(f, data_list) pool.close() pool.join() for m in m_list: ConfM.addM(m) aveJ, j_list, M = ConfM.jaccard() print('meanIOU: ' + str(aveJ) + '\n') if save_path: with open(save_path, 'w') as f: f.write('meanIOU: ' + str(aveJ) + '\n') f.write(str(j_list)+'\n') f.write(str(M)+'\n') def show_all(gt, pred): import matplotlib.pyplot as plt from matplotlib import colors from mpl_toolkits.axes_grid1 import make_axes_locatable fig, axes = plt.subplots(1, 2) ax1, ax2 = axes classes = np.array(('background', # always index 0 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor')) colormap = [(0,0,0),(0.5,0,0),(0,0.5,0),(0.5,0.5,0),(0,0,0.5),(0.5,0,0.5),(0,0.5,0.5), (0.5,0.5,0.5),(0.25,0,0),(0.75,0,0),(0.25,0.5,0),(0.75,0.5,0),(0.25,0,0.5), (0.75,0,0.5),(0.25,0.5,0.5),(0.75,0.5,0.5),(0,0.25,0),(0.5,0.25,0),(0,0.75,0), (0.5,0.75,0),(0,0.25,0.5)] cmap = colors.ListedColormap(colormap) bounds=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21] norm = colors.BoundaryNorm(bounds, cmap.N) ax1.set_title('gt') ax1.imshow(gt, cmap=cmap, norm=norm) ax2.set_title('pred') ax2.imshow(pred, cmap=cmap, norm=norm) plt.show() def main(): args = get_arguments() print("=====> Configure dataset and model") configure_dataset_model(args) print(args) print("=====> Set GPU for training") if args.cuda: print("====> Use gpu id: '{}'".format(args.gpus)) os.environ["CUDA_VISIBLE_DEVICES"] = args.gpus if not torch.cuda.is_available(): raise Exception("No GPU found or Wrong gpu id, please run without --cuda") model = PSPNet(num_classes=args.num_classes) saved_state_dict = torch.load(args.restore_from) if args.dataset == 'voc12': model.load_state_dict( convert_state_dict(saved_state_dict["model"]) ) elif args.dataset == 'cityscapes': #model.load_state_dict(saved_state_dict["model"]) model.load_state_dict( convert_state_dict(saved_state_dict["model"]) ) else: print("dataset error when loading model file") model.eval() model.cuda() if args.dataset == 'voc12': testloader = data.DataLoader(VOCDataSet(args.data_dir, args.data_list, crop_size=(505, 505), mean= args.img_mean, scale=False, mirror=False), batch_size=1, shuffle=False, pin_memory=True) interp = nn.Upsample(size=(505, 505), mode='bilinear') voc_colorize = VOCColorize() elif args.dataset == 'cityscapes': testloader = data.DataLoader(CityscapesValDataSet(args.data_dir, args.data_list, f_scale=args.f_scale, mean= args.img_mean), batch_size=1, shuffle=False, pin_memory=True) # f_sale, meaning resize image at f_scale as input interp = nn.Upsample(size=(1024, 2048), mode='bilinear') #size = (h,w) else: print("dataset error when configure DataLoader") data_list = [] if args.save_segimage: if not os.path.exists(args.seg_save_dir): os.makedirs(args.seg_save_dir) for index, batch in enumerate(testloader): image, label, size, name = batch #print("label.size:", label.size()) #print("model input image size:", image.size()) size = size[0].numpy() start_time = time.time() output = model(Variable(image, volatile=True).cuda()) output = interp(output).cpu().data[0].numpy() time_taken = time.time() - start_time; print('%d processd, time: %.3f'%(index, time_taken)) if args.dataset == 'voc12': output = output[:,:size[0],:size[1]] gt = np.asarray(label[0].numpy()[:size[0],:size[1]], dtype=np.int) output = output.transpose(1,2,0) output = np.asarray(np.argmax(output, axis=2), dtype=np.int) data_list.append([gt.flatten(), output.flatten()]) if args.save_segimage: seg_filename = os.path.join(args.seg_save_dir, '{}.png'.format(name[0])) color_file = Image.fromarray(voc_colorize(output).transpose(1, 2, 0), 'RGB') color_file.save(seg_filename) elif args.dataset == 'cityscapes': gt = np.asarray(label[0].numpy(), dtype=np.int) output = output.transpose(1,2,0) output = np.asarray(np.argmax(output, axis=2), dtype=np.uint8) data_list.append([gt.flatten(), output.flatten()]) if args.save_segimage: output_color = cityscapes_colorize_mask(output) output = Image.fromarray(output) output.save('%s/%s.jpg'% (args.seg_save_dir, name[0])) output_color.save('%s/%s_color.png'%(args.seg_save_dir, name[0])) else: print("dataset error") get_iou(data_list, args.num_classes) if __name__ == '__main__': main()
{"/train.py": ["/psp/cityscapes_datasets.py"], "/test.py": ["/psp/cityscapes_datasets.py"], "/evaluate.py": ["/psp/cityscapes_datasets.py"]}
9,298
wutianyiRosun/PSPNet_PyTorch
refs/heads/master
/plot_curve.py
import os import matplotlib.pyplot as plt def loss_plot(loss_seq,lr_seq, path = 'Train_hist.png', model_name = ''): x = range(len(loss_seq)) y1 = loss_seq y2 = lr_seq plt.plot(x, y1, label='loss') plt.plot(x, y2, label='lr') plt.xlabel('Iter') plt.ylabel('Loss') plt.legend(loc=4) plt.grid(True) plt.tight_layout() plt.savefig(path) #plt.close() print("finish") plt.show() plt.close() if __name__ == '__main__': log_file = "./snapshots/voc12/log.txt" log_data_list = [item.strip() for item in open(log_file, 'r')] length = len(log_data_list) print("the number of records:", length) loss_seq =[] lr_seq =[] for item in log_data_list: print( item.split()) if len(item.split())==5 : if item.split()[3]=="lr:": _, _, loss_val,_, lr = item.split() loss_val = float(loss_val) lr = float(lr) loss_seq.append(loss_val) lr_seq.append(lr) print("loss_val:", loss_val) print("lr:", lr) loss_plot(loss_seq, lr_seq, path = 'Train_hist.png', model_name = '')
{"/train.py": ["/psp/cityscapes_datasets.py"], "/test.py": ["/psp/cityscapes_datasets.py"], "/evaluate.py": ["/psp/cityscapes_datasets.py"]}
9,300
bamasa/client
refs/heads/master
/wonderlandClient/util.py
import os import grpc import yaml from .wonderland_pb2_grpc import wonderlandStub def new_client(): default_path = os.path.join(os.environ.get("HOME"), ".wonder/config.yml") return new_client_from_path(default_path) def new_client_from_path(config_path): config = load_config(config_path) creds = load_credentials(config) channel = grpc.secure_channel( config.get("connect_to"), creds, options=( ('grpc.max_send_message_length', 1024 * 1024 * 1024), ('grpc.max_receive_message_length', 1024 * 1024 * 1024), ) ) return wonderlandStub(channel) def load_config(config_path): if not os.path.exists(config_path): raise Exception("Config file `{}` does not exist".format(config_path)) with open(config_path) as config_f: return yaml.load(config_f) def load_credentials(config): path_ok = [ os.path.exists(config.get("ca_cert")), os.path.exists(config.get("client_key")), os.path.exists(config.get("client_cert")), ] if not all(path_ok): raise ValueError("One of credentials files does not exist") root_cert = open(config.get("ca_cert"), 'rb').read() private_key = open(config.get("client_key"), 'rb').read() cert_chain = open(config.get("client_cert"), 'rb').read() credentials = grpc.ssl_channel_credentials( root_certificates=root_cert, private_key=private_key, certificate_chain=cert_chain ) return credentials def check_jobs_equal(a, b): return (a.project == b.project) and (a.id == b.id) and (a.status == b.status) and ( a.metadata == b.metadata) and (a.kind == b.kind) and (a.output == b.output) and (a.input == b.input)
{"/wonderlandClient/__init__.py": ["/wonderlandClient/util.py"]}
9,301
bamasa/client
refs/heads/master
/wonderlandClient/__init__.py
from .wonderland_pb2 import ( Job, ListOfJobs, RequestWithId, ListJobsRequest ) from .wonderland_pb2_grpc import ( wonderlandServicer, wonderlandStub, add_wonderlandServicer_to_server ) from .util import ( new_client, new_client_from_path, check_jobs_equal ) from .worker import Worker __version__ = "0.1"
{"/wonderlandClient/__init__.py": ["/wonderlandClient/util.py"]}
9,390
ESEGroup/Brasil
refs/heads/master
/app/models/__init__.py
#https://code.djangoproject.com/wiki/CookBookSplitModelsToFiles from .usuario import Usuario from .recurso import Recurso from .agendamento import Agendamento from .cadastro import Cadastro from .notificador import Notificador from .notificador_cadastro import NotificadorCadastro from .notificador_agendamento import NotificadorAgendamento from .busca import Busca, BuscaRecurso, BuscaUsuario from .cadastro_recurso import CadastroRecurso from .cadastro_usuario import CadastroUsuario from .cadastro_agendamento import CadastroAgendamento from .gerenciador import GerenciadorAgendamento from .settingsgroups import SettingsUserGroups
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,391
ESEGroup/Brasil
refs/heads/master
/app/models/cadastro.py
from django.db import models class Cadastro (models.Model): # no getters and setters please (http://dirtsimple.org/2004/12/python-is-not-java.html) acesso = None def cadastrar (): return False def atualizar (): return False def deletar (): return False def notificar (): return False class Meta: abstract = True managed = False app_label = 'app'
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,392
ESEGroup/Brasil
refs/heads/master
/app/models/busca.py
from django.db import models from django.core.exceptions import ObjectDoesNotExist from app.models import Recurso, Usuario import json class Busca (models.Model): acesso = None params = "{}" # { # 'type': 'match'/'complex', # (if type == match) 'id': integer id, # (if type == 'complex') 'texto' : queried text or '' (empty) # (if type == 'complex') 'categorias' : string array, # (if type == 'complex') 'enderecos' : string array, # (if type == 'complex') 'disponibilidades' : string array #} resultados_busca = "{}" lista_resultados = [] def busca (json): return False def buscar (): return False class Meta: abstract = True managed = False app_label = 'app' class BuscaRecurso (Busca): def buscar (self): if self.params == '{}': return None # creating dynamic object from json query = lambda:None query.__dict__ = json.loads(self.params) # returns single resource, if found if query.type == 'match': try: return Recurso.objects.get(patrimonio = query.id) except ObjectDoesNotExist: return "DoesNotExist ERROR" # returns list of resources elif query.type == 'complex': # Remember: querySets are lazy – the act of creating a QuerySet doesn’t involve any database activity. # You can stack filters together all day long, and Django won’t actually run the query until the QuerySet is evaluated. res = Recurso.objects.exclude(nome="") if query.texto.strip(): # this is actually an OR res = res.filter(nome__icontains=query.texto) | res.filter(descricao__icontains=query.texto) if len(query.categorias) > 0: res = res.filter(categoria__in=query.categorias) if len(query.enderecos) > 0: res = res.filter(endereco__in=query.enderecos) if len(query.disponibilidades) > 0: res = res.filter(estado__in=query.disponibilidades) try: return res except DoesNotExist: return "DoesNotExist ERROR" return None class Meta: managed = False app_label = 'app' class BuscaUsuario (Busca): def buscar (): return False class Meta: managed = False app_label = 'app'
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,393
ESEGroup/Brasil
refs/heads/master
/env/bin/django-admin.py
#!/home/selene/Documentos/Brasil-agendae-backend/env/bin/python3 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,394
ESEGroup/Brasil
refs/heads/master
/app/models/usuario.py
from django.contrib.auth.models import User from django.db import models class Usuario (models.Model): # no getters and setters please (http://dirtsimple.org/2004/12/python-is-not-java.html) user = models.OneToOneField(User, default=0, related_name='profile',on_delete=models.CASCADE) registro = models.PositiveIntegerField() #nome = models.CharField(max_length=200) departamento = models.CharField(max_length=200) #estado = models.PositiveSmallIntegerField() #tipo_perfil = models.PositiveSmallIntegerField() #email = models.EmailField() def __str__(self): return self.user.username + ' - '+ self.user.first_name class Meta: db_table = 'Usuarios' app_label = 'app'
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,395
ESEGroup/Brasil
refs/heads/master
/app/models/settingsgroups.py
from django.db import models #primary keys class SettingsUserGroups(models.Model): SuperAdminGroup = 1 AdminGroup = 2 FuncGroup = 3
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,396
ESEGroup/Brasil
refs/heads/master
/app/migrations/0004_auto_20161115_1756.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-15 19:56 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0003_auto_20161113_1922'), ] operations = [ migrations.AlterField( model_name='recurso', name='categoria', field=models.CharField(max_length=200), ), migrations.AlterField( model_name='recurso', name='estado', field=models.CharField(choices=[('Disponível', 'Disponível'), ('Indisponível', 'Indisponível'), ('Em manutenção', 'Em manutenção')], default='Indisponível', max_length=13), ), ]
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,397
ESEGroup/Brasil
refs/heads/master
/app/views.py
import sys import json from django.shortcuts import render from django.http import HttpResponse, Http404 from django.conf import settings from app.models import BuscaRecurso, Recurso, CadastroRecurso from django.core import serializers from rest_framework.response import Response from rest_framework import status from rest_framework.decorators import api_view, authentication_classes, permission_classes from rest_framework.authentication import TokenAuthentication from app.permissions import AllowAll,AdminOnly,SuperAdminOnly from app.models import CadastroUsuario, SettingsUserGroups, Usuario, CadastroAgendamento from rest_framework.authtoken.models import Token #static pages def index(request): return render(request, 'app/index.html', {}) def catalog(request): return render(request, 'app/catalog.html', {}) def about(request): return render(request, 'app/about.html', {}) def people(request): return render(request, 'app/people.html', {}) def person(request): return render(request, 'app/person.html', {}) def newResource(request): return render(request, 'app/new_resource.html', {}) # ajax def searchCatalog(request): if request.method == 'GET': texto = str(request.GET.get('texto')) or '' categorias = str(request.GET.get('categorias')) if str(request.GET.get('categorias')) != 'None' else '[]' enderecos = str(request.GET.get('enderecos')) if str(request.GET.get('enderecos')) != 'None' else '[]' disponibilidades = str(request.GET.get('disponibilidades')) if str(request.GET.get('disponibilidades')) != 'None' else '[]' s = BuscaRecurso() s.params = '{"type": "complex",' s.params += '"texto": "' + texto + '",' s.params += '"categorias": ' + categorias + ',' s.params += '"enderecos": ' + enderecos + ',' s.params += '"disponibilidades": ' + disponibilidades + ' }' res = s.buscar() if res == "DoesNotExist ERROR": raise Http404("Nenhum recurso possui o número de patrimônio buscado!") response_data = {} response_data['result'] = serializers.serialize('json', res) #print() #print (s.params) #print (response_data) return HttpResponse( json.dumps(response_data), content_type="application/json" ) else: return HttpResponse( json.dumps({"Info": "request method not supported"}), content_type="application/json" ) def resource(request, id): # search s = BuscaRecurso() s.params = '{"type": "match", "id": ' + str(id) + '}' res = s.buscar() # go to 404 if not found if res == "DoesNotExist ERROR": raise Http404("Nenhum recurso possui o número de patrimônio buscado!") # set the data #context = {'id': id} context = {'res': res} # do it return render(request, 'app/resource.html', context) def createNewResource(request): if request.method == 'GET': nome = str(request.GET.get('nome')) patrimonio = str(request.GET.get('patrimonio')) endereco = str(request.GET.get('endereco')) categoria = str(request.GET.get('categoria')) descricao = str(request.GET.get('descricao')) cr = CadastroRecurso() if (cr.cadastrar (nome, patrimonio, endereco, categoria, descricao)): response_data = {} response_data['result'] = patrimonio response_data['error'] = "" return HttpResponse( json.dumps(response_data), content_type="application/json" ) else: response_data = {} response_data['result'] = '""' response_data['error'] = "Resource already exists" return HttpResponse( json.dumps(response_data), content_type="application/json" ) else: return HttpResponse( json.dumps({"Info": "request method not supported"}), content_type="application/json" ) def updateResource(request,patrimonio): if request.method == 'GET': nome = str(request.GET.get('nome')) endereco = str(request.GET.get('endereco')) categoria = str(request.GET.get('categoria')) descricao = str(request.GET.get('descricao')) estado = str(request.GET.get('estado')) patrimonio = str(request.GET.get('patrimonio')) cr = CadastroRecurso() if(cr.atualizar (patrimonio, nome, descricao, endereco, categoria, estado)): response_data = {} response_data['result'] = patrimonio response_data['error'] = "" return HttpResponse( json.dumps(response_data), content_type="application/json" ) else: response_data = {} response_data['result'] = '""' response_data['error'] = "Resource not found" return HttpResponse( json.dumps(response_data), content_type="application/json" ) else: return HttpResponse( json.dumps({"Info": "request method not supported"}), content_type="application/json" ) from .models import Usuario @api_view(['POST','GET']) @authentication_classes((TokenAuthentication,)) @permission_classes((AllowAll,)) def getInfoUsuario(request): data ={} if settings.DEBUG: print ("Input: {\"function\":\"",str(sys._getframe().f_code.co_name),"} ",end="") print ("{\"user:\"\"",str(request.user),"\"}") try: request.usuario = Usuario.objects.get(user=request.user) data = { 'username:': request.usuario.user.username, 'group:':request.usuario.user.groups.all()[0].name, 'first_name': request.usuario.user.first_name, 'last_name': request.usuario.user.last_name, 'is_active': request.usuario.user.is_active, 'last_login': request.usuario.user.last_login, 'date_joined': request.usuario.user.date_joined, 'departamento':request.usuario.departamento, 'registro': request.usuario.registro } return Response(data,status=status.HTTP_202_ACCEPTED) except: data = {"non_field_errors":["Unexpected error:" + str(sys.exc_info()[0])]} return Response(data,status=status.HTTP_400_BAD_REQUEST) finally: if settings.DEBUG: print ("Output: ",data) @api_view(['POST','DELETE']) @authentication_classes((TokenAuthentication,)) @permission_classes((AllowAll,)) def logout(request): data ={} if settings.DEBUG: print ("Input: {\"function\":\"",str(sys._getframe().f_code.co_name),"} ",end="") print ("{\"user:\"\"",str(request.user),"\"}") try: t=Token.objects.get(user=request.user) t.delete() Token.objects.create(user=request.user) data = {"status":"sucesso"} return Response(data,status=status.HTTP_202_ACCEPTED) except: data = {"non_field_errors":["Unexpected error:" + str(sys.exc_info()[0])]} return Response(data,status=status.HTTP_400_BAD_REQUEST,exception=True) finally: if settings.DEBUG: print ("Output: ",data) @api_view(['POST','GET']) @authentication_classes((TokenAuthentication,)) @permission_classes((AdminOnly,)) def CadastroFuncionario(request,typeOp): settingsUserGroups = SettingsUserGroups() jsonInput=json.loads(request.body.decode("utf-8")) data ={} group = settingsUserGroups.FuncGroup if settings.DEBUG: print ("Input: {\"function\":\"",str(sys._getframe().f_code.co_name),"} ",end="") print (jsonInput) try: cad = CadastroUsuario() cad.parser(jsonInput) cad.solicitante = request.user if not(cad.has_permission()): data = {"detail": "Você não tem permissão para executar essa ação."} return Response(data,status=status.HTTP_401_UNAUTHORIZED) if typeOp == "cadastrar" or typeOp == "cadastro" or typeOp == "create": data["PrimaryKey"] = cad.cadastrar(group=group) elif typeOp == "atualizar" or typeOp == "atualizacao" or typeOp == "update": cad.atualizar() elif typeOp == "deletar" or typeOp == "delecao" or typeOp == "delete": cad.deletar() else: return Response(data,status=status.HTTP_404_NOT_FOUND) data["status"] = "sucesso" return Response(data,status=status.HTTP_202_ACCEPTED) except: data = {"non_field_errors":["Unexpected error:" + str(sys.exc_info()[0])]} return Response(data,status=status.HTTP_400_BAD_REQUEST,exception=True) finally: if settings.DEBUG: print ("Output: ",data) @api_view(['POST','GET']) @authentication_classes((TokenAuthentication,)) @permission_classes((SuperAdminOnly,)) def CadastroAdministrador(request,typeOp): settingsUserGroups = SettingsUserGroups() jsonInput=json.loads(request.body.decode("utf-8")) data ={} group = settingsUserGroups.AdminGroup if settings.DEBUG: print ("Input: {\"function\":\"",str(sys._getframe().f_code.co_name),"} ",end="") print (jsonInput) try: cad = CadastroUsuario() cad.parser(jsonInput) cad.solicitante = request.user if typeOp == "cadastrar" or typeOp == "cadastro" or typeOp == "create": data["PrimaryKey"] = cad.cadastrar(group=group) elif typeOp == "atualizar" or typeOp == "atualizacao" or typeOp == "update": cad.atualizar() elif typeOp == "deletar" or typeOp == "delecao" or typeOp == "delete": cad.deletar() else: return Response(data,status=status.HTTP_404_NOT_FOUND) data["status"] = "sucesso" return Response(data,status=status.HTTP_202_ACCEPTED) except: data = {"non_field_errors":["Unexpected error:" + str(sys.exc_info()[0])]} return Response(data,status=status.HTTP_400_BAD_REQUEST,exception=True) finally: if settings.DEBUG: print ("Output: ",data) @api_view(['POST','GET']) @authentication_classes((TokenAuthentication,)) @permission_classes((SuperAdminOnly,)) def CadastroSuperAdministrador(request,typeOp): settingsUserGroups = SettingsUserGroups() jsonInput=json.loads(request.body.decode("utf-8")) data ={} group = settingsUserGroups.SuperAdminGroup if settings.DEBUG: print ("Input: {\"function\":\"",str(sys._getframe().f_code.co_name),"} ",end="") print (jsonInput) try: cad = CadastroUsuario() cad.parser(jsonInput) cad.solicitante = request.user if typeOp == "cadastrar" or typeOp == "cadastro" or typeOp == "create": data["PrimaryKey"] = cad.cadastrar(group=group) elif typeOp == "atualizar" or typeOp == "atualizacao" or typeOp == "update": cad.atualizar() else: return Response(data,status=status.HTTP_404_NOT_FOUND) data["status"] = "sucesso" return Response(data,status=status.HTTP_202_ACCEPTED) except: data = {"non_field_errors":["Unexpected error:" + str(sys.exc_info()[0])]} return Response(data,status=status.HTTP_400_BAD_REQUEST,exception=True) finally: if settings.DEBUG: print ("Output: ",data) @api_view(['POST','GET']) @authentication_classes((TokenAuthentication,)) @permission_classes((AllowAll,)) def CadastroAgendamentoController(request,typeOp): settingsUserGroups = SettingsUserGroups() jsonInput=json.loads(request.body.decode("utf-8")) data ={} if settings.DEBUG: print ("Input: {\"function\":\"",str(sys._getframe().f_code.co_name),"} ",end="") print (jsonInput) #try: cad = CadastroAgendamento() cad.parser(jsonInput) cad.solicitante = request.user if not(cad.has_permission()): data = {"detail": "Você não tem permissão para executar essa ação."} return Response(data,status=status.HTTP_401_UNAUTHORIZED) if typeOp == "cadastrar" or typeOp == "cadastro" or typeOp == "create": data["PrimaryKey"] = cad.cadastrar() elif typeOp == "deletar" or typeOp == "delecao" or typeOp == "delete": cad.deletar() else: return Response(data,status=status.HTTP_404_NOT_FOUND) data["status"] = "sucesso" return Response(data,status=status.HTTP_202_ACCEPTED) #except: data = {"non_field_errors":["Unexpected error:" + str(sys.exc_info()[0])]} # return Response(data,status=status.HTTP_400_BAD_REQUEST,exception=True) #finally: if settings.DEBUG: print ("Output: ",data) # Create your views here.
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,398
ESEGroup/Brasil
refs/heads/master
/app/tests/teste_recurso.py
from django.test import TestCase from app.models import BuscaRecurso, CadastroRecurso from random import randint class RecursoTests( TestCase ): test_registers_number = 0 nome = "nome" patrimonio_inicial = 1 endereco = "endereco" categoria = "000" descricao = "test resource" def setUp (self): self.test_registers_number = randint(10, 100) print ("Testing for " + str(self.test_registers_number) + " resources") patrimonio = self.patrimonio_inicial cr = CadastroRecurso() for i in range(self.test_registers_number): cr.cadastrar (self.nome, patrimonio, self.endereco, self.categoria, self.descricao) patrimonio += 1 #=====[ testes de cadastro ]==================================================== def test_cadastro(self): patrimonio = self.patrimonio_inicial + self.test_registers_number + 1 cr = CadastroRecurso() # simple (pass) self.assertEqual(cr.cadastrar (self.nome, patrimonio, self.endereco, self.categoria, self.descricao), True) # same id (fail) self.assertEqual(cr.cadastrar (self.nome, patrimonio, self.endereco, self.categoria, self.descricao), False) # delete last register self.assertEqual(cr.deletar (patrimonio), True) self.assertEqual(cr.deletar (patrimonio), False) # 200 character name (pass) patrimonio += 1 nome = "nxe40kpXTvCPa0T88aJSXemKYWZDXv06ssZfE4gW0xsJgsHKLRWIgamYlYceoZ5hcHGVDAeLZQNJm4tEJxcVypHhV0liPtI9mInlcm0MQemP1qS9qPf1I8bVgniH3Y2OFXF5tOPmX4NTz2q73YfL660sMYtz7JVQQZfBR8jchSUEo2PRrOBFHuxj52rNMy2ToJ49BvMP" self.assertEqual(cr.cadastrar (self.nome, patrimonio, self.endereco, self.categoria, self.descricao), True) self.assertEqual(cr.deletar (patrimonio), True) # 201 character name (pass) patrimonio += 1 nome += "A2323" self.assertEqual(cr.cadastrar (self.nome, patrimonio, self.endereco, self.categoria, self.descricao), True) self.assertEqual(cr.deletar (patrimonio), True) #=====[ testes de busca ]======================================================= def test_busca(self): # search all s = BuscaRecurso() s.params = '{"type": "complex",' s.params += '"texto": "",' s.params += '"categorias": [],' s.params += '"enderecos": [],' s.params += '"disponibilidades": [] }' res = s.buscar() self.assertEqual(len(res), self.test_registers_number) # search all by one of the categories s.params = '{"type": "complex",' s.params += '"texto": "",' s.params += '"categorias": ["000"],' s.params += '"enderecos": [],' s.params += '"disponibilidades": [] }' res = s.buscar() self.assertEqual(len(res), self.test_registers_number) s = BuscaRecurso() s.params = '{"type": "complex",' s.params += '"texto": "",' s.params += '"categorias": [],' s.params += '"enderecos": [],' s.params += '"disponibilidades": ["Indisponível"] }' res = s.buscar() self.assertEqual(len(res), self.test_registers_number) s = BuscaRecurso() s.params = '{"type": "complex",' s.params += '"texto": "",' s.params += '"categorias": [],' s.params += '"enderecos": ["endereco"],' s.params += '"disponibilidades": [] }' res = s.buscar() self.assertEqual(len(res), self.test_registers_number) #=====[ testes de atualização e deleção ]======================================= def test_edit(self): patrimonio = self.patrimonio_inicial cr = CadastroRecurso() for i in range(self.test_registers_number): self.assertEqual(cr.atualizar ( patrimonio, "novo nome", "", "novo endereco", "001", "Disponível"), True) s = BuscaRecurso() s.params = '{"type": "match", "id": ' + str(patrimonio) + '}' res = s.buscar() self.assertEqual(res.nome, "novo nome") self.assertEqual(res.estado, "Disponível") self.assertEqual(res.descricao, "") self.assertEqual(res.endereco, "novo endereco") self.assertEqual(res.categoria, "001") cr.deletar(patrimonio) patrimonio += 1 #===============================================================================
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,399
ESEGroup/Brasil
refs/heads/master
/app/serializers.py
from django.contrib.auth.models import User, Group from rest_framework import serializers from .models import Usuario class UserSerializer(serializers.ModelSerializer): class Meta: model = User #fields = '__all__' exclude = ('is_staff','user_permissions','password','is_superuser') class UsarioSerializer(serializers.ModelSerializer): user = UserSerializer() class Meta: model = Usuario # depth = 1 fields = '__all__' class GroupSerializer(serializers.ModelSerializer): class Meta: model = Group fields = ('name')
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,400
ESEGroup/Brasil
refs/heads/master
/app/migrations/0006_auto_20161219_1317.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-19 15:17 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0005_auto_20161119_1727'), ] operations = [ migrations.CreateModel( name='SettingsUserGroups', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ], ), migrations.AlterField( model_name='agendamento', name='estado', field=models.CharField(choices=[('Agendado', 'Agendado'), ('Cancelado', 'Cancelado'), ('Confirmado', 'Confirmado')], default='Agendado', max_length=12), ), ]
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,401
ESEGroup/Brasil
refs/heads/master
/app/models.py
from django.db import models # no getters and setters please (http://dirtsimple.org/2004/12/python-is-not-java.html)
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,402
ESEGroup/Brasil
refs/heads/master
/app/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-13 18:58 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='BancoAcesso', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ], options={ 'managed': False, }, ), migrations.CreateModel( name='BuscaRecurso', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ], options={ 'managed': False, }, ), migrations.CreateModel( name='BuscaUsuario', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ], options={ 'managed': False, }, ), migrations.CreateModel( name='CadastroRecurso', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ], options={ 'managed': False, }, ), migrations.CreateModel( name='CadastroUsuario', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ], options={ 'managed': False, }, ), migrations.CreateModel( name='NotificadorAgendamento', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ], options={ 'managed': False, }, ), migrations.CreateModel( name='NotificadorCadastro', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ], options={ 'managed': False, }, ), migrations.CreateModel( name='Recurso', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('nome', models.CharField(max_length=200)), ('endereco', models.CharField(max_length=200)), ('descricao', models.CharField(max_length=200)), ('patrimonio', models.PositiveIntegerField()), ('estado', models.CharField(choices=[('000', 'Desconhecido'), ('001', 'Monitor'), ('002', 'Projetor'), ('003', 'Acessório para computador'), ('004', 'Computador'), ('005', 'Material de escritório'), ('006', 'Móvel'), ('007', 'Sala de Aula'), ('008', 'Auditório'), ('009', 'Imóvel'), ('010', 'Equipamento laboratorial'), ('011', 'Equipamento de limpeza'), ('012', 'Equipamento métrico'), ('013', 'Equipamento de manutenção'), ('014', 'Outro equipamento')], default='000', max_length=3)), ], options={ 'db_table': 'Recursos', }, ), migrations.CreateModel( name='Usuario', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('registro', models.PositiveIntegerField()), ('nome', models.CharField(max_length=200)), ('departamento', models.CharField(max_length=200)), ('estado', models.PositiveSmallIntegerField()), ('tipo_perfil', models.PositiveSmallIntegerField()), ('email', models.EmailField(max_length=254)), ], options={ 'db_table': 'Usuarios', }, ), ]
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,403
ESEGroup/Brasil
refs/heads/master
/app/models/cadastro_agendamento.py
from django.db import models from app.models import Cadastro, Usuario, Agendamento, Recurso from django.contrib.auth.models import User, Group from .settingsgroups import SettingsUserGroups class CadastroAgendamento(Cadastro): notificador = None #NotificadorAgendamento solicitante = Usuario() settingsUserGroups = SettingsUserGroups() agendamento = Agendamento() agendamentoTemplate = Agendamento() agendamentoTemplate.usuario = Usuario() agendamentoTemplate.recurso = Recurso() def has_permission(self): if self.solicitante.groups.all()[0].pk == self.settingsUserGroups.SuperAdminGroup: return True elif self.solicitante.groups.all()[0].pk == self.settingsUserGroups.AdminGroup: usuario = Usuario.objects.get(user=self.solicitante) if self.agendamentoTemplate.usuario.departamento == usuario.departamento: return True else: return False elif self.solicitante.groups.all()[0].pk == self.settingsUserGroups.FuncGroup: if self.agendamentoTemplate.usuario.user == self.solicitante: return True else: return False else: return False return True def parser (self,json): #model : {"pk":"9","username":"anything", "patrimonio":"7","inicio":"2006-10-25 14:30:59","periodo":"7"} self.agendamentoTemplate.inicio = json["inicio"] self.agendamentoTemplate.periodo = json["periodo"] user = User.objects.get(username=json["username"]) self.agendamentoTemplate.usuario = Usuario.objects.get(user=user) self.agendamentoTemplate.recurso = Recurso.objects.get(patrimonio=int(json["patrimonio"])) if 'pk' in json.keys() and json['pk'] != '': self.agendamentoTemplate.pk=int(json['pk']) self.agendamento = Agendamento.objects.get(pk=self.agendamentoTemplate.pk) def cadastrar (self): self.agendamento = Agendamento.objects.create( usuario= self.agendamentoTemplate.usuario, recurso = self.agendamentoTemplate.recurso, inicio = self.agendamentoTemplate.inicio, periodo = self.agendamentoTemplate.periodo, estado = "Agendado" ) return self.agendamento.pk #falta notificação def deletar (self): self.agendamento.estado = "Cancelado" self.agendamento.save() ''' def atualizar (self): def notificar (self): return False ''' class Meta: managed = False app_label = 'app'
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,404
ESEGroup/Brasil
refs/heads/master
/app/migrations/0003_auto_20161113_1922.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-13 19:22 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0002_agendamento'), ] operations = [ migrations.AddField( model_name='recurso', name='categoria', field=models.CharField(choices=[('000', 'Desconhecido'), ('001', 'Monitor'), ('002', 'Projetor'), ('003', 'Acessório para computador'), ('004', 'Computador'), ('005', 'Material de escritório'), ('006', 'Móvel'), ('007', 'Sala de Aula'), ('008', 'Auditório'), ('009', 'Imóvel'), ('010', 'Equipamento laboratorial'), ('011', 'Equipamento de limpeza'), ('012', 'Equipamento métrico'), ('013', 'Equipamento de manutenção'), ('014', 'Outro equipamento')], default='000', max_length=3), ), migrations.AlterField( model_name='recurso', name='estado', field=models.CharField(choices=[('AV', 'Disponível'), ('UV', 'Indisponível'), ('MA', 'Em manutenção')], default='UV', max_length=2), ), ]
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,405
ESEGroup/Brasil
refs/heads/master
/app/permissions.py
from rest_framework.permissions import BasePermission from rest_framework.compat import is_authenticated from django.contrib.auth.models import User, Group from .models import SettingsUserGroups settingsUserGroups = SettingsUserGroups() class AllowAll(BasePermission): #Allows access only to authenticated users. def has_permission(self, request, view): return request.user and is_authenticated(request.user) class AdminOnly(BasePermission): #Allows access only to authenticated Admins. def has_permission(self, request, view): #group = request.user.groups.all()[0].pk if request.user and is_authenticated(request.user): return request.user.groups.filter(pk=settingsUserGroups.SuperAdminGroup).exists() or request.user.groups.filter(pk=settingsUserGroups.AdminGroup).exists() else: return False class SuperAdminOnly(BasePermission): #Allows access only to authenticated SuperAdmin. def has_permission(self, request, view): #group = request.user.groups.all()[0].pk if request.user and is_authenticated(request.user): return request.user.groups.filter(pk=settingsUserGroups.SuperAdminGroup).exists() else: return False
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,406
ESEGroup/Brasil
refs/heads/master
/app/models/recurso.py
from django.db import models class Recurso(models.Model): # no getters and setters please (http://dirtsimple.org/2004/12/python-is-not-java.html) nome = models.CharField(max_length=200) endereco = models.CharField(max_length=200) descricao = models.CharField(max_length=200) patrimonio = models.PositiveIntegerField() # state choices: ESTADO_CHOICES = ( ('Disponível', 'Disponível'), ('Indisponível', 'Indisponível'), ('Em manutenção', 'Em manutenção'), ) estado = models.CharField( max_length = 13, choices = ESTADO_CHOICES, default = 'Indisponível', ) categoria = models.CharField(max_length=200) # category choices: #CATEGORIA_CHOICES = ( # # unknown # ('000', 'Desconhecido'), # # classroom equipments # ('001', 'Monitor'), # ('002', 'Projetor'), # ('003', 'Acessório para computador'), # ('004', 'Computador'), # ('005', 'Material de escritório'), # ('006', 'Móvel'), # # rooms and buildings # ('007', 'Sala de Aula'), # ('008', 'Auditório'), # ('009', 'Imóvel'), # # other equipments # ('010', 'Equipamento laboratorial'), # ('011', 'Equipamento de limpeza'), # ('012', 'Equipamento métrico'), # ('013', 'Equipamento de manutenção'), # ('014', 'Outro equipamento'), #) #categoria = models.CharField( # max_length = 3, # choices = CATEGORIA_CHOICES, # default = '000', #) def __str__(self): return self.nome + ' - '+ str(self.patrimonio) class Meta: db_table = 'Recursos' app_label = 'app'
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,407
ESEGroup/Brasil
refs/heads/master
/app/models/gerenciador.py
from django.db import models class GerenciadorAgendamento (): acesso = None notificador = None def dataUltimaChecagem (): return 0 def rotina (): return False class Meta: managed = False app_label = 'app'
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,408
ESEGroup/Brasil
refs/heads/master
/app/models/notificador_cadastro.py
from django.db import models from app.models import Notificador class NotificadorCadastro (Notificador): cadastro_usuario = None #CadastroUsuario def construirMensagem (): return False class Meta: managed = False app_label = 'app'
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,409
ESEGroup/Brasil
refs/heads/master
/app/urls.py
from django.conf.urls import url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from rest_framework.authtoken import views as authviews from rest_framework.urlpatterns import format_suffix_patterns from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'about/$', views.about, name='about'), url(r'people/$', views.people, name='people'), url(r'person/$', views.person, name='person'), url(r'catalog/$', views.catalog, name='catalog'), url(r'catalog/searchCatalog/$', views.searchCatalog, name='search-catalog'), url(r'catalog/newResource/createNewResource/$', views.createNewResource, name='create_new_resource'), url(r'catalog/newResource/$', views.newResource, name='new_resource'), url(r'catalog/(?P<id>-?[0-9]+)/$', views.resource, name='resource'), url(r'catalog/(?P<patrimonio>-?[0-9]+)/updateResource/$', views.updateResource, name='update_resource'), ] urlpatterns += staticfiles_urlpatterns() #rest webservices urlpatterns +=[ url(r'^ws/login/$', authviews.obtain_auth_token, name='login'), url(r'^ws/logout/$', views.logout, name='logout'), url(r'^ws/getinfousuario/$', views.getInfoUsuario, name='getInfoUsuario'), url(r'^ws/(?P<typeOp>[\w\-]+)/funcionario/$', views.CadastroFuncionario, name='cadastroFuncionario'), url(r'^ws/(?P<typeOp>[\w\-]+)/administrador/$', views.CadastroAdministrador, name='cadastroAdministrador'), url(r'^ws/(?P<typeOp>[\w\-]+)/superadministrador/$', views.CadastroSuperAdministrador, name='cadastroSuperAdministrador'), url(r'^ws/(?P<typeOp>[\w\-]+)/agendamento/$', views.CadastroAgendamentoController, name='cadastroAgendamento'), ]
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}
9,410
ESEGroup/Brasil
refs/heads/master
/app/models/cadastro_recurso.py
from django.db import models from app.models import Usuario, Recurso, Cadastro, BuscaRecurso class CadastroRecurso(Cadastro): notificador = None #NotificadorCadastro recurso = None solicitante = None def cadastrar (self, nome, patrimonio, endereco, categoria, descricao): s = BuscaRecurso() s.params = '{"type": "match", "id": ' + str(patrimonio) + '}' #print(s.params) res = s.buscar() if res != "DoesNotExist ERROR": return False rec = Recurso(nome=nome, patrimonio=patrimonio, endereco=endereco, categoria=categoria, descricao=descricao) rec.save() return True def atualizar (self, patrimonio, nome, descricao, endereco, categoria, estado): s = BuscaRecurso() s.params = '{"type": "match", "id": ' + str(patrimonio) + '}' #print(s.params) res = s.buscar() if res == "DoesNotExist ERROR": # if resource already exists.. return False res.nome=nome res.endereco=endereco res.categoria=categoria res.descricao=descricao res.estado=estado res.save() return True def deletar (self, patrimonio): s = BuscaRecurso() s.params = '{"type": "match", "id": ' + str(patrimonio) + '}' #print(s.params) res = s.buscar() if res == "DoesNotExist ERROR": # if resource already exists.. return False res.delete() return True def notificar (): return False class Meta: managed = False app_label = 'app'
{"/app/models/__init__.py": ["/app/models/usuario.py", "/app/models/recurso.py", "/app/models/agendamento.py", "/app/models/cadastro.py", "/app/models/notificador.py", "/app/models/notificador_cadastro.py", "/app/models/notificador_agendamento.py", "/app/models/busca.py", "/app/models/cadastro_recurso.py", "/app/models/cadastro_usuario.py", "/app/models/cadastro_agendamento.py", "/app/models/gerenciador.py", "/app/models/settingsgroups.py"], "/app/models/busca.py": ["/app/models.py"], "/app/views.py": ["/app/models.py", "/app/permissions.py"], "/app/tests/teste_recurso.py": ["/app/models.py"], "/app/serializers.py": ["/app/models.py"], "/app/models/cadastro_agendamento.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/permissions.py": ["/app/models.py"], "/app/models/notificador_cadastro.py": ["/app/models.py"], "/app/models/cadastro_recurso.py": ["/app/models.py"], "/app/models/agendamento.py": ["/app/models.py"], "/app/models/cadastro_usuario.py": ["/app/models.py", "/app/models/settingsgroups.py"], "/app/models/notificador_agendamento.py": ["/app/models.py"]}