1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
* Linkbreakers API
*
* This is a documentation of all the APIs of Linkbreakers
*
* The version of the OpenAPI document: 1.118.3
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// CreateLinkRequest : Request to create a new link.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateLinkRequest {
/// Enable conversion tracking by preserving lbid in redirect URL.
#[serde(rename = "conversionTracking", skip_serializing_if = "Option::is_none")]
pub conversion_tracking: Option<bool>,
/// Optional custom domain ID (UUID). Leave empty to use the default domain.
#[serde(rename = "customDomainId", skip_serializing_if = "Option::is_none")]
pub custom_domain_id: Option<String>,
/// The destination URL to shorten. This field is required.
#[serde(rename = "destination")]
pub destination: 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>,
#[serde(rename = "fallbackDestination", skip_serializing_if = "Option::is_none")]
pub fallback_destination: Option<String>,
/// Optional pre-generated link ID (UUID). Skipped from the AI tool schema: on a create there is no existing link to alias, so exposing it only invites the LLM to invent a raw UUID. The system generates the id and returns it as an alias in the response.
#[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).
#[serde(rename = "qrcodeDesignId", skip_serializing_if = "Option::is_none")]
pub qrcode_design_id: Option<String>,
#[serde(rename = "qrcodeTemplateId", skip_serializing_if = "Option::is_none")]
pub qrcode_template_id: Option<String>,
/// The shortlink (URL slug) for the link. If not given, a unique one is 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>>,
/// Wait for QR code generation to complete before returning response.
#[serde(rename = "waitForQrcode", skip_serializing_if = "Option::is_none")]
pub wait_for_qrcode: Option<bool>,
}
impl CreateLinkRequest {
/// Request to create a new link.
pub fn new(destination: String) -> CreateLinkRequest {
CreateLinkRequest {
conversion_tracking: None,
custom_domain_id: None,
destination,
directory_id: None,
fallback_destination: None,
id: None,
metadata: None,
name: None,
purpose: None,
qrcode_design_id: None,
qrcode_template_id: None,
shortlink: None,
tags: None,
wait_for_qrcode: None,
}
}
}