kcr_edp_epam_com 3.20260531.121040

Kubernetes Custom Resource Bindings
Documentation
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/epam/edp-nexus-operator/edp.epam.com/v1alpha1/nexusroles.yaml
// kopium version: 0.23.0

#[allow(unused_imports)]
mod prelude {
    pub use kube::CustomResource;
    pub use serde::{Serialize, Deserialize};
}

use self::prelude::*;

/// NexusRoleSpec defines the desired state of NexusRole.
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "edp.epam.com", version = "v1alpha1", kind = "NexusRole", plural = "nexusroles")]
#[kube(namespaced)]
#[kube(status = "NexusRoleStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct NexusRoleSpec {
    /// Description of nexus role.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// ID is the id of the role.
    /// ID should be unique across all roles.
    pub id: String,
    /// Name is the name of the role.
    pub name: String,
    /// NexusRef is a reference to Nexus custom resource.
    #[serde(rename = "nexusRef")]
    pub nexus_ref: NexusRoleNexusRef,
    /// Privileges is a list of privileges assigned to role.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub privileges: Option<Vec<String>>,
}

/// NexusRef is a reference to Nexus custom resource.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusRoleNexusRef {
    /// Kind specifies the kind of the Nexus resource.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// Name specifies the name of the Nexus resource.
    pub name: String,
}

/// NexusRoleStatus defines the observed state of NexusRole.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusRoleStatus {
    /// Error is an error message if something went wrong.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    /// Value is a status of the role.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}