/* 
 * TSE Cloud - CO
 *
 * This is Swagger Docs for Document WebApi Teamsystemn Enterprise Cloud, more detail at [https://swagger.io](https://swagger.io).
 *
 * OpenAPI spec version: v2025.3000
 * 
 * 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>
    /// MG21_CLIFORSALPAG - Giorni di slittamento&lt;br&gt;Proprietà chiave:&lt;ul&gt;&lt;li&gt;&lt;b&gt;Id&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;
    /// </summary>
    [DataContract]
        public partial class CSPostponementPeriodCODTO :  IEquatable<CSPostponementPeriodCODTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CSPostponementPeriodCODTO" /> class.
        /// </summary>
        /// <param name="ammgg">MG21_AMMGG - A gg/mm (required).</param>
        /// <param name="cliforCg44">MG21_CLIFOR_CG44 - Codice Cliente / Fornitore (required).</param>
        /// <param name="dammgg">MG21_DAMMGG - Da gg/mm (required).</param>
        /// <param name="dittaCg18">MG21_DITTA_CG18 - Ditta (required).</param>
        /// <param name="ggmmfixslit">MG21_GGMMFIXSLIT - gg/mm scad..</param>
        /// <param name="ggslsucc">MG21_GGSLSUCC - gg slittamento scad. successiva.</param>
        /// <param name="id">MG21_ID - ID (Required only in PUT/PATCH).</param>
        /// <param name="idmediaCg99">MG21_IDMEDIA_CG99 - ID HyperMedia.</param>
        /// <param name="indAppggfix">MG21_INDAPPGGFIX - IndAppggfix.</param>
        /// <param name="indTiposlit">MG21_INDTIPOSLIT - Tipo slittamento&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - 1° giorno dopo limite superiore&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - 1° giorno mese successivo&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Stesso giorno scadenza al mese successivo&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Giorno fisso&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Somma alla rata del mese successivo&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="tipocfCg44">MG21_TIPOCF_CG44 - Tipo Cliente / Fornitore (required).</param>
        /// <param name="tipoeff">MG21_TIPOEFF - Tipo effetto&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Contanti&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Ricevuta bancaria&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Tratta&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Tratta accettata&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Cessione&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - Cambiale&lt;/li&gt;&lt;li&gt;&lt;i&gt;7&lt;/i&gt; - Carta di credito&lt;/li&gt;&lt;li&gt;&lt;i&gt;8&lt;/i&gt; - Bancomat&lt;/li&gt;&lt;li&gt;&lt;i&gt;9&lt;/i&gt; - Contrassegno&lt;/li&gt;&lt;li&gt;&lt;i&gt;10&lt;/i&gt; - Lettera di credito&lt;/li&gt;&lt;li&gt;&lt;i&gt;11&lt;/i&gt; - SDD&lt;/li&gt;&lt;li&gt;&lt;i&gt;12&lt;/i&gt; - Leasing&lt;/li&gt;&lt;li&gt;&lt;i&gt;13&lt;/i&gt; - Rimessa diretta&lt;/li&gt;&lt;li&gt;&lt;i&gt;14&lt;/i&gt; - Bonifico Bancario&lt;/li&gt;&lt;li&gt;&lt;i&gt;15&lt;/i&gt; - C/C postale&lt;/li&gt;&lt;li&gt;&lt;i&gt;16&lt;/i&gt; - MAV&lt;/li&gt;&lt;li&gt;&lt;i&gt;99&lt;/i&gt; - Solo descrittivo&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="additionalData">additionalData.</param>
        /// <param name="pluginData">pluginData.</param>
        public CSPostponementPeriodCODTO(double? ammgg = default(double?), double? cliforCg44 = default(double?), double? dammgg = default(double?), double? dittaCg18 = default(double?), double? ggmmfixslit = default(double?), double? ggslsucc = default(double?), long? id = default(long?), double? idmediaCg99 = default(double?), int? indAppggfix = default(int?), double? indTiposlit = default(double?), double? tipocfCg44 = default(double?), double? tipoeff = default(double?), Dictionary<string, Object> additionalData = default(Dictionary<string, Object>), Dictionary<string, Object> pluginData = default(Dictionary<string, Object>))
        {
            // to ensure "ammgg" is required (not null)
            if (ammgg == null)
            {
                throw new InvalidDataException("ammgg is a required property for CSPostponementPeriodCODTO and cannot be null");
            }
            else
            {
                this.Ammgg = ammgg;
            }
            // to ensure "cliforCg44" is required (not null)
            if (cliforCg44 == null)
            {
                throw new InvalidDataException("cliforCg44 is a required property for CSPostponementPeriodCODTO and cannot be null");
            }
            else
            {
                this.CliforCg44 = cliforCg44;
            }
            // to ensure "dammgg" is required (not null)
            if (dammgg == null)
            {
                throw new InvalidDataException("dammgg is a required property for CSPostponementPeriodCODTO and cannot be null");
            }
            else
            {
                this.Dammgg = dammgg;
            }
            // to ensure "dittaCg18" is required (not null)
            if (dittaCg18 == null)
            {
                throw new InvalidDataException("dittaCg18 is a required property for CSPostponementPeriodCODTO and cannot be null");
            }
            else
            {
                this.DittaCg18 = dittaCg18;
            }
            // to ensure "tipocfCg44" is required (not null)
            if (tipocfCg44 == null)
            {
                throw new InvalidDataException("tipocfCg44 is a required property for CSPostponementPeriodCODTO and cannot be null");
            }
            else
            {
                this.TipocfCg44 = tipocfCg44;
            }
            this.Ggmmfixslit = ggmmfixslit;
            this.Ggslsucc = ggslsucc;
            this.Id = id;
            this.IdmediaCg99 = idmediaCg99;
            this.IndAppggfix = indAppggfix;
            this.IndTiposlit = indTiposlit;
            this.Tipoeff = tipoeff;
            this.AdditionalData = additionalData;
            this.PluginData = pluginData;
        }
        
        /// <summary>
        /// MG21_AMMGG - A gg/mm
        /// </summary>
        /// <value>MG21_AMMGG - A gg/mm</value>
        [DataMember(Name="ammgg", EmitDefaultValue=false)]
        public double? Ammgg { get; set; }

        /// <summary>
        /// MG21_CLIFOR_CG44 - Codice Cliente / Fornitore
        /// </summary>
        /// <value>MG21_CLIFOR_CG44 - Codice Cliente / Fornitore</value>
        [DataMember(Name="cliforCg44", EmitDefaultValue=false)]
        public double? CliforCg44 { get; set; }

        /// <summary>
        /// MG21_DAMMGG - Da gg/mm
        /// </summary>
        /// <value>MG21_DAMMGG - Da gg/mm</value>
        [DataMember(Name="dammgg", EmitDefaultValue=false)]
        public double? Dammgg { get; set; }

        /// <summary>
        /// MG21_DITTA_CG18 - Ditta
        /// </summary>
        /// <value>MG21_DITTA_CG18 - Ditta</value>
        [DataMember(Name="dittaCg18", EmitDefaultValue=false)]
        public double? DittaCg18 { get; set; }

        /// <summary>
        /// MG21_GGMMFIXSLIT - gg/mm scad.
        /// </summary>
        /// <value>MG21_GGMMFIXSLIT - gg/mm scad.</value>
        [DataMember(Name="ggmmfixslit", EmitDefaultValue=false)]
        public double? Ggmmfixslit { get; set; }

        /// <summary>
        /// MG21_GGSLSUCC - gg slittamento scad. successiva
        /// </summary>
        /// <value>MG21_GGSLSUCC - gg slittamento scad. successiva</value>
        [DataMember(Name="ggslsucc", EmitDefaultValue=false)]
        public double? Ggslsucc { get; set; }

        /// <summary>
        /// MG21_ID - ID (Required only in PUT/PATCH)
        /// </summary>
        /// <value>MG21_ID - ID (Required only in PUT/PATCH)</value>
        [DataMember(Name="id", EmitDefaultValue=false)]
        public long? Id { get; set; }

        /// <summary>
        /// MG21_IDMEDIA_CG99 - ID HyperMedia
        /// </summary>
        /// <value>MG21_IDMEDIA_CG99 - ID HyperMedia</value>
        [DataMember(Name="idmediaCg99", EmitDefaultValue=false)]
        public double? IdmediaCg99 { get; set; }

        /// <summary>
        /// MG21_INDAPPGGFIX - IndAppggfix
        /// </summary>
        /// <value>MG21_INDAPPGGFIX - IndAppggfix</value>
        [DataMember(Name="indAppggfix", EmitDefaultValue=false)]
        public int? IndAppggfix { get; set; }

        /// <summary>
        /// MG21_INDTIPOSLIT - Tipo slittamento&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - 1° giorno dopo limite superiore&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - 1° giorno mese successivo&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Stesso giorno scadenza al mese successivo&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Giorno fisso&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Somma alla rata del mese successivo&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>MG21_INDTIPOSLIT - Tipo slittamento&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - 1° giorno dopo limite superiore&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - 1° giorno mese successivo&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Stesso giorno scadenza al mese successivo&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Giorno fisso&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Somma alla rata del mese successivo&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="indTiposlit", EmitDefaultValue=false)]
        public double? IndTiposlit { get; set; }

        /// <summary>
        /// MG21_TIPOCF_CG44 - Tipo Cliente / Fornitore
        /// </summary>
        /// <value>MG21_TIPOCF_CG44 - Tipo Cliente / Fornitore</value>
        [DataMember(Name="tipocfCg44", EmitDefaultValue=false)]
        public double? TipocfCg44 { get; set; }

        /// <summary>
        /// MG21_TIPOEFF - Tipo effetto&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Contanti&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Ricevuta bancaria&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Tratta&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Tratta accettata&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Cessione&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - Cambiale&lt;/li&gt;&lt;li&gt;&lt;i&gt;7&lt;/i&gt; - Carta di credito&lt;/li&gt;&lt;li&gt;&lt;i&gt;8&lt;/i&gt; - Bancomat&lt;/li&gt;&lt;li&gt;&lt;i&gt;9&lt;/i&gt; - Contrassegno&lt;/li&gt;&lt;li&gt;&lt;i&gt;10&lt;/i&gt; - Lettera di credito&lt;/li&gt;&lt;li&gt;&lt;i&gt;11&lt;/i&gt; - SDD&lt;/li&gt;&lt;li&gt;&lt;i&gt;12&lt;/i&gt; - Leasing&lt;/li&gt;&lt;li&gt;&lt;i&gt;13&lt;/i&gt; - Rimessa diretta&lt;/li&gt;&lt;li&gt;&lt;i&gt;14&lt;/i&gt; - Bonifico Bancario&lt;/li&gt;&lt;li&gt;&lt;i&gt;15&lt;/i&gt; - C/C postale&lt;/li&gt;&lt;li&gt;&lt;i&gt;16&lt;/i&gt; - MAV&lt;/li&gt;&lt;li&gt;&lt;i&gt;99&lt;/i&gt; - Solo descrittivo&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>MG21_TIPOEFF - Tipo effetto&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Contanti&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Ricevuta bancaria&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Tratta&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Tratta accettata&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Cessione&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - Cambiale&lt;/li&gt;&lt;li&gt;&lt;i&gt;7&lt;/i&gt; - Carta di credito&lt;/li&gt;&lt;li&gt;&lt;i&gt;8&lt;/i&gt; - Bancomat&lt;/li&gt;&lt;li&gt;&lt;i&gt;9&lt;/i&gt; - Contrassegno&lt;/li&gt;&lt;li&gt;&lt;i&gt;10&lt;/i&gt; - Lettera di credito&lt;/li&gt;&lt;li&gt;&lt;i&gt;11&lt;/i&gt; - SDD&lt;/li&gt;&lt;li&gt;&lt;i&gt;12&lt;/i&gt; - Leasing&lt;/li&gt;&lt;li&gt;&lt;i&gt;13&lt;/i&gt; - Rimessa diretta&lt;/li&gt;&lt;li&gt;&lt;i&gt;14&lt;/i&gt; - Bonifico Bancario&lt;/li&gt;&lt;li&gt;&lt;i&gt;15&lt;/i&gt; - C/C postale&lt;/li&gt;&lt;li&gt;&lt;i&gt;16&lt;/i&gt; - MAV&lt;/li&gt;&lt;li&gt;&lt;i&gt;99&lt;/i&gt; - Solo descrittivo&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="tipoeff", EmitDefaultValue=false)]
        public double? Tipoeff { get; set; }

        /// <summary>
        /// Gets or Sets AdditionalData
        /// </summary>
        [DataMember(Name="additionalData", EmitDefaultValue=false)]
        public Dictionary<string, Object> AdditionalData { get; set; }

        /// <summary>
        /// Gets or Sets PluginData
        /// </summary>
        [DataMember(Name="pluginData", EmitDefaultValue=false)]
        public Dictionary<string, Object> PluginData { 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 CSPostponementPeriodCODTO {\n");
            sb.Append("  Ammgg: ").Append(Ammgg).Append("\n");
            sb.Append("  CliforCg44: ").Append(CliforCg44).Append("\n");
            sb.Append("  Dammgg: ").Append(Dammgg).Append("\n");
            sb.Append("  DittaCg18: ").Append(DittaCg18).Append("\n");
            sb.Append("  Ggmmfixslit: ").Append(Ggmmfixslit).Append("\n");
            sb.Append("  Ggslsucc: ").Append(Ggslsucc).Append("\n");
            sb.Append("  Id: ").Append(Id).Append("\n");
            sb.Append("  IdmediaCg99: ").Append(IdmediaCg99).Append("\n");
            sb.Append("  IndAppggfix: ").Append(IndAppggfix).Append("\n");
            sb.Append("  IndTiposlit: ").Append(IndTiposlit).Append("\n");
            sb.Append("  TipocfCg44: ").Append(TipocfCg44).Append("\n");
            sb.Append("  Tipoeff: ").Append(Tipoeff).Append("\n");
            sb.Append("  AdditionalData: ").Append(AdditionalData).Append("\n");
            sb.Append("  PluginData: ").Append(PluginData).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 CSPostponementPeriodCODTO);
        }

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

            return 
                (
                    this.Ammgg == input.Ammgg ||
                    (this.Ammgg != null &&
                    this.Ammgg.Equals(input.Ammgg))
                ) && 
                (
                    this.CliforCg44 == input.CliforCg44 ||
                    (this.CliforCg44 != null &&
                    this.CliforCg44.Equals(input.CliforCg44))
                ) && 
                (
                    this.Dammgg == input.Dammgg ||
                    (this.Dammgg != null &&
                    this.Dammgg.Equals(input.Dammgg))
                ) && 
                (
                    this.DittaCg18 == input.DittaCg18 ||
                    (this.DittaCg18 != null &&
                    this.DittaCg18.Equals(input.DittaCg18))
                ) && 
                (
                    this.Ggmmfixslit == input.Ggmmfixslit ||
                    (this.Ggmmfixslit != null &&
                    this.Ggmmfixslit.Equals(input.Ggmmfixslit))
                ) && 
                (
                    this.Ggslsucc == input.Ggslsucc ||
                    (this.Ggslsucc != null &&
                    this.Ggslsucc.Equals(input.Ggslsucc))
                ) && 
                (
                    this.Id == input.Id ||
                    (this.Id != null &&
                    this.Id.Equals(input.Id))
                ) && 
                (
                    this.IdmediaCg99 == input.IdmediaCg99 ||
                    (this.IdmediaCg99 != null &&
                    this.IdmediaCg99.Equals(input.IdmediaCg99))
                ) && 
                (
                    this.IndAppggfix == input.IndAppggfix ||
                    (this.IndAppggfix != null &&
                    this.IndAppggfix.Equals(input.IndAppggfix))
                ) && 
                (
                    this.IndTiposlit == input.IndTiposlit ||
                    (this.IndTiposlit != null &&
                    this.IndTiposlit.Equals(input.IndTiposlit))
                ) && 
                (
                    this.TipocfCg44 == input.TipocfCg44 ||
                    (this.TipocfCg44 != null &&
                    this.TipocfCg44.Equals(input.TipocfCg44))
                ) && 
                (
                    this.Tipoeff == input.Tipoeff ||
                    (this.Tipoeff != null &&
                    this.Tipoeff.Equals(input.Tipoeff))
                ) && 
                (
                    this.AdditionalData == input.AdditionalData ||
                    this.AdditionalData != null &&
                    input.AdditionalData != null &&
                    this.AdditionalData.SequenceEqual(input.AdditionalData)
                ) && 
                (
                    this.PluginData == input.PluginData ||
                    this.PluginData != null &&
                    input.PluginData != null &&
                    this.PluginData.SequenceEqual(input.PluginData)
                );
        }

        /// <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.Ammgg != null)
                    hashCode = hashCode * 59 + this.Ammgg.GetHashCode();
                if (this.CliforCg44 != null)
                    hashCode = hashCode * 59 + this.CliforCg44.GetHashCode();
                if (this.Dammgg != null)
                    hashCode = hashCode * 59 + this.Dammgg.GetHashCode();
                if (this.DittaCg18 != null)
                    hashCode = hashCode * 59 + this.DittaCg18.GetHashCode();
                if (this.Ggmmfixslit != null)
                    hashCode = hashCode * 59 + this.Ggmmfixslit.GetHashCode();
                if (this.Ggslsucc != null)
                    hashCode = hashCode * 59 + this.Ggslsucc.GetHashCode();
                if (this.Id != null)
                    hashCode = hashCode * 59 + this.Id.GetHashCode();
                if (this.IdmediaCg99 != null)
                    hashCode = hashCode * 59 + this.IdmediaCg99.GetHashCode();
                if (this.IndAppggfix != null)
                    hashCode = hashCode * 59 + this.IndAppggfix.GetHashCode();
                if (this.IndTiposlit != null)
                    hashCode = hashCode * 59 + this.IndTiposlit.GetHashCode();
                if (this.TipocfCg44 != null)
                    hashCode = hashCode * 59 + this.TipocfCg44.GetHashCode();
                if (this.Tipoeff != null)
                    hashCode = hashCode * 59 + this.Tipoeff.GetHashCode();
                if (this.AdditionalData != null)
                    hashCode = hashCode * 59 + this.AdditionalData.GetHashCode();
                if (this.PluginData != null)
                    hashCode = hashCode * 59 + this.PluginData.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;
        }
    }
}
