DFPrintJobUploadRequest.py 929 B

123456789101112131415161718192021222324
  1. # Copyright (c) 2021 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from typing import Optional
  4. from .BaseModel import BaseModel
  5. # Model that represents the request to upload a print job to the cloud
  6. class DFPrintJobUploadRequest(BaseModel):
  7. def __init__(self, job_name: str, file_size: int, content_type: str, library_project_id: str, source_file_id: str, **kwargs) -> None:
  8. """Creates a new print job upload request.
  9. :param job_name: The name of the print job.
  10. :param file_size: The size of the file in bytes.
  11. :param content_type: The content type of the print job (e.g. text/plain or application/gzip)
  12. """
  13. self.job_name = job_name
  14. self.file_size = file_size
  15. self.content_type = content_type
  16. self.library_project_id = library_project_id
  17. self.source_file_id = source_file_id
  18. super().__init__(**kwargs)