/*
 * 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>
    /// CreateAccessTfaSingleRequest
    /// </summary>
    [DataContract(Name = "CreateAccessTfaSingleRequest")]
    public partial class CreateAccessTfaSingleRequest : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateAccessTfaSingleRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected CreateAccessTfaSingleRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateAccessTfaSingleRequest" /> class.
        /// </summary>
        /// <param name="challenge">challenge.</param>
        /// <param name="description">description.</param>
        /// <param name="password">password.</param>
        /// <param name="totp">totp.</param>
        /// <param name="type">type (required).</param>
        /// <param name="value">value.</param>
        public CreateAccessTfaSingleRequest(string challenge = default(string), string description = default(string), string password = default(string), string totp = default(string), string type = default(string), string value = default(string))
        {
            // to ensure "type" is required (not null)
            if (type == null)
            {
                throw new ArgumentNullException("type is a required property for CreateAccessTfaSingleRequest and cannot be null");
            }
            this.Type = type;
            this.Challenge = challenge;
            this.Description = description;
            this.Password = password;
            this.Totp = totp;
            this.Value = value;
        }

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

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

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

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

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

        /// <summary>
        /// Gets or Sets Value
        /// </summary>
        [DataMember(Name = "value", EmitDefaultValue = false)]
        public string Value { 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 CreateAccessTfaSingleRequest {\n");
            sb.Append("  Challenge: ").Append(Challenge).Append("\n");
            sb.Append("  Description: ").Append(Description).Append("\n");
            sb.Append("  Password: ").Append(Password).Append("\n");
            sb.Append("  Totp: ").Append(Totp).Append("\n");
            sb.Append("  Type: ").Append(Type).Append("\n");
            sb.Append("  Value: ").Append(Value).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;
        }
    }

}
