/*
 * 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>
    /// CreateNodesSingleCephPoolRequest
    /// </summary>
    [DataContract(Name = "CreateNodesSingleCephPoolRequest")]
    public partial class CreateNodesSingleCephPoolRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleCephPoolRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateNodesSingleCephPoolRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleCephPoolRequest" /> class.
        /// </summary>
        /// <param name="addStorages">addStorages.</param>
        /// <param name="application">application.</param>
        /// <param name="crushRule">crushRule.</param>
        /// <param name="erasureCoding">erasureCoding.</param>
        /// <param name="minSize">minSize.</param>
        /// <param name="name">name (required).</param>
        /// <param name="pgAutoscaleMode">pgAutoscaleMode.</param>
        /// <param name="pgNum">pgNum.</param>
        /// <param name="pgNumMin">pgNumMin.</param>
        /// <param name="size">size.</param>
        /// <param name="targetSize">targetSize.</param>
        /// <param name="targetSizeRatio">targetSizeRatio.</param>
        public CreateNodesSingleCephPoolRequest(bool addStorages = default(bool), string application = default(string), string crushRule = default(string), string erasureCoding = default(string), int minSize = default(int), string name = default(string), string pgAutoscaleMode = default(string), int pgNum = default(int), int pgNumMin = default(int), int size = default(int), string targetSize = default(string), decimal targetSizeRatio = default(decimal))
        {
            // to ensure "name" is required (not null)
            if (name == null)
            {
                throw new ArgumentNullException("name is a required property for CreateNodesSingleCephPoolRequest and cannot be null");
            }
            this.Name = name;
            this.AddStorages = addStorages;
            this.Application = application;
            this.CrushRule = crushRule;
            this.ErasureCoding = erasureCoding;
            this.MinSize = minSize;
            this.PgAutoscaleMode = pgAutoscaleMode;
            this.PgNum = pgNum;
            this.PgNumMin = pgNumMin;
            this.Size = size;
            this.TargetSize = targetSize;
            this.TargetSizeRatio = targetSizeRatio;
        }

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

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

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

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

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

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

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

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

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

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

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

        /// <summary>
        /// Gets or Sets TargetSizeRatio
        /// </summary>
        [DataMember(Name = "target_size_ratio", EmitDefaultValue = false)]
        public decimal TargetSizeRatio { 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 CreateNodesSingleCephPoolRequest {\n");
            sb.Append("  AddStorages: ").Append(AddStorages).Append("\n");
            sb.Append("  Application: ").Append(Application).Append("\n");
            sb.Append("  CrushRule: ").Append(CrushRule).Append("\n");
            sb.Append("  ErasureCoding: ").Append(ErasureCoding).Append("\n");
            sb.Append("  MinSize: ").Append(MinSize).Append("\n");
            sb.Append("  Name: ").Append(Name).Append("\n");
            sb.Append("  PgAutoscaleMode: ").Append(PgAutoscaleMode).Append("\n");
            sb.Append("  PgNum: ").Append(PgNum).Append("\n");
            sb.Append("  PgNumMin: ").Append(PgNumMin).Append("\n");
            sb.Append("  Size: ").Append(Size).Append("\n");
            sb.Append("  TargetSize: ").Append(TargetSize).Append("\n");
            sb.Append("  TargetSizeRatio: ").Append(TargetSizeRatio).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;
        }
    }

}
