From caa21a75982f4cc6753ade0b9ebaf7b75163eadd Mon Sep 17 00:00:00 2001 From: Ben Linsay Date: Tue, 3 Sep 2024 17:06:40 -0400 Subject: [PATCH] add a PartialEq implementation to generated types Signed-off-by: Ben Linsay --- .../src/apis/experimental/constants.rs | 8 +- .../src/apis/experimental/gatewayclasses.rs | 9 +- gateway-api/src/apis/experimental/gateways.rs | 43 +++---- .../src/apis/experimental/grpcroutes.rs | 79 ++++++------ .../src/apis/experimental/httproutes.rs | 119 +++++++++--------- .../src/apis/experimental/referencegrants.rs | 9 +- .../src/apis/experimental/tcproutes.rs | 17 +-- .../src/apis/experimental/tlsroutes.rs | 17 +-- .../src/apis/experimental/udproutes.rs | 17 +-- gateway-api/src/apis/standard/constants.rs | 8 +- .../src/apis/standard/gatewayclasses.rs | 9 +- gateway-api/src/apis/standard/gateways.rs | 35 +++--- gateway-api/src/apis/standard/httproutes.rs | 109 ++++++++-------- .../src/apis/standard/referencegrants.rs | 9 +- update.sh | 4 +- xtask/src/main.rs | 2 + 16 files changed, 254 insertions(+), 240 deletions(-) diff --git a/gateway-api/src/apis/experimental/constants.rs b/gateway-api/src/apis/experimental/constants.rs index 4d0008a..d79c542 100644 --- a/gateway-api/src/apis/experimental/constants.rs +++ b/gateway-api/src/apis/experimental/constants.rs @@ -1,6 +1,6 @@ // WARNING: generated file - manual changes will be overriden -#[derive(Debug)] +#[derive(Debug, PartialEq, Eq)] pub enum GatewayConditionType { Programmed, Accepted, @@ -13,7 +13,7 @@ impl std::fmt::Display for GatewayConditionType { } } -#[derive(Debug)] +#[derive(Debug, PartialEq, Eq)] pub enum GatewayConditionReason { Programmed, Invalid, @@ -35,7 +35,7 @@ impl std::fmt::Display for GatewayConditionReason { } } -#[derive(Debug)] +#[derive(Debug, PartialEq, Eq)] pub enum ListenerConditionType { Conflicted, Accepted, @@ -50,7 +50,7 @@ impl std::fmt::Display for ListenerConditionType { } } -#[derive(Debug)] +#[derive(Debug, PartialEq, Eq)] pub enum ListenerConditionReason { HostnameConflict, ProtocolConflict, diff --git a/gateway-api/src/apis/experimental/gatewayclasses.rs b/gateway-api/src/apis/experimental/gatewayclasses.rs index 1783d25..e7ffbec 100644 --- a/gateway-api/src/apis/experimental/gatewayclasses.rs +++ b/gateway-api/src/apis/experimental/gatewayclasses.rs @@ -1,5 +1,5 @@ // WARNING: generated by kopium - manual changes will be overwritten -// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --docs -f - +// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - // kopium version: 0.20.1 #[allow(unused_imports)] @@ -12,7 +12,7 @@ mod prelude { use self::prelude::*; /// Spec defines the desired state of GatewayClass. -#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] #[kube( group = "gateway.networking.k8s.io", version = "v1", @@ -21,6 +21,7 @@ use self::prelude::*; )] #[kube(status = "GatewayClassStatus")] #[kube(derive = "Default")] +#[kube(derive = "PartialEq")] pub struct GatewayClassSpec { /// ControllerName is the name of the controller that is managing Gateways of /// this class. The value of this field MUST be a domain prefixed path. @@ -86,7 +87,7 @@ pub struct GatewayClassSpec { /// /// /// Support: Implementation-specific -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayClassParametersRef { /// Group is the group of the referent. pub group: String, @@ -106,7 +107,7 @@ pub struct GatewayClassParametersRef { /// /// Implementations MUST populate status on all GatewayClass resources which /// specify their controller name. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayClassStatus { /// Conditions is the current status from the controller for /// this GatewayClass. diff --git a/gateway-api/src/apis/experimental/gateways.rs b/gateway-api/src/apis/experimental/gateways.rs index f511bcc..568408f 100644 --- a/gateway-api/src/apis/experimental/gateways.rs +++ b/gateway-api/src/apis/experimental/gateways.rs @@ -1,5 +1,5 @@ // WARNING: generated by kopium - manual changes will be overwritten -// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --docs -f - +// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - // kopium version: 0.20.1 #[allow(unused_imports)] @@ -13,7 +13,7 @@ mod prelude { use self::prelude::*; /// Spec defines the desired state of Gateway. -#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] #[kube( group = "gateway.networking.k8s.io", version = "v1", @@ -23,6 +23,7 @@ use self::prelude::*; #[kube(namespaced)] #[kube(status = "GatewayStatus")] #[kube(derive = "Default")] +#[kube(derive = "PartialEq")] pub struct GatewaySpec { /// Addresses requested for this Gateway. This is optional and behavior can /// depend on the implementation. If a value is set in the spec and the @@ -214,7 +215,7 @@ pub struct GatewaySpec { } /// GatewayAddress describes an address that can be bound to a Gateway. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayAddresses { /// Type of the address. #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")] @@ -234,7 +235,7 @@ pub struct GatewayAddresses { /// /// /// -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayInfrastructure { /// Annotations that SHOULD be applied to any resources created in response to this Gateway. /// @@ -298,7 +299,7 @@ pub struct GatewayInfrastructure { /// /// /// Support: Implementation-specific -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayInfrastructureParametersRef { /// Group is the group of the referent. pub group: String, @@ -310,7 +311,7 @@ pub struct GatewayInfrastructureParametersRef { /// Listener embodies the concept of a logical endpoint where a Gateway accepts /// network connections. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListeners { /// AllowedRoutes defines the types of routes that MAY be attached to a /// Listener and the trusted namespaces where those Route resources MAY be @@ -442,7 +443,7 @@ pub struct GatewayListeners { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersAllowedRoutes { /// Kinds specifies the groups and kinds of Routes that are allowed to bind /// to this Gateway Listener. When unspecified or empty, the kinds of Routes @@ -469,7 +470,7 @@ pub struct GatewayListenersAllowedRoutes { } /// RouteGroupKind indicates the group and kind of a Route resource. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersAllowedRoutesKinds { /// Group is the group of the Route. #[serde(default, skip_serializing_if = "Option::is_none")] @@ -483,7 +484,7 @@ pub struct GatewayListenersAllowedRoutesKinds { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersAllowedRoutesNamespaces { /// From indicates where Routes will be selected for this Gateway. Possible /// values are: @@ -513,7 +514,7 @@ pub struct GatewayListenersAllowedRoutesNamespaces { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum GatewayListenersAllowedRoutesNamespacesFrom { All, Selector, @@ -526,7 +527,7 @@ pub enum GatewayListenersAllowedRoutesNamespacesFrom { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersAllowedRoutesNamespacesSelector { /// matchExpressions is a list of label selector requirements. The requirements are ANDed. #[serde( @@ -549,7 +550,7 @@ pub struct GatewayListenersAllowedRoutesNamespacesSelector { /// A label selector requirement is a selector that contains values, a key, and an operator that /// relates the key and values. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersAllowedRoutesNamespacesSelectorMatchExpressions { /// key is the label key that the selector applies to. pub key: String, @@ -578,7 +579,7 @@ pub struct GatewayListenersAllowedRoutesNamespacesSelectorMatchExpressions { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersTls { /// CertificateRefs contains a series of references to Kubernetes objects that /// contains TLS certificates and private keys. These certificates are used to @@ -677,7 +678,7 @@ pub struct GatewayListenersTls { /// 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(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersTlsCertificateRefs { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -714,7 +715,7 @@ pub struct GatewayListenersTlsCertificateRefs { /// /// /// -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersTlsFrontendValidation { /// CACertificateRefs contains one or more references to /// Kubernetes objects that contain TLS certificates of @@ -759,7 +760,7 @@ pub struct GatewayListenersTlsFrontendValidation { /// 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(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersTlsFrontendValidationCaCertificateRefs { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -797,14 +798,14 @@ pub struct GatewayListenersTlsFrontendValidationCaCertificateRefs { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum GatewayListenersTlsMode { Terminate, Passthrough, } /// Status defines the current state of Gateway. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayStatus { /// Addresses lists the network addresses that have been bound to the /// Gateway. @@ -845,7 +846,7 @@ pub struct GatewayStatus { } /// GatewayStatusAddress describes a network address that is bound to a Gateway. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayStatusAddresses { /// Type of the address. #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")] @@ -859,7 +860,7 @@ pub struct GatewayStatusAddresses { } /// ListenerStatus is the status associated with a Listener. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayStatusListeners { /// AttachedRoutes represents the total number of Routes that have been /// successfully attached to this Listener. @@ -901,7 +902,7 @@ pub struct GatewayStatusListeners { } /// RouteGroupKind indicates the group and kind of a Route resource. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayStatusListenersSupportedKinds { /// Group is the group of the Route. #[serde(default, skip_serializing_if = "Option::is_none")] diff --git a/gateway-api/src/apis/experimental/grpcroutes.rs b/gateway-api/src/apis/experimental/grpcroutes.rs index bee6a41..0bc5c07 100644 --- a/gateway-api/src/apis/experimental/grpcroutes.rs +++ b/gateway-api/src/apis/experimental/grpcroutes.rs @@ -1,5 +1,5 @@ // WARNING: generated by kopium - manual changes will be overwritten -// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --docs -f - +// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - // kopium version: 0.20.1 #[allow(unused_imports)] @@ -12,7 +12,7 @@ mod prelude { use self::prelude::*; /// Spec defines the desired state of GRPCRoute. -#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] #[kube( group = "gateway.networking.k8s.io", version = "v1", @@ -22,6 +22,7 @@ use self::prelude::*; #[kube(namespaced)] #[kube(status = "GRPCRouteStatus")] #[kube(derive = "Default")] +#[kube(derive = "PartialEq")] pub struct GRPCRouteSpec { /// Hostnames defines a set of hostnames to match against the GRPC /// Host header to select a GRPCRoute to process the request. This matches @@ -190,7 +191,7 @@ pub struct GRPCRouteSpec { /// /// 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. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteParentRefs { /// Group is the group of the referent. /// When unspecified, "gateway.networking.k8s.io" is inferred. @@ -323,7 +324,7 @@ pub struct GRPCRouteParentRefs { /// GRPCRouteRule defines the semantics for matching a gRPC request based on /// conditions (matches), processing it (filters), and forwarding the request to /// an API object (backendRefs). -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRules { /// BackendRefs defines the backend(s) where matching requests should be /// sent. @@ -508,7 +509,7 @@ pub struct GRPCRouteRules { /// /// /// -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesBackendRefs { /// Filters defined at this level MUST be executed if and only if the /// request is being forwarded to the backend defined here. @@ -589,7 +590,7 @@ pub struct GRPCRouteRulesBackendRefs { /// examples include request or response modification, implementing /// authentication strategies, rate-limiting, and traffic shaping. API /// guarantee/conformance is defined based on the type of the filter. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesBackendRefsFilters { /// ExtensionRef is an optional, implementation-specific extension to the /// "filter" behavior. For example, resource "myroutefilter" in group @@ -692,7 +693,7 @@ pub struct GRPCRouteRulesBackendRefsFilters { /// /// /// This filter can be used multiple times within the same rule. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesBackendRefsFiltersExtensionRef { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -708,7 +709,7 @@ pub struct GRPCRouteRulesBackendRefsFiltersExtensionRef { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesBackendRefsFiltersRequestHeaderModifier { /// Add adds the given header(s) (name, value) to the request /// before the action. It appends to any existing values associated @@ -776,7 +777,7 @@ pub struct GRPCRouteRulesBackendRefsFiltersRequestHeaderModifier { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesBackendRefsFiltersRequestHeaderModifierAdd { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -793,7 +794,7 @@ pub struct GRPCRouteRulesBackendRefsFiltersRequestHeaderModifierAdd { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesBackendRefsFiltersRequestHeaderModifierSet { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -820,7 +821,7 @@ pub struct GRPCRouteRulesBackendRefsFiltersRequestHeaderModifierSet { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesBackendRefsFiltersRequestMirror { /// BackendRef references a resource where mirrored requests are sent. /// @@ -884,7 +885,7 @@ pub struct GRPCRouteRulesBackendRefsFiltersRequestMirror { /// /// /// Support: Implementation-specific for any other resource -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesBackendRefsFiltersRequestMirrorBackendRef { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -939,7 +940,7 @@ pub struct GRPCRouteRulesBackendRefsFiltersRequestMirrorBackendRef { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesBackendRefsFiltersResponseHeaderModifier { /// Add adds the given header(s) (name, value) to the request /// before the action. It appends to any existing values associated @@ -1007,7 +1008,7 @@ pub struct GRPCRouteRulesBackendRefsFiltersResponseHeaderModifier { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesBackendRefsFiltersResponseHeaderModifierAdd { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -1024,7 +1025,7 @@ pub struct GRPCRouteRulesBackendRefsFiltersResponseHeaderModifierAdd { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesBackendRefsFiltersResponseHeaderModifierSet { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -1046,7 +1047,7 @@ pub struct GRPCRouteRulesBackendRefsFiltersResponseHeaderModifierSet { /// examples include request or response modification, implementing /// authentication strategies, rate-limiting, and traffic shaping. API /// guarantee/conformance is defined based on the type of the filter. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum GRPCRouteRulesBackendRefsFiltersType { ResponseHeaderModifier, RequestHeaderModifier, @@ -1060,7 +1061,7 @@ pub enum GRPCRouteRulesBackendRefsFiltersType { /// examples include request or response modification, implementing /// authentication strategies, rate-limiting, and traffic shaping. API /// guarantee/conformance is defined based on the type of the filter. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesFilters { /// ExtensionRef is an optional, implementation-specific extension to the /// "filter" behavior. For example, resource "myroutefilter" in group @@ -1163,7 +1164,7 @@ pub struct GRPCRouteRulesFilters { /// /// /// This filter can be used multiple times within the same rule. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesFiltersExtensionRef { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -1179,7 +1180,7 @@ pub struct GRPCRouteRulesFiltersExtensionRef { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesFiltersRequestHeaderModifier { /// Add adds the given header(s) (name, value) to the request /// before the action. It appends to any existing values associated @@ -1247,7 +1248,7 @@ pub struct GRPCRouteRulesFiltersRequestHeaderModifier { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesFiltersRequestHeaderModifierAdd { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -1264,7 +1265,7 @@ pub struct GRPCRouteRulesFiltersRequestHeaderModifierAdd { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesFiltersRequestHeaderModifierSet { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -1291,7 +1292,7 @@ pub struct GRPCRouteRulesFiltersRequestHeaderModifierSet { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesFiltersRequestMirror { /// BackendRef references a resource where mirrored requests are sent. /// @@ -1355,7 +1356,7 @@ pub struct GRPCRouteRulesFiltersRequestMirror { /// /// /// Support: Implementation-specific for any other resource -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesFiltersRequestMirrorBackendRef { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -1410,7 +1411,7 @@ pub struct GRPCRouteRulesFiltersRequestMirrorBackendRef { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesFiltersResponseHeaderModifier { /// Add adds the given header(s) (name, value) to the request /// before the action. It appends to any existing values associated @@ -1478,7 +1479,7 @@ pub struct GRPCRouteRulesFiltersResponseHeaderModifier { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesFiltersResponseHeaderModifierAdd { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -1495,7 +1496,7 @@ pub struct GRPCRouteRulesFiltersResponseHeaderModifierAdd { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesFiltersResponseHeaderModifierSet { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -1517,7 +1518,7 @@ pub struct GRPCRouteRulesFiltersResponseHeaderModifierSet { /// examples include request or response modification, implementing /// authentication strategies, rate-limiting, and traffic shaping. API /// guarantee/conformance is defined based on the type of the filter. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum GRPCRouteRulesFiltersType { ResponseHeaderModifier, RequestHeaderModifier, @@ -1545,7 +1546,7 @@ pub enum GRPCRouteRulesFiltersType { /// /// /// ``` -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesMatches { /// Headers specifies gRPC request header matchers. Multiple match values are /// ANDed together, meaning, a request MUST match all the specified headers @@ -1560,7 +1561,7 @@ pub struct GRPCRouteRulesMatches { /// GRPCHeaderMatch describes how to select a gRPC route by matching gRPC request /// headers. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesMatchesHeaders { /// Name is the name of the gRPC Header to be matched. /// @@ -1580,7 +1581,7 @@ pub struct GRPCRouteRulesMatchesHeaders { /// GRPCHeaderMatch describes how to select a gRPC route by matching gRPC request /// headers. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum GRPCRouteRulesMatchesHeadersType { Exact, RegularExpression, @@ -1588,7 +1589,7 @@ pub enum GRPCRouteRulesMatchesHeadersType { /// Method specifies a gRPC request service/method matcher. If this field is /// not specified, all services and methods will match. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesMatchesMethod { /// Value of the method to match against. If left empty or omitted, will /// match all services. @@ -1618,7 +1619,7 @@ pub struct GRPCRouteRulesMatchesMethod { /// Method specifies a gRPC request service/method matcher. If this field is /// not specified, all services and methods will match. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum GRPCRouteRulesMatchesMethodType { Exact, RegularExpression, @@ -1632,7 +1633,7 @@ pub enum GRPCRouteRulesMatchesMethodType { /// /// /// -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesSessionPersistence { /// AbsoluteTimeout defines the absolute timeout of the persistent /// session. Once the AbsoluteTimeout duration has elapsed, the @@ -1700,7 +1701,7 @@ pub struct GRPCRouteRulesSessionPersistence { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteRulesSessionPersistenceCookieConfig { /// LifetimeType specifies whether the cookie has a permanent or /// session-based lifetime. A permanent cookie persists until its @@ -1736,7 +1737,7 @@ pub struct GRPCRouteRulesSessionPersistenceCookieConfig { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum GRPCRouteRulesSessionPersistenceCookieConfigLifetimeType { Permanent, Session, @@ -1750,14 +1751,14 @@ pub enum GRPCRouteRulesSessionPersistenceCookieConfigLifetimeType { /// /// /// -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum GRPCRouteRulesSessionPersistenceType { Cookie, Header, } /// Status defines the current state of GRPCRoute. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteStatus { /// Parents is a list of parent resources (usually Gateways) that are /// associated with the route, and the status of the route with respect to @@ -1780,7 +1781,7 @@ pub struct GRPCRouteStatus { /// RouteParentStatus describes the status of a route with respect to an /// associated Parent. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteStatusParents { /// Conditions describes the status of the route with respect to the Gateway. /// Note that the route's availability is also subject to the Gateway's own @@ -1833,7 +1834,7 @@ pub struct GRPCRouteStatusParents { /// ParentRef corresponds with a ParentRef in the spec that this /// RouteParentStatus struct describes the status of. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GRPCRouteStatusParentsParentRef { /// Group is the group of the referent. /// When unspecified, "gateway.networking.k8s.io" is inferred. diff --git a/gateway-api/src/apis/experimental/httproutes.rs b/gateway-api/src/apis/experimental/httproutes.rs index aee48c3..42aac7b 100644 --- a/gateway-api/src/apis/experimental/httproutes.rs +++ b/gateway-api/src/apis/experimental/httproutes.rs @@ -1,5 +1,5 @@ // WARNING: generated by kopium - manual changes will be overwritten -// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --docs -f - +// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - // kopium version: 0.20.1 #[allow(unused_imports)] @@ -12,7 +12,7 @@ mod prelude { use self::prelude::*; /// Spec defines the desired state of HTTPRoute. -#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] #[kube( group = "gateway.networking.k8s.io", version = "v1", @@ -22,6 +22,7 @@ use self::prelude::*; #[kube(namespaced)] #[kube(status = "HTTPRouteStatus")] #[kube(derive = "Default")] +#[kube(derive = "PartialEq")] pub struct HTTPRouteSpec { /// Hostnames defines a set of hostnames that should match against the HTTP Host /// header to select a HTTPRoute used to process the request. Implementations @@ -194,7 +195,7 @@ pub struct HTTPRouteSpec { /// /// 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. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteParentRefs { /// Group is the group of the referent. /// When unspecified, "gateway.networking.k8s.io" is inferred. @@ -327,7 +328,7 @@ pub struct HTTPRouteParentRefs { /// HTTPRouteRule defines semantics for matching an HTTP request based on /// conditions (matches), processing it (filters), and forwarding the request to /// an API object (backendRefs). -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRules { /// BackendRefs defines the backend(s) where matching requests should be /// sent. @@ -547,7 +548,7 @@ pub struct HTTPRouteRules { /// /// /// -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefs { /// Filters defined at this level should be executed if and only if the /// request is being forwarded to the backend defined here. @@ -628,7 +629,7 @@ pub struct HTTPRouteRulesBackendRefs { /// examples include request or response modification, implementing /// authentication strategies, rate-limiting, and traffic shaping. API /// guarantee/conformance is defined based on the type of the filter. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFilters { /// ExtensionRef is an optional, implementation-specific extension to the /// "filter" behavior. For example, resource "myroutefilter" in group @@ -759,7 +760,7 @@ pub struct HTTPRouteRulesBackendRefsFilters { /// /// /// Support: Implementation-specific -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersExtensionRef { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -775,7 +776,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersExtensionRef { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersRequestHeaderModifier { /// Add adds the given header(s) (name, value) to the request /// before the action. It appends to any existing values associated @@ -843,7 +844,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersRequestHeaderModifier { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersRequestHeaderModifierAdd { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -860,7 +861,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersRequestHeaderModifierAdd { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersRequestHeaderModifierSet { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -887,7 +888,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersRequestHeaderModifierSet { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersRequestMirror { /// BackendRef references a resource where mirrored requests are sent. /// @@ -951,7 +952,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersRequestMirror { /// /// /// Support: Implementation-specific for any other resource -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersRequestMirrorBackendRef { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -1006,7 +1007,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersRequestMirrorBackendRef { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersRequestRedirect { /// Hostname is the hostname to be used in the value of the `Location` /// header in the response. @@ -1100,7 +1101,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersRequestRedirect { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersRequestRedirectPath { /// ReplaceFullPath specifies the value with which to replace the full path /// of a request during a rewrite or redirect. @@ -1168,7 +1169,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersRequestRedirectPath { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesBackendRefsFiltersRequestRedirectPathType { ReplaceFullPath, ReplacePrefixMatch, @@ -1179,7 +1180,7 @@ pub enum HTTPRouteRulesBackendRefsFiltersRequestRedirectPathType { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesBackendRefsFiltersRequestRedirectScheme { #[serde(rename = "http")] Http, @@ -1192,7 +1193,7 @@ pub enum HTTPRouteRulesBackendRefsFiltersRequestRedirectScheme { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesBackendRefsFiltersRequestRedirectStatusCode { #[serde(rename = "301")] r#_301, @@ -1205,7 +1206,7 @@ pub enum HTTPRouteRulesBackendRefsFiltersRequestRedirectStatusCode { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersResponseHeaderModifier { /// Add adds the given header(s) (name, value) to the request /// before the action. It appends to any existing values associated @@ -1273,7 +1274,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersResponseHeaderModifier { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersResponseHeaderModifierAdd { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -1290,7 +1291,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersResponseHeaderModifierAdd { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersResponseHeaderModifierSet { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -1312,7 +1313,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersResponseHeaderModifierSet { /// examples include request or response modification, implementing /// authentication strategies, rate-limiting, and traffic shaping. API /// guarantee/conformance is defined based on the type of the filter. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesBackendRefsFiltersType { RequestHeaderModifier, ResponseHeaderModifier, @@ -1327,7 +1328,7 @@ pub enum HTTPRouteRulesBackendRefsFiltersType { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersUrlRewrite { /// Hostname is the value to be used to replace the Host header value during /// forwarding. @@ -1348,7 +1349,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersUrlRewrite { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersUrlRewritePath { /// ReplaceFullPath specifies the value with which to replace the full path /// of a request during a rewrite or redirect. @@ -1414,7 +1415,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersUrlRewritePath { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesBackendRefsFiltersUrlRewritePathType { ReplaceFullPath, ReplacePrefixMatch, @@ -1426,7 +1427,7 @@ pub enum HTTPRouteRulesBackendRefsFiltersUrlRewritePathType { /// examples include request or response modification, implementing /// authentication strategies, rate-limiting, and traffic shaping. API /// guarantee/conformance is defined based on the type of the filter. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFilters { /// ExtensionRef is an optional, implementation-specific extension to the /// "filter" behavior. For example, resource "myroutefilter" in group @@ -1557,7 +1558,7 @@ pub struct HTTPRouteRulesFilters { /// /// /// Support: Implementation-specific -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersExtensionRef { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -1573,7 +1574,7 @@ pub struct HTTPRouteRulesFiltersExtensionRef { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersRequestHeaderModifier { /// Add adds the given header(s) (name, value) to the request /// before the action. It appends to any existing values associated @@ -1641,7 +1642,7 @@ pub struct HTTPRouteRulesFiltersRequestHeaderModifier { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersRequestHeaderModifierAdd { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -1658,7 +1659,7 @@ pub struct HTTPRouteRulesFiltersRequestHeaderModifierAdd { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersRequestHeaderModifierSet { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -1685,7 +1686,7 @@ pub struct HTTPRouteRulesFiltersRequestHeaderModifierSet { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersRequestMirror { /// BackendRef references a resource where mirrored requests are sent. /// @@ -1749,7 +1750,7 @@ pub struct HTTPRouteRulesFiltersRequestMirror { /// /// /// Support: Implementation-specific for any other resource -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersRequestMirrorBackendRef { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -1804,7 +1805,7 @@ pub struct HTTPRouteRulesFiltersRequestMirrorBackendRef { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersRequestRedirect { /// Hostname is the hostname to be used in the value of the `Location` /// header in the response. @@ -1898,7 +1899,7 @@ pub struct HTTPRouteRulesFiltersRequestRedirect { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersRequestRedirectPath { /// ReplaceFullPath specifies the value with which to replace the full path /// of a request during a rewrite or redirect. @@ -1966,7 +1967,7 @@ pub struct HTTPRouteRulesFiltersRequestRedirectPath { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesFiltersRequestRedirectPathType { ReplaceFullPath, ReplacePrefixMatch, @@ -1977,7 +1978,7 @@ pub enum HTTPRouteRulesFiltersRequestRedirectPathType { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesFiltersRequestRedirectScheme { #[serde(rename = "http")] Http, @@ -1990,7 +1991,7 @@ pub enum HTTPRouteRulesFiltersRequestRedirectScheme { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesFiltersRequestRedirectStatusCode { #[serde(rename = "301")] r#_301, @@ -2003,7 +2004,7 @@ pub enum HTTPRouteRulesFiltersRequestRedirectStatusCode { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersResponseHeaderModifier { /// Add adds the given header(s) (name, value) to the request /// before the action. It appends to any existing values associated @@ -2071,7 +2072,7 @@ pub struct HTTPRouteRulesFiltersResponseHeaderModifier { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersResponseHeaderModifierAdd { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -2088,7 +2089,7 @@ pub struct HTTPRouteRulesFiltersResponseHeaderModifierAdd { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersResponseHeaderModifierSet { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -2110,7 +2111,7 @@ pub struct HTTPRouteRulesFiltersResponseHeaderModifierSet { /// examples include request or response modification, implementing /// authentication strategies, rate-limiting, and traffic shaping. API /// guarantee/conformance is defined based on the type of the filter. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesFiltersType { RequestHeaderModifier, ResponseHeaderModifier, @@ -2125,7 +2126,7 @@ pub enum HTTPRouteRulesFiltersType { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersUrlRewrite { /// Hostname is the value to be used to replace the Host header value during /// forwarding. @@ -2146,7 +2147,7 @@ pub struct HTTPRouteRulesFiltersUrlRewrite { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersUrlRewritePath { /// ReplaceFullPath specifies the value with which to replace the full path /// of a request during a rewrite or redirect. @@ -2212,7 +2213,7 @@ pub struct HTTPRouteRulesFiltersUrlRewritePath { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesFiltersUrlRewritePathType { ReplaceFullPath, ReplacePrefixMatch, @@ -2239,7 +2240,7 @@ pub enum HTTPRouteRulesFiltersUrlRewritePathType { /// /// /// ``` -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesMatches { /// Headers specifies HTTP request header matchers. Multiple match values are /// ANDed together, meaning, a request must match all the specified headers @@ -2274,7 +2275,7 @@ pub struct HTTPRouteRulesMatches { /// HTTPHeaderMatch describes how to select a HTTP route by matching HTTP request /// headers. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesMatchesHeaders { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -2314,7 +2315,7 @@ pub struct HTTPRouteRulesMatchesHeaders { /// HTTPHeaderMatch describes how to select a HTTP route by matching HTTP request /// headers. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesMatchesHeadersType { Exact, RegularExpression, @@ -2341,7 +2342,7 @@ pub enum HTTPRouteRulesMatchesHeadersType { /// /// /// ``` -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesMatchesMethod { #[serde(rename = "GET")] Get, @@ -2365,7 +2366,7 @@ pub enum HTTPRouteRulesMatchesMethod { /// Path specifies a HTTP request path matcher. If this field is not /// specified, a default prefix match on the "/" path is provided. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesMatchesPath { /// Type specifies how to match against the path Value. /// @@ -2383,7 +2384,7 @@ pub struct HTTPRouteRulesMatchesPath { /// Path specifies a HTTP request path matcher. If this field is not /// specified, a default prefix match on the "/" path is provided. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesMatchesPathType { Exact, PathPrefix, @@ -2392,7 +2393,7 @@ pub enum HTTPRouteRulesMatchesPathType { /// HTTPQueryParamMatch describes how to select a HTTP route by matching HTTP /// query parameters. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesMatchesQueryParams { /// Name is the name of the HTTP query param to be matched. This must be an /// exact string match. (See @@ -2436,7 +2437,7 @@ pub struct HTTPRouteRulesMatchesQueryParams { /// HTTPQueryParamMatch describes how to select a HTTP route by matching HTTP /// query parameters. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesMatchesQueryParamsType { Exact, RegularExpression, @@ -2450,7 +2451,7 @@ pub enum HTTPRouteRulesMatchesQueryParamsType { /// /// /// -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesSessionPersistence { /// AbsoluteTimeout defines the absolute timeout of the persistent /// session. Once the AbsoluteTimeout duration has elapsed, the @@ -2518,7 +2519,7 @@ pub struct HTTPRouteRulesSessionPersistence { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesSessionPersistenceCookieConfig { /// LifetimeType specifies whether the cookie has a permanent or /// session-based lifetime. A permanent cookie persists until its @@ -2554,7 +2555,7 @@ pub struct HTTPRouteRulesSessionPersistenceCookieConfig { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesSessionPersistenceCookieConfigLifetimeType { Permanent, Session, @@ -2568,7 +2569,7 @@ pub enum HTTPRouteRulesSessionPersistenceCookieConfigLifetimeType { /// /// /// -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesSessionPersistenceType { Cookie, Header, @@ -2581,7 +2582,7 @@ pub enum HTTPRouteRulesSessionPersistenceType { /// /// /// -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesTimeouts { /// BackendRequest specifies a timeout for an individual request from the gateway /// to a backend. This covers the time from when the request first starts being @@ -2641,7 +2642,7 @@ pub struct HTTPRouteRulesTimeouts { } /// Status defines the current state of HTTPRoute. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteStatus { /// Parents is a list of parent resources (usually Gateways) that are /// associated with the route, and the status of the route with respect to @@ -2664,7 +2665,7 @@ pub struct HTTPRouteStatus { /// RouteParentStatus describes the status of a route with respect to an /// associated Parent. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteStatusParents { /// Conditions describes the status of the route with respect to the Gateway. /// Note that the route's availability is also subject to the Gateway's own @@ -2717,7 +2718,7 @@ pub struct HTTPRouteStatusParents { /// ParentRef corresponds with a ParentRef in the spec that this /// RouteParentStatus struct describes the status of. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteStatusParentsParentRef { /// Group is the group of the referent. /// When unspecified, "gateway.networking.k8s.io" is inferred. diff --git a/gateway-api/src/apis/experimental/referencegrants.rs b/gateway-api/src/apis/experimental/referencegrants.rs index eed7167..64a65b7 100644 --- a/gateway-api/src/apis/experimental/referencegrants.rs +++ b/gateway-api/src/apis/experimental/referencegrants.rs @@ -1,5 +1,5 @@ // WARNING: generated by kopium - manual changes will be overwritten -// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --docs -f - +// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - // kopium version: 0.20.1 #[allow(unused_imports)] @@ -11,7 +11,7 @@ mod prelude { use self::prelude::*; /// Spec defines the desired state of ReferenceGrant. -#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] #[kube( group = "gateway.networking.k8s.io", version = "v1beta1", @@ -20,6 +20,7 @@ use self::prelude::*; )] #[kube(namespaced)] #[kube(derive = "Default")] +#[kube(derive = "PartialEq")] pub struct ReferenceGrantSpec { /// From describes the trusted namespaces and kinds that can reference the /// resources described in "To". Each entry in this list MUST be considered @@ -40,7 +41,7 @@ pub struct ReferenceGrantSpec { } /// ReferenceGrantFrom describes trusted namespaces and kinds. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct ReferenceGrantFrom { /// Group is the group of the referent. /// When empty, the Kubernetes core API group is inferred. @@ -77,7 +78,7 @@ pub struct ReferenceGrantFrom { /// ReferenceGrantTo describes what Kinds are allowed as targets of the /// references. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct ReferenceGrantTo { /// Group is the group of the referent. /// When empty, the Kubernetes core API group is inferred. diff --git a/gateway-api/src/apis/experimental/tcproutes.rs b/gateway-api/src/apis/experimental/tcproutes.rs index cb8f920..88ed20c 100644 --- a/gateway-api/src/apis/experimental/tcproutes.rs +++ b/gateway-api/src/apis/experimental/tcproutes.rs @@ -1,5 +1,5 @@ // WARNING: generated by kopium - manual changes will be overwritten -// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --docs -f - +// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - // kopium version: 0.20.1 #[allow(unused_imports)] @@ -12,7 +12,7 @@ mod prelude { use self::prelude::*; /// Spec defines the desired state of TCPRoute. -#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] #[kube( group = "gateway.networking.k8s.io", version = "v1alpha2", @@ -22,6 +22,7 @@ use self::prelude::*; #[kube(namespaced)] #[kube(status = "TCPRouteStatus")] #[kube(derive = "Default")] +#[kube(derive = "PartialEq")] pub struct TCPRouteSpec { /// ParentRefs references the resources (usually Gateways) that a Route wants /// to be attached to. Note that the referenced parent resource needs to @@ -127,7 +128,7 @@ pub struct TCPRouteSpec { /// /// 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. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct TCPRouteParentRefs { /// Group is the group of the referent. /// When unspecified, "gateway.networking.k8s.io" is inferred. @@ -258,7 +259,7 @@ pub struct TCPRouteParentRefs { } /// TCPRouteRule is the configuration for a given rule. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct TCPRouteRules { /// BackendRefs defines the backend(s) where matching requests should be /// sent. If unspecified or invalid (refers to a non-existent resource or a @@ -323,7 +324,7 @@ pub struct TCPRouteRules { /// Note that when the BackendTLSPolicy object is enabled by the implementation, /// there are some extra rules about validity to consider here. See the fields /// where this struct is used for more information about the exact behavior. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct TCPRouteRulesBackendRefs { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -391,7 +392,7 @@ pub struct TCPRouteRulesBackendRefs { } /// Status defines the current state of TCPRoute. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct TCPRouteStatus { /// Parents is a list of parent resources (usually Gateways) that are /// associated with the route, and the status of the route with respect to @@ -414,7 +415,7 @@ pub struct TCPRouteStatus { /// RouteParentStatus describes the status of a route with respect to an /// associated Parent. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct TCPRouteStatusParents { /// Conditions describes the status of the route with respect to the Gateway. /// Note that the route's availability is also subject to the Gateway's own @@ -467,7 +468,7 @@ pub struct TCPRouteStatusParents { /// ParentRef corresponds with a ParentRef in the spec that this /// RouteParentStatus struct describes the status of. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct TCPRouteStatusParentsParentRef { /// Group is the group of the referent. /// When unspecified, "gateway.networking.k8s.io" is inferred. diff --git a/gateway-api/src/apis/experimental/tlsroutes.rs b/gateway-api/src/apis/experimental/tlsroutes.rs index 5454165..02e5edd 100644 --- a/gateway-api/src/apis/experimental/tlsroutes.rs +++ b/gateway-api/src/apis/experimental/tlsroutes.rs @@ -1,5 +1,5 @@ // WARNING: generated by kopium - manual changes will be overwritten -// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --docs -f - +// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - // kopium version: 0.20.1 #[allow(unused_imports)] @@ -12,7 +12,7 @@ mod prelude { use self::prelude::*; /// Spec defines the desired state of TLSRoute. -#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] #[kube( group = "gateway.networking.k8s.io", version = "v1alpha2", @@ -22,6 +22,7 @@ use self::prelude::*; #[kube(namespaced)] #[kube(status = "TLSRouteStatus")] #[kube(derive = "Default")] +#[kube(derive = "PartialEq")] pub struct TLSRouteSpec { /// Hostnames defines a set of SNI names that should match against the /// SNI attribute of TLS ClientHello message in TLS handshake. This matches @@ -168,7 +169,7 @@ pub struct TLSRouteSpec { /// /// 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. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct TLSRouteParentRefs { /// Group is the group of the referent. /// When unspecified, "gateway.networking.k8s.io" is inferred. @@ -299,7 +300,7 @@ pub struct TLSRouteParentRefs { } /// TLSRouteRule is the configuration for a given rule. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct TLSRouteRules { /// BackendRefs defines the backend(s) where matching requests should be /// sent. If unspecified or invalid (refers to a non-existent resource or @@ -367,7 +368,7 @@ pub struct TLSRouteRules { /// Note that when the BackendTLSPolicy object is enabled by the implementation, /// there are some extra rules about validity to consider here. See the fields /// where this struct is used for more information about the exact behavior. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct TLSRouteRulesBackendRefs { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -435,7 +436,7 @@ pub struct TLSRouteRulesBackendRefs { } /// Status defines the current state of TLSRoute. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct TLSRouteStatus { /// Parents is a list of parent resources (usually Gateways) that are /// associated with the route, and the status of the route with respect to @@ -458,7 +459,7 @@ pub struct TLSRouteStatus { /// RouteParentStatus describes the status of a route with respect to an /// associated Parent. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct TLSRouteStatusParents { /// Conditions describes the status of the route with respect to the Gateway. /// Note that the route's availability is also subject to the Gateway's own @@ -511,7 +512,7 @@ pub struct TLSRouteStatusParents { /// ParentRef corresponds with a ParentRef in the spec that this /// RouteParentStatus struct describes the status of. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct TLSRouteStatusParentsParentRef { /// Group is the group of the referent. /// When unspecified, "gateway.networking.k8s.io" is inferred. diff --git a/gateway-api/src/apis/experimental/udproutes.rs b/gateway-api/src/apis/experimental/udproutes.rs index af46827..56375cc 100644 --- a/gateway-api/src/apis/experimental/udproutes.rs +++ b/gateway-api/src/apis/experimental/udproutes.rs @@ -1,5 +1,5 @@ // WARNING: generated by kopium - manual changes will be overwritten -// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --docs -f - +// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - // kopium version: 0.20.1 #[allow(unused_imports)] @@ -12,7 +12,7 @@ mod prelude { use self::prelude::*; /// Spec defines the desired state of UDPRoute. -#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] #[kube( group = "gateway.networking.k8s.io", version = "v1alpha2", @@ -22,6 +22,7 @@ use self::prelude::*; #[kube(namespaced)] #[kube(status = "UDPRouteStatus")] #[kube(derive = "Default")] +#[kube(derive = "PartialEq")] pub struct UDPRouteSpec { /// ParentRefs references the resources (usually Gateways) that a Route wants /// to be attached to. Note that the referenced parent resource needs to @@ -127,7 +128,7 @@ pub struct UDPRouteSpec { /// /// 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. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct UDPRouteParentRefs { /// Group is the group of the referent. /// When unspecified, "gateway.networking.k8s.io" is inferred. @@ -258,7 +259,7 @@ pub struct UDPRouteParentRefs { } /// UDPRouteRule is the configuration for a given rule. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct UDPRouteRules { /// BackendRefs defines the backend(s) where matching requests should be /// sent. If unspecified or invalid (refers to a non-existent resource or a @@ -323,7 +324,7 @@ pub struct UDPRouteRules { /// Note that when the BackendTLSPolicy object is enabled by the implementation, /// there are some extra rules about validity to consider here. See the fields /// where this struct is used for more information about the exact behavior. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct UDPRouteRulesBackendRefs { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -391,7 +392,7 @@ pub struct UDPRouteRulesBackendRefs { } /// Status defines the current state of UDPRoute. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct UDPRouteStatus { /// Parents is a list of parent resources (usually Gateways) that are /// associated with the route, and the status of the route with respect to @@ -414,7 +415,7 @@ pub struct UDPRouteStatus { /// RouteParentStatus describes the status of a route with respect to an /// associated Parent. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct UDPRouteStatusParents { /// Conditions describes the status of the route with respect to the Gateway. /// Note that the route's availability is also subject to the Gateway's own @@ -467,7 +468,7 @@ pub struct UDPRouteStatusParents { /// ParentRef corresponds with a ParentRef in the spec that this /// RouteParentStatus struct describes the status of. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct UDPRouteStatusParentsParentRef { /// Group is the group of the referent. /// When unspecified, "gateway.networking.k8s.io" is inferred. diff --git a/gateway-api/src/apis/standard/constants.rs b/gateway-api/src/apis/standard/constants.rs index 4d0008a..d79c542 100644 --- a/gateway-api/src/apis/standard/constants.rs +++ b/gateway-api/src/apis/standard/constants.rs @@ -1,6 +1,6 @@ // WARNING: generated file - manual changes will be overriden -#[derive(Debug)] +#[derive(Debug, PartialEq, Eq)] pub enum GatewayConditionType { Programmed, Accepted, @@ -13,7 +13,7 @@ impl std::fmt::Display for GatewayConditionType { } } -#[derive(Debug)] +#[derive(Debug, PartialEq, Eq)] pub enum GatewayConditionReason { Programmed, Invalid, @@ -35,7 +35,7 @@ impl std::fmt::Display for GatewayConditionReason { } } -#[derive(Debug)] +#[derive(Debug, PartialEq, Eq)] pub enum ListenerConditionType { Conflicted, Accepted, @@ -50,7 +50,7 @@ impl std::fmt::Display for ListenerConditionType { } } -#[derive(Debug)] +#[derive(Debug, PartialEq, Eq)] pub enum ListenerConditionReason { HostnameConflict, ProtocolConflict, diff --git a/gateway-api/src/apis/standard/gatewayclasses.rs b/gateway-api/src/apis/standard/gatewayclasses.rs index 39ce9e6..dcd45e8 100644 --- a/gateway-api/src/apis/standard/gatewayclasses.rs +++ b/gateway-api/src/apis/standard/gatewayclasses.rs @@ -1,5 +1,5 @@ // WARNING: generated by kopium - manual changes will be overwritten -// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --docs -f - +// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - // kopium version: 0.20.1 #[allow(unused_imports)] @@ -12,7 +12,7 @@ mod prelude { use self::prelude::*; /// Spec defines the desired state of GatewayClass. -#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] #[kube( group = "gateway.networking.k8s.io", version = "v1", @@ -21,6 +21,7 @@ use self::prelude::*; )] #[kube(status = "GatewayClassStatus")] #[kube(derive = "Default")] +#[kube(derive = "PartialEq")] pub struct GatewayClassSpec { /// ControllerName is the name of the controller that is managing Gateways of /// this class. The value of this field MUST be a domain prefixed path. @@ -86,7 +87,7 @@ pub struct GatewayClassSpec { /// /// /// Support: Implementation-specific -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayClassParametersRef { /// Group is the group of the referent. pub group: String, @@ -106,7 +107,7 @@ pub struct GatewayClassParametersRef { /// /// Implementations MUST populate status on all GatewayClass resources which /// specify their controller name. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayClassStatus { /// Conditions is the current status from the controller for /// this GatewayClass. diff --git a/gateway-api/src/apis/standard/gateways.rs b/gateway-api/src/apis/standard/gateways.rs index d5e2178..94cbf92 100644 --- a/gateway-api/src/apis/standard/gateways.rs +++ b/gateway-api/src/apis/standard/gateways.rs @@ -1,5 +1,5 @@ // WARNING: generated by kopium - manual changes will be overwritten -// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --docs -f - +// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - // kopium version: 0.20.1 #[allow(unused_imports)] @@ -13,7 +13,7 @@ mod prelude { use self::prelude::*; /// Spec defines the desired state of Gateway. -#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] #[kube( group = "gateway.networking.k8s.io", version = "v1", @@ -23,6 +23,7 @@ use self::prelude::*; #[kube(namespaced)] #[kube(status = "GatewayStatus")] #[kube(derive = "Default")] +#[kube(derive = "PartialEq")] pub struct GatewaySpec { /// Addresses requested for this Gateway. This is optional and behavior can /// depend on the implementation. If a value is set in the spec and the @@ -205,7 +206,7 @@ pub struct GatewaySpec { } /// GatewayAddress describes an address that can be bound to a Gateway. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayAddresses { /// Type of the address. #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")] @@ -220,7 +221,7 @@ pub struct GatewayAddresses { /// Listener embodies the concept of a logical endpoint where a Gateway accepts /// network connections. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListeners { /// AllowedRoutes defines the types of routes that MAY be attached to a /// Listener and the trusted namespaces where those Route resources MAY be @@ -352,7 +353,7 @@ pub struct GatewayListeners { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersAllowedRoutes { /// Kinds specifies the groups and kinds of Routes that are allowed to bind /// to this Gateway Listener. When unspecified or empty, the kinds of Routes @@ -379,7 +380,7 @@ pub struct GatewayListenersAllowedRoutes { } /// RouteGroupKind indicates the group and kind of a Route resource. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersAllowedRoutesKinds { /// Group is the group of the Route. #[serde(default, skip_serializing_if = "Option::is_none")] @@ -393,7 +394,7 @@ pub struct GatewayListenersAllowedRoutesKinds { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersAllowedRoutesNamespaces { /// From indicates where Routes will be selected for this Gateway. Possible /// values are: @@ -423,7 +424,7 @@ pub struct GatewayListenersAllowedRoutesNamespaces { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum GatewayListenersAllowedRoutesNamespacesFrom { All, Selector, @@ -436,7 +437,7 @@ pub enum GatewayListenersAllowedRoutesNamespacesFrom { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersAllowedRoutesNamespacesSelector { /// matchExpressions is a list of label selector requirements. The requirements are ANDed. #[serde( @@ -459,7 +460,7 @@ pub struct GatewayListenersAllowedRoutesNamespacesSelector { /// A label selector requirement is a selector that contains values, a key, and an operator that /// relates the key and values. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersAllowedRoutesNamespacesSelectorMatchExpressions { /// key is the label key that the selector applies to. pub key: String, @@ -488,7 +489,7 @@ pub struct GatewayListenersAllowedRoutesNamespacesSelectorMatchExpressions { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersTls { /// CertificateRefs contains a series of references to Kubernetes objects that /// contains TLS certificates and private keys. These certificates are used to @@ -570,7 +571,7 @@ pub struct GatewayListenersTls { /// 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(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayListenersTlsCertificateRefs { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -610,14 +611,14 @@ pub struct GatewayListenersTlsCertificateRefs { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum GatewayListenersTlsMode { Terminate, Passthrough, } /// Status defines the current state of Gateway. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayStatus { /// Addresses lists the network addresses that have been bound to the /// Gateway. @@ -658,7 +659,7 @@ pub struct GatewayStatus { } /// GatewayStatusAddress describes a network address that is bound to a Gateway. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayStatusAddresses { /// Type of the address. #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")] @@ -672,7 +673,7 @@ pub struct GatewayStatusAddresses { } /// ListenerStatus is the status associated with a Listener. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayStatusListeners { /// AttachedRoutes represents the total number of Routes that have been /// successfully attached to this Listener. @@ -714,7 +715,7 @@ pub struct GatewayStatusListeners { } /// RouteGroupKind indicates the group and kind of a Route resource. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct GatewayStatusListenersSupportedKinds { /// Group is the group of the Route. #[serde(default, skip_serializing_if = "Option::is_none")] diff --git a/gateway-api/src/apis/standard/httproutes.rs b/gateway-api/src/apis/standard/httproutes.rs index afef1d1..95cb252 100644 --- a/gateway-api/src/apis/standard/httproutes.rs +++ b/gateway-api/src/apis/standard/httproutes.rs @@ -1,5 +1,5 @@ // WARNING: generated by kopium - manual changes will be overwritten -// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --docs -f - +// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - // kopium version: 0.20.1 #[allow(unused_imports)] @@ -12,7 +12,7 @@ mod prelude { use self::prelude::*; /// Spec defines the desired state of HTTPRoute. -#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] #[kube( group = "gateway.networking.k8s.io", version = "v1", @@ -22,6 +22,7 @@ use self::prelude::*; #[kube(namespaced)] #[kube(status = "HTTPRouteStatus")] #[kube(derive = "Default")] +#[kube(derive = "PartialEq")] pub struct HTTPRouteSpec { /// Hostnames defines a set of hostnames that should match against the HTTP Host /// header to select a HTTPRoute used to process the request. Implementations @@ -183,7 +184,7 @@ pub struct HTTPRouteSpec { /// /// 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. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteParentRefs { /// Group is the group of the referent. /// When unspecified, "gateway.networking.k8s.io" is inferred. @@ -301,7 +302,7 @@ pub struct HTTPRouteParentRefs { /// HTTPRouteRule defines semantics for matching an HTTP request based on /// conditions (matches), processing it (filters), and forwarding the request to /// an API object (backendRefs). -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRules { /// BackendRefs defines the backend(s) where matching requests should be /// sent. @@ -498,7 +499,7 @@ pub struct HTTPRouteRules { /// /// /// -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefs { /// Filters defined at this level should be executed if and only if the /// request is being forwarded to the backend defined here. @@ -579,7 +580,7 @@ pub struct HTTPRouteRulesBackendRefs { /// examples include request or response modification, implementing /// authentication strategies, rate-limiting, and traffic shaping. API /// guarantee/conformance is defined based on the type of the filter. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFilters { /// ExtensionRef is an optional, implementation-specific extension to the /// "filter" behavior. For example, resource "myroutefilter" in group @@ -710,7 +711,7 @@ pub struct HTTPRouteRulesBackendRefsFilters { /// /// /// Support: Implementation-specific -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersExtensionRef { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -726,7 +727,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersExtensionRef { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersRequestHeaderModifier { /// Add adds the given header(s) (name, value) to the request /// before the action. It appends to any existing values associated @@ -794,7 +795,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersRequestHeaderModifier { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersRequestHeaderModifierAdd { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -811,7 +812,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersRequestHeaderModifierAdd { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersRequestHeaderModifierSet { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -838,7 +839,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersRequestHeaderModifierSet { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersRequestMirror { /// BackendRef references a resource where mirrored requests are sent. /// @@ -902,7 +903,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersRequestMirror { /// /// /// Support: Implementation-specific for any other resource -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersRequestMirrorBackendRef { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -957,7 +958,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersRequestMirrorBackendRef { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersRequestRedirect { /// Hostname is the hostname to be used in the value of the `Location` /// header in the response. @@ -1051,7 +1052,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersRequestRedirect { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersRequestRedirectPath { /// ReplaceFullPath specifies the value with which to replace the full path /// of a request during a rewrite or redirect. @@ -1119,7 +1120,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersRequestRedirectPath { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesBackendRefsFiltersRequestRedirectPathType { ReplaceFullPath, ReplacePrefixMatch, @@ -1130,7 +1131,7 @@ pub enum HTTPRouteRulesBackendRefsFiltersRequestRedirectPathType { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesBackendRefsFiltersRequestRedirectScheme { #[serde(rename = "http")] Http, @@ -1143,7 +1144,7 @@ pub enum HTTPRouteRulesBackendRefsFiltersRequestRedirectScheme { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesBackendRefsFiltersRequestRedirectStatusCode { #[serde(rename = "301")] r#_301, @@ -1156,7 +1157,7 @@ pub enum HTTPRouteRulesBackendRefsFiltersRequestRedirectStatusCode { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersResponseHeaderModifier { /// Add adds the given header(s) (name, value) to the request /// before the action. It appends to any existing values associated @@ -1224,7 +1225,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersResponseHeaderModifier { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersResponseHeaderModifierAdd { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -1241,7 +1242,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersResponseHeaderModifierAdd { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersResponseHeaderModifierSet { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -1263,7 +1264,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersResponseHeaderModifierSet { /// examples include request or response modification, implementing /// authentication strategies, rate-limiting, and traffic shaping. API /// guarantee/conformance is defined based on the type of the filter. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesBackendRefsFiltersType { RequestHeaderModifier, ResponseHeaderModifier, @@ -1278,7 +1279,7 @@ pub enum HTTPRouteRulesBackendRefsFiltersType { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersUrlRewrite { /// Hostname is the value to be used to replace the Host header value during /// forwarding. @@ -1299,7 +1300,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersUrlRewrite { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesBackendRefsFiltersUrlRewritePath { /// ReplaceFullPath specifies the value with which to replace the full path /// of a request during a rewrite or redirect. @@ -1365,7 +1366,7 @@ pub struct HTTPRouteRulesBackendRefsFiltersUrlRewritePath { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesBackendRefsFiltersUrlRewritePathType { ReplaceFullPath, ReplacePrefixMatch, @@ -1377,7 +1378,7 @@ pub enum HTTPRouteRulesBackendRefsFiltersUrlRewritePathType { /// examples include request or response modification, implementing /// authentication strategies, rate-limiting, and traffic shaping. API /// guarantee/conformance is defined based on the type of the filter. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFilters { /// ExtensionRef is an optional, implementation-specific extension to the /// "filter" behavior. For example, resource "myroutefilter" in group @@ -1508,7 +1509,7 @@ pub struct HTTPRouteRulesFilters { /// /// /// Support: Implementation-specific -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersExtensionRef { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -1524,7 +1525,7 @@ pub struct HTTPRouteRulesFiltersExtensionRef { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersRequestHeaderModifier { /// Add adds the given header(s) (name, value) to the request /// before the action. It appends to any existing values associated @@ -1592,7 +1593,7 @@ pub struct HTTPRouteRulesFiltersRequestHeaderModifier { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersRequestHeaderModifierAdd { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -1609,7 +1610,7 @@ pub struct HTTPRouteRulesFiltersRequestHeaderModifierAdd { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersRequestHeaderModifierSet { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -1636,7 +1637,7 @@ pub struct HTTPRouteRulesFiltersRequestHeaderModifierSet { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersRequestMirror { /// BackendRef references a resource where mirrored requests are sent. /// @@ -1700,7 +1701,7 @@ pub struct HTTPRouteRulesFiltersRequestMirror { /// /// /// Support: Implementation-specific for any other resource -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersRequestMirrorBackendRef { /// Group is the group of the referent. For example, "gateway.networking.k8s.io". /// When unspecified or empty string, core API group is inferred. @@ -1755,7 +1756,7 @@ pub struct HTTPRouteRulesFiltersRequestMirrorBackendRef { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersRequestRedirect { /// Hostname is the hostname to be used in the value of the `Location` /// header in the response. @@ -1849,7 +1850,7 @@ pub struct HTTPRouteRulesFiltersRequestRedirect { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersRequestRedirectPath { /// ReplaceFullPath specifies the value with which to replace the full path /// of a request during a rewrite or redirect. @@ -1917,7 +1918,7 @@ pub struct HTTPRouteRulesFiltersRequestRedirectPath { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesFiltersRequestRedirectPathType { ReplaceFullPath, ReplacePrefixMatch, @@ -1928,7 +1929,7 @@ pub enum HTTPRouteRulesFiltersRequestRedirectPathType { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesFiltersRequestRedirectScheme { #[serde(rename = "http")] Http, @@ -1941,7 +1942,7 @@ pub enum HTTPRouteRulesFiltersRequestRedirectScheme { /// /// /// Support: Core -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesFiltersRequestRedirectStatusCode { #[serde(rename = "301")] r#_301, @@ -1954,7 +1955,7 @@ pub enum HTTPRouteRulesFiltersRequestRedirectStatusCode { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersResponseHeaderModifier { /// Add adds the given header(s) (name, value) to the request /// before the action. It appends to any existing values associated @@ -2022,7 +2023,7 @@ pub struct HTTPRouteRulesFiltersResponseHeaderModifier { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersResponseHeaderModifierAdd { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -2039,7 +2040,7 @@ pub struct HTTPRouteRulesFiltersResponseHeaderModifierAdd { } /// HTTPHeader represents an HTTP Header name and value as defined by RFC 7230. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersResponseHeaderModifierSet { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -2061,7 +2062,7 @@ pub struct HTTPRouteRulesFiltersResponseHeaderModifierSet { /// examples include request or response modification, implementing /// authentication strategies, rate-limiting, and traffic shaping. API /// guarantee/conformance is defined based on the type of the filter. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesFiltersType { RequestHeaderModifier, ResponseHeaderModifier, @@ -2076,7 +2077,7 @@ pub enum HTTPRouteRulesFiltersType { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersUrlRewrite { /// Hostname is the value to be used to replace the Host header value during /// forwarding. @@ -2097,7 +2098,7 @@ pub struct HTTPRouteRulesFiltersUrlRewrite { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesFiltersUrlRewritePath { /// ReplaceFullPath specifies the value with which to replace the full path /// of a request during a rewrite or redirect. @@ -2163,7 +2164,7 @@ pub struct HTTPRouteRulesFiltersUrlRewritePath { /// /// /// Support: Extended -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesFiltersUrlRewritePathType { ReplaceFullPath, ReplacePrefixMatch, @@ -2190,7 +2191,7 @@ pub enum HTTPRouteRulesFiltersUrlRewritePathType { /// /// /// ``` -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesMatches { /// Headers specifies HTTP request header matchers. Multiple match values are /// ANDed together, meaning, a request must match all the specified headers @@ -2225,7 +2226,7 @@ pub struct HTTPRouteRulesMatches { /// HTTPHeaderMatch describes how to select a HTTP route by matching HTTP request /// headers. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesMatchesHeaders { /// Name is the name of the HTTP Header to be matched. Name matching MUST be /// case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). @@ -2265,7 +2266,7 @@ pub struct HTTPRouteRulesMatchesHeaders { /// HTTPHeaderMatch describes how to select a HTTP route by matching HTTP request /// headers. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesMatchesHeadersType { Exact, RegularExpression, @@ -2292,7 +2293,7 @@ pub enum HTTPRouteRulesMatchesHeadersType { /// /// /// ``` -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesMatchesMethod { #[serde(rename = "GET")] Get, @@ -2316,7 +2317,7 @@ pub enum HTTPRouteRulesMatchesMethod { /// Path specifies a HTTP request path matcher. If this field is not /// specified, a default prefix match on the "/" path is provided. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesMatchesPath { /// Type specifies how to match against the path Value. /// @@ -2334,7 +2335,7 @@ pub struct HTTPRouteRulesMatchesPath { /// Path specifies a HTTP request path matcher. If this field is not /// specified, a default prefix match on the "/" path is provided. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesMatchesPathType { Exact, PathPrefix, @@ -2343,7 +2344,7 @@ pub enum HTTPRouteRulesMatchesPathType { /// HTTPQueryParamMatch describes how to select a HTTP route by matching HTTP /// query parameters. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteRulesMatchesQueryParams { /// Name is the name of the HTTP query param to be matched. This must be an /// exact string match. (See @@ -2387,14 +2388,14 @@ pub struct HTTPRouteRulesMatchesQueryParams { /// HTTPQueryParamMatch describes how to select a HTTP route by matching HTTP /// query parameters. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, PartialEq)] pub enum HTTPRouteRulesMatchesQueryParamsType { Exact, RegularExpression, } /// Status defines the current state of HTTPRoute. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteStatus { /// Parents is a list of parent resources (usually Gateways) that are /// associated with the route, and the status of the route with respect to @@ -2417,7 +2418,7 @@ pub struct HTTPRouteStatus { /// RouteParentStatus describes the status of a route with respect to an /// associated Parent. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteStatusParents { /// Conditions describes the status of the route with respect to the Gateway. /// Note that the route's availability is also subject to the Gateway's own @@ -2470,7 +2471,7 @@ pub struct HTTPRouteStatusParents { /// ParentRef corresponds with a ParentRef in the spec that this /// RouteParentStatus struct describes the status of. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct HTTPRouteStatusParentsParentRef { /// Group is the group of the referent. /// When unspecified, "gateway.networking.k8s.io" is inferred. diff --git a/gateway-api/src/apis/standard/referencegrants.rs b/gateway-api/src/apis/standard/referencegrants.rs index eed7167..64a65b7 100644 --- a/gateway-api/src/apis/standard/referencegrants.rs +++ b/gateway-api/src/apis/standard/referencegrants.rs @@ -1,5 +1,5 @@ // WARNING: generated by kopium - manual changes will be overwritten -// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --docs -f - +// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - // kopium version: 0.20.1 #[allow(unused_imports)] @@ -11,7 +11,7 @@ mod prelude { use self::prelude::*; /// Spec defines the desired state of ReferenceGrant. -#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] #[kube( group = "gateway.networking.k8s.io", version = "v1beta1", @@ -20,6 +20,7 @@ use self::prelude::*; )] #[kube(namespaced)] #[kube(derive = "Default")] +#[kube(derive = "PartialEq")] pub struct ReferenceGrantSpec { /// From describes the trusted namespaces and kinds that can reference the /// resources described in "To". Each entry in this list MUST be considered @@ -40,7 +41,7 @@ pub struct ReferenceGrantSpec { } /// ReferenceGrantFrom describes trusted namespaces and kinds. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct ReferenceGrantFrom { /// Group is the group of the referent. /// When empty, the Kubernetes core API group is inferred. @@ -77,7 +78,7 @@ pub struct ReferenceGrantFrom { /// ReferenceGrantTo describes what Kinds are allowed as targets of the /// references. -#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default)] +#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)] pub struct ReferenceGrantTo { /// Group is the group of the referent. /// When empty, the Kubernetes core API group is inferred. diff --git a/update.sh b/update.sh index 977c5bf..99f6e4d 100755 --- a/update.sh +++ b/update.sh @@ -49,7 +49,7 @@ echo "// WARNING! generated file do not edit" > gateway-api/src/apis/standard/mo for API in "${STANDARD_APIS[@]}" do echo "generating standard api ${API}" - curl -sSL "https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${VERSION}/config/crd/standard/gateway.networking.k8s.io_${API}.yaml" | kopium --schema=derived --derive=JsonSchema --derive=Default --docs -f - > gateway-api/src/apis/standard/${API}.rs + curl -sSL "https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${VERSION}/config/crd/standard/gateway.networking.k8s.io_${API}.yaml" | kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - > gateway-api/src/apis/standard/${API}.rs echo "pub mod ${API};" >> gateway-api/src/apis/standard/mod.rs done @@ -86,7 +86,7 @@ echo "// WARNING! generated file do not edit" > gateway-api/src/apis/experimenta for API in "${EXPERIMENTAL_APIS[@]}" do echo "generating experimental api $API" - curl -sSL "https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${VERSION}/config/crd/experimental/gateway.networking.k8s.io_${API}.yaml" | kopium --schema=derived --derive=JsonSchema --derive=Default --docs -f - > gateway-api/src/apis/experimental/${API}.rs + curl -sSL "https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${VERSION}/config/crd/experimental/gateway.networking.k8s.io_${API}.yaml" | kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f - > gateway-api/src/apis/experimental/${API}.rs echo "pub mod ${API};" >> gateway-api/src/apis/experimental/mod.rs done diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 1a04592..44c7112 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -47,6 +47,8 @@ fn gen_const_enums(scope: &mut Scope, constants: String) { let mut enumeration = Enum::new(enum_type); enumeration.derive("Debug"); + enumeration.derive("PartialEq"); + enumeration.derive("Eq"); enumeration.vis("pub"); for variant in variants {