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};

/// WasmPluginResponse : WASM plugin response with extended fields
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WasmPluginResponse {
    #[serde(rename = "author", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub author: Option<Option<String>>,
    #[serde(rename = "capabilities")]
    pub capabilities: 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 = "license", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub license: Option<Option<String>>,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "plugin_type")]
    pub plugin_type: String,
    #[serde(rename = "resource_limits")]
    pub resource_limits: serde_json::Value,
    #[serde(rename = "source_ref", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub source_ref: Option<Option<String>>,
    #[serde(rename = "source_type")]
    pub source_type: String,
    #[serde(rename = "source_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub source_url: Option<Option<String>>,
    #[serde(rename = "status")]
    pub status: String,
    #[serde(rename = "updated_at")]
    pub updated_at: String,
    #[serde(rename = "version")]
    pub version: String,
}

impl WasmPluginResponse {
    /// WASM plugin response with extended fields
    pub fn new(capabilities: serde_json::Value, display_name: String, id: uuid::Uuid, installed_at: String, name: String, plugin_type: String, resource_limits: serde_json::Value, source_type: String, status: String, updated_at: String, version: String) -> WasmPluginResponse {
        WasmPluginResponse {
            author: None,
            capabilities,
            description: None,
            display_name,
            enabled_at: None,
            homepage: None,
            id,
            installed_at,
            license: None,
            name,
            plugin_type,
            resource_limits,
            source_ref: None,
            source_type,
            source_url: None,
            status,
            updated_at,
            version,
        }
    }
}