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 ProjectMembershipResponse {
    /// 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>,
    #[serde(rename = "user", skip_serializing_if = "Option::is_none")]
    pub user: Option<Box<crate::models::UserCompact>>,
    #[serde(rename = "project", skip_serializing_if = "Option::is_none")]
    pub project: Option<Box<crate::models::ProjectCompact>>,
    /// Whether the user has full access to the project or has comment-only access.
    #[serde(rename = "write_access", skip_serializing_if = "Option::is_none")]
    pub write_access: Option<WriteAccess>,
}

impl ProjectMembershipResponse {
    pub fn new() -> ProjectMembershipResponse {
        ProjectMembershipResponse {
            gid: None,
            resource_type: None,
            user: None,
            project: None,
            write_access: None,
        }
    }
}

/// Whether the user has full access to the project or has comment-only access.
#[derive(
    Clone,
    Copy,
    Debug,
    Eq,
    PartialEq,
    Ord,
    PartialOrd,
    Hash,
    Serialize,
    Deserialize
)]
pub enum WriteAccess {
    #[serde(rename = "full_write")]
    FullWrite,
    #[serde(rename = "comment_only")]
    CommentOnly,
}