Esempio n. 1
0
    def __init__(self,
                 first_name=None,
                 last_name=None,
                 login=None,
                 role=None,
                 groups=None,
                 gravatar_id=None,
                 local_vars_configuration=None):  # noqa: E501
        """Profile - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._first_name = None
        self._last_name = None
        self._login = None
        self._role = None
        self._groups = None
        self._gravatar_id = None
        self.discriminator = None

        if first_name is not None:
            self.first_name = first_name
        if last_name is not None:
            self.last_name = last_name
        self.login = login
        self.role = role
        if groups is not None:
            self.groups = groups
        if gravatar_id is not None:
            self.gravatar_id = gravatar_id
    def __init__(self,
                 id=None,
                 version=None,
                 title=None,
                 description=None,
                 maintainer=None,
                 url=None,
                 local_vars_configuration=None):  # noqa: E501
        """Solver - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._version = None
        self._title = None
        self._description = None
        self._maintainer = None
        self._url = None
        self.discriminator = None

        self.id = id
        self.version = version
        self.title = title
        if description is not None:
            self.description = description
        self.maintainer = maintainer
        self.url = url
Esempio n. 3
0
    def __init__(self,
                 id=None,
                 name=None,
                 inputs_checksum=None,
                 created_at=None,
                 runner_name=None,
                 url=None,
                 runner_url=None,
                 outputs_url=None,
                 local_vars_configuration=None):  # noqa: E501
        """Job - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._name = None
        self._inputs_checksum = None
        self._created_at = None
        self._runner_name = None
        self._url = None
        self._runner_url = None
        self._outputs_url = None
        self.discriminator = None

        self.id = id
        self.name = name
        self.inputs_checksum = inputs_checksum
        self.created_at = created_at
        self.runner_name = runner_name
        self.url = url
        self.runner_url = runner_url
        self.outputs_url = outputs_url
    def __init__(self,
                 name=None,
                 version=None,
                 released=None,
                 docs_url='https://docs.osparc.io',
                 docs_dev_url='https://api.osparc.io/dev/docs',
                 local_vars_configuration=None):  # noqa: E501
        """Meta - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._name = None
        self._version = None
        self._released = None
        self._docs_url = None
        self._docs_dev_url = None
        self.discriminator = None

        self.name = name
        self.version = version
        if released is not None:
            self.released = released
        if docs_url is not None:
            self.docs_url = docs_url
        if docs_dev_url is not None:
            self.docs_dev_url = docs_dev_url
Esempio n. 5
0
    def __init__(self,
                 job_id=None,
                 state=None,
                 progress=0,
                 submitted_at=None,
                 started_at=None,
                 stopped_at=None,
                 local_vars_configuration=None):  # noqa: E501
        """JobStatus - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._job_id = None
        self._state = None
        self._progress = None
        self._submitted_at = None
        self._started_at = None
        self._stopped_at = None
        self.discriminator = None

        self.job_id = job_id
        self.state = state
        if progress is not None:
            self.progress = progress
        self.submitted_at = submitted_at
        if started_at is not None:
            self.started_at = started_at
        if stopped_at is not None:
            self.stopped_at = stopped_at
    def __init__(self, file=None, local_vars_configuration=None):  # noqa: E501
        """BodyUploadFileV0FilesContentPut - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._file = None
        self.discriminator = None

        self.file = file
    def __init__(self,
                 values=None,
                 local_vars_configuration=None):  # noqa: E501
        """JobInputs - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._values = None
        self.discriminator = None

        self.values = values
Esempio n. 8
0
    def __init__(self,
                 errors=None,
                 local_vars_configuration=None):  # noqa: E501
        """HTTPValidationError - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._errors = None
        self.discriminator = None

        if errors is not None:
            self.errors = errors
    def __init__(self, first_name=None, last_name=None, local_vars_configuration=None):  # noqa: E501
        """ProfileUpdate - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._first_name = None
        self._last_name = None
        self.discriminator = None

        if first_name is not None:
            self.first_name = first_name
        if last_name is not None:
            self.last_name = last_name
Esempio n. 10
0
    def __init__(self,
                 job_id=None,
                 results=None,
                 local_vars_configuration=None):  # noqa: E501
        """JobOutputs - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._job_id = None
        self._results = None
        self.discriminator = None

        self.job_id = job_id
        self.results = results
Esempio n. 11
0
def api_client(registered_user) -> osparc.ApiClient:
    cfg = Configuration(
        host=os.environ.get("OSPARC_API_URL", "http://127.0.0.1:8006"),
        username=registered_user["api_key"],
        password=registered_user["api_secret"],
    )

    def as_dict(obj: object):
        return {
            attr: getattr(obj, attr)
            for attr in obj.__dict__.keys() if not attr.startswith("_")
        }

    print("cfg", pformat(as_dict(cfg)))

    with osparc.ApiClient(cfg) as api_client:
        yield api_client
Esempio n. 12
0
    def __init__(self,
                 loc=None,
                 msg=None,
                 type=None,
                 local_vars_configuration=None):  # noqa: E501
        """ValidationError - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._loc = None
        self._msg = None
        self._type = None
        self.discriminator = None

        self.loc = loc
        self.msg = msg
        self.type = type
    def __init__(self,
                 name=None,
                 version=None,
                 released=None,
                 local_vars_configuration=None):  # noqa: E501
        """Meta - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._name = None
        self._version = None
        self._released = None
        self.discriminator = None

        self.name = name
        self.version = version
        if released is not None:
            self.released = released
    def __init__(self,
                 configuration=None,
                 header_name=None,
                 header_value=None,
                 cookie=None,
                 pool_threads=1):
        if configuration is None:
            configuration = Configuration()
        self.configuration = configuration
        self.pool_threads = pool_threads

        self.rest_client = rest.RESTClientObject(configuration)
        self.default_headers = {}
        if header_name is not None:
            self.default_headers[header_name] = header_value
        self.cookie = cookie
        # Set default User-Agent.
        self.user_agent = 'osparc-api/0.3.0/python'
        self.client_side_validation = configuration.client_side_validation
    def __init__(self,
                 me=None,
                 organizations=[],
                 all=None,
                 local_vars_configuration=None):  # noqa: E501
        """Groups - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._me = None
        self._organizations = None
        self._all = None
        self.discriminator = None

        self.me = me
        if organizations is not None:
            self.organizations = organizations
        self.all = all
Esempio n. 16
0
    def __init__(self,
                 gid=None,
                 label=None,
                 description=None,
                 local_vars_configuration=None):  # noqa: E501
        """UsersGroup - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._gid = None
        self._label = None
        self._description = None
        self.discriminator = None

        self.gid = gid
        self.label = label
        if description is not None:
            self.description = description
Esempio n. 17
0
    def __init__(self,
                 id=None,
                 filename=None,
                 content_type=None,
                 checksum=None,
                 local_vars_configuration=None):  # noqa: E501
        """File - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._filename = None
        self._content_type = None
        self._checksum = None
        self.discriminator = None

        self.id = id
        self.filename = filename
        if content_type is not None:
            self.content_type = content_type
        if checksum is not None:
            self.checksum = checksum
 def __init__(self, local_vars_configuration=None):  # noqa: E501
     """UserRoleEnum - a model defined in OpenAPI"""  # noqa: E501
     if local_vars_configuration is None:
         local_vars_configuration = Configuration()
     self.local_vars_configuration = local_vars_configuration
     self.discriminator = None