cluster_api_rs/api/capi_ipaddressclaim.rs
1// WARNING: generated by kopium - manual changes will be overwritten
2// kopium command: kopium --smart-derive-elision -D Default -D PartialEq -A -d -f -
3// kopium version: 0.22.5
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}
12
13use self::prelude::*;
14
15/// spec is the desired state of IPAddressClaim.
16#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
17#[kube(
18 group = "ipam.cluster.x-k8s.io",
19 version = "v1beta2",
20 kind = "IPAddressClaim",
21 plural = "ipaddressclaims"
22)]
23#[kube(namespaced)]
24#[kube(status = "IpAddressClaimStatus")]
25#[kube(derive = "Default")]
26#[kube(derive = "PartialEq")]
27pub struct IpAddressClaimSpec {
28 /// clusterName is the name of the Cluster this object belongs to.
29 #[serde(
30 default,
31 skip_serializing_if = "Option::is_none",
32 rename = "clusterName"
33 )]
34 pub cluster_name: Option<String>,
35 /// poolRef is a reference to the pool from which an IP address should be created.
36 #[serde(rename = "poolRef")]
37 pub pool_ref: IpAddressClaimPoolRef,
38}
39
40/// poolRef is a reference to the pool from which an IP address should be created.
41#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
42pub struct IpAddressClaimPoolRef {
43 /// apiGroup of the IPPool.
44 /// apiGroup must be fully qualified domain name.
45 #[serde(rename = "apiGroup")]
46 pub api_group: String,
47 /// kind of the IPPool.
48 /// kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character.
49 pub kind: String,
50 /// name of the IPPool.
51 /// name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character.
52 pub name: String,
53}
54
55/// status is the observed state of IPAddressClaim.
56#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
57pub struct IpAddressClaimStatus {
58 /// addressRef is a reference to the address that was created for this claim.
59 #[serde(
60 default,
61 skip_serializing_if = "Option::is_none",
62 rename = "addressRef"
63 )]
64 pub address_ref: Option<IpAddressClaimStatusAddressRef>,
65 /// conditions represents the observations of a IPAddressClaim's current state.
66 /// Known condition types are Ready.
67 #[serde(default, skip_serializing_if = "Option::is_none")]
68 pub conditions: Option<Vec<Condition>>,
69 /// deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.
70 #[serde(default, skip_serializing_if = "Option::is_none")]
71 pub deprecated: Option<IpAddressClaimStatusDeprecated>,
72}
73
74/// addressRef is a reference to the address that was created for this claim.
75#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
76pub struct IpAddressClaimStatusAddressRef {
77 /// name of the IPAddress.
78 /// name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character.
79 pub name: String,
80}
81
82/// deprecated groups all the status fields that are deprecated and will be removed when all the nested field are removed.
83#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
84pub struct IpAddressClaimStatusDeprecated {
85 /// v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.
86 #[serde(default, skip_serializing_if = "Option::is_none")]
87 pub v1beta1: Option<IpAddressClaimStatusDeprecatedV1beta1>,
88}
89
90/// v1beta1 groups all the status fields that are deprecated and will be removed when support for v1beta1 will be dropped.
91#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
92pub struct IpAddressClaimStatusDeprecatedV1beta1 {
93 /// conditions summarises the current state of the IPAddressClaim
94 ///
95 /// Deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped. Please see <https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md> for more details.
96 #[serde(default, skip_serializing_if = "Option::is_none")]
97 pub conditions: Option<Vec<Condition>>,
98}