authentik-client 2026.5.0-rc2

Making authentication simple.
Documentation
/*
 * authentik
 *
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.5.0-rc2
 * Contact: hello@goauthentik.io
 * Generated by: https://openapi-generator.tech
 */

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

/// LifecycleIteration : Mixin to validate that a valid enterprise license exists before allowing to save the object
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LifecycleIteration {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "content_type")]
    pub content_type: models::ContentTypeEnum,
    #[serde(rename = "object_id")]
    pub object_id: String,
    #[serde(rename = "object_verbose")]
    pub object_verbose: String,
    #[serde(rename = "object_admin_url")]
    pub object_admin_url: String,
    #[serde(rename = "state")]
    pub state: models::LifecycleIterationStateEnum,
    #[serde(rename = "opened_on")]
    pub opened_on: chrono::DateTime<chrono::FixedOffset>,
    #[serde(rename = "grace_period_end")]
    pub grace_period_end: chrono::DateTime<chrono::FixedOffset>,
    #[serde(rename = "next_review_date")]
    pub next_review_date: chrono::DateTime<chrono::FixedOffset>,
    #[serde(rename = "reviews")]
    pub reviews: Vec<models::Review>,
    #[serde(rename = "rule")]
    pub rule: models::RelatedRule,
    #[serde(rename = "user_can_review")]
    pub user_can_review: bool,
}

impl LifecycleIteration {
    /// Mixin to validate that a valid enterprise license exists before allowing to save the object
    pub fn new(
        id: uuid::Uuid,
        content_type: models::ContentTypeEnum,
        object_id: String,
        object_verbose: String,
        object_admin_url: String,
        state: models::LifecycleIterationStateEnum,
        opened_on: chrono::DateTime<chrono::FixedOffset>,
        grace_period_end: chrono::DateTime<chrono::FixedOffset>,
        next_review_date: chrono::DateTime<chrono::FixedOffset>,
        reviews: Vec<models::Review>,
        rule: models::RelatedRule,
        user_can_review: bool,
    ) -> LifecycleIteration {
        LifecycleIteration {
            id,
            content_type,
            object_id,
            object_verbose,
            object_admin_url,
            state,
            opened_on,
            grace_period_end,
            next_review_date,
            reviews,
            rule,
            user_can_review,
        }
    }
}