harbor-api 2.0.0

These APIs provide services for manipulating Harbor project.
Documentation
/*
 * Harbor API
 *
 * These APIs provide services for manipulating Harbor project.
 *
 * The version of the OpenAPI document: 2.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PreheatPolicy {
    /// The ID of preheat policy
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<i32>,
    /// The Name of preheat policy
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// The Description of preheat policy
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// The ID of preheat policy project
    #[serde(rename = "project_id", skip_serializing_if = "Option::is_none")]
    pub project_id: Option<i32>,
    /// The ID of preheat policy provider
    #[serde(rename = "provider_id", skip_serializing_if = "Option::is_none")]
    pub provider_id: Option<i32>,
    /// The Name of preheat policy provider
    #[serde(rename = "provider_name", skip_serializing_if = "Option::is_none")]
    pub provider_name: Option<String>,
    /// The Filters of preheat policy
    #[serde(rename = "filters", skip_serializing_if = "Option::is_none")]
    pub filters: Option<String>,
    /// The Trigger of preheat policy
    #[serde(rename = "trigger", skip_serializing_if = "Option::is_none")]
    pub trigger: Option<String>,
    /// Whether the preheat policy enabled
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    /// The scope of preheat policy
    #[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
    pub scope: Option<String>,
    /// The Create Time of preheat policy
    #[serde(rename = "creation_time", skip_serializing_if = "Option::is_none")]
    pub creation_time: Option<String>,
    /// The Update Time of preheat policy
    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
    pub update_time: Option<String>,
}

impl PreheatPolicy {
    pub fn new() -> PreheatPolicy {
        PreheatPolicy {
            id: None,
            name: None,
            description: None,
            project_id: None,
            provider_id: None,
            provider_name: None,
            filters: None,
            trigger: None,
            enabled: None,
            scope: None,
            creation_time: None,
            update_time: None,
        }
    }
}