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 40 additions and 1652 deletions
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents a data transfer object (DTO) for a project role.
/// </summary>
[DataContract(Name = "ProjectRoleDto")]
public partial class ProjectRoleDto : IEquatable<ProjectRoleDto>, IValidatableObject
public partial class ProjectRoleDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ProjectRoleDto" /> class.
......@@ -97,85 +97,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 ProjectRoleDto);
}
/// <summary>
/// Returns true if ProjectRoleDto instances are equal
/// </summary>
/// <param name="input">Instance of ProjectRoleDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ProjectRoleDto input)
{
if (input == null)
{
return false;
}
return
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
) &&
(
this.Project == input.Project ||
(this.Project != null &&
this.Project.Equals(input.Project))
) &&
(
this.Role == input.Role ||
(this.Role != null &&
this.Role.Equals(input.Role))
) &&
(
this.User == input.User ||
(this.User != null &&
this.User.Equals(input.User))
);
}
/// <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.Project != null)
{
hashCode = (hashCode * 59) + this.Project.GetHashCode();
}
if (this.Role != null)
{
hashCode = (hashCode * 59) + this.Role.GetHashCode();
}
if (this.User != null)
{
hashCode = (hashCode * 59) + this.User.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
/// ProjectRoleDtoPagedResponse
/// </summary>
[DataContract(Name = "ProjectRoleDtoPagedResponse")]
public partial class ProjectRoleDtoPagedResponse : IEquatable<ProjectRoleDtoPagedResponse>, IValidatableObject
public partial class ProjectRoleDtoPagedResponse : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ProjectRoleDtoPagedResponse" /> 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 ProjectRoleDtoPagedResponse);
}
/// <summary>
/// Returns true if ProjectRoleDtoPagedResponse instances are equal
/// </summary>
/// <param name="input">Instance of ProjectRoleDtoPagedResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ProjectRoleDtoPagedResponse 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
/// ProjectRoleDtoResponse
/// </summary>
[DataContract(Name = "ProjectRoleDtoResponse")]
public partial class ProjectRoleDtoResponse : IEquatable<ProjectRoleDtoResponse>, IValidatableObject
public partial class ProjectRoleDtoResponse : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ProjectRoleDtoResponse" /> 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 ProjectRoleDtoResponse);
}
/// <summary>
/// Returns true if ProjectRoleDtoResponse instances are equal
/// </summary>
/// <param name="input">Instance of ProjectRoleDtoResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ProjectRoleDtoResponse 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
/// Data transfer object (DTO) representing the creation of a project role within a project. Inherits from the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ProjectRoleForProjectManipulationDto.
/// </summary>
[DataContract(Name = "ProjectRoleForProjectCreationDto")]
public partial class ProjectRoleForProjectCreationDto : IEquatable<ProjectRoleForProjectCreationDto>, IValidatableObject
public partial class ProjectRoleForProjectCreationDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ProjectRoleForProjectCreationDto" /> class.
......@@ -85,67 +85,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 ProjectRoleForProjectCreationDto);
}
/// <summary>
/// Returns true if ProjectRoleForProjectCreationDto instances are equal
/// </summary>
/// <param name="input">Instance of ProjectRoleForProjectCreationDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ProjectRoleForProjectCreationDto input)
{
if (input == null)
{
return false;
}
return
(
this.RoleId == input.RoleId ||
(this.RoleId != null &&
this.RoleId.Equals(input.RoleId))
) &&
(
this.UserId == input.UserId ||
(this.UserId != null &&
this.UserId.Equals(input.UserId))
);
}
/// <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.RoleId != null)
{
hashCode = (hashCode * 59) + this.RoleId.GetHashCode();
}
if (this.UserId != null)
{
hashCode = (hashCode * 59) + this.UserId.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
/// Data transfer object (DTO) representing a project role for manipulation within a project.
/// </summary>
[DataContract(Name = "ProjectRoleForProjectManipulationDto")]
public partial class ProjectRoleForProjectManipulationDto : IEquatable<ProjectRoleForProjectManipulationDto>, IValidatableObject
public partial class ProjectRoleForProjectManipulationDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ProjectRoleForProjectManipulationDto" /> 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 ProjectRoleForProjectManipulationDto);
}
/// <summary>
/// Returns true if ProjectRoleForProjectManipulationDto instances are equal
/// </summary>
/// <param name="input">Instance of ProjectRoleForProjectManipulationDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ProjectRoleForProjectManipulationDto input)
{
if (input == null)
{
return false;
}
return
(
this.RoleId == input.RoleId ||
(this.RoleId != null &&
this.RoleId.Equals(input.RoleId))
);
}
/// <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.RoleId != null)
{
hashCode = (hashCode * 59) + this.RoleId.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 a project role.
/// </summary>
[DataContract(Name = "ProjectRoleMinimalDto")]
public partial class ProjectRoleMinimalDto : IEquatable<ProjectRoleMinimalDto>, IValidatableObject
public partial class ProjectRoleMinimalDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ProjectRoleMinimalDto" /> class.
......@@ -90,76 +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 ProjectRoleMinimalDto);
}
/// <summary>
/// Returns true if ProjectRoleMinimalDto instances are equal
/// </summary>
/// <param name="input">Instance of ProjectRoleMinimalDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ProjectRoleMinimalDto input)
{
if (input == null)
{
return false;
}
return
(
this.ProjectId == input.ProjectId ||
(this.ProjectId != null &&
this.ProjectId.Equals(input.ProjectId))
) &&
(
this.UserId == input.UserId ||
(this.UserId != null &&
this.UserId.Equals(input.UserId))
) &&
(
this.RoleId == input.RoleId ||
(this.RoleId != null &&
this.RoleId.Equals(input.RoleId))
);
}
/// <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.ProjectId != null)
{
hashCode = (hashCode * 59) + this.ProjectId.GetHashCode();
}
if (this.UserId != null)
{
hashCode = (hashCode * 59) + this.UserId.GetHashCode();
}
if (this.RoleId != null)
{
hashCode = (hashCode * 59) + this.RoleId.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 provenance information.
/// </summary>
[DataContract(Name = "ProvenanceDto")]
public partial class ProvenanceDto : IEquatable<ProvenanceDto>, IValidatableObject
public partial class ProvenanceDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ProvenanceDto" /> class.
......@@ -129,114 +129,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 ProvenanceDto);
}
/// <summary>
/// Returns true if ProvenanceDto instances are equal
/// </summary>
/// <param name="input">Instance of ProvenanceDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ProvenanceDto input)
{
if (input == null)
{
return false;
}
return
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
) &&
(
this.GeneratedAt == input.GeneratedAt ||
(this.GeneratedAt != null &&
this.GeneratedAt.Equals(input.GeneratedAt))
) &&
(
this.WasRevisionOf == input.WasRevisionOf ||
this.WasRevisionOf != null &&
input.WasRevisionOf != null &&
this.WasRevisionOf.SequenceEqual(input.WasRevisionOf)
) &&
(
this.Variants == input.Variants ||
this.Variants != null &&
input.Variants != null &&
this.Variants.SequenceEqual(input.Variants)
) &&
(
this.SimilarityToLastVersion == input.SimilarityToLastVersion ||
(this.SimilarityToLastVersion != null &&
this.SimilarityToLastVersion.Equals(input.SimilarityToLastVersion))
) &&
(
this.WasInvalidatedBy == input.WasInvalidatedBy ||
(this.WasInvalidatedBy != null &&
this.WasInvalidatedBy.Equals(input.WasInvalidatedBy))
) &&
(
this.HashParameters == input.HashParameters ||
(this.HashParameters != null &&
this.HashParameters.Equals(input.HashParameters))
);
}
/// <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.GeneratedAt != null)
{
hashCode = (hashCode * 59) + this.GeneratedAt.GetHashCode();
}
if (this.WasRevisionOf != null)
{
hashCode = (hashCode * 59) + this.WasRevisionOf.GetHashCode();
}
if (this.Variants != null)
{
hashCode = (hashCode * 59) + this.Variants.GetHashCode();
}
if (this.SimilarityToLastVersion != null)
{
hashCode = (hashCode * 59) + this.SimilarityToLastVersion.GetHashCode();
}
if (this.WasInvalidatedBy != null)
{
hashCode = (hashCode * 59) + this.WasInvalidatedBy.GetHashCode();
}
if (this.HashParameters != null)
{
hashCode = (hashCode * 59) + this.HashParameters.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
/// ProvenanceDtoResponse
/// </summary>
[DataContract(Name = "ProvenanceDtoResponse")]
public partial class ProvenanceDtoResponse : IEquatable<ProvenanceDtoResponse>, IValidatableObject
public partial class ProvenanceDtoResponse : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ProvenanceDtoResponse" /> 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 ProvenanceDtoResponse);
}
/// <summary>
/// Returns true if ProvenanceDtoResponse instances are equal
/// </summary>
/// <param name="input">Instance of ProvenanceDtoResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ProvenanceDtoResponse 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
/// Data transfer object (DTO) representing the update of provenance Inherits from the base class Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ProvenanceParametersDto.
/// </summary>
[DataContract(Name = "ProvenanceForUpdateDto")]
public partial class ProvenanceForUpdateDto : IEquatable<ProvenanceForUpdateDto>, IValidatableObject
public partial class ProvenanceForUpdateDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ProvenanceForUpdateDto" /> class.
......@@ -129,114 +129,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 ProvenanceForUpdateDto);
}
/// <summary>
/// Returns true if ProvenanceForUpdateDto instances are equal
/// </summary>
/// <param name="input">Instance of ProvenanceForUpdateDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ProvenanceForUpdateDto input)
{
if (input == null)
{
return false;
}
return
(
this.WasRevisionOf == input.WasRevisionOf ||
this.WasRevisionOf != null &&
input.WasRevisionOf != null &&
this.WasRevisionOf.SequenceEqual(input.WasRevisionOf)
) &&
(
this.Variants == input.Variants ||
this.Variants != null &&
input.Variants != null &&
this.Variants.SequenceEqual(input.Variants)
) &&
(
this.WasInvalidatedBy == input.WasInvalidatedBy ||
(this.WasInvalidatedBy != null &&
this.WasInvalidatedBy.Equals(input.WasInvalidatedBy))
) &&
(
this.SimilarityToLastVersion == input.SimilarityToLastVersion ||
(this.SimilarityToLastVersion != null &&
this.SimilarityToLastVersion.Equals(input.SimilarityToLastVersion))
) &&
(
this.MetadataExtractorVersion == input.MetadataExtractorVersion ||
(this.MetadataExtractorVersion != null &&
this.MetadataExtractorVersion.Equals(input.MetadataExtractorVersion))
) &&
(
this.HashParameters == input.HashParameters ||
(this.HashParameters != null &&
this.HashParameters.Equals(input.HashParameters))
) &&
(
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.WasRevisionOf != null)
{
hashCode = (hashCode * 59) + this.WasRevisionOf.GetHashCode();
}
if (this.Variants != null)
{
hashCode = (hashCode * 59) + this.Variants.GetHashCode();
}
if (this.WasInvalidatedBy != null)
{
hashCode = (hashCode * 59) + this.WasInvalidatedBy.GetHashCode();
}
if (this.SimilarityToLastVersion != null)
{
hashCode = (hashCode * 59) + this.SimilarityToLastVersion.GetHashCode();
}
if (this.MetadataExtractorVersion != null)
{
hashCode = (hashCode * 59) + this.MetadataExtractorVersion.GetHashCode();
}
if (this.HashParameters != null)
{
hashCode = (hashCode * 59) + this.HashParameters.GetHashCode();
}
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
/// Data transfer object (DTO) representing Provenance Parameters in a request.
/// </summary>
[DataContract(Name = "ProvenanceParametersDto")]
public partial class ProvenanceParametersDto : IEquatable<ProvenanceParametersDto>, IValidatableObject
public partial class ProvenanceParametersDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ProvenanceParametersDto" /> class.
......@@ -119,105 +119,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 ProvenanceParametersDto);
}
/// <summary>
/// Returns true if ProvenanceParametersDto instances are equal
/// </summary>
/// <param name="input">Instance of ProvenanceParametersDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ProvenanceParametersDto input)
{
if (input == null)
{
return false;
}
return
(
this.WasRevisionOf == input.WasRevisionOf ||
this.WasRevisionOf != null &&
input.WasRevisionOf != null &&
this.WasRevisionOf.SequenceEqual(input.WasRevisionOf)
) &&
(
this.Variants == input.Variants ||
this.Variants != null &&
input.Variants != null &&
this.Variants.SequenceEqual(input.Variants)
) &&
(
this.WasInvalidatedBy == input.WasInvalidatedBy ||
(this.WasInvalidatedBy != null &&
this.WasInvalidatedBy.Equals(input.WasInvalidatedBy))
) &&
(
this.SimilarityToLastVersion == input.SimilarityToLastVersion ||
(this.SimilarityToLastVersion != null &&
this.SimilarityToLastVersion.Equals(input.SimilarityToLastVersion))
) &&
(
this.MetadataExtractorVersion == input.MetadataExtractorVersion ||
(this.MetadataExtractorVersion != null &&
this.MetadataExtractorVersion.Equals(input.MetadataExtractorVersion))
) &&
(
this.HashParameters == input.HashParameters ||
(this.HashParameters != null &&
this.HashParameters.Equals(input.HashParameters))
);
}
/// <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.WasRevisionOf != null)
{
hashCode = (hashCode * 59) + this.WasRevisionOf.GetHashCode();
}
if (this.Variants != null)
{
hashCode = (hashCode * 59) + this.Variants.GetHashCode();
}
if (this.WasInvalidatedBy != null)
{
hashCode = (hashCode * 59) + this.WasInvalidatedBy.GetHashCode();
}
if (this.SimilarityToLastVersion != null)
{
hashCode = (hashCode * 59) + this.SimilarityToLastVersion.GetHashCode();
}
if (this.MetadataExtractorVersion != null)
{
hashCode = (hashCode * 59) + this.MetadataExtractorVersion.GetHashCode();
}
if (this.HashParameters != null)
{
hashCode = (hashCode * 59) + this.HashParameters.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 public user data transfer object (DTO).
/// </summary>
[DataContract(Name = "PublicUserDto")]
public partial class PublicUserDto : IEquatable<PublicUserDto>, IValidatableObject
public partial class PublicUserDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="PublicUserDto" /> class.
......@@ -119,103 +119,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 PublicUserDto);
}
/// <summary>
/// Returns true if PublicUserDto instances are equal
/// </summary>
/// <param name="input">Instance of PublicUserDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(PublicUserDto 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.Email == input.Email ||
(this.Email != null &&
this.Email.Equals(input.Email))
) &&
(
this.Title == input.Title ||
(this.Title != null &&
this.Title.Equals(input.Title))
);
}
/// <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.Email != null)
{
hashCode = (hashCode * 59) + this.Email.GetHashCode();
}
if (this.Title != null)
{
hashCode = (hashCode * 59) + this.Title.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
/// PublicUserDtoIEnumerableResponse
/// </summary>
[DataContract(Name = "PublicUserDtoIEnumerableResponse")]
public partial class PublicUserDtoIEnumerableResponse : IEquatable<PublicUserDtoIEnumerableResponse>, IValidatableObject
public partial class PublicUserDtoIEnumerableResponse : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="PublicUserDtoIEnumerableResponse" /> 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 PublicUserDtoIEnumerableResponse);
}
/// <summary>
/// Returns true if PublicUserDtoIEnumerableResponse instances are equal
/// </summary>
/// <param name="input">Instance of PublicUserDtoIEnumerableResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(PublicUserDtoIEnumerableResponse 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
/// Data transfer object (DTO) representing the publication advisory service of an organization.
/// </summary>
[DataContract(Name = "PublicationAdvisoryServiceDto")]
public partial class PublicationAdvisoryServiceDto : IEquatable<PublicationAdvisoryServiceDto>, IValidatableObject
public partial class PublicationAdvisoryServiceDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="PublicationAdvisoryServiceDto" /> class.
......@@ -95,78 +95,23 @@ 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 PublicationAdvisoryServiceDto);
}
/// <summary>
/// Returns true if PublicationAdvisoryServiceDto instances are equal
/// </summary>
/// <param name="input">Instance of PublicationAdvisoryServiceDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(PublicationAdvisoryServiceDto input)
{
if (input == null)
{
return false;
}
return
(
this.DisplayName == input.DisplayName ||
(this.DisplayName != null &&
this.DisplayName.Equals(input.DisplayName))
) &&
(
this.Email == input.Email ||
(this.Email != null &&
this.Email.Equals(input.Email))
);
}
/// <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.DisplayName != null)
{
hashCode = (hashCode * 59) + this.DisplayName.GetHashCode();
}
if (this.Email != null)
{
hashCode = (hashCode * 59) + this.Email.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)
{
// DisplayName (string) minLength
if (this.DisplayName != null && this.DisplayName.Length < 1)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DisplayName, length must be greater than 1.", new [] { "DisplayName" });
yield return new ValidationResult("Invalid value for DisplayName, length must be greater than 1.", new [] { "DisplayName" });
}
// 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;
......
/*
* Coscine Web API
*
* Coscine (short for <b>CO</b>llaborative <b>SC</b>ientific <b>IN</b>tegration <b>E</b>nvironment) is the research data management platform for your research project.
*
* The version of the OpenAPI document: 2.0
* Contact: servicedesk@itc.rwth-aachen.de
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Coscine.ApiClient.Core.Client.OpenAPIDateConverter;
namespace Coscine.ApiClient.Core.Model
{
/// <summary>
/// Data transfer object (DTO) representing the creation of a publication request.
/// </summary>
[DataContract(Name = "PublicationRequestForCreationDto")]
public partial class PublicationRequestForCreationDto : IEquatable<PublicationRequestForCreationDto>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="PublicationRequestForCreationDto" /> class.
/// </summary>
[JsonConstructorAttribute]
protected PublicationRequestForCreationDto() { }
/// <summary>
/// Initializes a new instance of the <see cref="PublicationRequestForCreationDto" /> class.
/// </summary>
/// <param name="dataPublicationServiceRorId">The data publication service&#39;s ror id. (required).</param>
/// <param name="resourceIds">The resource guids. (required).</param>
/// <param name="message">A message of the requester..</param>
public PublicationRequestForCreationDto(string dataPublicationServiceRorId = default(string), List<Guid> resourceIds = default(List<Guid>), string message = default(string))
{
// to ensure "dataPublicationServiceRorId" is required (not null)
if (dataPublicationServiceRorId == null)
{
throw new ArgumentNullException("dataPublicationServiceRorId is a required property for PublicationRequestForCreationDto and cannot be null");
}
this.DataPublicationServiceRorId = dataPublicationServiceRorId;
// to ensure "resourceIds" is required (not null)
if (resourceIds == null)
{
throw new ArgumentNullException("resourceIds is a required property for PublicationRequestForCreationDto and cannot be null");
}
this.ResourceIds = resourceIds;
this.Message = message;
}
/// <summary>
/// The data publication service&#39;s ror id.
/// </summary>
/// <value>The data publication service&#39;s ror id.</value>
[DataMember(Name = "dataPublicationServiceRorId", IsRequired = true, EmitDefaultValue = true)]
public string DataPublicationServiceRorId { get; set; }
/// <summary>
/// The resource guids.
/// </summary>
/// <value>The resource guids.</value>
[DataMember(Name = "resourceIds", IsRequired = true, EmitDefaultValue = true)]
public List<Guid> ResourceIds { get; set; }
/// <summary>
/// A message of the requester.
/// </summary>
/// <value>A message of the requester.</value>
[DataMember(Name = "message", EmitDefaultValue = true)]
public string Message { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class PublicationRequestForCreationDto {\n");
sb.Append(" DataPublicationServiceRorId: ").Append(DataPublicationServiceRorId).Append("\n");
sb.Append(" ResourceIds: ").Append(ResourceIds).Append("\n");
sb.Append(" Message: ").Append(Message).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 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 PublicationRequestForCreationDto);
}
/// <summary>
/// Returns true if PublicationRequestForCreationDto instances are equal
/// </summary>
/// <param name="input">Instance of PublicationRequestForCreationDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(PublicationRequestForCreationDto input)
{
if (input == null)
{
return false;
}
return
(
this.DataPublicationServiceRorId == input.DataPublicationServiceRorId ||
(this.DataPublicationServiceRorId != null &&
this.DataPublicationServiceRorId.Equals(input.DataPublicationServiceRorId))
) &&
(
this.ResourceIds == input.ResourceIds ||
this.ResourceIds != null &&
input.ResourceIds != null &&
this.ResourceIds.SequenceEqual(input.ResourceIds)
) &&
(
this.Message == input.Message ||
(this.Message != null &&
this.Message.Equals(input.Message))
);
}
/// <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.DataPublicationServiceRorId != null)
{
hashCode = (hashCode * 59) + this.DataPublicationServiceRorId.GetHashCode();
}
if (this.ResourceIds != null)
{
hashCode = (hashCode * 59) + this.ResourceIds.GetHashCode();
}
if (this.Message != null)
{
hashCode = (hashCode * 59) + this.Message.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)
{
// DataPublicationServiceRorId (string) minLength
if (this.DataPublicationServiceRorId != null && this.DataPublicationServiceRorId.Length < 1)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DataPublicationServiceRorId, length must be greater than 1.", new [] { "DataPublicationServiceRorId" });
}
yield break;
}
}
}
/*
* Coscine Web API
*
* Coscine (short for <b>CO</b>llaborative <b>SC</b>ientific <b>IN</b>tegration <b>E</b>nvironment) is the research data management platform for your research project.
*
* The version of the OpenAPI document: 2.0
* Contact: servicedesk@itc.rwth-aachen.de
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Coscine.ApiClient.Core.Client.OpenAPIDateConverter;
namespace Coscine.ApiClient.Core.Model
{
/// <summary>
/// PublicationRequestForCreationDtoResponse
/// </summary>
[DataContract(Name = "PublicationRequestForCreationDtoResponse")]
public partial class PublicationRequestForCreationDtoResponse : IEquatable<PublicationRequestForCreationDtoResponse>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="PublicationRequestForCreationDtoResponse" /> class.
/// </summary>
/// <param name="data">data.</param>
/// <param name="statusCode">statusCode.</param>
/// <param name="traceId">traceId.</param>
public PublicationRequestForCreationDtoResponse(PublicationRequestForCreationDto data = default(PublicationRequestForCreationDto), int? statusCode = default(int?), string traceId = default(string))
{
this.Data = data;
this.StatusCode = statusCode;
this.TraceId = traceId;
}
/// <summary>
/// Gets or Sets Data
/// </summary>
[DataMember(Name = "data", EmitDefaultValue = false)]
public PublicationRequestForCreationDto Data { get; set; }
/// <summary>
/// Gets or Sets IsSuccess
/// </summary>
[DataMember(Name = "isSuccess", EmitDefaultValue = true)]
public bool IsSuccess { get; private set; }
/// <summary>
/// Returns false as IsSuccess should not be serialized given that it's read-only.
/// </summary>
/// <returns>false (boolean)</returns>
public bool ShouldSerializeIsSuccess()
{
return false;
}
/// <summary>
/// Gets or Sets StatusCode
/// </summary>
[DataMember(Name = "statusCode", EmitDefaultValue = true)]
public int? StatusCode { get; set; }
/// <summary>
/// Gets or Sets TraceId
/// </summary>
[DataMember(Name = "traceId", EmitDefaultValue = true)]
public string TraceId { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class PublicationRequestForCreationDtoResponse {\n");
sb.Append(" Data: ").Append(Data).Append("\n");
sb.Append(" IsSuccess: ").Append(IsSuccess).Append("\n");
sb.Append(" StatusCode: ").Append(StatusCode).Append("\n");
sb.Append(" TraceId: ").Append(TraceId).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 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 PublicationRequestForCreationDtoResponse);
}
/// <summary>
/// Returns true if PublicationRequestForCreationDtoResponse instances are equal
/// </summary>
/// <param name="input">Instance of PublicationRequestForCreationDtoResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(PublicationRequestForCreationDtoResponse 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)
{
yield break;
}
}
}
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents a Data Transfer Object (DTO) for quota values.
/// </summary>
[DataContract(Name = "QuotaDto")]
public partial class QuotaDto : IEquatable<QuotaDto>, IValidatableObject
public partial class QuotaDto : IValidatableObject
{
/// <summary>
......@@ -84,59 +84,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 QuotaDto);
}
/// <summary>
/// Returns true if QuotaDto instances are equal
/// </summary>
/// <param name="input">Instance of QuotaDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(QuotaDto input)
{
if (input == null)
{
return false;
}
return
(
this.Value == input.Value ||
this.Value.Equals(input.Value)
) &&
(
this.Unit == input.Unit ||
this.Unit.Equals(input.Unit)
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
hashCode = (hashCode * 59) + this.Value.GetHashCode();
hashCode = (hashCode * 59) + this.Unit.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) used for manipulating quota values.
/// </summary>
[DataContract(Name = "QuotaForManipulationDto")]
public partial class QuotaForManipulationDto : IEquatable<QuotaForManipulationDto>, IValidatableObject
public partial class QuotaForManipulationDto : IValidatableObject
{
/// <summary>
......@@ -84,64 +84,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 QuotaForManipulationDto);
}
/// <summary>
/// Returns true if QuotaForManipulationDto instances are equal
/// </summary>
/// <param name="input">Instance of QuotaForManipulationDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(QuotaForManipulationDto input)
{
if (input == null)
{
return false;
}
return
(
this.Value == input.Value ||
this.Value.Equals(input.Value)
) &&
(
this.Unit == input.Unit ||
this.Unit.Equals(input.Unit)
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
hashCode = (hashCode * 59) + this.Value.GetHashCode();
hashCode = (hashCode * 59) + this.Unit.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)
{
// Value (long) minimum
if (this.Value < (long)0)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Value, must be a value greater than or equal to 0.", new [] { "Value" });
yield return new ValidationResult("Invalid value for Value, must be a value greater than or equal to 0.", new [] { "Value" });
}
yield break;
......
......@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents a Data Transfer Object (DTO) for RDF (Resource Description Framework) definition details.
/// </summary>
[DataContract(Name = "RdfDefinitionDto")]
public partial class RdfDefinitionDto : IEquatable<RdfDefinitionDto>, IValidatableObject
public partial class RdfDefinitionDto : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RdfDefinitionDto" /> 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 RdfDefinitionDto);
}
/// <summary>
/// Returns true if RdfDefinitionDto instances are equal
/// </summary>
/// <param name="input">Instance of RdfDefinitionDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RdfDefinitionDto input)
{
if (input == null)
{
return false;
}
return
(
this.Content == input.Content ||
(this.Content != null &&
this.Content.Equals(input.Content))
) &&
(
this.Type == input.Type ||
(this.Type != null &&
this.Type.Equals(input.Type))
);
}
/// <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.Content != null)
{
hashCode = (hashCode * 59) + this.Content.GetHashCode();
}
if (this.Type != null)
{
hashCode = (hashCode * 59) + this.Type.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
/// RdfDefinitionDtoResponse
/// </summary>
[DataContract(Name = "RdfDefinitionDtoResponse")]
public partial class RdfDefinitionDtoResponse : IEquatable<RdfDefinitionDtoResponse>, IValidatableObject
public partial class RdfDefinitionDtoResponse : IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="RdfDefinitionDtoResponse" /> 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 RdfDefinitionDtoResponse);
}
/// <summary>
/// Returns true if RdfDefinitionDtoResponse instances are equal
/// </summary>
/// <param name="input">Instance of RdfDefinitionDtoResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RdfDefinitionDtoResponse 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) used for manipulating RDF definitions.
/// </summary>
[DataContract(Name = "RdfDefinitionForManipulationDto")]
public partial class RdfDefinitionForManipulationDto : IEquatable<RdfDefinitionForManipulationDto>, IValidatableObject
public partial class RdfDefinitionForManipulationDto : IValidatableObject
{
/// <summary>
......@@ -89,68 +89,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 RdfDefinitionForManipulationDto);
}
/// <summary>
/// Returns true if RdfDefinitionForManipulationDto instances are equal
/// </summary>
/// <param name="input">Instance of RdfDefinitionForManipulationDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RdfDefinitionForManipulationDto input)
{
if (input == null)
{
return false;
}
return
(
this.Content == input.Content ||
(this.Content != null &&
this.Content.Equals(input.Content))
) &&
(
this.Type == input.Type ||
this.Type.Equals(input.Type)
);
}
/// <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.Content != null)
{
hashCode = (hashCode * 59) + this.Content.GetHashCode();
}
hashCode = (hashCode * 59) + this.Type.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)
{
// Content (string) minLength
if (this.Content != null && this.Content.Length < 1)
{
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Content, length must be greater than 1.", new [] { "Content" });
yield return new ValidationResult("Invalid value for Content, length must be greater than 1.", new [] { "Content" });
}
yield break;
......