/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.6
 * 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 CustomInstanceDb {
    #[serde(rename = "logs")]
    pub logs: Box<models::CustomInstanceDbLogs>,
    /// Whether the operation completed successfully
    #[serde(rename = "success")]
    pub success: bool,
    /// Error message if the operation failed
    #[serde(rename = "error", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub error: Option<Option<String>>,
    #[serde(rename = "tag", skip_serializing_if = "Option::is_none")]
    pub tag: Option<models::CustomInstanceDbTag>,
}

impl CustomInstanceDb {
    pub fn new(logs: models::CustomInstanceDbLogs, success: bool) -> CustomInstanceDb {
        CustomInstanceDb {
            logs: Box::new(logs),
            success,
            error: None,
            tag: None,
        }
    }
}

