/*
 * Warframe.market API
 *
 * ## Documentation is under very slow and heavy development  This document will gradually be supplemented and updated over some extended period of time.  ## Unstable endpoints Endpoint that is not stable and probably will be changed in the future will be marked with exclamation sign -> âš  
 *
 * The version of the OpenAPI document: 1.14.0
 * 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 = WarframeMarket.Client.OpenAPIDateConverter;

namespace WarframeMarket.Model
{
    /// <summary>
    /// SettingsNotificationsPushPostRequestOneOfSubscription
    /// </summary>
    [DataContract(Name = "_settings_notifications_push_post_request_oneOf_subscription")]
    public partial class SettingsNotificationsPushPostRequestOneOfSubscription : IEquatable<SettingsNotificationsPushPostRequestOneOfSubscription>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="SettingsNotificationsPushPostRequestOneOfSubscription" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected SettingsNotificationsPushPostRequestOneOfSubscription() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="SettingsNotificationsPushPostRequestOneOfSubscription" /> class.
        /// </summary>
        /// <param name="endpointeger">endpointeger (required).</param>
        /// <param name="keys">keys (required).</param>
        public SettingsNotificationsPushPostRequestOneOfSubscription(string endpointeger = default(string), SettingsNotificationsPushPostRequestOneOfSubscriptionKeys keys = default(SettingsNotificationsPushPostRequestOneOfSubscriptionKeys))
        {
            // to ensure "endpointeger" is required (not null)
            if (endpointeger == null)
            {
                throw new ArgumentNullException("endpointeger is a required property for SettingsNotificationsPushPostRequestOneOfSubscription and cannot be null");
            }
            this.Endpointeger = endpointeger;
            // to ensure "keys" is required (not null)
            if (keys == null)
            {
                throw new ArgumentNullException("keys is a required property for SettingsNotificationsPushPostRequestOneOfSubscription and cannot be null");
            }
            this.Keys = keys;
        }

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

        /// <summary>
        /// Gets or Sets Keys
        /// </summary>
        [DataMember(Name = "keys", IsRequired = true, EmitDefaultValue = true)]
        public SettingsNotificationsPushPostRequestOneOfSubscriptionKeys Keys { 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 SettingsNotificationsPushPostRequestOneOfSubscription {\n");
            sb.Append("  Endpointeger: ").Append(Endpointeger).Append("\n");
            sb.Append("  Keys: ").Append(Keys).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 SettingsNotificationsPushPostRequestOneOfSubscription);
        }

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

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

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

}
