linkbreakers 1.150.0

Official Rust SDK for the Linkbreakers API
Documentation
/*
 * Linkbreakers API
 *
 * This is a documentation of all the APIs of Linkbreakers  ## Entry points  `GET https://api.linkbreakers.com/` and `GET https://api.linkbreakers.com/v1` answer without credentials with the API's name, version and links. This document is served at `https://api.linkbreakers.com/openapi.json`.  ## Rate limits  Every response describes where the caller stands in the IETF `RateLimit-Policy` and `RateLimit` header fields (draft-ietf-httpapi-ratelimit-headers), and in `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset` and `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (a Unix timestamp) for clients that read those. A request past the limit gets `429 Too Many Requests` with `Retry-After` in seconds.  - Workspace API token: 600 requests per 60 seconds, per token. - Dashboard session or OAuth token: 500 requests per 60 seconds, per token. - No credentials: 300 requests per 60 seconds, per client IP.  Each plan also includes a number of API calls per billing cycle. Past it, calls answer `429` with the code `MAX_PUBLIC_API_QUERIED_REACHED` until the cycle renews or the plan changes.
 *
 * The version of the OpenAPI document: 1.150.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// FunnelStep : FunnelStep is one step of the journey, already placed in order.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FunnelStep {
    /// Choices offered inside this step, where it offers one. A multi-link step is a single row but several different things happened in it.
    #[serde(rename = "branches", skip_serializing_if = "Option::is_none")]
    pub branches: Option<Vec<models::FunnelBranch>>,
    #[serde(rename = "conversionRate", skip_serializing_if = "Option::is_none")]
    pub conversion_rate: Option<f64>,
    #[serde(rename = "dropOffFromPrevious", skip_serializing_if = "Option::is_none")]
    pub drop_off_from_previous: Option<String>,
    #[serde(rename = "identifiedVisitors", skip_serializing_if = "Option::is_none")]
    pub identified_visitors: Option<String>,
    /// Interactions as a percentage of occurrences.  The action is recorded on the trace the step already opened, so both counts come from the same rows and this cannot exceed 100, however many times one visitor pressed. Branch shares can add up past 100, which is a different and honest number: a social links page is not a fork, and one visitor may open every link on it.
    #[serde(rename = "interactionRate", skip_serializing_if = "Option::is_none")]
    pub interaction_rate: Option<f64>,
    /// Journeys where the visitor acted on the step rather than only reaching it: pressing a link on a social links page, choosing a button on a multi-link. Zero on steps that offer nothing to act on.
    #[serde(rename = "interactions", skip_serializing_if = "Option::is_none")]
    pub interactions: Option<String>,
    #[serde(rename = "occurrences", skip_serializing_if = "Option::is_none")]
    pub occurrences: Option<String>,
    #[serde(rename = "stepAction", skip_serializing_if = "Option::is_none")]
    pub step_action: Option<String>,
    #[serde(rename = "stepKind", skip_serializing_if = "Option::is_none")]
    pub step_kind: Option<String>,
    /// Journeys that reached this step, counted per event. Events are used rather than visitors because visitor_id is NULL on most traces in practice, and counting visitors makes later steps look wider than the arrival they came from, which pushes conversion rates above 100%.
    #[serde(rename = "visits", skip_serializing_if = "Option::is_none")]
    pub visits: Option<String>,
}

impl FunnelStep {
    /// FunnelStep is one step of the journey, already placed in order.
    pub fn new() -> FunnelStep {
        FunnelStep {
            branches: None,
            conversion_rate: None,
            drop_off_from_previous: None,
            identified_visitors: None,
            interaction_rate: None,
            interactions: None,
            occurrences: None,
            step_action: None,
            step_kind: None,
            visits: None,
        }
    }
}