/*
 * 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>
    /// CreateAccessTicketRequest
    /// </summary>
    [DataContract(Name = "CreateAccessTicketRequest")]
    public partial class CreateAccessTicketRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateAccessTicketRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateAccessTicketRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateAccessTicketRequest" /> class.
        /// </summary>
        /// <param name="newFormat">newFormat.</param>
        /// <param name="otp">otp.</param>
        /// <param name="password">password (required).</param>
        /// <param name="path">path.</param>
        /// <param name="privs">privs.</param>
        /// <param name="realm">realm.</param>
        /// <param name="tfaChallenge">tfaChallenge.</param>
        /// <param name="username">username (required).</param>
        public CreateAccessTicketRequest(bool newFormat = default(bool), string otp = default(string), string password = default(string), string path = default(string), string privs = default(string), string realm = default(string), string tfaChallenge = 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 CreateAccessTicketRequest 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 CreateAccessTicketRequest and cannot be null");
            }
            this.Username = username;
            this.NewFormat = newFormat;
            this.Otp = otp;
            this.Path = path;
            this.Privs = privs;
            this.Realm = realm;
            this.TfaChallenge = tfaChallenge;
        }

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

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

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

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

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

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

        /// <summary>
        /// Gets or Sets TfaChallenge
        /// </summary>
        [DataMember(Name = "tfa-challenge", EmitDefaultValue = false)]
        public string TfaChallenge { 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 CreateAccessTicketRequest {\n");
            sb.Append("  NewFormat: ").Append(NewFormat).Append("\n");
            sb.Append("  Otp: ").Append(Otp).Append("\n");
            sb.Append("  Password: ").Append(Password).Append("\n");
            sb.Append("  Path: ").Append(Path).Append("\n");
            sb.Append("  Privs: ").Append(Privs).Append("\n");
            sb.Append("  Realm: ").Append(Realm).Append("\n");
            sb.Append("  TfaChallenge: ").Append(TfaChallenge).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;
        }
    }

}
