/* 
 * 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>
    /// CG1O_DATIGESTANAG - Uffici TS Digital Invoice&lt;br&gt;Proprietà chiave:&lt;ul&gt;&lt;li&gt;&lt;b&gt;CodiceCg16&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;TipocfCg44&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;
    /// </summary>
    [DataContract]
        public partial class CustSupplDataInvoicePACODTO :  IEquatable<CustSupplDataInvoicePACODTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CustSupplDataInvoicePACODTO" /> class.
        /// </summary>
        /// <param name="codiceCg16">CG1O_CODICE_CG16 - Codice anagrafica generale (required).</param>
        /// <param name="emailcortesia">CG1O_EMAILCORTESIA - E-mail.</param>
        /// <param name="flgAsw">CG1O_FLGASW - Natura Assosoftware&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - No&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Si&lt;/li&gt;&lt;/ul&gt; (default to 0).</param>
        /// <param name="indTypeb2b">CG1O_INDTYPEB2B - Instradamento&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;99&lt;/i&gt; - Non attivo&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - FEPA&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - FEPR&lt;/li&gt;&lt;/ul&gt; (default to 99).</param>
        /// <param name="tipocfCg44">CG1O_TIPOCF_CG44 - Tipo Cliente / Fornitore&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; -  Cliente&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; -  Fornitore&lt;/li&gt;&lt;/ul&gt; (default to 0).</param>
        /// <param name="additionalData">additionalData.</param>
        /// <param name="pluginData">pluginData.</param>
        public CustSupplDataInvoicePACODTO(int? codiceCg16 = default(int?), string emailcortesia = default(string), int? flgAsw = 0, int? indTypeb2b = 99, double? tipocfCg44 = 0, Dictionary<string, Object> additionalData = default(Dictionary<string, Object>), Dictionary<string, Object> pluginData = default(Dictionary<string, Object>))
        {
            // to ensure "codiceCg16" is required (not null)
            if (codiceCg16 == null)
            {
                throw new InvalidDataException("codiceCg16 is a required property for CustSupplDataInvoicePACODTO and cannot be null");
            }
            else
            {
                this.CodiceCg16 = codiceCg16;
            }
            this.Emailcortesia = emailcortesia;
            // use default value if no "flgAsw" provided
            if (flgAsw == null)
            {
                this.FlgAsw = 0;
            }
            else
            {
                this.FlgAsw = flgAsw;
            }
            // use default value if no "indTypeb2b" provided
            if (indTypeb2b == null)
            {
                this.IndTypeb2b = 99;
            }
            else
            {
                this.IndTypeb2b = indTypeb2b;
            }
            // use default value if no "tipocfCg44" provided
            if (tipocfCg44 == null)
            {
                this.TipocfCg44 = 0;
            }
            else
            {
                this.TipocfCg44 = tipocfCg44;
            }
            this.AdditionalData = additionalData;
            this.PluginData = pluginData;
        }
        
        /// <summary>
        /// CG1O_CODICE_CG16 - Codice anagrafica generale
        /// </summary>
        /// <value>CG1O_CODICE_CG16 - Codice anagrafica generale</value>
        [DataMember(Name="codiceCg16", EmitDefaultValue=false)]
        public int? CodiceCg16 { get; set; }

        /// <summary>
        /// CG1O_EMAILCORTESIA - E-mail
        /// </summary>
        /// <value>CG1O_EMAILCORTESIA - E-mail</value>
        [DataMember(Name="emailcortesia", EmitDefaultValue=false)]
        public string Emailcortesia { get; set; }

        /// <summary>
        /// CG1O_FLGASW - Natura Assosoftware&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - No&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Si&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>CG1O_FLGASW - Natura Assosoftware&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - No&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Si&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="flgAsw", EmitDefaultValue=false)]
        public int? FlgAsw { get; set; }

        /// <summary>
        /// CG1O_INDTYPEB2B - Instradamento&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;99&lt;/i&gt; - Non attivo&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - FEPA&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - FEPR&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>CG1O_INDTYPEB2B - Instradamento&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;99&lt;/i&gt; - Non attivo&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - FEPA&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - FEPR&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="indTypeb2b", EmitDefaultValue=false)]
        public int? IndTypeb2b { get; set; }

        /// <summary>
        /// CG1O_TIPOCF_CG44 - Tipo Cliente / Fornitore&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; -  Cliente&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; -  Fornitore&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>CG1O_TIPOCF_CG44 - Tipo Cliente / Fornitore&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; -  Cliente&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; -  Fornitore&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="tipocfCg44", EmitDefaultValue=false)]
        public double? TipocfCg44 { 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 CustSupplDataInvoicePACODTO {\n");
            sb.Append("  CodiceCg16: ").Append(CodiceCg16).Append("\n");
            sb.Append("  Emailcortesia: ").Append(Emailcortesia).Append("\n");
            sb.Append("  FlgAsw: ").Append(FlgAsw).Append("\n");
            sb.Append("  IndTypeb2b: ").Append(IndTypeb2b).Append("\n");
            sb.Append("  TipocfCg44: ").Append(TipocfCg44).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 CustSupplDataInvoicePACODTO);
        }

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

            return 
                (
                    this.CodiceCg16 == input.CodiceCg16 ||
                    (this.CodiceCg16 != null &&
                    this.CodiceCg16.Equals(input.CodiceCg16))
                ) && 
                (
                    this.Emailcortesia == input.Emailcortesia ||
                    (this.Emailcortesia != null &&
                    this.Emailcortesia.Equals(input.Emailcortesia))
                ) && 
                (
                    this.FlgAsw == input.FlgAsw ||
                    (this.FlgAsw != null &&
                    this.FlgAsw.Equals(input.FlgAsw))
                ) && 
                (
                    this.IndTypeb2b == input.IndTypeb2b ||
                    (this.IndTypeb2b != null &&
                    this.IndTypeb2b.Equals(input.IndTypeb2b))
                ) && 
                (
                    this.TipocfCg44 == input.TipocfCg44 ||
                    (this.TipocfCg44 != null &&
                    this.TipocfCg44.Equals(input.TipocfCg44))
                ) && 
                (
                    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.CodiceCg16 != null)
                    hashCode = hashCode * 59 + this.CodiceCg16.GetHashCode();
                if (this.Emailcortesia != null)
                    hashCode = hashCode * 59 + this.Emailcortesia.GetHashCode();
                if (this.FlgAsw != null)
                    hashCode = hashCode * 59 + this.FlgAsw.GetHashCode();
                if (this.IndTypeb2b != null)
                    hashCode = hashCode * 59 + this.IndTypeb2b.GetHashCode();
                if (this.TipocfCg44 != null)
                    hashCode = hashCode * 59 + this.TipocfCg44.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;
        }
    }
}
