rancher_client 1.0.4

Rancher API client for Rust using OpenAPI Generator and kube
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::models;
use serde::{Deserialize, Serialize};

/// IoCattleManagementv3Project : Project is a group of namespaces. Projects are used to create a multi-tenant environment within a Kubernetes cluster by managing namespace operations, such as role assignments or quotas, as a group.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct IoCattleManagementv3Project {
    /// 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")]
    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 = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<kube::api::ObjectMeta>,
    #[serde(rename = "spec", skip_serializing_if = "Option::is_none")]
    pub spec: Option<models::IoCattleManagementv3ProjectSpec>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<models::IoCattleManagementv3ProjectStatus>,
}


impl kube::Resource for IoCattleManagementv3Project {
    type DynamicType = ();

    type Scope = ();

    fn kind(_dt: &Self::DynamicType) -> std::borrow::Cow<'_, str> {
        std::borrow::Cow::Borrowed("Project")
    }

    fn group(_dt: &Self::DynamicType) -> std::borrow::Cow<'_, str> {
        std::borrow::Cow::Borrowed("management.cattle.io")
    }

    fn version(_dt: &Self::DynamicType) -> std::borrow::Cow<'_, str> {
        std::borrow::Cow::Borrowed("v3")
    }

    fn plural(_dt: &Self::DynamicType) -> std::borrow::Cow<'_, str> {
        std::borrow::Cow::Borrowed("projects")
    }


    fn meta(&self) -> &kube::api::ObjectMeta {
        self.metadata.as_ref().unwrap()
    }

    fn meta_mut(&mut self) -> &mut kube::api::ObjectMeta {
        self.metadata.as_mut().unwrap()
    }

}


impl IoCattleManagementv3Project {
    /// Project is a group of namespaces. Projects are used to create a multi-tenant environment within a Kubernetes cluster by managing namespace operations, such as role assignments or quotas, as a group.
    pub fn new() -> IoCattleManagementv3Project {
        IoCattleManagementv3Project {
            api_version: None,
            kind: None,
            metadata: None,
            spec: None,
            status: None,
        }
    }
}