asana/models/
project_duplicate_request.rs

1/*
2 * Asana
3 *
4 * This is the interface for interacting with the [Asana Platform](https://developers.asana.com). Our API reference is generated from our [OpenAPI spec] (https://raw.githubusercontent.com/Asana/developer-docs/master/defs/asana_oas.yaml).
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
12pub struct ProjectDuplicateRequest {
13    /// The name of the new project.
14    #[serde(rename = "name")]
15    pub name: String,
16    /// Sets the team of the new project. If team is not defined, the new project will be in the same team as the the original project.
17    #[serde(rename = "team", skip_serializing_if = "Option::is_none")]
18    pub team: Option<String>,
19    /// The elements that will be duplicated to the new project. Tasks are always included.
20    #[serde(rename = "include", skip_serializing_if = "Option::is_none")]
21    pub include: Option<Include>,
22    #[serde(
23        rename = "schedule_dates",
24        skip_serializing_if = "Option::is_none"
25    )]
26    pub schedule_dates:
27        Option<Box<crate::models::ProjectDuplicateRequestScheduleDates>>,
28}
29
30impl ProjectDuplicateRequest {
31    pub fn new(name: String) -> ProjectDuplicateRequest {
32        ProjectDuplicateRequest {
33            name,
34            team: None,
35            include: None,
36            schedule_dates: None,
37        }
38    }
39}
40
41/// The elements that will be duplicated to the new project. Tasks are always included.
42#[derive(
43    Clone,
44    Copy,
45    Debug,
46    Eq,
47    PartialEq,
48    Ord,
49    PartialOrd,
50    Hash,
51    Serialize,
52    Deserialize
53)]
54pub enum Include {
55    #[serde(rename = "members")]
56    Members,
57    #[serde(rename = "notes")]
58    Notes,
59    #[serde(rename = "task_notes")]
60    TaskNotes,
61    #[serde(rename = "task_assignee")]
62    TaskAssignee,
63    #[serde(rename = "task_subtasks")]
64    TaskSubtasks,
65    #[serde(rename = "task_attachments")]
66    TaskAttachments,
67    #[serde(rename = "task_dates")]
68    TaskDates,
69    #[serde(rename = "task_dependencies")]
70    TaskDependencies,
71    #[serde(rename = "task_followers")]
72    TaskFollowers,
73    #[serde(rename = "task_tags")]
74    TaskTags,
75    #[serde(rename = "task_projects")]
76    TaskProjects,
77}