Skip to main content

openapi_service_fabric/models/
application_container_instance_exited_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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ApplicationContainerInstanceExitedEvent {
16    #[serde(rename = "Kind")]
17    pub kind: models::FabricEventKind,
18    /// The identifier for the FabricEvent instance.
19    #[serde(rename = "EventInstanceId")]
20    pub event_instance_id: uuid::Uuid,
21    /// The category of event.
22    #[serde(rename = "Category", skip_serializing_if = "Option::is_none")]
23    pub category: Option<String>,
24    /// The time event was logged.
25    #[serde(rename = "TimeStamp")]
26    pub time_stamp: String,
27    /// Shows there is existing related events available.
28    #[serde(
29        rename = "HasCorrelatedEvents",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub has_correlated_events: Option<bool>,
33    /// The identity of the application. This is an encoded representation of the application name. This is used in the REST APIs to identify the application resource. Starting in version 6.0, hierarchical names are delimited with the \"\\~\" character. For example, if the application name is \"fabric:/myapp/app1\", the application identity would be \"myapp\\~app1\" in 6.0+ and \"myapp/app1\" in previous versions.
34    #[serde(rename = "ApplicationId")]
35    pub application_id: String,
36    /// Name of Service.
37    #[serde(rename = "ServiceName")]
38    pub service_name: String,
39    /// Name of Service package.
40    #[serde(rename = "ServicePackageName")]
41    pub service_package_name: String,
42    /// Activation Id of Service package.
43    #[serde(rename = "ServicePackageActivationId")]
44    pub service_package_activation_id: String,
45    /// Indicates IsExclusive flag.
46    #[serde(rename = "IsExclusive")]
47    pub is_exclusive: bool,
48    /// Name of Code package.
49    #[serde(rename = "CodePackageName")]
50    pub code_package_name: String,
51    /// Type of EntryPoint.
52    #[serde(rename = "EntryPointType")]
53    pub entry_point_type: String,
54    /// Name of Container image.
55    #[serde(rename = "ImageName")]
56    pub image_name: String,
57    /// Name of Container.
58    #[serde(rename = "ContainerName")]
59    pub container_name: String,
60    /// Host Id.
61    #[serde(rename = "HostId")]
62    pub host_id: String,
63    /// Exit code of process.
64    #[serde(rename = "ExitCode")]
65    pub exit_code: i64,
66    /// Indicates if termination is unexpected.
67    #[serde(rename = "UnexpectedTermination")]
68    pub unexpected_termination: bool,
69    /// Start time of process.
70    #[serde(rename = "StartTime")]
71    pub start_time: String,
72}
73
74impl ApplicationContainerInstanceExitedEvent {
75    pub fn new(
76        kind: models::FabricEventKind,
77        event_instance_id: uuid::Uuid,
78        time_stamp: String,
79        application_id: String,
80        service_name: String,
81        service_package_name: String,
82        service_package_activation_id: String,
83        is_exclusive: bool,
84        code_package_name: String,
85        entry_point_type: String,
86        image_name: String,
87        container_name: String,
88        host_id: String,
89        exit_code: i64,
90        unexpected_termination: bool,
91        start_time: String,
92    ) -> ApplicationContainerInstanceExitedEvent {
93        ApplicationContainerInstanceExitedEvent {
94            kind,
95            event_instance_id,
96            category: None,
97            time_stamp,
98            has_correlated_events: None,
99            application_id,
100            service_name,
101            service_package_name,
102            service_package_activation_id,
103            is_exclusive,
104            code_package_name,
105            entry_point_type,
106            image_name,
107            container_name,
108            host_id,
109            exit_code,
110            unexpected_termination,
111            start_time,
112        }
113    }
114}