cluster_api_rs/api/capi_ipaddress.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 kube::CustomResource;
8 pub use schemars::JsonSchema;
9 pub use serde::{Deserialize, Serialize};
10}
11
12use self::prelude::*;
13
14/// spec is the desired state of IPAddress.
15#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
16#[kube(
17 group = "ipam.cluster.x-k8s.io",
18 version = "v1beta2",
19 kind = "IPAddress",
20 plural = "ipaddresses"
21)]
22#[kube(namespaced)]
23#[kube(derive = "Default")]
24#[kube(derive = "PartialEq")]
25pub struct IpAddressSpec {
26 /// address is the IP address.
27 pub address: String,
28 /// claimRef is a reference to the claim this IPAddress was created for.
29 #[serde(rename = "claimRef")]
30 pub claim_ref: IpAddressClaimRef,
31 /// gateway is the network gateway of the network the address is from.
32 #[serde(default, skip_serializing_if = "Option::is_none")]
33 pub gateway: Option<String>,
34 /// poolRef is a reference to the pool that this IPAddress was created from.
35 #[serde(rename = "poolRef")]
36 pub pool_ref: IpAddressPoolRef,
37 /// prefix is the prefix of the address.
38 pub prefix: i32,
39}
40
41/// claimRef is a reference to the claim this IPAddress was created for.
42#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
43pub struct IpAddressClaimRef {
44 /// name of the IPAddressClaim.
45 /// name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character.
46 pub name: String,
47}
48
49/// poolRef is a reference to the pool that this IPAddress was created from.
50#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
51pub struct IpAddressPoolRef {
52 /// apiGroup of the IPPool.
53 /// apiGroup must be fully qualified domain name.
54 #[serde(rename = "apiGroup")]
55 pub api_group: String,
56 /// kind of the IPPool.
57 /// kind must consist of alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character.
58 pub kind: String,
59 /// name of the IPPool.
60 /// name must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character.
61 pub name: String,
62}