/*
 * 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};

/// UpdateRecordsOfRrsetRequest : Request for POST https://api.hetzner.cloud/v1/zones/{id_or_name}/rrsets/{rr_name}/{rr_type}/actions/update_records
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateRecordsOfRrsetRequest {
    /// Records to update in the RRSet.  Must not be empty and must only contain distinct record values.
    #[serde(rename = "records")]
    pub records: Vec<models::ResourceRecordWithComment>,
}

impl UpdateRecordsOfRrsetRequest {
    /// Request for POST https://api.hetzner.cloud/v1/zones/{id_or_name}/rrsets/{rr_name}/{rr_type}/actions/update_records
    pub fn new(records: Vec<models::ResourceRecordWithComment>) -> UpdateRecordsOfRrsetRequest {
        UpdateRecordsOfRrsetRequest { records }
    }
}
