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

from __future__ import annotations
import dataclasses
from enum import Enum
from typing import Optional


class Level(str, Enum):
    r"""The level of error correction to use for the QR code. Defaults to `L` if not provided."""
    L = 'L'
    M = 'M'
    Q = 'Q'
    H = 'H'


@dataclasses.dataclass
class GetQRCodeRequest:
    url: str = dataclasses.field(metadata={'query_param': { 'field_name': 'url', 'style': 'form', 'explode': True }})
    r"""The URL to generate a QR code for."""
    size: Optional[float] = dataclasses.field(default=600, metadata={'query_param': { 'field_name': 'size', 'style': 'form', 'explode': True }})
    r"""The size of the QR code in pixels. Defaults to `600` if not provided."""
    level: Optional[Level] = dataclasses.field(default=Level.L, metadata={'query_param': { 'field_name': 'level', 'style': 'form', 'explode': True }})
    r"""The level of error correction to use for the QR code. Defaults to `L` if not provided."""
    fg_color: Optional[str] = dataclasses.field(default='#000000', metadata={'query_param': { 'field_name': 'fgColor', 'style': 'form', 'explode': True }})
    r"""The foreground color of the QR code in hex format. Defaults to `#000000` if not provided."""
    bg_color: Optional[str] = dataclasses.field(default='#FFFFFF', metadata={'query_param': { 'field_name': 'bgColor', 'style': 'form', 'explode': True }})
    r"""The background color of the QR code in hex format. Defaults to `#ffffff` if not provided."""
    include_margin: Optional[bool] = dataclasses.field(default=True, metadata={'query_param': { 'field_name': 'includeMargin', 'style': 'form', 'explode': True }})
    r"""Whether to include a margin around the QR code. Defaults to `false` if not provided."""
    

