appwrite_openapi 1.0.0

AUTO-GENERATED client for Appwrite. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
Documentation
/*
 * Appwrite
 *
 * Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
 *
 * The version of the OpenAPI document: 1.4.9
 * Contact: team@appwrite.io
 * Generated by: https://openapi-generator.tech
 */

/// Session : Session



#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Session {
    /// Session ID.
    #[serde(rename = "$id")]
    pub dollar_id: String,
    /// Session creation date in ISO 8601 format.
    #[serde(rename = "$createdAt")]
    pub dollar_created_at: String,
    /// User ID.
    #[serde(rename = "userId")]
    pub user_id: String,
    /// Session expiration date in ISO 8601 format.
    #[serde(rename = "expire")]
    pub expire: String,
    /// Session Provider.
    #[serde(rename = "provider")]
    pub provider: String,
    /// Session Provider User ID.
    #[serde(rename = "providerUid")]
    pub provider_uid: String,
    /// Session Provider Access Token.
    #[serde(rename = "providerAccessToken")]
    pub provider_access_token: String,
    /// The date of when the access token expires in ISO 8601 format.
    #[serde(rename = "providerAccessTokenExpiry")]
    pub provider_access_token_expiry: String,
    /// Session Provider Refresh Token.
    #[serde(rename = "providerRefreshToken")]
    pub provider_refresh_token: String,
    /// IP in use when the session was created.
    #[serde(rename = "ip")]
    pub ip: String,
    /// Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).
    #[serde(rename = "osCode")]
    pub os_code: String,
    /// Operating system name.
    #[serde(rename = "osName")]
    pub os_name: String,
    /// Operating system version.
    #[serde(rename = "osVersion")]
    pub os_version: String,
    /// Client type.
    #[serde(rename = "clientType")]
    pub client_type: String,
    /// Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).
    #[serde(rename = "clientCode")]
    pub client_code: String,
    /// Client name.
    #[serde(rename = "clientName")]
    pub client_name: String,
    /// Client version.
    #[serde(rename = "clientVersion")]
    pub client_version: String,
    /// Client engine name.
    #[serde(rename = "clientEngine")]
    pub client_engine: String,
    /// Client engine name.
    #[serde(rename = "clientEngineVersion")]
    pub client_engine_version: String,
    /// Device name.
    #[serde(rename = "deviceName")]
    pub device_name: String,
    /// Device brand name.
    #[serde(rename = "deviceBrand")]
    pub device_brand: String,
    /// Device model name.
    #[serde(rename = "deviceModel")]
    pub device_model: String,
    /// Country two-character ISO 3166-1 alpha code.
    #[serde(rename = "countryCode")]
    pub country_code: String,
    /// Country name.
    #[serde(rename = "countryName")]
    pub country_name: String,
    /// Returns true if this the current user session.
    #[serde(rename = "current")]
    pub current: bool,
}

impl Session {
    /// Session
    pub fn new(dollar_id: String, dollar_created_at: String, user_id: String, expire: String, provider: String, provider_uid: String, provider_access_token: String, provider_access_token_expiry: String, provider_refresh_token: String, ip: String, os_code: String, os_name: String, os_version: String, client_type: String, client_code: String, client_name: String, client_version: String, client_engine: String, client_engine_version: String, device_name: String, device_brand: String, device_model: String, country_code: String, country_name: String, current: bool) -> Session {
        Session {
            dollar_id,
            dollar_created_at,
            user_id,
            expire,
            provider,
            provider_uid,
            provider_access_token,
            provider_access_token_expiry,
            provider_refresh_token,
            ip,
            os_code,
            os_name,
            os_version,
            client_type,
            client_code,
            client_name,
            client_version,
            client_engine,
            client_engine_version,
            device_name,
            device_brand,
            device_model,
            country_code,
            country_name,
            current,
        }
    }
}