artifact-keeper-client 1.2.1

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.2.1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PluginResponse {
    #[serde(rename = "author", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub author: Option<Option<String>>,
    #[serde(rename = "config_schema")]
    pub config_schema: serde_json::Value,
    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub description: Option<Option<String>>,
    #[serde(rename = "display_name")]
    pub display_name: String,
    #[serde(rename = "enabled_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub enabled_at: Option<Option<String>>,
    #[serde(rename = "homepage", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub homepage: Option<Option<String>>,
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "installed_at")]
    pub installed_at: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "plugin_type")]
    pub plugin_type: String,
    #[serde(rename = "status")]
    pub status: String,
    #[serde(rename = "version")]
    pub version: String,
}

impl PluginResponse {
    pub fn new(config_schema: serde_json::Value, display_name: String, id: uuid::Uuid, installed_at: String, name: String, plugin_type: String, status: String, version: String) -> PluginResponse {
        PluginResponse {
            author: None,
            config_schema,
            description: None,
            display_name,
            enabled_at: None,
            homepage: None,
            id,
            installed_at,
            name,
            plugin_type,
            status,
            version,
        }
    }
}