/*
* Naurt API
*
* OpenAPI specification for Naurt's APIs.
*
* The version of the OpenAPI document: 0.1.4
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// ErrorResponse : All Naurt errors come in this standard format. `code` is a unique error code you can quote to support, should you need to `reason` explains why this error has been received `remediation` gives steps to help resolve this error
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ErrorResponse {
#[serde(rename = "code")]
pub code: String,
#[serde(rename = "reason")]
pub reason: String,
#[serde(rename = "remediation")]
pub remediation: String,
}
impl ErrorResponse {
/// All Naurt errors come in this standard format. `code` is a unique error code you can quote to support, should you need to `reason` explains why this error has been received `remediation` gives steps to help resolve this error
pub fn new(code: String, reason: String, remediation: String) -> ErrorResponse {
ErrorResponse {
code,
reason,
remediation,
}
}
}