/*
 * 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>
    /// CreateNodesSingleStorageSingleUploadRequest
    /// </summary>
    [DataContract(Name = "CreateNodesSingleStorageSingleUploadRequest")]
    public partial class CreateNodesSingleStorageSingleUploadRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleStorageSingleUploadRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateNodesSingleStorageSingleUploadRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleStorageSingleUploadRequest" /> class.
        /// </summary>
        /// <param name="checksum">checksum.</param>
        /// <param name="checksumAlgorithm">checksumAlgorithm.</param>
        /// <param name="content">content (required).</param>
        /// <param name="filename">filename (required).</param>
        /// <param name="tmpfilename">tmpfilename.</param>
        public CreateNodesSingleStorageSingleUploadRequest(string checksum = default(string), string checksumAlgorithm = default(string), string content = default(string), string filename = default(string), string tmpfilename = default(string))
        {
            // to ensure "content" is required (not null)
            if (content == null)
            {
                throw new ArgumentNullException("content is a required property for CreateNodesSingleStorageSingleUploadRequest and cannot be null");
            }
            this.Content = content;
            // to ensure "filename" is required (not null)
            if (filename == null)
            {
                throw new ArgumentNullException("filename is a required property for CreateNodesSingleStorageSingleUploadRequest and cannot be null");
            }
            this.Filename = filename;
            this.Checksum = checksum;
            this.ChecksumAlgorithm = checksumAlgorithm;
            this.Tmpfilename = tmpfilename;
        }

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

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

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

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

        /// <summary>
        /// Gets or Sets Tmpfilename
        /// </summary>
        [DataMember(Name = "tmpfilename", EmitDefaultValue = false)]
        public string Tmpfilename { 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 CreateNodesSingleStorageSingleUploadRequest {\n");
            sb.Append("  Checksum: ").Append(Checksum).Append("\n");
            sb.Append("  ChecksumAlgorithm: ").Append(ChecksumAlgorithm).Append("\n");
            sb.Append("  Content: ").Append(Content).Append("\n");
            sb.Append("  Filename: ").Append(Filename).Append("\n");
            sb.Append("  Tmpfilename: ").Append(Tmpfilename).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;
        }
    }

}
