linkbreakers 1.82.0

Official Rust SDK for the Linkbreakers API
Documentation
/*
 * Linkbreakers API
 *
 * This is a documentation of all the APIs of Linkbreakers
 *
 * The version of the OpenAPI document: 1.82.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// PublicCreateQrcodeDesignRequest : PublicCreateQrcodeDesignRequest provisions a new reusable QR code styling preset.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PublicCreateQrcodeDesignRequest {
    #[serde(rename = "backgroundOptions", skip_serializing_if = "Option::is_none")]
    pub background_options: Option<Box<models::BackgroundOptions>>,
    /// The image to use as the central image of the QR Code. The file size limit is 3MB. It must be transmitted in a base64 string format when sending it through HTTP.
    #[serde(rename = "centralImageData", skip_serializing_if = "Option::is_none")]
    pub central_image_data: Option<String>,
    #[serde(rename = "centralImageMargin", skip_serializing_if = "Option::is_none")]
    pub central_image_margin: Option<i32>,
    #[serde(rename = "centralImageSize", skip_serializing_if = "Option::is_none")]
    pub central_image_size: Option<f64>,
    #[serde(rename = "cornersDotOptions", skip_serializing_if = "Option::is_none")]
    pub corners_dot_options: Option<Box<models::CornersDotOptions>>,
    #[serde(rename = "cornersSquareOptions", skip_serializing_if = "Option::is_none")]
    pub corners_square_options: Option<Box<models::CornersSquareOptions>>,
    #[serde(rename = "dotsOptions", skip_serializing_if = "Option::is_none")]
    pub dots_options: Option<Box<models::DotsOptions>>,
    #[serde(rename = "errorCorrectionLevel", skip_serializing_if = "Option::is_none")]
    pub error_correction_level: Option<String>,
    #[serde(rename = "height", skip_serializing_if = "Option::is_none")]
    pub height: Option<i32>,
    #[serde(rename = "hideBackgroundDots", skip_serializing_if = "Option::is_none")]
    pub hide_background_dots: Option<bool>,
    /// - OUTPUT_FILE_FORMAT_UNSPECIFIED: Output format not specified (defaults to PNG server-side)  - OUTPUT_FILE_FORMAT_SVG: Scalable Vector Graphics format for infinite resolution  - OUTPUT_FILE_FORMAT_PNG: Portable Network Graphics format with transparency support  - OUTPUT_FILE_FORMAT_JPEG: Joint Photographic Experts Group format for compressed images  - OUTPUT_FILE_FORMAT_WEBP: WebP format for modern web-optimized compression
    #[serde(rename = "outputFileFormat", skip_serializing_if = "Option::is_none")]
    pub output_file_format: Option<OutputFileFormat>,
    /// - SHAPE_UNSPECIFIED: Shape not specified (defaults to square modules)  - SHAPE_SQUARE: Traditional square modules for QR code data points  - SHAPE_CIRCLE: Circular modules for a rounded visual appearance
    #[serde(rename = "shape", skip_serializing_if = "Option::is_none")]
    pub shape: Option<Shape>,
    #[serde(rename = "width", skip_serializing_if = "Option::is_none")]
    pub width: Option<i32>,
}

impl PublicCreateQrcodeDesignRequest {
    /// PublicCreateQrcodeDesignRequest provisions a new reusable QR code styling preset.
    pub fn new() -> PublicCreateQrcodeDesignRequest {
        PublicCreateQrcodeDesignRequest {
            background_options: None,
            central_image_data: None,
            central_image_margin: None,
            central_image_size: None,
            corners_dot_options: None,
            corners_square_options: None,
            dots_options: None,
            error_correction_level: None,
            height: None,
            hide_background_dots: None,
            output_file_format: None,
            shape: None,
            width: None,
        }
    }
}
/// - OUTPUT_FILE_FORMAT_UNSPECIFIED: Output format not specified (defaults to PNG server-side)  - OUTPUT_FILE_FORMAT_SVG: Scalable Vector Graphics format for infinite resolution  - OUTPUT_FILE_FORMAT_PNG: Portable Network Graphics format with transparency support  - OUTPUT_FILE_FORMAT_JPEG: Joint Photographic Experts Group format for compressed images  - OUTPUT_FILE_FORMAT_WEBP: WebP format for modern web-optimized compression
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum OutputFileFormat {
    #[serde(rename = "OUTPUT_FILE_FORMAT_UNSPECIFIED")]
    OutputFileFormatUnspecified,
    #[serde(rename = "OUTPUT_FILE_FORMAT_SVG")]
    OutputFileFormatSvg,
    #[serde(rename = "OUTPUT_FILE_FORMAT_PNG")]
    OutputFileFormatPng,
    #[serde(rename = "OUTPUT_FILE_FORMAT_JPEG")]
    OutputFileFormatJpeg,
    #[serde(rename = "OUTPUT_FILE_FORMAT_WEBP")]
    OutputFileFormatWebp,
}

impl Default for OutputFileFormat {
    fn default() -> OutputFileFormat {
        Self::OutputFileFormatUnspecified
    }
}
/// - SHAPE_UNSPECIFIED: Shape not specified (defaults to square modules)  - SHAPE_SQUARE: Traditional square modules for QR code data points  - SHAPE_CIRCLE: Circular modules for a rounded visual appearance
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Shape {
    #[serde(rename = "SHAPE_UNSPECIFIED")]
    ShapeUnspecified,
    #[serde(rename = "SHAPE_SQUARE")]
    ShapeSquare,
    #[serde(rename = "SHAPE_CIRCLE")]
    ShapeCircle,
}

impl Default for Shape {
    fn default() -> Shape {
        Self::ShapeUnspecified
    }
}