/*
* 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
{
///
/// Adresse
///
[DataContract]
public partial class Adresse : IEquatable, IValidatableObject
{
///
/// Initializes a new instance of the class.
///
/// id.
/// rue.
/// ville.
/// codePostal.
/// pays.
/// dateDebut.
/// dateFin.
public Adresse(long? id = default(long?), string rue = default(string), string ville = default(string), string codePostal = default(string), string pays = default(string), DateTime? dateDebut = default(DateTime?), DateTime? dateFin = default(DateTime?))
{
this.Id = id;
this.Rue = rue;
this.Ville = ville;
this.CodePostal = codePostal;
this.Pays = pays;
this.DateDebut = dateDebut;
this.DateFin = dateFin;
}
///
/// Gets or Sets Id
///
[DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; set; }
///
/// Gets or Sets Rue
///
[DataMember(Name="rue", EmitDefaultValue=false)]
public string Rue { get; set; }
///
/// Gets or Sets Ville
///
[DataMember(Name="ville", EmitDefaultValue=false)]
public string Ville { get; set; }
///
/// Gets or Sets CodePostal
///
[DataMember(Name="codePostal", EmitDefaultValue=false)]
public string CodePostal { get; set; }
///
/// Gets or Sets Pays
///
[DataMember(Name="pays", EmitDefaultValue=false)]
public string Pays { get; set; }
///
/// Gets or Sets DateDebut
///
[DataMember(Name="dateDebut", EmitDefaultValue=false)]
[JsonConverter(typeof(SwaggerDateConverter))]
public DateTime? DateDebut { get; set; }
///
/// Gets or Sets DateFin
///
[DataMember(Name="dateFin", EmitDefaultValue=false)]
[JsonConverter(typeof(SwaggerDateConverter))]
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 Adresse {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Rue: ").Append(Rue).Append("\n");
sb.Append(" Ville: ").Append(Ville).Append("\n");
sb.Append(" CodePostal: ").Append(CodePostal).Append("\n");
sb.Append(" Pays: ").Append(Pays).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 Adresse);
}
///
/// Returns true if Adresse instances are equal
///
/// Instance of Adresse to be compared
/// Boolean
public bool Equals(Adresse input)
{
if (input == null)
return false;
return
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
) &&
(
this.Rue == input.Rue ||
(this.Rue != null &&
this.Rue.Equals(input.Rue))
) &&
(
this.Ville == input.Ville ||
(this.Ville != null &&
this.Ville.Equals(input.Ville))
) &&
(
this.CodePostal == input.CodePostal ||
(this.CodePostal != null &&
this.CodePostal.Equals(input.CodePostal))
) &&
(
this.Pays == input.Pays ||
(this.Pays != null &&
this.Pays.Equals(input.Pays))
) &&
(
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.Rue != null)
hashCode = hashCode * 59 + this.Rue.GetHashCode();
if (this.Ville != null)
hashCode = hashCode * 59 + this.Ville.GetHashCode();
if (this.CodePostal != null)
hashCode = hashCode * 59 + this.CodePostal.GetHashCode();
if (this.Pays != null)
hashCode = hashCode * 59 + this.Pays.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;
}
}
}