/* 
 * GK application - OmniPOS Service API
 *
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 5.21.1-b03
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 */

using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel.DataAnnotations;
using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter;

namespace IO.Swagger.Model
{
    /// <summary>
    /// PceContext
    /// </summary>
    [DataContract]
    public partial class PceContext :  IEquatable<PceContext>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PceContext" /> class.
        /// </summary>
        /// <param name="calculationScheme">calculationScheme.</param>
        /// <param name="recommendationMode">recommendationMode.</param>
        /// <param name="recommendationContext">recommendationContext.</param>
        /// <param name="configuration">configuration.</param>
        public PceContext(string calculationScheme = default(string), string recommendationMode = default(string), string recommendationContext = default(string), Dictionary<string, string> configuration = default(Dictionary<string, string>))
        {
            this.CalculationScheme = calculationScheme;
            this.RecommendationMode = recommendationMode;
            this.RecommendationContext = recommendationContext;
            this.Configuration = configuration;
        }
        
        /// <summary>
        /// Gets or Sets CalculationScheme
        /// </summary>
        [DataMember(Name="calculationScheme", EmitDefaultValue=false)]
        public string CalculationScheme { get; set; }

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

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

        /// <summary>
        /// Gets or Sets Configuration
        /// </summary>
        [DataMember(Name="configuration", EmitDefaultValue=false)]
        public Dictionary<string, string> Configuration { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            var sb = new StringBuilder();
            sb.Append("class PceContext {\n");
            sb.Append("  CalculationScheme: ").Append(CalculationScheme).Append("\n");
            sb.Append("  RecommendationMode: ").Append(RecommendationMode).Append("\n");
            sb.Append("  RecommendationContext: ").Append(RecommendationContext).Append("\n");
            sb.Append("  Configuration: ").Append(Configuration).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 JsonConvert.SerializeObject(this, 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 PceContext);
        }

        /// <summary>
        /// Returns true if PceContext instances are equal
        /// </summary>
        /// <param name="input">Instance of PceContext to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(PceContext input)
        {
            if (input == null)
                return false;

            return 
                (
                    this.CalculationScheme == input.CalculationScheme ||
                    (this.CalculationScheme != null &&
                    this.CalculationScheme.Equals(input.CalculationScheme))
                ) && 
                (
                    this.RecommendationMode == input.RecommendationMode ||
                    (this.RecommendationMode != null &&
                    this.RecommendationMode.Equals(input.RecommendationMode))
                ) && 
                (
                    this.RecommendationContext == input.RecommendationContext ||
                    (this.RecommendationContext != null &&
                    this.RecommendationContext.Equals(input.RecommendationContext))
                ) && 
                (
                    this.Configuration == input.Configuration ||
                    this.Configuration != null &&
                    this.Configuration.SequenceEqual(input.Configuration)
                );
        }

        /// <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.CalculationScheme != null)
                    hashCode = hashCode * 59 + this.CalculationScheme.GetHashCode();
                if (this.RecommendationMode != null)
                    hashCode = hashCode * 59 + this.RecommendationMode.GetHashCode();
                if (this.RecommendationContext != null)
                    hashCode = hashCode * 59 + this.RecommendationContext.GetHashCode();
                if (this.Configuration != null)
                    hashCode = hashCode * 59 + this.Configuration.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;
        }
    }

}
