Skip to main content

nautobot_openapi/models/
status_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/// StatusRequest : Serializer for `Status` objects.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct StatusRequest {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<uuid::Uuid>,
17    #[serde(rename = "content_types")]
18    pub content_types: Vec<String>,
19    #[serde(rename = "name")]
20    pub name: String,
21    /// RGB color in hexadecimal (e.g. 00ff00)
22    #[serde(rename = "color", skip_serializing_if = "Option::is_none")]
23    pub color: Option<String>,
24    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
25    pub description: Option<String>,
26    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
27    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
28    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
29    pub relationships: Option<
30        ::std::collections::HashMap<
31            String,
32            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
33        >,
34    >,
35}
36
37impl StatusRequest {
38    /// Serializer for `Status` objects.
39    pub fn new(content_types: Vec<String>, name: String) -> StatusRequest {
40        StatusRequest {
41            id: None,
42            content_types,
43            name,
44            color: None,
45            description: None,
46            custom_fields: None,
47            relationships: None,
48        }
49    }
50}