/*
 * 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>
    /// CreateNodesSingleQemuSingleRemotemigrateRequest
    /// </summary>
    [DataContract(Name = "CreateNodesSingleQemuSingleRemotemigrateRequest")]
    public partial class CreateNodesSingleQemuSingleRemotemigrateRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleQemuSingleRemotemigrateRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateNodesSingleQemuSingleRemotemigrateRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleQemuSingleRemotemigrateRequest" /> class.
        /// </summary>
        /// <param name="bwlimit">bwlimit.</param>
        /// <param name="delete">delete.</param>
        /// <param name="online">online.</param>
        /// <param name="targetBridge">targetBridge (required).</param>
        /// <param name="targetEndpoint">targetEndpoint (required).</param>
        /// <param name="targetStorage">targetStorage (required).</param>
        /// <param name="targetVmid">targetVmid.</param>
        public CreateNodesSingleQemuSingleRemotemigrateRequest(int bwlimit = default(int), bool delete = default(bool), bool online = default(bool), string targetBridge = default(string), string targetEndpoint = default(string), string targetStorage = default(string), int targetVmid = default(int))
        {
            // to ensure "targetBridge" is required (not null)
            if (targetBridge == null)
            {
                throw new ArgumentNullException("targetBridge is a required property for CreateNodesSingleQemuSingleRemotemigrateRequest and cannot be null");
            }
            this.TargetBridge = targetBridge;
            // to ensure "targetEndpoint" is required (not null)
            if (targetEndpoint == null)
            {
                throw new ArgumentNullException("targetEndpoint is a required property for CreateNodesSingleQemuSingleRemotemigrateRequest and cannot be null");
            }
            this.TargetEndpoint = targetEndpoint;
            // to ensure "targetStorage" is required (not null)
            if (targetStorage == null)
            {
                throw new ArgumentNullException("targetStorage is a required property for CreateNodesSingleQemuSingleRemotemigrateRequest and cannot be null");
            }
            this.TargetStorage = targetStorage;
            this.Bwlimit = bwlimit;
            this.Delete = delete;
            this.Online = online;
            this.TargetVmid = targetVmid;
        }

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

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

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

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

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

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

        /// <summary>
        /// Gets or Sets TargetVmid
        /// </summary>
        [DataMember(Name = "target-vmid", EmitDefaultValue = false)]
        public int TargetVmid { 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 CreateNodesSingleQemuSingleRemotemigrateRequest {\n");
            sb.Append("  Bwlimit: ").Append(Bwlimit).Append("\n");
            sb.Append("  Delete: ").Append(Delete).Append("\n");
            sb.Append("  Online: ").Append(Online).Append("\n");
            sb.Append("  TargetBridge: ").Append(TargetBridge).Append("\n");
            sb.Append("  TargetEndpoint: ").Append(TargetEndpoint).Append("\n");
            sb.Append("  TargetStorage: ").Append(TargetStorage).Append("\n");
            sb.Append("  TargetVmid: ").Append(TargetVmid).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;
        }
    }

}
