incus-client 0.1.1

Auto-generated Rust client for the Incus container and VM manager REST API
Documentation
/*
 * Incus external REST API
 *
 * This is the REST API used by all Incus clients. Internal endpoints aren't included in this documentation.  The Incus API is available over both a local unix+http and remote https API. Authentication for local users relies on group membership and access to the unix socket. For remote users, the default authentication method is TLS client certificates.
 *
 * The version of the OpenAPI document: 1.0
 * Contact: lxc-devel@lists.linuxcontainers.org
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InstancePost {
    /// Instance configuration file.
    #[serde(rename = "Config", skip_serializing_if = "Option::is_none")]
    pub config: Option<serde_json::Value>,
    /// Instance devices.
    #[serde(rename = "Devices", skip_serializing_if = "Option::is_none")]
    pub devices: Option<serde_json::Value>,
    /// List of profiles applied to the instance.
    #[serde(rename = "Profiles", skip_serializing_if = "Option::is_none")]
    pub profiles: Option<Vec<String>>,
    /// AllowInconsistent allow inconsistent copies when migrating.
    #[serde(rename = "allow_inconsistent", skip_serializing_if = "Option::is_none")]
    pub allow_inconsistent: Option<bool>,
    /// Whether snapshots should be discarded (migration only)
    #[serde(rename = "instance_only", skip_serializing_if = "Option::is_none")]
    pub instance_only: Option<bool>,
    /// Whether to perform a live migration (migration only)
    #[serde(rename = "live", skip_serializing_if = "Option::is_none")]
    pub live: Option<bool>,
    /// Whether the instance is being migrated to another server
    #[serde(rename = "migration", skip_serializing_if = "Option::is_none")]
    pub migration: Option<bool>,
    /// New name for the instance
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Target pool for local cross-pool move
    #[serde(rename = "pool", skip_serializing_if = "Option::is_none")]
    pub pool: Option<String>,
    /// Target project for local cross-project move
    #[serde(rename = "project", skip_serializing_if = "Option::is_none")]
    pub project: Option<String>,
    #[serde(rename = "target", skip_serializing_if = "Option::is_none")]
    pub target: Option<Box<models::InstancePostTarget>>,
}

impl InstancePost {
    pub fn new() -> InstancePost {
        InstancePost {
            config: None,
            devices: None,
            profiles: None,
            allow_inconsistent: None,
            instance_only: None,
            live: None,
            migration: None,
            name: None,
            pool: None,
            project: None,
            target: None,
        }
    }
}