You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
831 lines
33 KiB
Python
831 lines
33 KiB
Python
# Copyright (C) 2022 CVAT.ai Corporation
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
# CVAT REST API
|
|
#
|
|
# REST API for Computer Vision Annotation Tool (CVAT) # noqa: E501
|
|
#
|
|
# The version of the OpenAPI document: alpha (2.0)
|
|
# Contact: support@cvat.ai
|
|
# Generated by: https://openapi-generator.tech
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
import re # noqa: F401
|
|
import typing
|
|
from typing import TYPE_CHECKING
|
|
|
|
import urllib3
|
|
|
|
from cvat_sdk.api_client import ApiClient
|
|
from cvat_sdk.api_client import Endpoint as _Endpoint
|
|
from cvat_sdk.model_utils import date, datetime, file_type, none_type # noqa: F401
|
|
|
|
if TYPE_CHECKING:
|
|
# Enable introspection. Can't work normally due to cyclic imports
|
|
from cvat_sdk.apis import *
|
|
from cvat_sdk.models import *
|
|
|
|
|
|
class LambdaApi(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
|
|
self.create_functions_endpoint = _Endpoint(
|
|
settings={
|
|
"response_schema": None,
|
|
"auth": ["SignatureAuthentication", "basicAuth", "cookieAuth", "tokenAuth"],
|
|
"endpoint_path": "/api/lambda/functions/{func_id}",
|
|
"operation_id": "create_functions",
|
|
"http_method": "POST",
|
|
"servers": None,
|
|
},
|
|
params_map={
|
|
"all": [
|
|
"func_id",
|
|
"x_organization",
|
|
"org",
|
|
"org_id",
|
|
],
|
|
"required": [
|
|
"func_id",
|
|
],
|
|
"nullable": [],
|
|
"enum": [],
|
|
"validation": [
|
|
"func_id",
|
|
],
|
|
},
|
|
root_map={
|
|
"validations": {
|
|
("func_id",): {
|
|
"regex": {
|
|
"pattern": r"^[a-zA-Z0-9_.-]+$", # noqa: E501
|
|
},
|
|
},
|
|
},
|
|
"allowed_values": {},
|
|
"openapi_types": {
|
|
"func_id": (str,),
|
|
"x_organization": (str,),
|
|
"org": (str,),
|
|
"org_id": (int,),
|
|
},
|
|
"attribute_map": {
|
|
"func_id": "func_id",
|
|
"x_organization": "X-Organization",
|
|
"org": "org",
|
|
"org_id": "org_id",
|
|
},
|
|
"location_map": {
|
|
"func_id": "path",
|
|
"x_organization": "header",
|
|
"org": "query",
|
|
"org_id": "query",
|
|
},
|
|
"collection_format_map": {},
|
|
},
|
|
headers_map={
|
|
"accept": [],
|
|
"content_type": [],
|
|
},
|
|
api_client=api_client,
|
|
)
|
|
self.create_requests_endpoint = _Endpoint(
|
|
settings={
|
|
"response_schema": None,
|
|
"auth": ["SignatureAuthentication", "basicAuth", "cookieAuth", "tokenAuth"],
|
|
"endpoint_path": "/api/lambda/requests",
|
|
"operation_id": "create_requests",
|
|
"http_method": "POST",
|
|
"servers": None,
|
|
},
|
|
params_map={
|
|
"all": [
|
|
"x_organization",
|
|
"org",
|
|
"org_id",
|
|
],
|
|
"required": [],
|
|
"nullable": [],
|
|
"enum": [],
|
|
"validation": [],
|
|
},
|
|
root_map={
|
|
"validations": {},
|
|
"allowed_values": {},
|
|
"openapi_types": {
|
|
"x_organization": (str,),
|
|
"org": (str,),
|
|
"org_id": (int,),
|
|
},
|
|
"attribute_map": {
|
|
"x_organization": "X-Organization",
|
|
"org": "org",
|
|
"org_id": "org_id",
|
|
},
|
|
"location_map": {
|
|
"x_organization": "header",
|
|
"org": "query",
|
|
"org_id": "query",
|
|
},
|
|
"collection_format_map": {},
|
|
},
|
|
headers_map={
|
|
"accept": [],
|
|
"content_type": [],
|
|
},
|
|
api_client=api_client,
|
|
)
|
|
self.list_functions_endpoint = _Endpoint(
|
|
settings={
|
|
"response_schema": None,
|
|
"auth": ["SignatureAuthentication", "basicAuth", "cookieAuth", "tokenAuth"],
|
|
"endpoint_path": "/api/lambda/functions",
|
|
"operation_id": "list_functions",
|
|
"http_method": "GET",
|
|
"servers": None,
|
|
},
|
|
params_map={
|
|
"all": [
|
|
"x_organization",
|
|
"org",
|
|
"org_id",
|
|
],
|
|
"required": [],
|
|
"nullable": [],
|
|
"enum": [],
|
|
"validation": [],
|
|
},
|
|
root_map={
|
|
"validations": {},
|
|
"allowed_values": {},
|
|
"openapi_types": {
|
|
"x_organization": (str,),
|
|
"org": (str,),
|
|
"org_id": (int,),
|
|
},
|
|
"attribute_map": {
|
|
"x_organization": "X-Organization",
|
|
"org": "org",
|
|
"org_id": "org_id",
|
|
},
|
|
"location_map": {
|
|
"x_organization": "header",
|
|
"org": "query",
|
|
"org_id": "query",
|
|
},
|
|
"collection_format_map": {},
|
|
},
|
|
headers_map={
|
|
"accept": [],
|
|
"content_type": [],
|
|
},
|
|
api_client=api_client,
|
|
)
|
|
self.list_requests_endpoint = _Endpoint(
|
|
settings={
|
|
"response_schema": None,
|
|
"auth": ["SignatureAuthentication", "basicAuth", "cookieAuth", "tokenAuth"],
|
|
"endpoint_path": "/api/lambda/requests",
|
|
"operation_id": "list_requests",
|
|
"http_method": "GET",
|
|
"servers": None,
|
|
},
|
|
params_map={
|
|
"all": [
|
|
"x_organization",
|
|
"org",
|
|
"org_id",
|
|
],
|
|
"required": [],
|
|
"nullable": [],
|
|
"enum": [],
|
|
"validation": [],
|
|
},
|
|
root_map={
|
|
"validations": {},
|
|
"allowed_values": {},
|
|
"openapi_types": {
|
|
"x_organization": (str,),
|
|
"org": (str,),
|
|
"org_id": (int,),
|
|
},
|
|
"attribute_map": {
|
|
"x_organization": "X-Organization",
|
|
"org": "org",
|
|
"org_id": "org_id",
|
|
},
|
|
"location_map": {
|
|
"x_organization": "header",
|
|
"org": "query",
|
|
"org_id": "query",
|
|
},
|
|
"collection_format_map": {},
|
|
},
|
|
headers_map={
|
|
"accept": [],
|
|
"content_type": [],
|
|
},
|
|
api_client=api_client,
|
|
)
|
|
self.retrieve_functions_endpoint = _Endpoint(
|
|
settings={
|
|
"response_schema": (
|
|
{str: (bool, date, datetime, dict, float, int, list, str, none_type)},
|
|
),
|
|
"auth": ["SignatureAuthentication", "basicAuth", "cookieAuth", "tokenAuth"],
|
|
"endpoint_path": "/api/lambda/functions/{func_id}",
|
|
"operation_id": "retrieve_functions",
|
|
"http_method": "GET",
|
|
"servers": None,
|
|
},
|
|
params_map={
|
|
"all": [
|
|
"func_id",
|
|
"x_organization",
|
|
"org",
|
|
"org_id",
|
|
],
|
|
"required": [
|
|
"func_id",
|
|
],
|
|
"nullable": [],
|
|
"enum": [],
|
|
"validation": [
|
|
"func_id",
|
|
],
|
|
},
|
|
root_map={
|
|
"validations": {
|
|
("func_id",): {
|
|
"regex": {
|
|
"pattern": r"^[a-zA-Z0-9_.-]+$", # noqa: E501
|
|
},
|
|
},
|
|
},
|
|
"allowed_values": {},
|
|
"openapi_types": {
|
|
"func_id": (str,),
|
|
"x_organization": (str,),
|
|
"org": (str,),
|
|
"org_id": (int,),
|
|
},
|
|
"attribute_map": {
|
|
"func_id": "func_id",
|
|
"x_organization": "X-Organization",
|
|
"org": "org",
|
|
"org_id": "org_id",
|
|
},
|
|
"location_map": {
|
|
"func_id": "path",
|
|
"x_organization": "header",
|
|
"org": "query",
|
|
"org_id": "query",
|
|
},
|
|
"collection_format_map": {},
|
|
},
|
|
headers_map={
|
|
"accept": ["application/vnd.cvat+json"],
|
|
"content_type": [],
|
|
},
|
|
api_client=api_client,
|
|
)
|
|
self.retrieve_requests_endpoint = _Endpoint(
|
|
settings={
|
|
"response_schema": None,
|
|
"auth": ["SignatureAuthentication", "basicAuth", "cookieAuth", "tokenAuth"],
|
|
"endpoint_path": "/api/lambda/requests/{id}",
|
|
"operation_id": "retrieve_requests",
|
|
"http_method": "GET",
|
|
"servers": None,
|
|
},
|
|
params_map={
|
|
"all": [
|
|
"id",
|
|
"x_organization",
|
|
"org",
|
|
"org_id",
|
|
],
|
|
"required": [
|
|
"id",
|
|
],
|
|
"nullable": [],
|
|
"enum": [],
|
|
"validation": [],
|
|
},
|
|
root_map={
|
|
"validations": {},
|
|
"allowed_values": {},
|
|
"openapi_types": {
|
|
"id": (int,),
|
|
"x_organization": (str,),
|
|
"org": (str,),
|
|
"org_id": (int,),
|
|
},
|
|
"attribute_map": {
|
|
"id": "id",
|
|
"x_organization": "X-Organization",
|
|
"org": "org",
|
|
"org_id": "org_id",
|
|
},
|
|
"location_map": {
|
|
"id": "path",
|
|
"x_organization": "header",
|
|
"org": "query",
|
|
"org_id": "query",
|
|
},
|
|
"collection_format_map": {},
|
|
},
|
|
headers_map={
|
|
"accept": [],
|
|
"content_type": [],
|
|
},
|
|
api_client=api_client,
|
|
)
|
|
|
|
def create_functions(
|
|
self,
|
|
func_id: str,
|
|
*,
|
|
_parse_response: bool = True,
|
|
_request_timeout: typing.Union[int, float, tuple] = None,
|
|
_validate_inputs: bool = True,
|
|
_validate_outputs: bool = True,
|
|
_check_status: bool = True,
|
|
_spec_property_naming: bool = False,
|
|
_content_type: typing.Optional[str] = None,
|
|
_host_index: typing.Optional[int] = None,
|
|
_request_auths: typing.Optional[typing.List] = None,
|
|
_async_call: bool = False,
|
|
**kwargs,
|
|
) -> typing.Tuple[typing.Optional[None], urllib3.HTTPResponse]:
|
|
"""create_functions # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass _async_call=True
|
|
|
|
>>> thread = api.create_functions(func_id, _async_call=True)
|
|
>>> result = thread.get()
|
|
|
|
Args:
|
|
func_id (str):
|
|
|
|
Keyword Args:
|
|
x_organization (str): [optional]
|
|
org (str): Organization unique slug. [optional]
|
|
org_id (int): Organization identifier. [optional]
|
|
_parse_response (bool): if False, the response data will not be parsed,
|
|
None is returned for data.
|
|
Default is True.
|
|
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
one number provided, it will be total request timeout. It can also
|
|
be a pair (tuple) of (connection, read) timeouts.
|
|
Default is None.
|
|
_validate_inputs (bool): specifies if type checking
|
|
should be done one the data sent to the server.
|
|
Default is True.
|
|
_validate_outputs (bool): specifies if type checking
|
|
should be done one the data received from the server.
|
|
Default is True.
|
|
_check_status (bool): whether to check response status
|
|
for being positive or not.
|
|
Default is True
|
|
_spec_property_naming (bool): True if the variable names in the input data
|
|
are serialized names, as specified in the OpenAPI document.
|
|
False if the variable names in the input data
|
|
are pythonic names, e.g. snake case (default)
|
|
_content_type (str/None): force body content-type.
|
|
Default is None and content-type will be predicted by allowed
|
|
content-types and body.
|
|
_host_index (int/None): specifies the index of the server
|
|
that we want to use.
|
|
Default is read from the configuration.
|
|
_request_auths (list): set to override the auth_settings for an a single
|
|
request; this effectively ignores the authentication
|
|
in the spec for a single request.
|
|
Default is None
|
|
_async_call (bool): execute request asynchronously
|
|
|
|
Returns:
|
|
(None, HTTPResponse)
|
|
If the method is called asynchronously, returns the request
|
|
thread.
|
|
"""
|
|
kwargs["_async_call"] = _async_call
|
|
kwargs["_parse_response"] = _parse_response
|
|
kwargs["_request_timeout"] = _request_timeout
|
|
kwargs["_validate_inputs"] = _validate_inputs
|
|
kwargs["_validate_outputs"] = _validate_outputs
|
|
kwargs["_check_status"] = _check_status
|
|
kwargs["_spec_property_naming"] = _spec_property_naming
|
|
kwargs["_content_type"] = _content_type
|
|
kwargs["_host_index"] = _host_index
|
|
kwargs["_request_auths"] = _request_auths
|
|
kwargs["func_id"] = func_id
|
|
return self.create_functions_endpoint.call_with_http_info(**kwargs)
|
|
|
|
def create_requests(
|
|
self,
|
|
*,
|
|
_parse_response: bool = True,
|
|
_request_timeout: typing.Union[int, float, tuple] = None,
|
|
_validate_inputs: bool = True,
|
|
_validate_outputs: bool = True,
|
|
_check_status: bool = True,
|
|
_spec_property_naming: bool = False,
|
|
_content_type: typing.Optional[str] = None,
|
|
_host_index: typing.Optional[int] = None,
|
|
_request_auths: typing.Optional[typing.List] = None,
|
|
_async_call: bool = False,
|
|
**kwargs,
|
|
) -> typing.Tuple[typing.Optional[None], urllib3.HTTPResponse]:
|
|
"""Method calls the function # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass _async_call=True
|
|
|
|
>>> thread = api.create_requests(_async_call=True)
|
|
>>> result = thread.get()
|
|
|
|
|
|
Keyword Args:
|
|
x_organization (str): [optional]
|
|
org (str): Organization unique slug. [optional]
|
|
org_id (int): Organization identifier. [optional]
|
|
_parse_response (bool): if False, the response data will not be parsed,
|
|
None is returned for data.
|
|
Default is True.
|
|
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
one number provided, it will be total request timeout. It can also
|
|
be a pair (tuple) of (connection, read) timeouts.
|
|
Default is None.
|
|
_validate_inputs (bool): specifies if type checking
|
|
should be done one the data sent to the server.
|
|
Default is True.
|
|
_validate_outputs (bool): specifies if type checking
|
|
should be done one the data received from the server.
|
|
Default is True.
|
|
_check_status (bool): whether to check response status
|
|
for being positive or not.
|
|
Default is True
|
|
_spec_property_naming (bool): True if the variable names in the input data
|
|
are serialized names, as specified in the OpenAPI document.
|
|
False if the variable names in the input data
|
|
are pythonic names, e.g. snake case (default)
|
|
_content_type (str/None): force body content-type.
|
|
Default is None and content-type will be predicted by allowed
|
|
content-types and body.
|
|
_host_index (int/None): specifies the index of the server
|
|
that we want to use.
|
|
Default is read from the configuration.
|
|
_request_auths (list): set to override the auth_settings for an a single
|
|
request; this effectively ignores the authentication
|
|
in the spec for a single request.
|
|
Default is None
|
|
_async_call (bool): execute request asynchronously
|
|
|
|
Returns:
|
|
(None, HTTPResponse)
|
|
If the method is called asynchronously, returns the request
|
|
thread.
|
|
"""
|
|
kwargs["_async_call"] = _async_call
|
|
kwargs["_parse_response"] = _parse_response
|
|
kwargs["_request_timeout"] = _request_timeout
|
|
kwargs["_validate_inputs"] = _validate_inputs
|
|
kwargs["_validate_outputs"] = _validate_outputs
|
|
kwargs["_check_status"] = _check_status
|
|
kwargs["_spec_property_naming"] = _spec_property_naming
|
|
kwargs["_content_type"] = _content_type
|
|
kwargs["_host_index"] = _host_index
|
|
kwargs["_request_auths"] = _request_auths
|
|
return self.create_requests_endpoint.call_with_http_info(**kwargs)
|
|
|
|
def list_functions(
|
|
self,
|
|
*,
|
|
_parse_response: bool = True,
|
|
_request_timeout: typing.Union[int, float, tuple] = None,
|
|
_validate_inputs: bool = True,
|
|
_validate_outputs: bool = True,
|
|
_check_status: bool = True,
|
|
_spec_property_naming: bool = False,
|
|
_content_type: typing.Optional[str] = None,
|
|
_host_index: typing.Optional[int] = None,
|
|
_request_auths: typing.Optional[typing.List] = None,
|
|
_async_call: bool = False,
|
|
**kwargs,
|
|
) -> typing.Tuple[typing.Optional[None], urllib3.HTTPResponse]:
|
|
"""Method returns a list of functions # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass _async_call=True
|
|
|
|
>>> thread = api.list_functions(_async_call=True)
|
|
>>> result = thread.get()
|
|
|
|
|
|
Keyword Args:
|
|
x_organization (str): [optional]
|
|
org (str): Organization unique slug. [optional]
|
|
org_id (int): Organization identifier. [optional]
|
|
_parse_response (bool): if False, the response data will not be parsed,
|
|
None is returned for data.
|
|
Default is True.
|
|
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
one number provided, it will be total request timeout. It can also
|
|
be a pair (tuple) of (connection, read) timeouts.
|
|
Default is None.
|
|
_validate_inputs (bool): specifies if type checking
|
|
should be done one the data sent to the server.
|
|
Default is True.
|
|
_validate_outputs (bool): specifies if type checking
|
|
should be done one the data received from the server.
|
|
Default is True.
|
|
_check_status (bool): whether to check response status
|
|
for being positive or not.
|
|
Default is True
|
|
_spec_property_naming (bool): True if the variable names in the input data
|
|
are serialized names, as specified in the OpenAPI document.
|
|
False if the variable names in the input data
|
|
are pythonic names, e.g. snake case (default)
|
|
_content_type (str/None): force body content-type.
|
|
Default is None and content-type will be predicted by allowed
|
|
content-types and body.
|
|
_host_index (int/None): specifies the index of the server
|
|
that we want to use.
|
|
Default is read from the configuration.
|
|
_request_auths (list): set to override the auth_settings for an a single
|
|
request; this effectively ignores the authentication
|
|
in the spec for a single request.
|
|
Default is None
|
|
_async_call (bool): execute request asynchronously
|
|
|
|
Returns:
|
|
(None, HTTPResponse)
|
|
If the method is called asynchronously, returns the request
|
|
thread.
|
|
"""
|
|
kwargs["_async_call"] = _async_call
|
|
kwargs["_parse_response"] = _parse_response
|
|
kwargs["_request_timeout"] = _request_timeout
|
|
kwargs["_validate_inputs"] = _validate_inputs
|
|
kwargs["_validate_outputs"] = _validate_outputs
|
|
kwargs["_check_status"] = _check_status
|
|
kwargs["_spec_property_naming"] = _spec_property_naming
|
|
kwargs["_content_type"] = _content_type
|
|
kwargs["_host_index"] = _host_index
|
|
kwargs["_request_auths"] = _request_auths
|
|
return self.list_functions_endpoint.call_with_http_info(**kwargs)
|
|
|
|
def list_requests(
|
|
self,
|
|
*,
|
|
_parse_response: bool = True,
|
|
_request_timeout: typing.Union[int, float, tuple] = None,
|
|
_validate_inputs: bool = True,
|
|
_validate_outputs: bool = True,
|
|
_check_status: bool = True,
|
|
_spec_property_naming: bool = False,
|
|
_content_type: typing.Optional[str] = None,
|
|
_host_index: typing.Optional[int] = None,
|
|
_request_auths: typing.Optional[typing.List] = None,
|
|
_async_call: bool = False,
|
|
**kwargs,
|
|
) -> typing.Tuple[typing.Optional[None], urllib3.HTTPResponse]:
|
|
"""Method returns a list of requests # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass _async_call=True
|
|
|
|
>>> thread = api.list_requests(_async_call=True)
|
|
>>> result = thread.get()
|
|
|
|
|
|
Keyword Args:
|
|
x_organization (str): [optional]
|
|
org (str): Organization unique slug. [optional]
|
|
org_id (int): Organization identifier. [optional]
|
|
_parse_response (bool): if False, the response data will not be parsed,
|
|
None is returned for data.
|
|
Default is True.
|
|
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
one number provided, it will be total request timeout. It can also
|
|
be a pair (tuple) of (connection, read) timeouts.
|
|
Default is None.
|
|
_validate_inputs (bool): specifies if type checking
|
|
should be done one the data sent to the server.
|
|
Default is True.
|
|
_validate_outputs (bool): specifies if type checking
|
|
should be done one the data received from the server.
|
|
Default is True.
|
|
_check_status (bool): whether to check response status
|
|
for being positive or not.
|
|
Default is True
|
|
_spec_property_naming (bool): True if the variable names in the input data
|
|
are serialized names, as specified in the OpenAPI document.
|
|
False if the variable names in the input data
|
|
are pythonic names, e.g. snake case (default)
|
|
_content_type (str/None): force body content-type.
|
|
Default is None and content-type will be predicted by allowed
|
|
content-types and body.
|
|
_host_index (int/None): specifies the index of the server
|
|
that we want to use.
|
|
Default is read from the configuration.
|
|
_request_auths (list): set to override the auth_settings for an a single
|
|
request; this effectively ignores the authentication
|
|
in the spec for a single request.
|
|
Default is None
|
|
_async_call (bool): execute request asynchronously
|
|
|
|
Returns:
|
|
(None, HTTPResponse)
|
|
If the method is called asynchronously, returns the request
|
|
thread.
|
|
"""
|
|
kwargs["_async_call"] = _async_call
|
|
kwargs["_parse_response"] = _parse_response
|
|
kwargs["_request_timeout"] = _request_timeout
|
|
kwargs["_validate_inputs"] = _validate_inputs
|
|
kwargs["_validate_outputs"] = _validate_outputs
|
|
kwargs["_check_status"] = _check_status
|
|
kwargs["_spec_property_naming"] = _spec_property_naming
|
|
kwargs["_content_type"] = _content_type
|
|
kwargs["_host_index"] = _host_index
|
|
kwargs["_request_auths"] = _request_auths
|
|
return self.list_requests_endpoint.call_with_http_info(**kwargs)
|
|
|
|
def retrieve_functions(
|
|
self,
|
|
func_id: str,
|
|
*,
|
|
_parse_response: bool = True,
|
|
_request_timeout: typing.Union[int, float, tuple] = None,
|
|
_validate_inputs: bool = True,
|
|
_validate_outputs: bool = True,
|
|
_check_status: bool = True,
|
|
_spec_property_naming: bool = False,
|
|
_content_type: typing.Optional[str] = None,
|
|
_host_index: typing.Optional[int] = None,
|
|
_request_auths: typing.Optional[typing.List] = None,
|
|
_async_call: bool = False,
|
|
**kwargs,
|
|
) -> typing.Tuple[
|
|
typing.Optional[typing.Dict[str, typing.Union[typing.Any, none_type]]], urllib3.HTTPResponse
|
|
]:
|
|
"""Method returns the information about the function # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass _async_call=True
|
|
|
|
>>> thread = api.retrieve_functions(func_id, _async_call=True)
|
|
>>> result = thread.get()
|
|
|
|
Args:
|
|
func_id (str):
|
|
|
|
Keyword Args:
|
|
x_organization (str): [optional]
|
|
org (str): Organization unique slug. [optional]
|
|
org_id (int): Organization identifier. [optional]
|
|
_parse_response (bool): if False, the response data will not be parsed,
|
|
None is returned for data.
|
|
Default is True.
|
|
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
one number provided, it will be total request timeout. It can also
|
|
be a pair (tuple) of (connection, read) timeouts.
|
|
Default is None.
|
|
_validate_inputs (bool): specifies if type checking
|
|
should be done one the data sent to the server.
|
|
Default is True.
|
|
_validate_outputs (bool): specifies if type checking
|
|
should be done one the data received from the server.
|
|
Default is True.
|
|
_check_status (bool): whether to check response status
|
|
for being positive or not.
|
|
Default is True
|
|
_spec_property_naming (bool): True if the variable names in the input data
|
|
are serialized names, as specified in the OpenAPI document.
|
|
False if the variable names in the input data
|
|
are pythonic names, e.g. snake case (default)
|
|
_content_type (str/None): force body content-type.
|
|
Default is None and content-type will be predicted by allowed
|
|
content-types and body.
|
|
_host_index (int/None): specifies the index of the server
|
|
that we want to use.
|
|
Default is read from the configuration.
|
|
_request_auths (list): set to override the auth_settings for an a single
|
|
request; this effectively ignores the authentication
|
|
in the spec for a single request.
|
|
Default is None
|
|
_async_call (bool): execute request asynchronously
|
|
|
|
Returns:
|
|
({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, HTTPResponse)
|
|
If the method is called asynchronously, returns the request
|
|
thread.
|
|
"""
|
|
kwargs["_async_call"] = _async_call
|
|
kwargs["_parse_response"] = _parse_response
|
|
kwargs["_request_timeout"] = _request_timeout
|
|
kwargs["_validate_inputs"] = _validate_inputs
|
|
kwargs["_validate_outputs"] = _validate_outputs
|
|
kwargs["_check_status"] = _check_status
|
|
kwargs["_spec_property_naming"] = _spec_property_naming
|
|
kwargs["_content_type"] = _content_type
|
|
kwargs["_host_index"] = _host_index
|
|
kwargs["_request_auths"] = _request_auths
|
|
kwargs["func_id"] = func_id
|
|
return self.retrieve_functions_endpoint.call_with_http_info(**kwargs)
|
|
|
|
def retrieve_requests(
|
|
self,
|
|
id: int,
|
|
*,
|
|
_parse_response: bool = True,
|
|
_request_timeout: typing.Union[int, float, tuple] = None,
|
|
_validate_inputs: bool = True,
|
|
_validate_outputs: bool = True,
|
|
_check_status: bool = True,
|
|
_spec_property_naming: bool = False,
|
|
_content_type: typing.Optional[str] = None,
|
|
_host_index: typing.Optional[int] = None,
|
|
_request_auths: typing.Optional[typing.List] = None,
|
|
_async_call: bool = False,
|
|
**kwargs,
|
|
) -> typing.Tuple[typing.Optional[None], urllib3.HTTPResponse]:
|
|
"""Method returns the status of the request # noqa: E501
|
|
|
|
This method makes a synchronous HTTP request by default. To make an
|
|
asynchronous HTTP request, please pass _async_call=True
|
|
|
|
>>> thread = api.retrieve_requests(id, _async_call=True)
|
|
>>> result = thread.get()
|
|
|
|
Args:
|
|
id (int): Request id
|
|
|
|
Keyword Args:
|
|
x_organization (str): [optional]
|
|
org (str): Organization unique slug. [optional]
|
|
org_id (int): Organization identifier. [optional]
|
|
_parse_response (bool): if False, the response data will not be parsed,
|
|
None is returned for data.
|
|
Default is True.
|
|
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
one number provided, it will be total request timeout. It can also
|
|
be a pair (tuple) of (connection, read) timeouts.
|
|
Default is None.
|
|
_validate_inputs (bool): specifies if type checking
|
|
should be done one the data sent to the server.
|
|
Default is True.
|
|
_validate_outputs (bool): specifies if type checking
|
|
should be done one the data received from the server.
|
|
Default is True.
|
|
_check_status (bool): whether to check response status
|
|
for being positive or not.
|
|
Default is True
|
|
_spec_property_naming (bool): True if the variable names in the input data
|
|
are serialized names, as specified in the OpenAPI document.
|
|
False if the variable names in the input data
|
|
are pythonic names, e.g. snake case (default)
|
|
_content_type (str/None): force body content-type.
|
|
Default is None and content-type will be predicted by allowed
|
|
content-types and body.
|
|
_host_index (int/None): specifies the index of the server
|
|
that we want to use.
|
|
Default is read from the configuration.
|
|
_request_auths (list): set to override the auth_settings for an a single
|
|
request; this effectively ignores the authentication
|
|
in the spec for a single request.
|
|
Default is None
|
|
_async_call (bool): execute request asynchronously
|
|
|
|
Returns:
|
|
(None, HTTPResponse)
|
|
If the method is called asynchronously, returns the request
|
|
thread.
|
|
"""
|
|
kwargs["_async_call"] = _async_call
|
|
kwargs["_parse_response"] = _parse_response
|
|
kwargs["_request_timeout"] = _request_timeout
|
|
kwargs["_validate_inputs"] = _validate_inputs
|
|
kwargs["_validate_outputs"] = _validate_outputs
|
|
kwargs["_check_status"] = _check_status
|
|
kwargs["_spec_property_naming"] = _spec_property_naming
|
|
kwargs["_content_type"] = _content_type
|
|
kwargs["_host_index"] = _host_index
|
|
kwargs["_request_auths"] = _request_auths
|
|
kwargs["id"] = id
|
|
return self.retrieve_requests_endpoint.call_with_http_info(**kwargs)
|