harbor_api/models/
replication_task.rs

1/*
2 * Harbor API
3 *
4 * These APIs provide services for manipulating Harbor project.
5 *
6 * The version of the OpenAPI document: 2.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ReplicationTask : The replication task
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ReplicationTask {
17    /// The ID of the task
18    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
19    pub id: Option<i32>,
20    /// The ID of the execution that the task belongs to
21    #[serde(rename = "execution_id", skip_serializing_if = "Option::is_none")]
22    pub execution_id: Option<i32>,
23    /// The status of the task
24    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
25    pub status: Option<String>,
26    /// The ID of the underlying job that the task related to
27    #[serde(rename = "job_id", skip_serializing_if = "Option::is_none")]
28    pub job_id: Option<String>,
29    /// The operation of the task
30    #[serde(rename = "operation", skip_serializing_if = "Option::is_none")]
31    pub operation: Option<String>,
32    /// The type of the resource that the task operates
33    #[serde(rename = "resource_type", skip_serializing_if = "Option::is_none")]
34    pub resource_type: Option<String>,
35    /// The source resource that the task operates
36    #[serde(rename = "src_resource", skip_serializing_if = "Option::is_none")]
37    pub src_resource: Option<String>,
38    /// The destination resource that the task operates
39    #[serde(rename = "dst_resource", skip_serializing_if = "Option::is_none")]
40    pub dst_resource: Option<String>,
41    /// The start time of the task
42    #[serde(rename = "start_time", skip_serializing_if = "Option::is_none")]
43    pub start_time: Option<String>,
44    /// The end time of the task
45    #[serde(rename = "end_time", skip_serializing_if = "Option::is_none")]
46    pub end_time: Option<String>,
47}
48
49impl ReplicationTask {
50    /// The replication task
51    pub fn new() -> ReplicationTask {
52        ReplicationTask {
53            id: None,
54            execution_id: None,
55            status: None,
56            job_id: None,
57            operation: None,
58            resource_type: None,
59            src_resource: None,
60            dst_resource: None,
61            start_time: None,
62            end_time: None,
63        }
64    }
65}
66