/*
 * 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>
    /// CreateNodesSingleQemuSingleMigrateRequest
    /// </summary>
    [DataContract(Name = "CreateNodesSingleQemuSingleMigrateRequest")]
    public partial class CreateNodesSingleQemuSingleMigrateRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleQemuSingleMigrateRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateNodesSingleQemuSingleMigrateRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleQemuSingleMigrateRequest" /> class.
        /// </summary>
        /// <param name="bwlimit">bwlimit.</param>
        /// <param name="force">force.</param>
        /// <param name="migrationNetwork">migrationNetwork.</param>
        /// <param name="migrationType">migrationType.</param>
        /// <param name="online">online.</param>
        /// <param name="target">target (required).</param>
        /// <param name="targetstorage">targetstorage.</param>
        /// <param name="withConntrackState">withConntrackState.</param>
        /// <param name="withLocalDisks">withLocalDisks.</param>
        public CreateNodesSingleQemuSingleMigrateRequest(int bwlimit = default(int), bool force = default(bool), string migrationNetwork = default(string), string migrationType = default(string), bool online = default(bool), string target = default(string), string targetstorage = default(string), bool withConntrackState = default(bool), bool withLocalDisks = default(bool))
        {
            // to ensure "target" is required (not null)
            if (target == null)
            {
                throw new ArgumentNullException("target is a required property for CreateNodesSingleQemuSingleMigrateRequest and cannot be null");
            }
            this.Target = target;
            this.Bwlimit = bwlimit;
            this.Force = force;
            this.MigrationNetwork = migrationNetwork;
            this.MigrationType = migrationType;
            this.Online = online;
            this.Targetstorage = targetstorage;
            this.WithConntrackState = withConntrackState;
            this.WithLocalDisks = withLocalDisks;
        }

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

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

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

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

        /// <summary>
        /// Gets or Sets Online
        /// </summary>
        [DataMember(Name = "online", EmitDefaultValue = true)]
        public bool Online { 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 = "targetstorage", EmitDefaultValue = false)]
        public string Targetstorage { get; set; }

        /// <summary>
        /// Gets or Sets WithConntrackState
        /// </summary>
        [DataMember(Name = "with-conntrack-state", EmitDefaultValue = true)]
        public bool WithConntrackState { get; set; }

        /// <summary>
        /// Gets or Sets WithLocalDisks
        /// </summary>
        [DataMember(Name = "with-local-disks", EmitDefaultValue = true)]
        public bool WithLocalDisks { 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 CreateNodesSingleQemuSingleMigrateRequest {\n");
            sb.Append("  Bwlimit: ").Append(Bwlimit).Append("\n");
            sb.Append("  Force: ").Append(Force).Append("\n");
            sb.Append("  MigrationNetwork: ").Append(MigrationNetwork).Append("\n");
            sb.Append("  MigrationType: ").Append(MigrationType).Append("\n");
            sb.Append("  Online: ").Append(Online).Append("\n");
            sb.Append("  Target: ").Append(Target).Append("\n");
            sb.Append("  Targetstorage: ").Append(Targetstorage).Append("\n");
            sb.Append("  WithConntrackState: ").Append(WithConntrackState).Append("\n");
            sb.Append("  WithLocalDisks: ").Append(WithLocalDisks).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;
        }
    }

}
