rancher_client 1.0.6

Rancher API Client for Rust
Documentation
/*
 * Kubernetes
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1.27.5+k3s1
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::default_api_version;

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

/// IoCattleManagementv3Cluster : Cluster is a representation of a Rancher Kubernetes cluster.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, SerdeDiff)]
pub struct IoCattleManagementv3Cluster {
    /// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
    #[serde(rename = "apiVersion", skip_serializing_if = "Option::is_none", default= "default_api_version")]
    pub api_version: Option<String>,
    /// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    #[serde(rename = "spec")]
    #[serde_diff(opaque)]
    pub spec: Box<models::IoCattleManagementv3ClusterSpec>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    #[serde_diff(opaque)]
    pub status: Option<Box<models::IoCattleManagementv3ClusterStatus>>,
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    #[serde_diff(opaque)]
    pub metadata: Option<models::IoK8sApimachineryPkgApisMetaV1ObjectMeta>,
}

impl IoCattleManagementv3Cluster {
    /// Cluster is a representation of a Rancher Kubernetes cluster.
    pub fn new(spec: models::IoCattleManagementv3ClusterSpec) -> IoCattleManagementv3Cluster {
        IoCattleManagementv3Cluster {
            api_version: None,
            kind: None,
            spec: Box::new(spec),
            status: None,
            metadata: None,
        }
    }
}