linkbreakers 1.149.2

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

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

/// WorkspaceTokensServiceUpdateBody : UpdateWorkspaceTokenRequest renames a token or changes what it may access.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WorkspaceTokensServiceUpdateBody {
    /// Set to true to give the token full access again. Cannot be combined with scopes.
    #[serde(rename = "fullAccess", skip_serializing_if = "Option::is_none")]
    pub full_access: Option<bool>,
    /// New name for the token. Left unchanged when omitted.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Replace the token's scopes with these. Cannot be combined with full_access.
    #[serde(rename = "scopes", skip_serializing_if = "Option::is_none")]
    pub scopes: Option<Vec<models::ApiScope>>,
}

impl WorkspaceTokensServiceUpdateBody {
    /// UpdateWorkspaceTokenRequest renames a token or changes what it may access.
    pub fn new() -> WorkspaceTokensServiceUpdateBody {
        WorkspaceTokensServiceUpdateBody {
            full_access: None,
            name: None,
            scopes: None,
        }
    }
}