/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.2.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 GetCompletedJobResultMaybe200Response {
    #[serde(rename = "completed")]
    pub completed: bool,
    #[serde(rename = "result", deserialize_with = "Option::deserialize")]
    pub result: Option<serde_json::Value>,
    #[serde(rename = "success", skip_serializing_if = "Option::is_none")]
    pub success: Option<bool>,
    #[serde(rename = "started", skip_serializing_if = "Option::is_none")]
    pub started: Option<bool>,
}

impl GetCompletedJobResultMaybe200Response {
    pub fn new(completed: bool, result: Option<serde_json::Value>) -> GetCompletedJobResultMaybe200Response {
        GetCompletedJobResultMaybe200Response {
            completed,
            result,
            success: None,
            started: None,
        }
    }
}

