Skip to content

Commit 3042703

Browse files
committed
chore: run generators
Signed-off-by: Shane Utt <[email protected]>
1 parent c3de822 commit 3042703

File tree

6 files changed

+84
-621
lines changed

6 files changed

+84
-621
lines changed

gateway-api/src/apis/experimental/common.rs

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,18 @@ pub enum SessionPersistenceType {
8181
Header,
8282
}
8383
#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
84+
pub struct BackendObjectReference {
85+
#[serde(default, skip_serializing_if = "Option::is_none")]
86+
pub group: Option<String>,
87+
#[serde(default, skip_serializing_if = "Option::is_none")]
88+
pub kind: Option<String>,
89+
pub name: String,
90+
#[serde(default, skip_serializing_if = "Option::is_none")]
91+
pub namespace: Option<String>,
92+
#[serde(default, skip_serializing_if = "Option::is_none")]
93+
pub port: Option<i32>,
94+
}
95+
#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
8496
pub struct BackendReference {
8597
#[serde(default, skip_serializing_if = "Option::is_none")]
8698
pub group: Option<String>,
@@ -123,18 +135,6 @@ pub struct HTTPHeader {
123135
pub value: String,
124136
}
125137
#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
126-
pub struct HttpRouteRulesBackendRefsFiltersExternalAuthBackendRef {
127-
#[serde(default, skip_serializing_if = "Option::is_none")]
128-
pub group: Option<String>,
129-
#[serde(default, skip_serializing_if = "Option::is_none")]
130-
pub kind: Option<String>,
131-
pub name: String,
132-
#[serde(default, skip_serializing_if = "Option::is_none")]
133-
pub namespace: Option<String>,
134-
#[serde(default, skip_serializing_if = "Option::is_none")]
135-
pub port: Option<i32>,
136-
}
137-
#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
138138
pub struct HttpRouteRulesBackendRefsFiltersExternalAuthForwardBody {
139139
#[serde(default, skip_serializing_if = "Option::is_none", rename = "maxSize")]
140140
pub max_size: Option<i64>,
@@ -235,6 +235,15 @@ pub struct ParentRouteStatus {
235235
pub parent_ref: ParentReference,
236236
}
237237
#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
238+
pub struct RequestMirror {
239+
#[serde(rename = "backendRef")]
240+
pub backend_ref: BackendObjectReference,
241+
#[serde(default, skip_serializing_if = "Option::is_none")]
242+
pub fraction: Option<RequestMirrorFraction>,
243+
#[serde(default, skip_serializing_if = "Option::is_none")]
244+
pub percent: Option<i32>,
245+
}
246+
#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
238247
pub struct RequestRedirectPath {
239248
#[serde(
240249
default,

gateway-api/src/apis/experimental/grpcroutes.rs

Lines changed: 2 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ pub struct GrpcRouteRulesBackendRefsFilters {
427427
skip_serializing_if = "Option::is_none",
428428
rename = "requestMirror"
429429
)]
430-
pub request_mirror: Option<GrpcRouteRulesBackendRefsFiltersRequestMirror>,
430+
pub request_mirror: Option<RequestMirror>,
431431
/// ResponseHeaderModifier defines a schema for a filter that modifies response
432432
/// headers.
433433
///
@@ -465,58 +465,6 @@ pub struct GrpcRouteRulesBackendRefsFilters {
465465
#[serde(rename = "type")]
466466
pub r#type: GRPCFilterType,
467467
}
468-
/// RequestMirror defines a schema for a filter that mirrors requests.
469-
/// Requests are sent to the specified destination, but responses from
470-
/// that destination are ignored.
471-
///
472-
/// This filter can be used multiple times within the same rule. Note that
473-
/// not all implementations will be able to support mirroring to multiple
474-
/// backends.
475-
///
476-
/// Support: Extended
477-
#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
478-
pub struct GrpcRouteRulesBackendRefsFiltersRequestMirror {
479-
/// BackendRef references a resource where mirrored requests are sent.
480-
///
481-
/// Mirrored requests must be sent only to a single destination endpoint
482-
/// within this BackendRef, irrespective of how many endpoints are present
483-
/// within this BackendRef.
484-
///
485-
/// If the referent cannot be found, this BackendRef is invalid and must be
486-
/// dropped from the Gateway. The controller must ensure the "ResolvedRefs"
487-
/// condition on the Route status is set to `status: False` and not configure
488-
/// this backend in the underlying implementation.
489-
///
490-
/// If there is a cross-namespace reference to an *existing* object
491-
/// that is not allowed by a ReferenceGrant, the controller must ensure the
492-
/// "ResolvedRefs" condition on the Route is set to `status: False`,
493-
/// with the "RefNotPermitted" reason and not configure this backend in the
494-
/// underlying implementation.
495-
///
496-
/// In either error case, the Message of the `ResolvedRefs` Condition
497-
/// should be used to provide more detail about the problem.
498-
///
499-
/// Support: Extended for Kubernetes Service
500-
///
501-
/// Support: Implementation-specific for any other resource
502-
#[serde(rename = "backendRef")]
503-
pub backend_ref: HttpRouteRulesBackendRefsFiltersExternalAuthBackendRef,
504-
/// Fraction represents the fraction of requests that should be
505-
/// mirrored to BackendRef.
506-
///
507-
/// Only one of Fraction or Percent may be specified. If neither field
508-
/// is specified, 100% of requests will be mirrored.
509-
#[serde(default, skip_serializing_if = "Option::is_none")]
510-
pub fraction: Option<RequestMirrorFraction>,
511-
/// Percent represents the percentage of requests that should be
512-
/// mirrored to BackendRef. Its minimum value is 0 (indicating 0% of
513-
/// requests) and its maximum value is 100 (indicating 100% of requests).
514-
///
515-
/// Only one of Fraction or Percent may be specified. If neither field
516-
/// is specified, 100% of requests will be mirrored.
517-
#[serde(default, skip_serializing_if = "Option::is_none")]
518-
pub percent: Option<i32>,
519-
}
520468
/// GRPCRouteFilter defines processing steps that must be completed during the
521469
/// request or response lifecycle. GRPCRouteFilters are meant as an extension
522470
/// point to express processing that may be done in Gateway implementations. Some
@@ -563,7 +511,7 @@ pub struct GrpcRouteRulesFilters {
563511
skip_serializing_if = "Option::is_none",
564512
rename = "requestMirror"
565513
)]
566-
pub request_mirror: Option<GrpcRouteRulesFiltersRequestMirror>,
514+
pub request_mirror: Option<RequestMirror>,
567515
/// ResponseHeaderModifier defines a schema for a filter that modifies response
568516
/// headers.
569517
///
@@ -601,58 +549,6 @@ pub struct GrpcRouteRulesFilters {
601549
#[serde(rename = "type")]
602550
pub r#type: GRPCFilterType,
603551
}
604-
/// RequestMirror defines a schema for a filter that mirrors requests.
605-
/// Requests are sent to the specified destination, but responses from
606-
/// that destination are ignored.
607-
///
608-
/// This filter can be used multiple times within the same rule. Note that
609-
/// not all implementations will be able to support mirroring to multiple
610-
/// backends.
611-
///
612-
/// Support: Extended
613-
#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
614-
pub struct GrpcRouteRulesFiltersRequestMirror {
615-
/// BackendRef references a resource where mirrored requests are sent.
616-
///
617-
/// Mirrored requests must be sent only to a single destination endpoint
618-
/// within this BackendRef, irrespective of how many endpoints are present
619-
/// within this BackendRef.
620-
///
621-
/// If the referent cannot be found, this BackendRef is invalid and must be
622-
/// dropped from the Gateway. The controller must ensure the "ResolvedRefs"
623-
/// condition on the Route status is set to `status: False` and not configure
624-
/// this backend in the underlying implementation.
625-
///
626-
/// If there is a cross-namespace reference to an *existing* object
627-
/// that is not allowed by a ReferenceGrant, the controller must ensure the
628-
/// "ResolvedRefs" condition on the Route is set to `status: False`,
629-
/// with the "RefNotPermitted" reason and not configure this backend in the
630-
/// underlying implementation.
631-
///
632-
/// In either error case, the Message of the `ResolvedRefs` Condition
633-
/// should be used to provide more detail about the problem.
634-
///
635-
/// Support: Extended for Kubernetes Service
636-
///
637-
/// Support: Implementation-specific for any other resource
638-
#[serde(rename = "backendRef")]
639-
pub backend_ref: HttpRouteRulesBackendRefsFiltersExternalAuthBackendRef,
640-
/// Fraction represents the fraction of requests that should be
641-
/// mirrored to BackendRef.
642-
///
643-
/// Only one of Fraction or Percent may be specified. If neither field
644-
/// is specified, 100% of requests will be mirrored.
645-
#[serde(default, skip_serializing_if = "Option::is_none")]
646-
pub fraction: Option<RequestMirrorFraction>,
647-
/// Percent represents the percentage of requests that should be
648-
/// mirrored to BackendRef. Its minimum value is 0 (indicating 0% of
649-
/// requests) and its maximum value is 100 (indicating 100% of requests).
650-
///
651-
/// Only one of Fraction or Percent may be specified. If neither field
652-
/// is specified, 100% of requests will be mirrored.
653-
#[serde(default, skip_serializing_if = "Option::is_none")]
654-
pub percent: Option<i32>,
655-
}
656552
/// GRPCRouteMatch defines the predicate used to match requests to a given
657553
/// action. Multiple match types are ANDed together, i.e. the match will
658554
/// evaluate to true only if all conditions are satisfied.

gateway-api/src/apis/experimental/httproutes.rs

Lines changed: 4 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ pub struct HttpRouteBackendFilter {
486486
skip_serializing_if = "Option::is_none",
487487
rename = "requestMirror"
488488
)]
489-
pub request_mirror: Option<HttpRouteRulesBackendRefsFiltersRequestMirror>,
489+
pub request_mirror: Option<RequestMirror>,
490490
/// RequestRedirect defines a schema for a filter that responds to the
491491
/// request with an HTTP redirection.
492492
///
@@ -789,7 +789,7 @@ pub struct HttpRouteRulesBackendRefsFiltersExternalAuth {
789789
/// implementation to supply the TLS details to be used to connect to that
790790
/// backend.
791791
#[serde(rename = "backendRef")]
792-
pub backend_ref: HttpRouteRulesBackendRefsFiltersExternalAuthBackendRef,
792+
pub backend_ref: BackendObjectReference,
793793
/// ForwardBody controls if requests to the authorization server should include
794794
/// the body of the client request; and if so, how big that body is allowed
795795
/// to be.
@@ -840,58 +840,6 @@ pub struct HttpRouteRulesBackendRefsFiltersExternalAuth {
840840
/// HTTP Support - HTTPRouteExternalAuthHTTP
841841
pub protocol: HttpRouteRulesBackendRefsFiltersExternalAuthProtocol,
842842
}
843-
/// RequestMirror defines a schema for a filter that mirrors requests.
844-
/// Requests are sent to the specified destination, but responses from
845-
/// that destination are ignored.
846-
///
847-
/// This filter can be used multiple times within the same rule. Note that
848-
/// not all implementations will be able to support mirroring to multiple
849-
/// backends.
850-
///
851-
/// Support: Extended
852-
#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
853-
pub struct HttpRouteRulesBackendRefsFiltersRequestMirror {
854-
/// BackendRef references a resource where mirrored requests are sent.
855-
///
856-
/// Mirrored requests must be sent only to a single destination endpoint
857-
/// within this BackendRef, irrespective of how many endpoints are present
858-
/// within this BackendRef.
859-
///
860-
/// If the referent cannot be found, this BackendRef is invalid and must be
861-
/// dropped from the Gateway. The controller must ensure the "ResolvedRefs"
862-
/// condition on the Route status is set to `status: False` and not configure
863-
/// this backend in the underlying implementation.
864-
///
865-
/// If there is a cross-namespace reference to an *existing* object
866-
/// that is not allowed by a ReferenceGrant, the controller must ensure the
867-
/// "ResolvedRefs" condition on the Route is set to `status: False`,
868-
/// with the "RefNotPermitted" reason and not configure this backend in the
869-
/// underlying implementation.
870-
///
871-
/// In either error case, the Message of the `ResolvedRefs` Condition
872-
/// should be used to provide more detail about the problem.
873-
///
874-
/// Support: Extended for Kubernetes Service
875-
///
876-
/// Support: Implementation-specific for any other resource
877-
#[serde(rename = "backendRef")]
878-
pub backend_ref: HttpRouteRulesBackendRefsFiltersExternalAuthBackendRef,
879-
/// Fraction represents the fraction of requests that should be
880-
/// mirrored to BackendRef.
881-
///
882-
/// Only one of Fraction or Percent may be specified. If neither field
883-
/// is specified, 100% of requests will be mirrored.
884-
#[serde(default, skip_serializing_if = "Option::is_none")]
885-
pub fraction: Option<RequestMirrorFraction>,
886-
/// Percent represents the percentage of requests that should be
887-
/// mirrored to BackendRef. Its minimum value is 0 (indicating 0% of
888-
/// requests) and its maximum value is 100 (indicating 100% of requests).
889-
///
890-
/// Only one of Fraction or Percent may be specified. If neither field
891-
/// is specified, 100% of requests will be mirrored.
892-
#[serde(default, skip_serializing_if = "Option::is_none")]
893-
pub percent: Option<i32>,
894-
}
895843
/// HTTPRouteFilter defines processing steps that must be completed during the
896844
/// request or response lifecycle. HTTPRouteFilters are meant as an extension
897845
/// point to express processing that may be done in Gateway implementations. Some
@@ -958,7 +906,7 @@ pub struct HttpRouteFilter {
958906
skip_serializing_if = "Option::is_none",
959907
rename = "requestMirror"
960908
)]
961-
pub request_mirror: Option<HttpRouteRulesFiltersRequestMirror>,
909+
pub request_mirror: Option<RequestMirror>,
962910
/// RequestRedirect defines a schema for a filter that responds to the
963911
/// request with an HTTP redirection.
964912
///
@@ -1261,7 +1209,7 @@ pub struct HttpRouteRulesFiltersExternalAuth {
12611209
/// implementation to supply the TLS details to be used to connect to that
12621210
/// backend.
12631211
#[serde(rename = "backendRef")]
1264-
pub backend_ref: HttpRouteRulesBackendRefsFiltersExternalAuthBackendRef,
1212+
pub backend_ref: BackendObjectReference,
12651213
/// ForwardBody controls if requests to the authorization server should include
12661214
/// the body of the client request; and if so, how big that body is allowed
12671215
/// to be.
@@ -1312,58 +1260,6 @@ pub struct HttpRouteRulesFiltersExternalAuth {
13121260
/// HTTP Support - HTTPRouteExternalAuthHTTP
13131261
pub protocol: HttpRouteRulesBackendRefsFiltersExternalAuthProtocol,
13141262
}
1315-
/// RequestMirror defines a schema for a filter that mirrors requests.
1316-
/// Requests are sent to the specified destination, but responses from
1317-
/// that destination are ignored.
1318-
///
1319-
/// This filter can be used multiple times within the same rule. Note that
1320-
/// not all implementations will be able to support mirroring to multiple
1321-
/// backends.
1322-
///
1323-
/// Support: Extended
1324-
#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
1325-
pub struct HttpRouteRulesFiltersRequestMirror {
1326-
/// BackendRef references a resource where mirrored requests are sent.
1327-
///
1328-
/// Mirrored requests must be sent only to a single destination endpoint
1329-
/// within this BackendRef, irrespective of how many endpoints are present
1330-
/// within this BackendRef.
1331-
///
1332-
/// If the referent cannot be found, this BackendRef is invalid and must be
1333-
/// dropped from the Gateway. The controller must ensure the "ResolvedRefs"
1334-
/// condition on the Route status is set to `status: False` and not configure
1335-
/// this backend in the underlying implementation.
1336-
///
1337-
/// If there is a cross-namespace reference to an *existing* object
1338-
/// that is not allowed by a ReferenceGrant, the controller must ensure the
1339-
/// "ResolvedRefs" condition on the Route is set to `status: False`,
1340-
/// with the "RefNotPermitted" reason and not configure this backend in the
1341-
/// underlying implementation.
1342-
///
1343-
/// In either error case, the Message of the `ResolvedRefs` Condition
1344-
/// should be used to provide more detail about the problem.
1345-
///
1346-
/// Support: Extended for Kubernetes Service
1347-
///
1348-
/// Support: Implementation-specific for any other resource
1349-
#[serde(rename = "backendRef")]
1350-
pub backend_ref: HttpRouteRulesBackendRefsFiltersExternalAuthBackendRef,
1351-
/// Fraction represents the fraction of requests that should be
1352-
/// mirrored to BackendRef.
1353-
///
1354-
/// Only one of Fraction or Percent may be specified. If neither field
1355-
/// is specified, 100% of requests will be mirrored.
1356-
#[serde(default, skip_serializing_if = "Option::is_none")]
1357-
pub fraction: Option<RequestMirrorFraction>,
1358-
/// Percent represents the percentage of requests that should be
1359-
/// mirrored to BackendRef. Its minimum value is 0 (indicating 0% of
1360-
/// requests) and its maximum value is 100 (indicating 100% of requests).
1361-
///
1362-
/// Only one of Fraction or Percent may be specified. If neither field
1363-
/// is specified, 100% of requests will be mirrored.
1364-
#[serde(default, skip_serializing_if = "Option::is_none")]
1365-
pub percent: Option<i32>,
1366-
}
13671263
/// HTTPRouteMatch defines the predicate used to match requests to a given
13681264
/// action. Multiple match types are ANDed together, i.e. the match will
13691265
/// evaluate to true only if all conditions are satisfied.

0 commit comments

Comments
 (0)