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.21.2
4
5#[allow(unused_imports)]
6mod prelude {
7    pub use kube::CustomResource;
8    pub use schemars::JsonSchema;
9    pub use serde::{Deserialize, Serialize};
10}
11use self::prelude::*;
12
13/// spec is the desired state of IPAddress.
14#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
15#[kube(
16    group = "ipam.cluster.x-k8s.io",
17    version = "v1beta1",
18    kind = "IPAddress",
19    plural = "ipaddresses"
20)]
21#[kube(namespaced)]
22#[kube(derive = "Default")]
23#[kube(derive = "PartialEq")]
24pub struct IPAddressSpec {
25    /// address is the IP address.
26    pub address: String,
27    /// claimRef is a reference to the claim this IPAddress was created for.
28    #[serde(rename = "claimRef")]
29    pub claim_ref: IPAddressClaimRef,
30    /// gateway is the network gateway of the network the address is from.
31    #[serde(default, skip_serializing_if = "Option::is_none")]
32    pub gateway: Option<String>,
33    /// poolRef is a reference to the pool that this IPAddress was created from.
34    #[serde(rename = "poolRef")]
35    pub pool_ref: IPAddressPoolRef,
36    /// prefix is the prefix of the address.
37    pub prefix: i64,
38}
39
40/// claimRef is a reference to the claim this IPAddress was created for.
41#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
42pub struct IPAddressClaimRef {
43    /// Name of the referent.
44    /// This field is effectively required, but due to backwards compatibility is
45    /// allowed to be empty. Instances of this type with an empty value here are
46    /// almost certainly wrong.
47    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
48    #[serde(default, skip_serializing_if = "Option::is_none")]
49    pub name: Option<String>,
50}
51
52/// poolRef is a reference to the pool that this IPAddress was created from.
53#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
54pub struct IPAddressPoolRef {
55    /// APIGroup is the group for the resource being referenced.
56    /// If APIGroup is not specified, the specified Kind must be in the core API group.
57    /// For any other third-party types, APIGroup is required.
58    #[serde(default, skip_serializing_if = "Option::is_none", rename = "apiGroup")]
59    pub api_group: Option<String>,
60    /// Kind is the type of resource being referenced
61    pub kind: String,
62    /// Name is the name of resource being referenced
63    pub name: String,
64}