windmill-api 1.544.2

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.544.2
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateAccountRequest {
    #[serde(rename = "refresh_token", skip_serializing_if = "Option::is_none")]
    pub refresh_token: Option<String>,
    #[serde(rename = "expires_in")]
    pub expires_in: i32,
    #[serde(rename = "client")]
    pub client: String,
    #[serde(rename = "grant_type", skip_serializing_if = "Option::is_none")]
    pub grant_type: Option<String>,
    /// OAuth client ID for resource-level credentials (client_credentials flow only)
    #[serde(rename = "cc_client_id", skip_serializing_if = "Option::is_none")]
    pub cc_client_id: Option<String>,
    /// OAuth client secret for resource-level credentials (client_credentials flow only)
    #[serde(rename = "cc_client_secret", skip_serializing_if = "Option::is_none")]
    pub cc_client_secret: Option<String>,
    /// OAuth token URL override for resource-level authentication (client_credentials flow only)
    #[serde(rename = "cc_token_url", skip_serializing_if = "Option::is_none")]
    pub cc_token_url: Option<String>,
}

impl CreateAccountRequest {
    pub fn new(expires_in: i32, client: String) -> CreateAccountRequest {
        CreateAccountRequest {
            refresh_token: None,
            expires_in,
            client,
            grant_type: None,
            cc_client_id: None,
            cc_client_secret: None,
            cc_token_url: None,
        }
    }
}