/* 
 * 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>
    /// TransactionAdditionalPrintout &lt;emph&gt;undocumented&lt;/emph&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintout :  IEquatable<ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintout>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintout" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintout() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintout" /> class.
        /// </summary>
        /// <param name="key">&lt;p&gt;Getter for inner key class.&lt;/p&gt; (required).</param>
        /// <param name="triggerID">The trigger type ident of the additional printout (e.g. customer group, user function, tender). (required).</param>
        /// <param name="triggerValue">The trigger value for the additional printout (e.g. the number of the customer group, the number of user function, the tender class code). (required).</param>
        /// <param name="reportName">The name of the report template  (required).</param>
        /// <param name="printoutCount">The count of printout copies  (required).</param>
        /// <param name="printoutContent">Parameter / data for printout .</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 ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintout(ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintoutKey key = default(ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintoutKey), string triggerID = default(string), string triggerValue = default(string), string reportName = default(string), double? printoutCount = default(double?), string printoutContent = default(string), 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 ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintout and cannot be null");
            }
            else
            {
                this.Key = key;
            }
            // to ensure "triggerID" is required (not null)
            if (triggerID == null)
            {
                throw new InvalidDataException("triggerID is a required property for ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintout and cannot be null");
            }
            else
            {
                this.TriggerID = triggerID;
            }
            // to ensure "triggerValue" is required (not null)
            if (triggerValue == null)
            {
                throw new InvalidDataException("triggerValue is a required property for ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintout and cannot be null");
            }
            else
            {
                this.TriggerValue = triggerValue;
            }
            // to ensure "reportName" is required (not null)
            if (reportName == null)
            {
                throw new InvalidDataException("reportName is a required property for ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintout and cannot be null");
            }
            else
            {
                this.ReportName = reportName;
            }
            // to ensure "printoutCount" is required (not null)
            if (printoutCount == null)
            {
                throw new InvalidDataException("printoutCount is a required property for ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintout and cannot be null");
            }
            else
            {
                this.PrintoutCount = printoutCount;
            }
            this.PrintoutContent = printoutContent;
            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 ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintoutKey Key { get; set; }

        /// <summary>
        /// The trigger type ident of the additional printout (e.g. customer group, user function, tender).
        /// </summary>
        /// <value>The trigger type ident of the additional printout (e.g. customer group, user function, tender).</value>
        [DataMember(Name="triggerID", EmitDefaultValue=false)]
        public string TriggerID { get; set; }

        /// <summary>
        /// The trigger value for the additional printout (e.g. the number of the customer group, the number of user function, the tender class code).
        /// </summary>
        /// <value>The trigger value for the additional printout (e.g. the number of the customer group, the number of user function, the tender class code).</value>
        [DataMember(Name="triggerValue", EmitDefaultValue=false)]
        public string TriggerValue { get; set; }

        /// <summary>
        /// The name of the report template 
        /// </summary>
        /// <value>The name of the report template </value>
        [DataMember(Name="reportName", EmitDefaultValue=false)]
        public string ReportName { get; set; }

        /// <summary>
        /// The count of printout copies 
        /// </summary>
        /// <value>The count of printout copies </value>
        [DataMember(Name="printoutCount", EmitDefaultValue=false)]
        public double? PrintoutCount { get; set; }

        /// <summary>
        /// Parameter / data for printout 
        /// </summary>
        /// <value>Parameter / data for printout </value>
        [DataMember(Name="printoutContent", EmitDefaultValue=false)]
        public string PrintoutContent { 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 ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintout {\n");
            sb.Append("  Key: ").Append(Key).Append("\n");
            sb.Append("  TriggerID: ").Append(TriggerID).Append("\n");
            sb.Append("  TriggerValue: ").Append(TriggerValue).Append("\n");
            sb.Append("  ReportName: ").Append(ReportName).Append("\n");
            sb.Append("  PrintoutCount: ").Append(PrintoutCount).Append("\n");
            sb.Append("  PrintoutContent: ").Append(PrintoutContent).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 ComGkSoftwareGkrApiTxpoolDtoTransactionAdditionalPrintout);
        }

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

            return 
                (
                    this.Key == input.Key ||
                    (this.Key != null &&
                    this.Key.Equals(input.Key))
                ) && 
                (
                    this.TriggerID == input.TriggerID ||
                    (this.TriggerID != null &&
                    this.TriggerID.Equals(input.TriggerID))
                ) && 
                (
                    this.TriggerValue == input.TriggerValue ||
                    (this.TriggerValue != null &&
                    this.TriggerValue.Equals(input.TriggerValue))
                ) && 
                (
                    this.ReportName == input.ReportName ||
                    (this.ReportName != null &&
                    this.ReportName.Equals(input.ReportName))
                ) && 
                (
                    this.PrintoutCount == input.PrintoutCount ||
                    (this.PrintoutCount != null &&
                    this.PrintoutCount.Equals(input.PrintoutCount))
                ) && 
                (
                    this.PrintoutContent == input.PrintoutContent ||
                    (this.PrintoutContent != null &&
                    this.PrintoutContent.Equals(input.PrintoutContent))
                ) && 
                (
                    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.TriggerID != null)
                    hashCode = hashCode * 59 + this.TriggerID.GetHashCode();
                if (this.TriggerValue != null)
                    hashCode = hashCode * 59 + this.TriggerValue.GetHashCode();
                if (this.ReportName != null)
                    hashCode = hashCode * 59 + this.ReportName.GetHashCode();
                if (this.PrintoutCount != null)
                    hashCode = hashCode * 59 + this.PrintoutCount.GetHashCode();
                if (this.PrintoutContent != null)
                    hashCode = hashCode * 59 + this.PrintoutContent.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;
        }
    }

}
