/* 
 * 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 &lt;p&gt;Represents one Wic Category.&lt;br /&gt;&lt;/p&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDO :  IEquatable<ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDO" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDO() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDO" /> class.
        /// </summary>
        /// <param name="key">&lt;p&gt;Getter for inner key class.&lt;/p&gt; (required).</param>
        /// <param name="wicCategoryDescription">&lt;p&gt;Category descriptor.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="wicSubcategoryDescription">&lt;p&gt;Subcategory descriptor.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="wicUomDescription">&lt;p&gt;Descriptor for the UOM of the Benefit.&lt;br /&gt;&lt;/p&gt;.</param>
        public ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDO(ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDOKey key = default(ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDOKey), string wicCategoryDescription = default(string), string wicSubcategoryDescription = default(string), string wicUomDescription = default(string))
        {
            // to ensure "key" is required (not null)
            if (key == null)
            {
                throw new InvalidDataException("key is a required property for ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDO and cannot be null");
            }
            else
            {
                this.Key = key;
            }
            this.WicCategoryDescription = wicCategoryDescription;
            this.WicSubcategoryDescription = wicSubcategoryDescription;
            this.WicUomDescription = wicUomDescription;
        }
        
        /// <summary>
        /// &lt;p&gt;Getter for inner key class.&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Getter for inner key class.&lt;/p&gt;</value>
        [DataMember(Name="key", EmitDefaultValue=false)]
        public ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDOKey Key { get; set; }

        /// <summary>
        /// &lt;p&gt;Category descriptor.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Category descriptor.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="wicCategoryDescription", EmitDefaultValue=false)]
        public string WicCategoryDescription { get; set; }

        /// <summary>
        /// &lt;p&gt;Subcategory descriptor.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Subcategory descriptor.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="wicSubcategoryDescription", EmitDefaultValue=false)]
        public string WicSubcategoryDescription { get; set; }

        /// <summary>
        /// &lt;p&gt;Descriptor for the UOM of the Benefit.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Descriptor for the UOM of the Benefit.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="wicUomDescription", EmitDefaultValue=false)]
        public string WicUomDescription { 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 ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDO {\n");
            sb.Append("  Key: ").Append(Key).Append("\n");
            sb.Append("  WicCategoryDescription: ").Append(WicCategoryDescription).Append("\n");
            sb.Append("  WicSubcategoryDescription: ").Append(WicSubcategoryDescription).Append("\n");
            sb.Append("  WicUomDescription: ").Append(WicUomDescription).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 ComGkSoftwareGkrApiServerMdItemWicDtoDomWicCategoryDO);
        }

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

            return 
                (
                    this.Key == input.Key ||
                    (this.Key != null &&
                    this.Key.Equals(input.Key))
                ) && 
                (
                    this.WicCategoryDescription == input.WicCategoryDescription ||
                    (this.WicCategoryDescription != null &&
                    this.WicCategoryDescription.Equals(input.WicCategoryDescription))
                ) && 
                (
                    this.WicSubcategoryDescription == input.WicSubcategoryDescription ||
                    (this.WicSubcategoryDescription != null &&
                    this.WicSubcategoryDescription.Equals(input.WicSubcategoryDescription))
                ) && 
                (
                    this.WicUomDescription == input.WicUomDescription ||
                    (this.WicUomDescription != null &&
                    this.WicUomDescription.Equals(input.WicUomDescription))
                );
        }

        /// <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.Key != null)
                    hashCode = hashCode * 59 + this.Key.GetHashCode();
                if (this.WicCategoryDescription != null)
                    hashCode = hashCode * 59 + this.WicCategoryDescription.GetHashCode();
                if (this.WicSubcategoryDescription != null)
                    hashCode = hashCode * 59 + this.WicSubcategoryDescription.GetHashCode();
                if (this.WicUomDescription != null)
                    hashCode = hashCode * 59 + this.WicUomDescription.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;
        }
    }

}
