/* 
 * 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>
    /// ReasonParameterSO &lt;p&gt;Reason parameter.&lt;br /&gt; The parameters are not used in a generalized, cross-process manner. Each process uses its own parameters.&lt;br /&gt; Meaning of the most important parameters in the merchandise management processes:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;SAP_BEWART � movement type of the leading system&lt;/li&gt;&lt;br /&gt; &lt;li&gt;SAP_GRUND � reason code of the leading system&lt;/li&gt;&lt;br /&gt; &lt;li&gt;AUTO_RELEASE � defines whether the documents registered on the handheld are automatically released&lt;/li&gt;&lt;br /&gt; &lt;li&gt;SKIP_ON_MOBILE � defines whether the reason is displayed on the mobile handheld device.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;STOCK_IMPACT � determines the way in which the movement affects item stock (0 � no impact, 1 � increase, -1 &#x3D; decrease)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonParameterSO :  IEquatable<ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonParameterSO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonParameterSO" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonParameterSO() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonParameterSO" /> class.
        /// </summary>
        /// <param name="reasonParameterCode">&lt;p&gt;Reason parameter code&lt;br /&gt;&lt;/p&gt; (required).</param>
        /// <param name="reasonParameterName">&lt;p&gt;Reason parameter name&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="reasonParameterValue">&lt;p&gt;Reason parameter value&lt;br /&gt;&lt;/p&gt;.</param>
        public ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonParameterSO(string reasonParameterCode = default(string), string reasonParameterName = default(string), string reasonParameterValue = default(string))
        {
            // to ensure "reasonParameterCode" is required (not null)
            if (reasonParameterCode == null)
            {
                throw new InvalidDataException("reasonParameterCode is a required property for ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonParameterSO and cannot be null");
            }
            else
            {
                this.ReasonParameterCode = reasonParameterCode;
            }
            this.ReasonParameterName = reasonParameterName;
            this.ReasonParameterValue = reasonParameterValue;
        }
        
        /// <summary>
        /// &lt;p&gt;Reason parameter code&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Reason parameter code&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="reasonParameterCode", EmitDefaultValue=false)]
        public string ReasonParameterCode { get; set; }

        /// <summary>
        /// &lt;p&gt;Reason parameter name&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Reason parameter name&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="reasonParameterName", EmitDefaultValue=false)]
        public string ReasonParameterName { get; set; }

        /// <summary>
        /// &lt;p&gt;Reason parameter value&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Reason parameter value&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="reasonParameterValue", EmitDefaultValue=false)]
        public string ReasonParameterValue { 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 ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonParameterSO {\n");
            sb.Append("  ReasonParameterCode: ").Append(ReasonParameterCode).Append("\n");
            sb.Append("  ReasonParameterName: ").Append(ReasonParameterName).Append("\n");
            sb.Append("  ReasonParameterValue: ").Append(ReasonParameterValue).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 ComGkSoftwareSweeSesApiServerMdReasonDtoSoReasonParameterSO);
        }

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

            return 
                (
                    this.ReasonParameterCode == input.ReasonParameterCode ||
                    (this.ReasonParameterCode != null &&
                    this.ReasonParameterCode.Equals(input.ReasonParameterCode))
                ) && 
                (
                    this.ReasonParameterName == input.ReasonParameterName ||
                    (this.ReasonParameterName != null &&
                    this.ReasonParameterName.Equals(input.ReasonParameterName))
                ) && 
                (
                    this.ReasonParameterValue == input.ReasonParameterValue ||
                    (this.ReasonParameterValue != null &&
                    this.ReasonParameterValue.Equals(input.ReasonParameterValue))
                );
        }

        /// <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.ReasonParameterCode != null)
                    hashCode = hashCode * 59 + this.ReasonParameterCode.GetHashCode();
                if (this.ReasonParameterName != null)
                    hashCode = hashCode * 59 + this.ReasonParameterName.GetHashCode();
                if (this.ReasonParameterValue != null)
                    hashCode = hashCode * 59 + this.ReasonParameterValue.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;
        }
    }

}
