/* 
 * 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>
    /// ReasonCodeGroupSO &lt;p&gt;Reason code group master data. Reason groups represent e.g. various processes.&lt;br /&gt;&lt;/p&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupSO :  IEquatable<ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupSO>, IValidatableObject
    {
        /// <summary>
        /// Defines Origin
        /// </summary>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum OriginEnum
        {
            
            /// <summary>
            /// Enum PARENTCOPY for value: PARENT_COPY
            /// </summary>
            [EnumMember(Value = "PARENT_COPY")]
            PARENTCOPY = 1,
            
            /// <summary>
            /// Enum IMPORT for value: IMPORT
            /// </summary>
            [EnumMember(Value = "IMPORT")]
            IMPORT = 2,
            
            /// <summary>
            /// Enum MANUAL for value: MANUAL
            /// </summary>
            [EnumMember(Value = "MANUAL")]
            MANUAL = 3
        }

        /// <summary>
        /// Gets or Sets Origin
        /// </summary>
        [DataMember(Name="origin", EmitDefaultValue=false)]
        public OriginEnum? Origin { get; set; }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupSO" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupSO() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupSO" /> class.
        /// </summary>
        /// <param name="reasonCodeGroupCode">&lt;p&gt;A retailer assigned code denoting the family of related reason codes for classifying data and actions within the systems of the retail enterprise.&lt;br /&gt;&lt;/p&gt; (required).</param>
        /// <param name="businessUnitGroupID">&lt;p&gt;The unique identifier of the business unit group.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Import:&lt;br /&gt; masterData_Reason.xml: BusinessUnitGroupID or the BusinessUnitGroupID for the ExternalBusinessUnitGroupID from ReasonCodeGroup.BugHeader or if not filled, then from ReasonCodeGroupMasterData.BugHeader. If not filled, then the data is globally valid.&lt;br /&gt;&lt;/p&gt; (required).</param>
        /// <param name="reasonCodeGroupDescription">&lt;p&gt;Description of the reason code group&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="reasonCodeGroupParameterList">&lt;p&gt;List of parameters defined for this reason code group&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Not used, not imported.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="tid">&lt;p&gt;Translation identifier&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="translations">&lt;p&gt;List of translations&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="origin">origin.</param>
        /// <param name="xxcustom05">&lt;p&gt;Additional field for custom development&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom03">&lt;p&gt;Additional field for custom development&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom02">&lt;p&gt;Additional field for custom development&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom04">&lt;p&gt;Additional field for custom development&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom01">&lt;p&gt;Additional field for custom development&lt;br /&gt;&lt;/p&gt;.</param>
        public ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupSO(string reasonCodeGroupCode = default(string), string businessUnitGroupID = default(string), string reasonCodeGroupDescription = default(string), List<ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupParameterSO> reasonCodeGroupParameterList = default(List<ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupParameterSO>), string tid = default(string), List<ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupTranslationSO> translations = default(List<ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupTranslationSO>), OriginEnum? origin = default(OriginEnum?), string xxcustom05 = default(string), string xxcustom03 = default(string), string xxcustom02 = default(string), string xxcustom04 = default(string), string xxcustom01 = default(string))
        {
            // to ensure "reasonCodeGroupCode" is required (not null)
            if (reasonCodeGroupCode == null)
            {
                throw new InvalidDataException("reasonCodeGroupCode is a required property for ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupSO and cannot be null");
            }
            else
            {
                this.ReasonCodeGroupCode = reasonCodeGroupCode;
            }
            // to ensure "businessUnitGroupID" is required (not null)
            if (businessUnitGroupID == null)
            {
                throw new InvalidDataException("businessUnitGroupID is a required property for ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupSO and cannot be null");
            }
            else
            {
                this.BusinessUnitGroupID = businessUnitGroupID;
            }
            this.ReasonCodeGroupDescription = reasonCodeGroupDescription;
            this.ReasonCodeGroupParameterList = reasonCodeGroupParameterList;
            this.Tid = tid;
            this.Translations = translations;
            this.Origin = origin;
            this.Xxcustom05 = xxcustom05;
            this.Xxcustom03 = xxcustom03;
            this.Xxcustom02 = xxcustom02;
            this.Xxcustom04 = xxcustom04;
            this.Xxcustom01 = xxcustom01;
        }
        
        /// <summary>
        /// &lt;p&gt;A retailer assigned code denoting the family of related reason codes for classifying data and actions within the systems of the retail enterprise.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;A retailer assigned code denoting the family of related reason codes for classifying data and actions within the systems of the retail enterprise.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="reasonCodeGroupCode", EmitDefaultValue=false)]
        public string ReasonCodeGroupCode { get; set; }

        /// <summary>
        /// &lt;p&gt;The unique identifier of the business unit group.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Import:&lt;br /&gt; masterData_Reason.xml: BusinessUnitGroupID or the BusinessUnitGroupID for the ExternalBusinessUnitGroupID from ReasonCodeGroup.BugHeader or if not filled, then from ReasonCodeGroupMasterData.BugHeader. If not filled, then the data is globally valid.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The unique identifier of the business unit group.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Import:&lt;br /&gt; masterData_Reason.xml: BusinessUnitGroupID or the BusinessUnitGroupID for the ExternalBusinessUnitGroupID from ReasonCodeGroup.BugHeader or if not filled, then from ReasonCodeGroupMasterData.BugHeader. If not filled, then the data is globally valid.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="businessUnitGroupID", EmitDefaultValue=false)]
        public string BusinessUnitGroupID { get; set; }

        /// <summary>
        /// &lt;p&gt;Description of the reason code group&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Description of the reason code group&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="reasonCodeGroupDescription", EmitDefaultValue=false)]
        public string ReasonCodeGroupDescription { get; set; }

        /// <summary>
        /// &lt;p&gt;List of parameters defined for this reason code group&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Not used, not imported.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;List of parameters defined for this reason code group&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Not used, not imported.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="reasonCodeGroupParameterList", EmitDefaultValue=false)]
        public List<ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupParameterSO> ReasonCodeGroupParameterList { get; set; }

        /// <summary>
        /// &lt;p&gt;Translation identifier&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Translation identifier&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="tid", EmitDefaultValue=false)]
        public string Tid { get; set; }

        /// <summary>
        /// &lt;p&gt;List of translations&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;List of translations&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="translations", EmitDefaultValue=false)]
        public List<ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupTranslationSO> Translations { get; set; }


        /// <summary>
        /// &lt;p&gt;Additional field for custom development&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Additional field for custom development&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="xxcustom05", EmitDefaultValue=false)]
        public string Xxcustom05 { get; set; }

        /// <summary>
        /// &lt;p&gt;Additional field for custom development&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Additional field for custom development&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="xxcustom03", EmitDefaultValue=false)]
        public string Xxcustom03 { get; set; }

        /// <summary>
        /// &lt;p&gt;Additional field for custom development&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Additional field for custom development&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="xxcustom02", EmitDefaultValue=false)]
        public string Xxcustom02 { get; set; }

        /// <summary>
        /// &lt;p&gt;Additional field for custom development&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Additional field for custom development&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="xxcustom04", EmitDefaultValue=false)]
        public string Xxcustom04 { get; set; }

        /// <summary>
        /// &lt;p&gt;Additional field for custom development&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Additional field for custom development&lt;br /&gt;&lt;/p&gt;</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 ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupSO {\n");
            sb.Append("  ReasonCodeGroupCode: ").Append(ReasonCodeGroupCode).Append("\n");
            sb.Append("  BusinessUnitGroupID: ").Append(BusinessUnitGroupID).Append("\n");
            sb.Append("  ReasonCodeGroupDescription: ").Append(ReasonCodeGroupDescription).Append("\n");
            sb.Append("  ReasonCodeGroupParameterList: ").Append(ReasonCodeGroupParameterList).Append("\n");
            sb.Append("  Tid: ").Append(Tid).Append("\n");
            sb.Append("  Translations: ").Append(Translations).Append("\n");
            sb.Append("  Origin: ").Append(Origin).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 ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonCodeGroupSO);
        }

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

            return 
                (
                    this.ReasonCodeGroupCode == input.ReasonCodeGroupCode ||
                    (this.ReasonCodeGroupCode != null &&
                    this.ReasonCodeGroupCode.Equals(input.ReasonCodeGroupCode))
                ) && 
                (
                    this.BusinessUnitGroupID == input.BusinessUnitGroupID ||
                    (this.BusinessUnitGroupID != null &&
                    this.BusinessUnitGroupID.Equals(input.BusinessUnitGroupID))
                ) && 
                (
                    this.ReasonCodeGroupDescription == input.ReasonCodeGroupDescription ||
                    (this.ReasonCodeGroupDescription != null &&
                    this.ReasonCodeGroupDescription.Equals(input.ReasonCodeGroupDescription))
                ) && 
                (
                    this.ReasonCodeGroupParameterList == input.ReasonCodeGroupParameterList ||
                    this.ReasonCodeGroupParameterList != null &&
                    this.ReasonCodeGroupParameterList.SequenceEqual(input.ReasonCodeGroupParameterList)
                ) && 
                (
                    this.Tid == input.Tid ||
                    (this.Tid != null &&
                    this.Tid.Equals(input.Tid))
                ) && 
                (
                    this.Translations == input.Translations ||
                    this.Translations != null &&
                    this.Translations.SequenceEqual(input.Translations)
                ) && 
                (
                    this.Origin == input.Origin ||
                    (this.Origin != null &&
                    this.Origin.Equals(input.Origin))
                ) && 
                (
                    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.ReasonCodeGroupCode != null)
                    hashCode = hashCode * 59 + this.ReasonCodeGroupCode.GetHashCode();
                if (this.BusinessUnitGroupID != null)
                    hashCode = hashCode * 59 + this.BusinessUnitGroupID.GetHashCode();
                if (this.ReasonCodeGroupDescription != null)
                    hashCode = hashCode * 59 + this.ReasonCodeGroupDescription.GetHashCode();
                if (this.ReasonCodeGroupParameterList != null)
                    hashCode = hashCode * 59 + this.ReasonCodeGroupParameterList.GetHashCode();
                if (this.Tid != null)
                    hashCode = hashCode * 59 + this.Tid.GetHashCode();
                if (this.Translations != null)
                    hashCode = hashCode * 59 + this.Translations.GetHashCode();
                if (this.Origin != null)
                    hashCode = hashCode * 59 + this.Origin.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;
        }
    }

}
