Skip to main content

openapi_service_fabric/models/
container_instance_view.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/// ContainerInstanceView : Runtime information of a container instance.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ContainerInstanceView {
17    /// The number of times the container has been restarted.
18    #[serde(rename = "restartCount", skip_serializing_if = "Option::is_none")]
19    pub restart_count: Option<i32>,
20    #[serde(rename = "currentState", skip_serializing_if = "Option::is_none")]
21    pub current_state: Option<Box<models::ContainerState>>,
22    #[serde(rename = "previousState", skip_serializing_if = "Option::is_none")]
23    pub previous_state: Option<Box<models::ContainerState>>,
24    /// The events of this container instance.
25    #[serde(rename = "events", skip_serializing_if = "Option::is_none")]
26    pub events: Option<Vec<models::ContainerEvent>>,
27}
28
29impl ContainerInstanceView {
30    /// Runtime information of a container instance.
31    pub fn new() -> ContainerInstanceView {
32        ContainerInstanceView {
33            restart_count: None,
34            current_state: None,
35            previous_state: None,
36            events: None,
37        }
38    }
39}