gravitino.dto.job.shell_job_template_dto.ShellJobTemplateDTO¶
- class gravitino.dto.job.shell_job_template_dto.ShellJobTemplateDTO(_job_type: JobType, _name: str, _executable: str, _comment: str | None = None, _arguments: List[str] | None = None, _environments: Dict[str, str] | None = None, _custom_fields: Dict[str, str] | None = None, _audit: AuditDTO | None = None, _scripts: List[str] | None = None)¶
Bases:
JobTemplateDTO
Represents a Shell Job Template Data Transfer Object (DTO).
- __init__(_job_type: JobType, _name: str, _executable: str, _comment: str | None = None, _arguments: List[str] | None = None, _environments: Dict[str, str] | None = None, _custom_fields: Dict[str, str] | None = None, _audit: AuditDTO | None = None, _scripts: List[str] | None = None) None ¶
Methods
__init__
(_job_type, _name, _executable[, ...])Returns the list of arguments for the job template.
Returns the audit information for the job template.
comment
()Returns the comment associated with the job template.
Returns custom fields for the job template.
Returns the environment variables for the job template.
Returns the executable associated with the job template.
from_dict
(kvs, *[, infer_missing])from_json
(s[, infer_missing])Creates a JobTemplateDTO from a JSON string.
job_type
()Returns the type of the job.
name
()Returns the name of the job template.
schema
(*[, infer_missing, only, exclude, ...])scripts
()Returns the scripts associated with the shell job template.
to_dict
([encode_json])to_json
(*[, skipkeys, ensure_ascii, ...])validate
()Validates the JobTemplateDTO.
Attributes
dataclass_json_config
- arguments() List[str] | None ¶
Returns the list of arguments for the job template.
- comment() str | None ¶
Returns the comment associated with the job template.
- custom_fields() Dict[str, str] | None ¶
Returns custom fields for the job template.
- environments() Dict[str, str] | None ¶
Returns the environment variables for the job template.
- executable() str ¶
Returns the executable associated with the job template.
- classmethod from_json(s: str, infer_missing: bool = False, **kwargs) JobTemplateDTO ¶
Creates a JobTemplateDTO from a JSON string.
- name() str ¶
Returns the name of the job template.
- scripts() List[str] | None ¶
Returns the scripts associated with the shell job template.
- validate() None ¶
Validates the JobTemplateDTO. Ensures that required fields are not null or empty.