linkbreakers 1.128.2

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.128.2
 * 
 * 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 {
    /// Optional custom domain ID (UUID). Leave empty to use the default domain. Only provide if the user explicitly asks for a specific custom domain.
    #[serde(rename = "customDomainId", skip_serializing_if = "Option::is_none")]
    pub custom_domain_id: Option<String>,
    /// Directory to organize this link into. If empty, link is created at root level.
    #[serde(rename = "directoryId", skip_serializing_if = "Option::is_none")]
    pub directory_id: Option<String>,
    /// Where visitors are sent once the link has expired. Empty serves the built-in expired page instead.
    #[serde(rename = "expiredDestination", skip_serializing_if = "Option::is_none")]
    pub expired_destination: Option<String>,
    /// When the link stops resolving. Empty means it never expires. Must be in the future. Once it passes the link is removed from the workspace and only the expired destination is served.
    #[serde(rename = "expiresAt", skip_serializing_if = "Option::is_none")]
    pub expires_at: 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>,
    /// Optional pre-generated link ID (UUID). The create wizard generates the id up front and navigates to it, so the link has to be created with that id or the page waits on a link that never arrives. Skipped from the AI tool schema for the same reason as on CreateLinkRequest: on a create there is nothing to alias, and exposing it only invites the model to invent a UUID.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: 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>,
    /// What the user is trying to achieve with this link, in one or two sentences. Lead scoring weights the link from this, and the link's assistant conversations read it as context, so it is restated whenever the workflow changes shape.
    #[serde(rename = "purpose", skip_serializing_if = "Option::is_none")]
    pub purpose: 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,
            directory_id: None,
            expired_destination: None,
            expires_at: None,
            fallback_destination: None,
            id: None,
            metadata: None,
            name: None,
            purpose: None,
            qrcode_design_id: None,
            qrcode_template_id: None,
            shortlink: None,
            tags: None,
            vcard_data: Box::new(vcard_data),
            wait_for_qrcode: None,
        }
    }
}