/* * Service Collaborateur API * * Api du service Collaborateur, utilisée pour récupérer les données des collaborateurs d'Apside * * OpenAPI spec version: 1.1.3 * Contact: lilian.gayet@apside-groupe.com * 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.ClientCollaborateur.SwaggerDateConverter; namespace IO.Swagger.ModelCollaborateur { /// /// Referent /// [DataContract] public partial class Referent : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// /// id (required). /// nom (required). /// prenom (required). /// mailApside (required). /// dateDebut. /// dateFin. public Referent(Guid? id = default(Guid?), string nom = default(string), string prenom = default(string), string mailApside = default(string), DateTime? dateDebut = default(DateTime?), DateTime? dateFin = default(DateTime?)) { // to ensure "id" is required (not null) if (id == null) { throw new InvalidDataException("id is a required property for Referent and cannot be null"); } else { this.Id = id; } // to ensure "nom" is required (not null) if (nom == null) { throw new InvalidDataException("nom is a required property for Referent and cannot be null"); } else { this.Nom = nom; } // to ensure "prenom" is required (not null) if (prenom == null) { throw new InvalidDataException("prenom is a required property for Referent and cannot be null"); } else { this.Prenom = prenom; } // to ensure "mailApside" is required (not null) if (mailApside == null) { throw new InvalidDataException("mailApside is a required property for Referent and cannot be null"); } else { this.MailApside = mailApside; } this.DateDebut = dateDebut; this.DateFin = dateFin; } /// /// Gets or Sets Id /// [DataMember(Name="id", EmitDefaultValue=false)] public Guid? Id { get; set; } /// /// Gets or Sets Nom /// [DataMember(Name="nom", EmitDefaultValue=false)] public string Nom { get; set; } /// /// Gets or Sets Prenom /// [DataMember(Name="prenom", EmitDefaultValue=false)] public string Prenom { get; set; } /// /// Gets or Sets MailApside /// [DataMember(Name="mailApside", EmitDefaultValue=false)] public string MailApside { get; set; } /// /// Gets or Sets DateDebut /// [DataMember(Name="dateDebut", EmitDefaultValue=false)] public DateTime? DateDebut { get; set; } /// /// Gets or Sets DateFin /// [DataMember(Name="dateFin", EmitDefaultValue=false)] public DateTime? DateFin { get; set; } /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { var sb = new StringBuilder(); sb.Append("class Referent {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Nom: ").Append(Nom).Append("\n"); sb.Append(" Prenom: ").Append(Prenom).Append("\n"); sb.Append(" MailApside: ").Append(MailApside).Append("\n"); sb.Append(" DateDebut: ").Append(DateDebut).Append("\n"); sb.Append(" DateFin: ").Append(DateFin).Append("\n"); sb.Append("}\n"); return sb.ToString(); } /// /// Returns the JSON string presentation of the object /// /// JSON string presentation of the object public virtual string ToJson() { return JsonConvert.SerializeObject(this, Formatting.Indented); } /// /// Returns true if objects are equal /// /// Object to be compared /// Boolean public override bool Equals(object input) { return this.Equals(input as Referent); } /// /// Returns true if Referent instances are equal /// /// Instance of Referent to be compared /// Boolean public bool Equals(Referent input) { if (input == null) return false; return ( this.Id == input.Id || (this.Id != null && this.Id.Equals(input.Id)) ) && ( this.Nom == input.Nom || (this.Nom != null && this.Nom.Equals(input.Nom)) ) && ( this.Prenom == input.Prenom || (this.Prenom != null && this.Prenom.Equals(input.Prenom)) ) && ( this.MailApside == input.MailApside || (this.MailApside != null && this.MailApside.Equals(input.MailApside)) ) && ( this.DateDebut == input.DateDebut || (this.DateDebut != null && this.DateDebut.Equals(input.DateDebut)) ) && ( this.DateFin == input.DateFin || (this.DateFin != null && this.DateFin.Equals(input.DateFin)) ); } /// /// Gets the hash code /// /// Hash code public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (this.Id != null) hashCode = hashCode * 59 + this.Id.GetHashCode(); if (this.Nom != null) hashCode = hashCode * 59 + this.Nom.GetHashCode(); if (this.Prenom != null) hashCode = hashCode * 59 + this.Prenom.GetHashCode(); if (this.MailApside != null) hashCode = hashCode * 59 + this.MailApside.GetHashCode(); if (this.DateDebut != null) hashCode = hashCode * 59 + this.DateDebut.GetHashCode(); if (this.DateFin != null) hashCode = hashCode * 59 + this.DateFin.GetHashCode(); return hashCode; } } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { yield break; } } }