aito.client.responses.job_api_response.GetJobStatusResponse

class aito.client.responses.job_api_response.GetJobStatusResponse(json: Dict)

Bases: aito.client.responses.aito_response.BaseResponse

Response of the Get job status

Parameters

json (Dict) – the original JSON response of the request

Methods

from_deserialized_object(obj)

create a class object from a JSON deserialized object

from_json_string(json_string, **kwargs)

create an class object from a JSON string

json_schema()

the JSON schema of the class

json_schema_validate(obj)

Validate an object with the class json_schema Returns the object if validation success, else raise JsonValidationError

json_schema_validate_with_schema(obj, schema)

Validate an object with the given schema

to_json_serializable()

convert the object to an object that can be serialized to a JSON formatted string

to_json_string(**kwargs)

convert the object to a JSON string

Attributes

expires_at

when the job result will not be available, returns None if job hasn’t finished

finished

if the job has finished

id

the id of the job session

json

the original JSON response of the request

started_at

when the job was started

property expires_at

when the job result will not be available, returns None if job hasn’t finished

property finished

if the job has finished

classmethod from_deserialized_object(obj: Any)

create a class object from a JSON deserialized object

classmethod from_json_string(json_string: str, **kwargs)

create an class object from a JSON string

Parameters
  • json_string (str) – the JSON string

  • kwargs – the keyword arguments for json.loads method

property id

the id of the job session

property json

the original JSON response of the request

Return type

Dict

classmethod json_schema()

the JSON schema of the class

Return type

Dict

classmethod json_schema_validate(obj: Any)

Validate an object with the class json_schema Returns the object if validation success, else raise JsonValidationError

Parameters

obj (Any) – the object to be validated

Returns

the object if validation succeed

Return type

Any

json_schema_validate_with_schema(obj: Any, schema: Dict)

Validate an object with the given schema

Parameters
  • obj (Any) – the object to be validated

  • schema (Dict) – the schema to be validate against

Returns

the object if validation succeed

Return type

Any

property started_at

when the job was started

to_json_serializable()

convert the object to an object that can be serialized to a JSON formatted string

to_json_string(**kwargs)

convert the object to a JSON string

Parameters

kwargs – the keyword arguments for json.dumps method

Return type

str