/* 
 * 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>
    /// WicCategoryDO.Key Inner class for composite key attributes
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDOKey :  IEquatable<ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDOKey>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDOKey" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDOKey() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDOKey" /> class.
        /// </summary>
        /// <param name="wicCategory">&lt;p&gt;Code indicating the eWic Category.&lt;br /&gt;&lt;/p&gt; (required).</param>
        /// <param name="wicSubcategory">&lt;p&gt;Code indicating the Sub Category of the eWic Category.&lt;br /&gt;&lt;/p&gt; (required).</param>
        /// <param name="stateId">&lt;p&gt;State Identifier.&lt;br /&gt;&lt;/p&gt; (required).</param>
        public ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDOKey(string wicCategory = default(string), string wicSubcategory = default(string), string stateId = default(string))
        {
            // to ensure "wicCategory" is required (not null)
            if (wicCategory == null)
            {
                throw new InvalidDataException("wicCategory is a required property for ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDOKey and cannot be null");
            }
            else
            {
                this.WicCategory = wicCategory;
            }
            // to ensure "wicSubcategory" is required (not null)
            if (wicSubcategory == null)
            {
                throw new InvalidDataException("wicSubcategory is a required property for ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDOKey and cannot be null");
            }
            else
            {
                this.WicSubcategory = wicSubcategory;
            }
            // to ensure "stateId" is required (not null)
            if (stateId == null)
            {
                throw new InvalidDataException("stateId is a required property for ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDOKey and cannot be null");
            }
            else
            {
                this.StateId = stateId;
            }
        }
        
        /// <summary>
        /// &lt;p&gt;Code indicating the eWic Category.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Code indicating the eWic Category.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="wicCategory", EmitDefaultValue=false)]
        public string WicCategory { get; set; }

        /// <summary>
        /// &lt;p&gt;Code indicating the Sub Category of the eWic Category.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Code indicating the Sub Category of the eWic Category.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="wicSubcategory", EmitDefaultValue=false)]
        public string WicSubcategory { get; set; }

        /// <summary>
        /// &lt;p&gt;State Identifier.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;State Identifier.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="stateId", EmitDefaultValue=false)]
        public string StateId { 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 ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDOKey {\n");
            sb.Append("  WicCategory: ").Append(WicCategory).Append("\n");
            sb.Append("  WicSubcategory: ").Append(WicSubcategory).Append("\n");
            sb.Append("  StateId: ").Append(StateId).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 ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDOKey);
        }

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

            return 
                (
                    this.WicCategory == input.WicCategory ||
                    (this.WicCategory != null &&
                    this.WicCategory.Equals(input.WicCategory))
                ) && 
                (
                    this.WicSubcategory == input.WicSubcategory ||
                    (this.WicSubcategory != null &&
                    this.WicSubcategory.Equals(input.WicSubcategory))
                ) && 
                (
                    this.StateId == input.StateId ||
                    (this.StateId != null &&
                    this.StateId.Equals(input.StateId))
                );
        }

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

}
