/* 
 * 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>
    /// SaleReturnLineItemMerchandiseHierarchyGroup &lt;emph&gt;undocumented&lt;/emph&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiTxpoolDtoSaleReturnLineItemMerchandiseHierarchyGroup :  IEquatable<ComGkSoftwareGkrApiTxpoolDtoSaleReturnLineItemMerchandiseHierarchyGroup>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoSaleReturnLineItemMerchandiseHierarchyGroup" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiTxpoolDtoSaleReturnLineItemMerchandiseHierarchyGroup() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoSaleReturnLineItemMerchandiseHierarchyGroup" /> class.
        /// </summary>
        /// <param name="key">&lt;p&gt;Getter for inner key class.&lt;/p&gt; (required).</param>
        /// <param name="timeStampEffective">The timestamp when this assignment becomes active ; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone).</param>
        /// <param name="timeStampExpiration">The last date and time when this assignment is effective ; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone).</param>
        /// <param name="statusCode">Defines the current status for the assignment; examples of valid codes include: AC/null &#x3D; Active, IA &#x3D; Inactive.</param>
        /// <param name="timeStampEffectiveUTC0">The UTC0 timestamp when this assignment becomes active ; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone).</param>
        /// <param name="timeStampExpirationUTC0">The last UTC0 date and time when this assignment is effective ; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone).</param>
        /// <param name="xxcustom05">Customizable information.</param>
        /// <param name="xxcustom03">Customizable information.</param>
        /// <param name="xxcustom02">Customizable information.</param>
        /// <param name="xxcustom04">Customizable information.</param>
        /// <param name="xxcustom01">Customizable information.</param>
        public ComGkSoftwareGkrApiTxpoolDtoSaleReturnLineItemMerchandiseHierarchyGroup(ComGkSoftwareGkrApiTxpoolDtoSaleReturnLineItemMerchandiseHierarchyGroupKey key = default(ComGkSoftwareGkrApiTxpoolDtoSaleReturnLineItemMerchandiseHierarchyGroupKey), string timeStampEffective = default(string), string timeStampExpiration = default(string), string statusCode = default(string), DateTime? timeStampEffectiveUTC0 = default(DateTime?), DateTime? timeStampExpirationUTC0 = default(DateTime?), string xxcustom05 = default(string), string xxcustom03 = default(string), string xxcustom02 = default(string), string xxcustom04 = default(string), string xxcustom01 = default(string))
        {
            // to ensure "key" is required (not null)
            if (key == null)
            {
                throw new InvalidDataException("key is a required property for ComGkSoftwareGkrApiTxpoolDtoSaleReturnLineItemMerchandiseHierarchyGroup and cannot be null");
            }
            else
            {
                this.Key = key;
            }
            this.TimeStampEffective = timeStampEffective;
            this.TimeStampExpiration = timeStampExpiration;
            this.StatusCode = statusCode;
            this.TimeStampEffectiveUTC0 = timeStampEffectiveUTC0;
            this.TimeStampExpirationUTC0 = timeStampExpirationUTC0;
            this.Xxcustom05 = xxcustom05;
            this.Xxcustom03 = xxcustom03;
            this.Xxcustom02 = xxcustom02;
            this.Xxcustom04 = xxcustom04;
            this.Xxcustom01 = xxcustom01;
        }
        
        /// <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 ComGkSoftwareGkrApiTxpoolDtoSaleReturnLineItemMerchandiseHierarchyGroupKey Key { get; set; }

        /// <summary>
        /// The timestamp when this assignment becomes active ; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)
        /// </summary>
        /// <value>The timestamp when this assignment becomes active ; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)</value>
        [DataMember(Name="timeStampEffective", EmitDefaultValue=false)]
        public string TimeStampEffective { get; set; }

        /// <summary>
        /// The last date and time when this assignment is effective ; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)
        /// </summary>
        /// <value>The last date and time when this assignment is effective ; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)</value>
        [DataMember(Name="timeStampExpiration", EmitDefaultValue=false)]
        public string TimeStampExpiration { get; set; }

        /// <summary>
        /// Defines the current status for the assignment; examples of valid codes include: AC/null &#x3D; Active, IA &#x3D; Inactive
        /// </summary>
        /// <value>Defines the current status for the assignment; examples of valid codes include: AC/null &#x3D; Active, IA &#x3D; Inactive</value>
        [DataMember(Name="statusCode", EmitDefaultValue=false)]
        public string StatusCode { get; set; }

        /// <summary>
        /// The UTC0 timestamp when this assignment becomes active ; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone)
        /// </summary>
        /// <value>The UTC0 timestamp when this assignment becomes active ; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone)</value>
        [DataMember(Name="timeStampEffectiveUTC0", EmitDefaultValue=false)]
        public DateTime? TimeStampEffectiveUTC0 { get; set; }

        /// <summary>
        /// The last UTC0 date and time when this assignment is effective ; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone)
        /// </summary>
        /// <value>The last UTC0 date and time when this assignment is effective ; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone)</value>
        [DataMember(Name="timeStampExpirationUTC0", EmitDefaultValue=false)]
        public DateTime? TimeStampExpirationUTC0 { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom05", EmitDefaultValue=false)]
        public string Xxcustom05 { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom03", EmitDefaultValue=false)]
        public string Xxcustom03 { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom02", EmitDefaultValue=false)]
        public string Xxcustom02 { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom04", EmitDefaultValue=false)]
        public string Xxcustom04 { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom01", EmitDefaultValue=false)]
        public string Xxcustom01 { 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 ComGkSoftwareGkrApiTxpoolDtoSaleReturnLineItemMerchandiseHierarchyGroup {\n");
            sb.Append("  Key: ").Append(Key).Append("\n");
            sb.Append("  TimeStampEffective: ").Append(TimeStampEffective).Append("\n");
            sb.Append("  TimeStampExpiration: ").Append(TimeStampExpiration).Append("\n");
            sb.Append("  StatusCode: ").Append(StatusCode).Append("\n");
            sb.Append("  TimeStampEffectiveUTC0: ").Append(TimeStampEffectiveUTC0).Append("\n");
            sb.Append("  TimeStampExpirationUTC0: ").Append(TimeStampExpirationUTC0).Append("\n");
            sb.Append("  Xxcustom05: ").Append(Xxcustom05).Append("\n");
            sb.Append("  Xxcustom03: ").Append(Xxcustom03).Append("\n");
            sb.Append("  Xxcustom02: ").Append(Xxcustom02).Append("\n");
            sb.Append("  Xxcustom04: ").Append(Xxcustom04).Append("\n");
            sb.Append("  Xxcustom01: ").Append(Xxcustom01).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 ComGkSoftwareGkrApiTxpoolDtoSaleReturnLineItemMerchandiseHierarchyGroup);
        }

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

            return 
                (
                    this.Key == input.Key ||
                    (this.Key != null &&
                    this.Key.Equals(input.Key))
                ) && 
                (
                    this.TimeStampEffective == input.TimeStampEffective ||
                    (this.TimeStampEffective != null &&
                    this.TimeStampEffective.Equals(input.TimeStampEffective))
                ) && 
                (
                    this.TimeStampExpiration == input.TimeStampExpiration ||
                    (this.TimeStampExpiration != null &&
                    this.TimeStampExpiration.Equals(input.TimeStampExpiration))
                ) && 
                (
                    this.StatusCode == input.StatusCode ||
                    (this.StatusCode != null &&
                    this.StatusCode.Equals(input.StatusCode))
                ) && 
                (
                    this.TimeStampEffectiveUTC0 == input.TimeStampEffectiveUTC0 ||
                    (this.TimeStampEffectiveUTC0 != null &&
                    this.TimeStampEffectiveUTC0.Equals(input.TimeStampEffectiveUTC0))
                ) && 
                (
                    this.TimeStampExpirationUTC0 == input.TimeStampExpirationUTC0 ||
                    (this.TimeStampExpirationUTC0 != null &&
                    this.TimeStampExpirationUTC0.Equals(input.TimeStampExpirationUTC0))
                ) && 
                (
                    this.Xxcustom05 == input.Xxcustom05 ||
                    (this.Xxcustom05 != null &&
                    this.Xxcustom05.Equals(input.Xxcustom05))
                ) && 
                (
                    this.Xxcustom03 == input.Xxcustom03 ||
                    (this.Xxcustom03 != null &&
                    this.Xxcustom03.Equals(input.Xxcustom03))
                ) && 
                (
                    this.Xxcustom02 == input.Xxcustom02 ||
                    (this.Xxcustom02 != null &&
                    this.Xxcustom02.Equals(input.Xxcustom02))
                ) && 
                (
                    this.Xxcustom04 == input.Xxcustom04 ||
                    (this.Xxcustom04 != null &&
                    this.Xxcustom04.Equals(input.Xxcustom04))
                ) && 
                (
                    this.Xxcustom01 == input.Xxcustom01 ||
                    (this.Xxcustom01 != null &&
                    this.Xxcustom01.Equals(input.Xxcustom01))
                );
        }

        /// <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.TimeStampEffective != null)
                    hashCode = hashCode * 59 + this.TimeStampEffective.GetHashCode();
                if (this.TimeStampExpiration != null)
                    hashCode = hashCode * 59 + this.TimeStampExpiration.GetHashCode();
                if (this.StatusCode != null)
                    hashCode = hashCode * 59 + this.StatusCode.GetHashCode();
                if (this.TimeStampEffectiveUTC0 != null)
                    hashCode = hashCode * 59 + this.TimeStampEffectiveUTC0.GetHashCode();
                if (this.TimeStampExpirationUTC0 != null)
                    hashCode = hashCode * 59 + this.TimeStampExpirationUTC0.GetHashCode();
                if (this.Xxcustom05 != null)
                    hashCode = hashCode * 59 + this.Xxcustom05.GetHashCode();
                if (this.Xxcustom03 != null)
                    hashCode = hashCode * 59 + this.Xxcustom03.GetHashCode();
                if (this.Xxcustom02 != null)
                    hashCode = hashCode * 59 + this.Xxcustom02.GetHashCode();
                if (this.Xxcustom04 != null)
                    hashCode = hashCode * 59 + this.Xxcustom04.GetHashCode();
                if (this.Xxcustom01 != null)
                    hashCode = hashCode * 59 + this.Xxcustom01.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;
        }
    }

}
