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

/// UpdateAccessSettingsRequest : Request for POST https://api.hetzner.com/v1/storage_boxes/{id}/subaccounts/{subaccount_id}/actions/update_access_settings
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateAccessSettingsRequest {
    /// Whether access from outside the Hetzner network is allowed.
    #[serde(
        rename = "reachable_externally",
        skip_serializing_if = "Option::is_none"
    )]
    pub reachable_externally: Option<bool>,
    /// Whether the Subaccount is read-only.
    #[serde(rename = "readonly", skip_serializing_if = "Option::is_none")]
    pub readonly: Option<bool>,
    /// Whether the Samba subsystem is enabled.
    #[serde(rename = "samba_enabled", skip_serializing_if = "Option::is_none")]
    pub samba_enabled: Option<bool>,
    /// Whether the SSH subsystem is enabled.
    #[serde(rename = "ssh_enabled", skip_serializing_if = "Option::is_none")]
    pub ssh_enabled: Option<bool>,
    /// Whether the WebDAV subsystem is enabled.
    #[serde(rename = "webdav_enabled", skip_serializing_if = "Option::is_none")]
    pub webdav_enabled: Option<bool>,
}

impl UpdateAccessSettingsRequest {
    /// Request for POST https://api.hetzner.com/v1/storage_boxes/{id}/subaccounts/{subaccount_id}/actions/update_access_settings
    pub fn new() -> UpdateAccessSettingsRequest {
        UpdateAccessSettingsRequest {
            reachable_externally: None,
            readonly: None,
            samba_enabled: None,
            ssh_enabled: None,
            webdav_enabled: None,
        }
    }
}
