harbor_api/models/
project_member_entity.rs

1/*
2 * Harbor API
3 *
4 * These APIs provide services for manipulating Harbor project.
5 *
6 * The version of the OpenAPI document: 2.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ProjectMemberEntity {
16    /// the project member id
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<i32>,
19    /// the project id
20    #[serde(rename = "project_id", skip_serializing_if = "Option::is_none")]
21    pub project_id: Option<i32>,
22    /// the name of the group member.
23    #[serde(rename = "entity_name", skip_serializing_if = "Option::is_none")]
24    pub entity_name: Option<String>,
25    /// the name of the role
26    #[serde(rename = "role_name", skip_serializing_if = "Option::is_none")]
27    pub role_name: Option<String>,
28    /// the role id
29    #[serde(rename = "role_id", skip_serializing_if = "Option::is_none")]
30    pub role_id: Option<i32>,
31    /// 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.
32    #[serde(rename = "entity_id", skip_serializing_if = "Option::is_none")]
33    pub entity_id: Option<i32>,
34    /// the entity's type, u for user entity, g for group entity.
35    #[serde(rename = "entity_type", skip_serializing_if = "Option::is_none")]
36    pub entity_type: Option<String>,
37}
38
39impl ProjectMemberEntity {
40    pub fn new() -> ProjectMemberEntity {
41        ProjectMemberEntity {
42            id: None,
43            project_id: None,
44            entity_name: None,
45            role_name: None,
46            role_id: None,
47            entity_id: None,
48            entity_type: None,
49        }
50    }
51}
52