artifact-keeper-client 1.1.6

Rust client for the Artifact Keeper REST API
Documentation
/*
 * Artifact Keeper API
 *
 * Enterprise artifact registry supporting 45+ package formats.
 *
 * The version of the OpenAPI document: 1.0.0-rc.3
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ErrorResponse : Standard error response body returned by all endpoints on failure.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ErrorResponse {
    /// Machine-readable error code (e.g. \"NOT_FOUND\", \"VALIDATION_ERROR\")
    #[serde(rename = "code")]
    pub code: String,
    /// Human-readable error message
    #[serde(rename = "message")]
    pub message: String,
}

impl ErrorResponse {
    /// Standard error response body returned by all endpoints on failure.
    pub fn new(code: String, message: String) -> ErrorResponse {
        ErrorResponse {
            code,
            message,
        }
    }
}