/*
 * SMAC API
 *
 * SMAC ASP.NET Core Web API
 *
 * The version of the OpenAPI document: v1
 * 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 = Org.OpenAPITools.Client.OpenAPIDateConverter;

namespace Org.OpenAPITools.Model
{
    /// <summary>
    /// VerifyTokenResponse
    /// </summary>
    [DataContract(Name = "VerifyTokenResponse")]
    public partial class VerifyTokenResponse : IEquatable<VerifyTokenResponse>, IValidatableObject
    {
        /// <summary>
        /// The validation result
        /// </summary>
        /// <value>The validation result</value>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum StatusEnum
        {
            /// <summary>
            /// Enum Success for value: Success
            /// </summary>
            [EnumMember(Value = "Success")]
            Success = 1,

            /// <summary>
            /// Enum TokenValidationFailed for value: TokenValidationFailed
            /// </summary>
            [EnumMember(Value = "TokenValidationFailed")]
            TokenValidationFailed = 2,

            /// <summary>
            /// Enum TokenExpired for value: TokenExpired
            /// </summary>
            [EnumMember(Value = "TokenExpired")]
            TokenExpired = 3,

            /// <summary>
            /// Enum TokenInvalidLifetime for value: TokenInvalidLifetime
            /// </summary>
            [EnumMember(Value = "TokenInvalidLifetime")]
            TokenInvalidLifetime = 4,

            /// <summary>
            /// Enum TokenInvalid for value: TokenInvalid
            /// </summary>
            [EnumMember(Value = "TokenInvalid")]
            TokenInvalid = 5

        }


        /// <summary>
        /// The validation result
        /// </summary>
        /// <value>The validation result</value>
        [DataMember(Name = "status", EmitDefaultValue = false)]
        public StatusEnum? Status { get; set; }
        /// <summary>
        /// Initializes a new instance of the <see cref="VerifyTokenResponse" /> class.
        /// </summary>
        /// <param name="status">The validation result.</param>
        /// <param name="audiences">The list of audiences meant for the verified token.</param>
        public VerifyTokenResponse(StatusEnum? status = default(StatusEnum?), List<string> audiences = default(List<string>))
        {
            this.Status = status;
            this.Audiences = audiences;
        }

        /// <summary>
        /// The list of audiences meant for the verified token
        /// </summary>
        /// <value>The list of audiences meant for the verified token</value>
        [DataMember(Name = "audiences", EmitDefaultValue = true)]
        public List<string> Audiences { 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 VerifyTokenResponse {\n");
            sb.Append("  Status: ").Append(Status).Append("\n");
            sb.Append("  Audiences: ").Append(Audiences).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>
        /// Returns true if objects are equal
        /// </summary>
        /// <param name="input">Object to be compared</param>
        /// <returns>Boolean</returns>
        public override bool Equals(object input)
        {
            return this.Equals(input as VerifyTokenResponse);
        }

        /// <summary>
        /// Returns true if VerifyTokenResponse instances are equal
        /// </summary>
        /// <param name="input">Instance of VerifyTokenResponse to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(VerifyTokenResponse input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.Status == input.Status ||
                    this.Status.Equals(input.Status)
                ) && 
                (
                    this.Audiences == input.Audiences ||
                    this.Audiences != null &&
                    input.Audiences != null &&
                    this.Audiences.SequenceEqual(input.Audiences)
                );
        }

        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;
                hashCode = (hashCode * 59) + this.Status.GetHashCode();
                if (this.Audiences != null)
                {
                    hashCode = (hashCode * 59) + this.Audiences.GetHashCode();
                }
                return hashCode;
            }
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
