Skip to main content

nautobot_openapi/models/
bulk_writable_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/// BulkWritableStatusRequest : Serializer for `Status` objects.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BulkWritableStatusRequest {
15    #[serde(rename = "id")]
16    pub id: 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 BulkWritableStatusRequest {
38    /// Serializer for `Status` objects.
39    pub fn new(
40        id: uuid::Uuid,
41        content_types: Vec<String>,
42        name: String,
43    ) -> BulkWritableStatusRequest {
44        BulkWritableStatusRequest {
45            id,
46            content_types,
47            name,
48            color: None,
49            description: None,
50            custom_fields: None,
51            relationships: None,
52        }
53    }
54}