Digitalisation_EPA_Serveur/EPAServeur/ModelCollaborateur/PeriodeEssai.cs

206 lines
7.5 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>
/// PeriodeEssai
/// </summary>
[DataContract]
public partial class PeriodeEssai : IEquatable<PeriodeEssai>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="PeriodeEssai" /> class.
/// </summary>
/// <param name="id">id.</param>
/// <param name="dateDebut">dateDebut.</param>
/// <param name="dateFinPrev">dateFinPrev.</param>
/// <param name="dateFinEffect">dateFinEffect.</param>
/// <param name="commentaire">commentaire.</param>
/// <param name="issuePE">issuePE.</param>
public PeriodeEssai(long? id = default(long?), DateTime? dateDebut = default(DateTime?), DateTime? dateFinPrev = default(DateTime?), DateTime? dateFinEffect = default(DateTime?), string commentaire = default(string), IssuePE issuePE = default(IssuePE))
{
this.Id = id;
this.DateDebut = dateDebut;
this.DateFinPrev = dateFinPrev;
this.DateFinEffect = dateFinEffect;
this.Commentaire = commentaire;
this.IssuePE = issuePE;
}
/// <summary>
/// Gets or Sets Id
/// </summary>
[DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; set; }
/// <summary>
/// Gets or Sets DateDebut
/// </summary>
[DataMember(Name="dateDebut", EmitDefaultValue=false)]
[JsonConverter(typeof(SwaggerDateConverter))]
public DateTime? DateDebut { get; set; }
/// <summary>
/// Gets or Sets DateFinPrev
/// </summary>
[DataMember(Name="dateFinPrev", EmitDefaultValue=false)]
[JsonConverter(typeof(SwaggerDateConverter))]
public DateTime? DateFinPrev { get; set; }
/// <summary>
/// Gets or Sets DateFinEffect
/// </summary>
[DataMember(Name="dateFinEffect", EmitDefaultValue=false)]
[JsonConverter(typeof(SwaggerDateConverter))]
public DateTime? DateFinEffect { get; set; }
/// <summary>
/// Gets or Sets Commentaire
/// </summary>
[DataMember(Name="commentaire", EmitDefaultValue=false)]
public string Commentaire { get; set; }
/// <summary>
/// Gets or Sets IssuePE
/// </summary>
[DataMember(Name="issuePE", EmitDefaultValue=false)]
public IssuePE IssuePE { 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 PeriodeEssai {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" DateDebut: ").Append(DateDebut).Append("\n");
sb.Append(" DateFinPrev: ").Append(DateFinPrev).Append("\n");
sb.Append(" DateFinEffect: ").Append(DateFinEffect).Append("\n");
sb.Append(" Commentaire: ").Append(Commentaire).Append("\n");
sb.Append(" IssuePE: ").Append(IssuePE).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 PeriodeEssai);
}
/// <summary>
/// Returns true if PeriodeEssai instances are equal
/// </summary>
/// <param name="input">Instance of PeriodeEssai to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(PeriodeEssai input)
{
if (input == null)
return false;
return
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
) &&
(
this.DateDebut == input.DateDebut ||
(this.DateDebut != null &&
this.DateDebut.Equals(input.DateDebut))
) &&
(
this.DateFinPrev == input.DateFinPrev ||
(this.DateFinPrev != null &&
this.DateFinPrev.Equals(input.DateFinPrev))
) &&
(
this.DateFinEffect == input.DateFinEffect ||
(this.DateFinEffect != null &&
this.DateFinEffect.Equals(input.DateFinEffect))
) &&
(
this.Commentaire == input.Commentaire ||
(this.Commentaire != null &&
this.Commentaire.Equals(input.Commentaire))
) &&
(
this.IssuePE == input.IssuePE ||
(this.IssuePE != null &&
this.IssuePE.Equals(input.IssuePE))
);
}
/// <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.DateDebut != null)
hashCode = hashCode * 59 + this.DateDebut.GetHashCode();
if (this.DateFinPrev != null)
hashCode = hashCode * 59 + this.DateFinPrev.GetHashCode();
if (this.DateFinEffect != null)
hashCode = hashCode * 59 + this.DateFinEffect.GetHashCode();
if (this.Commentaire != null)
hashCode = hashCode * 59 + this.Commentaire.GetHashCode();
if (this.IssuePE != null)
hashCode = hashCode * 59 + this.IssuePE.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;
}
}
}