harbor_api/models/error.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/// Error : a model for all the error response coming from harbor
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Error {
17 /// The error code
18 #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
19 pub code: Option<String>,
20 /// The error message
21 #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
22 pub message: Option<String>,
23}
24
25impl Error {
26 /// a model for all the error response coming from harbor
27 pub fn new() -> Error {
28 Error {
29 code: None,
30 message: None,
31 }
32 }
33}
34