// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// One review and its current decision.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Review {
    pub id: String,
    pub workflow_id: String,
    pub workflow_version_id: String,
    pub run_id: String,
    pub block_id: String,
    pub step_id: String,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub parent_step_id: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub iteration_key: Option<String>,
    pub block_type: ReviewBlockType,
    pub triggered_by: ReviewAllOfPredicatesOneOf,
    /// When the review was created.
    pub created_at: String,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub decision: Option<ReviewDecision>,
}
impl Review {
    /// Construct a new `Review` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        id: impl Into<String>,
        workflow_id: impl Into<String>,
        workflow_version_id: impl Into<String>,
        run_id: impl Into<String>,
        block_id: impl Into<String>,
        step_id: impl Into<String>,
        block_type: ReviewBlockType,
        triggered_by: ReviewAllOfPredicatesOneOf,
        created_at: impl Into<String>,
    ) -> Self {
        Self {
            id: id.into(),
            workflow_id: workflow_id.into(),
            workflow_version_id: workflow_version_id.into(),
            run_id: run_id.into(),
            block_id: block_id.into(),
            step_id: step_id.into(),
            parent_step_id: Default::default(),
            iteration_key: Default::default(),
            block_type,
            triggered_by,
            created_at: created_at.into(),
            decision: Default::default(),
        }
    }
}
