/* 
 * 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>
    /// OperatorAssignmentSO &lt;p&gt;Assignment of the operator to a role in a specific retail store&lt;br /&gt;&lt;/p&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareSweeSesApiServerUmOperatorDtoSoOperatorAssignmentSO :  IEquatable<ComGkSoftwareSweeSesApiServerUmOperatorDtoSoOperatorAssignmentSO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareSweeSesApiServerUmOperatorDtoSoOperatorAssignmentSO" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareSweeSesApiServerUmOperatorDtoSoOperatorAssignmentSO() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareSweeSesApiServerUmOperatorDtoSoOperatorAssignmentSO" /> class.
        /// </summary>
        /// <param name="retailStoreID">&lt;p&gt;Retail store ID of the role assignment&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Import:&lt;br /&gt; Operator.xml: from Operator.BusinessUnitAssignment.BusinessUnitIdentification: BusinessUnitID or the corresponding retail store ID for the ExternalBusinessUnitID&lt;br /&gt;&lt;/p&gt; (required).</param>
        /// <param name="workGroupID">&lt;p&gt;ID of the assigned role in the store&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Import:&lt;br /&gt; Operator.xml: Operator.BusinessUnitAssignment.BusinessUnitAssignmentContent.RoleID&lt;br /&gt;&lt;/p&gt; (required).</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 ComGkSoftwareSweeSesApiServerUmOperatorDtoSoOperatorAssignmentSO(string retailStoreID = default(string), string workGroupID = default(string), string xxcustom05 = default(string), string xxcustom03 = default(string), string xxcustom02 = default(string), string xxcustom04 = default(string), string xxcustom01 = default(string))
        {
            // to ensure "retailStoreID" is required (not null)
            if (retailStoreID == null)
            {
                throw new InvalidDataException("retailStoreID is a required property for ComGkSoftwareSweeSesApiServerUmOperatorDtoSoOperatorAssignmentSO and cannot be null");
            }
            else
            {
                this.RetailStoreID = retailStoreID;
            }
            // to ensure "workGroupID" is required (not null)
            if (workGroupID == null)
            {
                throw new InvalidDataException("workGroupID is a required property for ComGkSoftwareSweeSesApiServerUmOperatorDtoSoOperatorAssignmentSO and cannot be null");
            }
            else
            {
                this.WorkGroupID = workGroupID;
            }
            this.Xxcustom05 = xxcustom05;
            this.Xxcustom03 = xxcustom03;
            this.Xxcustom02 = xxcustom02;
            this.Xxcustom04 = xxcustom04;
            this.Xxcustom01 = xxcustom01;
        }
        
        /// <summary>
        /// &lt;p&gt;Retail store ID of the role assignment&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Import:&lt;br /&gt; Operator.xml: from Operator.BusinessUnitAssignment.BusinessUnitIdentification: BusinessUnitID or the corresponding retail store ID for the ExternalBusinessUnitID&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Retail store ID of the role assignment&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Import:&lt;br /&gt; Operator.xml: from Operator.BusinessUnitAssignment.BusinessUnitIdentification: BusinessUnitID or the corresponding retail store ID for the ExternalBusinessUnitID&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="retailStoreID", EmitDefaultValue=false)]
        public string RetailStoreID { get; set; }

        /// <summary>
        /// &lt;p&gt;ID of the assigned role in the store&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Import:&lt;br /&gt; Operator.xml: Operator.BusinessUnitAssignment.BusinessUnitAssignmentContent.RoleID&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;ID of the assigned role in the store&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Import:&lt;br /&gt; Operator.xml: Operator.BusinessUnitAssignment.BusinessUnitAssignmentContent.RoleID&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="workGroupID", EmitDefaultValue=false)]
        public string WorkGroupID { 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 ComGkSoftwareSweeSesApiServerUmOperatorDtoSoOperatorAssignmentSO {\n");
            sb.Append("  RetailStoreID: ").Append(RetailStoreID).Append("\n");
            sb.Append("  WorkGroupID: ").Append(WorkGroupID).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 ComGkSoftwareSweeSesApiServerUmOperatorDtoSoOperatorAssignmentSO);
        }

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

            return 
                (
                    this.RetailStoreID == input.RetailStoreID ||
                    (this.RetailStoreID != null &&
                    this.RetailStoreID.Equals(input.RetailStoreID))
                ) && 
                (
                    this.WorkGroupID == input.WorkGroupID ||
                    (this.WorkGroupID != null &&
                    this.WorkGroupID.Equals(input.WorkGroupID))
                ) && 
                (
                    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.RetailStoreID != null)
                    hashCode = hashCode * 59 + this.RetailStoreID.GetHashCode();
                if (this.WorkGroupID != null)
                    hashCode = hashCode * 59 + this.WorkGroupID.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;
        }
    }

}
