linkbreakers 1.146.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.146.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// ApplyQrcodeTemplateRequest : ApplyQrcodeTemplateRequest applies a community template's design to an existing link's QR code.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ApplyQrcodeTemplateRequest {
    #[serde(rename = "linkId")]
    pub link_id: String,
    /// Template to apply, addressed by ID. Use this for workspace templates that have never been published and therefore have no slug.
    #[serde(rename = "qrcodeTemplateId", skip_serializing_if = "Option::is_none")]
    pub qrcode_template_id: Option<String>,
    /// Slug of the QR code template to apply.  Only published and built-in templates carry a slug: it is the public identifier the gallery and the marketing site address them by. Supply qrcode_template_id instead for a workspace's own templates, which have none. Exactly one of the two is required.
    #[serde(rename = "templateSlug", skip_serializing_if = "Option::is_none")]
    pub template_slug: Option<String>,
}

impl ApplyQrcodeTemplateRequest {
    /// ApplyQrcodeTemplateRequest applies a community template's design to an existing link's QR code.
    pub fn new(link_id: String) -> ApplyQrcodeTemplateRequest {
        ApplyQrcodeTemplateRequest {
            link_id,
            qrcode_template_id: None,
            template_slug: None,
        }
    }
}