hcloud 0.25.0

Unofficial Rust crate for accessing the Hetzner Cloud API
Documentation
/*
 * Hetzner Cloud API
 *
 * Copied from the official API documentation for the Public Hetzner Cloud.
 *
 * The version of the OpenAPI document: 0.28.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

/// SubaccountAccessSetting : Access settings for the Subaccount.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SubaccountAccessSetting {
    /// Whether access from outside the Hetzner network is allowed.
    #[serde(rename = "reachable_externally")]
    pub reachable_externally: bool,
    /// Whether the Subaccount is read-only.
    #[serde(rename = "readonly")]
    pub readonly: bool,
    /// Whether the Samba subsystem is enabled.
    #[serde(rename = "samba_enabled")]
    pub samba_enabled: bool,
    /// Whether the SSH subsystem is enabled.
    #[serde(rename = "ssh_enabled")]
    pub ssh_enabled: bool,
    /// Whether the WebDAV subsystem is enabled.
    #[serde(rename = "webdav_enabled")]
    pub webdav_enabled: bool,
}

impl SubaccountAccessSetting {
    /// Access settings for the Subaccount.
    pub fn new(
        reachable_externally: bool,
        readonly: bool,
        samba_enabled: bool,
        ssh_enabled: bool,
        webdav_enabled: bool,
    ) -> SubaccountAccessSetting {
        SubaccountAccessSetting {
            reachable_externally,
            readonly,
            samba_enabled,
            ssh_enabled,
            webdav_enabled,
        }
    }
}