/*
 * ProxMox VE API
 *
 * ProxMox VE API
 *
 * The version of the OpenAPI document: 2.0
 * Contact: support@lumaserv.com
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = ProxmoxSharp.Client.OpenAPIDateConverter;

namespace ProxmoxSharp.Model
{
    /// <summary>
    /// CreateNodesSingleDisksZfsRequest
    /// </summary>
    [DataContract(Name = "CreateNodesSingleDisksZfsRequest")]
    public partial class CreateNodesSingleDisksZfsRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleDisksZfsRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateNodesSingleDisksZfsRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleDisksZfsRequest" /> class.
        /// </summary>
        /// <param name="addStorage">addStorage.</param>
        /// <param name="ashift">ashift.</param>
        /// <param name="compression">compression.</param>
        /// <param name="devices">devices (required).</param>
        /// <param name="draidConfig">draidConfig.</param>
        /// <param name="name">name (required).</param>
        /// <param name="raidlevel">raidlevel (required).</param>
        public CreateNodesSingleDisksZfsRequest(bool addStorage = default(bool), int ashift = default(int), string compression = default(string), string devices = default(string), string draidConfig = default(string), string name = default(string), string raidlevel = default(string))
        {
            // to ensure "devices" is required (not null)
            if (devices == null)
            {
                throw new ArgumentNullException("devices is a required property for CreateNodesSingleDisksZfsRequest and cannot be null");
            }
            this.Devices = devices;
            // to ensure "name" is required (not null)
            if (name == null)
            {
                throw new ArgumentNullException("name is a required property for CreateNodesSingleDisksZfsRequest and cannot be null");
            }
            this.Name = name;
            // to ensure "raidlevel" is required (not null)
            if (raidlevel == null)
            {
                throw new ArgumentNullException("raidlevel is a required property for CreateNodesSingleDisksZfsRequest and cannot be null");
            }
            this.Raidlevel = raidlevel;
            this.AddStorage = addStorage;
            this.Ashift = ashift;
            this.Compression = compression;
            this.DraidConfig = draidConfig;
        }

        /// <summary>
        /// Gets or Sets AddStorage
        /// </summary>
        [DataMember(Name = "add_storage", EmitDefaultValue = true)]
        public bool AddStorage { get; set; }

        /// <summary>
        /// Gets or Sets Ashift
        /// </summary>
        [DataMember(Name = "ashift", EmitDefaultValue = false)]
        public int Ashift { get; set; }

        /// <summary>
        /// Gets or Sets Compression
        /// </summary>
        [DataMember(Name = "compression", EmitDefaultValue = false)]
        public string Compression { get; set; }

        /// <summary>
        /// Gets or Sets Devices
        /// </summary>
        [DataMember(Name = "devices", IsRequired = true, EmitDefaultValue = true)]
        public string Devices { get; set; }

        /// <summary>
        /// Gets or Sets DraidConfig
        /// </summary>
        [DataMember(Name = "draid-config", EmitDefaultValue = false)]
        public string DraidConfig { get; set; }

        /// <summary>
        /// Gets or Sets Name
        /// </summary>
        [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)]
        public string Name { get; set; }

        /// <summary>
        /// Gets or Sets Raidlevel
        /// </summary>
        [DataMember(Name = "raidlevel", IsRequired = true, EmitDefaultValue = true)]
        public string Raidlevel { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class CreateNodesSingleDisksZfsRequest {\n");
            sb.Append("  AddStorage: ").Append(AddStorage).Append("\n");
            sb.Append("  Ashift: ").Append(Ashift).Append("\n");
            sb.Append("  Compression: ").Append(Compression).Append("\n");
            sb.Append("  Devices: ").Append(Devices).Append("\n");
            sb.Append("  DraidConfig: ").Append(DraidConfig).Append("\n");
            sb.Append("  Name: ").Append(Name).Append("\n");
            sb.Append("  Raidlevel: ").Append(Raidlevel).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
