Skip to main content

openapi_service_fabric/models/
container_instance_event.rs

1/*
2 * Service Fabric Client APIs
3 *
4 * Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and services.
5 *
6 * The version of the OpenAPI document: 8.2
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ContainerInstanceEvent : Represents the base for all Container Events.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ContainerInstanceEvent {
17    #[serde(rename = "Kind")]
18    pub kind: models::FabricEventKind,
19    /// The identifier for the FabricEvent instance.
20    #[serde(rename = "EventInstanceId")]
21    pub event_instance_id: uuid::Uuid,
22    /// The category of event.
23    #[serde(rename = "Category", skip_serializing_if = "Option::is_none")]
24    pub category: Option<String>,
25    /// The time event was logged.
26    #[serde(rename = "TimeStamp")]
27    pub time_stamp: String,
28    /// Shows there is existing related events available.
29    #[serde(
30        rename = "HasCorrelatedEvents",
31        skip_serializing_if = "Option::is_none"
32    )]
33    pub has_correlated_events: Option<bool>,
34}
35
36impl ContainerInstanceEvent {
37    /// Represents the base for all Container Events.
38    pub fn new(
39        kind: models::FabricEventKind,
40        event_instance_id: uuid::Uuid,
41        time_stamp: String,
42    ) -> ContainerInstanceEvent {
43        ContainerInstanceEvent {
44            kind,
45            event_instance_id,
46            category: None,
47            time_stamp,
48            has_correlated_events: None,
49        }
50    }
51}