/*
 * 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>
    /// CreateNodesSingleQemuSingleAgentSetuserpasswordRequest
    /// </summary>
    [DataContract(Name = "CreateNodesSingleQemuSingleAgentSetuserpasswordRequest")]
    public partial class CreateNodesSingleQemuSingleAgentSetuserpasswordRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleQemuSingleAgentSetuserpasswordRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateNodesSingleQemuSingleAgentSetuserpasswordRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateNodesSingleQemuSingleAgentSetuserpasswordRequest" /> class.
        /// </summary>
        /// <param name="crypted">crypted.</param>
        /// <param name="password">password (required).</param>
        /// <param name="username">username (required).</param>
        public CreateNodesSingleQemuSingleAgentSetuserpasswordRequest(bool crypted = default(bool), string password = default(string), string username = default(string))
        {
            // to ensure "password" is required (not null)
            if (password == null)
            {
                throw new ArgumentNullException("password is a required property for CreateNodesSingleQemuSingleAgentSetuserpasswordRequest and cannot be null");
            }
            this.Password = password;
            // to ensure "username" is required (not null)
            if (username == null)
            {
                throw new ArgumentNullException("username is a required property for CreateNodesSingleQemuSingleAgentSetuserpasswordRequest and cannot be null");
            }
            this.Username = username;
            this.Crypted = crypted;
        }

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

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

        /// <summary>
        /// Gets or Sets Username
        /// </summary>
        [DataMember(Name = "username", IsRequired = true, EmitDefaultValue = true)]
        public string Username { 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 CreateNodesSingleQemuSingleAgentSetuserpasswordRequest {\n");
            sb.Append("  Crypted: ").Append(Crypted).Append("\n");
            sb.Append("  Password: ").Append(Password).Append("\n");
            sb.Append("  Username: ").Append(Username).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;
        }
    }

}
