harbor-api 2.0.0

These APIs provide services for manipulating Harbor project.
Documentation
/*
 * Harbor API
 *
 * These APIs provide services for manipulating Harbor project.
 *
 * The version of the OpenAPI document: 2.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ProjectMemberEntity {
    /// the project member id
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<i32>,
    /// the project id
    #[serde(rename = "project_id", skip_serializing_if = "Option::is_none")]
    pub project_id: Option<i32>,
    /// the name of the group member.
    #[serde(rename = "entity_name", skip_serializing_if = "Option::is_none")]
    pub entity_name: Option<String>,
    /// the name of the role
    #[serde(rename = "role_name", skip_serializing_if = "Option::is_none")]
    pub role_name: Option<String>,
    /// the role id
    #[serde(rename = "role_id", skip_serializing_if = "Option::is_none")]
    pub role_id: Option<i32>,
    /// the id of entity, if the member is a user, it is user_id in user table. if the member is a user group, it is the user group's ID in user_group table.
    #[serde(rename = "entity_id", skip_serializing_if = "Option::is_none")]
    pub entity_id: Option<i32>,
    /// the entity's type, u for user entity, g for group entity.
    #[serde(rename = "entity_type", skip_serializing_if = "Option::is_none")]
    pub entity_type: Option<String>,
}

impl ProjectMemberEntity {
    pub fn new() -> ProjectMemberEntity {
        ProjectMemberEntity {
            id: None,
            project_id: None,
            entity_name: None,
            role_name: None,
            role_id: None,
            entity_id: None,
            entity_type: None,
        }
    }
}