aito.client.requests.job_api_request.CreateJobRequest

class aito.client.requests.job_api_request.CreateJobRequest(endpoint: str, query: Dict)

Bases: aito.client.requests.aito_request._PostRequest, aito.client.requests.aito_request._PatternEndpoint, aito.client.requests.job_api_request._JobAPIRequest

Request to create a job for an Aito API endpoint

Parameters
  • endpoint (str) – the job endpoint

  • query (Dict) – the query

Methods

from_data_api_request(request_obj)

Create a job from a DataAPI request

from_query_api_request(request_obj)

Create a job from a QueryAPI request

make_request(method, endpoint, query)

factory method to return the appropriate request class instance after checking the input endpoint and method :param method: the method of the request :type method: str :param endpoint: the endpoint of the request :type endpoint: str :param query: an Aito query if applicable, optional :type query: Optional[Union[Dict, List]] :return: the appropriate request class intsnace :rtype: AitoRequest

Attributes

endpoint_prefix

method

path

result_response_cls

returns the response class of the job request result

classmethod from_data_api_request(request_obj: aito.client.requests.data_api_request.DataAPIRequest)aito.client.requests.job_api_request.CreateJobRequest

Create a job from a DataAPI request

Parameters

request_obj (DataAPIRequest) – a DataAPIRequest instance

Returns

the corresponding create job request

Return type

CreateJobRequest

classmethod from_query_api_request(request_obj: aito.client.requests.query_api_request.QueryAPIRequest)aito.client.requests.job_api_request.CreateJobRequest

Create a job from a QueryAPI request

Parameters

request_obj (QueryAPIRequest) – a QueryAPIRequest instance

Returns

the corresponding create job request

Return type

CreateJobRequest

classmethod make_request(method: str, endpoint: str, query: Optional[Union[Dict, List]])aito.client.requests.aito_request.AitoRequest

factory method to return the appropriate request class instance after checking the input endpoint and method :param method: the method of the request :type method: str :param endpoint: the endpoint of the request :type endpoint: str :param query: an Aito query if applicable, optional :type query: Optional[Union[Dict, List]] :return: the appropriate request class intsnace :rtype: AitoRequest

response_cls

alias of aito.client.responses.job_api_response.CreateJobResponse

property result_response_cls

returns the response class of the job request result