asana 0.1.1

asana bindings for rust
Documentation
/*
 * Asana
 *
 * 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).
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ProjectRequest {
    /// Globally unique identifier of the resource, as a string.
    #[serde(rename = "gid", skip_serializing_if = "Option::is_none")]
    pub gid: Option<String>,
    /// The base type of this resource.
    #[serde(rename = "resource_type", skip_serializing_if = "Option::is_none")]
    pub resource_type: Option<String>,
    /// Name of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// True if the project is archived, false if not. Archived projects do not show in the UI by default and may be treated differently for queries.
    #[serde(rename = "archived", skip_serializing_if = "Option::is_none")]
    pub archived: Option<bool>,
    /// Color of the project.
    #[serde(rename = "color", skip_serializing_if = "Option::is_none")]
    pub color: Option<Color>,
    /// The time at which this resource was created.
    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    #[serde(
        rename = "current_status",
        skip_serializing_if = "Option::is_none"
    )]
    pub current_status: Option<Box<crate::models::ProjectStatusResponse>>,
    /// Array of Custom Field Settings (in compact form).
    #[serde(
        rename = "custom_field_settings",
        skip_serializing_if = "Option::is_none"
    )]
    pub custom_field_settings:
        Option<Vec<crate::models::CustomFieldSettingCompact>>,
    /// The default view (list, board, calendar, or timeline) of a project.
    #[serde(rename = "default_view", skip_serializing_if = "Option::is_none")]
    pub default_view: Option<DefaultView>,
    /// *Deprecated: new integrations should prefer the due_on field.*
    #[serde(rename = "due_date", skip_serializing_if = "Option::is_none")]
    pub due_date: Option<String>,
    /// The day on which this project is due. This takes a date with format YYYY-MM-DD.
    #[serde(rename = "due_on", skip_serializing_if = "Option::is_none")]
    pub due_on: Option<String>,
    /// [Opt In](/docs/input-output-options). The notes of the project with formatting as HTML.
    #[serde(rename = "html_notes", skip_serializing_if = "Option::is_none")]
    pub html_notes: Option<String>,
    /// [Opt In](/docs/input-output-options). Determines if the project is a template.
    #[serde(rename = "is_template", skip_serializing_if = "Option::is_none")]
    pub is_template: Option<bool>,
    /// Array of users who are members of this project.
    #[serde(rename = "members", skip_serializing_if = "Option::is_none")]
    pub members: Option<Vec<crate::models::UserCompact>>,
    /// The time at which this project was last modified. *Note: This does not currently reflect any changes in associations such as tasks or comments that may have been added or removed from the project.*
    #[serde(rename = "modified_at", skip_serializing_if = "Option::is_none")]
    pub modified_at: Option<String>,
    /// More detailed, free-form textual information associated with the project.
    #[serde(rename = "notes", skip_serializing_if = "Option::is_none")]
    pub notes: Option<String>,
    /// True if the project is public to the organization. If false, do not share this project with other users in this organization without explicitly checking to see if they have access.
    #[serde(rename = "public", skip_serializing_if = "Option::is_none")]
    pub public: Option<bool>,
    /// The day on which work for this project begins, or null if the project has no start date. This takes a date with `YYYY-MM-DD` format. *Note: `due_on` or `due_at` must be present in the request when setting or unsetting the `start_on` parameter. Additionally, start_on and due_on cannot be the same date.*
    #[serde(rename = "start_on", skip_serializing_if = "Option::is_none")]
    pub start_on: Option<String>,
    #[serde(rename = "workspace", skip_serializing_if = "Option::is_none")]
    pub workspace: Option<Box<crate::models::WorkspaceCompact>>,
    /// An object where each key is a Custom Field gid and each value is an enum gid, string, or number.
    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
    pub custom_fields: Option<::std::collections::HashMap<String, String>>,
    /// *Create-only*. Comma separated string of users. Followers are a subset of members who receive all notifications for a project, the default notification setting when adding members to a project in-product.
    #[serde(rename = "followers", skip_serializing_if = "Option::is_none")]
    pub followers: Option<String>,
    /// The current owner of the project, may be null.
    #[serde(rename = "owner", skip_serializing_if = "Option::is_none")]
    pub owner: Option<String>,
    /// *Create-only*. The team that this project is shared with. This field only exists for projects in organizations.
    #[serde(rename = "team", skip_serializing_if = "Option::is_none")]
    pub team: Option<String>,
}

impl ProjectRequest {
    pub fn new() -> ProjectRequest {
        ProjectRequest {
            gid: None,
            resource_type: None,
            name: None,
            archived: None,
            color: None,
            created_at: None,
            current_status: None,
            custom_field_settings: None,
            default_view: None,
            due_date: None,
            due_on: None,
            html_notes: None,
            is_template: None,
            members: None,
            modified_at: None,
            notes: None,
            public: None,
            start_on: None,
            workspace: None,
            custom_fields: None,
            followers: None,
            owner: None,
            team: None,
        }
    }
}

/// Color of the project.
#[derive(
    Clone,
    Copy,
    Debug,
    Eq,
    PartialEq,
    Ord,
    PartialOrd,
    Hash,
    Serialize,
    Deserialize
)]
pub enum Color {
    #[serde(rename = "dark-pink")]
    DarkPink,
    #[serde(rename = "dark-green")]
    DarkGreen,
    #[serde(rename = "dark-blue")]
    DarkBlue,
    #[serde(rename = "dark-red")]
    DarkRed,
    #[serde(rename = "dark-teal")]
    DarkTeal,
    #[serde(rename = "dark-brown")]
    DarkBrown,
    #[serde(rename = "dark-orange")]
    DarkOrange,
    #[serde(rename = "dark-purple")]
    DarkPurple,
    #[serde(rename = "dark-warm-gray")]
    DarkWarmGray,
    #[serde(rename = "light-pink")]
    LightPink,
    #[serde(rename = "light-green")]
    LightGreen,
    #[serde(rename = "light-blue")]
    LightBlue,
    #[serde(rename = "light-red")]
    LightRed,
    #[serde(rename = "light-teal")]
    LightTeal,
    #[serde(rename = "light-brown")]
    LightBrown,
    #[serde(rename = "light-orange")]
    LightOrange,
    #[serde(rename = "light-purple")]
    LightPurple,
    #[serde(rename = "light-warm-gray")]
    LightWarmGray,
}
/// The default view (list, board, calendar, or timeline) of a project.
#[derive(
    Clone,
    Copy,
    Debug,
    Eq,
    PartialEq,
    Ord,
    PartialOrd,
    Hash,
    Serialize,
    Deserialize
)]
pub enum DefaultView {
    #[serde(rename = "list")]
    List,
    #[serde(rename = "board")]
    Board,
    #[serde(rename = "calendar")]
    Calendar,
    #[serde(rename = "timeline")]
    Timeline,
}