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

/// StorageBoxAccessSetting : Access settings of the Storage Box.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StorageBoxAccessSetting {
    /// Whether access from outside the Hetzner network is allowed.
    #[serde(rename = "reachable_externally")]
    pub reachable_externally: 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,
    /// Whether the ZFS snapshot folder is visible.
    #[serde(rename = "zfs_enabled")]
    pub zfs_enabled: bool,
}

impl StorageBoxAccessSetting {
    /// Access settings of the Storage Box.
    pub fn new(
        reachable_externally: bool,
        samba_enabled: bool,
        ssh_enabled: bool,
        webdav_enabled: bool,
        zfs_enabled: bool,
    ) -> StorageBoxAccessSetting {
        StorageBoxAccessSetting {
            reachable_externally,
            samba_enabled,
            ssh_enabled,
            webdav_enabled,
            zfs_enabled,
        }
    }
}
