asana/model/project_template_instantiate_project_request.rs
1use serde::{Serialize, Deserialize};
2use super::{DateVariableRequest, RequestedRoleRequest};
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct ProjectTemplateInstantiateProjectRequest {
5 ///*Optional*. If set to `true`, the endpoint returns an "Unprocessable Entity" error if you fail to provide a calendar date value for any date variable. If set to `false`, a default date is used for each unfulfilled date variable (e.g., the current date is used as the Start Date of a project).
6 pub is_strict: bool,
7 ///The name of the new project.
8 pub name: String,
9 ///Sets the project to public to its team.
10 pub public: bool,
11 ///Array of mappings of date variables to calendar dates.
12 pub requested_dates: Vec<DateVariableRequest>,
13 ///Array of mappings of template roles to user ids
14 pub requested_roles: Vec<RequestedRoleRequest>,
15 ///*Optional*. Sets the team of the new project. If the project template exists in an _organization_, you may specify a value for `team`. If no value is provided then it defaults to the same team as the project template.
16 pub team: String,
17}
18impl std::fmt::Display for ProjectTemplateInstantiateProjectRequest {
19 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
20 write!(f, "{}", serde_json::to_string(self).unwrap())
21 }
22}