windmill-api 1.848.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.848.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 TokenResponse {
    #[serde(rename = "access_token")]
    pub access_token: String,
    #[serde(rename = "expires_in", skip_serializing_if = "Option::is_none")]
    pub expires_in: Option<i32>,
    #[serde(rename = "refresh_token", skip_serializing_if = "Option::is_none")]
    pub refresh_token: Option<String>,
    #[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
    pub scope: Option<Vec<String>>,
    #[serde(rename = "grant_type", skip_serializing_if = "Option::is_none")]
    pub grant_type: Option<String>,
    /// Resource fields the provider's `connect_fields` picked on connect (Salesforce's instance_url, Docusign's account_id and base_uri, QuickBooks' realmId), for the connect dialog to prefill. 
    #[serde(rename = "resource_fields", skip_serializing_if = "Option::is_none")]
    pub resource_fields: Option<std::collections::HashMap<String, serde_json::Value>>,
}

impl TokenResponse {
    pub fn new(access_token: String) -> TokenResponse {
        TokenResponse {
            access_token,
            expires_in: None,
            refresh_token: None,
            scope: None,
            grant_type: None,
            resource_fields: None,
        }
    }
}