gcloud-sdk 0.30.0

Async Google gRPC/REST APIs and the client implementation hiding complexity of GCP authentication based on Tonic middleware and Reqwest.
Documentation
use serde::{Deserialize, Serialize}; /*
                                      * Cloud DNS API
                                      *
                                      * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::dns_v1::models;

/// Change : A Change represents a set of ResourceRecordSet additions and deletions applied atomically to a ManagedZone. ResourceRecordSets within a ManagedZone are modified by creating a new Change element in the Changes collection. In turn the Changes collection also records the past modifications to the ResourceRecordSets in a ManagedZone. The current state of the ManagedZone is the sum effect of applying all Change elements in the Changes collection in sequence.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Change {
    /// Which ResourceRecordSets to add?
    #[serde(rename = "additions", skip_serializing_if = "Option::is_none")]
    pub additions: Option<Vec<models::ResourceRecordSet>>,
    /// Which ResourceRecordSets to remove? Must match existing data exactly.
    #[serde(rename = "deletions", skip_serializing_if = "Option::is_none")]
    pub deletions: Option<Vec<models::ResourceRecordSet>>,
    /// Unique identifier for the resource; defined by the server (output only).
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// If the DNS queries for the zone will be served.
    #[serde(rename = "isServing", skip_serializing_if = "Option::is_none")]
    pub is_serving: Option<bool>,
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// The time that this operation was started by the server (output only). This is in RFC3339 text format.
    #[serde(rename = "startTime", skip_serializing_if = "Option::is_none")]
    pub start_time: Option<String>,
    /// Status of the operation (output only). A status of \"done\" means that the request to update the authoritative servers has been sent, but the servers might not be updated yet.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
}

impl Change {
    /// A Change represents a set of ResourceRecordSet additions and deletions applied atomically to a ManagedZone. ResourceRecordSets within a ManagedZone are modified by creating a new Change element in the Changes collection. In turn the Changes collection also records the past modifications to the ResourceRecordSets in a ManagedZone. The current state of the ManagedZone is the sum effect of applying all Change elements in the Changes collection in sequence.
    pub fn new() -> Change {
        Change {
            additions: None,
            deletions: None,
            id: None,
            is_serving: None,
            kind: None,
            start_time: None,
            status: None,
        }
    }
}
/// Status of the operation (output only). A status of \"done\" means that the request to update the authoritative servers has been sent, but the servers might not be updated yet.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "pending")]
    Pending,
    #[serde(rename = "done")]
    Done,
}

impl Default for Status {
    fn default() -> Status {
        Self::Pending
    }
}