artifact-keeper-client 1.1.2

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DiscoverablePeerResponse {
    #[serde(rename = "endpoint_url")]
    pub endpoint_url: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "peer_id")]
    pub peer_id: uuid::Uuid,
    #[serde(rename = "region", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub region: Option<Option<String>>,
    #[serde(rename = "status")]
    pub status: String,
}

impl DiscoverablePeerResponse {
    pub fn new(endpoint_url: String, name: String, peer_id: uuid::Uuid, status: String) -> DiscoverablePeerResponse {
        DiscoverablePeerResponse {
            endpoint_url,
            name,
            peer_id,
            region: None,
            status,
        }
    }
}