/*
 * 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>
    /// CreateNodesSingleLxcSingleMigrateRequest
    /// </summary>
    [DataContract(Name = "CreateNodesSingleLxcSingleMigrateRequest")]
    public partial class CreateNodesSingleLxcSingleMigrateRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleLxcSingleMigrateRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateNodesSingleLxcSingleMigrateRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleLxcSingleMigrateRequest" /> class.
        /// </summary>
        /// <param name="bwlimit">bwlimit.</param>
        /// <param name="online">online.</param>
        /// <param name="restart">restart.</param>
        /// <param name="target">target (required).</param>
        /// <param name="targetStorage">targetStorage.</param>
        /// <param name="timeout">timeout.</param>
        public CreateNodesSingleLxcSingleMigrateRequest(decimal bwlimit = default(decimal), bool online = default(bool), bool restart = default(bool), string target = default(string), string targetStorage = default(string), int timeout = default(int))
        {
            // to ensure "target" is required (not null)
            if (target == null)
            {
                throw new ArgumentNullException("target is a required property for CreateNodesSingleLxcSingleMigrateRequest and cannot be null");
            }
            this.Target = target;
            this.Bwlimit = bwlimit;
            this.Online = online;
            this.Restart = restart;
            this.TargetStorage = targetStorage;
            this.Timeout = timeout;
        }

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

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

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

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

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

        /// <summary>
        /// Gets or Sets Timeout
        /// </summary>
        [DataMember(Name = "timeout", EmitDefaultValue = false)]
        public int Timeout { 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 CreateNodesSingleLxcSingleMigrateRequest {\n");
            sb.Append("  Bwlimit: ").Append(Bwlimit).Append("\n");
            sb.Append("  Online: ").Append(Online).Append("\n");
            sb.Append("  Restart: ").Append(Restart).Append("\n");
            sb.Append("  Target: ").Append(Target).Append("\n");
            sb.Append("  TargetStorage: ").Append(TargetStorage).Append("\n");
            sb.Append("  Timeout: ").Append(Timeout).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;
        }
    }

}
