// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Create a corrected version of a review.
/// `parent_id` must reference an existing version under the same
/// `review_id`.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CreateReviewVersionRequest {
    pub review_id: String,
    pub parent_id: String,
    /// The full reviewed snapshot to store as an immutable version. The object must match the gated block type: extract uses the raw output object; classifier uses {'category': string}; split uses {'documents': [{'name': string, 'pages': positive sorted int[]}]}; for_each uses {'partitions': [{'key': string, 'pages': positive sorted int[]}]}. The server validates the shape and stores the exact submitted object when valid.
    pub snapshot: std::collections::HashMap<String, serde_json::Value>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub note: Option<String>,
}
impl CreateReviewVersionRequest {
    /// Construct a new `CreateReviewVersionRequest` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        review_id: impl Into<String>,
        parent_id: impl Into<String>,
        snapshot: std::collections::HashMap<String, serde_json::Value>,
    ) -> Self {
        Self {
            review_id: review_id.into(),
            parent_id: parent_id.into(),
            snapshot,
            note: Default::default(),
        }
    }
}
