You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Digitalisation_EPA_Serveur/EPAServeur/ModelCollaborateur/Referent.cs

235 lines
8.2 KiB

/*
* 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
{
/// <summary>
/// Referent
/// </summary>
[DataContract]
public partial class Referent : IEquatable<Referent>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="Referent" /> class.
/// </summary>
/// <param name="id">id (required).</param>
/// <param name="nom">nom (required).</param>
/// <param name="prenom">prenom (required).</param>
/// <param name="mailApside">mailApside (required).</param>
/// <param name="dateDebut">dateDebut.</param>
/// <param name="dateFin">dateFin.</param>
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;
}
/// <summary>
/// Gets or Sets Id
/// </summary>
[DataMember(Name="id", EmitDefaultValue=false)]
public Guid? Id { get; set; }
/// <summary>
/// Gets or Sets Nom
/// </summary>
[DataMember(Name="nom", EmitDefaultValue=false)]
public string Nom { get; set; }
/// <summary>
/// Gets or Sets Prenom
/// </summary>
[DataMember(Name="prenom", EmitDefaultValue=false)]
public string Prenom { get; set; }
/// <summary>
/// Gets or Sets MailApside
/// </summary>
[DataMember(Name="mailApside", EmitDefaultValue=false)]
public string MailApside { get; set; }
/// <summary>
/// Gets or Sets DateDebut
/// </summary>
[DataMember(Name="dateDebut", EmitDefaultValue=false)]
public DateTime? DateDebut { get; set; }
/// <summary>
/// Gets or Sets DateFin
/// </summary>
[DataMember(Name="dateFin", EmitDefaultValue=false)]
public DateTime? DateFin { 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 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();
}
/// <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 Referent);
}
/// <summary>
/// Returns true if Referent instances are equal
/// </summary>
/// <param name="input">Instance of Referent to be compared</param>
/// <returns>Boolean</returns>
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))
);
}
/// <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.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;
}
}
/// <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;
}
}
}