hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * Hanzo Cloud API
 *
 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DataroomLink {
    /// AllowDownload is whether a visitor may download, rather than only view.
    #[serde(rename = "allowDownload", skip_serializing_if = "Option::is_none")]
    pub allow_download: Option<bool>,
    /// AllowList narrows which addresses pass the email gate. An entry may be a full address, an \"@domain.com\" suffix, or a bare \"domain.com\". An EMPTY list admits everyone.
    #[serde(rename = "allowList", skip_serializing_if = "Option::is_none")]
    pub allow_list: Option<Vec<String>>,
    /// CreatedAt is when the link was minted, in unix milliseconds.
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<i32>,
    /// DataroomId is the room the link opens, null for a single-document link.
    #[serde(rename = "dataroomId", skip_serializing_if = "Option::is_none")]
    pub dataroom_id: Option<String>,
    /// DenyList rejects addresses, in the same three forms as the allow list, and is checked BEFORE it — so deny always wins.
    #[serde(rename = "denyList", skip_serializing_if = "Option::is_none")]
    pub deny_list: Option<Vec<String>>,
    /// DocumentId is the document the link opens, null for a room link.
    #[serde(rename = "documentId", skip_serializing_if = "Option::is_none")]
    pub document_id: Option<String>,
    /// EmailProtected is whether a visitor must state an address to enter.
    #[serde(rename = "emailProtected", skip_serializing_if = "Option::is_none")]
    pub email_protected: Option<bool>,
    /// ExpiresAt is when the link closes, in unix milliseconds; null never expires.
    #[serde(rename = "expiresAt", skip_serializing_if = "Option::is_none")]
    pub expires_at: Option<i32>,
    /// HasPassword reports THAT a password is set. The stored form is a bcrypt hash and no route returns it.
    #[serde(rename = "hasPassword", skip_serializing_if = "Option::is_none")]
    pub has_password: Option<bool>,
    /// ID is the link id — the public token a visitor opens the room with.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// IsArchived is whether the link has been retired.
    #[serde(rename = "isArchived", skip_serializing_if = "Option::is_none")]
    pub is_archived: Option<bool>,
    /// LinkType is DATAROOM_LINK or DOCUMENT_LINK.
    #[serde(rename = "linkType", skip_serializing_if = "Option::is_none")]
    pub link_type: Option<String>,
    /// Name is the link's label, null when none was given.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// UpdatedAt is when the link last changed, in unix milliseconds.
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<i32>,
}

impl DataroomLink {
    pub fn new() -> DataroomLink {
        DataroomLink {
            allow_download: None,
            allow_list: None,
            created_at: None,
            dataroom_id: None,
            deny_list: None,
            document_id: None,
            email_protected: None,
            expires_at: None,
            has_password: None,
            id: None,
            is_archived: None,
            link_type: None,
            name: None,
            updated_at: None,
        }
    }
}