istio_crds/
lib.rs

1// Generated by:
2// target/debug/k8s-crds-codegen
3
4pub mod extensions_istio_io {
5    pub mod v1alpha1 {
6        pub mod wasm_plugin {
7            #[derive(serde::Deserialize, Debug, PartialEq)]
8            pub struct WasmPlugin {
9                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
10                pub spec: Spec,
11                pub status: Status,
12            }
13
14            impl k8s_openapi::Resource for WasmPlugin {
15                type Scope = k8s_openapi::ClusterResourceScope;
16
17                const API_VERSION: &'static str = "extensions.istio.io/v1alpha1";
18                const GROUP: &'static str = "extensions.istio.io";
19                const KIND: &'static str = "WasmPlugin";
20                const VERSION: &'static str = "v1alpha1";
21                const URL_PATH_SEGMENT: &'static str = "TODO";
22            }
23
24            impl k8s_openapi::Metadata for WasmPlugin {
25                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
26
27                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
28                    &self.metadata
29                }
30
31                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
32                    &mut self.metadata
33                }
34            }
35
36            impl serde::Serialize for WasmPlugin {
37                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
38                where
39                    S: serde::Serializer,
40                {
41                    use serde::ser::SerializeStruct;
42                    let mut state = serializer.serialize_struct("WasmPlugin", 5)?;
43                    state.serialize_field(
44                        "apiVersion",
45                        <Self as k8s_openapi::Resource>::API_VERSION,
46                    )?;
47                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
48                    state.serialize_field("metadata", &self.metadata)?;
49                    state.serialize_field("spec", &self.spec)?;
50                    state.serialize_field("status", &self.status)?;
51                    state.end()
52                }
53            }
54
55            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
56            #[serde(rename_all = "camelCase")]
57            pub struct EnvItem {
58                pub name: String,
59                /// Value for the environment variable.
60                pub value: String,
61                pub value_from: String,
62            }
63
64            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
65            #[serde(rename_all = "camelCase")]
66            pub struct MatchLabels {
67                pub properties: std::collections::HashMap<String, String>,
68            }
69
70            /// The configuration that will be passed on to the plugin.
71            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
72            #[serde(rename_all = "camelCase")]
73            pub struct PluginConfig {
74                /// The configuration that will be passed on to the plugin.
75                pub properties: serde_json::Map<String, serde_json::Value>,
76            }
77
78            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
79            #[serde(rename_all = "camelCase")]
80            pub struct Selector {
81                pub match_labels: MatchLabels,
82            }
83
84            /// Extend the functionality provided by the Istio proxy through WebAssembly filters. See more details at: https://istio.io/docs/reference/config/proxy_extensions/wasm-plugin.html
85            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
86            #[serde(rename_all = "camelCase")]
87            pub struct Spec {
88                pub image_pull_policy: String,
89                /// Credentials to use for OCI image pulling.
90                pub image_pull_secret: String,
91                /// Determines where in the filter chain this `WasmPlugin` is to be injected.
92                pub phase: String,
93                /// The configuration that will be passed on to the plugin.
94                pub plugin_config: PluginConfig,
95                pub plugin_name: String,
96                /// Determines ordering of `WasmPlugins` in the same `phase`.
97                pub priority: Option<i64>,
98                pub selector: Selector,
99                /// SHA256 checksum that will be used to verify Wasm module or OCI container.
100                pub sha256: String,
101                /// URL of a Wasm module or OCI container.
102                pub url: String,
103                pub verification_key: String,
104                /// Configuration for a Wasm VM.
105                pub vm_config: VmConfig,
106            }
107
108            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
109            #[serde(rename_all = "camelCase")]
110            pub struct Status {
111                pub properties: serde_json::Map<String, serde_json::Value>,
112            }
113
114            /// Configuration for a Wasm VM.
115            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
116            #[serde(rename_all = "camelCase")]
117            pub struct VmConfig {
118                /// Specifies environment variables to be injected to this VM.
119                pub env: Vec<EnvItem>,
120            }
121        }
122    }
123}
124pub mod install_istio_io {
125    pub mod v1alpha1 {
126        pub mod istio_operator {
127            #[derive(serde::Deserialize, Debug, PartialEq)]
128            pub struct IstioOperator {
129                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
130            }
131
132            impl k8s_openapi::Resource for IstioOperator {
133                type Scope = k8s_openapi::ClusterResourceScope;
134
135                const API_VERSION: &'static str = "install.istio.io/v1alpha1";
136                const GROUP: &'static str = "install.istio.io";
137                const KIND: &'static str = "IstioOperator";
138                const VERSION: &'static str = "v1alpha1";
139                const URL_PATH_SEGMENT: &'static str = "TODO";
140            }
141
142            impl k8s_openapi::Metadata for IstioOperator {
143                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
144
145                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
146                    &self.metadata
147                }
148
149                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
150                    &mut self.metadata
151                }
152            }
153
154            impl serde::Serialize for IstioOperator {
155                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
156                where
157                    S: serde::Serializer,
158                {
159                    use serde::ser::SerializeStruct;
160                    let mut state = serializer.serialize_struct("IstioOperator", 3)?;
161                    state.serialize_field(
162                        "apiVersion",
163                        <Self as k8s_openapi::Resource>::API_VERSION,
164                    )?;
165                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
166                    state.serialize_field("metadata", &self.metadata)?;
167                    state.end()
168                }
169            }
170        }
171    }
172}
173pub mod networking_istio_io {
174    pub mod v1alpha3 {
175        pub mod destination_rule {
176            #[derive(serde::Deserialize, Debug, PartialEq)]
177            pub struct DestinationRule {
178                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
179                pub spec: Spec,
180                pub status: Status,
181            }
182
183            impl k8s_openapi::Resource for DestinationRule {
184                type Scope = k8s_openapi::ClusterResourceScope;
185
186                const API_VERSION: &'static str = "networking.istio.io/v1alpha3";
187                const GROUP: &'static str = "networking.istio.io";
188                const KIND: &'static str = "DestinationRule";
189                const VERSION: &'static str = "v1alpha3";
190                const URL_PATH_SEGMENT: &'static str = "TODO";
191            }
192
193            impl k8s_openapi::Metadata for DestinationRule {
194                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
195
196                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
197                    &self.metadata
198                }
199
200                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
201                    &mut self.metadata
202                }
203            }
204
205            impl serde::Serialize for DestinationRule {
206                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
207                where
208                    S: serde::Serializer,
209                {
210                    use serde::ser::SerializeStruct;
211                    let mut state = serializer.serialize_struct("DestinationRule", 5)?;
212                    state.serialize_field(
213                        "apiVersion",
214                        <Self as k8s_openapi::Resource>::API_VERSION,
215                    )?;
216                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
217                    state.serialize_field("metadata", &self.metadata)?;
218                    state.serialize_field("spec", &self.spec)?;
219                    state.serialize_field("status", &self.status)?;
220                    state.end()
221                }
222            }
223
224            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
225            #[serde(rename_all = "camelCase")]
226            pub struct SubsetsItemTrafficPolicyConnectionPool {
227                /// HTTP connection pool settings.
228                pub http: SubsetsItemTrafficPolicyConnectionPoolHttp,
229                /// Settings common to both HTTP and TCP upstream connections.
230                pub tcp: SubsetsItemTrafficPolicyConnectionPoolTcp,
231            }
232
233            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
234            #[serde(rename_all = "camelCase")]
235            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPool {
236                /// HTTP connection pool settings.
237                pub http: SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPoolHttp,
238                /// Settings common to both HTTP and TCP upstream connections.
239                pub tcp: SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPoolTcp,
240            }
241
242            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
243            #[serde(rename_all = "camelCase")]
244            pub struct SpecTrafficPolicyConnectionPool {
245                /// HTTP connection pool settings.
246                pub http: SpecTrafficPolicyConnectionPoolHttp,
247                /// Settings common to both HTTP and TCP upstream connections.
248                pub tcp: SpecTrafficPolicyConnectionPoolTcp,
249            }
250
251            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
252            #[serde(rename_all = "camelCase")]
253            pub struct SpecTrafficPolicyPortLevelSettingsItemConnectionPool {
254                /// HTTP connection pool settings.
255                pub http: SpecTrafficPolicyPortLevelSettingsItemConnectionPoolHttp,
256                /// Settings common to both HTTP and TCP upstream connections.
257                pub tcp: SpecTrafficPolicyPortLevelSettingsItemConnectionPoolTcp,
258            }
259
260            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
261            #[serde(rename_all = "camelCase")]
262            pub struct SubsetsItemTrafficPolicyLoadBalancerConsistentHash {
263                /// Hash based on HTTP cookie.
264                pub http_cookie: SubsetsItemTrafficPolicyLoadBalancerConsistentHashHttpCookie,
265                /// Hash based on a specific HTTP header.
266                pub http_header_name: String,
267                /// Hash based on a specific HTTP query parameter.
268                pub http_query_parameter_name: String,
269                pub minimum_ring_size: i64,
270                /// Hash based on the source IP address.
271                pub use_source_ip: bool,
272            }
273
274            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
275            #[serde(rename_all = "camelCase")]
276            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHash {
277            /// Hash based on HTTP cookie.
278            pub http_cookie: SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHashHttpCookie,
279            /// Hash based on a specific HTTP header.
280            pub http_header_name: String,
281            /// Hash based on a specific HTTP query parameter.
282            pub http_query_parameter_name: String,
283            pub minimum_ring_size: i64,
284            /// Hash based on the source IP address.
285            pub use_source_ip: bool,
286        }
287
288            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
289            #[serde(rename_all = "camelCase")]
290            pub struct SpecTrafficPolicyLoadBalancerConsistentHash {
291                /// Hash based on HTTP cookie.
292                pub http_cookie: SpecTrafficPolicyLoadBalancerConsistentHashHttpCookie,
293                /// Hash based on a specific HTTP header.
294                pub http_header_name: String,
295                /// Hash based on a specific HTTP query parameter.
296                pub http_query_parameter_name: String,
297                pub minimum_ring_size: i64,
298                /// Hash based on the source IP address.
299                pub use_source_ip: bool,
300            }
301
302            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
303            #[serde(rename_all = "camelCase")]
304            pub struct SpecTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHash {
305                /// Hash based on HTTP cookie.
306                pub http_cookie:
307                    SpecTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHashHttpCookie,
308                /// Hash based on a specific HTTP header.
309                pub http_header_name: String,
310                /// Hash based on a specific HTTP query parameter.
311                pub http_query_parameter_name: String,
312                pub minimum_ring_size: i64,
313                /// Hash based on the source IP address.
314                pub use_source_ip: bool,
315            }
316
317            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
318            #[serde(rename_all = "camelCase")]
319            pub struct SubsetsItemTrafficPolicyLoadBalancerLocalityLbSettingDistributeItem {
320                /// Originating locality, '/' separated, e.g.
321                pub from: String,
322                /// Map of upstream localities to traffic distribution weights.
323                pub to: SubsetsItemTrafficPolicyLoadBalancerLocalityLbSettingDistributeItemTo,
324            }
325
326            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
327            #[serde(rename_all = "camelCase")]
328            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItem {
329            /// Originating locality, '/' separated, e.g.
330            pub from: String,
331            /// Map of upstream localities to traffic distribution weights.
332            pub to: SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItemTo,
333        }
334
335            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
336            #[serde(rename_all = "camelCase")]
337            pub struct SpecTrafficPolicyLoadBalancerLocalityLbSettingDistributeItem {
338                /// Originating locality, '/' separated, e.g.
339                pub from: String,
340                /// Map of upstream localities to traffic distribution weights.
341                pub to: SpecTrafficPolicyLoadBalancerLocalityLbSettingDistributeItemTo,
342            }
343
344            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
345            #[serde(rename_all = "camelCase")]
346            pub struct SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItem {
347            /// Originating locality, '/' separated, e.g.
348            pub from: String,
349            /// Map of upstream localities to traffic distribution weights.
350            pub to: SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItemTo,
351        }
352
353            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
354            #[serde(rename_all = "camelCase")]
355            pub struct SubsetsItemTrafficPolicyLoadBalancerLocalityLbSettingFailoverItem {
356                /// Originating region.
357                pub from: String,
358                pub to: String,
359            }
360
361            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
362            #[serde(rename_all = "camelCase")]
363            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingFailoverItem {
364                /// Originating region.
365                pub from: String,
366                pub to: String,
367            }
368
369            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
370            #[serde(rename_all = "camelCase")]
371            pub struct SpecTrafficPolicyLoadBalancerLocalityLbSettingFailoverItem {
372                /// Originating region.
373                pub from: String,
374                pub to: String,
375            }
376
377            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
378            #[serde(rename_all = "camelCase")]
379            pub struct SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingFailoverItem {
380                /// Originating region.
381                pub from: String,
382                pub to: String,
383            }
384
385            /// HTTP connection pool settings.
386            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
387            #[serde(rename_all = "camelCase")]
388            pub struct SubsetsItemTrafficPolicyConnectionPoolHttp {
389                /// Specify if http1.1 connection should be upgraded to http2 for the associated destination.
390                pub h2_upgrade_policy: String,
391                /// Maximum number of pending HTTP requests to a destination.
392                pub http1_max_pending_requests: i32,
393                /// Maximum number of requests to a backend.
394                pub http2_max_requests: i32,
395                /// The idle timeout for upstream connection pool connections.
396                pub idle_timeout: String,
397                /// Maximum number of requests per connection to a backend.
398                pub max_requests_per_connection: i32,
399                pub max_retries: i32,
400                /// If set to true, client protocol will be preserved while initiating connection to backend.
401                pub use_client_protocol: bool,
402            }
403
404            /// HTTP connection pool settings.
405            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
406            #[serde(rename_all = "camelCase")]
407            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPoolHttp {
408                /// Specify if http1.1 connection should be upgraded to http2 for the associated destination.
409                pub h2_upgrade_policy: String,
410                /// Maximum number of pending HTTP requests to a destination.
411                pub http1_max_pending_requests: i32,
412                /// Maximum number of requests to a backend.
413                pub http2_max_requests: i32,
414                /// The idle timeout for upstream connection pool connections.
415                pub idle_timeout: String,
416                /// Maximum number of requests per connection to a backend.
417                pub max_requests_per_connection: i32,
418                pub max_retries: i32,
419                /// If set to true, client protocol will be preserved while initiating connection to backend.
420                pub use_client_protocol: bool,
421            }
422
423            /// HTTP connection pool settings.
424            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
425            #[serde(rename_all = "camelCase")]
426            pub struct SpecTrafficPolicyConnectionPoolHttp {
427                /// Specify if http1.1 connection should be upgraded to http2 for the associated destination.
428                pub h2_upgrade_policy: String,
429                /// Maximum number of pending HTTP requests to a destination.
430                pub http1_max_pending_requests: i32,
431                /// Maximum number of requests to a backend.
432                pub http2_max_requests: i32,
433                /// The idle timeout for upstream connection pool connections.
434                pub idle_timeout: String,
435                /// Maximum number of requests per connection to a backend.
436                pub max_requests_per_connection: i32,
437                pub max_retries: i32,
438                /// If set to true, client protocol will be preserved while initiating connection to backend.
439                pub use_client_protocol: bool,
440            }
441
442            /// HTTP connection pool settings.
443            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
444            #[serde(rename_all = "camelCase")]
445            pub struct SpecTrafficPolicyPortLevelSettingsItemConnectionPoolHttp {
446                /// Specify if http1.1 connection should be upgraded to http2 for the associated destination.
447                pub h2_upgrade_policy: String,
448                /// Maximum number of pending HTTP requests to a destination.
449                pub http1_max_pending_requests: i32,
450                /// Maximum number of requests to a backend.
451                pub http2_max_requests: i32,
452                /// The idle timeout for upstream connection pool connections.
453                pub idle_timeout: String,
454                /// Maximum number of requests per connection to a backend.
455                pub max_requests_per_connection: i32,
456                pub max_retries: i32,
457                /// If set to true, client protocol will be preserved while initiating connection to backend.
458                pub use_client_protocol: bool,
459            }
460
461            /// Hash based on HTTP cookie.
462            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
463            #[serde(rename_all = "camelCase")]
464            pub struct SubsetsItemTrafficPolicyLoadBalancerConsistentHashHttpCookie {
465                /// Name of the cookie.
466                pub name: String,
467                /// Path to set for the cookie.
468                pub path: String,
469                /// Lifetime of the cookie.
470                pub ttl: String,
471            }
472
473            /// Hash based on HTTP cookie.
474            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
475            #[serde(rename_all = "camelCase")]
476            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHashHttpCookie {
477                /// Name of the cookie.
478                pub name: String,
479                /// Path to set for the cookie.
480                pub path: String,
481                /// Lifetime of the cookie.
482                pub ttl: String,
483            }
484
485            /// Hash based on HTTP cookie.
486            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
487            #[serde(rename_all = "camelCase")]
488            pub struct SpecTrafficPolicyLoadBalancerConsistentHashHttpCookie {
489                /// Name of the cookie.
490                pub name: String,
491                /// Path to set for the cookie.
492                pub path: String,
493                /// Lifetime of the cookie.
494                pub ttl: String,
495            }
496
497            /// Hash based on HTTP cookie.
498            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
499            #[serde(rename_all = "camelCase")]
500            pub struct SpecTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHashHttpCookie {
501                /// Name of the cookie.
502                pub name: String,
503                /// Path to set for the cookie.
504                pub path: String,
505                /// Lifetime of the cookie.
506                pub ttl: String,
507            }
508
509            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
510            #[serde(rename_all = "camelCase")]
511            pub struct Labels {
512                pub properties: std::collections::HashMap<String, String>,
513            }
514
515            /// Settings controlling the load balancer algorithms.
516            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
517            #[serde(rename_all = "camelCase")]
518            pub struct SubsetsItemTrafficPolicyLoadBalancer {
519                pub consistent_hash: SubsetsItemTrafficPolicyLoadBalancerConsistentHash,
520                pub locality_lb_setting: SubsetsItemTrafficPolicyLoadBalancerLocalityLbSetting,
521                pub simple: String,
522                /// Represents the warmup duration of Service.
523                pub warmup_duration_secs: String,
524            }
525
526            /// Settings controlling the load balancer algorithms.
527            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
528            #[serde(rename_all = "camelCase")]
529            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancer {
530                pub consistent_hash:
531                    SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHash,
532                pub locality_lb_setting:
533                    SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSetting,
534                pub simple: String,
535                /// Represents the warmup duration of Service.
536                pub warmup_duration_secs: String,
537            }
538
539            /// Settings controlling the load balancer algorithms.
540            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
541            #[serde(rename_all = "camelCase")]
542            pub struct SpecTrafficPolicyLoadBalancer {
543                pub consistent_hash: SpecTrafficPolicyLoadBalancerConsistentHash,
544                pub locality_lb_setting: SpecTrafficPolicyLoadBalancerLocalityLbSetting,
545                pub simple: String,
546                /// Represents the warmup duration of Service.
547                pub warmup_duration_secs: String,
548            }
549
550            /// Settings controlling the load balancer algorithms.
551            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
552            #[serde(rename_all = "camelCase")]
553            pub struct SpecTrafficPolicyPortLevelSettingsItemLoadBalancer {
554                pub consistent_hash:
555                    SpecTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHash,
556                pub locality_lb_setting:
557                    SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSetting,
558                pub simple: String,
559                /// Represents the warmup duration of Service.
560                pub warmup_duration_secs: String,
561            }
562
563            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
564            #[serde(rename_all = "camelCase")]
565            pub struct SubsetsItemTrafficPolicyLoadBalancerLocalityLbSetting {
566                /// Optional: only one of distribute, failover or failoverPriority can be set.
567                pub distribute:
568                    Vec<SubsetsItemTrafficPolicyLoadBalancerLocalityLbSettingDistributeItem>,
569                /// enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
570                pub enabled: Option<bool>,
571                /// Optional: only one of distribute, failover or failoverPriority can be set.
572                pub failover:
573                    Vec<SubsetsItemTrafficPolicyLoadBalancerLocalityLbSettingFailoverItem>,
574                /// failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing.
575                pub failover_priority: Vec<String>,
576            }
577
578            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
579            #[serde(rename_all = "camelCase")]
580            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSetting {
581            /// Optional: only one of distribute, failover or failoverPriority can be set.
582            pub distribute: Vec<SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItem>,
583            /// enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
584            pub enabled: Option<bool>,
585            /// Optional: only one of distribute, failover or failoverPriority can be set.
586            pub failover: Vec<SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingFailoverItem>,
587            /// failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing.
588            pub failover_priority: Vec<String>,
589        }
590
591            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
592            #[serde(rename_all = "camelCase")]
593            pub struct SpecTrafficPolicyLoadBalancerLocalityLbSetting {
594                /// Optional: only one of distribute, failover or failoverPriority can be set.
595                pub distribute: Vec<SpecTrafficPolicyLoadBalancerLocalityLbSettingDistributeItem>,
596                /// enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
597                pub enabled: Option<bool>,
598                /// Optional: only one of distribute, failover or failoverPriority can be set.
599                pub failover: Vec<SpecTrafficPolicyLoadBalancerLocalityLbSettingFailoverItem>,
600                /// failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing.
601                pub failover_priority: Vec<String>,
602            }
603
604            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
605            #[serde(rename_all = "camelCase")]
606            pub struct SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSetting {
607            /// Optional: only one of distribute, failover or failoverPriority can be set.
608            pub distribute: Vec<SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItem>,
609            /// enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
610            pub enabled: Option<bool>,
611            /// Optional: only one of distribute, failover or failoverPriority can be set.
612            pub failover: Vec<SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingFailoverItem>,
613            /// failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing.
614            pub failover_priority: Vec<String>,
615        }
616
617            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
618            #[serde(rename_all = "camelCase")]
619            pub struct MatchLabels {
620                pub properties: std::collections::HashMap<String, String>,
621            }
622
623            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
624            #[serde(rename_all = "camelCase")]
625            pub struct SubsetsItemTrafficPolicyOutlierDetection {
626                /// Minimum ejection duration.
627                pub base_ejection_time: String,
628                /// Number of 5xx errors before a host is ejected from the connection pool.
629                pub consecutive5xx_errors: Option<i64>,
630                pub consecutive_errors: i32,
631                /// Number of gateway errors before a host is ejected from the connection pool.
632                pub consecutive_gateway_errors: Option<i64>,
633                pub consecutive_local_origin_failures: Option<i64>,
634                /// Time interval between ejection sweep analysis.
635                pub interval: String,
636                pub max_ejection_percent: i32,
637                pub min_health_percent: i32,
638                /// Determines whether to distinguish local origin failures from external errors.
639                pub split_external_local_origin_errors: bool,
640            }
641
642            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
643            #[serde(rename_all = "camelCase")]
644            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemOutlierDetection {
645                /// Minimum ejection duration.
646                pub base_ejection_time: String,
647                /// Number of 5xx errors before a host is ejected from the connection pool.
648                pub consecutive5xx_errors: Option<i64>,
649                pub consecutive_errors: i32,
650                /// Number of gateway errors before a host is ejected from the connection pool.
651                pub consecutive_gateway_errors: Option<i64>,
652                pub consecutive_local_origin_failures: Option<i64>,
653                /// Time interval between ejection sweep analysis.
654                pub interval: String,
655                pub max_ejection_percent: i32,
656                pub min_health_percent: i32,
657                /// Determines whether to distinguish local origin failures from external errors.
658                pub split_external_local_origin_errors: bool,
659            }
660
661            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
662            #[serde(rename_all = "camelCase")]
663            pub struct SpecTrafficPolicyOutlierDetection {
664                /// Minimum ejection duration.
665                pub base_ejection_time: String,
666                /// Number of 5xx errors before a host is ejected from the connection pool.
667                pub consecutive5xx_errors: Option<i64>,
668                pub consecutive_errors: i32,
669                /// Number of gateway errors before a host is ejected from the connection pool.
670                pub consecutive_gateway_errors: Option<i64>,
671                pub consecutive_local_origin_failures: Option<i64>,
672                /// Time interval between ejection sweep analysis.
673                pub interval: String,
674                pub max_ejection_percent: i32,
675                pub min_health_percent: i32,
676                /// Determines whether to distinguish local origin failures from external errors.
677                pub split_external_local_origin_errors: bool,
678            }
679
680            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
681            #[serde(rename_all = "camelCase")]
682            pub struct SpecTrafficPolicyPortLevelSettingsItemOutlierDetection {
683                /// Minimum ejection duration.
684                pub base_ejection_time: String,
685                /// Number of 5xx errors before a host is ejected from the connection pool.
686                pub consecutive5xx_errors: Option<i64>,
687                pub consecutive_errors: i32,
688                /// Number of gateway errors before a host is ejected from the connection pool.
689                pub consecutive_gateway_errors: Option<i64>,
690                pub consecutive_local_origin_failures: Option<i64>,
691                /// Time interval between ejection sweep analysis.
692                pub interval: String,
693                pub max_ejection_percent: i32,
694                pub min_health_percent: i32,
695                /// Determines whether to distinguish local origin failures from external errors.
696                pub split_external_local_origin_errors: bool,
697            }
698
699            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
700            #[serde(rename_all = "camelCase")]
701            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemPort {
702                pub number: i64,
703            }
704
705            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
706            #[serde(rename_all = "camelCase")]
707            pub struct SpecTrafficPolicyPortLevelSettingsItemPort {
708                pub number: i64,
709            }
710
711            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
712            #[serde(rename_all = "camelCase")]
713            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItem {
714                pub connection_pool: SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPool,
715                /// Settings controlling the load balancer algorithms.
716                pub load_balancer: SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancer,
717                pub outlier_detection:
718                    SubsetsItemTrafficPolicyPortLevelSettingsItemOutlierDetection,
719                pub port: SubsetsItemTrafficPolicyPortLevelSettingsItemPort,
720                /// TLS related settings for connections to the upstream service.
721                pub tls: SubsetsItemTrafficPolicyPortLevelSettingsItemTls,
722            }
723
724            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
725            #[serde(rename_all = "camelCase")]
726            pub struct SpecTrafficPolicyPortLevelSettingsItem {
727                pub connection_pool: SpecTrafficPolicyPortLevelSettingsItemConnectionPool,
728                /// Settings controlling the load balancer algorithms.
729                pub load_balancer: SpecTrafficPolicyPortLevelSettingsItemLoadBalancer,
730                pub outlier_detection: SpecTrafficPolicyPortLevelSettingsItemOutlierDetection,
731                pub port: SpecTrafficPolicyPortLevelSettingsItemPort,
732                /// TLS related settings for connections to the upstream service.
733                pub tls: SpecTrafficPolicyPortLevelSettingsItemTls,
734            }
735
736            /// Configuration affecting load balancing, outlier detection, etc. See more details at: https://istio.io/docs/reference/config/networking/destination-rule.html
737            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
738            #[serde(rename_all = "camelCase")]
739            pub struct Spec {
740                /// A list of namespaces to which this destination rule is exported.
741                pub export_to: Vec<String>,
742                /// The name of a service from the service registry.
743                pub host: String,
744                pub subsets: Vec<SubsetsItem>,
745                pub traffic_policy: SpecTrafficPolicy,
746                pub workload_selector: WorkloadSelector,
747            }
748
749            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
750            #[serde(rename_all = "camelCase")]
751            pub struct Status {
752                pub properties: serde_json::Map<String, serde_json::Value>,
753            }
754
755            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
756            #[serde(rename_all = "camelCase")]
757            pub struct SubsetsItem {
758                pub labels: Labels,
759                /// Name of the subset.
760                pub name: String,
761                /// Traffic policies that apply to this subset.
762                pub traffic_policy: SubsetsItemTrafficPolicy,
763            }
764
765            /// Settings common to both HTTP and TCP upstream connections.
766            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
767            #[serde(rename_all = "camelCase")]
768            pub struct SubsetsItemTrafficPolicyConnectionPoolTcp {
769                /// TCP connection timeout.
770                pub connect_timeout: String,
771                /// Maximum number of HTTP1 /TCP connections to a destination host.
772                pub max_connections: i32,
773                /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
774                pub tcp_keepalive: SubsetsItemTrafficPolicyConnectionPoolTcpTcpKeepalive,
775            }
776
777            /// Settings common to both HTTP and TCP upstream connections.
778            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
779            #[serde(rename_all = "camelCase")]
780            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPoolTcp {
781                /// TCP connection timeout.
782                pub connect_timeout: String,
783                /// Maximum number of HTTP1 /TCP connections to a destination host.
784                pub max_connections: i32,
785                /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
786                pub tcp_keepalive:
787                    SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPoolTcpTcpKeepalive,
788            }
789
790            /// Settings common to both HTTP and TCP upstream connections.
791            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
792            #[serde(rename_all = "camelCase")]
793            pub struct SpecTrafficPolicyConnectionPoolTcp {
794                /// TCP connection timeout.
795                pub connect_timeout: String,
796                /// Maximum number of HTTP1 /TCP connections to a destination host.
797                pub max_connections: i32,
798                /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
799                pub tcp_keepalive: SpecTrafficPolicyConnectionPoolTcpTcpKeepalive,
800            }
801
802            /// Settings common to both HTTP and TCP upstream connections.
803            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
804            #[serde(rename_all = "camelCase")]
805            pub struct SpecTrafficPolicyPortLevelSettingsItemConnectionPoolTcp {
806                /// TCP connection timeout.
807                pub connect_timeout: String,
808                /// Maximum number of HTTP1 /TCP connections to a destination host.
809                pub max_connections: i32,
810                /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
811                pub tcp_keepalive:
812                    SpecTrafficPolicyPortLevelSettingsItemConnectionPoolTcpTcpKeepalive,
813            }
814
815            /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
816            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
817            #[serde(rename_all = "camelCase")]
818            pub struct SubsetsItemTrafficPolicyConnectionPoolTcpTcpKeepalive {
819                /// The time duration between keep-alive probes.
820                pub interval: String,
821                pub probes: i64,
822                pub time: String,
823            }
824
825            /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
826            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
827            #[serde(rename_all = "camelCase")]
828            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPoolTcpTcpKeepalive {
829                /// The time duration between keep-alive probes.
830                pub interval: String,
831                pub probes: i64,
832                pub time: String,
833            }
834
835            /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
836            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
837            #[serde(rename_all = "camelCase")]
838            pub struct SpecTrafficPolicyConnectionPoolTcpTcpKeepalive {
839                /// The time duration between keep-alive probes.
840                pub interval: String,
841                pub probes: i64,
842                pub time: String,
843            }
844
845            /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
846            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
847            #[serde(rename_all = "camelCase")]
848            pub struct SpecTrafficPolicyPortLevelSettingsItemConnectionPoolTcpTcpKeepalive {
849                /// The time duration between keep-alive probes.
850                pub interval: String,
851                pub probes: i64,
852                pub time: String,
853            }
854
855            /// TLS related settings for connections to the upstream service.
856            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
857            #[serde(rename_all = "camelCase")]
858            pub struct SubsetsItemTrafficPolicyTls {
859                pub ca_certificates: String,
860                /// REQUIRED if mode is `MUTUAL`.
861                pub client_certificate: String,
862                pub credential_name: String,
863                pub insecure_skip_verify: Option<bool>,
864                pub mode: String,
865                /// REQUIRED if mode is `MUTUAL`.
866                pub private_key: String,
867                /// SNI string to present to the server during TLS handshake.
868                pub sni: String,
869                pub subject_alt_names: Vec<String>,
870            }
871
872            /// TLS related settings for connections to the upstream service.
873            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
874            #[serde(rename_all = "camelCase")]
875            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemTls {
876                pub ca_certificates: String,
877                /// REQUIRED if mode is `MUTUAL`.
878                pub client_certificate: String,
879                pub credential_name: String,
880                pub insecure_skip_verify: Option<bool>,
881                pub mode: String,
882                /// REQUIRED if mode is `MUTUAL`.
883                pub private_key: String,
884                /// SNI string to present to the server during TLS handshake.
885                pub sni: String,
886                pub subject_alt_names: Vec<String>,
887            }
888
889            /// TLS related settings for connections to the upstream service.
890            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
891            #[serde(rename_all = "camelCase")]
892            pub struct SpecTrafficPolicyTls {
893                pub ca_certificates: String,
894                /// REQUIRED if mode is `MUTUAL`.
895                pub client_certificate: String,
896                pub credential_name: String,
897                pub insecure_skip_verify: Option<bool>,
898                pub mode: String,
899                /// REQUIRED if mode is `MUTUAL`.
900                pub private_key: String,
901                /// SNI string to present to the server during TLS handshake.
902                pub sni: String,
903                pub subject_alt_names: Vec<String>,
904            }
905
906            /// TLS related settings for connections to the upstream service.
907            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
908            #[serde(rename_all = "camelCase")]
909            pub struct SpecTrafficPolicyPortLevelSettingsItemTls {
910                pub ca_certificates: String,
911                /// REQUIRED if mode is `MUTUAL`.
912                pub client_certificate: String,
913                pub credential_name: String,
914                pub insecure_skip_verify: Option<bool>,
915                pub mode: String,
916                /// REQUIRED if mode is `MUTUAL`.
917                pub private_key: String,
918                /// SNI string to present to the server during TLS handshake.
919                pub sni: String,
920                pub subject_alt_names: Vec<String>,
921            }
922
923            /// Map of upstream localities to traffic distribution weights.
924            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
925            #[serde(rename_all = "camelCase")]
926            pub struct SubsetsItemTrafficPolicyLoadBalancerLocalityLbSettingDistributeItemTo {
927                /// Map of upstream localities to traffic distribution weights.
928                pub properties: std::collections::HashMap<String, i64>,
929            }
930
931            /// Map of upstream localities to traffic distribution weights.
932            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
933            #[serde(rename_all = "camelCase")]
934            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItemTo
935            {
936                /// Map of upstream localities to traffic distribution weights.
937                pub properties: std::collections::HashMap<String, i64>,
938            }
939
940            /// Map of upstream localities to traffic distribution weights.
941            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
942            #[serde(rename_all = "camelCase")]
943            pub struct SpecTrafficPolicyLoadBalancerLocalityLbSettingDistributeItemTo {
944                /// Map of upstream localities to traffic distribution weights.
945                pub properties: std::collections::HashMap<String, i64>,
946            }
947
948            /// Map of upstream localities to traffic distribution weights.
949            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
950            #[serde(rename_all = "camelCase")]
951            pub struct SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItemTo {
952                /// Map of upstream localities to traffic distribution weights.
953                pub properties: std::collections::HashMap<String, i64>,
954            }
955
956            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
957            #[serde(rename_all = "camelCase")]
958            pub struct SpecTrafficPolicy {
959                pub connection_pool: SpecTrafficPolicyConnectionPool,
960                /// Settings controlling the load balancer algorithms.
961                pub load_balancer: SpecTrafficPolicyLoadBalancer,
962                pub outlier_detection: SpecTrafficPolicyOutlierDetection,
963                /// Traffic policies specific to individual ports.
964                pub port_level_settings: Vec<SpecTrafficPolicyPortLevelSettingsItem>,
965                /// TLS related settings for connections to the upstream service.
966                pub tls: SpecTrafficPolicyTls,
967                pub tunnel: SpecTrafficPolicyTunnel,
968            }
969
970            /// Traffic policies that apply to this subset.
971            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
972            #[serde(rename_all = "camelCase")]
973            pub struct SubsetsItemTrafficPolicy {
974                pub connection_pool: SubsetsItemTrafficPolicyConnectionPool,
975                /// Settings controlling the load balancer algorithms.
976                pub load_balancer: SubsetsItemTrafficPolicyLoadBalancer,
977                pub outlier_detection: SubsetsItemTrafficPolicyOutlierDetection,
978                /// Traffic policies specific to individual ports.
979                pub port_level_settings: Vec<SubsetsItemTrafficPolicyPortLevelSettingsItem>,
980                /// TLS related settings for connections to the upstream service.
981                pub tls: SubsetsItemTrafficPolicyTls,
982                pub tunnel: SubsetsItemTrafficPolicyTunnel,
983            }
984
985            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
986            #[serde(rename_all = "camelCase")]
987            pub struct SubsetsItemTrafficPolicyTunnel {
988                /// Specifies which protocol to use for tunneling the downstream connection.
989                pub protocol: String,
990                /// Specifies a host to which the downstream connection is tunneled.
991                pub target_host: String,
992                /// Specifies a port to which the downstream connection is tunneled.
993                pub target_port: i64,
994            }
995
996            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
997            #[serde(rename_all = "camelCase")]
998            pub struct SpecTrafficPolicyTunnel {
999                /// Specifies which protocol to use for tunneling the downstream connection.
1000                pub protocol: String,
1001                /// Specifies a host to which the downstream connection is tunneled.
1002                pub target_host: String,
1003                /// Specifies a port to which the downstream connection is tunneled.
1004                pub target_port: i64,
1005            }
1006
1007            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1008            #[serde(rename_all = "camelCase")]
1009            pub struct WorkloadSelector {
1010                pub match_labels: MatchLabels,
1011            }
1012        }
1013        pub mod envoy_filter {
1014            #[derive(serde::Deserialize, Debug, PartialEq)]
1015            pub struct EnvoyFilter {
1016                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
1017                pub spec: Spec,
1018                pub status: Status,
1019            }
1020
1021            impl k8s_openapi::Resource for EnvoyFilter {
1022                type Scope = k8s_openapi::ClusterResourceScope;
1023
1024                const API_VERSION: &'static str = "networking.istio.io/v1alpha3";
1025                const GROUP: &'static str = "networking.istio.io";
1026                const KIND: &'static str = "EnvoyFilter";
1027                const VERSION: &'static str = "v1alpha3";
1028                const URL_PATH_SEGMENT: &'static str = "TODO";
1029            }
1030
1031            impl k8s_openapi::Metadata for EnvoyFilter {
1032                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
1033
1034                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
1035                    &self.metadata
1036                }
1037
1038                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
1039                    &mut self.metadata
1040                }
1041            }
1042
1043            impl serde::Serialize for EnvoyFilter {
1044                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1045                where
1046                    S: serde::Serializer,
1047                {
1048                    use serde::ser::SerializeStruct;
1049                    let mut state = serializer.serialize_struct("EnvoyFilter", 5)?;
1050                    state.serialize_field(
1051                        "apiVersion",
1052                        <Self as k8s_openapi::Resource>::API_VERSION,
1053                    )?;
1054                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
1055                    state.serialize_field("metadata", &self.metadata)?;
1056                    state.serialize_field("spec", &self.spec)?;
1057                    state.serialize_field("status", &self.status)?;
1058                    state.end()
1059                }
1060            }
1061
1062            /// Match on envoy cluster attributes.
1063            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1064            #[serde(rename_all = "camelCase")]
1065            pub struct Cluster {
1066                /// The exact name of the cluster to match.
1067                pub name: String,
1068                /// The service port for which this cluster was generated.
1069                pub port_number: i64,
1070                /// The fully qualified service name for this cluster.
1071                pub service: String,
1072                /// The subset associated with the service.
1073                pub subset: String,
1074            }
1075
1076            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1077            #[serde(rename_all = "camelCase")]
1078            pub struct ConfigPatchesItem {
1079                pub apply_to: String,
1080                /// Match on listener/route configuration/cluster.
1081                pub r#match: Match,
1082                /// The patch to apply along with the operation.
1083                pub patch: Patch,
1084            }
1085
1086            /// The name of a specific filter to apply the patch to.
1087            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1088            #[serde(rename_all = "camelCase")]
1089            pub struct Filter {
1090                /// The filter name to match on.
1091                pub name: String,
1092                pub sub_filter: SubFilter,
1093            }
1094
1095            /// Match a specific filter chain in a listener.
1096            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1097            #[serde(rename_all = "camelCase")]
1098            pub struct FilterChain {
1099                /// Applies only to sidecars.
1100                pub application_protocols: String,
1101                /// The destination_port value used by a filter chain's match condition.
1102                pub destination_port: i64,
1103                /// The name of a specific filter to apply the patch to.
1104                pub filter: Filter,
1105                /// The name assigned to the filter chain.
1106                pub name: String,
1107                /// The SNI value used by a filter chain's match condition.
1108                pub sni: String,
1109                /// Applies only to `SIDECAR_INBOUND` context.
1110                pub transport_protocol: String,
1111            }
1112
1113            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1114            #[serde(rename_all = "camelCase")]
1115            pub struct Labels {
1116                pub properties: std::collections::HashMap<String, String>,
1117            }
1118
1119            /// Match on envoy listener attributes.
1120            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1121            #[serde(rename_all = "camelCase")]
1122            pub struct Listener {
1123                /// Match a specific filter chain in a listener.
1124                pub filter_chain: FilterChain,
1125                /// Match a specific listener by its name.
1126                pub name: String,
1127                pub port_name: String,
1128                pub port_number: i64,
1129            }
1130
1131            /// Match on listener/route configuration/cluster.
1132            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1133            #[serde(rename_all = "camelCase")]
1134            pub struct Match {
1135                /// Match on envoy cluster attributes.
1136                pub cluster: Cluster,
1137                /// The specific config generation context to match on.
1138                pub context: String,
1139                /// Match on envoy listener attributes.
1140                pub listener: Listener,
1141                /// Match on properties associated with a proxy.
1142                pub proxy: Proxy,
1143                /// Match on envoy HTTP route configuration attributes.
1144                pub route_configuration: RouteConfiguration,
1145            }
1146
1147            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1148            #[serde(rename_all = "camelCase")]
1149            pub struct Metadata {
1150                pub properties: std::collections::HashMap<String, String>,
1151            }
1152
1153            /// The patch to apply along with the operation.
1154            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1155            #[serde(rename_all = "camelCase")]
1156            pub struct Patch {
1157                /// Determines the filter insertion order.
1158                pub filter_class: String,
1159                /// Determines how the patch should be applied.
1160                pub operation: String,
1161                /// The JSON config of the object being patched.
1162                pub value: Value,
1163            }
1164
1165            /// Match on properties associated with a proxy.
1166            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1167            #[serde(rename_all = "camelCase")]
1168            pub struct Proxy {
1169                pub metadata: Metadata,
1170                pub proxy_version: String,
1171            }
1172
1173            /// Match a specific route within the virtual host.
1174            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1175            #[serde(rename_all = "camelCase")]
1176            pub struct Route {
1177                /// Match a route with specific action type.
1178                pub action: String,
1179                pub name: String,
1180            }
1181
1182            /// Match on envoy HTTP route configuration attributes.
1183            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1184            #[serde(rename_all = "camelCase")]
1185            pub struct RouteConfiguration {
1186                pub gateway: String,
1187                /// Route configuration name to match on.
1188                pub name: String,
1189                /// Applicable only for GATEWAY context.
1190                pub port_name: String,
1191                pub port_number: i64,
1192                pub vhost: Vhost,
1193            }
1194
1195            /// Customizing Envoy configuration generated by Istio. See more details at: https://istio.io/docs/reference/config/networking/envoy-filter.html
1196            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1197            #[serde(rename_all = "camelCase")]
1198            pub struct Spec {
1199                /// One or more patches with match conditions.
1200                pub config_patches: Vec<ConfigPatchesItem>,
1201                /// Priority defines the order in which patch sets are applied within a context.
1202                pub priority: i32,
1203                pub workload_selector: WorkloadSelector,
1204            }
1205
1206            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1207            #[serde(rename_all = "camelCase")]
1208            pub struct Status {
1209                pub properties: serde_json::Map<String, serde_json::Value>,
1210            }
1211
1212            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1213            #[serde(rename_all = "camelCase")]
1214            pub struct SubFilter {
1215                /// The filter name to match on.
1216                pub name: String,
1217            }
1218
1219            /// The JSON config of the object being patched.
1220            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1221            #[serde(rename_all = "camelCase")]
1222            pub struct Value {
1223                /// The JSON config of the object being patched.
1224                pub properties: serde_json::Map<String, serde_json::Value>,
1225            }
1226
1227            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1228            #[serde(rename_all = "camelCase")]
1229            pub struct Vhost {
1230                pub name: String,
1231                /// Match a specific route within the virtual host.
1232                pub route: Route,
1233            }
1234
1235            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1236            #[serde(rename_all = "camelCase")]
1237            pub struct WorkloadSelector {
1238                pub labels: Labels,
1239            }
1240        }
1241        pub mod gateway {
1242            #[derive(serde::Deserialize, Debug, PartialEq)]
1243            pub struct Gateway {
1244                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
1245                pub spec: Spec,
1246                pub status: Status,
1247            }
1248
1249            impl k8s_openapi::Resource for Gateway {
1250                type Scope = k8s_openapi::ClusterResourceScope;
1251
1252                const API_VERSION: &'static str = "networking.istio.io/v1alpha3";
1253                const GROUP: &'static str = "networking.istio.io";
1254                const KIND: &'static str = "Gateway";
1255                const VERSION: &'static str = "v1alpha3";
1256                const URL_PATH_SEGMENT: &'static str = "TODO";
1257            }
1258
1259            impl k8s_openapi::Metadata for Gateway {
1260                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
1261
1262                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
1263                    &self.metadata
1264                }
1265
1266                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
1267                    &mut self.metadata
1268                }
1269            }
1270
1271            impl serde::Serialize for Gateway {
1272                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1273                where
1274                    S: serde::Serializer,
1275                {
1276                    use serde::ser::SerializeStruct;
1277                    let mut state = serializer.serialize_struct("Gateway", 5)?;
1278                    state.serialize_field(
1279                        "apiVersion",
1280                        <Self as k8s_openapi::Resource>::API_VERSION,
1281                    )?;
1282                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
1283                    state.serialize_field("metadata", &self.metadata)?;
1284                    state.serialize_field("spec", &self.spec)?;
1285                    state.serialize_field("status", &self.status)?;
1286                    state.end()
1287                }
1288            }
1289
1290            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1291            #[serde(rename_all = "camelCase")]
1292            pub struct Port {
1293                /// Label assigned to the port.
1294                pub name: String,
1295                /// A valid non-negative integer port number.
1296                pub number: i64,
1297                /// The protocol exposed on the port.
1298                pub protocol: String,
1299                pub target_port: i64,
1300            }
1301
1302            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1303            #[serde(rename_all = "camelCase")]
1304            pub struct Selector {
1305                pub properties: std::collections::HashMap<String, String>,
1306            }
1307
1308            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1309            #[serde(rename_all = "camelCase")]
1310            pub struct ServersItem {
1311                pub bind: String,
1312                pub default_endpoint: String,
1313                /// One or more hosts exposed by this gateway.
1314                pub hosts: Vec<String>,
1315                /// An optional name of the server, when set must be unique across all servers.
1316                pub name: String,
1317                pub port: Port,
1318                /// Set of TLS related options that govern the server's behavior.
1319                pub tls: Tls,
1320            }
1321
1322            /// Configuration affecting edge load balancer. See more details at: https://istio.io/docs/reference/config/networking/gateway.html
1323            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1324            #[serde(rename_all = "camelCase")]
1325            pub struct Spec {
1326                pub selector: Selector,
1327                /// A list of server specifications.
1328                pub servers: Vec<ServersItem>,
1329            }
1330
1331            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1332            #[serde(rename_all = "camelCase")]
1333            pub struct Status {
1334                pub properties: serde_json::Map<String, serde_json::Value>,
1335            }
1336
1337            /// Set of TLS related options that govern the server's behavior.
1338            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1339            #[serde(rename_all = "camelCase")]
1340            pub struct Tls {
1341                /// REQUIRED if mode is `MUTUAL`.
1342                pub ca_certificates: String,
1343                /// Optional: If specified, only support the specified cipher list.
1344                pub cipher_suites: Vec<String>,
1345                pub credential_name: String,
1346                pub https_redirect: bool,
1347                /// Optional: Maximum TLS protocol version.
1348                pub max_protocol_version: String,
1349                /// Optional: Minimum TLS protocol version.
1350                pub min_protocol_version: String,
1351                pub mode: String,
1352                /// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
1353                pub private_key: String,
1354                /// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
1355                pub server_certificate: String,
1356                pub subject_alt_names: Vec<String>,
1357                pub verify_certificate_hash: Vec<String>,
1358                pub verify_certificate_spki: Vec<String>,
1359            }
1360        }
1361        pub mod service_entry {
1362            #[derive(serde::Deserialize, Debug, PartialEq)]
1363            pub struct ServiceEntry {
1364                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
1365                pub spec: Spec,
1366                pub status: Status,
1367            }
1368
1369            impl k8s_openapi::Resource for ServiceEntry {
1370                type Scope = k8s_openapi::ClusterResourceScope;
1371
1372                const API_VERSION: &'static str = "networking.istio.io/v1alpha3";
1373                const GROUP: &'static str = "networking.istio.io";
1374                const KIND: &'static str = "ServiceEntry";
1375                const VERSION: &'static str = "v1alpha3";
1376                const URL_PATH_SEGMENT: &'static str = "TODO";
1377            }
1378
1379            impl k8s_openapi::Metadata for ServiceEntry {
1380                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
1381
1382                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
1383                    &self.metadata
1384                }
1385
1386                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
1387                    &mut self.metadata
1388                }
1389            }
1390
1391            impl serde::Serialize for ServiceEntry {
1392                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1393                where
1394                    S: serde::Serializer,
1395                {
1396                    use serde::ser::SerializeStruct;
1397                    let mut state = serializer.serialize_struct("ServiceEntry", 5)?;
1398                    state.serialize_field(
1399                        "apiVersion",
1400                        <Self as k8s_openapi::Resource>::API_VERSION,
1401                    )?;
1402                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
1403                    state.serialize_field("metadata", &self.metadata)?;
1404                    state.serialize_field("spec", &self.spec)?;
1405                    state.serialize_field("status", &self.status)?;
1406                    state.end()
1407                }
1408            }
1409
1410            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1411            #[serde(rename_all = "camelCase")]
1412            pub struct EndpointsItem {
1413                pub address: String,
1414                /// One or more labels associated with the endpoint.
1415                pub labels: EndpointsItemLabels,
1416                /// The locality associated with the endpoint.
1417                pub locality: String,
1418                pub network: String,
1419                /// Set of ports associated with the endpoint.
1420                pub ports: Ports,
1421                pub service_account: String,
1422                /// The load balancing weight associated with the endpoint.
1423                pub weight: i64,
1424            }
1425
1426            /// One or more labels associated with the endpoint.
1427            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1428            #[serde(rename_all = "camelCase")]
1429            pub struct EndpointsItemLabels {
1430                /// One or more labels associated with the endpoint.
1431                pub properties: std::collections::HashMap<String, String>,
1432            }
1433
1434            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1435            #[serde(rename_all = "camelCase")]
1436            pub struct WorkloadSelectorLabels {
1437                pub properties: std::collections::HashMap<String, String>,
1438            }
1439
1440            /// Set of ports associated with the endpoint.
1441            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1442            #[serde(rename_all = "camelCase")]
1443            pub struct Ports {
1444                /// Set of ports associated with the endpoint.
1445                pub properties: std::collections::HashMap<String, i64>,
1446            }
1447
1448            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1449            #[serde(rename_all = "camelCase")]
1450            pub struct PortsItem {
1451                /// Label assigned to the port.
1452                pub name: String,
1453                /// A valid non-negative integer port number.
1454                pub number: i64,
1455                /// The protocol exposed on the port.
1456                pub protocol: String,
1457                pub target_port: i64,
1458            }
1459
1460            /// Configuration affecting service registry. See more details at: https://istio.io/docs/reference/config/networking/service-entry.html
1461            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1462            #[serde(rename_all = "camelCase")]
1463            pub struct Spec {
1464                /// The virtual IP addresses associated with the service.
1465                pub addresses: Vec<String>,
1466                /// One or more endpoints associated with the service.
1467                pub endpoints: Vec<EndpointsItem>,
1468                /// A list of namespaces to which this service is exported.
1469                pub export_to: Vec<String>,
1470                /// The hosts associated with the ServiceEntry.
1471                pub hosts: Vec<String>,
1472                pub location: String,
1473                /// The ports associated with the external service.
1474                pub ports: Vec<PortsItem>,
1475                /// Service discovery mode for the hosts.
1476                pub resolution: String,
1477                pub subject_alt_names: Vec<String>,
1478                /// Applicable only for MESH_INTERNAL services.
1479                pub workload_selector: WorkloadSelector,
1480            }
1481
1482            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1483            #[serde(rename_all = "camelCase")]
1484            pub struct Status {
1485                pub properties: serde_json::Map<String, serde_json::Value>,
1486            }
1487
1488            /// Applicable only for MESH_INTERNAL services.
1489            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1490            #[serde(rename_all = "camelCase")]
1491            pub struct WorkloadSelector {
1492                pub labels: WorkloadSelectorLabels,
1493            }
1494        }
1495        pub mod sidecar {
1496            #[derive(serde::Deserialize, Debug, PartialEq)]
1497            pub struct Sidecar {
1498                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
1499                pub spec: Spec,
1500                pub status: Status,
1501            }
1502
1503            impl k8s_openapi::Resource for Sidecar {
1504                type Scope = k8s_openapi::ClusterResourceScope;
1505
1506                const API_VERSION: &'static str = "networking.istio.io/v1alpha3";
1507                const GROUP: &'static str = "networking.istio.io";
1508                const KIND: &'static str = "Sidecar";
1509                const VERSION: &'static str = "v1alpha3";
1510                const URL_PATH_SEGMENT: &'static str = "TODO";
1511            }
1512
1513            impl k8s_openapi::Metadata for Sidecar {
1514                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
1515
1516                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
1517                    &self.metadata
1518                }
1519
1520                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
1521                    &mut self.metadata
1522                }
1523            }
1524
1525            impl serde::Serialize for Sidecar {
1526                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1527                where
1528                    S: serde::Serializer,
1529                {
1530                    use serde::ser::SerializeStruct;
1531                    let mut state = serializer.serialize_struct("Sidecar", 5)?;
1532                    state.serialize_field(
1533                        "apiVersion",
1534                        <Self as k8s_openapi::Resource>::API_VERSION,
1535                    )?;
1536                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
1537                    state.serialize_field("metadata", &self.metadata)?;
1538                    state.serialize_field("spec", &self.spec)?;
1539                    state.serialize_field("status", &self.status)?;
1540                    state.end()
1541                }
1542            }
1543
1544            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1545            #[serde(rename_all = "camelCase")]
1546            pub struct EgressItem {
1547                pub bind: String,
1548                pub capture_mode: String,
1549                pub hosts: Vec<String>,
1550                /// The port associated with the listener.
1551                pub port: EgressItemPort,
1552            }
1553
1554            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1555            #[serde(rename_all = "camelCase")]
1556            pub struct EgressProxy {
1557                /// The name of a service from the service registry.
1558                pub host: String,
1559                /// Specifies the port on the host that is being addressed.
1560                pub port: EgressProxyPort,
1561                /// The name of a subset within the service.
1562                pub subset: String,
1563            }
1564
1565            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1566            #[serde(rename_all = "camelCase")]
1567            pub struct IngressItem {
1568                /// The IP to which the listener should be bound.
1569                pub bind: String,
1570                pub capture_mode: String,
1571                pub default_endpoint: String,
1572                /// The port associated with the listener.
1573                pub port: IngressItemPort,
1574                pub tls: Tls,
1575            }
1576
1577            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1578            #[serde(rename_all = "camelCase")]
1579            pub struct Labels {
1580                pub properties: std::collections::HashMap<String, String>,
1581            }
1582
1583            /// Configuration for the outbound traffic policy.
1584            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1585            #[serde(rename_all = "camelCase")]
1586            pub struct OutboundTrafficPolicy {
1587                pub egress_proxy: EgressProxy,
1588                pub mode: String,
1589            }
1590
1591            /// The port associated with the listener.
1592            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1593            #[serde(rename_all = "camelCase")]
1594            pub struct EgressItemPort {
1595                /// Label assigned to the port.
1596                pub name: String,
1597                /// A valid non-negative integer port number.
1598                pub number: i64,
1599                /// The protocol exposed on the port.
1600                pub protocol: String,
1601                pub target_port: i64,
1602            }
1603
1604            /// The port associated with the listener.
1605            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1606            #[serde(rename_all = "camelCase")]
1607            pub struct IngressItemPort {
1608                /// Label assigned to the port.
1609                pub name: String,
1610                /// A valid non-negative integer port number.
1611                pub number: i64,
1612                /// The protocol exposed on the port.
1613                pub protocol: String,
1614                pub target_port: i64,
1615            }
1616
1617            /// Specifies the port on the host that is being addressed.
1618            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1619            #[serde(rename_all = "camelCase")]
1620            pub struct EgressProxyPort {
1621                pub number: i64,
1622            }
1623
1624            /// Configuration affecting network reachability of a sidecar. See more details at: https://istio.io/docs/reference/config/networking/sidecar.html
1625            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1626            #[serde(rename_all = "camelCase")]
1627            pub struct Spec {
1628                pub egress: Vec<EgressItem>,
1629                pub ingress: Vec<IngressItem>,
1630                /// Configuration for the outbound traffic policy.
1631                pub outbound_traffic_policy: OutboundTrafficPolicy,
1632                pub workload_selector: WorkloadSelector,
1633            }
1634
1635            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1636            #[serde(rename_all = "camelCase")]
1637            pub struct Status {
1638                pub properties: serde_json::Map<String, serde_json::Value>,
1639            }
1640
1641            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1642            #[serde(rename_all = "camelCase")]
1643            pub struct Tls {
1644                /// REQUIRED if mode is `MUTUAL`.
1645                pub ca_certificates: String,
1646                /// Optional: If specified, only support the specified cipher list.
1647                pub cipher_suites: Vec<String>,
1648                pub credential_name: String,
1649                pub https_redirect: bool,
1650                /// Optional: Maximum TLS protocol version.
1651                pub max_protocol_version: String,
1652                /// Optional: Minimum TLS protocol version.
1653                pub min_protocol_version: String,
1654                pub mode: String,
1655                /// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
1656                pub private_key: String,
1657                /// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
1658                pub server_certificate: String,
1659                pub subject_alt_names: Vec<String>,
1660                pub verify_certificate_hash: Vec<String>,
1661                pub verify_certificate_spki: Vec<String>,
1662            }
1663
1664            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1665            #[serde(rename_all = "camelCase")]
1666            pub struct WorkloadSelector {
1667                pub labels: Labels,
1668            }
1669        }
1670        pub mod virtual_service {
1671            #[derive(serde::Deserialize, Debug, PartialEq)]
1672            pub struct VirtualService {
1673                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
1674                pub spec: Spec,
1675                pub status: Status,
1676            }
1677
1678            impl k8s_openapi::Resource for VirtualService {
1679                type Scope = k8s_openapi::ClusterResourceScope;
1680
1681                const API_VERSION: &'static str = "networking.istio.io/v1alpha3";
1682                const GROUP: &'static str = "networking.istio.io";
1683                const KIND: &'static str = "VirtualService";
1684                const VERSION: &'static str = "v1alpha3";
1685                const URL_PATH_SEGMENT: &'static str = "TODO";
1686            }
1687
1688            impl k8s_openapi::Metadata for VirtualService {
1689                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
1690
1691                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
1692                    &self.metadata
1693                }
1694
1695                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
1696                    &mut self.metadata
1697                }
1698            }
1699
1700            impl serde::Serialize for VirtualService {
1701                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
1702                where
1703                    S: serde::Serializer,
1704                {
1705                    use serde::ser::SerializeStruct;
1706                    let mut state = serializer.serialize_struct("VirtualService", 5)?;
1707                    state.serialize_field(
1708                        "apiVersion",
1709                        <Self as k8s_openapi::Resource>::API_VERSION,
1710                    )?;
1711                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
1712                    state.serialize_field("metadata", &self.metadata)?;
1713                    state.serialize_field("spec", &self.spec)?;
1714                    state.serialize_field("status", &self.status)?;
1715                    state.end()
1716                }
1717            }
1718
1719            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1720            #[serde(rename_all = "camelCase")]
1721            pub struct Abort {
1722                /// GRPC status code to use to abort the request.
1723                pub grpc_status: String,
1724                pub http2_error: String,
1725                /// HTTP status code to use to abort the Http request.
1726                pub http_status: i32,
1727                /// Percentage of requests to be aborted with the error code provided.
1728                pub percentage: AbortPercentage,
1729            }
1730
1731            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1732            #[serde(rename_all = "camelCase")]
1733            pub struct HttpItemHeadersRequestAdd {
1734                pub properties: std::collections::HashMap<String, String>,
1735            }
1736
1737            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1738            #[serde(rename_all = "camelCase")]
1739            pub struct HttpItemHeadersResponseAdd {
1740                pub properties: std::collections::HashMap<String, String>,
1741            }
1742
1743            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1744            #[serde(rename_all = "camelCase")]
1745            pub struct RouteItemHeadersRequestAdd {
1746                pub properties: std::collections::HashMap<String, String>,
1747            }
1748
1749            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1750            #[serde(rename_all = "camelCase")]
1751            pub struct RouteItemHeadersResponseAdd {
1752                pub properties: std::collections::HashMap<String, String>,
1753            }
1754
1755            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1756            #[serde(rename_all = "camelCase")]
1757            pub struct AllowOriginsItem {
1758                pub exact: String,
1759                pub prefix: String,
1760                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
1761                pub regex: String,
1762            }
1763
1764            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1765            #[serde(rename_all = "camelCase")]
1766            pub struct Authority {
1767                pub exact: String,
1768                pub prefix: String,
1769                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
1770                pub regex: String,
1771            }
1772
1773            /// Cross-Origin Resource Sharing policy (CORS).
1774            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1775            #[serde(rename_all = "camelCase")]
1776            pub struct CorsPolicy {
1777                pub allow_credentials: Option<bool>,
1778                pub allow_headers: Vec<String>,
1779                /// List of HTTP methods allowed to access the resource.
1780                pub allow_methods: Vec<String>,
1781                /// The list of origins that are allowed to perform CORS requests.
1782                pub allow_origin: Vec<String>,
1783                /// String patterns that match allowed origins.
1784                pub allow_origins: Vec<AllowOriginsItem>,
1785                pub expose_headers: Vec<String>,
1786                pub max_age: String,
1787            }
1788
1789            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1790            #[serde(rename_all = "camelCase")]
1791            pub struct Delay {
1792                pub exponential_delay: String,
1793                /// Add a fixed delay before forwarding the request.
1794                pub fixed_delay: String,
1795                /// Percentage of requests on which the delay will be injected (0-100).
1796                pub percent: i32,
1797                /// Percentage of requests on which the delay will be injected.
1798                pub percentage: DelayPercentage,
1799            }
1800
1801            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1802            #[serde(rename_all = "camelCase")]
1803            pub struct Delegate {
1804                /// Name specifies the name of the delegate VirtualService.
1805                pub name: String,
1806                /// Namespace specifies the namespace where the delegate VirtualService resides.
1807                pub namespace: String,
1808            }
1809
1810            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1811            #[serde(rename_all = "camelCase")]
1812            pub struct HttpItemRouteItemDestination {
1813                /// The name of a service from the service registry.
1814                pub host: String,
1815                /// Specifies the port on the host that is being addressed.
1816                pub port: HttpItemRouteItemDestinationPort,
1817                /// The name of a subset within the service.
1818                pub subset: String,
1819            }
1820
1821            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1822            #[serde(rename_all = "camelCase")]
1823            pub struct TcpItemRouteItemDestination {
1824                /// The name of a service from the service registry.
1825                pub host: String,
1826                /// Specifies the port on the host that is being addressed.
1827                pub port: TcpItemRouteItemDestinationPort,
1828                /// The name of a subset within the service.
1829                pub subset: String,
1830            }
1831
1832            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1833            #[serde(rename_all = "camelCase")]
1834            pub struct TlsItemRouteItemDestination {
1835                /// The name of a service from the service registry.
1836                pub host: String,
1837                /// Specifies the port on the host that is being addressed.
1838                pub port: TlsItemRouteItemDestinationPort,
1839                /// The name of a subset within the service.
1840                pub subset: String,
1841            }
1842
1843            /// Fault injection policy to apply on HTTP traffic at the client side.
1844            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1845            #[serde(rename_all = "camelCase")]
1846            pub struct Fault {
1847                pub abort: Abort,
1848                pub delay: Delay,
1849            }
1850
1851            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1852            #[serde(rename_all = "camelCase")]
1853            pub struct HttpItemHeaders {
1854                pub request: HttpItemHeadersRequest,
1855                pub response: HttpItemHeadersResponse,
1856            }
1857
1858            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1859            #[serde(rename_all = "camelCase")]
1860            pub struct MatchItemHeaders {
1861                pub properties: std::collections::HashMap<String, HeadersValue>,
1862            }
1863
1864            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1865            #[serde(rename_all = "camelCase")]
1866            pub struct RouteItemHeaders {
1867                pub request: RouteItemHeadersRequest,
1868                pub response: RouteItemHeadersResponse,
1869            }
1870
1871            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1872            #[serde(rename_all = "camelCase")]
1873            pub struct HttpItem {
1874                /// Cross-Origin Resource Sharing policy (CORS).
1875                pub cors_policy: CorsPolicy,
1876                pub delegate: Delegate,
1877                /// Fault injection policy to apply on HTTP traffic at the client side.
1878                pub fault: Fault,
1879                pub headers: HttpItemHeaders,
1880                pub r#match: Vec<HttpItemMatchItem>,
1881                pub mirror: Mirror,
1882                /// Percentage of the traffic to be mirrored by the `mirror` field.
1883                pub mirror_percent: Option<i64>,
1884                /// Percentage of the traffic to be mirrored by the `mirror` field.
1885                pub mirror_percentage: MirrorPercentage,
1886                /// The name assigned to the route for debugging purposes.
1887                pub name: String,
1888                /// A HTTP rule can either redirect or forward (default) traffic.
1889                pub redirect: Redirect,
1890                /// Retry policy for HTTP requests.
1891                pub retries: Retries,
1892                /// Rewrite HTTP URIs and Authority headers.
1893                pub rewrite: Rewrite,
1894                /// A HTTP rule can either redirect or forward (default) traffic.
1895                pub route: Vec<HttpItemRouteItem>,
1896                /// Timeout for HTTP requests, default is disabled.
1897                pub timeout: String,
1898            }
1899
1900            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1901            #[serde(rename_all = "camelCase")]
1902            pub struct HttpItemMatchItem {
1903                pub authority: Authority,
1904                /// Names of gateways where the rule should be applied.
1905                pub gateways: Vec<String>,
1906                pub headers: MatchItemHeaders,
1907                /// Flag to specify whether the URI matching should be case-insensitive.
1908                pub ignore_uri_case: bool,
1909                pub method: Method,
1910                /// The name assigned to a match.
1911                pub name: String,
1912                /// Specifies the ports on the host that is being addressed.
1913                pub port: i64,
1914                /// Query parameters for matching.
1915                pub query_params: QueryParams,
1916                pub scheme: Scheme,
1917                pub source_labels: HttpItemMatchItemSourceLabels,
1918                /// Source namespace constraining the applicability of a rule to workloads in that namespace.
1919                pub source_namespace: String,
1920                pub uri: Uri,
1921                /// withoutHeader has the same syntax with the header, but has opposite meaning.
1922                pub without_headers: WithoutHeaders,
1923            }
1924
1925            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1926            #[serde(rename_all = "camelCase")]
1927            pub struct TcpItemMatchItem {
1928                /// IPv4 or IPv6 ip addresses of destination with optional subnet.
1929                pub destination_subnets: Vec<String>,
1930                /// Names of gateways where the rule should be applied.
1931                pub gateways: Vec<String>,
1932                /// Specifies the port on the host that is being addressed.
1933                pub port: i64,
1934                pub source_labels: TcpItemMatchItemSourceLabels,
1935                /// Source namespace constraining the applicability of a rule to workloads in that namespace.
1936                pub source_namespace: String,
1937                /// IPv4 or IPv6 ip address of source with optional subnet.
1938                pub source_subnet: String,
1939            }
1940
1941            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1942            #[serde(rename_all = "camelCase")]
1943            pub struct TlsItemMatchItem {
1944                /// IPv4 or IPv6 ip addresses of destination with optional subnet.
1945                pub destination_subnets: Vec<String>,
1946                /// Names of gateways where the rule should be applied.
1947                pub gateways: Vec<String>,
1948                /// Specifies the port on the host that is being addressed.
1949                pub port: i64,
1950                /// SNI (server name indicator) to match on.
1951                pub sni_hosts: Vec<String>,
1952                pub source_labels: TlsItemMatchItemSourceLabels,
1953                /// Source namespace constraining the applicability of a rule to workloads in that namespace.
1954                pub source_namespace: String,
1955            }
1956
1957            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1958            #[serde(rename_all = "camelCase")]
1959            pub struct Method {
1960                pub exact: String,
1961                pub prefix: String,
1962                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
1963                pub regex: String,
1964            }
1965
1966            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1967            #[serde(rename_all = "camelCase")]
1968            pub struct Mirror {
1969                /// The name of a service from the service registry.
1970                pub host: String,
1971                /// Specifies the port on the host that is being addressed.
1972                pub port: MirrorPort,
1973                /// The name of a subset within the service.
1974                pub subset: String,
1975            }
1976
1977            /// Percentage of the traffic to be mirrored by the `mirror` field.
1978            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1979            #[serde(rename_all = "camelCase")]
1980            pub struct MirrorPercentage {
1981                pub value: f64,
1982            }
1983
1984            /// Percentage of requests to be aborted with the error code provided.
1985            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1986            #[serde(rename_all = "camelCase")]
1987            pub struct AbortPercentage {
1988                pub value: f64,
1989            }
1990
1991            /// Percentage of requests on which the delay will be injected.
1992            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
1993            #[serde(rename_all = "camelCase")]
1994            pub struct DelayPercentage {
1995                pub value: f64,
1996            }
1997
1998            /// Specifies the port on the host that is being addressed.
1999            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2000            #[serde(rename_all = "camelCase")]
2001            pub struct MirrorPort {
2002                pub number: i64,
2003            }
2004
2005            /// Specifies the port on the host that is being addressed.
2006            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2007            #[serde(rename_all = "camelCase")]
2008            pub struct HttpItemRouteItemDestinationPort {
2009                pub number: i64,
2010            }
2011
2012            /// Specifies the port on the host that is being addressed.
2013            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2014            #[serde(rename_all = "camelCase")]
2015            pub struct TcpItemRouteItemDestinationPort {
2016                pub number: i64,
2017            }
2018
2019            /// Specifies the port on the host that is being addressed.
2020            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2021            #[serde(rename_all = "camelCase")]
2022            pub struct TlsItemRouteItemDestinationPort {
2023                pub number: i64,
2024            }
2025
2026            /// Query parameters for matching.
2027            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2028            #[serde(rename_all = "camelCase")]
2029            pub struct QueryParams {
2030                /// Query parameters for matching.
2031                pub properties: std::collections::HashMap<String, QueryParamsValue>,
2032            }
2033
2034            /// A HTTP rule can either redirect or forward (default) traffic.
2035            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2036            #[serde(rename_all = "camelCase")]
2037            pub struct Redirect {
2038                pub authority: String,
2039                pub derive_port: String,
2040                /// On a redirect, overwrite the port portion of the URL with this value.
2041                pub port: i64,
2042                pub redirect_code: i64,
2043                /// On a redirect, overwrite the scheme portion of the URL with this value.
2044                pub scheme: String,
2045                pub uri: String,
2046            }
2047
2048            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2049            #[serde(rename_all = "camelCase")]
2050            pub struct HttpItemHeadersRequest {
2051                pub add: HttpItemHeadersRequestAdd,
2052                pub remove: Vec<String>,
2053                pub set: HttpItemHeadersRequestSet,
2054            }
2055
2056            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2057            #[serde(rename_all = "camelCase")]
2058            pub struct RouteItemHeadersRequest {
2059                pub add: RouteItemHeadersRequestAdd,
2060                pub remove: Vec<String>,
2061                pub set: RouteItemHeadersRequestSet,
2062            }
2063
2064            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2065            #[serde(rename_all = "camelCase")]
2066            pub struct HttpItemHeadersResponse {
2067                pub add: HttpItemHeadersResponseAdd,
2068                pub remove: Vec<String>,
2069                pub set: HttpItemHeadersResponseSet,
2070            }
2071
2072            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2073            #[serde(rename_all = "camelCase")]
2074            pub struct RouteItemHeadersResponse {
2075                pub add: RouteItemHeadersResponseAdd,
2076                pub remove: Vec<String>,
2077                pub set: RouteItemHeadersResponseSet,
2078            }
2079
2080            /// Retry policy for HTTP requests.
2081            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2082            #[serde(rename_all = "camelCase")]
2083            pub struct Retries {
2084                /// Number of retries to be allowed for a given request.
2085                pub attempts: i32,
2086                /// Timeout per attempt for a given request, including the initial call and any retries.
2087                pub per_try_timeout: String,
2088                /// Specifies the conditions under which retry takes place.
2089                pub retry_on: String,
2090                /// Flag to specify whether the retries should retry to other localities.
2091                pub retry_remote_localities: Option<bool>,
2092            }
2093
2094            /// Rewrite HTTP URIs and Authority headers.
2095            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2096            #[serde(rename_all = "camelCase")]
2097            pub struct Rewrite {
2098                /// rewrite the Authority/Host header with this value.
2099                pub authority: String,
2100                pub uri: String,
2101            }
2102
2103            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2104            #[serde(rename_all = "camelCase")]
2105            pub struct HttpItemRouteItem {
2106                pub destination: HttpItemRouteItemDestination,
2107                pub headers: RouteItemHeaders,
2108                /// Weight specifies the relative proportion of traffic to be forwarded to the destination.
2109                pub weight: i32,
2110            }
2111
2112            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2113            #[serde(rename_all = "camelCase")]
2114            pub struct TcpItemRouteItem {
2115                pub destination: TcpItemRouteItemDestination,
2116                /// Weight specifies the relative proportion of traffic to be forwarded to the destination.
2117                pub weight: i32,
2118            }
2119
2120            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2121            #[serde(rename_all = "camelCase")]
2122            pub struct TlsItemRouteItem {
2123                pub destination: TlsItemRouteItemDestination,
2124                /// Weight specifies the relative proportion of traffic to be forwarded to the destination.
2125                pub weight: i32,
2126            }
2127
2128            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2129            #[serde(rename_all = "camelCase")]
2130            pub struct Scheme {
2131                pub exact: String,
2132                pub prefix: String,
2133                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
2134                pub regex: String,
2135            }
2136
2137            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2138            #[serde(rename_all = "camelCase")]
2139            pub struct HttpItemHeadersRequestSet {
2140                pub properties: std::collections::HashMap<String, String>,
2141            }
2142
2143            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2144            #[serde(rename_all = "camelCase")]
2145            pub struct HttpItemHeadersResponseSet {
2146                pub properties: std::collections::HashMap<String, String>,
2147            }
2148
2149            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2150            #[serde(rename_all = "camelCase")]
2151            pub struct RouteItemHeadersRequestSet {
2152                pub properties: std::collections::HashMap<String, String>,
2153            }
2154
2155            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2156            #[serde(rename_all = "camelCase")]
2157            pub struct RouteItemHeadersResponseSet {
2158                pub properties: std::collections::HashMap<String, String>,
2159            }
2160
2161            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2162            #[serde(rename_all = "camelCase")]
2163            pub struct HttpItemMatchItemSourceLabels {
2164                pub properties: std::collections::HashMap<String, String>,
2165            }
2166
2167            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2168            #[serde(rename_all = "camelCase")]
2169            pub struct TcpItemMatchItemSourceLabels {
2170                pub properties: std::collections::HashMap<String, String>,
2171            }
2172
2173            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2174            #[serde(rename_all = "camelCase")]
2175            pub struct TlsItemMatchItemSourceLabels {
2176                pub properties: std::collections::HashMap<String, String>,
2177            }
2178
2179            /// Configuration affecting label/content routing, sni routing, etc. See more details at: https://istio.io/docs/reference/config/networking/virtual-service.html
2180            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2181            #[serde(rename_all = "camelCase")]
2182            pub struct Spec {
2183                /// A list of namespaces to which this virtual service is exported.
2184                pub export_to: Vec<String>,
2185                /// The names of gateways and sidecars that should apply these routes.
2186                pub gateways: Vec<String>,
2187                /// The destination hosts to which traffic is being sent.
2188                pub hosts: Vec<String>,
2189                /// An ordered list of route rules for HTTP traffic.
2190                pub http: Vec<HttpItem>,
2191                /// An ordered list of route rules for opaque TCP traffic.
2192                pub tcp: Vec<TcpItem>,
2193                pub tls: Vec<TlsItem>,
2194            }
2195
2196            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2197            #[serde(rename_all = "camelCase")]
2198            pub struct Status {
2199                pub properties: serde_json::Map<String, serde_json::Value>,
2200            }
2201
2202            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2203            #[serde(rename_all = "camelCase")]
2204            pub struct TcpItem {
2205                pub r#match: Vec<TcpItemMatchItem>,
2206                /// The destination to which the connection should be forwarded to.
2207                pub route: Vec<TcpItemRouteItem>,
2208            }
2209
2210            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2211            #[serde(rename_all = "camelCase")]
2212            pub struct TlsItem {
2213                pub r#match: Vec<TlsItemMatchItem>,
2214                /// The destination to which the connection should be forwarded to.
2215                pub route: Vec<TlsItemRouteItem>,
2216            }
2217
2218            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2219            #[serde(rename_all = "camelCase")]
2220            pub struct Uri {
2221                pub exact: String,
2222                pub prefix: String,
2223                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
2224                pub regex: String,
2225            }
2226
2227            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2228            #[serde(rename_all = "camelCase")]
2229            pub struct HeadersValue {
2230                pub exact: String,
2231                pub prefix: String,
2232                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
2233                pub regex: String,
2234            }
2235
2236            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2237            #[serde(rename_all = "camelCase")]
2238            pub struct QueryParamsValue {
2239                pub exact: String,
2240                pub prefix: String,
2241                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
2242                pub regex: String,
2243            }
2244
2245            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2246            #[serde(rename_all = "camelCase")]
2247            pub struct WithoutHeadersValue {
2248                pub exact: String,
2249                pub prefix: String,
2250                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
2251                pub regex: String,
2252            }
2253
2254            /// withoutHeader has the same syntax with the header, but has opposite meaning.
2255            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2256            #[serde(rename_all = "camelCase")]
2257            pub struct WithoutHeaders {
2258                /// withoutHeader has the same syntax with the header, but has opposite meaning.
2259                pub properties: std::collections::HashMap<String, WithoutHeadersValue>,
2260            }
2261        }
2262        pub mod workload_entry {
2263            #[derive(serde::Deserialize, Debug, PartialEq)]
2264            pub struct WorkloadEntry {
2265                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
2266                pub spec: Spec,
2267                pub status: Status,
2268            }
2269
2270            impl k8s_openapi::Resource for WorkloadEntry {
2271                type Scope = k8s_openapi::ClusterResourceScope;
2272
2273                const API_VERSION: &'static str = "networking.istio.io/v1alpha3";
2274                const GROUP: &'static str = "networking.istio.io";
2275                const KIND: &'static str = "WorkloadEntry";
2276                const VERSION: &'static str = "v1alpha3";
2277                const URL_PATH_SEGMENT: &'static str = "TODO";
2278            }
2279
2280            impl k8s_openapi::Metadata for WorkloadEntry {
2281                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
2282
2283                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
2284                    &self.metadata
2285                }
2286
2287                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
2288                    &mut self.metadata
2289                }
2290            }
2291
2292            impl serde::Serialize for WorkloadEntry {
2293                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2294                where
2295                    S: serde::Serializer,
2296                {
2297                    use serde::ser::SerializeStruct;
2298                    let mut state = serializer.serialize_struct("WorkloadEntry", 5)?;
2299                    state.serialize_field(
2300                        "apiVersion",
2301                        <Self as k8s_openapi::Resource>::API_VERSION,
2302                    )?;
2303                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
2304                    state.serialize_field("metadata", &self.metadata)?;
2305                    state.serialize_field("spec", &self.spec)?;
2306                    state.serialize_field("status", &self.status)?;
2307                    state.end()
2308                }
2309            }
2310
2311            /// One or more labels associated with the endpoint.
2312            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2313            #[serde(rename_all = "camelCase")]
2314            pub struct Labels {
2315                /// One or more labels associated with the endpoint.
2316                pub properties: std::collections::HashMap<String, String>,
2317            }
2318
2319            /// Set of ports associated with the endpoint.
2320            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2321            #[serde(rename_all = "camelCase")]
2322            pub struct Ports {
2323                /// Set of ports associated with the endpoint.
2324                pub properties: std::collections::HashMap<String, i64>,
2325            }
2326
2327            /// Configuration affecting VMs onboarded into the mesh. See more details at: https://istio.io/docs/reference/config/networking/workload-entry.html
2328            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2329            #[serde(rename_all = "camelCase")]
2330            pub struct Spec {
2331                pub address: String,
2332                /// One or more labels associated with the endpoint.
2333                pub labels: Labels,
2334                /// The locality associated with the endpoint.
2335                pub locality: String,
2336                pub network: String,
2337                /// Set of ports associated with the endpoint.
2338                pub ports: Ports,
2339                pub service_account: String,
2340                /// The load balancing weight associated with the endpoint.
2341                pub weight: i64,
2342            }
2343
2344            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2345            #[serde(rename_all = "camelCase")]
2346            pub struct Status {
2347                pub properties: serde_json::Map<String, serde_json::Value>,
2348            }
2349        }
2350        pub mod workload_group {
2351            #[derive(serde::Deserialize, Debug, PartialEq)]
2352            pub struct WorkloadGroup {
2353                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
2354                pub spec: Spec,
2355                pub status: Status,
2356            }
2357
2358            impl k8s_openapi::Resource for WorkloadGroup {
2359                type Scope = k8s_openapi::ClusterResourceScope;
2360
2361                const API_VERSION: &'static str = "networking.istio.io/v1alpha3";
2362                const GROUP: &'static str = "networking.istio.io";
2363                const KIND: &'static str = "WorkloadGroup";
2364                const VERSION: &'static str = "v1alpha3";
2365                const URL_PATH_SEGMENT: &'static str = "TODO";
2366            }
2367
2368            impl k8s_openapi::Metadata for WorkloadGroup {
2369                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
2370
2371                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
2372                    &self.metadata
2373                }
2374
2375                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
2376                    &mut self.metadata
2377                }
2378            }
2379
2380            impl serde::Serialize for WorkloadGroup {
2381                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2382                where
2383                    S: serde::Serializer,
2384                {
2385                    use serde::ser::SerializeStruct;
2386                    let mut state = serializer.serialize_struct("WorkloadGroup", 5)?;
2387                    state.serialize_field(
2388                        "apiVersion",
2389                        <Self as k8s_openapi::Resource>::API_VERSION,
2390                    )?;
2391                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
2392                    state.serialize_field("metadata", &self.metadata)?;
2393                    state.serialize_field("spec", &self.spec)?;
2394                    state.serialize_field("status", &self.status)?;
2395                    state.end()
2396                }
2397            }
2398
2399            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2400            #[serde(rename_all = "camelCase")]
2401            pub struct Annotations {
2402                pub properties: std::collections::HashMap<String, String>,
2403            }
2404
2405            /// Health is determined by how the command that is executed exited.
2406            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2407            #[serde(rename_all = "camelCase")]
2408            pub struct Exec {
2409                /// Command to run.
2410                pub command: Vec<String>,
2411            }
2412
2413            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2414            #[serde(rename_all = "camelCase")]
2415            pub struct HttpGet {
2416                /// Host name to connect to, defaults to the pod IP.
2417                pub host: String,
2418                /// Headers the proxy will pass on to make the request.
2419                pub http_headers: Vec<HttpHeadersItem>,
2420                /// Path to access on the HTTP server.
2421                pub path: String,
2422                /// Port on which the endpoint lives.
2423                pub port: i64,
2424                pub scheme: String,
2425            }
2426
2427            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2428            #[serde(rename_all = "camelCase")]
2429            pub struct HttpHeadersItem {
2430                pub name: String,
2431                pub value: String,
2432            }
2433
2434            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2435            #[serde(rename_all = "camelCase")]
2436            pub struct MetadataLabels {
2437                pub properties: std::collections::HashMap<String, String>,
2438            }
2439
2440            /// One or more labels associated with the endpoint.
2441            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2442            #[serde(rename_all = "camelCase")]
2443            pub struct TemplateLabels {
2444                /// One or more labels associated with the endpoint.
2445                pub properties: std::collections::HashMap<String, String>,
2446            }
2447
2448            /// Metadata that will be used for all corresponding `WorkloadEntries`.
2449            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2450            #[serde(rename_all = "camelCase")]
2451            pub struct Metadata {
2452                pub annotations: Annotations,
2453                pub labels: MetadataLabels,
2454            }
2455
2456            /// Set of ports associated with the endpoint.
2457            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2458            #[serde(rename_all = "camelCase")]
2459            pub struct Ports {
2460                /// Set of ports associated with the endpoint.
2461                pub properties: std::collections::HashMap<String, i64>,
2462            }
2463
2464            /// `ReadinessProbe` describes the configuration the user must provide for healthchecking on their workload.
2465            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2466            #[serde(rename_all = "camelCase")]
2467            pub struct Probe {
2468                /// Health is determined by how the command that is executed exited.
2469                pub exec: Exec,
2470                /// Minimum consecutive failures for the probe to be considered failed after having succeeded.
2471                pub failure_threshold: i32,
2472                pub http_get: HttpGet,
2473                /// Number of seconds after the container has started before readiness probes are initiated.
2474                pub initial_delay_seconds: i32,
2475                /// How often (in seconds) to perform the probe.
2476                pub period_seconds: i32,
2477                /// Minimum consecutive successes for the probe to be considered successful after having failed.
2478                pub success_threshold: i32,
2479                /// Health is determined by if the proxy is able to connect.
2480                pub tcp_socket: TcpSocket,
2481                /// Number of seconds after which the probe times out.
2482                pub timeout_seconds: i32,
2483            }
2484
2485            /// Describes a collection of workload instances. See more details at: https://istio.io/docs/reference/config/networking/workload-group.html
2486            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2487            #[serde(rename_all = "camelCase")]
2488            pub struct Spec {
2489                /// Metadata that will be used for all corresponding `WorkloadEntries`.
2490                pub metadata: Metadata,
2491                /// `ReadinessProbe` describes the configuration the user must provide for healthchecking on their workload.
2492                pub probe: Probe,
2493                /// Template to be used for the generation of `WorkloadEntry` resources that belong to this `WorkloadGroup`.
2494                pub template: Template,
2495            }
2496
2497            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2498            #[serde(rename_all = "camelCase")]
2499            pub struct Status {
2500                pub properties: serde_json::Map<String, serde_json::Value>,
2501            }
2502
2503            /// Health is determined by if the proxy is able to connect.
2504            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2505            #[serde(rename_all = "camelCase")]
2506            pub struct TcpSocket {
2507                pub host: String,
2508                pub port: i64,
2509            }
2510
2511            /// Template to be used for the generation of `WorkloadEntry` resources that belong to this `WorkloadGroup`.
2512            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2513            #[serde(rename_all = "camelCase")]
2514            pub struct Template {
2515                pub address: String,
2516                /// One or more labels associated with the endpoint.
2517                pub labels: TemplateLabels,
2518                /// The locality associated with the endpoint.
2519                pub locality: String,
2520                pub network: String,
2521                /// Set of ports associated with the endpoint.
2522                pub ports: Ports,
2523                pub service_account: String,
2524                /// The load balancing weight associated with the endpoint.
2525                pub weight: i64,
2526            }
2527        }
2528    }
2529    pub mod v1beta1 {
2530        pub mod destination_rule {
2531            #[derive(serde::Deserialize, Debug, PartialEq)]
2532            pub struct DestinationRule {
2533                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
2534                pub spec: Spec,
2535                pub status: Status,
2536            }
2537
2538            impl k8s_openapi::Resource for DestinationRule {
2539                type Scope = k8s_openapi::ClusterResourceScope;
2540
2541                const API_VERSION: &'static str = "networking.istio.io/v1beta1";
2542                const GROUP: &'static str = "networking.istio.io";
2543                const KIND: &'static str = "DestinationRule";
2544                const VERSION: &'static str = "v1beta1";
2545                const URL_PATH_SEGMENT: &'static str = "TODO";
2546            }
2547
2548            impl k8s_openapi::Metadata for DestinationRule {
2549                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
2550
2551                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
2552                    &self.metadata
2553                }
2554
2555                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
2556                    &mut self.metadata
2557                }
2558            }
2559
2560            impl serde::Serialize for DestinationRule {
2561                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
2562                where
2563                    S: serde::Serializer,
2564                {
2565                    use serde::ser::SerializeStruct;
2566                    let mut state = serializer.serialize_struct("DestinationRule", 5)?;
2567                    state.serialize_field(
2568                        "apiVersion",
2569                        <Self as k8s_openapi::Resource>::API_VERSION,
2570                    )?;
2571                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
2572                    state.serialize_field("metadata", &self.metadata)?;
2573                    state.serialize_field("spec", &self.spec)?;
2574                    state.serialize_field("status", &self.status)?;
2575                    state.end()
2576                }
2577            }
2578
2579            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2580            #[serde(rename_all = "camelCase")]
2581            pub struct SubsetsItemTrafficPolicyConnectionPool {
2582                /// HTTP connection pool settings.
2583                pub http: SubsetsItemTrafficPolicyConnectionPoolHttp,
2584                /// Settings common to both HTTP and TCP upstream connections.
2585                pub tcp: SubsetsItemTrafficPolicyConnectionPoolTcp,
2586            }
2587
2588            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2589            #[serde(rename_all = "camelCase")]
2590            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPool {
2591                /// HTTP connection pool settings.
2592                pub http: SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPoolHttp,
2593                /// Settings common to both HTTP and TCP upstream connections.
2594                pub tcp: SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPoolTcp,
2595            }
2596
2597            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2598            #[serde(rename_all = "camelCase")]
2599            pub struct SpecTrafficPolicyConnectionPool {
2600                /// HTTP connection pool settings.
2601                pub http: SpecTrafficPolicyConnectionPoolHttp,
2602                /// Settings common to both HTTP and TCP upstream connections.
2603                pub tcp: SpecTrafficPolicyConnectionPoolTcp,
2604            }
2605
2606            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2607            #[serde(rename_all = "camelCase")]
2608            pub struct SpecTrafficPolicyPortLevelSettingsItemConnectionPool {
2609                /// HTTP connection pool settings.
2610                pub http: SpecTrafficPolicyPortLevelSettingsItemConnectionPoolHttp,
2611                /// Settings common to both HTTP and TCP upstream connections.
2612                pub tcp: SpecTrafficPolicyPortLevelSettingsItemConnectionPoolTcp,
2613            }
2614
2615            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2616            #[serde(rename_all = "camelCase")]
2617            pub struct SubsetsItemTrafficPolicyLoadBalancerConsistentHash {
2618                /// Hash based on HTTP cookie.
2619                pub http_cookie: SubsetsItemTrafficPolicyLoadBalancerConsistentHashHttpCookie,
2620                /// Hash based on a specific HTTP header.
2621                pub http_header_name: String,
2622                /// Hash based on a specific HTTP query parameter.
2623                pub http_query_parameter_name: String,
2624                pub minimum_ring_size: i64,
2625                /// Hash based on the source IP address.
2626                pub use_source_ip: bool,
2627            }
2628
2629            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2630            #[serde(rename_all = "camelCase")]
2631            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHash {
2632            /// Hash based on HTTP cookie.
2633            pub http_cookie: SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHashHttpCookie,
2634            /// Hash based on a specific HTTP header.
2635            pub http_header_name: String,
2636            /// Hash based on a specific HTTP query parameter.
2637            pub http_query_parameter_name: String,
2638            pub minimum_ring_size: i64,
2639            /// Hash based on the source IP address.
2640            pub use_source_ip: bool,
2641        }
2642
2643            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2644            #[serde(rename_all = "camelCase")]
2645            pub struct SpecTrafficPolicyLoadBalancerConsistentHash {
2646                /// Hash based on HTTP cookie.
2647                pub http_cookie: SpecTrafficPolicyLoadBalancerConsistentHashHttpCookie,
2648                /// Hash based on a specific HTTP header.
2649                pub http_header_name: String,
2650                /// Hash based on a specific HTTP query parameter.
2651                pub http_query_parameter_name: String,
2652                pub minimum_ring_size: i64,
2653                /// Hash based on the source IP address.
2654                pub use_source_ip: bool,
2655            }
2656
2657            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2658            #[serde(rename_all = "camelCase")]
2659            pub struct SpecTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHash {
2660                /// Hash based on HTTP cookie.
2661                pub http_cookie:
2662                    SpecTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHashHttpCookie,
2663                /// Hash based on a specific HTTP header.
2664                pub http_header_name: String,
2665                /// Hash based on a specific HTTP query parameter.
2666                pub http_query_parameter_name: String,
2667                pub minimum_ring_size: i64,
2668                /// Hash based on the source IP address.
2669                pub use_source_ip: bool,
2670            }
2671
2672            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2673            #[serde(rename_all = "camelCase")]
2674            pub struct SubsetsItemTrafficPolicyLoadBalancerLocalityLbSettingDistributeItem {
2675                /// Originating locality, '/' separated, e.g.
2676                pub from: String,
2677                /// Map of upstream localities to traffic distribution weights.
2678                pub to: SubsetsItemTrafficPolicyLoadBalancerLocalityLbSettingDistributeItemTo,
2679            }
2680
2681            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2682            #[serde(rename_all = "camelCase")]
2683            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItem {
2684            /// Originating locality, '/' separated, e.g.
2685            pub from: String,
2686            /// Map of upstream localities to traffic distribution weights.
2687            pub to: SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItemTo,
2688        }
2689
2690            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2691            #[serde(rename_all = "camelCase")]
2692            pub struct SpecTrafficPolicyLoadBalancerLocalityLbSettingDistributeItem {
2693                /// Originating locality, '/' separated, e.g.
2694                pub from: String,
2695                /// Map of upstream localities to traffic distribution weights.
2696                pub to: SpecTrafficPolicyLoadBalancerLocalityLbSettingDistributeItemTo,
2697            }
2698
2699            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2700            #[serde(rename_all = "camelCase")]
2701            pub struct SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItem {
2702            /// Originating locality, '/' separated, e.g.
2703            pub from: String,
2704            /// Map of upstream localities to traffic distribution weights.
2705            pub to: SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItemTo,
2706        }
2707
2708            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2709            #[serde(rename_all = "camelCase")]
2710            pub struct SubsetsItemTrafficPolicyLoadBalancerLocalityLbSettingFailoverItem {
2711                /// Originating region.
2712                pub from: String,
2713                pub to: String,
2714            }
2715
2716            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2717            #[serde(rename_all = "camelCase")]
2718            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingFailoverItem {
2719                /// Originating region.
2720                pub from: String,
2721                pub to: String,
2722            }
2723
2724            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2725            #[serde(rename_all = "camelCase")]
2726            pub struct SpecTrafficPolicyLoadBalancerLocalityLbSettingFailoverItem {
2727                /// Originating region.
2728                pub from: String,
2729                pub to: String,
2730            }
2731
2732            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2733            #[serde(rename_all = "camelCase")]
2734            pub struct SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingFailoverItem {
2735                /// Originating region.
2736                pub from: String,
2737                pub to: String,
2738            }
2739
2740            /// HTTP connection pool settings.
2741            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2742            #[serde(rename_all = "camelCase")]
2743            pub struct SubsetsItemTrafficPolicyConnectionPoolHttp {
2744                /// Specify if http1.1 connection should be upgraded to http2 for the associated destination.
2745                pub h2_upgrade_policy: String,
2746                /// Maximum number of pending HTTP requests to a destination.
2747                pub http1_max_pending_requests: i32,
2748                /// Maximum number of requests to a backend.
2749                pub http2_max_requests: i32,
2750                /// The idle timeout for upstream connection pool connections.
2751                pub idle_timeout: String,
2752                /// Maximum number of requests per connection to a backend.
2753                pub max_requests_per_connection: i32,
2754                pub max_retries: i32,
2755                /// If set to true, client protocol will be preserved while initiating connection to backend.
2756                pub use_client_protocol: bool,
2757            }
2758
2759            /// HTTP connection pool settings.
2760            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2761            #[serde(rename_all = "camelCase")]
2762            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPoolHttp {
2763                /// Specify if http1.1 connection should be upgraded to http2 for the associated destination.
2764                pub h2_upgrade_policy: String,
2765                /// Maximum number of pending HTTP requests to a destination.
2766                pub http1_max_pending_requests: i32,
2767                /// Maximum number of requests to a backend.
2768                pub http2_max_requests: i32,
2769                /// The idle timeout for upstream connection pool connections.
2770                pub idle_timeout: String,
2771                /// Maximum number of requests per connection to a backend.
2772                pub max_requests_per_connection: i32,
2773                pub max_retries: i32,
2774                /// If set to true, client protocol will be preserved while initiating connection to backend.
2775                pub use_client_protocol: bool,
2776            }
2777
2778            /// HTTP connection pool settings.
2779            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2780            #[serde(rename_all = "camelCase")]
2781            pub struct SpecTrafficPolicyConnectionPoolHttp {
2782                /// Specify if http1.1 connection should be upgraded to http2 for the associated destination.
2783                pub h2_upgrade_policy: String,
2784                /// Maximum number of pending HTTP requests to a destination.
2785                pub http1_max_pending_requests: i32,
2786                /// Maximum number of requests to a backend.
2787                pub http2_max_requests: i32,
2788                /// The idle timeout for upstream connection pool connections.
2789                pub idle_timeout: String,
2790                /// Maximum number of requests per connection to a backend.
2791                pub max_requests_per_connection: i32,
2792                pub max_retries: i32,
2793                /// If set to true, client protocol will be preserved while initiating connection to backend.
2794                pub use_client_protocol: bool,
2795            }
2796
2797            /// HTTP connection pool settings.
2798            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2799            #[serde(rename_all = "camelCase")]
2800            pub struct SpecTrafficPolicyPortLevelSettingsItemConnectionPoolHttp {
2801                /// Specify if http1.1 connection should be upgraded to http2 for the associated destination.
2802                pub h2_upgrade_policy: String,
2803                /// Maximum number of pending HTTP requests to a destination.
2804                pub http1_max_pending_requests: i32,
2805                /// Maximum number of requests to a backend.
2806                pub http2_max_requests: i32,
2807                /// The idle timeout for upstream connection pool connections.
2808                pub idle_timeout: String,
2809                /// Maximum number of requests per connection to a backend.
2810                pub max_requests_per_connection: i32,
2811                pub max_retries: i32,
2812                /// If set to true, client protocol will be preserved while initiating connection to backend.
2813                pub use_client_protocol: bool,
2814            }
2815
2816            /// Hash based on HTTP cookie.
2817            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2818            #[serde(rename_all = "camelCase")]
2819            pub struct SubsetsItemTrafficPolicyLoadBalancerConsistentHashHttpCookie {
2820                /// Name of the cookie.
2821                pub name: String,
2822                /// Path to set for the cookie.
2823                pub path: String,
2824                /// Lifetime of the cookie.
2825                pub ttl: String,
2826            }
2827
2828            /// Hash based on HTTP cookie.
2829            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2830            #[serde(rename_all = "camelCase")]
2831            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHashHttpCookie {
2832                /// Name of the cookie.
2833                pub name: String,
2834                /// Path to set for the cookie.
2835                pub path: String,
2836                /// Lifetime of the cookie.
2837                pub ttl: String,
2838            }
2839
2840            /// Hash based on HTTP cookie.
2841            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2842            #[serde(rename_all = "camelCase")]
2843            pub struct SpecTrafficPolicyLoadBalancerConsistentHashHttpCookie {
2844                /// Name of the cookie.
2845                pub name: String,
2846                /// Path to set for the cookie.
2847                pub path: String,
2848                /// Lifetime of the cookie.
2849                pub ttl: String,
2850            }
2851
2852            /// Hash based on HTTP cookie.
2853            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2854            #[serde(rename_all = "camelCase")]
2855            pub struct SpecTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHashHttpCookie {
2856                /// Name of the cookie.
2857                pub name: String,
2858                /// Path to set for the cookie.
2859                pub path: String,
2860                /// Lifetime of the cookie.
2861                pub ttl: String,
2862            }
2863
2864            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2865            #[serde(rename_all = "camelCase")]
2866            pub struct Labels {
2867                pub properties: std::collections::HashMap<String, String>,
2868            }
2869
2870            /// Settings controlling the load balancer algorithms.
2871            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2872            #[serde(rename_all = "camelCase")]
2873            pub struct SubsetsItemTrafficPolicyLoadBalancer {
2874                pub consistent_hash: SubsetsItemTrafficPolicyLoadBalancerConsistentHash,
2875                pub locality_lb_setting: SubsetsItemTrafficPolicyLoadBalancerLocalityLbSetting,
2876                pub simple: String,
2877                /// Represents the warmup duration of Service.
2878                pub warmup_duration_secs: String,
2879            }
2880
2881            /// Settings controlling the load balancer algorithms.
2882            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2883            #[serde(rename_all = "camelCase")]
2884            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancer {
2885                pub consistent_hash:
2886                    SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHash,
2887                pub locality_lb_setting:
2888                    SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSetting,
2889                pub simple: String,
2890                /// Represents the warmup duration of Service.
2891                pub warmup_duration_secs: String,
2892            }
2893
2894            /// Settings controlling the load balancer algorithms.
2895            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2896            #[serde(rename_all = "camelCase")]
2897            pub struct SpecTrafficPolicyLoadBalancer {
2898                pub consistent_hash: SpecTrafficPolicyLoadBalancerConsistentHash,
2899                pub locality_lb_setting: SpecTrafficPolicyLoadBalancerLocalityLbSetting,
2900                pub simple: String,
2901                /// Represents the warmup duration of Service.
2902                pub warmup_duration_secs: String,
2903            }
2904
2905            /// Settings controlling the load balancer algorithms.
2906            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2907            #[serde(rename_all = "camelCase")]
2908            pub struct SpecTrafficPolicyPortLevelSettingsItemLoadBalancer {
2909                pub consistent_hash:
2910                    SpecTrafficPolicyPortLevelSettingsItemLoadBalancerConsistentHash,
2911                pub locality_lb_setting:
2912                    SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSetting,
2913                pub simple: String,
2914                /// Represents the warmup duration of Service.
2915                pub warmup_duration_secs: String,
2916            }
2917
2918            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2919            #[serde(rename_all = "camelCase")]
2920            pub struct SubsetsItemTrafficPolicyLoadBalancerLocalityLbSetting {
2921                /// Optional: only one of distribute, failover or failoverPriority can be set.
2922                pub distribute:
2923                    Vec<SubsetsItemTrafficPolicyLoadBalancerLocalityLbSettingDistributeItem>,
2924                /// enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
2925                pub enabled: Option<bool>,
2926                /// Optional: only one of distribute, failover or failoverPriority can be set.
2927                pub failover:
2928                    Vec<SubsetsItemTrafficPolicyLoadBalancerLocalityLbSettingFailoverItem>,
2929                /// failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing.
2930                pub failover_priority: Vec<String>,
2931            }
2932
2933            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2934            #[serde(rename_all = "camelCase")]
2935            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSetting {
2936            /// Optional: only one of distribute, failover or failoverPriority can be set.
2937            pub distribute: Vec<SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItem>,
2938            /// enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
2939            pub enabled: Option<bool>,
2940            /// Optional: only one of distribute, failover or failoverPriority can be set.
2941            pub failover: Vec<SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingFailoverItem>,
2942            /// failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing.
2943            pub failover_priority: Vec<String>,
2944        }
2945
2946            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2947            #[serde(rename_all = "camelCase")]
2948            pub struct SpecTrafficPolicyLoadBalancerLocalityLbSetting {
2949                /// Optional: only one of distribute, failover or failoverPriority can be set.
2950                pub distribute: Vec<SpecTrafficPolicyLoadBalancerLocalityLbSettingDistributeItem>,
2951                /// enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
2952                pub enabled: Option<bool>,
2953                /// Optional: only one of distribute, failover or failoverPriority can be set.
2954                pub failover: Vec<SpecTrafficPolicyLoadBalancerLocalityLbSettingFailoverItem>,
2955                /// failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing.
2956                pub failover_priority: Vec<String>,
2957            }
2958
2959            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2960            #[serde(rename_all = "camelCase")]
2961            pub struct SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSetting {
2962            /// Optional: only one of distribute, failover or failoverPriority can be set.
2963            pub distribute: Vec<SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItem>,
2964            /// enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety.
2965            pub enabled: Option<bool>,
2966            /// Optional: only one of distribute, failover or failoverPriority can be set.
2967            pub failover: Vec<SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingFailoverItem>,
2968            /// failoverPriority is an ordered list of labels used to sort endpoints to do priority based load balancing.
2969            pub failover_priority: Vec<String>,
2970        }
2971
2972            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2973            #[serde(rename_all = "camelCase")]
2974            pub struct MatchLabels {
2975                pub properties: std::collections::HashMap<String, String>,
2976            }
2977
2978            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2979            #[serde(rename_all = "camelCase")]
2980            pub struct SubsetsItemTrafficPolicyOutlierDetection {
2981                /// Minimum ejection duration.
2982                pub base_ejection_time: String,
2983                /// Number of 5xx errors before a host is ejected from the connection pool.
2984                pub consecutive5xx_errors: Option<i64>,
2985                pub consecutive_errors: i32,
2986                /// Number of gateway errors before a host is ejected from the connection pool.
2987                pub consecutive_gateway_errors: Option<i64>,
2988                pub consecutive_local_origin_failures: Option<i64>,
2989                /// Time interval between ejection sweep analysis.
2990                pub interval: String,
2991                pub max_ejection_percent: i32,
2992                pub min_health_percent: i32,
2993                /// Determines whether to distinguish local origin failures from external errors.
2994                pub split_external_local_origin_errors: bool,
2995            }
2996
2997            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
2998            #[serde(rename_all = "camelCase")]
2999            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemOutlierDetection {
3000                /// Minimum ejection duration.
3001                pub base_ejection_time: String,
3002                /// Number of 5xx errors before a host is ejected from the connection pool.
3003                pub consecutive5xx_errors: Option<i64>,
3004                pub consecutive_errors: i32,
3005                /// Number of gateway errors before a host is ejected from the connection pool.
3006                pub consecutive_gateway_errors: Option<i64>,
3007                pub consecutive_local_origin_failures: Option<i64>,
3008                /// Time interval between ejection sweep analysis.
3009                pub interval: String,
3010                pub max_ejection_percent: i32,
3011                pub min_health_percent: i32,
3012                /// Determines whether to distinguish local origin failures from external errors.
3013                pub split_external_local_origin_errors: bool,
3014            }
3015
3016            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3017            #[serde(rename_all = "camelCase")]
3018            pub struct SpecTrafficPolicyOutlierDetection {
3019                /// Minimum ejection duration.
3020                pub base_ejection_time: String,
3021                /// Number of 5xx errors before a host is ejected from the connection pool.
3022                pub consecutive5xx_errors: Option<i64>,
3023                pub consecutive_errors: i32,
3024                /// Number of gateway errors before a host is ejected from the connection pool.
3025                pub consecutive_gateway_errors: Option<i64>,
3026                pub consecutive_local_origin_failures: Option<i64>,
3027                /// Time interval between ejection sweep analysis.
3028                pub interval: String,
3029                pub max_ejection_percent: i32,
3030                pub min_health_percent: i32,
3031                /// Determines whether to distinguish local origin failures from external errors.
3032                pub split_external_local_origin_errors: bool,
3033            }
3034
3035            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3036            #[serde(rename_all = "camelCase")]
3037            pub struct SpecTrafficPolicyPortLevelSettingsItemOutlierDetection {
3038                /// Minimum ejection duration.
3039                pub base_ejection_time: String,
3040                /// Number of 5xx errors before a host is ejected from the connection pool.
3041                pub consecutive5xx_errors: Option<i64>,
3042                pub consecutive_errors: i32,
3043                /// Number of gateway errors before a host is ejected from the connection pool.
3044                pub consecutive_gateway_errors: Option<i64>,
3045                pub consecutive_local_origin_failures: Option<i64>,
3046                /// Time interval between ejection sweep analysis.
3047                pub interval: String,
3048                pub max_ejection_percent: i32,
3049                pub min_health_percent: i32,
3050                /// Determines whether to distinguish local origin failures from external errors.
3051                pub split_external_local_origin_errors: bool,
3052            }
3053
3054            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3055            #[serde(rename_all = "camelCase")]
3056            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemPort {
3057                pub number: i64,
3058            }
3059
3060            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3061            #[serde(rename_all = "camelCase")]
3062            pub struct SpecTrafficPolicyPortLevelSettingsItemPort {
3063                pub number: i64,
3064            }
3065
3066            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3067            #[serde(rename_all = "camelCase")]
3068            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItem {
3069                pub connection_pool: SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPool,
3070                /// Settings controlling the load balancer algorithms.
3071                pub load_balancer: SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancer,
3072                pub outlier_detection:
3073                    SubsetsItemTrafficPolicyPortLevelSettingsItemOutlierDetection,
3074                pub port: SubsetsItemTrafficPolicyPortLevelSettingsItemPort,
3075                /// TLS related settings for connections to the upstream service.
3076                pub tls: SubsetsItemTrafficPolicyPortLevelSettingsItemTls,
3077            }
3078
3079            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3080            #[serde(rename_all = "camelCase")]
3081            pub struct SpecTrafficPolicyPortLevelSettingsItem {
3082                pub connection_pool: SpecTrafficPolicyPortLevelSettingsItemConnectionPool,
3083                /// Settings controlling the load balancer algorithms.
3084                pub load_balancer: SpecTrafficPolicyPortLevelSettingsItemLoadBalancer,
3085                pub outlier_detection: SpecTrafficPolicyPortLevelSettingsItemOutlierDetection,
3086                pub port: SpecTrafficPolicyPortLevelSettingsItemPort,
3087                /// TLS related settings for connections to the upstream service.
3088                pub tls: SpecTrafficPolicyPortLevelSettingsItemTls,
3089            }
3090
3091            /// Configuration affecting load balancing, outlier detection, etc. See more details at: https://istio.io/docs/reference/config/networking/destination-rule.html
3092            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3093            #[serde(rename_all = "camelCase")]
3094            pub struct Spec {
3095                /// A list of namespaces to which this destination rule is exported.
3096                pub export_to: Vec<String>,
3097                /// The name of a service from the service registry.
3098                pub host: String,
3099                pub subsets: Vec<SubsetsItem>,
3100                pub traffic_policy: SpecTrafficPolicy,
3101                pub workload_selector: WorkloadSelector,
3102            }
3103
3104            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3105            #[serde(rename_all = "camelCase")]
3106            pub struct Status {
3107                pub properties: serde_json::Map<String, serde_json::Value>,
3108            }
3109
3110            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3111            #[serde(rename_all = "camelCase")]
3112            pub struct SubsetsItem {
3113                pub labels: Labels,
3114                /// Name of the subset.
3115                pub name: String,
3116                /// Traffic policies that apply to this subset.
3117                pub traffic_policy: SubsetsItemTrafficPolicy,
3118            }
3119
3120            /// Settings common to both HTTP and TCP upstream connections.
3121            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3122            #[serde(rename_all = "camelCase")]
3123            pub struct SubsetsItemTrafficPolicyConnectionPoolTcp {
3124                /// TCP connection timeout.
3125                pub connect_timeout: String,
3126                /// Maximum number of HTTP1 /TCP connections to a destination host.
3127                pub max_connections: i32,
3128                /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
3129                pub tcp_keepalive: SubsetsItemTrafficPolicyConnectionPoolTcpTcpKeepalive,
3130            }
3131
3132            /// Settings common to both HTTP and TCP upstream connections.
3133            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3134            #[serde(rename_all = "camelCase")]
3135            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPoolTcp {
3136                /// TCP connection timeout.
3137                pub connect_timeout: String,
3138                /// Maximum number of HTTP1 /TCP connections to a destination host.
3139                pub max_connections: i32,
3140                /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
3141                pub tcp_keepalive:
3142                    SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPoolTcpTcpKeepalive,
3143            }
3144
3145            /// Settings common to both HTTP and TCP upstream connections.
3146            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3147            #[serde(rename_all = "camelCase")]
3148            pub struct SpecTrafficPolicyConnectionPoolTcp {
3149                /// TCP connection timeout.
3150                pub connect_timeout: String,
3151                /// Maximum number of HTTP1 /TCP connections to a destination host.
3152                pub max_connections: i32,
3153                /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
3154                pub tcp_keepalive: SpecTrafficPolicyConnectionPoolTcpTcpKeepalive,
3155            }
3156
3157            /// Settings common to both HTTP and TCP upstream connections.
3158            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3159            #[serde(rename_all = "camelCase")]
3160            pub struct SpecTrafficPolicyPortLevelSettingsItemConnectionPoolTcp {
3161                /// TCP connection timeout.
3162                pub connect_timeout: String,
3163                /// Maximum number of HTTP1 /TCP connections to a destination host.
3164                pub max_connections: i32,
3165                /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
3166                pub tcp_keepalive:
3167                    SpecTrafficPolicyPortLevelSettingsItemConnectionPoolTcpTcpKeepalive,
3168            }
3169
3170            /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
3171            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3172            #[serde(rename_all = "camelCase")]
3173            pub struct SubsetsItemTrafficPolicyConnectionPoolTcpTcpKeepalive {
3174                /// The time duration between keep-alive probes.
3175                pub interval: String,
3176                pub probes: i64,
3177                pub time: String,
3178            }
3179
3180            /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
3181            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3182            #[serde(rename_all = "camelCase")]
3183            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemConnectionPoolTcpTcpKeepalive {
3184                /// The time duration between keep-alive probes.
3185                pub interval: String,
3186                pub probes: i64,
3187                pub time: String,
3188            }
3189
3190            /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
3191            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3192            #[serde(rename_all = "camelCase")]
3193            pub struct SpecTrafficPolicyConnectionPoolTcpTcpKeepalive {
3194                /// The time duration between keep-alive probes.
3195                pub interval: String,
3196                pub probes: i64,
3197                pub time: String,
3198            }
3199
3200            /// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
3201            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3202            #[serde(rename_all = "camelCase")]
3203            pub struct SpecTrafficPolicyPortLevelSettingsItemConnectionPoolTcpTcpKeepalive {
3204                /// The time duration between keep-alive probes.
3205                pub interval: String,
3206                pub probes: i64,
3207                pub time: String,
3208            }
3209
3210            /// TLS related settings for connections to the upstream service.
3211            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3212            #[serde(rename_all = "camelCase")]
3213            pub struct SubsetsItemTrafficPolicyTls {
3214                pub ca_certificates: String,
3215                /// REQUIRED if mode is `MUTUAL`.
3216                pub client_certificate: String,
3217                pub credential_name: String,
3218                pub insecure_skip_verify: Option<bool>,
3219                pub mode: String,
3220                /// REQUIRED if mode is `MUTUAL`.
3221                pub private_key: String,
3222                /// SNI string to present to the server during TLS handshake.
3223                pub sni: String,
3224                pub subject_alt_names: Vec<String>,
3225            }
3226
3227            /// TLS related settings for connections to the upstream service.
3228            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3229            #[serde(rename_all = "camelCase")]
3230            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemTls {
3231                pub ca_certificates: String,
3232                /// REQUIRED if mode is `MUTUAL`.
3233                pub client_certificate: String,
3234                pub credential_name: String,
3235                pub insecure_skip_verify: Option<bool>,
3236                pub mode: String,
3237                /// REQUIRED if mode is `MUTUAL`.
3238                pub private_key: String,
3239                /// SNI string to present to the server during TLS handshake.
3240                pub sni: String,
3241                pub subject_alt_names: Vec<String>,
3242            }
3243
3244            /// TLS related settings for connections to the upstream service.
3245            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3246            #[serde(rename_all = "camelCase")]
3247            pub struct SpecTrafficPolicyTls {
3248                pub ca_certificates: String,
3249                /// REQUIRED if mode is `MUTUAL`.
3250                pub client_certificate: String,
3251                pub credential_name: String,
3252                pub insecure_skip_verify: Option<bool>,
3253                pub mode: String,
3254                /// REQUIRED if mode is `MUTUAL`.
3255                pub private_key: String,
3256                /// SNI string to present to the server during TLS handshake.
3257                pub sni: String,
3258                pub subject_alt_names: Vec<String>,
3259            }
3260
3261            /// TLS related settings for connections to the upstream service.
3262            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3263            #[serde(rename_all = "camelCase")]
3264            pub struct SpecTrafficPolicyPortLevelSettingsItemTls {
3265                pub ca_certificates: String,
3266                /// REQUIRED if mode is `MUTUAL`.
3267                pub client_certificate: String,
3268                pub credential_name: String,
3269                pub insecure_skip_verify: Option<bool>,
3270                pub mode: String,
3271                /// REQUIRED if mode is `MUTUAL`.
3272                pub private_key: String,
3273                /// SNI string to present to the server during TLS handshake.
3274                pub sni: String,
3275                pub subject_alt_names: Vec<String>,
3276            }
3277
3278            /// Map of upstream localities to traffic distribution weights.
3279            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3280            #[serde(rename_all = "camelCase")]
3281            pub struct SubsetsItemTrafficPolicyLoadBalancerLocalityLbSettingDistributeItemTo {
3282                /// Map of upstream localities to traffic distribution weights.
3283                pub properties: std::collections::HashMap<String, i64>,
3284            }
3285
3286            /// Map of upstream localities to traffic distribution weights.
3287            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3288            #[serde(rename_all = "camelCase")]
3289            pub struct SubsetsItemTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItemTo
3290            {
3291                /// Map of upstream localities to traffic distribution weights.
3292                pub properties: std::collections::HashMap<String, i64>,
3293            }
3294
3295            /// Map of upstream localities to traffic distribution weights.
3296            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3297            #[serde(rename_all = "camelCase")]
3298            pub struct SpecTrafficPolicyLoadBalancerLocalityLbSettingDistributeItemTo {
3299                /// Map of upstream localities to traffic distribution weights.
3300                pub properties: std::collections::HashMap<String, i64>,
3301            }
3302
3303            /// Map of upstream localities to traffic distribution weights.
3304            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3305            #[serde(rename_all = "camelCase")]
3306            pub struct SpecTrafficPolicyPortLevelSettingsItemLoadBalancerLocalityLbSettingDistributeItemTo {
3307                /// Map of upstream localities to traffic distribution weights.
3308                pub properties: std::collections::HashMap<String, i64>,
3309            }
3310
3311            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3312            #[serde(rename_all = "camelCase")]
3313            pub struct SpecTrafficPolicy {
3314                pub connection_pool: SpecTrafficPolicyConnectionPool,
3315                /// Settings controlling the load balancer algorithms.
3316                pub load_balancer: SpecTrafficPolicyLoadBalancer,
3317                pub outlier_detection: SpecTrafficPolicyOutlierDetection,
3318                /// Traffic policies specific to individual ports.
3319                pub port_level_settings: Vec<SpecTrafficPolicyPortLevelSettingsItem>,
3320                /// TLS related settings for connections to the upstream service.
3321                pub tls: SpecTrafficPolicyTls,
3322                pub tunnel: SpecTrafficPolicyTunnel,
3323            }
3324
3325            /// Traffic policies that apply to this subset.
3326            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3327            #[serde(rename_all = "camelCase")]
3328            pub struct SubsetsItemTrafficPolicy {
3329                pub connection_pool: SubsetsItemTrafficPolicyConnectionPool,
3330                /// Settings controlling the load balancer algorithms.
3331                pub load_balancer: SubsetsItemTrafficPolicyLoadBalancer,
3332                pub outlier_detection: SubsetsItemTrafficPolicyOutlierDetection,
3333                /// Traffic policies specific to individual ports.
3334                pub port_level_settings: Vec<SubsetsItemTrafficPolicyPortLevelSettingsItem>,
3335                /// TLS related settings for connections to the upstream service.
3336                pub tls: SubsetsItemTrafficPolicyTls,
3337                pub tunnel: SubsetsItemTrafficPolicyTunnel,
3338            }
3339
3340            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3341            #[serde(rename_all = "camelCase")]
3342            pub struct SubsetsItemTrafficPolicyTunnel {
3343                /// Specifies which protocol to use for tunneling the downstream connection.
3344                pub protocol: String,
3345                /// Specifies a host to which the downstream connection is tunneled.
3346                pub target_host: String,
3347                /// Specifies a port to which the downstream connection is tunneled.
3348                pub target_port: i64,
3349            }
3350
3351            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3352            #[serde(rename_all = "camelCase")]
3353            pub struct SpecTrafficPolicyTunnel {
3354                /// Specifies which protocol to use for tunneling the downstream connection.
3355                pub protocol: String,
3356                /// Specifies a host to which the downstream connection is tunneled.
3357                pub target_host: String,
3358                /// Specifies a port to which the downstream connection is tunneled.
3359                pub target_port: i64,
3360            }
3361
3362            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3363            #[serde(rename_all = "camelCase")]
3364            pub struct WorkloadSelector {
3365                pub match_labels: MatchLabels,
3366            }
3367        }
3368        pub mod gateway {
3369            #[derive(serde::Deserialize, Debug, PartialEq)]
3370            pub struct Gateway {
3371                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
3372                pub spec: Spec,
3373                pub status: Status,
3374            }
3375
3376            impl k8s_openapi::Resource for Gateway {
3377                type Scope = k8s_openapi::ClusterResourceScope;
3378
3379                const API_VERSION: &'static str = "networking.istio.io/v1beta1";
3380                const GROUP: &'static str = "networking.istio.io";
3381                const KIND: &'static str = "Gateway";
3382                const VERSION: &'static str = "v1beta1";
3383                const URL_PATH_SEGMENT: &'static str = "TODO";
3384            }
3385
3386            impl k8s_openapi::Metadata for Gateway {
3387                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
3388
3389                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
3390                    &self.metadata
3391                }
3392
3393                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
3394                    &mut self.metadata
3395                }
3396            }
3397
3398            impl serde::Serialize for Gateway {
3399                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3400                where
3401                    S: serde::Serializer,
3402                {
3403                    use serde::ser::SerializeStruct;
3404                    let mut state = serializer.serialize_struct("Gateway", 5)?;
3405                    state.serialize_field(
3406                        "apiVersion",
3407                        <Self as k8s_openapi::Resource>::API_VERSION,
3408                    )?;
3409                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
3410                    state.serialize_field("metadata", &self.metadata)?;
3411                    state.serialize_field("spec", &self.spec)?;
3412                    state.serialize_field("status", &self.status)?;
3413                    state.end()
3414                }
3415            }
3416
3417            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3418            #[serde(rename_all = "camelCase")]
3419            pub struct Port {
3420                /// Label assigned to the port.
3421                pub name: String,
3422                /// A valid non-negative integer port number.
3423                pub number: i64,
3424                /// The protocol exposed on the port.
3425                pub protocol: String,
3426                pub target_port: i64,
3427            }
3428
3429            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3430            #[serde(rename_all = "camelCase")]
3431            pub struct Selector {
3432                pub properties: std::collections::HashMap<String, String>,
3433            }
3434
3435            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3436            #[serde(rename_all = "camelCase")]
3437            pub struct ServersItem {
3438                pub bind: String,
3439                pub default_endpoint: String,
3440                /// One or more hosts exposed by this gateway.
3441                pub hosts: Vec<String>,
3442                /// An optional name of the server, when set must be unique across all servers.
3443                pub name: String,
3444                pub port: Port,
3445                /// Set of TLS related options that govern the server's behavior.
3446                pub tls: Tls,
3447            }
3448
3449            /// Configuration affecting edge load balancer. See more details at: https://istio.io/docs/reference/config/networking/gateway.html
3450            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3451            #[serde(rename_all = "camelCase")]
3452            pub struct Spec {
3453                pub selector: Selector,
3454                /// A list of server specifications.
3455                pub servers: Vec<ServersItem>,
3456            }
3457
3458            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3459            #[serde(rename_all = "camelCase")]
3460            pub struct Status {
3461                pub properties: serde_json::Map<String, serde_json::Value>,
3462            }
3463
3464            /// Set of TLS related options that govern the server's behavior.
3465            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3466            #[serde(rename_all = "camelCase")]
3467            pub struct Tls {
3468                /// REQUIRED if mode is `MUTUAL`.
3469                pub ca_certificates: String,
3470                /// Optional: If specified, only support the specified cipher list.
3471                pub cipher_suites: Vec<String>,
3472                pub credential_name: String,
3473                pub https_redirect: bool,
3474                /// Optional: Maximum TLS protocol version.
3475                pub max_protocol_version: String,
3476                /// Optional: Minimum TLS protocol version.
3477                pub min_protocol_version: String,
3478                pub mode: String,
3479                /// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
3480                pub private_key: String,
3481                /// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
3482                pub server_certificate: String,
3483                pub subject_alt_names: Vec<String>,
3484                pub verify_certificate_hash: Vec<String>,
3485                pub verify_certificate_spki: Vec<String>,
3486            }
3487        }
3488        pub mod proxy_config {
3489            #[derive(serde::Deserialize, Debug, PartialEq)]
3490            pub struct ProxyConfig {
3491                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
3492                pub spec: Spec,
3493                pub status: Status,
3494            }
3495
3496            impl k8s_openapi::Resource for ProxyConfig {
3497                type Scope = k8s_openapi::ClusterResourceScope;
3498
3499                const API_VERSION: &'static str = "networking.istio.io/v1beta1";
3500                const GROUP: &'static str = "networking.istio.io";
3501                const KIND: &'static str = "ProxyConfig";
3502                const VERSION: &'static str = "v1beta1";
3503                const URL_PATH_SEGMENT: &'static str = "TODO";
3504            }
3505
3506            impl k8s_openapi::Metadata for ProxyConfig {
3507                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
3508
3509                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
3510                    &self.metadata
3511                }
3512
3513                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
3514                    &mut self.metadata
3515                }
3516            }
3517
3518            impl serde::Serialize for ProxyConfig {
3519                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3520                where
3521                    S: serde::Serializer,
3522                {
3523                    use serde::ser::SerializeStruct;
3524                    let mut state = serializer.serialize_struct("ProxyConfig", 5)?;
3525                    state.serialize_field(
3526                        "apiVersion",
3527                        <Self as k8s_openapi::Resource>::API_VERSION,
3528                    )?;
3529                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
3530                    state.serialize_field("metadata", &self.metadata)?;
3531                    state.serialize_field("spec", &self.spec)?;
3532                    state.serialize_field("status", &self.status)?;
3533                    state.end()
3534                }
3535            }
3536
3537            /// Additional environment variables for the proxy.
3538            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3539            #[serde(rename_all = "camelCase")]
3540            pub struct EnvironmentVariables {
3541                /// Additional environment variables for the proxy.
3542                pub properties: std::collections::HashMap<String, String>,
3543            }
3544
3545            /// Specifies the details of the proxy image.
3546            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3547            #[serde(rename_all = "camelCase")]
3548            pub struct Image {
3549                /// The image type of the image.
3550                pub image_type: String,
3551            }
3552
3553            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3554            #[serde(rename_all = "camelCase")]
3555            pub struct MatchLabels {
3556                pub properties: std::collections::HashMap<String, String>,
3557            }
3558
3559            /// Optional.
3560            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3561            #[serde(rename_all = "camelCase")]
3562            pub struct Selector {
3563                pub match_labels: MatchLabels,
3564            }
3565
3566            /// Provides configuration for individual workloads. See more details at: https://istio.io/docs/reference/config/networking/proxy-config.html
3567            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3568            #[serde(rename_all = "camelCase")]
3569            pub struct Spec {
3570                /// The number of worker threads to run.
3571                pub concurrency: Option<i64>,
3572                /// Additional environment variables for the proxy.
3573                pub environment_variables: EnvironmentVariables,
3574                /// Specifies the details of the proxy image.
3575                pub image: Image,
3576                /// Optional.
3577                pub selector: Selector,
3578            }
3579
3580            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3581            #[serde(rename_all = "camelCase")]
3582            pub struct Status {
3583                pub properties: serde_json::Map<String, serde_json::Value>,
3584            }
3585        }
3586        pub mod service_entry {
3587            #[derive(serde::Deserialize, Debug, PartialEq)]
3588            pub struct ServiceEntry {
3589                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
3590                pub spec: Spec,
3591                pub status: Status,
3592            }
3593
3594            impl k8s_openapi::Resource for ServiceEntry {
3595                type Scope = k8s_openapi::ClusterResourceScope;
3596
3597                const API_VERSION: &'static str = "networking.istio.io/v1beta1";
3598                const GROUP: &'static str = "networking.istio.io";
3599                const KIND: &'static str = "ServiceEntry";
3600                const VERSION: &'static str = "v1beta1";
3601                const URL_PATH_SEGMENT: &'static str = "TODO";
3602            }
3603
3604            impl k8s_openapi::Metadata for ServiceEntry {
3605                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
3606
3607                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
3608                    &self.metadata
3609                }
3610
3611                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
3612                    &mut self.metadata
3613                }
3614            }
3615
3616            impl serde::Serialize for ServiceEntry {
3617                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3618                where
3619                    S: serde::Serializer,
3620                {
3621                    use serde::ser::SerializeStruct;
3622                    let mut state = serializer.serialize_struct("ServiceEntry", 5)?;
3623                    state.serialize_field(
3624                        "apiVersion",
3625                        <Self as k8s_openapi::Resource>::API_VERSION,
3626                    )?;
3627                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
3628                    state.serialize_field("metadata", &self.metadata)?;
3629                    state.serialize_field("spec", &self.spec)?;
3630                    state.serialize_field("status", &self.status)?;
3631                    state.end()
3632                }
3633            }
3634
3635            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3636            #[serde(rename_all = "camelCase")]
3637            pub struct EndpointsItem {
3638                pub address: String,
3639                /// One or more labels associated with the endpoint.
3640                pub labels: EndpointsItemLabels,
3641                /// The locality associated with the endpoint.
3642                pub locality: String,
3643                pub network: String,
3644                /// Set of ports associated with the endpoint.
3645                pub ports: Ports,
3646                pub service_account: String,
3647                /// The load balancing weight associated with the endpoint.
3648                pub weight: i64,
3649            }
3650
3651            /// One or more labels associated with the endpoint.
3652            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3653            #[serde(rename_all = "camelCase")]
3654            pub struct EndpointsItemLabels {
3655                /// One or more labels associated with the endpoint.
3656                pub properties: std::collections::HashMap<String, String>,
3657            }
3658
3659            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3660            #[serde(rename_all = "camelCase")]
3661            pub struct WorkloadSelectorLabels {
3662                pub properties: std::collections::HashMap<String, String>,
3663            }
3664
3665            /// Set of ports associated with the endpoint.
3666            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3667            #[serde(rename_all = "camelCase")]
3668            pub struct Ports {
3669                /// Set of ports associated with the endpoint.
3670                pub properties: std::collections::HashMap<String, i64>,
3671            }
3672
3673            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3674            #[serde(rename_all = "camelCase")]
3675            pub struct PortsItem {
3676                /// Label assigned to the port.
3677                pub name: String,
3678                /// A valid non-negative integer port number.
3679                pub number: i64,
3680                /// The protocol exposed on the port.
3681                pub protocol: String,
3682                pub target_port: i64,
3683            }
3684
3685            /// Configuration affecting service registry. See more details at: https://istio.io/docs/reference/config/networking/service-entry.html
3686            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3687            #[serde(rename_all = "camelCase")]
3688            pub struct Spec {
3689                /// The virtual IP addresses associated with the service.
3690                pub addresses: Vec<String>,
3691                /// One or more endpoints associated with the service.
3692                pub endpoints: Vec<EndpointsItem>,
3693                /// A list of namespaces to which this service is exported.
3694                pub export_to: Vec<String>,
3695                /// The hosts associated with the ServiceEntry.
3696                pub hosts: Vec<String>,
3697                pub location: String,
3698                /// The ports associated with the external service.
3699                pub ports: Vec<PortsItem>,
3700                /// Service discovery mode for the hosts.
3701                pub resolution: String,
3702                pub subject_alt_names: Vec<String>,
3703                /// Applicable only for MESH_INTERNAL services.
3704                pub workload_selector: WorkloadSelector,
3705            }
3706
3707            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3708            #[serde(rename_all = "camelCase")]
3709            pub struct Status {
3710                pub properties: serde_json::Map<String, serde_json::Value>,
3711            }
3712
3713            /// Applicable only for MESH_INTERNAL services.
3714            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3715            #[serde(rename_all = "camelCase")]
3716            pub struct WorkloadSelector {
3717                pub labels: WorkloadSelectorLabels,
3718            }
3719        }
3720        pub mod sidecar {
3721            #[derive(serde::Deserialize, Debug, PartialEq)]
3722            pub struct Sidecar {
3723                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
3724                pub spec: Spec,
3725                pub status: Status,
3726            }
3727
3728            impl k8s_openapi::Resource for Sidecar {
3729                type Scope = k8s_openapi::ClusterResourceScope;
3730
3731                const API_VERSION: &'static str = "networking.istio.io/v1beta1";
3732                const GROUP: &'static str = "networking.istio.io";
3733                const KIND: &'static str = "Sidecar";
3734                const VERSION: &'static str = "v1beta1";
3735                const URL_PATH_SEGMENT: &'static str = "TODO";
3736            }
3737
3738            impl k8s_openapi::Metadata for Sidecar {
3739                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
3740
3741                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
3742                    &self.metadata
3743                }
3744
3745                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
3746                    &mut self.metadata
3747                }
3748            }
3749
3750            impl serde::Serialize for Sidecar {
3751                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3752                where
3753                    S: serde::Serializer,
3754                {
3755                    use serde::ser::SerializeStruct;
3756                    let mut state = serializer.serialize_struct("Sidecar", 5)?;
3757                    state.serialize_field(
3758                        "apiVersion",
3759                        <Self as k8s_openapi::Resource>::API_VERSION,
3760                    )?;
3761                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
3762                    state.serialize_field("metadata", &self.metadata)?;
3763                    state.serialize_field("spec", &self.spec)?;
3764                    state.serialize_field("status", &self.status)?;
3765                    state.end()
3766                }
3767            }
3768
3769            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3770            #[serde(rename_all = "camelCase")]
3771            pub struct EgressItem {
3772                pub bind: String,
3773                pub capture_mode: String,
3774                pub hosts: Vec<String>,
3775                /// The port associated with the listener.
3776                pub port: EgressItemPort,
3777            }
3778
3779            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3780            #[serde(rename_all = "camelCase")]
3781            pub struct EgressProxy {
3782                /// The name of a service from the service registry.
3783                pub host: String,
3784                /// Specifies the port on the host that is being addressed.
3785                pub port: EgressProxyPort,
3786                /// The name of a subset within the service.
3787                pub subset: String,
3788            }
3789
3790            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3791            #[serde(rename_all = "camelCase")]
3792            pub struct IngressItem {
3793                /// The IP to which the listener should be bound.
3794                pub bind: String,
3795                pub capture_mode: String,
3796                pub default_endpoint: String,
3797                /// The port associated with the listener.
3798                pub port: IngressItemPort,
3799                pub tls: Tls,
3800            }
3801
3802            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3803            #[serde(rename_all = "camelCase")]
3804            pub struct Labels {
3805                pub properties: std::collections::HashMap<String, String>,
3806            }
3807
3808            /// Configuration for the outbound traffic policy.
3809            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3810            #[serde(rename_all = "camelCase")]
3811            pub struct OutboundTrafficPolicy {
3812                pub egress_proxy: EgressProxy,
3813                pub mode: String,
3814            }
3815
3816            /// The port associated with the listener.
3817            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3818            #[serde(rename_all = "camelCase")]
3819            pub struct EgressItemPort {
3820                /// Label assigned to the port.
3821                pub name: String,
3822                /// A valid non-negative integer port number.
3823                pub number: i64,
3824                /// The protocol exposed on the port.
3825                pub protocol: String,
3826                pub target_port: i64,
3827            }
3828
3829            /// The port associated with the listener.
3830            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3831            #[serde(rename_all = "camelCase")]
3832            pub struct IngressItemPort {
3833                /// Label assigned to the port.
3834                pub name: String,
3835                /// A valid non-negative integer port number.
3836                pub number: i64,
3837                /// The protocol exposed on the port.
3838                pub protocol: String,
3839                pub target_port: i64,
3840            }
3841
3842            /// Specifies the port on the host that is being addressed.
3843            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3844            #[serde(rename_all = "camelCase")]
3845            pub struct EgressProxyPort {
3846                pub number: i64,
3847            }
3848
3849            /// Configuration affecting network reachability of a sidecar. See more details at: https://istio.io/docs/reference/config/networking/sidecar.html
3850            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3851            #[serde(rename_all = "camelCase")]
3852            pub struct Spec {
3853                pub egress: Vec<EgressItem>,
3854                pub ingress: Vec<IngressItem>,
3855                /// Configuration for the outbound traffic policy.
3856                pub outbound_traffic_policy: OutboundTrafficPolicy,
3857                pub workload_selector: WorkloadSelector,
3858            }
3859
3860            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3861            #[serde(rename_all = "camelCase")]
3862            pub struct Status {
3863                pub properties: serde_json::Map<String, serde_json::Value>,
3864            }
3865
3866            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3867            #[serde(rename_all = "camelCase")]
3868            pub struct Tls {
3869                /// REQUIRED if mode is `MUTUAL`.
3870                pub ca_certificates: String,
3871                /// Optional: If specified, only support the specified cipher list.
3872                pub cipher_suites: Vec<String>,
3873                pub credential_name: String,
3874                pub https_redirect: bool,
3875                /// Optional: Maximum TLS protocol version.
3876                pub max_protocol_version: String,
3877                /// Optional: Minimum TLS protocol version.
3878                pub min_protocol_version: String,
3879                pub mode: String,
3880                /// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
3881                pub private_key: String,
3882                /// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
3883                pub server_certificate: String,
3884                pub subject_alt_names: Vec<String>,
3885                pub verify_certificate_hash: Vec<String>,
3886                pub verify_certificate_spki: Vec<String>,
3887            }
3888
3889            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3890            #[serde(rename_all = "camelCase")]
3891            pub struct WorkloadSelector {
3892                pub labels: Labels,
3893            }
3894        }
3895        pub mod virtual_service {
3896            #[derive(serde::Deserialize, Debug, PartialEq)]
3897            pub struct VirtualService {
3898                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
3899                pub spec: Spec,
3900                pub status: Status,
3901            }
3902
3903            impl k8s_openapi::Resource for VirtualService {
3904                type Scope = k8s_openapi::ClusterResourceScope;
3905
3906                const API_VERSION: &'static str = "networking.istio.io/v1beta1";
3907                const GROUP: &'static str = "networking.istio.io";
3908                const KIND: &'static str = "VirtualService";
3909                const VERSION: &'static str = "v1beta1";
3910                const URL_PATH_SEGMENT: &'static str = "TODO";
3911            }
3912
3913            impl k8s_openapi::Metadata for VirtualService {
3914                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
3915
3916                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
3917                    &self.metadata
3918                }
3919
3920                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
3921                    &mut self.metadata
3922                }
3923            }
3924
3925            impl serde::Serialize for VirtualService {
3926                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
3927                where
3928                    S: serde::Serializer,
3929                {
3930                    use serde::ser::SerializeStruct;
3931                    let mut state = serializer.serialize_struct("VirtualService", 5)?;
3932                    state.serialize_field(
3933                        "apiVersion",
3934                        <Self as k8s_openapi::Resource>::API_VERSION,
3935                    )?;
3936                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
3937                    state.serialize_field("metadata", &self.metadata)?;
3938                    state.serialize_field("spec", &self.spec)?;
3939                    state.serialize_field("status", &self.status)?;
3940                    state.end()
3941                }
3942            }
3943
3944            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3945            #[serde(rename_all = "camelCase")]
3946            pub struct Abort {
3947                /// GRPC status code to use to abort the request.
3948                pub grpc_status: String,
3949                pub http2_error: String,
3950                /// HTTP status code to use to abort the Http request.
3951                pub http_status: i32,
3952                /// Percentage of requests to be aborted with the error code provided.
3953                pub percentage: AbortPercentage,
3954            }
3955
3956            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3957            #[serde(rename_all = "camelCase")]
3958            pub struct HttpItemHeadersRequestAdd {
3959                pub properties: std::collections::HashMap<String, String>,
3960            }
3961
3962            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3963            #[serde(rename_all = "camelCase")]
3964            pub struct HttpItemHeadersResponseAdd {
3965                pub properties: std::collections::HashMap<String, String>,
3966            }
3967
3968            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3969            #[serde(rename_all = "camelCase")]
3970            pub struct RouteItemHeadersRequestAdd {
3971                pub properties: std::collections::HashMap<String, String>,
3972            }
3973
3974            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3975            #[serde(rename_all = "camelCase")]
3976            pub struct RouteItemHeadersResponseAdd {
3977                pub properties: std::collections::HashMap<String, String>,
3978            }
3979
3980            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3981            #[serde(rename_all = "camelCase")]
3982            pub struct AllowOriginsItem {
3983                pub exact: String,
3984                pub prefix: String,
3985                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
3986                pub regex: String,
3987            }
3988
3989            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
3990            #[serde(rename_all = "camelCase")]
3991            pub struct Authority {
3992                pub exact: String,
3993                pub prefix: String,
3994                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
3995                pub regex: String,
3996            }
3997
3998            /// Cross-Origin Resource Sharing policy (CORS).
3999            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4000            #[serde(rename_all = "camelCase")]
4001            pub struct CorsPolicy {
4002                pub allow_credentials: Option<bool>,
4003                pub allow_headers: Vec<String>,
4004                /// List of HTTP methods allowed to access the resource.
4005                pub allow_methods: Vec<String>,
4006                /// The list of origins that are allowed to perform CORS requests.
4007                pub allow_origin: Vec<String>,
4008                /// String patterns that match allowed origins.
4009                pub allow_origins: Vec<AllowOriginsItem>,
4010                pub expose_headers: Vec<String>,
4011                pub max_age: String,
4012            }
4013
4014            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4015            #[serde(rename_all = "camelCase")]
4016            pub struct Delay {
4017                pub exponential_delay: String,
4018                /// Add a fixed delay before forwarding the request.
4019                pub fixed_delay: String,
4020                /// Percentage of requests on which the delay will be injected (0-100).
4021                pub percent: i32,
4022                /// Percentage of requests on which the delay will be injected.
4023                pub percentage: DelayPercentage,
4024            }
4025
4026            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4027            #[serde(rename_all = "camelCase")]
4028            pub struct Delegate {
4029                /// Name specifies the name of the delegate VirtualService.
4030                pub name: String,
4031                /// Namespace specifies the namespace where the delegate VirtualService resides.
4032                pub namespace: String,
4033            }
4034
4035            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4036            #[serde(rename_all = "camelCase")]
4037            pub struct HttpItemRouteItemDestination {
4038                /// The name of a service from the service registry.
4039                pub host: String,
4040                /// Specifies the port on the host that is being addressed.
4041                pub port: HttpItemRouteItemDestinationPort,
4042                /// The name of a subset within the service.
4043                pub subset: String,
4044            }
4045
4046            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4047            #[serde(rename_all = "camelCase")]
4048            pub struct TcpItemRouteItemDestination {
4049                /// The name of a service from the service registry.
4050                pub host: String,
4051                /// Specifies the port on the host that is being addressed.
4052                pub port: TcpItemRouteItemDestinationPort,
4053                /// The name of a subset within the service.
4054                pub subset: String,
4055            }
4056
4057            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4058            #[serde(rename_all = "camelCase")]
4059            pub struct TlsItemRouteItemDestination {
4060                /// The name of a service from the service registry.
4061                pub host: String,
4062                /// Specifies the port on the host that is being addressed.
4063                pub port: TlsItemRouteItemDestinationPort,
4064                /// The name of a subset within the service.
4065                pub subset: String,
4066            }
4067
4068            /// Fault injection policy to apply on HTTP traffic at the client side.
4069            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4070            #[serde(rename_all = "camelCase")]
4071            pub struct Fault {
4072                pub abort: Abort,
4073                pub delay: Delay,
4074            }
4075
4076            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4077            #[serde(rename_all = "camelCase")]
4078            pub struct HttpItemHeaders {
4079                pub request: HttpItemHeadersRequest,
4080                pub response: HttpItemHeadersResponse,
4081            }
4082
4083            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4084            #[serde(rename_all = "camelCase")]
4085            pub struct MatchItemHeaders {
4086                pub properties: std::collections::HashMap<String, HeadersValue>,
4087            }
4088
4089            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4090            #[serde(rename_all = "camelCase")]
4091            pub struct RouteItemHeaders {
4092                pub request: RouteItemHeadersRequest,
4093                pub response: RouteItemHeadersResponse,
4094            }
4095
4096            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4097            #[serde(rename_all = "camelCase")]
4098            pub struct HttpItem {
4099                /// Cross-Origin Resource Sharing policy (CORS).
4100                pub cors_policy: CorsPolicy,
4101                pub delegate: Delegate,
4102                /// Fault injection policy to apply on HTTP traffic at the client side.
4103                pub fault: Fault,
4104                pub headers: HttpItemHeaders,
4105                pub r#match: Vec<HttpItemMatchItem>,
4106                pub mirror: Mirror,
4107                /// Percentage of the traffic to be mirrored by the `mirror` field.
4108                pub mirror_percent: Option<i64>,
4109                /// Percentage of the traffic to be mirrored by the `mirror` field.
4110                pub mirror_percentage: MirrorPercentage,
4111                /// The name assigned to the route for debugging purposes.
4112                pub name: String,
4113                /// A HTTP rule can either redirect or forward (default) traffic.
4114                pub redirect: Redirect,
4115                /// Retry policy for HTTP requests.
4116                pub retries: Retries,
4117                /// Rewrite HTTP URIs and Authority headers.
4118                pub rewrite: Rewrite,
4119                /// A HTTP rule can either redirect or forward (default) traffic.
4120                pub route: Vec<HttpItemRouteItem>,
4121                /// Timeout for HTTP requests, default is disabled.
4122                pub timeout: String,
4123            }
4124
4125            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4126            #[serde(rename_all = "camelCase")]
4127            pub struct HttpItemMatchItem {
4128                pub authority: Authority,
4129                /// Names of gateways where the rule should be applied.
4130                pub gateways: Vec<String>,
4131                pub headers: MatchItemHeaders,
4132                /// Flag to specify whether the URI matching should be case-insensitive.
4133                pub ignore_uri_case: bool,
4134                pub method: Method,
4135                /// The name assigned to a match.
4136                pub name: String,
4137                /// Specifies the ports on the host that is being addressed.
4138                pub port: i64,
4139                /// Query parameters for matching.
4140                pub query_params: QueryParams,
4141                pub scheme: Scheme,
4142                pub source_labels: HttpItemMatchItemSourceLabels,
4143                /// Source namespace constraining the applicability of a rule to workloads in that namespace.
4144                pub source_namespace: String,
4145                pub uri: Uri,
4146                /// withoutHeader has the same syntax with the header, but has opposite meaning.
4147                pub without_headers: WithoutHeaders,
4148            }
4149
4150            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4151            #[serde(rename_all = "camelCase")]
4152            pub struct TcpItemMatchItem {
4153                /// IPv4 or IPv6 ip addresses of destination with optional subnet.
4154                pub destination_subnets: Vec<String>,
4155                /// Names of gateways where the rule should be applied.
4156                pub gateways: Vec<String>,
4157                /// Specifies the port on the host that is being addressed.
4158                pub port: i64,
4159                pub source_labels: TcpItemMatchItemSourceLabels,
4160                /// Source namespace constraining the applicability of a rule to workloads in that namespace.
4161                pub source_namespace: String,
4162                /// IPv4 or IPv6 ip address of source with optional subnet.
4163                pub source_subnet: String,
4164            }
4165
4166            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4167            #[serde(rename_all = "camelCase")]
4168            pub struct TlsItemMatchItem {
4169                /// IPv4 or IPv6 ip addresses of destination with optional subnet.
4170                pub destination_subnets: Vec<String>,
4171                /// Names of gateways where the rule should be applied.
4172                pub gateways: Vec<String>,
4173                /// Specifies the port on the host that is being addressed.
4174                pub port: i64,
4175                /// SNI (server name indicator) to match on.
4176                pub sni_hosts: Vec<String>,
4177                pub source_labels: TlsItemMatchItemSourceLabels,
4178                /// Source namespace constraining the applicability of a rule to workloads in that namespace.
4179                pub source_namespace: String,
4180            }
4181
4182            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4183            #[serde(rename_all = "camelCase")]
4184            pub struct Method {
4185                pub exact: String,
4186                pub prefix: String,
4187                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
4188                pub regex: String,
4189            }
4190
4191            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4192            #[serde(rename_all = "camelCase")]
4193            pub struct Mirror {
4194                /// The name of a service from the service registry.
4195                pub host: String,
4196                /// Specifies the port on the host that is being addressed.
4197                pub port: MirrorPort,
4198                /// The name of a subset within the service.
4199                pub subset: String,
4200            }
4201
4202            /// Percentage of the traffic to be mirrored by the `mirror` field.
4203            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4204            #[serde(rename_all = "camelCase")]
4205            pub struct MirrorPercentage {
4206                pub value: f64,
4207            }
4208
4209            /// Percentage of requests to be aborted with the error code provided.
4210            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4211            #[serde(rename_all = "camelCase")]
4212            pub struct AbortPercentage {
4213                pub value: f64,
4214            }
4215
4216            /// Percentage of requests on which the delay will be injected.
4217            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4218            #[serde(rename_all = "camelCase")]
4219            pub struct DelayPercentage {
4220                pub value: f64,
4221            }
4222
4223            /// Specifies the port on the host that is being addressed.
4224            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4225            #[serde(rename_all = "camelCase")]
4226            pub struct MirrorPort {
4227                pub number: i64,
4228            }
4229
4230            /// Specifies the port on the host that is being addressed.
4231            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4232            #[serde(rename_all = "camelCase")]
4233            pub struct HttpItemRouteItemDestinationPort {
4234                pub number: i64,
4235            }
4236
4237            /// Specifies the port on the host that is being addressed.
4238            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4239            #[serde(rename_all = "camelCase")]
4240            pub struct TcpItemRouteItemDestinationPort {
4241                pub number: i64,
4242            }
4243
4244            /// Specifies the port on the host that is being addressed.
4245            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4246            #[serde(rename_all = "camelCase")]
4247            pub struct TlsItemRouteItemDestinationPort {
4248                pub number: i64,
4249            }
4250
4251            /// Query parameters for matching.
4252            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4253            #[serde(rename_all = "camelCase")]
4254            pub struct QueryParams {
4255                /// Query parameters for matching.
4256                pub properties: std::collections::HashMap<String, QueryParamsValue>,
4257            }
4258
4259            /// A HTTP rule can either redirect or forward (default) traffic.
4260            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4261            #[serde(rename_all = "camelCase")]
4262            pub struct Redirect {
4263                pub authority: String,
4264                pub derive_port: String,
4265                /// On a redirect, overwrite the port portion of the URL with this value.
4266                pub port: i64,
4267                pub redirect_code: i64,
4268                /// On a redirect, overwrite the scheme portion of the URL with this value.
4269                pub scheme: String,
4270                pub uri: String,
4271            }
4272
4273            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4274            #[serde(rename_all = "camelCase")]
4275            pub struct HttpItemHeadersRequest {
4276                pub add: HttpItemHeadersRequestAdd,
4277                pub remove: Vec<String>,
4278                pub set: HttpItemHeadersRequestSet,
4279            }
4280
4281            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4282            #[serde(rename_all = "camelCase")]
4283            pub struct RouteItemHeadersRequest {
4284                pub add: RouteItemHeadersRequestAdd,
4285                pub remove: Vec<String>,
4286                pub set: RouteItemHeadersRequestSet,
4287            }
4288
4289            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4290            #[serde(rename_all = "camelCase")]
4291            pub struct HttpItemHeadersResponse {
4292                pub add: HttpItemHeadersResponseAdd,
4293                pub remove: Vec<String>,
4294                pub set: HttpItemHeadersResponseSet,
4295            }
4296
4297            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4298            #[serde(rename_all = "camelCase")]
4299            pub struct RouteItemHeadersResponse {
4300                pub add: RouteItemHeadersResponseAdd,
4301                pub remove: Vec<String>,
4302                pub set: RouteItemHeadersResponseSet,
4303            }
4304
4305            /// Retry policy for HTTP requests.
4306            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4307            #[serde(rename_all = "camelCase")]
4308            pub struct Retries {
4309                /// Number of retries to be allowed for a given request.
4310                pub attempts: i32,
4311                /// Timeout per attempt for a given request, including the initial call and any retries.
4312                pub per_try_timeout: String,
4313                /// Specifies the conditions under which retry takes place.
4314                pub retry_on: String,
4315                /// Flag to specify whether the retries should retry to other localities.
4316                pub retry_remote_localities: Option<bool>,
4317            }
4318
4319            /// Rewrite HTTP URIs and Authority headers.
4320            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4321            #[serde(rename_all = "camelCase")]
4322            pub struct Rewrite {
4323                /// rewrite the Authority/Host header with this value.
4324                pub authority: String,
4325                pub uri: String,
4326            }
4327
4328            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4329            #[serde(rename_all = "camelCase")]
4330            pub struct HttpItemRouteItem {
4331                pub destination: HttpItemRouteItemDestination,
4332                pub headers: RouteItemHeaders,
4333                /// Weight specifies the relative proportion of traffic to be forwarded to the destination.
4334                pub weight: i32,
4335            }
4336
4337            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4338            #[serde(rename_all = "camelCase")]
4339            pub struct TcpItemRouteItem {
4340                pub destination: TcpItemRouteItemDestination,
4341                /// Weight specifies the relative proportion of traffic to be forwarded to the destination.
4342                pub weight: i32,
4343            }
4344
4345            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4346            #[serde(rename_all = "camelCase")]
4347            pub struct TlsItemRouteItem {
4348                pub destination: TlsItemRouteItemDestination,
4349                /// Weight specifies the relative proportion of traffic to be forwarded to the destination.
4350                pub weight: i32,
4351            }
4352
4353            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4354            #[serde(rename_all = "camelCase")]
4355            pub struct Scheme {
4356                pub exact: String,
4357                pub prefix: String,
4358                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
4359                pub regex: String,
4360            }
4361
4362            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4363            #[serde(rename_all = "camelCase")]
4364            pub struct HttpItemHeadersRequestSet {
4365                pub properties: std::collections::HashMap<String, String>,
4366            }
4367
4368            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4369            #[serde(rename_all = "camelCase")]
4370            pub struct HttpItemHeadersResponseSet {
4371                pub properties: std::collections::HashMap<String, String>,
4372            }
4373
4374            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4375            #[serde(rename_all = "camelCase")]
4376            pub struct RouteItemHeadersRequestSet {
4377                pub properties: std::collections::HashMap<String, String>,
4378            }
4379
4380            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4381            #[serde(rename_all = "camelCase")]
4382            pub struct RouteItemHeadersResponseSet {
4383                pub properties: std::collections::HashMap<String, String>,
4384            }
4385
4386            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4387            #[serde(rename_all = "camelCase")]
4388            pub struct HttpItemMatchItemSourceLabels {
4389                pub properties: std::collections::HashMap<String, String>,
4390            }
4391
4392            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4393            #[serde(rename_all = "camelCase")]
4394            pub struct TcpItemMatchItemSourceLabels {
4395                pub properties: std::collections::HashMap<String, String>,
4396            }
4397
4398            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4399            #[serde(rename_all = "camelCase")]
4400            pub struct TlsItemMatchItemSourceLabels {
4401                pub properties: std::collections::HashMap<String, String>,
4402            }
4403
4404            /// Configuration affecting label/content routing, sni routing, etc. See more details at: https://istio.io/docs/reference/config/networking/virtual-service.html
4405            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4406            #[serde(rename_all = "camelCase")]
4407            pub struct Spec {
4408                /// A list of namespaces to which this virtual service is exported.
4409                pub export_to: Vec<String>,
4410                /// The names of gateways and sidecars that should apply these routes.
4411                pub gateways: Vec<String>,
4412                /// The destination hosts to which traffic is being sent.
4413                pub hosts: Vec<String>,
4414                /// An ordered list of route rules for HTTP traffic.
4415                pub http: Vec<HttpItem>,
4416                /// An ordered list of route rules for opaque TCP traffic.
4417                pub tcp: Vec<TcpItem>,
4418                pub tls: Vec<TlsItem>,
4419            }
4420
4421            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4422            #[serde(rename_all = "camelCase")]
4423            pub struct Status {
4424                pub properties: serde_json::Map<String, serde_json::Value>,
4425            }
4426
4427            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4428            #[serde(rename_all = "camelCase")]
4429            pub struct TcpItem {
4430                pub r#match: Vec<TcpItemMatchItem>,
4431                /// The destination to which the connection should be forwarded to.
4432                pub route: Vec<TcpItemRouteItem>,
4433            }
4434
4435            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4436            #[serde(rename_all = "camelCase")]
4437            pub struct TlsItem {
4438                pub r#match: Vec<TlsItemMatchItem>,
4439                /// The destination to which the connection should be forwarded to.
4440                pub route: Vec<TlsItemRouteItem>,
4441            }
4442
4443            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4444            #[serde(rename_all = "camelCase")]
4445            pub struct Uri {
4446                pub exact: String,
4447                pub prefix: String,
4448                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
4449                pub regex: String,
4450            }
4451
4452            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4453            #[serde(rename_all = "camelCase")]
4454            pub struct HeadersValue {
4455                pub exact: String,
4456                pub prefix: String,
4457                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
4458                pub regex: String,
4459            }
4460
4461            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4462            #[serde(rename_all = "camelCase")]
4463            pub struct QueryParamsValue {
4464                pub exact: String,
4465                pub prefix: String,
4466                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
4467                pub regex: String,
4468            }
4469
4470            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4471            #[serde(rename_all = "camelCase")]
4472            pub struct WithoutHeadersValue {
4473                pub exact: String,
4474                pub prefix: String,
4475                /// RE2 style regex-based match (https://github.com/google/re2/wiki/Syntax).
4476                pub regex: String,
4477            }
4478
4479            /// withoutHeader has the same syntax with the header, but has opposite meaning.
4480            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4481            #[serde(rename_all = "camelCase")]
4482            pub struct WithoutHeaders {
4483                /// withoutHeader has the same syntax with the header, but has opposite meaning.
4484                pub properties: std::collections::HashMap<String, WithoutHeadersValue>,
4485            }
4486        }
4487        pub mod workload_entry {
4488            #[derive(serde::Deserialize, Debug, PartialEq)]
4489            pub struct WorkloadEntry {
4490                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
4491                pub spec: Spec,
4492                pub status: Status,
4493            }
4494
4495            impl k8s_openapi::Resource for WorkloadEntry {
4496                type Scope = k8s_openapi::ClusterResourceScope;
4497
4498                const API_VERSION: &'static str = "networking.istio.io/v1beta1";
4499                const GROUP: &'static str = "networking.istio.io";
4500                const KIND: &'static str = "WorkloadEntry";
4501                const VERSION: &'static str = "v1beta1";
4502                const URL_PATH_SEGMENT: &'static str = "TODO";
4503            }
4504
4505            impl k8s_openapi::Metadata for WorkloadEntry {
4506                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
4507
4508                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
4509                    &self.metadata
4510                }
4511
4512                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
4513                    &mut self.metadata
4514                }
4515            }
4516
4517            impl serde::Serialize for WorkloadEntry {
4518                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4519                where
4520                    S: serde::Serializer,
4521                {
4522                    use serde::ser::SerializeStruct;
4523                    let mut state = serializer.serialize_struct("WorkloadEntry", 5)?;
4524                    state.serialize_field(
4525                        "apiVersion",
4526                        <Self as k8s_openapi::Resource>::API_VERSION,
4527                    )?;
4528                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
4529                    state.serialize_field("metadata", &self.metadata)?;
4530                    state.serialize_field("spec", &self.spec)?;
4531                    state.serialize_field("status", &self.status)?;
4532                    state.end()
4533                }
4534            }
4535
4536            /// One or more labels associated with the endpoint.
4537            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4538            #[serde(rename_all = "camelCase")]
4539            pub struct Labels {
4540                /// One or more labels associated with the endpoint.
4541                pub properties: std::collections::HashMap<String, String>,
4542            }
4543
4544            /// Set of ports associated with the endpoint.
4545            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4546            #[serde(rename_all = "camelCase")]
4547            pub struct Ports {
4548                /// Set of ports associated with the endpoint.
4549                pub properties: std::collections::HashMap<String, i64>,
4550            }
4551
4552            /// Configuration affecting VMs onboarded into the mesh. See more details at: https://istio.io/docs/reference/config/networking/workload-entry.html
4553            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4554            #[serde(rename_all = "camelCase")]
4555            pub struct Spec {
4556                pub address: String,
4557                /// One or more labels associated with the endpoint.
4558                pub labels: Labels,
4559                /// The locality associated with the endpoint.
4560                pub locality: String,
4561                pub network: String,
4562                /// Set of ports associated with the endpoint.
4563                pub ports: Ports,
4564                pub service_account: String,
4565                /// The load balancing weight associated with the endpoint.
4566                pub weight: i64,
4567            }
4568
4569            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4570            #[serde(rename_all = "camelCase")]
4571            pub struct Status {
4572                pub properties: serde_json::Map<String, serde_json::Value>,
4573            }
4574        }
4575        pub mod workload_group {
4576            #[derive(serde::Deserialize, Debug, PartialEq)]
4577            pub struct WorkloadGroup {
4578                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
4579                pub spec: Spec,
4580                pub status: Status,
4581            }
4582
4583            impl k8s_openapi::Resource for WorkloadGroup {
4584                type Scope = k8s_openapi::ClusterResourceScope;
4585
4586                const API_VERSION: &'static str = "networking.istio.io/v1beta1";
4587                const GROUP: &'static str = "networking.istio.io";
4588                const KIND: &'static str = "WorkloadGroup";
4589                const VERSION: &'static str = "v1beta1";
4590                const URL_PATH_SEGMENT: &'static str = "TODO";
4591            }
4592
4593            impl k8s_openapi::Metadata for WorkloadGroup {
4594                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
4595
4596                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
4597                    &self.metadata
4598                }
4599
4600                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
4601                    &mut self.metadata
4602                }
4603            }
4604
4605            impl serde::Serialize for WorkloadGroup {
4606                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4607                where
4608                    S: serde::Serializer,
4609                {
4610                    use serde::ser::SerializeStruct;
4611                    let mut state = serializer.serialize_struct("WorkloadGroup", 5)?;
4612                    state.serialize_field(
4613                        "apiVersion",
4614                        <Self as k8s_openapi::Resource>::API_VERSION,
4615                    )?;
4616                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
4617                    state.serialize_field("metadata", &self.metadata)?;
4618                    state.serialize_field("spec", &self.spec)?;
4619                    state.serialize_field("status", &self.status)?;
4620                    state.end()
4621                }
4622            }
4623
4624            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4625            #[serde(rename_all = "camelCase")]
4626            pub struct Annotations {
4627                pub properties: std::collections::HashMap<String, String>,
4628            }
4629
4630            /// Health is determined by how the command that is executed exited.
4631            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4632            #[serde(rename_all = "camelCase")]
4633            pub struct Exec {
4634                /// Command to run.
4635                pub command: Vec<String>,
4636            }
4637
4638            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4639            #[serde(rename_all = "camelCase")]
4640            pub struct HttpGet {
4641                /// Host name to connect to, defaults to the pod IP.
4642                pub host: String,
4643                /// Headers the proxy will pass on to make the request.
4644                pub http_headers: Vec<HttpHeadersItem>,
4645                /// Path to access on the HTTP server.
4646                pub path: String,
4647                /// Port on which the endpoint lives.
4648                pub port: i64,
4649                pub scheme: String,
4650            }
4651
4652            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4653            #[serde(rename_all = "camelCase")]
4654            pub struct HttpHeadersItem {
4655                pub name: String,
4656                pub value: String,
4657            }
4658
4659            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4660            #[serde(rename_all = "camelCase")]
4661            pub struct MetadataLabels {
4662                pub properties: std::collections::HashMap<String, String>,
4663            }
4664
4665            /// One or more labels associated with the endpoint.
4666            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4667            #[serde(rename_all = "camelCase")]
4668            pub struct TemplateLabels {
4669                /// One or more labels associated with the endpoint.
4670                pub properties: std::collections::HashMap<String, String>,
4671            }
4672
4673            /// Metadata that will be used for all corresponding `WorkloadEntries`.
4674            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4675            #[serde(rename_all = "camelCase")]
4676            pub struct Metadata {
4677                pub annotations: Annotations,
4678                pub labels: MetadataLabels,
4679            }
4680
4681            /// Set of ports associated with the endpoint.
4682            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4683            #[serde(rename_all = "camelCase")]
4684            pub struct Ports {
4685                /// Set of ports associated with the endpoint.
4686                pub properties: std::collections::HashMap<String, i64>,
4687            }
4688
4689            /// `ReadinessProbe` describes the configuration the user must provide for healthchecking on their workload.
4690            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4691            #[serde(rename_all = "camelCase")]
4692            pub struct Probe {
4693                /// Health is determined by how the command that is executed exited.
4694                pub exec: Exec,
4695                /// Minimum consecutive failures for the probe to be considered failed after having succeeded.
4696                pub failure_threshold: i32,
4697                pub http_get: HttpGet,
4698                /// Number of seconds after the container has started before readiness probes are initiated.
4699                pub initial_delay_seconds: i32,
4700                /// How often (in seconds) to perform the probe.
4701                pub period_seconds: i32,
4702                /// Minimum consecutive successes for the probe to be considered successful after having failed.
4703                pub success_threshold: i32,
4704                /// Health is determined by if the proxy is able to connect.
4705                pub tcp_socket: TcpSocket,
4706                /// Number of seconds after which the probe times out.
4707                pub timeout_seconds: i32,
4708            }
4709
4710            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4711            #[serde(rename_all = "camelCase")]
4712            pub struct Spec {
4713                /// Metadata that will be used for all corresponding `WorkloadEntries`.
4714                pub metadata: Metadata,
4715                /// `ReadinessProbe` describes the configuration the user must provide for healthchecking on their workload.
4716                pub probe: Probe,
4717                /// Template to be used for the generation of `WorkloadEntry` resources that belong to this `WorkloadGroup`.
4718                pub template: Template,
4719            }
4720
4721            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4722            #[serde(rename_all = "camelCase")]
4723            pub struct Status {
4724                pub properties: serde_json::Map<String, serde_json::Value>,
4725            }
4726
4727            /// Health is determined by if the proxy is able to connect.
4728            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4729            #[serde(rename_all = "camelCase")]
4730            pub struct TcpSocket {
4731                pub host: String,
4732                pub port: i64,
4733            }
4734
4735            /// Template to be used for the generation of `WorkloadEntry` resources that belong to this `WorkloadGroup`.
4736            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4737            #[serde(rename_all = "camelCase")]
4738            pub struct Template {
4739                pub address: String,
4740                /// One or more labels associated with the endpoint.
4741                pub labels: TemplateLabels,
4742                /// The locality associated with the endpoint.
4743                pub locality: String,
4744                pub network: String,
4745                /// Set of ports associated with the endpoint.
4746                pub ports: Ports,
4747                pub service_account: String,
4748                /// The load balancing weight associated with the endpoint.
4749                pub weight: i64,
4750            }
4751        }
4752    }
4753}
4754pub mod security_istio_io {
4755    pub mod v1beta1 {
4756        pub mod authorization_policy {
4757            #[derive(serde::Deserialize, Debug, PartialEq)]
4758            pub struct AuthorizationPolicy {
4759                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
4760                pub spec: Spec,
4761                pub status: Status,
4762            }
4763
4764            impl k8s_openapi::Resource for AuthorizationPolicy {
4765                type Scope = k8s_openapi::ClusterResourceScope;
4766
4767                const API_VERSION: &'static str = "security.istio.io/v1beta1";
4768                const GROUP: &'static str = "security.istio.io";
4769                const KIND: &'static str = "AuthorizationPolicy";
4770                const VERSION: &'static str = "v1beta1";
4771                const URL_PATH_SEGMENT: &'static str = "TODO";
4772            }
4773
4774            impl k8s_openapi::Metadata for AuthorizationPolicy {
4775                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
4776
4777                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
4778                    &self.metadata
4779                }
4780
4781                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
4782                    &mut self.metadata
4783                }
4784            }
4785
4786            impl serde::Serialize for AuthorizationPolicy {
4787                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4788                where
4789                    S: serde::Serializer,
4790                {
4791                    use serde::ser::SerializeStruct;
4792                    let mut state = serializer.serialize_struct("AuthorizationPolicy", 5)?;
4793                    state.serialize_field(
4794                        "apiVersion",
4795                        <Self as k8s_openapi::Resource>::API_VERSION,
4796                    )?;
4797                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
4798                    state.serialize_field("metadata", &self.metadata)?;
4799                    state.serialize_field("spec", &self.spec)?;
4800                    state.serialize_field("status", &self.status)?;
4801                    state.end()
4802                }
4803            }
4804
4805            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4806            #[serde(rename_all = "camelCase")]
4807            pub struct FromItem {
4808                /// Source specifies the source of a request.
4809                pub source: Source,
4810            }
4811
4812            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4813            #[serde(rename_all = "camelCase")]
4814            pub struct MatchLabels {
4815                pub properties: std::collections::HashMap<String, String>,
4816            }
4817
4818            /// Operation specifies the operation of a request.
4819            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4820            #[serde(rename_all = "camelCase")]
4821            pub struct Operation {
4822                /// Optional.
4823                pub hosts: Vec<String>,
4824                /// Optional.
4825                pub methods: Vec<String>,
4826                /// Optional.
4827                pub not_hosts: Vec<String>,
4828                /// Optional.
4829                pub not_methods: Vec<String>,
4830                /// Optional.
4831                pub not_paths: Vec<String>,
4832                /// Optional.
4833                pub not_ports: Vec<String>,
4834                /// Optional.
4835                pub paths: Vec<String>,
4836                /// Optional.
4837                pub ports: Vec<String>,
4838            }
4839
4840            /// Specifies detailed configuration of the CUSTOM action.
4841            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4842            #[serde(rename_all = "camelCase")]
4843            pub struct Provider {
4844                /// Specifies the name of the extension provider.
4845                pub name: String,
4846            }
4847
4848            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4849            #[serde(rename_all = "camelCase")]
4850            pub struct RulesItem {
4851                /// Optional.
4852                pub from: Vec<FromItem>,
4853                /// Optional.
4854                pub to: Vec<ToItem>,
4855                /// Optional.
4856                pub when: Vec<WhenItem>,
4857            }
4858
4859            /// Optional.
4860            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4861            #[serde(rename_all = "camelCase")]
4862            pub struct Selector {
4863                pub match_labels: MatchLabels,
4864            }
4865
4866            /// Source specifies the source of a request.
4867            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4868            #[serde(rename_all = "camelCase")]
4869            pub struct Source {
4870                /// Optional.
4871                pub ip_blocks: Vec<String>,
4872                /// Optional.
4873                pub namespaces: Vec<String>,
4874                /// Optional.
4875                pub not_ip_blocks: Vec<String>,
4876                /// Optional.
4877                pub not_namespaces: Vec<String>,
4878                /// Optional.
4879                pub not_principals: Vec<String>,
4880                /// Optional.
4881                pub not_remote_ip_blocks: Vec<String>,
4882                /// Optional.
4883                pub not_request_principals: Vec<String>,
4884                /// Optional.
4885                pub principals: Vec<String>,
4886                /// Optional.
4887                pub remote_ip_blocks: Vec<String>,
4888                /// Optional.
4889                pub request_principals: Vec<String>,
4890            }
4891
4892            /// Configuration for access control on workloads. See more details at: https://istio.io/docs/reference/config/security/authorization-policy.html
4893            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4894            #[serde(rename_all = "camelCase")]
4895            pub struct Spec {
4896                /// Optional.
4897                pub action: String,
4898                /// Specifies detailed configuration of the CUSTOM action.
4899                pub provider: Provider,
4900                /// Optional.
4901                pub rules: Vec<RulesItem>,
4902                /// Optional.
4903                pub selector: Selector,
4904            }
4905
4906            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4907            #[serde(rename_all = "camelCase")]
4908            pub struct Status {
4909                pub properties: serde_json::Map<String, serde_json::Value>,
4910            }
4911
4912            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4913            #[serde(rename_all = "camelCase")]
4914            pub struct ToItem {
4915                /// Operation specifies the operation of a request.
4916                pub operation: Operation,
4917            }
4918
4919            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4920            #[serde(rename_all = "camelCase")]
4921            pub struct WhenItem {
4922                /// The name of an Istio attribute.
4923                pub key: String,
4924                /// Optional.
4925                pub not_values: Vec<String>,
4926                /// Optional.
4927                pub values: Vec<String>,
4928            }
4929        }
4930        pub mod peer_authentication {
4931            #[derive(serde::Deserialize, Debug, PartialEq)]
4932            pub struct PeerAuthentication {
4933                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
4934                pub spec: Spec,
4935                pub status: Status,
4936            }
4937
4938            impl k8s_openapi::Resource for PeerAuthentication {
4939                type Scope = k8s_openapi::ClusterResourceScope;
4940
4941                const API_VERSION: &'static str = "security.istio.io/v1beta1";
4942                const GROUP: &'static str = "security.istio.io";
4943                const KIND: &'static str = "PeerAuthentication";
4944                const VERSION: &'static str = "v1beta1";
4945                const URL_PATH_SEGMENT: &'static str = "TODO";
4946            }
4947
4948            impl k8s_openapi::Metadata for PeerAuthentication {
4949                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
4950
4951                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
4952                    &self.metadata
4953                }
4954
4955                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
4956                    &mut self.metadata
4957                }
4958            }
4959
4960            impl serde::Serialize for PeerAuthentication {
4961                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
4962                where
4963                    S: serde::Serializer,
4964                {
4965                    use serde::ser::SerializeStruct;
4966                    let mut state = serializer.serialize_struct("PeerAuthentication", 5)?;
4967                    state.serialize_field(
4968                        "apiVersion",
4969                        <Self as k8s_openapi::Resource>::API_VERSION,
4970                    )?;
4971                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
4972                    state.serialize_field("metadata", &self.metadata)?;
4973                    state.serialize_field("spec", &self.spec)?;
4974                    state.serialize_field("status", &self.status)?;
4975                    state.end()
4976                }
4977            }
4978
4979            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4980            #[serde(rename_all = "camelCase")]
4981            pub struct MatchLabels {
4982                pub properties: std::collections::HashMap<String, String>,
4983            }
4984
4985            /// Mutual TLS settings for workload.
4986            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4987            #[serde(rename_all = "camelCase")]
4988            pub struct Mtls {
4989                /// Defines the mTLS mode used for peer authentication.
4990                pub mode: String,
4991            }
4992
4993            /// Port specific mutual TLS settings.
4994            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
4995            #[serde(rename_all = "camelCase")]
4996            pub struct PortLevelMtls {
4997                /// Port specific mutual TLS settings.
4998                pub properties: std::collections::HashMap<String, Value>,
4999            }
5000
5001            /// The selector determines the workloads to apply the ChannelAuthentication on.
5002            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5003            #[serde(rename_all = "camelCase")]
5004            pub struct Selector {
5005                pub match_labels: MatchLabels,
5006            }
5007
5008            /// PeerAuthentication defines how traffic will be tunneled (or not) to the sidecar.
5009            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5010            #[serde(rename_all = "camelCase")]
5011            pub struct Spec {
5012                /// Mutual TLS settings for workload.
5013                pub mtls: Mtls,
5014                /// Port specific mutual TLS settings.
5015                pub port_level_mtls: PortLevelMtls,
5016                /// The selector determines the workloads to apply the ChannelAuthentication on.
5017                pub selector: Selector,
5018            }
5019
5020            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5021            #[serde(rename_all = "camelCase")]
5022            pub struct Status {
5023                pub properties: serde_json::Map<String, serde_json::Value>,
5024            }
5025
5026            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5027            #[serde(rename_all = "camelCase")]
5028            pub struct Value {
5029                /// Defines the mTLS mode used for peer authentication.
5030                pub mode: String,
5031            }
5032        }
5033        pub mod request_authentication {
5034            #[derive(serde::Deserialize, Debug, PartialEq)]
5035            pub struct RequestAuthentication {
5036                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
5037                pub spec: Spec,
5038                pub status: Status,
5039            }
5040
5041            impl k8s_openapi::Resource for RequestAuthentication {
5042                type Scope = k8s_openapi::ClusterResourceScope;
5043
5044                const API_VERSION: &'static str = "security.istio.io/v1beta1";
5045                const GROUP: &'static str = "security.istio.io";
5046                const KIND: &'static str = "RequestAuthentication";
5047                const VERSION: &'static str = "v1beta1";
5048                const URL_PATH_SEGMENT: &'static str = "TODO";
5049            }
5050
5051            impl k8s_openapi::Metadata for RequestAuthentication {
5052                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
5053
5054                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
5055                    &self.metadata
5056                }
5057
5058                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
5059                    &mut self.metadata
5060                }
5061            }
5062
5063            impl serde::Serialize for RequestAuthentication {
5064                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5065                where
5066                    S: serde::Serializer,
5067                {
5068                    use serde::ser::SerializeStruct;
5069                    let mut state = serializer.serialize_struct("RequestAuthentication", 5)?;
5070                    state.serialize_field(
5071                        "apiVersion",
5072                        <Self as k8s_openapi::Resource>::API_VERSION,
5073                    )?;
5074                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
5075                    state.serialize_field("metadata", &self.metadata)?;
5076                    state.serialize_field("spec", &self.spec)?;
5077                    state.serialize_field("status", &self.status)?;
5078                    state.end()
5079                }
5080            }
5081
5082            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5083            #[serde(rename_all = "camelCase")]
5084            pub struct FromHeadersItem {
5085                /// The HTTP header name.
5086                pub name: String,
5087                /// The prefix that should be stripped before decoding the token.
5088                pub prefix: String,
5089            }
5090
5091            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5092            #[serde(rename_all = "camelCase")]
5093            pub struct JwtRulesItem {
5094                pub audiences: Vec<String>,
5095                /// If set to true, the original token will be kept for the upstream request.
5096                pub forward_original_token: bool,
5097                /// List of header locations from which JWT is expected.
5098                pub from_headers: Vec<FromHeadersItem>,
5099                /// List of query parameters from which JWT is expected.
5100                pub from_params: Vec<String>,
5101                /// Identifies the issuer that issued the JWT.
5102                pub issuer: String,
5103                /// JSON Web Key Set of public keys to validate signature of the JWT.
5104                pub jwks: String,
5105                pub jwks_uri: String,
5106                pub output_payload_to_header: String,
5107            }
5108
5109            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5110            #[serde(rename_all = "camelCase")]
5111            pub struct MatchLabels {
5112                pub properties: std::collections::HashMap<String, String>,
5113            }
5114
5115            /// Optional.
5116            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5117            #[serde(rename_all = "camelCase")]
5118            pub struct Selector {
5119                pub match_labels: MatchLabels,
5120            }
5121
5122            /// RequestAuthentication defines what request authentication methods are supported by a workload.
5123            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5124            #[serde(rename_all = "camelCase")]
5125            pub struct Spec {
5126                /// Define the list of JWTs that can be validated at the selected workloads' proxy.
5127                pub jwt_rules: Vec<JwtRulesItem>,
5128                /// Optional.
5129                pub selector: Selector,
5130            }
5131
5132            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5133            #[serde(rename_all = "camelCase")]
5134            pub struct Status {
5135                pub properties: serde_json::Map<String, serde_json::Value>,
5136            }
5137        }
5138    }
5139}
5140pub mod telemetry_istio_io {
5141    pub mod v1alpha1 {
5142        pub mod telemetry {
5143            #[derive(serde::Deserialize, Debug, PartialEq)]
5144            pub struct Telemetry {
5145                pub metadata: k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta,
5146                pub spec: Spec,
5147                pub status: Status,
5148            }
5149
5150            impl k8s_openapi::Resource for Telemetry {
5151                type Scope = k8s_openapi::ClusterResourceScope;
5152
5153                const API_VERSION: &'static str = "telemetry.istio.io/v1alpha1";
5154                const GROUP: &'static str = "telemetry.istio.io";
5155                const KIND: &'static str = "Telemetry";
5156                const VERSION: &'static str = "v1alpha1";
5157                const URL_PATH_SEGMENT: &'static str = "TODO";
5158            }
5159
5160            impl k8s_openapi::Metadata for Telemetry {
5161                type Ty = k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
5162
5163                fn metadata(&self) -> &<Self as k8s_openapi::Metadata>::Ty {
5164                    &self.metadata
5165                }
5166
5167                fn metadata_mut(&mut self) -> &mut <Self as k8s_openapi::Metadata>::Ty {
5168                    &mut self.metadata
5169                }
5170            }
5171
5172            impl serde::Serialize for Telemetry {
5173                fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
5174                where
5175                    S: serde::Serializer,
5176                {
5177                    use serde::ser::SerializeStruct;
5178                    let mut state = serializer.serialize_struct("Telemetry", 5)?;
5179                    state.serialize_field(
5180                        "apiVersion",
5181                        <Self as k8s_openapi::Resource>::API_VERSION,
5182                    )?;
5183                    state.serialize_field("kind", <Self as k8s_openapi::Resource>::KIND)?;
5184                    state.serialize_field("metadata", &self.metadata)?;
5185                    state.serialize_field("spec", &self.spec)?;
5186                    state.serialize_field("status", &self.status)?;
5187                    state.end()
5188                }
5189            }
5190
5191            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5192            #[serde(rename_all = "camelCase")]
5193            pub struct AccessLoggingItem {
5194                /// Controls logging.
5195                pub disabled: Option<bool>,
5196                /// Optional.
5197                pub filter: Filter,
5198                /// Allows tailoring of logging behavior to specific conditions.
5199                pub r#match: AccessLoggingItemMatch,
5200                /// Optional.
5201                pub providers: Vec<AccessLoggingItemProvidersItem>,
5202            }
5203
5204            /// Optional.
5205            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5206            #[serde(rename_all = "camelCase")]
5207            pub struct CustomTags {
5208                /// Optional.
5209                pub properties: std::collections::HashMap<String, CustomTagsValue>,
5210            }
5211
5212            /// Environment adds the value of an environment variable to each span.
5213            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5214            #[serde(rename_all = "camelCase")]
5215            pub struct Environment {
5216                /// Optional.
5217                pub default_value: String,
5218                /// Name of the environment variable from which to extract the tag value.
5219                pub name: String,
5220            }
5221
5222            /// Optional.
5223            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5224            #[serde(rename_all = "camelCase")]
5225            pub struct Filter {
5226                /// CEL expression for selecting when requests/connections should be logged.
5227                pub expression: String,
5228            }
5229
5230            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5231            #[serde(rename_all = "camelCase")]
5232            pub struct Header {
5233                /// Optional.
5234                pub default_value: String,
5235                /// Name of the header from which to extract the tag value.
5236                pub name: String,
5237            }
5238
5239            /// Literal adds the same, hard-coded value to each span.
5240            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5241            #[serde(rename_all = "camelCase")]
5242            pub struct Literal {
5243                /// The tag value to use.
5244                pub value: String,
5245            }
5246
5247            /// Allows tailoring of logging behavior to specific conditions.
5248            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5249            #[serde(rename_all = "camelCase")]
5250            pub struct AccessLoggingItemMatch {
5251                pub mode: String,
5252            }
5253
5254            /// Match allows provides the scope of the override.
5255            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5256            #[serde(rename_all = "camelCase")]
5257            pub struct OverridesItemMatch {
5258                /// Allows free-form specification of a metric.
5259                pub custom_metric: String,
5260                /// One of the well-known Istio Standard Metrics.
5261                pub metric: String,
5262                pub mode: String,
5263            }
5264
5265            /// Allows tailoring of behavior to specific conditions.
5266            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5267            #[serde(rename_all = "camelCase")]
5268            pub struct TracingItemMatch {
5269                pub mode: String,
5270            }
5271
5272            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5273            #[serde(rename_all = "camelCase")]
5274            pub struct MatchLabels {
5275                pub properties: std::collections::HashMap<String, String>,
5276            }
5277
5278            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5279            #[serde(rename_all = "camelCase")]
5280            pub struct MetricsItem {
5281                /// Optional.
5282                pub overrides: Vec<OverridesItem>,
5283                /// Optional.
5284                pub providers: Vec<MetricsItemProvidersItem>,
5285            }
5286
5287            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5288            #[serde(rename_all = "camelCase")]
5289            pub struct OverridesItem {
5290                /// Optional.
5291                pub disabled: Option<bool>,
5292                /// Match allows provides the scope of the override.
5293                pub r#match: OverridesItemMatch,
5294                /// Optional.
5295                pub tag_overrides: TagOverrides,
5296            }
5297
5298            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5299            #[serde(rename_all = "camelCase")]
5300            pub struct AccessLoggingItemProvidersItem {
5301                /// Required.
5302                pub name: String,
5303            }
5304
5305            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5306            #[serde(rename_all = "camelCase")]
5307            pub struct MetricsItemProvidersItem {
5308                /// Required.
5309                pub name: String,
5310            }
5311
5312            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5313            #[serde(rename_all = "camelCase")]
5314            pub struct TracingItemProvidersItem {
5315                /// Required.
5316                pub name: String,
5317            }
5318
5319            /// Optional.
5320            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5321            #[serde(rename_all = "camelCase")]
5322            pub struct Selector {
5323                pub match_labels: MatchLabels,
5324            }
5325
5326            /// Telemetry configuration for workloads. See more details at: https://istio.io/docs/reference/config/telemetry.html
5327            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5328            #[serde(rename_all = "camelCase")]
5329            pub struct Spec {
5330                /// Optional.
5331                pub access_logging: Vec<AccessLoggingItem>,
5332                /// Optional.
5333                pub metrics: Vec<MetricsItem>,
5334                /// Optional.
5335                pub selector: Selector,
5336                /// Optional.
5337                pub tracing: Vec<TracingItem>,
5338            }
5339
5340            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5341            #[serde(rename_all = "camelCase")]
5342            pub struct Status {
5343                pub properties: serde_json::Map<String, serde_json::Value>,
5344            }
5345
5346            /// Optional.
5347            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5348            #[serde(rename_all = "camelCase")]
5349            pub struct TagOverrides {
5350                /// Optional.
5351                pub properties: std::collections::HashMap<String, TagOverridesValue>,
5352            }
5353
5354            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5355            #[serde(rename_all = "camelCase")]
5356            pub struct TracingItem {
5357                /// Optional.
5358                pub custom_tags: CustomTags,
5359                /// Controls span reporting.
5360                pub disable_span_reporting: Option<bool>,
5361                /// Allows tailoring of behavior to specific conditions.
5362                pub r#match: TracingItemMatch,
5363                /// Optional.
5364                pub providers: Vec<TracingItemProvidersItem>,
5365                pub random_sampling_percentage: Option<f64>,
5366                pub use_request_id_for_trace_sampling: Option<bool>,
5367            }
5368
5369            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5370            #[serde(rename_all = "camelCase")]
5371            pub struct TagOverridesValue {
5372                /// Operation controls whether or not to update/add a tag, or to remove it.
5373                pub operation: String,
5374                /// Value is only considered if the operation is `UPSERT`.
5375                pub value: String,
5376            }
5377
5378            #[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq)]
5379            #[serde(rename_all = "camelCase")]
5380            pub struct CustomTagsValue {
5381                /// Environment adds the value of an environment variable to each span.
5382                pub environment: Environment,
5383                pub header: Header,
5384                /// Literal adds the same, hard-coded value to each span.
5385                pub literal: Literal,
5386            }
5387        }
5388    }
5389}