/*
 * 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 CreateResource {
    /// The path to the resource
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "value", deserialize_with = "Option::deserialize")]
    pub value: Option<serde_json::Value>,
    /// The description of the resource
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// The resource_type associated with the resource
    #[serde(rename = "resource_type")]
    pub resource_type: String,
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
    pub labels: Option<Vec<String>>,
    #[serde(rename = "ws_specific", skip_serializing_if = "Option::is_none")]
    pub ws_specific: Option<bool>,
}

impl CreateResource {
    pub fn new(path: String, value: Option<serde_json::Value>, resource_type: String) -> CreateResource {
        CreateResource {
            path,
            value,
            description: None,
            resource_type,
            labels: None,
            ws_specific: None,
        }
    }
}

