harbor_api/models/access.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 Access {
16 /// The resource of the access. Possible resources are listed here for system and project level https://github.com/goharbor/harbor/blob/main/src/common/rbac/const.go
17 #[serde(rename = "resource", skip_serializing_if = "Option::is_none")]
18 pub resource: Option<String>,
19 /// The action of the access. Possible actions are *, pull, push, create, read, update, delete, list, operate, scanner-pull and stop.
20 #[serde(rename = "action", skip_serializing_if = "Option::is_none")]
21 pub action: Option<String>,
22 /// The effect of the access
23 #[serde(rename = "effect", skip_serializing_if = "Option::is_none")]
24 pub effect: Option<String>,
25}
26
27impl Access {
28 pub fn new() -> Access {
29 Access {
30 resource: None,
31 action: None,
32 effect: None,
33 }
34 }
35}
36