Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
Loading items

Target

Select target project
  • coscine/backend/libraries/apiclient
1 result
Select Git revision
Loading items
Show changes
Showing
with 54 additions and 1426 deletions
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the Data Transfer Object (DTO) for title information.
/// </summary>
[DataContract(Name = "TitleDto")]
public partial class TitleDto : IEquatable<TitleDto>, IValidatableObject
public partial class TitleDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="TitleDto" /> class.
......@@ -80,67 +80,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 TitleDto);
}
/// <summary>
/// Returns true if TitleDto instances are equal
/// </summary>
/// <param name="input">Instance of TitleDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(TitleDto input)
{
if (input == null)
{
return false;
}
return
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
) &&
(
this.DisplayName == input.DisplayName ||
(this.DisplayName != null &&
this.DisplayName.Equals(input.DisplayName))
);
}
/// <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.DisplayName != null)
{
hashCode = (hashCode * 59) + this.DisplayName.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// TitleDtoIEnumerableResponse
/// </summary>
[DataContract(Name = "TitleDtoIEnumerableResponse")]
public partial class TitleDtoIEnumerableResponse : IEquatable<TitleDtoIEnumerableResponse>, IValidatableObject
public partial class TitleDtoIEnumerableResponse : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="TitleDtoIEnumerableResponse" /> class.
......@@ -102,82 +102,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 TitleDtoIEnumerableResponse);
}
/// <summary>
/// Returns true if TitleDtoIEnumerableResponse instances are equal
/// </summary>
/// <param name="input">Instance of TitleDtoIEnumerableResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(TitleDtoIEnumerableResponse input)
{
if (input == null)
{
return false;
}
return
(
this.Data == input.Data ||
this.Data != null &&
input.Data != null &&
this.Data.SequenceEqual(input.Data)
) &&
(
this.IsSuccess == input.IsSuccess ||
this.IsSuccess.Equals(input.IsSuccess)
) &&
(
this.StatusCode == input.StatusCode ||
(this.StatusCode != null &&
this.StatusCode.Equals(input.StatusCode))
) &&
(
this.TraceId == input.TraceId ||
(this.TraceId != null &&
this.TraceId.Equals(input.TraceId))
);
}
/// <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.Data != null)
{
hashCode = (hashCode * 59) + this.Data.GetHashCode();
}
hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode();
if (this.StatusCode != null)
{
hashCode = (hashCode * 59) + this.StatusCode.GetHashCode();
}
if (this.TraceId != null)
{
hashCode = (hashCode * 59) + this.TraceId.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// TitleDtoResponse
/// </summary>
[DataContract(Name = "TitleDtoResponse")]
public partial class TitleDtoResponse : IEquatable<TitleDtoResponse>, IValidatableObject
public partial class TitleDtoResponse : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="TitleDtoResponse" /> class.
......@@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 TitleDtoResponse);
}
/// <summary>
/// Returns true if TitleDtoResponse instances are equal
/// </summary>
/// <param name="input">Instance of TitleDtoResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(TitleDtoResponse input)
{
if (input == null)
{
return false;
}
return
(
this.Data == input.Data ||
(this.Data != null &&
this.Data.Equals(input.Data))
) &&
(
this.IsSuccess == input.IsSuccess ||
this.IsSuccess.Equals(input.IsSuccess)
) &&
(
this.StatusCode == input.StatusCode ||
(this.StatusCode != null &&
this.StatusCode.Equals(input.StatusCode))
) &&
(
this.TraceId == input.TraceId ||
(this.TraceId != null &&
this.TraceId.Equals(input.TraceId))
);
}
/// <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.Data != null)
{
hashCode = (hashCode * 59) + this.Data.GetHashCode();
}
hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode();
if (this.StatusCode != null)
{
hashCode = (hashCode * 59) + this.StatusCode.GetHashCode();
}
if (this.TraceId != null)
{
hashCode = (hashCode * 59) + this.TraceId.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the data transfer object (DTO) for manipulating a user&#39;s title.
/// </summary>
[DataContract(Name = "TitleForUserManipulationDto")]
public partial class TitleForUserManipulationDto : IEquatable<TitleForUserManipulationDto>, IValidatableObject
public partial class TitleForUserManipulationDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="TitleForUserManipulationDto" /> class.
......@@ -75,58 +75,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 TitleForUserManipulationDto);
}
/// <summary>
/// Returns true if TitleForUserManipulationDto instances are equal
/// </summary>
/// <param name="input">Instance of TitleForUserManipulationDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(TitleForUserManipulationDto input)
{
if (input == null)
{
return false;
}
return
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
);
}
/// <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();
}
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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents a Data Transfer Object (DTO) for user-related information.
/// </summary>
[DataContract(Name = "UserDto")]
public partial class UserDto : IEquatable<UserDto>, IValidatableObject
public partial class UserDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="UserDto" /> class.
......@@ -188,167 +188,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 UserDto);
}
/// <summary>
/// Returns true if UserDto instances are equal
/// </summary>
/// <param name="input">Instance of UserDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(UserDto input)
{
if (input == null)
{
return false;
}
return
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
) &&
(
this.DisplayName == input.DisplayName ||
(this.DisplayName != null &&
this.DisplayName.Equals(input.DisplayName))
) &&
(
this.GivenName == input.GivenName ||
(this.GivenName != null &&
this.GivenName.Equals(input.GivenName))
) &&
(
this.FamilyName == input.FamilyName ||
(this.FamilyName != null &&
this.FamilyName.Equals(input.FamilyName))
) &&
(
this.Emails == input.Emails ||
this.Emails != null &&
input.Emails != null &&
this.Emails.SequenceEqual(input.Emails)
) &&
(
this.Title == input.Title ||
(this.Title != null &&
this.Title.Equals(input.Title))
) &&
(
this.Language == input.Language ||
(this.Language != null &&
this.Language.Equals(input.Language))
) &&
(
this.AreToSAccepted == input.AreToSAccepted ||
this.AreToSAccepted.Equals(input.AreToSAccepted)
) &&
(
this.LatestActivity == input.LatestActivity ||
(this.LatestActivity != null &&
this.LatestActivity.Equals(input.LatestActivity))
) &&
(
this.Disciplines == input.Disciplines ||
this.Disciplines != null &&
input.Disciplines != null &&
this.Disciplines.SequenceEqual(input.Disciplines)
) &&
(
this.Organizations == input.Organizations ||
this.Organizations != null &&
input.Organizations != null &&
this.Organizations.SequenceEqual(input.Organizations)
) &&
(
this.Institutes == input.Institutes ||
this.Institutes != null &&
input.Institutes != null &&
this.Institutes.SequenceEqual(input.Institutes)
) &&
(
this.Identities == input.Identities ||
this.Identities != null &&
input.Identities != null &&
this.Identities.SequenceEqual(input.Identities)
);
}
/// <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.DisplayName != null)
{
hashCode = (hashCode * 59) + this.DisplayName.GetHashCode();
}
if (this.GivenName != null)
{
hashCode = (hashCode * 59) + this.GivenName.GetHashCode();
}
if (this.FamilyName != null)
{
hashCode = (hashCode * 59) + this.FamilyName.GetHashCode();
}
if (this.Emails != null)
{
hashCode = (hashCode * 59) + this.Emails.GetHashCode();
}
if (this.Title != null)
{
hashCode = (hashCode * 59) + this.Title.GetHashCode();
}
if (this.Language != null)
{
hashCode = (hashCode * 59) + this.Language.GetHashCode();
}
hashCode = (hashCode * 59) + this.AreToSAccepted.GetHashCode();
if (this.LatestActivity != null)
{
hashCode = (hashCode * 59) + this.LatestActivity.GetHashCode();
}
if (this.Disciplines != null)
{
hashCode = (hashCode * 59) + this.Disciplines.GetHashCode();
}
if (this.Organizations != null)
{
hashCode = (hashCode * 59) + this.Organizations.GetHashCode();
}
if (this.Institutes != null)
{
hashCode = (hashCode * 59) + this.Institutes.GetHashCode();
}
if (this.Identities != null)
{
hashCode = (hashCode * 59) + this.Identities.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// UserDtoPagedResponse
/// </summary>
[DataContract(Name = "UserDtoPagedResponse")]
public partial class UserDtoPagedResponse : IEquatable<UserDtoPagedResponse>, IValidatableObject
public partial class UserDtoPagedResponse : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="UserDtoPagedResponse" /> class.
......@@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 UserDtoPagedResponse);
}
/// <summary>
/// Returns true if UserDtoPagedResponse instances are equal
/// </summary>
/// <param name="input">Instance of UserDtoPagedResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(UserDtoPagedResponse input)
{
if (input == null)
{
return false;
}
return
(
this.Data == input.Data ||
this.Data != null &&
input.Data != null &&
this.Data.SequenceEqual(input.Data)
) &&
(
this.IsSuccess == input.IsSuccess ||
this.IsSuccess.Equals(input.IsSuccess)
) &&
(
this.StatusCode == input.StatusCode ||
(this.StatusCode != null &&
this.StatusCode.Equals(input.StatusCode))
) &&
(
this.TraceId == input.TraceId ||
(this.TraceId != null &&
this.TraceId.Equals(input.TraceId))
) &&
(
this.Pagination == input.Pagination ||
(this.Pagination != null &&
this.Pagination.Equals(input.Pagination))
);
}
/// <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.Data != null)
{
hashCode = (hashCode * 59) + this.Data.GetHashCode();
}
hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode();
if (this.StatusCode != null)
{
hashCode = (hashCode * 59) + this.StatusCode.GetHashCode();
}
if (this.TraceId != null)
{
hashCode = (hashCode * 59) + this.TraceId.GetHashCode();
}
if (this.Pagination != null)
{
hashCode = (hashCode * 59) + this.Pagination.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// UserDtoResponse
/// </summary>
[DataContract(Name = "UserDtoResponse")]
public partial class UserDtoResponse : IEquatable<UserDtoResponse>, IValidatableObject
public partial class UserDtoResponse : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="UserDtoResponse" /> class.
......@@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 UserDtoResponse);
}
/// <summary>
/// Returns true if UserDtoResponse instances are equal
/// </summary>
/// <param name="input">Instance of UserDtoResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(UserDtoResponse input)
{
if (input == null)
{
return false;
}
return
(
this.Data == input.Data ||
(this.Data != null &&
this.Data.Equals(input.Data))
) &&
(
this.IsSuccess == input.IsSuccess ||
this.IsSuccess.Equals(input.IsSuccess)
) &&
(
this.StatusCode == input.StatusCode ||
(this.StatusCode != null &&
this.StatusCode.Equals(input.StatusCode))
) &&
(
this.TraceId == input.TraceId ||
(this.TraceId != null &&
this.TraceId.Equals(input.TraceId))
);
}
/// <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.Data != null)
{
hashCode = (hashCode * 59) + this.Data.GetHashCode();
}
hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode();
if (this.StatusCode != null)
{
hashCode = (hashCode * 59) + this.StatusCode.GetHashCode();
}
if (this.TraceId != null)
{
hashCode = (hashCode * 59) + this.TraceId.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents a Data Transfer Object (DTO) for user email information.
/// </summary>
[DataContract(Name = "UserEmailDto")]
public partial class UserEmailDto : IEquatable<UserEmailDto>, IValidatableObject
public partial class UserEmailDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="UserEmailDto" /> class.
......@@ -90,68 +90,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 UserEmailDto);
}
/// <summary>
/// Returns true if UserEmailDto instances are equal
/// </summary>
/// <param name="input">Instance of UserEmailDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(UserEmailDto input)
{
if (input == null)
{
return false;
}
return
(
this.Email == input.Email ||
(this.Email != null &&
this.Email.Equals(input.Email))
) &&
(
this.IsConfirmed == input.IsConfirmed ||
this.IsConfirmed.Equals(input.IsConfirmed)
) &&
(
this.IsPrimary == input.IsPrimary ||
this.IsPrimary.Equals(input.IsPrimary)
);
}
/// <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.Email != null)
{
hashCode = (hashCode * 59) + this.Email.GetHashCode();
}
hashCode = (hashCode * 59) + this.IsConfirmed.GetHashCode();
hashCode = (hashCode * 59) + this.IsPrimary.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the data transfer object (DTO) for updating user details.
/// </summary>
[DataContract(Name = "UserForUpdateDto")]
public partial class UserForUpdateDto : IEquatable<UserForUpdateDto>, IValidatableObject
public partial class UserForUpdateDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="UserForUpdateDto" /> class.
......@@ -168,139 +168,29 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 UserForUpdateDto);
}
/// <summary>
/// Returns true if UserForUpdateDto instances are equal
/// </summary>
/// <param name="input">Instance of UserForUpdateDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(UserForUpdateDto input)
{
if (input == null)
{
return false;
}
return
(
this.GivenName == input.GivenName ||
(this.GivenName != null &&
this.GivenName.Equals(input.GivenName))
) &&
(
this.FamilyName == input.FamilyName ||
(this.FamilyName != null &&
this.FamilyName.Equals(input.FamilyName))
) &&
(
this.Email == input.Email ||
(this.Email != null &&
this.Email.Equals(input.Email))
) &&
(
this.Title == input.Title ||
(this.Title != null &&
this.Title.Equals(input.Title))
) &&
(
this.Language == input.Language ||
(this.Language != null &&
this.Language.Equals(input.Language))
) &&
(
this.Organization == input.Organization ||
(this.Organization != null &&
this.Organization.Equals(input.Organization))
) &&
(
this.Institute == input.Institute ||
(this.Institute != null &&
this.Institute.Equals(input.Institute))
) &&
(
this.Disciplines == input.Disciplines ||
this.Disciplines != null &&
input.Disciplines != null &&
this.Disciplines.SequenceEqual(input.Disciplines)
);
}
/// <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.GivenName != null)
{
hashCode = (hashCode * 59) + this.GivenName.GetHashCode();
}
if (this.FamilyName != null)
{
hashCode = (hashCode * 59) + this.FamilyName.GetHashCode();
}
if (this.Email != null)
{
hashCode = (hashCode * 59) + this.Email.GetHashCode();
}
if (this.Title != null)
{
hashCode = (hashCode * 59) + this.Title.GetHashCode();
}
if (this.Language != null)
{
hashCode = (hashCode * 59) + this.Language.GetHashCode();
}
if (this.Organization != null)
{
hashCode = (hashCode * 59) + this.Organization.GetHashCode();
}
if (this.Institute != null)
{
hashCode = (hashCode * 59) + this.Institute.GetHashCode();
}
if (this.Disciplines != null)
{
hashCode = (hashCode * 59) + this.Disciplines.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
// GivenName (string) minLength
if (this.GivenName != null && this.GivenName.Length < 1)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GivenName, length must be greater than 1.", new [] { "GivenName" });
yield return new ValidationResult("Invalid value for GivenName, length must be greater than 1.", new [] { "GivenName" });
}
// FamilyName (string) minLength
if (this.FamilyName != null && this.FamilyName.Length < 1)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FamilyName, length must be greater than 1.", new [] { "FamilyName" });
yield return new ValidationResult("Invalid value for FamilyName, length must be greater than 1.", new [] { "FamilyName" });
}
// Email (string) minLength
if (this.Email != null && this.Email.Length < 1)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Email, length must be greater than 1.", new [] { "Email" });
yield return new ValidationResult("Invalid value for Email, length must be greater than 1.", new [] { "Email" });
}
yield break;
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents a Data Transfer Object (DTO) for user institute information, extending the OrganizationDto.
/// </summary>
[DataContract(Name = "UserInstituteDto")]
public partial class UserInstituteDto : IEquatable<UserInstituteDto>, IValidatableObject
public partial class UserInstituteDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="UserInstituteDto" /> class.
......@@ -39,14 +39,14 @@ namespace Coscine.ApiClient.Core.Model
/// <param name="displayName">The display name of the organization..</param>
/// <param name="email">The email address of the organization..</param>
/// <param name="publicationAdvisoryService">publicationAdvisoryService.</param>
/// <param name="varReadOnly">Determines if the organization&#39;s details can be modified. Defaults to &#x60;true&#x60;; manually set to &#x60;false&#x60;..</param>
public UserInstituteDto(string uri = default(string), string displayName = default(string), string email = default(string), PublicationAdvisoryServiceDto publicationAdvisoryService = default(PublicationAdvisoryServiceDto), bool varReadOnly = default(bool))
/// <param name="readOnly">Determines if the organization&#39;s details can be modified. Defaults to &#x60;true&#x60;; manually set to &#x60;false&#x60;..</param>
public UserInstituteDto(string uri = default(string), string displayName = default(string), string email = default(string), PublicationAdvisoryServiceDto publicationAdvisoryService = default(PublicationAdvisoryServiceDto), bool readOnly = default(bool))
{
this.Uri = uri;
this.DisplayName = displayName;
this.Email = email;
this.PublicationAdvisoryService = publicationAdvisoryService;
this.VarReadOnly = varReadOnly;
this.ReadOnly = readOnly;
}
/// <summary>
......@@ -81,7 +81,7 @@ namespace Coscine.ApiClient.Core.Model
/// </summary>
/// <value>Determines if the organization&#39;s details can be modified. Defaults to &#x60;true&#x60;; manually set to &#x60;false&#x60;.</value>
[DataMember(Name = "readOnly", EmitDefaultValue = true)]
public bool VarReadOnly { get; set; }
public bool ReadOnly { get; set; }
/// <summary>
/// Returns the string presentation of the object
......@@ -95,7 +95,7 @@ namespace Coscine.ApiClient.Core.Model
sb.Append(" DisplayName: ").Append(DisplayName).Append("\n");
sb.Append(" Email: ").Append(Email).Append("\n");
sb.Append(" PublicationAdvisoryService: ").Append(PublicationAdvisoryService).Append("\n");
sb.Append(" VarReadOnly: ").Append(VarReadOnly).Append("\n");
sb.Append(" ReadOnly: ").Append(ReadOnly).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
......@@ -109,90 +109,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 UserInstituteDto);
}
/// <summary>
/// Returns true if UserInstituteDto instances are equal
/// </summary>
/// <param name="input">Instance of UserInstituteDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(UserInstituteDto input)
{
if (input == null)
{
return false;
}
return
(
this.Uri == input.Uri ||
(this.Uri != null &&
this.Uri.Equals(input.Uri))
) &&
(
this.DisplayName == input.DisplayName ||
(this.DisplayName != null &&
this.DisplayName.Equals(input.DisplayName))
) &&
(
this.Email == input.Email ||
(this.Email != null &&
this.Email.Equals(input.Email))
) &&
(
this.PublicationAdvisoryService == input.PublicationAdvisoryService ||
(this.PublicationAdvisoryService != null &&
this.PublicationAdvisoryService.Equals(input.PublicationAdvisoryService))
) &&
(
this.VarReadOnly == input.VarReadOnly ||
this.VarReadOnly.Equals(input.VarReadOnly)
);
}
/// <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.Uri != null)
{
hashCode = (hashCode * 59) + this.Uri.GetHashCode();
}
if (this.DisplayName != null)
{
hashCode = (hashCode * 59) + this.DisplayName.GetHashCode();
}
if (this.Email != null)
{
hashCode = (hashCode * 59) + this.Email.GetHashCode();
}
if (this.PublicationAdvisoryService != null)
{
hashCode = (hashCode * 59) + this.PublicationAdvisoryService.GetHashCode();
}
hashCode = (hashCode * 59) + this.VarReadOnly.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents a Data Transfer Object (DTO) for merging user accounts.
/// </summary>
[DataContract(Name = "UserMergeDto")]
public partial class UserMergeDto : IEquatable<UserMergeDto>, IValidatableObject
public partial class UserMergeDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="UserMergeDto" /> class.
......@@ -70,58 +70,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 UserMergeDto);
}
/// <summary>
/// Returns true if UserMergeDto instances are equal
/// </summary>
/// <param name="input">Instance of UserMergeDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(UserMergeDto input)
{
if (input == null)
{
return false;
}
return
(
this.Token == input.Token ||
(this.Token != null &&
this.Token.Equals(input.Token))
);
}
/// <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.Token != null)
{
hashCode = (hashCode * 59) + this.Token.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// UserMergeDtoResponse
/// </summary>
[DataContract(Name = "UserMergeDtoResponse")]
public partial class UserMergeDtoResponse : IEquatable<UserMergeDtoResponse>, IValidatableObject
public partial class UserMergeDtoResponse : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="UserMergeDtoResponse" /> class.
......@@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 UserMergeDtoResponse);
}
/// <summary>
/// Returns true if UserMergeDtoResponse instances are equal
/// </summary>
/// <param name="input">Instance of UserMergeDtoResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(UserMergeDtoResponse input)
{
if (input == null)
{
return false;
}
return
(
this.Data == input.Data ||
(this.Data != null &&
this.Data.Equals(input.Data))
) &&
(
this.IsSuccess == input.IsSuccess ||
this.IsSuccess.Equals(input.IsSuccess)
) &&
(
this.StatusCode == input.StatusCode ||
(this.StatusCode != null &&
this.StatusCode.Equals(input.StatusCode))
) &&
(
this.TraceId == input.TraceId ||
(this.TraceId != null &&
this.TraceId.Equals(input.TraceId))
);
}
/// <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.Data != null)
{
hashCode = (hashCode * 59) + this.Data.GetHashCode();
}
hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode();
if (this.StatusCode != null)
{
hashCode = (hashCode * 59) + this.StatusCode.GetHashCode();
}
if (this.TraceId != null)
{
hashCode = (hashCode * 59) + this.TraceId.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents a minimal Data Transfer Object (DTO) for user information.
/// </summary>
[DataContract(Name = "UserMinimalDto")]
public partial class UserMinimalDto : IEquatable<UserMinimalDto>, IValidatableObject
public partial class UserMinimalDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="UserMinimalDto" /> class.
......@@ -70,58 +70,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 UserMinimalDto);
}
/// <summary>
/// Returns true if UserMinimalDto instances are equal
/// </summary>
/// <param name="input">Instance of UserMinimalDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(UserMinimalDto input)
{
if (input == null)
{
return false;
}
return
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
);
}
/// <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();
}
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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents a Data Transfer Object (DTO) for user-related organization information, inheriting from OrganizationDto.
/// </summary>
[DataContract(Name = "UserOrganizationDto")]
public partial class UserOrganizationDto : IEquatable<UserOrganizationDto>, IValidatableObject
public partial class UserOrganizationDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="UserOrganizationDto" /> class.
......@@ -39,14 +39,14 @@ namespace Coscine.ApiClient.Core.Model
/// <param name="displayName">The display name of the organization..</param>
/// <param name="email">The email address of the organization..</param>
/// <param name="publicationAdvisoryService">publicationAdvisoryService.</param>
/// <param name="varReadOnly">Determines if the organization&#39;s details can be modified..</param>
public UserOrganizationDto(string uri = default(string), string displayName = default(string), string email = default(string), PublicationAdvisoryServiceDto publicationAdvisoryService = default(PublicationAdvisoryServiceDto), bool varReadOnly = default(bool))
/// <param name="readOnly">Determines if the organization&#39;s details can be modified..</param>
public UserOrganizationDto(string uri = default(string), string displayName = default(string), string email = default(string), PublicationAdvisoryServiceDto publicationAdvisoryService = default(PublicationAdvisoryServiceDto), bool readOnly = default(bool))
{
this.Uri = uri;
this.DisplayName = displayName;
this.Email = email;
this.PublicationAdvisoryService = publicationAdvisoryService;
this.VarReadOnly = varReadOnly;
this.ReadOnly = readOnly;
}
/// <summary>
......@@ -81,7 +81,7 @@ namespace Coscine.ApiClient.Core.Model
/// </summary>
/// <value>Determines if the organization&#39;s details can be modified.</value>
[DataMember(Name = "readOnly", EmitDefaultValue = true)]
public bool VarReadOnly { get; set; }
public bool ReadOnly { get; set; }
/// <summary>
/// Returns the string presentation of the object
......@@ -95,7 +95,7 @@ namespace Coscine.ApiClient.Core.Model
sb.Append(" DisplayName: ").Append(DisplayName).Append("\n");
sb.Append(" Email: ").Append(Email).Append("\n");
sb.Append(" PublicationAdvisoryService: ").Append(PublicationAdvisoryService).Append("\n");
sb.Append(" VarReadOnly: ").Append(VarReadOnly).Append("\n");
sb.Append(" ReadOnly: ").Append(ReadOnly).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
......@@ -109,90 +109,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 UserOrganizationDto);
}
/// <summary>
/// Returns true if UserOrganizationDto instances are equal
/// </summary>
/// <param name="input">Instance of UserOrganizationDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(UserOrganizationDto input)
{
if (input == null)
{
return false;
}
return
(
this.Uri == input.Uri ||
(this.Uri != null &&
this.Uri.Equals(input.Uri))
) &&
(
this.DisplayName == input.DisplayName ||
(this.DisplayName != null &&
this.DisplayName.Equals(input.DisplayName))
) &&
(
this.Email == input.Email ||
(this.Email != null &&
this.Email.Equals(input.Email))
) &&
(
this.PublicationAdvisoryService == input.PublicationAdvisoryService ||
(this.PublicationAdvisoryService != null &&
this.PublicationAdvisoryService.Equals(input.PublicationAdvisoryService))
) &&
(
this.VarReadOnly == input.VarReadOnly ||
this.VarReadOnly.Equals(input.VarReadOnly)
);
}
/// <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.Uri != null)
{
hashCode = (hashCode * 59) + this.Uri.GetHashCode();
}
if (this.DisplayName != null)
{
hashCode = (hashCode * 59) + this.DisplayName.GetHashCode();
}
if (this.Email != null)
{
hashCode = (hashCode * 59) + this.Email.GetHashCode();
}
if (this.PublicationAdvisoryService != null)
{
hashCode = (hashCode * 59) + this.PublicationAdvisoryService.GetHashCode();
}
hashCode = (hashCode * 59) + this.VarReadOnly.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the data transfer object (DTO) for accepting the terms of service by a user.
/// </summary>
[DataContract(Name = "UserTermsOfServiceAcceptDto")]
public partial class UserTermsOfServiceAcceptDto : IEquatable<UserTermsOfServiceAcceptDto>, IValidatableObject
public partial class UserTermsOfServiceAcceptDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="UserTermsOfServiceAcceptDto" /> class.
......@@ -80,63 +80,17 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 UserTermsOfServiceAcceptDto);
}
/// <summary>
/// Returns true if UserTermsOfServiceAcceptDto instances are equal
/// </summary>
/// <param name="input">Instance of UserTermsOfServiceAcceptDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(UserTermsOfServiceAcceptDto input)
{
if (input == null)
{
return false;
}
return
(
this.VarVersion == input.VarVersion ||
(this.VarVersion != null &&
this.VarVersion.Equals(input.VarVersion))
);
}
/// <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.VarVersion != null)
{
hashCode = (hashCode * 59) + this.VarVersion.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
// VarVersion (string) minLength
if (this.VarVersion != null && this.VarVersion.Length < 1)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarVersion, length must be greater than 1.", new [] { "VarVersion" });
yield return new ValidationResult("Invalid value for VarVersion, length must be greater than 1.", new [] { "VarVersion" });
}
yield break;
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the variants of this specific metadata tree.
/// </summary>
[DataContract(Name = "VariantDto")]
public partial class VariantDto : IEquatable<VariantDto>, IValidatableObject
public partial class VariantDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="VariantDto" /> class.
......@@ -80,63 +80,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 VariantDto);
}
/// <summary>
/// Returns true if VariantDto instances are equal
/// </summary>
/// <param name="input">Instance of VariantDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(VariantDto input)
{
if (input == null)
{
return false;
}
return
(
this.GraphName == input.GraphName ||
(this.GraphName != null &&
this.GraphName.Equals(input.GraphName))
) &&
(
this.Similarity == input.Similarity ||
this.Similarity.Equals(input.Similarity)
);
}
/// <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.GraphName != null)
{
hashCode = (hashCode * 59) + this.GraphName.GetHashCode();
}
hashCode = (hashCode * 59) + this.Similarity.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents a Data Transfer Object (DTO) for visibility settings.
/// </summary>
[DataContract(Name = "VisibilityDto")]
public partial class VisibilityDto : IEquatable<VisibilityDto>, IValidatableObject
public partial class VisibilityDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="VisibilityDto" /> class.
......@@ -80,67 +80,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 VisibilityDto);
}
/// <summary>
/// Returns true if VisibilityDto instances are equal
/// </summary>
/// <param name="input">Instance of VisibilityDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(VisibilityDto input)
{
if (input == null)
{
return false;
}
return
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
) &&
(
this.DisplayName == input.DisplayName ||
(this.DisplayName != null &&
this.DisplayName.Equals(input.DisplayName))
);
}
/// <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.DisplayName != null)
{
hashCode = (hashCode * 59) + this.DisplayName.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// VisibilityDtoPagedResponse
/// </summary>
[DataContract(Name = "VisibilityDtoPagedResponse")]
public partial class VisibilityDtoPagedResponse : IEquatable<VisibilityDtoPagedResponse>, IValidatableObject
public partial class VisibilityDtoPagedResponse : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="VisibilityDtoPagedResponse" /> class.
......@@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 VisibilityDtoPagedResponse);
}
/// <summary>
/// Returns true if VisibilityDtoPagedResponse instances are equal
/// </summary>
/// <param name="input">Instance of VisibilityDtoPagedResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(VisibilityDtoPagedResponse input)
{
if (input == null)
{
return false;
}
return
(
this.Data == input.Data ||
this.Data != null &&
input.Data != null &&
this.Data.SequenceEqual(input.Data)
) &&
(
this.IsSuccess == input.IsSuccess ||
this.IsSuccess.Equals(input.IsSuccess)
) &&
(
this.StatusCode == input.StatusCode ||
(this.StatusCode != null &&
this.StatusCode.Equals(input.StatusCode))
) &&
(
this.TraceId == input.TraceId ||
(this.TraceId != null &&
this.TraceId.Equals(input.TraceId))
) &&
(
this.Pagination == input.Pagination ||
(this.Pagination != null &&
this.Pagination.Equals(input.Pagination))
);
}
/// <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.Data != null)
{
hashCode = (hashCode * 59) + this.Data.GetHashCode();
}
hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode();
if (this.StatusCode != null)
{
hashCode = (hashCode * 59) + this.StatusCode.GetHashCode();
}
if (this.TraceId != null)
{
hashCode = (hashCode * 59) + this.TraceId.GetHashCode();
}
if (this.Pagination != null)
{
hashCode = (hashCode * 59) + this.Pagination.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// VisibilityDtoResponse
/// </summary>
[DataContract(Name = "VisibilityDtoResponse")]
public partial class VisibilityDtoResponse : IEquatable<VisibilityDtoResponse>, IValidatableObject
public partial class VisibilityDtoResponse : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="VisibilityDtoResponse" /> class.
......@@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 VisibilityDtoResponse);
}
/// <summary>
/// Returns true if VisibilityDtoResponse instances are equal
/// </summary>
/// <param name="input">Instance of VisibilityDtoResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(VisibilityDtoResponse input)
{
if (input == null)
{
return false;
}
return
(
this.Data == input.Data ||
(this.Data != null &&
this.Data.Equals(input.Data))
) &&
(
this.IsSuccess == input.IsSuccess ||
this.IsSuccess.Equals(input.IsSuccess)
) &&
(
this.StatusCode == input.StatusCode ||
(this.StatusCode != null &&
this.StatusCode.Equals(input.StatusCode))
) &&
(
this.TraceId == input.TraceId ||
(this.TraceId != null &&
this.TraceId.Equals(input.TraceId))
);
}
/// <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.Data != null)
{
hashCode = (hashCode * 59) + this.Data.GetHashCode();
}
hashCode = (hashCode * 59) + this.IsSuccess.GetHashCode();
if (this.StatusCode != null)
{
hashCode = (hashCode * 59) + this.StatusCode.GetHashCode();
}
if (this.TraceId != null)
{
hashCode = (hashCode * 59) + this.TraceId.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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the data transfer object (DTO) for manipulating the visibility of a project.
/// </summary>
[DataContract(Name = "VisibilityForProjectManipulationDto")]
public partial class VisibilityForProjectManipulationDto : IEquatable<VisibilityForProjectManipulationDto>, IValidatableObject
public partial class VisibilityForProjectManipulationDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="VisibilityForProjectManipulationDto" /> class.
......@@ -75,58 +75,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 VisibilityForProjectManipulationDto);
}
/// <summary>
/// Returns true if VisibilityForProjectManipulationDto instances are equal
/// </summary>
/// <param name="input">Instance of VisibilityForProjectManipulationDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(VisibilityForProjectManipulationDto input)
{
if (input == null)
{
return false;
}
return
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
);
}
/// <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();
}
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)
IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
......