/*
 * OpenAPI Petstore
 *
 * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
 *
 * The version of the OpenAPI document: 1.0.0
 * 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 = Acme.Net.Client.OpenAPIDateConverter;

namespace Acme.Net.Model
{
    /// <summary>
    /// PaginateRequest
    /// </summary>
    [DataContract(Name = "PaginateRequest")]
    public partial class PaginateRequest : IEquatable<PaginateRequest>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PaginateRequest" /> class.
        /// </summary>
        /// <param name="first">first.</param>
        /// <param name="after">after.</param>
        public PaginateRequest(int first = default(int), string after = default(string))
        {
            this.First = first;
            this.After = after;
        }

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

        /// <summary>
        /// Gets or Sets After
        /// </summary>
        [DataMember(Name = "after", EmitDefaultValue = false)]
        public string After { 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 PaginateRequest {\n");
            sb.Append("  First: ").Append(First).Append("\n");
            sb.Append("  After: ").Append(After).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 PaginateRequest);
        }

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

        /// <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.First.GetHashCode();
                if (this.After != null)
                {
                    hashCode = (hashCode * 59) + this.After.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;
        }
    }

}
