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
80
/*
* Linkbreakers API
*
* This is a documentation of all the APIs of Linkbreakers
*
* The version of the OpenAPI document: 1.147.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// AttributeWrite : One value saved to the visitor's profile.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AttributeWrite {
/// The attribute key, such as \"looking_for\" or \"book_a_viewing_at\". Letters, digits, \"_\", \"-\" and \".\"; keys starting with \"$\" are reserved.
#[serde(rename = "key", skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
/// - ATTRIBUTE_WRITE_MODE_SET: Overwrite, so the profile holds the latest value. - ATTRIBUTE_WRITE_MODE_SET_ONCE: Keep the first value, for first-touch facts.
#[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
pub mode: Option<Mode>,
/// VisitorAttributeType is what a value was captured as. It decides how the value is parsed and which analytics the key can support, which the value alone cannot tell you: \"8\" from a rating field and \"8\" typed into a text box are different facts.
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub r#type: Option<Type>,
/// Literal text, or a template filled in when the visitor goes through the step: {{now}}, {{link.name}}, {{link.metadata.<key>}}, and on MULTI_LINK steps {{choice.label}} and {{choice.id}} for the button tapped. A write whose value comes out empty is skipped.
#[serde(rename = "value", skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
impl AttributeWrite {
/// One value saved to the visitor's profile.
pub fn new() -> AttributeWrite {
AttributeWrite {
key: None,
mode: None,
r#type: None,
value: None,
}
}
}
/// - ATTRIBUTE_WRITE_MODE_SET: Overwrite, so the profile holds the latest value. - ATTRIBUTE_WRITE_MODE_SET_ONCE: Keep the first value, for first-touch facts.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Mode {
#[serde(rename = "ATTRIBUTE_WRITE_MODE_UNSPECIFIED")]
AttributeWriteModeUnspecified,
#[serde(rename = "ATTRIBUTE_WRITE_MODE_SET")]
AttributeWriteModeSet,
#[serde(rename = "ATTRIBUTE_WRITE_MODE_SET_ONCE")]
AttributeWriteModeSetOnce,
}
impl Default for Mode {
fn default() -> Mode {
Self::AttributeWriteModeUnspecified
}
}
/// VisitorAttributeType is what a value was captured as. It decides how the value is parsed and which analytics the key can support, which the value alone cannot tell you: \"8\" from a rating field and \"8\" typed into a text box are different facts.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "VISITOR_ATTRIBUTE_TYPE_UNSPECIFIED")]
VisitorAttributeTypeUnspecified,
#[serde(rename = "VISITOR_ATTRIBUTE_TYPE_STRING")]
VisitorAttributeTypeString,
#[serde(rename = "VISITOR_ATTRIBUTE_TYPE_NUMBER")]
VisitorAttributeTypeNumber,
#[serde(rename = "VISITOR_ATTRIBUTE_TYPE_BOOLEAN")]
VisitorAttributeTypeBoolean,
#[serde(rename = "VISITOR_ATTRIBUTE_TYPE_DATE")]
VisitorAttributeTypeDate,
#[serde(rename = "VISITOR_ATTRIBUTE_TYPE_ENUM")]
VisitorAttributeTypeEnum,
}
impl Default for Type {
fn default() -> Type {
Self::VisitorAttributeTypeUnspecified
}
}