svix_webhook_with_clone/models/duration.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 Duration {
18 #[serde(rename = "nanos")]
19 pub nanos: i32,
20 #[serde(rename = "secs")]
21 pub secs: i32,
22 }
23
24 impl Duration {
25 pub fn new(nanos: i32, secs: i32) -> Duration {
26 Duration {
27 nanos,
28 secs,
29 }
30 }
31 }
32