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

/// ResourceRecord : Record of a RRSet.  The `value` is used to identify the record in an RRSet.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ResourceRecord {
    /// Comment of the record.
    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
    pub comment: Option<String>,
    /// Value of the record.  For details about accepted values, see the [DNS record types documentation](https://docs.hetzner.com/networking/dns/record-types/overview/).
    #[serde(rename = "value")]
    pub value: String,
}

impl ResourceRecord {
    /// Record of a RRSet.  The `value` is used to identify the record in an RRSet.
    pub fn new(value: String) -> ResourceRecord {
        ResourceRecord {
            comment: None,
            value,
        }
    }
}
