/* 
 * 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>
    /// VCG1S_STATIFED - FederalStateViewCO&lt;br&gt;Proprietà chiave:&lt;ul&gt;&lt;li&gt;&lt;b&gt;CodiceCg07&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Statofed&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;
    /// </summary>
    [DataContract]
        public partial class FederalStateViewCODTO :  IEquatable<FederalStateViewCODTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="FederalStateViewCODTO" /> class.
        /// </summary>
        /// <param name="a2iso3166Cg07">VCG1S_A2ISO3166_CG07 - A2iso3166Cg07 (required).</param>
        /// <param name="codiceCg07">VCG1S_CODICE_CG07 - Codice Stato (required).</param>
        /// <param name="descr">VCG1S_DESCR - Descrizione.</param>
        /// <param name="iso3166statofed">VCG1S_ISO3166STATOFED - Country ISO 3166.</param>
        /// <param name="statofed">VCG1S_STATOFED - Stato federato (required).</param>
        /// <param name="additionalData">additionalData.</param>
        /// <param name="pluginData">pluginData.</param>
        public FederalStateViewCODTO(string a2iso3166Cg07 = default(string), double? codiceCg07 = default(double?), string descr = default(string), string iso3166statofed = default(string), string statofed = default(string), Dictionary<string, Object> additionalData = default(Dictionary<string, Object>), Dictionary<string, Object> pluginData = default(Dictionary<string, Object>))
        {
            // to ensure "a2iso3166Cg07" is required (not null)
            if (a2iso3166Cg07 == null)
            {
                throw new InvalidDataException("a2iso3166Cg07 is a required property for FederalStateViewCODTO and cannot be null");
            }
            else
            {
                this.A2iso3166Cg07 = a2iso3166Cg07;
            }
            // to ensure "codiceCg07" is required (not null)
            if (codiceCg07 == null)
            {
                throw new InvalidDataException("codiceCg07 is a required property for FederalStateViewCODTO and cannot be null");
            }
            else
            {
                this.CodiceCg07 = codiceCg07;
            }
            // to ensure "statofed" is required (not null)
            if (statofed == null)
            {
                throw new InvalidDataException("statofed is a required property for FederalStateViewCODTO and cannot be null");
            }
            else
            {
                this.Statofed = statofed;
            }
            this.Descr = descr;
            this.Iso3166statofed = iso3166statofed;
            this.AdditionalData = additionalData;
            this.PluginData = pluginData;
        }
        
        /// <summary>
        /// VCG1S_A2ISO3166_CG07 - A2iso3166Cg07
        /// </summary>
        /// <value>VCG1S_A2ISO3166_CG07 - A2iso3166Cg07</value>
        [DataMember(Name="a2iso3166Cg07", EmitDefaultValue=false)]
        public string A2iso3166Cg07 { get; set; }

        /// <summary>
        /// VCG1S_CODICE_CG07 - Codice Stato
        /// </summary>
        /// <value>VCG1S_CODICE_CG07 - Codice Stato</value>
        [DataMember(Name="codiceCg07", EmitDefaultValue=false)]
        public double? CodiceCg07 { get; set; }

        /// <summary>
        /// VCG1S_DESCR - Descrizione
        /// </summary>
        /// <value>VCG1S_DESCR - Descrizione</value>
        [DataMember(Name="descr", EmitDefaultValue=false)]
        public string Descr { get; set; }

        /// <summary>
        /// VCG1S_ISO3166STATOFED - Country ISO 3166
        /// </summary>
        /// <value>VCG1S_ISO3166STATOFED - Country ISO 3166</value>
        [DataMember(Name="iso3166statofed", EmitDefaultValue=false)]
        public string Iso3166statofed { get; set; }

        /// <summary>
        /// VCG1S_STATOFED - Stato federato
        /// </summary>
        /// <value>VCG1S_STATOFED - Stato federato</value>
        [DataMember(Name="statofed", EmitDefaultValue=false)]
        public string Statofed { 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 FederalStateViewCODTO {\n");
            sb.Append("  A2iso3166Cg07: ").Append(A2iso3166Cg07).Append("\n");
            sb.Append("  CodiceCg07: ").Append(CodiceCg07).Append("\n");
            sb.Append("  Descr: ").Append(Descr).Append("\n");
            sb.Append("  Iso3166statofed: ").Append(Iso3166statofed).Append("\n");
            sb.Append("  Statofed: ").Append(Statofed).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 FederalStateViewCODTO);
        }

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

            return 
                (
                    this.A2iso3166Cg07 == input.A2iso3166Cg07 ||
                    (this.A2iso3166Cg07 != null &&
                    this.A2iso3166Cg07.Equals(input.A2iso3166Cg07))
                ) && 
                (
                    this.CodiceCg07 == input.CodiceCg07 ||
                    (this.CodiceCg07 != null &&
                    this.CodiceCg07.Equals(input.CodiceCg07))
                ) && 
                (
                    this.Descr == input.Descr ||
                    (this.Descr != null &&
                    this.Descr.Equals(input.Descr))
                ) && 
                (
                    this.Iso3166statofed == input.Iso3166statofed ||
                    (this.Iso3166statofed != null &&
                    this.Iso3166statofed.Equals(input.Iso3166statofed))
                ) && 
                (
                    this.Statofed == input.Statofed ||
                    (this.Statofed != null &&
                    this.Statofed.Equals(input.Statofed))
                ) && 
                (
                    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.A2iso3166Cg07 != null)
                    hashCode = hashCode * 59 + this.A2iso3166Cg07.GetHashCode();
                if (this.CodiceCg07 != null)
                    hashCode = hashCode * 59 + this.CodiceCg07.GetHashCode();
                if (this.Descr != null)
                    hashCode = hashCode * 59 + this.Descr.GetHashCode();
                if (this.Iso3166statofed != null)
                    hashCode = hashCode * 59 + this.Iso3166statofed.GetHashCode();
                if (this.Statofed != null)
                    hashCode = hashCode * 59 + this.Statofed.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;
        }
    }
}
