orvanta-api 1.5.0

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

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RevalidateLicense200Response {
    /// licence validated successfully
    #[serde(rename = "ok")]
    pub ok: bool,
    #[serde(rename = "tier", skip_serializing_if = "Option::is_none")]
    pub tier: Option<String>,
    #[serde(rename = "edition", skip_serializing_if = "Option::is_none")]
    pub edition: Option<String>,
    #[serde(rename = "expires_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub expires_at: Option<Option<String>>,
    /// instance is licence-degraded to read-only
    #[serde(rename = "read_only")]
    pub read_only: bool,
    #[serde(rename = "first_failure_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub first_failure_at: Option<Option<String>>,
    /// this call cleared a pre-existing failure
    #[serde(rename = "recovered", skip_serializing_if = "Option::is_none")]
    pub recovered: Option<bool>,
    #[serde(rename = "tier_changed", skip_serializing_if = "Option::is_none")]
    pub tier_changed: Option<bool>,
}

impl RevalidateLicense200Response {
    pub fn new(ok: bool, read_only: bool) -> RevalidateLicense200Response {
        RevalidateLicense200Response {
            ok,
            tier: None,
            edition: None,
            expires_at: None,
            read_only,
            first_failure_at: None,
            recovered: None,
            tier_changed: None,
        }
    }
}