"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""

from __future__ import annotations
import dataclasses
import requests as requests_http
from dataclasses_json import Undefined, dataclass_json
from leonardoaisdk import utils
from typing import Optional


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class UploadCanvasInitImageRequestBody:
    r"""Query parameters provided in the request body as a JSON object"""
    init_extension: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('initExtension') }})
    r"""Has to be png, jpg, jpeg, or webp."""
    mask_extension: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('maskExtension') }})
    r"""Has to be png, jpg, jpeg, or webp."""
    



@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class CanvasInitImageUploadOutput:
    UNSET='__SPEAKEASY_UNSET__'
    init_fields: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('initFields'), 'exclude': lambda f: f is CanvasInitImageUploadOutput.UNSET }})
    init_image_id: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('initImageId'), 'exclude': lambda f: f is CanvasInitImageUploadOutput.UNSET }})
    init_key: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('initKey'), 'exclude': lambda f: f is CanvasInitImageUploadOutput.UNSET }})
    init_url: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('initUrl'), 'exclude': lambda f: f is CanvasInitImageUploadOutput.UNSET }})
    mask_fields: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('maskFields'), 'exclude': lambda f: f is CanvasInitImageUploadOutput.UNSET }})
    mask_image_id: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('maskImageId'), 'exclude': lambda f: f is CanvasInitImageUploadOutput.UNSET }})
    mask_key: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('maskKey'), 'exclude': lambda f: f is CanvasInitImageUploadOutput.UNSET }})
    mask_url: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('maskUrl'), 'exclude': lambda f: f is CanvasInitImageUploadOutput.UNSET }})
    



@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class UploadCanvasInitImageResponseBody:
    r"""Responses for POST /canvas-init-image"""
    UNSET='__SPEAKEASY_UNSET__'
    upload_canvas_init_image: Optional[CanvasInitImageUploadOutput] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('uploadCanvasInitImage'), 'exclude': lambda f: f is UploadCanvasInitImageResponseBody.UNSET }})
    



@dataclasses.dataclass
class UploadCanvasInitImageResponse:
    content_type: str = dataclasses.field()
    r"""HTTP response content type for this operation"""
    status_code: int = dataclasses.field()
    r"""HTTP response status code for this operation"""
    raw_response: requests_http.Response = dataclasses.field()
    r"""Raw HTTP response; suitable for custom response parsing"""
    object: Optional[UploadCanvasInitImageResponseBody] = dataclasses.field(default=None)
    r"""Responses for POST /canvas-init-image"""
    

