/*
 * 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>
    /// CreateNodesSingleStorageSingleContentRequest
    /// </summary>
    [DataContract(Name = "CreateNodesSingleStorageSingleContentRequest")]
    public partial class CreateNodesSingleStorageSingleContentRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleStorageSingleContentRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateNodesSingleStorageSingleContentRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleStorageSingleContentRequest" /> class.
        /// </summary>
        /// <param name="filename">filename (required).</param>
        /// <param name="format">format.</param>
        /// <param name="size">size (required).</param>
        /// <param name="vmid">vmid (required).</param>
        public CreateNodesSingleStorageSingleContentRequest(string filename = default(string), string format = default(string), string size = default(string), int vmid = default(int))
        {
            // to ensure "filename" is required (not null)
            if (filename == null)
            {
                throw new ArgumentNullException("filename is a required property for CreateNodesSingleStorageSingleContentRequest and cannot be null");
            }
            this.Filename = filename;
            // to ensure "size" is required (not null)
            if (size == null)
            {
                throw new ArgumentNullException("size is a required property for CreateNodesSingleStorageSingleContentRequest and cannot be null");
            }
            this.Size = size;
            this.Vmid = vmid;
            this.Format = format;
        }

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

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

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

        /// <summary>
        /// Gets or Sets Vmid
        /// </summary>
        [DataMember(Name = "vmid", IsRequired = true, EmitDefaultValue = true)]
        public int Vmid { 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 CreateNodesSingleStorageSingleContentRequest {\n");
            sb.Append("  Filename: ").Append(Filename).Append("\n");
            sb.Append("  Format: ").Append(Format).Append("\n");
            sb.Append("  Size: ").Append(Size).Append("\n");
            sb.Append("  Vmid: ").Append(Vmid).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;
        }
    }

}
