linkbreakers 1.91.5

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

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

/// CreateContactLinkRequest : Request to create a new contact card link.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateContactLinkRequest {
    #[serde(rename = "customDomainId", skip_serializing_if = "Option::is_none")]
    pub custom_domain_id: Option<String>,
    /// Optional fallback URL if vCard download fails or is not supported.
    #[serde(rename = "fallbackDestination", skip_serializing_if = "Option::is_none")]
    pub fallback_destination: Option<String>,
    /// The lead goal definition for the link. This is a text field that can be used to describe the lead goal or purpose of the link.
    #[serde(rename = "leadGoalDefinition", skip_serializing_if = "Option::is_none")]
    pub lead_goal_definition: Option<String>,
    /// The lead target definition for the link. This is a text field that can be used to describe the target lead criteria for the link.
    #[serde(rename = "leadTargetDefinition", skip_serializing_if = "Option::is_none")]
    pub lead_target_definition: Option<String>,
    /// A map of string key-value pairs. All values must be strings. Nested objects or arrays are not supported. Maximum of 50 keys.
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<std::collections::HashMap<String, String>>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// The QR Code design ID (UUID). If you include this value, the specified design will be associated to this link only. A design can belong to one record at a time (Link or QR Code Template). Trying to use a design that's already assigned will cause an error.
    #[serde(rename = "qrcodeDesignId", skip_serializing_if = "Option::is_none")]
    pub qrcode_design_id: Option<String>,
    /// The ID of the QR Code template (UUID) If not given, the default QR Code template will be used to generate the QR Code design.
    #[serde(rename = "qrcodeTemplateId", skip_serializing_if = "Option::is_none")]
    pub qrcode_template_id: Option<String>,
    /// The shortlink for the link If not given, the shortlink will be generated by the system.
    #[serde(rename = "shortlink", skip_serializing_if = "Option::is_none")]
    pub shortlink: Option<String>,
    /// List of tags to associate with the link. If a tag doesn't exist, it will be created.
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
    /// Contact information for the vCard link. This field is required.
    #[serde(rename = "vcardData")]
    pub vcard_data: Box<models::VCardData>,
    /// Wait for QR code generation to complete. Note: This makes the request slower compared to asynchronous generation.
    #[serde(rename = "waitForQrcode", skip_serializing_if = "Option::is_none")]
    pub wait_for_qrcode: Option<bool>,
}

impl CreateContactLinkRequest {
    /// Request to create a new contact card link.
    pub fn new(vcard_data: models::VCardData) -> CreateContactLinkRequest {
        CreateContactLinkRequest {
            custom_domain_id: None,
            fallback_destination: None,
            lead_goal_definition: None,
            lead_target_definition: None,
            metadata: None,
            name: None,
            qrcode_design_id: None,
            qrcode_template_id: None,
            shortlink: None,
            tags: None,
            vcard_data: Box::new(vcard_data),
            wait_for_qrcode: None,
        }
    }
}