cluster_api_rs/api/
capi_ipaddressclaim.rs

1// WARNING: generated by kopium - manual changes will be overwritten
2// kopium command: kopium -D Default -D PartialEq -A -d -f -
3// kopium version: 0.21.1
4
5#[allow(unused_imports)]
6mod prelude {
7    pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition;
8    pub use kube::CustomResource;
9    pub use schemars::JsonSchema;
10    pub use serde::{Deserialize, Serialize};
11}
12use self::prelude::*;
13
14/// IPAddressClaimSpec is the desired state of an IPAddressClaim.
15#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
16#[kube(
17    group = "ipam.cluster.x-k8s.io",
18    version = "v1beta1",
19    kind = "IPAddressClaim",
20    plural = "ipaddressclaims"
21)]
22#[kube(namespaced)]
23#[kube(status = "IPAddressClaimStatus")]
24#[kube(derive = "Default")]
25#[kube(derive = "PartialEq")]
26pub struct IPAddressClaimSpec {
27    /// clusterName is the name of the Cluster this object belongs to.
28    #[serde(
29        default,
30        skip_serializing_if = "Option::is_none",
31        rename = "clusterName"
32    )]
33    pub cluster_name: Option<String>,
34    /// poolRef is a reference to the pool from which an IP address should be created.
35    #[serde(rename = "poolRef")]
36    pub pool_ref: IPAddressClaimPoolRef,
37}
38
39/// poolRef is a reference to the pool from which an IP address should be created.
40#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
41pub struct IPAddressClaimPoolRef {
42    /// APIGroup is the group for the resource being referenced.
43    /// If APIGroup is not specified, the specified Kind must be in the core API group.
44    /// For any other third-party types, APIGroup is required.
45    #[serde(default, skip_serializing_if = "Option::is_none", rename = "apiGroup")]
46    pub api_group: Option<String>,
47    /// Kind is the type of resource being referenced
48    pub kind: String,
49    /// Name is the name of resource being referenced
50    pub name: String,
51}
52
53/// IPAddressClaimStatus is the observed status of a IPAddressClaim.
54#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
55pub struct IPAddressClaimStatus {
56    /// addressRef is a reference to the address that was created for this claim.
57    #[serde(
58        default,
59        skip_serializing_if = "Option::is_none",
60        rename = "addressRef"
61    )]
62    pub address_ref: Option<IPAddressClaimStatusAddressRef>,
63    /// conditions summarises the current state of the IPAddressClaim
64    #[serde(default, skip_serializing_if = "Option::is_none")]
65    pub conditions: Option<Vec<Condition>>,
66}
67
68/// addressRef is a reference to the address that was created for this claim.
69#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
70pub struct IPAddressClaimStatusAddressRef {
71    /// Name of the referent.
72    /// This field is effectively required, but due to backwards compatibility is
73    /// allowed to be empty. Instances of this type with an empty value here are
74    /// almost certainly wrong.
75    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
76    #[serde(default, skip_serializing_if = "Option::is_none")]
77    pub name: Option<String>,
78}