/*
 * NewsCatcher News API V2
 *
 * NewsCatcher is a data-as-a-service startup that has one main goal: to build the largest database of structured news articles published online. In other words, we're like Google for the news part of the web, which you can access as a source of data.  Some useful links: - [How NewsCatcher Works](https://docs.newscatcherapi.com/knowledge-base/how-newscatcher-works) - [GitHub for the Python SDK](https://github.com/NewscatcherAPI/newscatcherapi-sdk-python) 
 *
 * The version of the OpenAPI document: 1.0.1
 * Contact: hzdkv@example.com
 * Generated by: https://konfigthis.com
 */


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 = Newscatcherapi.Net.Client.OpenAPIDateConverter;

namespace Newscatcherapi.Net.Model
{
    /// <summary>
    /// LatestHeadlinesUserInput
    /// </summary>
    [DataContract(Name = "latest_headlines_user_input")]
    public partial class LatestHeadlinesUserInput : IEquatable<LatestHeadlinesUserInput>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="LatestHeadlinesUserInput" /> class.
        /// </summary>
        /// <param name="lang">lang.</param>
        /// <param name="notLang">notLang.</param>
        /// <param name="countries">countries.</param>
        /// <param name="notCountries">notCountries.</param>
        /// <param name="page">page.</param>
        /// <param name="size">size.</param>
        /// <param name="sources">sources.</param>
        /// <param name="notSources">notSources.</param>
        /// <param name="topic">topic.</param>
        public LatestHeadlinesUserInput(List<string> lang = default(List<string>), List<string> notLang = default(List<string>), List<string> countries = default(List<string>), List<string> notCountries = default(List<string>), int page = default(int), int size = default(int), List<string> sources = default(List<string>), List<string> notSources = default(List<string>), string topic = default(string))
        {
            this.Lang = lang;
            this.NotLang = notLang;
            this.Countries = countries;
            this.NotCountries = notCountries;
            this.Page = page;
            this.Size = size;
            this.Sources = sources;
            this.NotSources = notSources;
            this.Topic = topic;
        }

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

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

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

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

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

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

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

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

        /// <summary>
        /// Gets or Sets Topic
        /// </summary>
        [DataMember(Name = "topic", EmitDefaultValue = true)]
        public string Topic { 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 LatestHeadlinesUserInput {\n");
            sb.Append("  Lang: ").Append(Lang).Append("\n");
            sb.Append("  NotLang: ").Append(NotLang).Append("\n");
            sb.Append("  Countries: ").Append(Countries).Append("\n");
            sb.Append("  NotCountries: ").Append(NotCountries).Append("\n");
            sb.Append("  Page: ").Append(Page).Append("\n");
            sb.Append("  Size: ").Append(Size).Append("\n");
            sb.Append("  Sources: ").Append(Sources).Append("\n");
            sb.Append("  NotSources: ").Append(NotSources).Append("\n");
            sb.Append("  Topic: ").Append(Topic).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 LatestHeadlinesUserInput);
        }

        /// <summary>
        /// Returns true if LatestHeadlinesUserInput instances are equal
        /// </summary>
        /// <param name="input">Instance of LatestHeadlinesUserInput to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(LatestHeadlinesUserInput input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.Lang == input.Lang ||
                    this.Lang != null &&
                    input.Lang != null &&
                    this.Lang.SequenceEqual(input.Lang)
                ) && 
                (
                    this.NotLang == input.NotLang ||
                    this.NotLang != null &&
                    input.NotLang != null &&
                    this.NotLang.SequenceEqual(input.NotLang)
                ) && 
                (
                    this.Countries == input.Countries ||
                    this.Countries != null &&
                    input.Countries != null &&
                    this.Countries.SequenceEqual(input.Countries)
                ) && 
                (
                    this.NotCountries == input.NotCountries ||
                    this.NotCountries != null &&
                    input.NotCountries != null &&
                    this.NotCountries.SequenceEqual(input.NotCountries)
                ) && 
                (
                    this.Page == input.Page ||
                    this.Page.Equals(input.Page)
                ) && 
                (
                    this.Size == input.Size ||
                    this.Size.Equals(input.Size)
                ) && 
                (
                    this.Sources == input.Sources ||
                    this.Sources != null &&
                    input.Sources != null &&
                    this.Sources.SequenceEqual(input.Sources)
                ) && 
                (
                    this.NotSources == input.NotSources ||
                    this.NotSources != null &&
                    input.NotSources != null &&
                    this.NotSources.SequenceEqual(input.NotSources)
                ) && 
                (
                    this.Topic == input.Topic ||
                    (this.Topic != null &&
                    this.Topic.Equals(input.Topic))
                );
        }

        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;
                if (this.Lang != null)
                {
                    hashCode = (hashCode * 59) + this.Lang.GetHashCode();
                }
                if (this.NotLang != null)
                {
                    hashCode = (hashCode * 59) + this.NotLang.GetHashCode();
                }
                if (this.Countries != null)
                {
                    hashCode = (hashCode * 59) + this.Countries.GetHashCode();
                }
                if (this.NotCountries != null)
                {
                    hashCode = (hashCode * 59) + this.NotCountries.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.Page.GetHashCode();
                hashCode = (hashCode * 59) + this.Size.GetHashCode();
                if (this.Sources != null)
                {
                    hashCode = (hashCode * 59) + this.Sources.GetHashCode();
                }
                if (this.NotSources != null)
                {
                    hashCode = (hashCode * 59) + this.NotSources.GetHashCode();
                }
                if (this.Topic != null)
                {
                    hashCode = (hashCode * 59) + this.Topic.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;
        }
    }

}
