hcloud/models/
change_network_protection_response.rs

1/*
2 * Hetzner Cloud API
3 *
4 * Copied from the official API documentation for the Public Hetzner Cloud.
5 *
6 * The version of the OpenAPI document: 0.26.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ChangeNetworkProtectionResponse : Response to POST https://api.hetzner.cloud/v1/networks/{id}/actions/change_protection
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ChangeNetworkProtectionResponse {
17    #[serde(rename = "action")]
18    pub action: Box<models::Action>,
19}
20
21impl ChangeNetworkProtectionResponse {
22    /// Response to POST https://api.hetzner.cloud/v1/networks/{id}/actions/change_protection
23    pub fn new(action: models::Action) -> ChangeNetworkProtectionResponse {
24        ChangeNetworkProtectionResponse {
25            action: Box::new(action),
26        }
27    }
28}