Skip to main content

nautobot_openapi/models/
bulk_writable_secret_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/// BulkWritableSecretRequest : Serializer for `Secret` objects.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct BulkWritableSecretRequest {
15    #[serde(rename = "id")]
16    pub id: uuid::Uuid,
17    #[serde(rename = "name")]
18    pub name: String,
19    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
20    pub description: Option<String>,
21    #[serde(rename = "provider")]
22    pub provider: String,
23    #[serde(
24        rename = "parameters",
25        default,
26        with = "::serde_with::rust::double_option",
27        skip_serializing_if = "Option::is_none"
28    )]
29    pub parameters: Option<Option<serde_json::Value>>,
30    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
31    pub tags: Option<Vec<crate::models::ApprovalWorkflowStageResponseApprovalWorkflowStage>>,
32    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
33    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
34    #[serde(rename = "relationships", skip_serializing_if = "Option::is_none")]
35    pub relationships: Option<
36        ::std::collections::HashMap<
37            String,
38            crate::models::ApprovalWorkflowDefinitionRequestRelationshipsValue,
39        >,
40    >,
41}
42
43impl BulkWritableSecretRequest {
44    /// Serializer for `Secret` objects.
45    pub fn new(id: uuid::Uuid, name: String, provider: String) -> BulkWritableSecretRequest {
46        BulkWritableSecretRequest {
47            id,
48            name,
49            description: None,
50            provider,
51            parameters: None,
52            tags: None,
53            custom_fields: None,
54            relationships: None,
55        }
56    }
57}