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-sonar-operator/edp.epam.com/v1alpha1/sonarusers.yaml
// kopium version: 0.23.0

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

use self::prelude::*;

/// SonarUserSpec defines the desired state of SonarUser
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "edp.epam.com", version = "v1alpha1", kind = "SonarUser", plural = "sonarusers")]
#[kube(namespaced)]
#[kube(status = "SonarUserStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct SonarUserSpec {
    /// Email is a user email.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
    /// Groups is a list of groups assigned to user.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub groups: Option<Vec<String>>,
    /// Login is a user login.
    /// Do not edit this field after creation. Otherwise, the user will be recreated.
    pub login: String,
    /// Name is a username.
    pub name: String,
    /// Permissions is a list of permissions assigned to user.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub permissions: Option<Vec<String>>,
    /// Secret is the name of the secret with the user password.
    /// It should contain a password field with a user password.
    /// User password can't be updated.
    pub secret: String,
    /// SonarRef is a reference to Sonar custom resource.
    #[serde(rename = "sonarRef")]
    pub sonar_ref: SonarUserSonarRef,
}

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

/// SonarUserStatus defines the observed state of SonarUser
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct SonarUserStatus {
    /// 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 user.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}