<gh_stars>0/*
 * 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>
    /// PaginateResponse
    /// </summary>
    [DataContract(Name = "PaginateResponse")]
    public partial class PaginateResponse : IEquatable<PaginateResponse>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PaginateResponse" /> class.
        /// </summary>
        /// <param name="edges">edges.</param>
        /// <param name="pageInfo">pageInfo.</param>
        public PaginateResponse(PaginateResponseEdges edges = default(PaginateResponseEdges), PaginateResponsePageInfo pageInfo = default(PaginateResponsePageInfo))
        {
            this.Edges = edges;
            this.PageInfo = pageInfo;
        }

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

        /// <summary>
        /// Gets or Sets PageInfo
        /// </summary>
        [DataMember(Name = "pageInfo", EmitDefaultValue = false)]
        public PaginateResponsePageInfo PageInfo { 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 PaginateResponse {\n");
            sb.Append("  Edges: ").Append(Edges).Append("\n");
            sb.Append("  PageInfo: ").Append(PageInfo).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 PaginateResponse);
        }

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

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

}
