# This file was generated by liblab | https://liblab.com/

from .utils.json_map import JsonMap
from .base import BaseModel


@JsonMap({"aspect_ratio": "aspectRatio"})
class Cuts(BaseModel):
    """Cuts

    :param aspect_ratio: aspect_ratio, defaults to None
    :type aspect_ratio: str, optional
    :param width: width, defaults to None
    :type width: float, optional
    :param height: height, defaults to None
    :type height: float, optional
    :param src: src, defaults to None
    :type src: str, optional
    :param at2x: at2x, defaults to None
    :type at2x: str, optional
    :param at3x: at3x, defaults to None
    :type at3x: str, optional
    """

    def __init__(
        self,
        aspect_ratio: str = None,
        width: float = None,
        height: float = None,
        src: str = None,
        at2x: str = None,
        at3x: str = None,
    ):
        if aspect_ratio is not None:
            self.aspect_ratio = aspect_ratio
        if width is not None:
            self.width = width
        if height is not None:
            self.height = height
        if src is not None:
            self.src = src
        if at2x is not None:
            self.at2x = at2x
        if at3x is not None:
            self.at3x = at3x


@JsonMap({"alt_text": "altText"})
class Photo(BaseModel):
    """Photo

    :param title: title, defaults to None
    :type title: str, optional
    :param alt_text: alt_text, defaults to None
    :type alt_text: str, optional
    :param cuts: cuts, defaults to None
    :type cuts: Cuts, optional
    """

    def __init__(self, title: str = None, alt_text: str = None, cuts: Cuts = None):
        if title is not None:
            self.title = title
        if alt_text is not None:
            self.alt_text = alt_text
        if cuts is not None:
            self.cuts = self._define_object(cuts, Cuts)
