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.21.2
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/// spec is the desired state of 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/// status is the observed state of 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    /// v1beta2 groups all the fields that will be added or modified in IPAddressClaim's status with the V1Beta2 version.
67    #[serde(default, skip_serializing_if = "Option::is_none")]
68    pub v1beta2: Option<IPAddressClaimStatusV1beta2>,
69}
70
71/// addressRef is a reference to the address that was created for this claim.
72#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
73pub struct IPAddressClaimStatusAddressRef {
74    /// Name of the referent.
75    /// This field is effectively required, but due to backwards compatibility is
76    /// allowed to be empty. Instances of this type with an empty value here are
77    /// almost certainly wrong.
78    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
79    #[serde(default, skip_serializing_if = "Option::is_none")]
80    pub name: Option<String>,
81}
82
83/// v1beta2 groups all the fields that will be added or modified in IPAddressClaim's status with the V1Beta2 version.
84#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, JsonSchema)]
85pub struct IPAddressClaimStatusV1beta2 {
86    /// conditions represents the observations of a IPAddressClaim's current state.
87    #[serde(default, skip_serializing_if = "Option::is_none")]
88    pub conditions: Option<Vec<Condition>>,
89}