svix_webhook_with_clone/models/
environment_out.rs

1/*
2 * Svix API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.1.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[allow(unused_imports)]
12use crate::models;
13#[allow(unused_imports)]
14use serde::{Deserialize, Serialize};
15        
16                #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
17                pub struct EnvironmentOut {
18                        #[serde(rename = "createdAt")]
19                        pub created_at: String,
20                        #[serde(rename = "eventTypes")]
21                        pub event_types: Vec<models::EventTypeOut>,
22                        #[serde(rename = "settings", deserialize_with = "Option::deserialize")]
23                        pub settings: Option<serde_json::Value>,
24                        #[serde(rename = "transformationTemplates")]
25                        pub transformation_templates: Vec<models::TemplateOut>,
26                        #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
27                        pub version: Option<i32>,
28                    }
29
30                    impl EnvironmentOut {
31                    pub fn new(created_at: String, event_types: Vec<models::EventTypeOut>, settings: Option<serde_json::Value>, transformation_templates: Vec<models::TemplateOut>) -> EnvironmentOut {
32                EnvironmentOut {
33                    created_at,
34                    event_types,
35                    settings,
36                    transformation_templates,
37                    version: None,
38                    }
39                    }
40                    }
41