/*
* 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
{
///
/// Collaborateur
///
[DataContract]
public partial class Collaborateur : IEquatable, IValidatableObject
{
///
/// Gets or Sets Genre
///
[DataMember(Name="genre", EmitDefaultValue=false)]
public Genre? Genre { get; set; }
///
/// Gets or Sets Statut
///
[DataMember(Name="statut", EmitDefaultValue=false)]
public Statut? Statut { get; set; }
///
/// Initializes a new instance of the class.
///
/// id (required).
/// nom (required).
/// prenom (required).
/// genre.
/// dateNaissance.
/// nbEnfants.
/// adresse.
/// telephone.
/// mailPerso.
/// mailApside.
/// statut.
/// fonctions.
/// businessUnit.
/// referent.
/// parrain.
/// projets.
/// technologiesPref.
/// periodeEssai.
/// dateArrivee.
/// dateDepart.
public Collaborateur(Guid? id = default(Guid?), string nom = default(string), string prenom = default(string), Genre? genre = default(Genre?), DateTime? dateNaissance = default(DateTime?), int? nbEnfants = default(int?), Adresse adresse = default(Adresse), string telephone = default(string), string mailPerso = default(string), string mailApside = default(string), Statut? statut = default(Statut?), List fonctions = default(List), BU businessUnit = default(BU), Referent referent = default(Referent), Collaborateur parrain = default(Collaborateur), List projets = default(List), List technologiesPref = default(List), List periodeEssai = default(List), DateTime? dateArrivee = default(DateTime?), DateTime? dateDepart = default(DateTime?))
{
// to ensure "id" is required (not null)
if (id == null)
{
throw new InvalidDataException("id is a required property for Collaborateur 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 Collaborateur 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 Collaborateur and cannot be null");
}
else
{
this.Prenom = prenom;
}
this.Genre = genre;
this.DateNaissance = dateNaissance;
this.NbEnfants = nbEnfants;
this.Adresse = adresse;
this.Telephone = telephone;
this.MailPerso = mailPerso;
this.MailApside = mailApside;
this.Statut = statut;
this.Fonctions = fonctions;
this.BusinessUnit = businessUnit;
this.Referent = referent;
this.Parrain = parrain;
this.Projets = projets;
this.TechnologiesPref = technologiesPref;
this.PeriodeEssai = periodeEssai;
this.DateArrivee = dateArrivee;
this.DateDepart = dateDepart;
}
///
/// 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 DateNaissance
///
[DataMember(Name="dateNaissance", EmitDefaultValue=false)]
[JsonConverter(typeof(SwaggerDateConverter))]
public DateTime? DateNaissance { get; set; }
///
/// Gets or Sets NbEnfants
///
[DataMember(Name="nbEnfants", EmitDefaultValue=false)]
public int? NbEnfants { get; set; }
///
/// Gets or Sets Adresse
///
[DataMember(Name="adresse", EmitDefaultValue=false)]
public Adresse Adresse { get; set; }
///
/// Gets or Sets Telephone
///
[DataMember(Name="telephone", EmitDefaultValue=false)]
public string Telephone { get; set; }
///
/// Gets or Sets MailPerso
///
[DataMember(Name="mailPerso", EmitDefaultValue=false)]
public string MailPerso { get; set; }
///
/// Gets or Sets MailApside
///
[DataMember(Name="mailApside", EmitDefaultValue=false)]
public string MailApside { get; set; }
///
/// Gets or Sets Fonctions
///
[DataMember(Name="fonctions", EmitDefaultValue=false)]
public List Fonctions { get; set; }
///
/// Gets or Sets BusinessUnit
///
[DataMember(Name="businessUnit", EmitDefaultValue=false)]
public BU BusinessUnit { get; set; }
///
/// Gets or Sets Referent
///
[DataMember(Name="referent", EmitDefaultValue=false)]
public Referent Referent { get; set; }
///
/// Gets or Sets Parrain
///
[DataMember(Name="parrain", EmitDefaultValue=false)]
public Collaborateur Parrain { get; set; }
///
/// Gets or Sets Projets
///
[DataMember(Name="projets", EmitDefaultValue=false)]
public List Projets { get; set; }
///
/// Gets or Sets TechnologiesPref
///
[DataMember(Name="technologiesPref", EmitDefaultValue=false)]
public List TechnologiesPref { get; set; }
///
/// Gets or Sets PeriodeEssai
///
[DataMember(Name="periodeEssai", EmitDefaultValue=false)]
public List PeriodeEssai { get; set; }
///
/// Gets or Sets DateArrivee
///
[DataMember(Name="dateArrivee", EmitDefaultValue=false)]
[JsonConverter(typeof(SwaggerDateConverter))]
public DateTime? DateArrivee { get; set; }
///
/// Gets or Sets DateDepart
///
[DataMember(Name="dateDepart", EmitDefaultValue=false)]
[JsonConverter(typeof(SwaggerDateConverter))]
public DateTime? DateDepart { 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 Collaborateur {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Nom: ").Append(Nom).Append("\n");
sb.Append(" Prenom: ").Append(Prenom).Append("\n");
sb.Append(" Genre: ").Append(Genre).Append("\n");
sb.Append(" DateNaissance: ").Append(DateNaissance).Append("\n");
sb.Append(" NbEnfants: ").Append(NbEnfants).Append("\n");
sb.Append(" Adresse: ").Append(Adresse).Append("\n");
sb.Append(" Telephone: ").Append(Telephone).Append("\n");
sb.Append(" MailPerso: ").Append(MailPerso).Append("\n");
sb.Append(" MailApside: ").Append(MailApside).Append("\n");
sb.Append(" Statut: ").Append(Statut).Append("\n");
sb.Append(" Fonctions: ").Append(Fonctions).Append("\n");
sb.Append(" BusinessUnit: ").Append(BusinessUnit).Append("\n");
sb.Append(" Referent: ").Append(Referent).Append("\n");
sb.Append(" Parrain: ").Append(Parrain).Append("\n");
sb.Append(" Projets: ").Append(Projets).Append("\n");
sb.Append(" TechnologiesPref: ").Append(TechnologiesPref).Append("\n");
sb.Append(" PeriodeEssai: ").Append(PeriodeEssai).Append("\n");
sb.Append(" DateArrivee: ").Append(DateArrivee).Append("\n");
sb.Append(" DateDepart: ").Append(DateDepart).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 Collaborateur);
}
///
/// Returns true if Collaborateur instances are equal
///
/// Instance of Collaborateur to be compared
/// Boolean
public bool Equals(Collaborateur 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.Genre == input.Genre ||
(this.Genre != null &&
this.Genre.Equals(input.Genre))
) &&
(
this.DateNaissance == input.DateNaissance ||
(this.DateNaissance != null &&
this.DateNaissance.Equals(input.DateNaissance))
) &&
(
this.NbEnfants == input.NbEnfants ||
(this.NbEnfants != null &&
this.NbEnfants.Equals(input.NbEnfants))
) &&
(
this.Adresse == input.Adresse ||
(this.Adresse != null &&
this.Adresse.Equals(input.Adresse))
) &&
(
this.Telephone == input.Telephone ||
(this.Telephone != null &&
this.Telephone.Equals(input.Telephone))
) &&
(
this.MailPerso == input.MailPerso ||
(this.MailPerso != null &&
this.MailPerso.Equals(input.MailPerso))
) &&
(
this.MailApside == input.MailApside ||
(this.MailApside != null &&
this.MailApside.Equals(input.MailApside))
) &&
(
this.Statut == input.Statut ||
(this.Statut != null &&
this.Statut.Equals(input.Statut))
) &&
(
this.Fonctions == input.Fonctions ||
this.Fonctions != null &&
input.Fonctions != null &&
this.Fonctions.SequenceEqual(input.Fonctions)
) &&
(
this.BusinessUnit == input.BusinessUnit ||
(this.BusinessUnit != null &&
this.BusinessUnit.Equals(input.BusinessUnit))
) &&
(
this.Referent == input.Referent ||
(this.Referent != null &&
this.Referent.Equals(input.Referent))
) &&
(
this.Parrain == input.Parrain ||
(this.Parrain != null &&
this.Parrain.Equals(input.Parrain))
) &&
(
this.Projets == input.Projets ||
this.Projets != null &&
input.Projets != null &&
this.Projets.SequenceEqual(input.Projets)
) &&
(
this.TechnologiesPref == input.TechnologiesPref ||
this.TechnologiesPref != null &&
input.TechnologiesPref != null &&
this.TechnologiesPref.SequenceEqual(input.TechnologiesPref)
) &&
(
this.PeriodeEssai == input.PeriodeEssai ||
this.PeriodeEssai != null &&
input.PeriodeEssai != null &&
this.PeriodeEssai.SequenceEqual(input.PeriodeEssai)
) &&
(
this.DateArrivee == input.DateArrivee ||
(this.DateArrivee != null &&
this.DateArrivee.Equals(input.DateArrivee))
) &&
(
this.DateDepart == input.DateDepart ||
(this.DateDepart != null &&
this.DateDepart.Equals(input.DateDepart))
);
}
///
/// 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.Genre != null)
hashCode = hashCode * 59 + this.Genre.GetHashCode();
if (this.DateNaissance != null)
hashCode = hashCode * 59 + this.DateNaissance.GetHashCode();
if (this.NbEnfants != null)
hashCode = hashCode * 59 + this.NbEnfants.GetHashCode();
if (this.Adresse != null)
hashCode = hashCode * 59 + this.Adresse.GetHashCode();
if (this.Telephone != null)
hashCode = hashCode * 59 + this.Telephone.GetHashCode();
if (this.MailPerso != null)
hashCode = hashCode * 59 + this.MailPerso.GetHashCode();
if (this.MailApside != null)
hashCode = hashCode * 59 + this.MailApside.GetHashCode();
if (this.Statut != null)
hashCode = hashCode * 59 + this.Statut.GetHashCode();
if (this.Fonctions != null)
hashCode = hashCode * 59 + this.Fonctions.GetHashCode();
if (this.BusinessUnit != null)
hashCode = hashCode * 59 + this.BusinessUnit.GetHashCode();
if (this.Referent != null)
hashCode = hashCode * 59 + this.Referent.GetHashCode();
if (this.Parrain != null)
hashCode = hashCode * 59 + this.Parrain.GetHashCode();
if (this.Projets != null)
hashCode = hashCode * 59 + this.Projets.GetHashCode();
if (this.TechnologiesPref != null)
hashCode = hashCode * 59 + this.TechnologiesPref.GetHashCode();
if (this.PeriodeEssai != null)
hashCode = hashCode * 59 + this.PeriodeEssai.GetHashCode();
if (this.DateArrivee != null)
hashCode = hashCode * 59 + this.DateArrivee.GetHashCode();
if (this.DateDepart != null)
hashCode = hashCode * 59 + this.DateDepart.GetHashCode();
return hashCode;
}
}
///
/// To validate all properties of the instance
///
/// Validation context
/// Validation Result
IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}