/*
 * Hetzner Cloud API
 *
 * Copied from the official API documentation for the Public Hetzner Cloud.
 *
 * The version of the OpenAPI document: 4b3f595
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ChangeRrsetsTtlRequest : Request for POST https://api.hetzner.cloud/v1/zones/{id_or_name}/rrsets/{rr_name}/{rr_type}/actions/change_ttl
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ChangeRrsetsTtlRequest {
    /// Time To Live (TTL) of the RRSet.  Must be in between 60s and 2147483647s.  If not set, the Zone's Default TTL is used.
    #[serde(rename = "ttl", deserialize_with = "Option::deserialize")]
    pub ttl: Option<i32>,
}

impl ChangeRrsetsTtlRequest {
    /// Request for POST https://api.hetzner.cloud/v1/zones/{id_or_name}/rrsets/{rr_name}/{rr_type}/actions/change_ttl
    pub fn new(ttl: Option<i32>) -> ChangeRrsetsTtlRequest {
        ChangeRrsetsTtlRequest { ttl }
    }
}
