cluster-api-rs 1.13.1

Cluster API structures generated by kopium from upstream CRDs
Documentation
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --smart-derive-elision -D Default -D PartialEq -A -d -f -
// kopium version: 0.23.0

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

use self::prelude::*;

/// spec is the desired state of IPAddress.
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
#[kube(
    group = "ipam.cluster.x-k8s.io",
    version = "v1beta2",
    kind = "IPAddress",
    root = "IpAddress",
    plural = "ipaddresses"
)]
#[kube(namespaced)]
#[kube(derive = "Default")]
#[kube(derive = "PartialEq")]
pub struct IpAddressSpec {
    /// address is the IP address.
    pub address: String,
    /// claimRef is a reference to the claim this IPAddress was created for.
    #[serde(rename = "claimRef")]
    pub claim_ref: IpAddressClaimRef,
    /// gateway is the network gateway of the network the address is from.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub gateway: Option<String>,
    /// poolRef is a reference to the pool that this IPAddress was created from.
    #[serde(rename = "poolRef")]
    pub pool_ref: IpAddressPoolRef,
    /// prefix is the prefix of the address.
    pub prefix: i32,
}

/// claimRef is a reference to the claim this IPAddress was created for.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
pub struct IpAddressClaimRef {
    /// name of the IPAddressClaim.
    /// name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character.
    pub name: String,
}

/// poolRef is a reference to the pool that this IPAddress was created from.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
pub struct IpAddressPoolRef {
    /// apiGroup of the IPPool.
    /// apiGroup must be fully qualified domain name.
    #[serde(rename = "apiGroup")]
    pub api_group: String,
    /// kind of the IPPool.
    /// kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character.
    pub kind: String,
    /// name of the IPPool.
    /// name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character.
    pub name: String,
}