k8s_openapi/v1_32/api/events/v1/
event.rs

1// Generated from definition io.k8s.api.events.v1.Event
2
3/// Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time.  Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason.  Events should be treated as informative, best-effort, supplemental data.
4#[derive(Clone, Debug, Default, PartialEq)]
5pub struct Event {
6    /// action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.
7    pub action: Option<String>,
8
9    /// deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.
10    pub deprecated_count: Option<i32>,
11
12    /// deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
13    pub deprecated_first_timestamp: Option<crate::apimachinery::pkg::apis::meta::v1::Time>,
14
15    /// deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
16    pub deprecated_last_timestamp: Option<crate::apimachinery::pkg::apis::meta::v1::Time>,
17
18    /// deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
19    pub deprecated_source: Option<crate::api::core::v1::EventSource>,
20
21    /// eventTime is the time when this Event was first observed. It is required.
22    pub event_time: Option<crate::apimachinery::pkg::apis::meta::v1::MicroTime>,
23
24    /// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
25    pub metadata: crate::apimachinery::pkg::apis::meta::v1::ObjectMeta,
26
27    /// note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.
28    pub note: Option<String>,
29
30    /// reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.
31    pub reason: Option<String>,
32
33    /// regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.
34    pub regarding: Option<crate::api::core::v1::ObjectReference>,
35
36    /// related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.
37    pub related: Option<crate::api::core::v1::ObjectReference>,
38
39    /// reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.
40    pub reporting_controller: Option<String>,
41
42    /// reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.
43    pub reporting_instance: Option<String>,
44
45    /// series is data about the Event series this event represents or nil if it's a singleton Event.
46    pub series: Option<crate::api::events::v1::EventSeries>,
47
48    /// type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events.
49    pub type_: Option<String>,
50}
51
52impl crate::Resource for Event {
53    const API_VERSION: &'static str = "events.k8s.io/v1";
54    const GROUP: &'static str = "events.k8s.io";
55    const KIND: &'static str = "Event";
56    const VERSION: &'static str = "v1";
57    const URL_PATH_SEGMENT: &'static str = "events";
58    type Scope = crate::NamespaceResourceScope;
59}
60
61impl crate::ListableResource for Event {
62    const LIST_KIND: &'static str = "EventList";
63}
64
65impl crate::Metadata for Event {
66    type Ty = crate::apimachinery::pkg::apis::meta::v1::ObjectMeta;
67
68    fn metadata(&self) -> &<Self as crate::Metadata>::Ty {
69        &self.metadata
70    }
71
72    fn metadata_mut(&mut self) -> &mut<Self as crate::Metadata>::Ty {
73        &mut self.metadata
74    }
75}
76
77impl crate::DeepMerge for Event {
78    fn merge_from(&mut self, other: Self) {
79        crate::DeepMerge::merge_from(&mut self.action, other.action);
80        crate::DeepMerge::merge_from(&mut self.deprecated_count, other.deprecated_count);
81        crate::DeepMerge::merge_from(&mut self.deprecated_first_timestamp, other.deprecated_first_timestamp);
82        crate::DeepMerge::merge_from(&mut self.deprecated_last_timestamp, other.deprecated_last_timestamp);
83        crate::DeepMerge::merge_from(&mut self.deprecated_source, other.deprecated_source);
84        crate::DeepMerge::merge_from(&mut self.event_time, other.event_time);
85        crate::DeepMerge::merge_from(&mut self.metadata, other.metadata);
86        crate::DeepMerge::merge_from(&mut self.note, other.note);
87        crate::DeepMerge::merge_from(&mut self.reason, other.reason);
88        crate::DeepMerge::merge_from(&mut self.regarding, other.regarding);
89        crate::DeepMerge::merge_from(&mut self.related, other.related);
90        crate::DeepMerge::merge_from(&mut self.reporting_controller, other.reporting_controller);
91        crate::DeepMerge::merge_from(&mut self.reporting_instance, other.reporting_instance);
92        crate::DeepMerge::merge_from(&mut self.series, other.series);
93        crate::DeepMerge::merge_from(&mut self.type_, other.type_);
94    }
95}
96
97impl<'de> crate::serde::Deserialize<'de> for Event {
98    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: crate::serde::Deserializer<'de> {
99        #[allow(non_camel_case_types)]
100        enum Field {
101            Key_api_version,
102            Key_kind,
103            Key_action,
104            Key_deprecated_count,
105            Key_deprecated_first_timestamp,
106            Key_deprecated_last_timestamp,
107            Key_deprecated_source,
108            Key_event_time,
109            Key_metadata,
110            Key_note,
111            Key_reason,
112            Key_regarding,
113            Key_related,
114            Key_reporting_controller,
115            Key_reporting_instance,
116            Key_series,
117            Key_type_,
118            Other,
119        }
120
121        impl<'de> crate::serde::Deserialize<'de> for Field {
122            fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: crate::serde::Deserializer<'de> {
123                struct Visitor;
124
125                impl crate::serde::de::Visitor<'_> for Visitor {
126                    type Value = Field;
127
128                    fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
129                        f.write_str("field identifier")
130                    }
131
132                    fn visit_str<E>(self, v: &str) -> Result<Self::Value, E> where E: crate::serde::de::Error {
133                        Ok(match v {
134                            "apiVersion" => Field::Key_api_version,
135                            "kind" => Field::Key_kind,
136                            "action" => Field::Key_action,
137                            "deprecatedCount" => Field::Key_deprecated_count,
138                            "deprecatedFirstTimestamp" => Field::Key_deprecated_first_timestamp,
139                            "deprecatedLastTimestamp" => Field::Key_deprecated_last_timestamp,
140                            "deprecatedSource" => Field::Key_deprecated_source,
141                            "eventTime" => Field::Key_event_time,
142                            "metadata" => Field::Key_metadata,
143                            "note" => Field::Key_note,
144                            "reason" => Field::Key_reason,
145                            "regarding" => Field::Key_regarding,
146                            "related" => Field::Key_related,
147                            "reportingController" => Field::Key_reporting_controller,
148                            "reportingInstance" => Field::Key_reporting_instance,
149                            "series" => Field::Key_series,
150                            "type" => Field::Key_type_,
151                            _ => Field::Other,
152                        })
153                    }
154                }
155
156                deserializer.deserialize_identifier(Visitor)
157            }
158        }
159
160        struct Visitor;
161
162        impl<'de> crate::serde::de::Visitor<'de> for Visitor {
163            type Value = Event;
164
165            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
166                f.write_str(<Self::Value as crate::Resource>::KIND)
167            }
168
169            fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error> where A: crate::serde::de::MapAccess<'de> {
170                let mut value_action: Option<String> = None;
171                let mut value_deprecated_count: Option<i32> = None;
172                let mut value_deprecated_first_timestamp: Option<crate::apimachinery::pkg::apis::meta::v1::Time> = None;
173                let mut value_deprecated_last_timestamp: Option<crate::apimachinery::pkg::apis::meta::v1::Time> = None;
174                let mut value_deprecated_source: Option<crate::api::core::v1::EventSource> = None;
175                let mut value_event_time: Option<crate::apimachinery::pkg::apis::meta::v1::MicroTime> = None;
176                let mut value_metadata: Option<crate::apimachinery::pkg::apis::meta::v1::ObjectMeta> = None;
177                let mut value_note: Option<String> = None;
178                let mut value_reason: Option<String> = None;
179                let mut value_regarding: Option<crate::api::core::v1::ObjectReference> = None;
180                let mut value_related: Option<crate::api::core::v1::ObjectReference> = None;
181                let mut value_reporting_controller: Option<String> = None;
182                let mut value_reporting_instance: Option<String> = None;
183                let mut value_series: Option<crate::api::events::v1::EventSeries> = None;
184                let mut value_type_: Option<String> = None;
185
186                while let Some(key) = crate::serde::de::MapAccess::next_key::<Field>(&mut map)? {
187                    match key {
188                        Field::Key_api_version => {
189                            let value_api_version: String = crate::serde::de::MapAccess::next_value(&mut map)?;
190                            if value_api_version != <Self::Value as crate::Resource>::API_VERSION {
191                                return Err(crate::serde::de::Error::invalid_value(crate::serde::de::Unexpected::Str(&value_api_version), &<Self::Value as crate::Resource>::API_VERSION));
192                            }
193                        },
194                        Field::Key_kind => {
195                            let value_kind: String = crate::serde::de::MapAccess::next_value(&mut map)?;
196                            if value_kind != <Self::Value as crate::Resource>::KIND {
197                                return Err(crate::serde::de::Error::invalid_value(crate::serde::de::Unexpected::Str(&value_kind), &<Self::Value as crate::Resource>::KIND));
198                            }
199                        },
200                        Field::Key_action => value_action = crate::serde::de::MapAccess::next_value(&mut map)?,
201                        Field::Key_deprecated_count => value_deprecated_count = crate::serde::de::MapAccess::next_value(&mut map)?,
202                        Field::Key_deprecated_first_timestamp => value_deprecated_first_timestamp = crate::serde::de::MapAccess::next_value(&mut map)?,
203                        Field::Key_deprecated_last_timestamp => value_deprecated_last_timestamp = crate::serde::de::MapAccess::next_value(&mut map)?,
204                        Field::Key_deprecated_source => value_deprecated_source = crate::serde::de::MapAccess::next_value(&mut map)?,
205                        Field::Key_event_time => value_event_time = crate::serde::de::MapAccess::next_value(&mut map)?,
206                        Field::Key_metadata => value_metadata = crate::serde::de::MapAccess::next_value(&mut map)?,
207                        Field::Key_note => value_note = crate::serde::de::MapAccess::next_value(&mut map)?,
208                        Field::Key_reason => value_reason = crate::serde::de::MapAccess::next_value(&mut map)?,
209                        Field::Key_regarding => value_regarding = crate::serde::de::MapAccess::next_value(&mut map)?,
210                        Field::Key_related => value_related = crate::serde::de::MapAccess::next_value(&mut map)?,
211                        Field::Key_reporting_controller => value_reporting_controller = crate::serde::de::MapAccess::next_value(&mut map)?,
212                        Field::Key_reporting_instance => value_reporting_instance = crate::serde::de::MapAccess::next_value(&mut map)?,
213                        Field::Key_series => value_series = crate::serde::de::MapAccess::next_value(&mut map)?,
214                        Field::Key_type_ => value_type_ = crate::serde::de::MapAccess::next_value(&mut map)?,
215                        Field::Other => { let _: crate::serde::de::IgnoredAny = crate::serde::de::MapAccess::next_value(&mut map)?; },
216                    }
217                }
218
219                Ok(Event {
220                    action: value_action,
221                    deprecated_count: value_deprecated_count,
222                    deprecated_first_timestamp: value_deprecated_first_timestamp,
223                    deprecated_last_timestamp: value_deprecated_last_timestamp,
224                    deprecated_source: value_deprecated_source,
225                    event_time: value_event_time,
226                    metadata: value_metadata.unwrap_or_default(),
227                    note: value_note,
228                    reason: value_reason,
229                    regarding: value_regarding,
230                    related: value_related,
231                    reporting_controller: value_reporting_controller,
232                    reporting_instance: value_reporting_instance,
233                    series: value_series,
234                    type_: value_type_,
235                })
236            }
237        }
238
239        deserializer.deserialize_struct(
240            <Self as crate::Resource>::KIND,
241            &[
242                "apiVersion",
243                "kind",
244                "action",
245                "deprecatedCount",
246                "deprecatedFirstTimestamp",
247                "deprecatedLastTimestamp",
248                "deprecatedSource",
249                "eventTime",
250                "metadata",
251                "note",
252                "reason",
253                "regarding",
254                "related",
255                "reportingController",
256                "reportingInstance",
257                "series",
258                "type",
259            ],
260            Visitor,
261        )
262    }
263}
264
265impl crate::serde::Serialize for Event {
266    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: crate::serde::Serializer {
267        let mut state = serializer.serialize_struct(
268            <Self as crate::Resource>::KIND,
269            3 +
270            self.action.as_ref().map_or(0, |_| 1) +
271            self.deprecated_count.as_ref().map_or(0, |_| 1) +
272            self.deprecated_first_timestamp.as_ref().map_or(0, |_| 1) +
273            self.deprecated_last_timestamp.as_ref().map_or(0, |_| 1) +
274            self.deprecated_source.as_ref().map_or(0, |_| 1) +
275            self.event_time.as_ref().map_or(0, |_| 1) +
276            self.note.as_ref().map_or(0, |_| 1) +
277            self.reason.as_ref().map_or(0, |_| 1) +
278            self.regarding.as_ref().map_or(0, |_| 1) +
279            self.related.as_ref().map_or(0, |_| 1) +
280            self.reporting_controller.as_ref().map_or(0, |_| 1) +
281            self.reporting_instance.as_ref().map_or(0, |_| 1) +
282            self.series.as_ref().map_or(0, |_| 1) +
283            self.type_.as_ref().map_or(0, |_| 1),
284        )?;
285        crate::serde::ser::SerializeStruct::serialize_field(&mut state, "apiVersion", <Self as crate::Resource>::API_VERSION)?;
286        crate::serde::ser::SerializeStruct::serialize_field(&mut state, "kind", <Self as crate::Resource>::KIND)?;
287        if let Some(value) = &self.action {
288            crate::serde::ser::SerializeStruct::serialize_field(&mut state, "action", value)?;
289        }
290        if let Some(value) = &self.deprecated_count {
291            crate::serde::ser::SerializeStruct::serialize_field(&mut state, "deprecatedCount", value)?;
292        }
293        if let Some(value) = &self.deprecated_first_timestamp {
294            crate::serde::ser::SerializeStruct::serialize_field(&mut state, "deprecatedFirstTimestamp", value)?;
295        }
296        if let Some(value) = &self.deprecated_last_timestamp {
297            crate::serde::ser::SerializeStruct::serialize_field(&mut state, "deprecatedLastTimestamp", value)?;
298        }
299        if let Some(value) = &self.deprecated_source {
300            crate::serde::ser::SerializeStruct::serialize_field(&mut state, "deprecatedSource", value)?;
301        }
302        if let Some(value) = &self.event_time {
303            crate::serde::ser::SerializeStruct::serialize_field(&mut state, "eventTime", value)?;
304        }
305        crate::serde::ser::SerializeStruct::serialize_field(&mut state, "metadata", &self.metadata)?;
306        if let Some(value) = &self.note {
307            crate::serde::ser::SerializeStruct::serialize_field(&mut state, "note", value)?;
308        }
309        if let Some(value) = &self.reason {
310            crate::serde::ser::SerializeStruct::serialize_field(&mut state, "reason", value)?;
311        }
312        if let Some(value) = &self.regarding {
313            crate::serde::ser::SerializeStruct::serialize_field(&mut state, "regarding", value)?;
314        }
315        if let Some(value) = &self.related {
316            crate::serde::ser::SerializeStruct::serialize_field(&mut state, "related", value)?;
317        }
318        if let Some(value) = &self.reporting_controller {
319            crate::serde::ser::SerializeStruct::serialize_field(&mut state, "reportingController", value)?;
320        }
321        if let Some(value) = &self.reporting_instance {
322            crate::serde::ser::SerializeStruct::serialize_field(&mut state, "reportingInstance", value)?;
323        }
324        if let Some(value) = &self.series {
325            crate::serde::ser::SerializeStruct::serialize_field(&mut state, "series", value)?;
326        }
327        if let Some(value) = &self.type_ {
328            crate::serde::ser::SerializeStruct::serialize_field(&mut state, "type", value)?;
329        }
330        crate::serde::ser::SerializeStruct::end(state)
331    }
332}
333
334#[cfg(feature = "schemars")]
335impl crate::schemars::JsonSchema for Event {
336    fn schema_name() -> String {
337        "io.k8s.api.events.v1.Event".to_owned()
338    }
339
340    fn json_schema(__gen: &mut crate::schemars::gen::SchemaGenerator) -> crate::schemars::schema::Schema {
341        crate::schemars::schema::Schema::Object(crate::schemars::schema::SchemaObject {
342            metadata: Some(Box::new(crate::schemars::schema::Metadata {
343                description: Some("Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time.  Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason.  Events should be treated as informative, best-effort, supplemental data.".to_owned()),
344                ..Default::default()
345            })),
346            instance_type: Some(crate::schemars::schema::SingleOrVec::Single(Box::new(crate::schemars::schema::InstanceType::Object))),
347            object: Some(Box::new(crate::schemars::schema::ObjectValidation {
348                properties: [
349                    (
350                        "action".to_owned(),
351                        crate::schemars::schema::Schema::Object(crate::schemars::schema::SchemaObject {
352                            metadata: Some(Box::new(crate::schemars::schema::Metadata {
353                                description: Some("action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.".to_owned()),
354                                ..Default::default()
355                            })),
356                            instance_type: Some(crate::schemars::schema::SingleOrVec::Single(Box::new(crate::schemars::schema::InstanceType::String))),
357                            ..Default::default()
358                        }),
359                    ),
360                    (
361                        "apiVersion".to_owned(),
362                        crate::schemars::schema::Schema::Object(crate::schemars::schema::SchemaObject {
363                            metadata: Some(Box::new(crate::schemars::schema::Metadata {
364                                description: Some("APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources".to_owned()),
365                                ..Default::default()
366                            })),
367                            instance_type: Some(crate::schemars::schema::SingleOrVec::Single(Box::new(crate::schemars::schema::InstanceType::String))),
368                            ..Default::default()
369                        }),
370                    ),
371                    (
372                        "deprecatedCount".to_owned(),
373                        crate::schemars::schema::Schema::Object(crate::schemars::schema::SchemaObject {
374                            metadata: Some(Box::new(crate::schemars::schema::Metadata {
375                                description: Some("deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.".to_owned()),
376                                ..Default::default()
377                            })),
378                            instance_type: Some(crate::schemars::schema::SingleOrVec::Single(Box::new(crate::schemars::schema::InstanceType::Integer))),
379                            format: Some("int32".to_owned()),
380                            ..Default::default()
381                        }),
382                    ),
383                    (
384                        "deprecatedFirstTimestamp".to_owned(),
385                        {
386                            let mut schema_obj = __gen.subschema_for::<crate::apimachinery::pkg::apis::meta::v1::Time>().into_object();
387                            schema_obj.metadata = Some(Box::new(crate::schemars::schema::Metadata {
388                                description: Some("deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.".to_owned()),
389                                ..Default::default()
390                            }));
391                            crate::schemars::schema::Schema::Object(schema_obj)
392                        },
393                    ),
394                    (
395                        "deprecatedLastTimestamp".to_owned(),
396                        {
397                            let mut schema_obj = __gen.subschema_for::<crate::apimachinery::pkg::apis::meta::v1::Time>().into_object();
398                            schema_obj.metadata = Some(Box::new(crate::schemars::schema::Metadata {
399                                description: Some("deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.".to_owned()),
400                                ..Default::default()
401                            }));
402                            crate::schemars::schema::Schema::Object(schema_obj)
403                        },
404                    ),
405                    (
406                        "deprecatedSource".to_owned(),
407                        {
408                            let mut schema_obj = __gen.subschema_for::<crate::api::core::v1::EventSource>().into_object();
409                            schema_obj.metadata = Some(Box::new(crate::schemars::schema::Metadata {
410                                description: Some("deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.".to_owned()),
411                                ..Default::default()
412                            }));
413                            crate::schemars::schema::Schema::Object(schema_obj)
414                        },
415                    ),
416                    (
417                        "eventTime".to_owned(),
418                        {
419                            let mut schema_obj = __gen.subschema_for::<crate::apimachinery::pkg::apis::meta::v1::MicroTime>().into_object();
420                            schema_obj.metadata = Some(Box::new(crate::schemars::schema::Metadata {
421                                description: Some("eventTime is the time when this Event was first observed. It is required.".to_owned()),
422                                ..Default::default()
423                            }));
424                            crate::schemars::schema::Schema::Object(schema_obj)
425                        },
426                    ),
427                    (
428                        "kind".to_owned(),
429                        crate::schemars::schema::Schema::Object(crate::schemars::schema::SchemaObject {
430                            metadata: Some(Box::new(crate::schemars::schema::Metadata {
431                                description: Some("Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds".to_owned()),
432                                ..Default::default()
433                            })),
434                            instance_type: Some(crate::schemars::schema::SingleOrVec::Single(Box::new(crate::schemars::schema::InstanceType::String))),
435                            ..Default::default()
436                        }),
437                    ),
438                    (
439                        "metadata".to_owned(),
440                        {
441                            let mut schema_obj = __gen.subschema_for::<crate::apimachinery::pkg::apis::meta::v1::ObjectMeta>().into_object();
442                            schema_obj.metadata = Some(Box::new(crate::schemars::schema::Metadata {
443                                description: Some("Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata".to_owned()),
444                                ..Default::default()
445                            }));
446                            crate::schemars::schema::Schema::Object(schema_obj)
447                        },
448                    ),
449                    (
450                        "note".to_owned(),
451                        crate::schemars::schema::Schema::Object(crate::schemars::schema::SchemaObject {
452                            metadata: Some(Box::new(crate::schemars::schema::Metadata {
453                                description: Some("note is a human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.".to_owned()),
454                                ..Default::default()
455                            })),
456                            instance_type: Some(crate::schemars::schema::SingleOrVec::Single(Box::new(crate::schemars::schema::InstanceType::String))),
457                            ..Default::default()
458                        }),
459                    ),
460                    (
461                        "reason".to_owned(),
462                        crate::schemars::schema::Schema::Object(crate::schemars::schema::SchemaObject {
463                            metadata: Some(Box::new(crate::schemars::schema::Metadata {
464                                description: Some("reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.".to_owned()),
465                                ..Default::default()
466                            })),
467                            instance_type: Some(crate::schemars::schema::SingleOrVec::Single(Box::new(crate::schemars::schema::InstanceType::String))),
468                            ..Default::default()
469                        }),
470                    ),
471                    (
472                        "regarding".to_owned(),
473                        {
474                            let mut schema_obj = __gen.subschema_for::<crate::api::core::v1::ObjectReference>().into_object();
475                            schema_obj.metadata = Some(Box::new(crate::schemars::schema::Metadata {
476                                description: Some("regarding contains the object this Event is about. In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.".to_owned()),
477                                ..Default::default()
478                            }));
479                            crate::schemars::schema::Schema::Object(schema_obj)
480                        },
481                    ),
482                    (
483                        "related".to_owned(),
484                        {
485                            let mut schema_obj = __gen.subschema_for::<crate::api::core::v1::ObjectReference>().into_object();
486                            schema_obj.metadata = Some(Box::new(crate::schemars::schema::Metadata {
487                                description: Some("related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.".to_owned()),
488                                ..Default::default()
489                            }));
490                            crate::schemars::schema::Schema::Object(schema_obj)
491                        },
492                    ),
493                    (
494                        "reportingController".to_owned(),
495                        crate::schemars::schema::Schema::Object(crate::schemars::schema::SchemaObject {
496                            metadata: Some(Box::new(crate::schemars::schema::Metadata {
497                                description: Some("reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.".to_owned()),
498                                ..Default::default()
499                            })),
500                            instance_type: Some(crate::schemars::schema::SingleOrVec::Single(Box::new(crate::schemars::schema::InstanceType::String))),
501                            ..Default::default()
502                        }),
503                    ),
504                    (
505                        "reportingInstance".to_owned(),
506                        crate::schemars::schema::Schema::Object(crate::schemars::schema::SchemaObject {
507                            metadata: Some(Box::new(crate::schemars::schema::Metadata {
508                                description: Some("reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.".to_owned()),
509                                ..Default::default()
510                            })),
511                            instance_type: Some(crate::schemars::schema::SingleOrVec::Single(Box::new(crate::schemars::schema::InstanceType::String))),
512                            ..Default::default()
513                        }),
514                    ),
515                    (
516                        "series".to_owned(),
517                        {
518                            let mut schema_obj = __gen.subschema_for::<crate::api::events::v1::EventSeries>().into_object();
519                            schema_obj.metadata = Some(Box::new(crate::schemars::schema::Metadata {
520                                description: Some("series is data about the Event series this event represents or nil if it's a singleton Event.".to_owned()),
521                                ..Default::default()
522                            }));
523                            crate::schemars::schema::Schema::Object(schema_obj)
524                        },
525                    ),
526                    (
527                        "type".to_owned(),
528                        crate::schemars::schema::Schema::Object(crate::schemars::schema::SchemaObject {
529                            metadata: Some(Box::new(crate::schemars::schema::Metadata {
530                                description: Some("type is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events.".to_owned()),
531                                ..Default::default()
532                            })),
533                            instance_type: Some(crate::schemars::schema::SingleOrVec::Single(Box::new(crate::schemars::schema::InstanceType::String))),
534                            ..Default::default()
535                        }),
536                    ),
537                ].into(),
538                required: [
539                    "metadata".to_owned(),
540                ].into(),
541                ..Default::default()
542            })),
543            ..Default::default()
544        })
545    }
546}