/*
 * 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>
    /// CreateAccessUsersRequest
    /// </summary>
    [DataContract(Name = "CreateAccessUsersRequest")]
    public partial class CreateAccessUsersRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateAccessUsersRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateAccessUsersRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateAccessUsersRequest" /> class.
        /// </summary>
        /// <param name="comment">comment.</param>
        /// <param name="email">email.</param>
        /// <param name="enable">enable.</param>
        /// <param name="expire">expire.</param>
        /// <param name="firstname">firstname.</param>
        /// <param name="groups">groups.</param>
        /// <param name="keys">keys.</param>
        /// <param name="lastname">lastname.</param>
        /// <param name="password">password.</param>
        /// <param name="userid">userid (required).</param>
        public CreateAccessUsersRequest(string comment = default(string), string email = default(string), bool enable = default(bool), int expire = default(int), string firstname = default(string), string groups = default(string), string keys = default(string), string lastname = default(string), string password = default(string), string userid = default(string))
        {
            // to ensure "userid" is required (not null)
            if (userid == null)
            {
                throw new ArgumentNullException("userid is a required property for CreateAccessUsersRequest and cannot be null");
            }
            this.Userid = userid;
            this.Comment = comment;
            this.Email = email;
            this.Enable = enable;
            this.Expire = expire;
            this.Firstname = firstname;
            this.Groups = groups;
            this.Keys = keys;
            this.Lastname = lastname;
            this.Password = password;
        }

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

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

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

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

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

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

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

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

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

        /// <summary>
        /// Gets or Sets Userid
        /// </summary>
        [DataMember(Name = "userid", IsRequired = true, EmitDefaultValue = true)]
        public string Userid { 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 CreateAccessUsersRequest {\n");
            sb.Append("  Comment: ").Append(Comment).Append("\n");
            sb.Append("  Email: ").Append(Email).Append("\n");
            sb.Append("  Enable: ").Append(Enable).Append("\n");
            sb.Append("  Expire: ").Append(Expire).Append("\n");
            sb.Append("  Firstname: ").Append(Firstname).Append("\n");
            sb.Append("  Groups: ").Append(Groups).Append("\n");
            sb.Append("  Keys: ").Append(Keys).Append("\n");
            sb.Append("  Lastname: ").Append(Lastname).Append("\n");
            sb.Append("  Password: ").Append(Password).Append("\n");
            sb.Append("  Userid: ").Append(Userid).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;
        }
    }

}
