1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
use crate::*;

/// LocalObjectReference identifies an API object within the namespace of the
/// referrer.
/// The API object must be valid in the cluster; the Group and Kind must
/// be registered in the cluster for this reference to be valid.
///
/// References to objects with invalid Group and Kind are not valid, and must
/// be rejected by the implementation, with appropriate Conditions set
/// on the containing object.
#[derive(
    Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, schemars::JsonSchema,
)]
pub struct LocalObjectReference {
    /// Group is the group of the referent. For example, "networking.k8s.io".
    /// When unspecified (empty string), core API group is inferred.
    pub group: Group,

    /// Kind is kind of the referent. For example "HTTPRoute" or "Service".
    pub kind: Kind,

    /// Name is the name of the referent.
    pub name: ObjectName,
}

/// SecretObjectReference identifies an API object including its namespace,
/// defaulting to Secret.
///
/// The API object must be valid in the cluster; the Group and Kind must
/// be registered in the cluster for this reference to be valid.
///
/// References to objects with invalid Group and Kind are not valid, and must
/// be rejected by the implementation, with appropriate Conditions set
/// on the containing object.
#[derive(
    Clone, Debug, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize, schemars::JsonSchema,
)]
pub struct SecretObjectReference {
    /// Group is the group of the referent. For example, "networking.k8s.io".
    /// When unspecified (empty string), core API group is inferred.
    pub group: Option<Group>,

    /// Kind is kind of the referent. For example "HTTPRoute" or "Service".
    pub kind: Option<Kind>,

    /// Name is the name of the referent.
    pub name: ObjectName,

    /// Namespace is the namespace of the backend. When unspecified, the local
    /// namespace is inferred.
    ///
    /// Note that when a namespace is specified, a ReferencePolicy object
    /// is required in the referent namespace to allow that namespace's
    /// owner to accept the reference. See the ReferencePolicy documentation
    /// for details.
    ///
    /// Support: Core
    pub namespace: Option<Namespace>,
}

/// BackendObjectReference defines how an ObjectReference that is
/// specific to BackendRef. It includes a few additional fields and features
/// than a regular ObjectReference.
///
/// Note that when a namespace is specified, a ReferencePolicy object
/// is required in the referent namespace to allow that namespace's
/// owner to accept the reference. See the ReferencePolicy documentation
/// for details.
///
/// The API object must be valid in the cluster; the Group and Kind must
/// be registered in the cluster for this reference to be valid.
///
/// References to objects with invalid Group and Kind are not valid, and must
/// be rejected by the implementation, with appropriate Conditions set
/// on the containing object.
#[derive(
    Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, schemars::JsonSchema,
)]
pub struct BackendObjectReference {
    /// Group is the group of the referent. For example, "networking.k8s.io".
    /// When unspecified (empty string), core API group is inferred.
    pub group: Option<Group>,

    /// Kind is kind of the referent. For example "HTTPRoute" or "Service".
    /// Defaults to "Service" when not specified.
    pub kind: Option<Kind>,

    /// Name is the name of the referent.
    pub name: ObjectName,

    /// Namespace is the namespace of the backend. When unspecified, the local
    /// namespace is inferred.
    ///
    /// Note that when a namespace is specified, a ReferencePolicy object
    /// is required in the referent namespace to allow that namespace's
    /// owner to accept the reference. See the ReferencePolicy documentation
    /// for details.
    ///
    /// Support: Core
    pub namespace: Option<Namespace>,

    /// Port specifies the destination port number to use for this resource.
    /// Port is required when the referent is a Kubernetes Service. For other
    /// resources, destination port might be derived from the referent resource
    /// or this field.
    pub port: Option<PortNumber>,
}