windmill_api/models/
create_account_request.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.519.2
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CreateAccountRequest {
16    #[serde(rename = "refresh_token", skip_serializing_if = "Option::is_none")]
17    pub refresh_token: Option<String>,
18    #[serde(rename = "expires_in")]
19    pub expires_in: i32,
20    #[serde(rename = "client")]
21    pub client: String,
22    #[serde(rename = "grant_type", skip_serializing_if = "Option::is_none")]
23    pub grant_type: Option<String>,
24    /// OAuth client ID for resource-level credentials (client_credentials flow only)
25    #[serde(rename = "cc_client_id", skip_serializing_if = "Option::is_none")]
26    pub cc_client_id: Option<String>,
27    /// OAuth client secret for resource-level credentials (client_credentials flow only)
28    #[serde(rename = "cc_client_secret", skip_serializing_if = "Option::is_none")]
29    pub cc_client_secret: Option<String>,
30    /// OAuth token URL override for resource-level authentication (client_credentials flow only)
31    #[serde(rename = "cc_token_url", skip_serializing_if = "Option::is_none")]
32    pub cc_token_url: Option<String>,
33}
34
35impl CreateAccountRequest {
36    pub fn new(expires_in: i32, client: String) -> CreateAccountRequest {
37        CreateAccountRequest {
38            refresh_token: None,
39            expires_in,
40            client,
41            grant_type: None,
42            cc_client_id: None,
43            cc_client_secret: None,
44            cc_token_url: None,
45        }
46    }
47}
48