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

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

/// VisitorAttributeKey : VisitorAttributeKey is one attribute key seen in the workspace.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct VisitorAttributeKey {
    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
    pub key: Option<String>,
    /// 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>,
}

impl VisitorAttributeKey {
    /// VisitorAttributeKey is one attribute key seen in the workspace.
    pub fn new() -> VisitorAttributeKey {
        VisitorAttributeKey {
            key: None,
            r#type: None,
        }
    }
}
/// 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
    }
}