Skip to main content

nautobot_openapi/models/
health_check_monitor_request.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// HealthCheckMonitorRequest : HealthCheckMonitor Serializer.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct HealthCheckMonitorRequest {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<uuid::Uuid>,
17    #[serde(rename = "name")]
18    pub name: String,
19    #[serde(
20        rename = "interval",
21        default,
22        with = "::serde_with::rust::double_option",
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub interval: Option<Option<i32>>,
26    /// Number of retries before marking as down
27    #[serde(
28        rename = "retry",
29        default,
30        with = "::serde_with::rust::double_option",
31        skip_serializing_if = "Option::is_none"
32    )]
33    pub retry: Option<Option<i32>>,
34    #[serde(
35        rename = "timeout",
36        default,
37        with = "::serde_with::rust::double_option",
38        skip_serializing_if = "Option::is_none"
39    )]
40    pub timeout: Option<Option<i32>>,
41    #[serde(
42        rename = "port",
43        default,
44        with = "::serde_with::rust::double_option",
45        skip_serializing_if = "Option::is_none"
46    )]
47    pub port: Option<Option<i32>>,
48    #[serde(rename = "health_check_type", skip_serializing_if = "Option::is_none")]
49    pub health_check_type:
50        Option<Box<crate::models::BulkWritableHealthCheckMonitorRequestHealthCheckType>>,
51    #[serde(
52        rename = "tenant",
53        default,
54        with = "::serde_with::rust::double_option",
55        skip_serializing_if = "Option::is_none"
56    )]
57    pub tenant: Option<Option<Box<crate::models::ApprovalWorkflowUser>>>,
58    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
59    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
60    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
61    pub relationships: Option<
62        ::std::collections::HashMap<
63            String,
64            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
65        >,
66    >,
67    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
68    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
69}
70
71impl HealthCheckMonitorRequest {
72    /// HealthCheckMonitor Serializer.
73    pub fn new(name: String) -> HealthCheckMonitorRequest {
74        HealthCheckMonitorRequest {
75            id: None,
76            name,
77            interval: None,
78            retry: None,
79            timeout: None,
80            port: None,
81            health_check_type: None,
82            tenant: None,
83            custom_fields: None,
84            relationships: None,
85            tags: None,
86        }
87    }
88}