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

from __future__ import annotations
import dataclasses
import requests as requests_http
from ...models.shared import sd_versions as shared_sd_versions
from dataclasses_json import Undefined, dataclass_json
from leonardoaisdk import utils
from typing import List, Optional


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class Loras:
    r"""columns and relationships of \\"elements\\" """
    UNSET='__SPEAKEASY_UNSET__'
    ak_uuid: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('akUUID'), 'exclude': lambda f: f is Loras.UNSET }})
    r"""Unique identifier for the element. Elements can be found from the List Elements endpoint."""
    base_model: Optional[shared_sd_versions.SdVersions] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('baseModel'), 'exclude': lambda f: f is None }})
    r"""The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5."""
    creator_name: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('creatorName'), 'exclude': lambda f: f is Loras.UNSET }})
    r"""Name of the creator of the element"""
    description: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description'), 'exclude': lambda f: f is Loras.UNSET }})
    r"""Description for the element"""
    name: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name'), 'exclude': lambda f: f is Loras.UNSET }})
    r"""Name of the element"""
    url_image: Optional[str] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('urlImage'), 'exclude': lambda f: f is Loras.UNSET }})
    r"""URL of the element image"""
    weight_default: Optional[int] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('weightDefault'), 'exclude': lambda f: f is Loras.UNSET }})
    r"""Default weight for the element"""
    weight_max: Optional[int] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('weightMax'), 'exclude': lambda f: f is Loras.UNSET }})
    r"""Maximum weight for the element"""
    weight_min: Optional[int] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('weightMin'), 'exclude': lambda f: f is Loras.UNSET }})
    r"""Minimum weight for the element"""
    



@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class GetElementsResponseBody:
    r"""Responses for GET /api/rest/v1/elements"""
    loras: Optional[List[Loras]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('loras'), 'exclude': lambda f: f is None }})
    



@dataclasses.dataclass
class GetElementsResponse:
    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[GetElementsResponseBody] = dataclasses.field(default=None)
    r"""Responses for GET /api/rest/v1/elements"""
    

