harbor_api/models/
robot_create_v1.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 RobotCreateV1 {
16    /// The name of robot account
17    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18    pub name: Option<String>,
19    /// The description of robot account
20    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
21    pub description: Option<String>,
22    /// The expiration time on or after which the JWT MUST NOT be accepted for processing.
23    #[serde(rename = "expires_at", skip_serializing_if = "Option::is_none")]
24    pub expires_at: Option<i32>,
25    /// The permission of robot account
26    #[serde(rename = "access", skip_serializing_if = "Option::is_none")]
27    pub access: Option<Vec<models::Access>>,
28}
29
30impl RobotCreateV1 {
31    pub fn new() -> RobotCreateV1 {
32        RobotCreateV1 {
33            name: None,
34            description: None,
35            expires_at: None,
36            access: None,
37        }
38    }
39}
40