/* 
 * 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>
    /// TenderDepositReceiptTransaction &lt;emph&gt;undocumented&lt;/emph&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiTxpoolDtoTenderDepositReceiptTransaction :  IEquatable<ComGkSoftwareGkrApiTxpoolDtoTenderDepositReceiptTransaction>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoTenderDepositReceiptTransaction" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiTxpoolDtoTenderDepositReceiptTransaction() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoTenderDepositReceiptTransaction" /> class.
        /// </summary>
        /// <param name="key">&lt;p&gt;Getter for inner key class.&lt;/p&gt; (required).</param>
        /// <param name="outboundTenderRepositoryID">The unique identifier for the TENDER REPOSITORY.  (required).</param>
        /// <param name="inboundTenderRepositoryID">The unique identifier for the TENDER REPOSITORY.  (required).</param>
        /// <param name="depositBagID">Automatically generated (with another algorithm like reference number in bank payment) unique Safebag ID..</param>
        /// <param name="depositBagNumber">Safe bag number entered by operator that was used to transport the Tender from the Safe to the ExternalDepository. .</param>
        /// <param name="safeTenderMovementCode">A code that indicates the movement of tender with respect to a SAFE. It is used to clarify whether tender is being RECEIVED into a store safe from an external repository or DEPOSITED from a safe into an external depository..</param>
        /// <param name="doubleCheckingWorkerID">A unique system-assigned identifier for the Person who is a particular Worker..</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 ComGkSoftwareGkrApiTxpoolDtoTenderDepositReceiptTransaction(ComGkSoftwareGkrApiTxpoolDtoTenderDepositReceiptTransactionKey key = default(ComGkSoftwareGkrApiTxpoolDtoTenderDepositReceiptTransactionKey), string outboundTenderRepositoryID = default(string), string inboundTenderRepositoryID = default(string), string depositBagID = default(string), string depositBagNumber = default(string), string safeTenderMovementCode = default(string), string doubleCheckingWorkerID = 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 ComGkSoftwareGkrApiTxpoolDtoTenderDepositReceiptTransaction and cannot be null");
            }
            else
            {
                this.Key = key;
            }
            // to ensure "outboundTenderRepositoryID" is required (not null)
            if (outboundTenderRepositoryID == null)
            {
                throw new InvalidDataException("outboundTenderRepositoryID is a required property for ComGkSoftwareGkrApiTxpoolDtoTenderDepositReceiptTransaction and cannot be null");
            }
            else
            {
                this.OutboundTenderRepositoryID = outboundTenderRepositoryID;
            }
            // to ensure "inboundTenderRepositoryID" is required (not null)
            if (inboundTenderRepositoryID == null)
            {
                throw new InvalidDataException("inboundTenderRepositoryID is a required property for ComGkSoftwareGkrApiTxpoolDtoTenderDepositReceiptTransaction and cannot be null");
            }
            else
            {
                this.InboundTenderRepositoryID = inboundTenderRepositoryID;
            }
            this.DepositBagID = depositBagID;
            this.DepositBagNumber = depositBagNumber;
            this.SafeTenderMovementCode = safeTenderMovementCode;
            this.DoubleCheckingWorkerID = doubleCheckingWorkerID;
            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 ComGkSoftwareGkrApiTxpoolDtoTenderDepositReceiptTransactionKey Key { get; set; }

        /// <summary>
        /// The unique identifier for the TENDER REPOSITORY. 
        /// </summary>
        /// <value>The unique identifier for the TENDER REPOSITORY. </value>
        [DataMember(Name="outboundTenderRepositoryID", EmitDefaultValue=false)]
        public string OutboundTenderRepositoryID { get; set; }

        /// <summary>
        /// The unique identifier for the TENDER REPOSITORY. 
        /// </summary>
        /// <value>The unique identifier for the TENDER REPOSITORY. </value>
        [DataMember(Name="inboundTenderRepositoryID", EmitDefaultValue=false)]
        public string InboundTenderRepositoryID { get; set; }

        /// <summary>
        /// Automatically generated (with another algorithm like reference number in bank payment) unique Safebag ID.
        /// </summary>
        /// <value>Automatically generated (with another algorithm like reference number in bank payment) unique Safebag ID.</value>
        [DataMember(Name="depositBagID", EmitDefaultValue=false)]
        public string DepositBagID { get; set; }

        /// <summary>
        /// Safe bag number entered by operator that was used to transport the Tender from the Safe to the ExternalDepository. 
        /// </summary>
        /// <value>Safe bag number entered by operator that was used to transport the Tender from the Safe to the ExternalDepository. </value>
        [DataMember(Name="depositBagNumber", EmitDefaultValue=false)]
        public string DepositBagNumber { get; set; }

        /// <summary>
        /// A code that indicates the movement of tender with respect to a SAFE. It is used to clarify whether tender is being RECEIVED into a store safe from an external repository or DEPOSITED from a safe into an external depository.
        /// </summary>
        /// <value>A code that indicates the movement of tender with respect to a SAFE. It is used to clarify whether tender is being RECEIVED into a store safe from an external repository or DEPOSITED from a safe into an external depository.</value>
        [DataMember(Name="safeTenderMovementCode", EmitDefaultValue=false)]
        public string SafeTenderMovementCode { get; set; }

        /// <summary>
        /// A unique system-assigned identifier for the Person who is a particular Worker.
        /// </summary>
        /// <value>A unique system-assigned identifier for the Person who is a particular Worker.</value>
        [DataMember(Name="doubleCheckingWorkerID", EmitDefaultValue=false)]
        public string DoubleCheckingWorkerID { 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 ComGkSoftwareGkrApiTxpoolDtoTenderDepositReceiptTransaction {\n");
            sb.Append("  Key: ").Append(Key).Append("\n");
            sb.Append("  OutboundTenderRepositoryID: ").Append(OutboundTenderRepositoryID).Append("\n");
            sb.Append("  InboundTenderRepositoryID: ").Append(InboundTenderRepositoryID).Append("\n");
            sb.Append("  DepositBagID: ").Append(DepositBagID).Append("\n");
            sb.Append("  DepositBagNumber: ").Append(DepositBagNumber).Append("\n");
            sb.Append("  SafeTenderMovementCode: ").Append(SafeTenderMovementCode).Append("\n");
            sb.Append("  DoubleCheckingWorkerID: ").Append(DoubleCheckingWorkerID).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 ComGkSoftwareGkrApiTxpoolDtoTenderDepositReceiptTransaction);
        }

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

            return 
                (
                    this.Key == input.Key ||
                    (this.Key != null &&
                    this.Key.Equals(input.Key))
                ) && 
                (
                    this.OutboundTenderRepositoryID == input.OutboundTenderRepositoryID ||
                    (this.OutboundTenderRepositoryID != null &&
                    this.OutboundTenderRepositoryID.Equals(input.OutboundTenderRepositoryID))
                ) && 
                (
                    this.InboundTenderRepositoryID == input.InboundTenderRepositoryID ||
                    (this.InboundTenderRepositoryID != null &&
                    this.InboundTenderRepositoryID.Equals(input.InboundTenderRepositoryID))
                ) && 
                (
                    this.DepositBagID == input.DepositBagID ||
                    (this.DepositBagID != null &&
                    this.DepositBagID.Equals(input.DepositBagID))
                ) && 
                (
                    this.DepositBagNumber == input.DepositBagNumber ||
                    (this.DepositBagNumber != null &&
                    this.DepositBagNumber.Equals(input.DepositBagNumber))
                ) && 
                (
                    this.SafeTenderMovementCode == input.SafeTenderMovementCode ||
                    (this.SafeTenderMovementCode != null &&
                    this.SafeTenderMovementCode.Equals(input.SafeTenderMovementCode))
                ) && 
                (
                    this.DoubleCheckingWorkerID == input.DoubleCheckingWorkerID ||
                    (this.DoubleCheckingWorkerID != null &&
                    this.DoubleCheckingWorkerID.Equals(input.DoubleCheckingWorkerID))
                ) && 
                (
                    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.OutboundTenderRepositoryID != null)
                    hashCode = hashCode * 59 + this.OutboundTenderRepositoryID.GetHashCode();
                if (this.InboundTenderRepositoryID != null)
                    hashCode = hashCode * 59 + this.InboundTenderRepositoryID.GetHashCode();
                if (this.DepositBagID != null)
                    hashCode = hashCode * 59 + this.DepositBagID.GetHashCode();
                if (this.DepositBagNumber != null)
                    hashCode = hashCode * 59 + this.DepositBagNumber.GetHashCode();
                if (this.SafeTenderMovementCode != null)
                    hashCode = hashCode * 59 + this.SafeTenderMovementCode.GetHashCode();
                if (this.DoubleCheckingWorkerID != null)
                    hashCode = hashCode * 59 + this.DoubleCheckingWorkerID.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;
        }
    }

}
