// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// The terminal decision recorded against one review version.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ReviewDecision {
    pub verdict: ReviewVerdict,
    pub version_id: String,
    pub author: Actor,
    pub created_at: String,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub reason: Option<String>,
}
impl ReviewDecision {
    /// Construct a new `ReviewDecision` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        verdict: ReviewVerdict,
        version_id: impl Into<String>,
        author: Actor,
        created_at: impl Into<String>,
    ) -> Self {
        Self {
            verdict,
            version_id: version_id.into(),
            author,
            created_at: created_at.into(),
            reason: Default::default(),
        }
    }
}
