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 57 additions and 1747 deletions
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents an RDF Patch document containing a series of operations. /// Represents an RDF Patch document containing a series of operations.
/// </summary> /// </summary>
[DataContract(Name = "RdfPatchDocumentDto")] [DataContract(Name = "RdfPatchDocumentDto")]
public partial class RdfPatchDocumentDto : IEquatable<RdfPatchDocumentDto>, IValidatableObject public partial class RdfPatchDocumentDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RdfPatchDocumentDto" /> class. /// Initializes a new instance of the <see cref="RdfPatchDocumentDto" /> class.
...@@ -70,59 +70,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -70,59 +70,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 RdfPatchDocumentDto);
}
/// <summary>
/// Returns true if RdfPatchDocumentDto instances are equal
/// </summary>
/// <param name="input">Instance of RdfPatchDocumentDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RdfPatchDocumentDto input)
{
if (input == null)
{
return false;
}
return
(
this.Operations == input.Operations ||
this.Operations != null &&
input.Operations != null &&
this.Operations.SequenceEqual(input.Operations)
);
}
/// <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.Operations != null)
{
hashCode = (hashCode * 59) + this.Operations.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents a single operation in an RDF Patch document. /// Represents a single operation in an RDF Patch document.
/// </summary> /// </summary>
[DataContract(Name = "RdfPatchOperationDto")] [DataContract(Name = "RdfPatchOperationDto")]
public partial class RdfPatchOperationDto : IEquatable<RdfPatchOperationDto>, IValidatableObject public partial class RdfPatchOperationDto : IValidatableObject
{ {
/// <summary> /// <summary>
...@@ -78,63 +78,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -78,63 +78,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 RdfPatchOperationDto);
}
/// <summary>
/// Returns true if RdfPatchOperationDto instances are equal
/// </summary>
/// <param name="input">Instance of RdfPatchOperationDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RdfPatchOperationDto input)
{
if (input == null)
{
return false;
}
return
(
this.OperationType == input.OperationType ||
this.OperationType.Equals(input.OperationType)
) &&
(
this.Changes == input.Changes ||
(this.Changes != null &&
this.Changes.Equals(input.Changes))
);
}
/// <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.OperationType.GetHashCode();
if (this.Changes != null)
{
hashCode = (hashCode * 59) + this.Changes.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the data transfer object (DTO) for RDS options. /// Represents the data transfer object (DTO) for RDS options.
/// </summary> /// </summary>
[DataContract(Name = "RdsOptionsDto")] [DataContract(Name = "RdsOptionsDto")]
public partial class RdsOptionsDto : IEquatable<RdsOptionsDto>, IValidatableObject public partial class RdsOptionsDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RdsOptionsDto" /> class. /// Initializes a new instance of the <see cref="RdsOptionsDto" /> class.
...@@ -79,67 +79,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -79,67 +79,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 RdsOptionsDto);
}
/// <summary>
/// Returns true if RdsOptionsDto instances are equal
/// </summary>
/// <param name="input">Instance of RdsOptionsDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RdsOptionsDto input)
{
if (input == null)
{
return false;
}
return
(
this.BucketName == input.BucketName ||
(this.BucketName != null &&
this.BucketName.Equals(input.BucketName))
) &&
(
this.Size == input.Size ||
(this.Size != null &&
this.Size.Equals(input.Size))
);
}
/// <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.BucketName != null)
{
hashCode = (hashCode * 59) + this.BucketName.GetHashCode();
}
if (this.Size != null)
{
hashCode = (hashCode * 59) + this.Size.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the data transfer object (DTO) for manipulating RDS Web resource type options. /// Represents the data transfer object (DTO) for manipulating RDS Web resource type options.
/// </summary> /// </summary>
[DataContract(Name = "RdsResourceTypeOptionsForManipulationDto")] [DataContract(Name = "RdsResourceTypeOptionsForManipulationDto")]
public partial class RdsResourceTypeOptionsForManipulationDto : IEquatable<RdsResourceTypeOptionsForManipulationDto>, IValidatableObject public partial class RdsResourceTypeOptionsForManipulationDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RdsResourceTypeOptionsForManipulationDto" /> class. /// Initializes a new instance of the <see cref="RdsResourceTypeOptionsForManipulationDto" /> class.
...@@ -69,58 +69,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -69,58 +69,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 RdsResourceTypeOptionsForManipulationDto);
}
/// <summary>
/// Returns true if RdsResourceTypeOptionsForManipulationDto instances are equal
/// </summary>
/// <param name="input">Instance of RdsResourceTypeOptionsForManipulationDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RdsResourceTypeOptionsForManipulationDto input)
{
if (input == null)
{
return false;
}
return
(
this.Quota == input.Quota ||
(this.Quota != null &&
this.Quota.Equals(input.Quota))
);
}
/// <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.Quota != null)
{
hashCode = (hashCode * 59) + this.Quota.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the data transfer object (DTO) for RDS S3 options. /// Represents the data transfer object (DTO) for RDS S3 options.
/// </summary> /// </summary>
[DataContract(Name = "RdsS3OptionsDto")] [DataContract(Name = "RdsS3OptionsDto")]
public partial class RdsS3OptionsDto : IEquatable<RdsS3OptionsDto>, IValidatableObject public partial class RdsS3OptionsDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RdsS3OptionsDto" /> class. /// Initializes a new instance of the <see cref="RdsS3OptionsDto" /> class.
...@@ -129,112 +129,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -129,112 +129,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 RdsS3OptionsDto);
}
/// <summary>
/// Returns true if RdsS3OptionsDto instances are equal
/// </summary>
/// <param name="input">Instance of RdsS3OptionsDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RdsS3OptionsDto input)
{
if (input == null)
{
return false;
}
return
(
this.BucketName == input.BucketName ||
(this.BucketName != null &&
this.BucketName.Equals(input.BucketName))
) &&
(
this.AccessKeyRead == input.AccessKeyRead ||
(this.AccessKeyRead != null &&
this.AccessKeyRead.Equals(input.AccessKeyRead))
) &&
(
this.SecretKeyRead == input.SecretKeyRead ||
(this.SecretKeyRead != null &&
this.SecretKeyRead.Equals(input.SecretKeyRead))
) &&
(
this.AccessKeyWrite == input.AccessKeyWrite ||
(this.AccessKeyWrite != null &&
this.AccessKeyWrite.Equals(input.AccessKeyWrite))
) &&
(
this.SecretKeyWrite == input.SecretKeyWrite ||
(this.SecretKeyWrite != null &&
this.SecretKeyWrite.Equals(input.SecretKeyWrite))
) &&
(
this.Endpoint == input.Endpoint ||
(this.Endpoint != null &&
this.Endpoint.Equals(input.Endpoint))
) &&
(
this.Size == input.Size ||
(this.Size != null &&
this.Size.Equals(input.Size))
);
}
/// <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.BucketName != null)
{
hashCode = (hashCode * 59) + this.BucketName.GetHashCode();
}
if (this.AccessKeyRead != null)
{
hashCode = (hashCode * 59) + this.AccessKeyRead.GetHashCode();
}
if (this.SecretKeyRead != null)
{
hashCode = (hashCode * 59) + this.SecretKeyRead.GetHashCode();
}
if (this.AccessKeyWrite != null)
{
hashCode = (hashCode * 59) + this.AccessKeyWrite.GetHashCode();
}
if (this.SecretKeyWrite != null)
{
hashCode = (hashCode * 59) + this.SecretKeyWrite.GetHashCode();
}
if (this.Endpoint != null)
{
hashCode = (hashCode * 59) + this.Endpoint.GetHashCode();
}
if (this.Size != null)
{
hashCode = (hashCode * 59) + this.Size.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the data transfer object (DTO) for manipulating RDS S3 resource type options. /// Represents the data transfer object (DTO) for manipulating RDS S3 resource type options.
/// </summary> /// </summary>
[DataContract(Name = "RdsS3ResourceTypeOptionsForManipulationDto")] [DataContract(Name = "RdsS3ResourceTypeOptionsForManipulationDto")]
public partial class RdsS3ResourceTypeOptionsForManipulationDto : IEquatable<RdsS3ResourceTypeOptionsForManipulationDto>, IValidatableObject public partial class RdsS3ResourceTypeOptionsForManipulationDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RdsS3ResourceTypeOptionsForManipulationDto" /> class. /// Initializes a new instance of the <see cref="RdsS3ResourceTypeOptionsForManipulationDto" /> class.
...@@ -69,58 +69,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -69,58 +69,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 RdsS3ResourceTypeOptionsForManipulationDto);
}
/// <summary>
/// Returns true if RdsS3ResourceTypeOptionsForManipulationDto instances are equal
/// </summary>
/// <param name="input">Instance of RdsS3ResourceTypeOptionsForManipulationDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RdsS3ResourceTypeOptionsForManipulationDto input)
{
if (input == null)
{
return false;
}
return
(
this.Quota == input.Quota ||
(this.Quota != null &&
this.Quota.Equals(input.Quota))
);
}
/// <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.Quota != null)
{
hashCode = (hashCode * 59) + this.Quota.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the data transfer object (DTO) for RDS S3 WORM options. /// Represents the data transfer object (DTO) for RDS S3 WORM options.
/// </summary> /// </summary>
[DataContract(Name = "RdsS3WormOptionsDto")] [DataContract(Name = "RdsS3WormOptionsDto")]
public partial class RdsS3WormOptionsDto : IEquatable<RdsS3WormOptionsDto>, IValidatableObject public partial class RdsS3WormOptionsDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RdsS3WormOptionsDto" /> class. /// Initializes a new instance of the <see cref="RdsS3WormOptionsDto" /> class.
...@@ -129,112 +129,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -129,112 +129,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 RdsS3WormOptionsDto);
}
/// <summary>
/// Returns true if RdsS3WormOptionsDto instances are equal
/// </summary>
/// <param name="input">Instance of RdsS3WormOptionsDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RdsS3WormOptionsDto input)
{
if (input == null)
{
return false;
}
return
(
this.BucketName == input.BucketName ||
(this.BucketName != null &&
this.BucketName.Equals(input.BucketName))
) &&
(
this.AccessKeyRead == input.AccessKeyRead ||
(this.AccessKeyRead != null &&
this.AccessKeyRead.Equals(input.AccessKeyRead))
) &&
(
this.SecretKeyRead == input.SecretKeyRead ||
(this.SecretKeyRead != null &&
this.SecretKeyRead.Equals(input.SecretKeyRead))
) &&
(
this.AccessKeyWrite == input.AccessKeyWrite ||
(this.AccessKeyWrite != null &&
this.AccessKeyWrite.Equals(input.AccessKeyWrite))
) &&
(
this.SecretKeyWrite == input.SecretKeyWrite ||
(this.SecretKeyWrite != null &&
this.SecretKeyWrite.Equals(input.SecretKeyWrite))
) &&
(
this.Endpoint == input.Endpoint ||
(this.Endpoint != null &&
this.Endpoint.Equals(input.Endpoint))
) &&
(
this.Size == input.Size ||
(this.Size != null &&
this.Size.Equals(input.Size))
);
}
/// <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.BucketName != null)
{
hashCode = (hashCode * 59) + this.BucketName.GetHashCode();
}
if (this.AccessKeyRead != null)
{
hashCode = (hashCode * 59) + this.AccessKeyRead.GetHashCode();
}
if (this.SecretKeyRead != null)
{
hashCode = (hashCode * 59) + this.SecretKeyRead.GetHashCode();
}
if (this.AccessKeyWrite != null)
{
hashCode = (hashCode * 59) + this.AccessKeyWrite.GetHashCode();
}
if (this.SecretKeyWrite != null)
{
hashCode = (hashCode * 59) + this.SecretKeyWrite.GetHashCode();
}
if (this.Endpoint != null)
{
hashCode = (hashCode * 59) + this.Endpoint.GetHashCode();
}
if (this.Size != null)
{
hashCode = (hashCode * 59) + this.Size.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the data transfer object (DTO) for manipulating RDS S3 WORM resource type options. /// Represents the data transfer object (DTO) for manipulating RDS S3 WORM resource type options.
/// </summary> /// </summary>
[DataContract(Name = "RdsS3WormResourceTypeOptionsForManipulationDto")] [DataContract(Name = "RdsS3WormResourceTypeOptionsForManipulationDto")]
public partial class RdsS3WormResourceTypeOptionsForManipulationDto : IEquatable<RdsS3WormResourceTypeOptionsForManipulationDto>, IValidatableObject public partial class RdsS3WormResourceTypeOptionsForManipulationDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RdsS3WormResourceTypeOptionsForManipulationDto" /> class. /// Initializes a new instance of the <see cref="RdsS3WormResourceTypeOptionsForManipulationDto" /> class.
...@@ -69,58 +69,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -69,58 +69,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 RdsS3WormResourceTypeOptionsForManipulationDto);
}
/// <summary>
/// Returns true if RdsS3WormResourceTypeOptionsForManipulationDto instances are equal
/// </summary>
/// <param name="input">Instance of RdsS3WormResourceTypeOptionsForManipulationDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(RdsS3WormResourceTypeOptionsForManipulationDto input)
{
if (input == null)
{
return false;
}
return
(
this.Quota == input.Quota ||
(this.Quota != null &&
this.Quota.Equals(input.Quota))
);
}
/// <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.Quota != null)
{
hashCode = (hashCode * 59) + this.Quota.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents a Data Transfer Object (DTO) for administrative purposes with additional resource details. /// Represents a Data Transfer Object (DTO) for administrative purposes with additional resource details.
/// </summary> /// </summary>
[DataContract(Name = "ResourceAdminDto")] [DataContract(Name = "ResourceAdminDto")]
public partial class ResourceAdminDto : IEquatable<ResourceAdminDto>, IValidatableObject public partial class ResourceAdminDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ResourceAdminDto" /> class. /// Initializes a new instance of the <see cref="ResourceAdminDto" /> class.
...@@ -274,236 +274,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -274,236 +274,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 ResourceAdminDto);
}
/// <summary>
/// Returns true if ResourceAdminDto instances are equal
/// </summary>
/// <param name="input">Instance of ResourceAdminDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ResourceAdminDto input)
{
if (input == null)
{
return false;
}
return
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
) &&
(
this.Pid == input.Pid ||
(this.Pid != null &&
this.Pid.Equals(input.Pid))
) &&
(
this.Type == input.Type ||
(this.Type != null &&
this.Type.Equals(input.Type))
) &&
(
this.Name == input.Name ||
(this.Name != null &&
this.Name.Equals(input.Name))
) &&
(
this.DisplayName == input.DisplayName ||
(this.DisplayName != null &&
this.DisplayName.Equals(input.DisplayName))
) &&
(
this.Description == input.Description ||
(this.Description != null &&
this.Description.Equals(input.Description))
) &&
(
this.Keywords == input.Keywords ||
this.Keywords != null &&
input.Keywords != null &&
this.Keywords.SequenceEqual(input.Keywords)
) &&
(
this.License == input.License ||
(this.License != null &&
this.License.Equals(input.License))
) &&
(
this.UsageRights == input.UsageRights ||
(this.UsageRights != null &&
this.UsageRights.Equals(input.UsageRights))
) &&
(
this.MetadataLocalCopy == input.MetadataLocalCopy ||
this.MetadataLocalCopy.Equals(input.MetadataLocalCopy)
) &&
(
this.MetadataExtraction == input.MetadataExtraction ||
this.MetadataExtraction.Equals(input.MetadataExtraction)
) &&
(
this.ApplicationProfile == input.ApplicationProfile ||
(this.ApplicationProfile != null &&
this.ApplicationProfile.Equals(input.ApplicationProfile))
) &&
(
this.FixedValues == input.FixedValues ||
this.FixedValues != null &&
input.FixedValues != null &&
this.FixedValues.SequenceEqual(input.FixedValues)
) &&
(
this.Disciplines == input.Disciplines ||
this.Disciplines != null &&
input.Disciplines != null &&
this.Disciplines.SequenceEqual(input.Disciplines)
) &&
(
this.Visibility == input.Visibility ||
(this.Visibility != null &&
this.Visibility.Equals(input.Visibility))
) &&
(
this.DateCreated == input.DateCreated ||
(this.DateCreated != null &&
this.DateCreated.Equals(input.DateCreated))
) &&
(
this.Creator == input.Creator ||
(this.Creator != null &&
this.Creator.Equals(input.Creator))
) &&
(
this.Archived == input.Archived ||
this.Archived.Equals(input.Archived)
) &&
(
this.Projects == input.Projects ||
this.Projects != null &&
input.Projects != null &&
this.Projects.SequenceEqual(input.Projects)
) &&
(
this.Deleted == input.Deleted ||
this.Deleted.Equals(input.Deleted)
) &&
(
this.ProjectResources == input.ProjectResources ||
this.ProjectResources != null &&
input.ProjectResources != null &&
this.ProjectResources.SequenceEqual(input.ProjectResources)
) &&
(
this.ResourceQuota == input.ResourceQuota ||
(this.ResourceQuota != null &&
this.ResourceQuota.Equals(input.ResourceQuota))
);
}
/// <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.Pid != null)
{
hashCode = (hashCode * 59) + this.Pid.GetHashCode();
}
if (this.Type != null)
{
hashCode = (hashCode * 59) + this.Type.GetHashCode();
}
if (this.Name != null)
{
hashCode = (hashCode * 59) + this.Name.GetHashCode();
}
if (this.DisplayName != null)
{
hashCode = (hashCode * 59) + this.DisplayName.GetHashCode();
}
if (this.Description != null)
{
hashCode = (hashCode * 59) + this.Description.GetHashCode();
}
if (this.Keywords != null)
{
hashCode = (hashCode * 59) + this.Keywords.GetHashCode();
}
if (this.License != null)
{
hashCode = (hashCode * 59) + this.License.GetHashCode();
}
if (this.UsageRights != null)
{
hashCode = (hashCode * 59) + this.UsageRights.GetHashCode();
}
hashCode = (hashCode * 59) + this.MetadataLocalCopy.GetHashCode();
hashCode = (hashCode * 59) + this.MetadataExtraction.GetHashCode();
if (this.ApplicationProfile != null)
{
hashCode = (hashCode * 59) + this.ApplicationProfile.GetHashCode();
}
if (this.FixedValues != null)
{
hashCode = (hashCode * 59) + this.FixedValues.GetHashCode();
}
if (this.Disciplines != null)
{
hashCode = (hashCode * 59) + this.Disciplines.GetHashCode();
}
if (this.Visibility != null)
{
hashCode = (hashCode * 59) + this.Visibility.GetHashCode();
}
if (this.DateCreated != null)
{
hashCode = (hashCode * 59) + this.DateCreated.GetHashCode();
}
if (this.Creator != null)
{
hashCode = (hashCode * 59) + this.Creator.GetHashCode();
}
hashCode = (hashCode * 59) + this.Archived.GetHashCode();
if (this.Projects != null)
{
hashCode = (hashCode * 59) + this.Projects.GetHashCode();
}
hashCode = (hashCode * 59) + this.Deleted.GetHashCode();
if (this.ProjectResources != null)
{
hashCode = (hashCode * 59) + this.ProjectResources.GetHashCode();
}
if (this.ResourceQuota != null)
{
hashCode = (hashCode * 59) + this.ResourceQuota.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// ResourceAdminDtoPagedResponse /// ResourceAdminDtoPagedResponse
/// </summary> /// </summary>
[DataContract(Name = "ResourceAdminDtoPagedResponse")] [DataContract(Name = "ResourceAdminDtoPagedResponse")]
public partial class ResourceAdminDtoPagedResponse : IEquatable<ResourceAdminDtoPagedResponse>, IValidatableObject public partial class ResourceAdminDtoPagedResponse : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ResourceAdminDtoPagedResponse" /> class. /// Initializes a new instance of the <see cref="ResourceAdminDtoPagedResponse" /> class.
...@@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 ResourceAdminDtoPagedResponse);
}
/// <summary>
/// Returns true if ResourceAdminDtoPagedResponse instances are equal
/// </summary>
/// <param name="input">Instance of ResourceAdminDtoPagedResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ResourceAdminDtoPagedResponse 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> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents a set of columns to be displayed in the content view. /// Represents a set of columns to be displayed in the content view.
/// </summary> /// </summary>
[DataContract(Name = "ResourceContentPageColumnsDto")] [DataContract(Name = "ResourceContentPageColumnsDto")]
public partial class ResourceContentPageColumnsDto : IEquatable<ResourceContentPageColumnsDto>, IValidatableObject public partial class ResourceContentPageColumnsDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ResourceContentPageColumnsDto" /> class. /// Initializes a new instance of the <see cref="ResourceContentPageColumnsDto" /> class.
...@@ -70,59 +70,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -70,59 +70,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 ResourceContentPageColumnsDto);
}
/// <summary>
/// Returns true if ResourceContentPageColumnsDto instances are equal
/// </summary>
/// <param name="input">Instance of ResourceContentPageColumnsDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ResourceContentPageColumnsDto input)
{
if (input == null)
{
return false;
}
return
(
this.Always == input.Always ||
this.Always != null &&
input.Always != null &&
this.Always.SequenceEqual(input.Always)
);
}
/// <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.Always != null)
{
hashCode = (hashCode * 59) + this.Always.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,17 +30,17 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,17 +30,17 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the content page details for a resource. /// Represents the content page details for a resource.
/// </summary> /// </summary>
[DataContract(Name = "ResourceContentPageDto")] [DataContract(Name = "ResourceContentPageDto")]
public partial class ResourceContentPageDto : IEquatable<ResourceContentPageDto>, IValidatableObject public partial class ResourceContentPageDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ResourceContentPageDto" /> class. /// Initializes a new instance of the <see cref="ResourceContentPageDto" /> class.
/// </summary> /// </summary>
/// <param name="varReadOnly">Indicates whether the resource is read-only..</param> /// <param name="readOnly">Indicates whether the resource is read-only..</param>
/// <param name="metadataView">metadataView.</param> /// <param name="metadataView">metadataView.</param>
/// <param name="entriesView">entriesView.</param> /// <param name="entriesView">entriesView.</param>
public ResourceContentPageDto(bool varReadOnly = default(bool), ResourceContentPageMetadataViewDto metadataView = default(ResourceContentPageMetadataViewDto), ResourceContentPageEntriesViewDto entriesView = default(ResourceContentPageEntriesViewDto)) public ResourceContentPageDto(bool readOnly = default(bool), ResourceContentPageMetadataViewDto metadataView = default(ResourceContentPageMetadataViewDto), ResourceContentPageEntriesViewDto entriesView = default(ResourceContentPageEntriesViewDto))
{ {
this.VarReadOnly = varReadOnly; this.ReadOnly = readOnly;
this.MetadataView = metadataView; this.MetadataView = metadataView;
this.EntriesView = entriesView; this.EntriesView = entriesView;
} }
...@@ -50,7 +50,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -50,7 +50,7 @@ namespace Coscine.ApiClient.Core.Model
/// </summary> /// </summary>
/// <value>Indicates whether the resource is read-only.</value> /// <value>Indicates whether the resource is read-only.</value>
[DataMember(Name = "readOnly", EmitDefaultValue = true)] [DataMember(Name = "readOnly", EmitDefaultValue = true)]
public bool VarReadOnly { get; set; } public bool ReadOnly { get; set; }
/// <summary> /// <summary>
/// Gets or Sets MetadataView /// Gets or Sets MetadataView
...@@ -72,7 +72,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -72,7 +72,7 @@ namespace Coscine.ApiClient.Core.Model
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.Append("class ResourceContentPageDto {\n"); sb.Append("class ResourceContentPageDto {\n");
sb.Append(" VarReadOnly: ").Append(VarReadOnly).Append("\n"); sb.Append(" ReadOnly: ").Append(ReadOnly).Append("\n");
sb.Append(" MetadataView: ").Append(MetadataView).Append("\n"); sb.Append(" MetadataView: ").Append(MetadataView).Append("\n");
sb.Append(" EntriesView: ").Append(EntriesView).Append("\n"); sb.Append(" EntriesView: ").Append(EntriesView).Append("\n");
sb.Append("}\n"); sb.Append("}\n");
...@@ -88,72 +88,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -88,72 +88,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 ResourceContentPageDto);
}
/// <summary>
/// Returns true if ResourceContentPageDto instances are equal
/// </summary>
/// <param name="input">Instance of ResourceContentPageDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ResourceContentPageDto input)
{
if (input == null)
{
return false;
}
return
(
this.VarReadOnly == input.VarReadOnly ||
this.VarReadOnly.Equals(input.VarReadOnly)
) &&
(
this.MetadataView == input.MetadataView ||
(this.MetadataView != null &&
this.MetadataView.Equals(input.MetadataView))
) &&
(
this.EntriesView == input.EntriesView ||
(this.EntriesView != null &&
this.EntriesView.Equals(input.EntriesView))
);
}
/// <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.VarReadOnly.GetHashCode();
if (this.MetadataView != null)
{
hashCode = (hashCode * 59) + this.MetadataView.GetHashCode();
}
if (this.EntriesView != null)
{
hashCode = (hashCode * 59) + this.EntriesView.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents information about the resource type for the columns within the entries view Vue component. /// Represents information about the resource type for the columns within the entries view Vue component.
/// </summary> /// </summary>
[DataContract(Name = "ResourceContentPageEntriesViewDto")] [DataContract(Name = "ResourceContentPageEntriesViewDto")]
public partial class ResourceContentPageEntriesViewDto : IEquatable<ResourceContentPageEntriesViewDto>, IValidatableObject public partial class ResourceContentPageEntriesViewDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ResourceContentPageEntriesViewDto" /> class. /// Initializes a new instance of the <see cref="ResourceContentPageEntriesViewDto" /> class.
...@@ -69,58 +69,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -69,58 +69,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 ResourceContentPageEntriesViewDto);
}
/// <summary>
/// Returns true if ResourceContentPageEntriesViewDto instances are equal
/// </summary>
/// <param name="input">Instance of ResourceContentPageEntriesViewDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ResourceContentPageEntriesViewDto input)
{
if (input == null)
{
return false;
}
return
(
this.Columns == input.Columns ||
(this.Columns != null &&
this.Columns.Equals(input.Columns))
);
}
/// <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.Columns != null)
{
hashCode = (hashCode * 59) + this.Columns.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the metadata view for a resource&#39;s content page. /// Represents the metadata view for a resource&#39;s content page.
/// </summary> /// </summary>
[DataContract(Name = "ResourceContentPageMetadataViewDto")] [DataContract(Name = "ResourceContentPageMetadataViewDto")]
public partial class ResourceContentPageMetadataViewDto : IEquatable<ResourceContentPageMetadataViewDto>, IValidatableObject public partial class ResourceContentPageMetadataViewDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ResourceContentPageMetadataViewDto" /> class. /// Initializes a new instance of the <see cref="ResourceContentPageMetadataViewDto" /> class.
...@@ -80,59 +80,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -80,59 +80,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 ResourceContentPageMetadataViewDto);
}
/// <summary>
/// Returns true if ResourceContentPageMetadataViewDto instances are equal
/// </summary>
/// <param name="input">Instance of ResourceContentPageMetadataViewDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ResourceContentPageMetadataViewDto input)
{
if (input == null)
{
return false;
}
return
(
this.EditableDataUrl == input.EditableDataUrl ||
this.EditableDataUrl.Equals(input.EditableDataUrl)
) &&
(
this.EditableKey == input.EditableKey ||
this.EditableKey.Equals(input.EditableKey)
);
}
/// <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.EditableDataUrl.GetHashCode();
hashCode = (hashCode * 59) + this.EditableKey.GetHashCode();
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the structure of resource type-specific components for steps in the resource creation page. /// Represents the structure of resource type-specific components for steps in the resource creation page.
/// </summary> /// </summary>
[DataContract(Name = "ResourceCreationPageDto")] [DataContract(Name = "ResourceCreationPageDto")]
public partial class ResourceCreationPageDto : IEquatable<ResourceCreationPageDto>, IValidatableObject public partial class ResourceCreationPageDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ResourceCreationPageDto" /> class. /// Initializes a new instance of the <see cref="ResourceCreationPageDto" /> class.
...@@ -70,59 +70,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -70,59 +70,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 ResourceCreationPageDto);
}
/// <summary>
/// Returns true if ResourceCreationPageDto instances are equal
/// </summary>
/// <param name="input">Instance of ResourceCreationPageDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ResourceCreationPageDto input)
{
if (input == null)
{
return false;
}
return
(
this.Components == input.Components ||
this.Components != null &&
input.Components != null &&
this.Components.SequenceEqual(input.Components)
);
}
/// <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.Components != null)
{
hashCode = (hashCode * 59) + this.Components.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents a Data Transfer Object (DTO) for resource details. /// Represents a Data Transfer Object (DTO) for resource details.
/// </summary> /// </summary>
[DataContract(Name = "ResourceDto")] [DataContract(Name = "ResourceDto")]
public partial class ResourceDto : IEquatable<ResourceDto>, IValidatableObject public partial class ResourceDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ResourceDto" /> class. /// Initializes a new instance of the <see cref="ResourceDto" /> class.
...@@ -245,212 +245,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -245,212 +245,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 ResourceDto);
}
/// <summary>
/// Returns true if ResourceDto instances are equal
/// </summary>
/// <param name="input">Instance of ResourceDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ResourceDto input)
{
if (input == null)
{
return false;
}
return
(
this.Id == input.Id ||
(this.Id != null &&
this.Id.Equals(input.Id))
) &&
(
this.Pid == input.Pid ||
(this.Pid != null &&
this.Pid.Equals(input.Pid))
) &&
(
this.Type == input.Type ||
(this.Type != null &&
this.Type.Equals(input.Type))
) &&
(
this.Name == input.Name ||
(this.Name != null &&
this.Name.Equals(input.Name))
) &&
(
this.DisplayName == input.DisplayName ||
(this.DisplayName != null &&
this.DisplayName.Equals(input.DisplayName))
) &&
(
this.Description == input.Description ||
(this.Description != null &&
this.Description.Equals(input.Description))
) &&
(
this.Keywords == input.Keywords ||
this.Keywords != null &&
input.Keywords != null &&
this.Keywords.SequenceEqual(input.Keywords)
) &&
(
this.License == input.License ||
(this.License != null &&
this.License.Equals(input.License))
) &&
(
this.UsageRights == input.UsageRights ||
(this.UsageRights != null &&
this.UsageRights.Equals(input.UsageRights))
) &&
(
this.MetadataLocalCopy == input.MetadataLocalCopy ||
this.MetadataLocalCopy.Equals(input.MetadataLocalCopy)
) &&
(
this.MetadataExtraction == input.MetadataExtraction ||
this.MetadataExtraction.Equals(input.MetadataExtraction)
) &&
(
this.ApplicationProfile == input.ApplicationProfile ||
(this.ApplicationProfile != null &&
this.ApplicationProfile.Equals(input.ApplicationProfile))
) &&
(
this.FixedValues == input.FixedValues ||
this.FixedValues != null &&
input.FixedValues != null &&
this.FixedValues.SequenceEqual(input.FixedValues)
) &&
(
this.Disciplines == input.Disciplines ||
this.Disciplines != null &&
input.Disciplines != null &&
this.Disciplines.SequenceEqual(input.Disciplines)
) &&
(
this.Visibility == input.Visibility ||
(this.Visibility != null &&
this.Visibility.Equals(input.Visibility))
) &&
(
this.DateCreated == input.DateCreated ||
(this.DateCreated != null &&
this.DateCreated.Equals(input.DateCreated))
) &&
(
this.Creator == input.Creator ||
(this.Creator != null &&
this.Creator.Equals(input.Creator))
) &&
(
this.Archived == input.Archived ||
this.Archived.Equals(input.Archived)
) &&
(
this.Projects == input.Projects ||
this.Projects != null &&
input.Projects != null &&
this.Projects.SequenceEqual(input.Projects)
);
}
/// <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.Pid != null)
{
hashCode = (hashCode * 59) + this.Pid.GetHashCode();
}
if (this.Type != null)
{
hashCode = (hashCode * 59) + this.Type.GetHashCode();
}
if (this.Name != null)
{
hashCode = (hashCode * 59) + this.Name.GetHashCode();
}
if (this.DisplayName != null)
{
hashCode = (hashCode * 59) + this.DisplayName.GetHashCode();
}
if (this.Description != null)
{
hashCode = (hashCode * 59) + this.Description.GetHashCode();
}
if (this.Keywords != null)
{
hashCode = (hashCode * 59) + this.Keywords.GetHashCode();
}
if (this.License != null)
{
hashCode = (hashCode * 59) + this.License.GetHashCode();
}
if (this.UsageRights != null)
{
hashCode = (hashCode * 59) + this.UsageRights.GetHashCode();
}
hashCode = (hashCode * 59) + this.MetadataLocalCopy.GetHashCode();
hashCode = (hashCode * 59) + this.MetadataExtraction.GetHashCode();
if (this.ApplicationProfile != null)
{
hashCode = (hashCode * 59) + this.ApplicationProfile.GetHashCode();
}
if (this.FixedValues != null)
{
hashCode = (hashCode * 59) + this.FixedValues.GetHashCode();
}
if (this.Disciplines != null)
{
hashCode = (hashCode * 59) + this.Disciplines.GetHashCode();
}
if (this.Visibility != null)
{
hashCode = (hashCode * 59) + this.Visibility.GetHashCode();
}
if (this.DateCreated != null)
{
hashCode = (hashCode * 59) + this.DateCreated.GetHashCode();
}
if (this.Creator != null)
{
hashCode = (hashCode * 59) + this.Creator.GetHashCode();
}
hashCode = (hashCode * 59) + this.Archived.GetHashCode();
if (this.Projects != null)
{
hashCode = (hashCode * 59) + this.Projects.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// ResourceDtoPagedResponse /// ResourceDtoPagedResponse
/// </summary> /// </summary>
[DataContract(Name = "ResourceDtoPagedResponse")] [DataContract(Name = "ResourceDtoPagedResponse")]
public partial class ResourceDtoPagedResponse : IEquatable<ResourceDtoPagedResponse>, IValidatableObject public partial class ResourceDtoPagedResponse : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ResourceDtoPagedResponse" /> class. /// Initializes a new instance of the <see cref="ResourceDtoPagedResponse" /> class.
...@@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -111,91 +111,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 ResourceDtoPagedResponse);
}
/// <summary>
/// Returns true if ResourceDtoPagedResponse instances are equal
/// </summary>
/// <param name="input">Instance of ResourceDtoPagedResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ResourceDtoPagedResponse 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> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// ResourceDtoResponse /// ResourceDtoResponse
/// </summary> /// </summary>
[DataContract(Name = "ResourceDtoResponse")] [DataContract(Name = "ResourceDtoResponse")]
public partial class ResourceDtoResponse : IEquatable<ResourceDtoResponse>, IValidatableObject public partial class ResourceDtoResponse : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ResourceDtoResponse" /> class. /// Initializes a new instance of the <see cref="ResourceDtoResponse" /> class.
...@@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model ...@@ -102,81 +102,12 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 ResourceDtoResponse);
}
/// <summary>
/// Returns true if ResourceDtoResponse instances are equal
/// </summary>
/// <param name="input">Instance of ResourceDtoResponse to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ResourceDtoResponse 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> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
yield break; yield break;
} }
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the data transfer object (DTO) used for creating a resource. Inherits properties from Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ResourceForManipulationDto. /// Represents the data transfer object (DTO) used for creating a resource. Inherits properties from Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ResourceForManipulationDto.
/// </summary> /// </summary>
[DataContract(Name = "ResourceForCreationDto")] [DataContract(Name = "ResourceForCreationDto")]
public partial class ResourceForCreationDto : IEquatable<ResourceForCreationDto>, IValidatableObject public partial class ResourceForCreationDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ResourceForCreationDto" /> class. /// Initializes a new instance of the <see cref="ResourceForCreationDto" /> class.
...@@ -221,204 +221,47 @@ namespace Coscine.ApiClient.Core.Model ...@@ -221,204 +221,47 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 ResourceForCreationDto);
}
/// <summary>
/// Returns true if ResourceForCreationDto instances are equal
/// </summary>
/// <param name="input">Instance of ResourceForCreationDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ResourceForCreationDto input)
{
if (input == null)
{
return false;
}
return
(
this.Name == input.Name ||
(this.Name != null &&
this.Name.Equals(input.Name))
) &&
(
this.DisplayName == input.DisplayName ||
(this.DisplayName != null &&
this.DisplayName.Equals(input.DisplayName))
) &&
(
this.Description == input.Description ||
(this.Description != null &&
this.Description.Equals(input.Description))
) &&
(
this.Keywords == input.Keywords ||
this.Keywords != null &&
input.Keywords != null &&
this.Keywords.SequenceEqual(input.Keywords)
) &&
(
this.FixedValues == input.FixedValues ||
this.FixedValues != null &&
input.FixedValues != null &&
this.FixedValues.SequenceEqual(input.FixedValues)
) &&
(
this.License == input.License ||
(this.License != null &&
this.License.Equals(input.License))
) &&
(
this.UsageRights == input.UsageRights ||
(this.UsageRights != null &&
this.UsageRights.Equals(input.UsageRights))
) &&
(
this.MetadataLocalCopy == input.MetadataLocalCopy ||
(this.MetadataLocalCopy != null &&
this.MetadataLocalCopy.Equals(input.MetadataLocalCopy))
) &&
(
this.Visibility == input.Visibility ||
(this.Visibility != null &&
this.Visibility.Equals(input.Visibility))
) &&
(
this.Disciplines == input.Disciplines ||
this.Disciplines != null &&
input.Disciplines != null &&
this.Disciplines.SequenceEqual(input.Disciplines)
) &&
(
this.ResourceTypeId == input.ResourceTypeId ||
(this.ResourceTypeId != null &&
this.ResourceTypeId.Equals(input.ResourceTypeId))
) &&
(
this.ApplicationProfile == input.ApplicationProfile ||
(this.ApplicationProfile != null &&
this.ApplicationProfile.Equals(input.ApplicationProfile))
) &&
(
this.ResourceTypeOptions == input.ResourceTypeOptions ||
(this.ResourceTypeOptions != null &&
this.ResourceTypeOptions.Equals(input.ResourceTypeOptions))
);
}
/// <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.Name != null)
{
hashCode = (hashCode * 59) + this.Name.GetHashCode();
}
if (this.DisplayName != null)
{
hashCode = (hashCode * 59) + this.DisplayName.GetHashCode();
}
if (this.Description != null)
{
hashCode = (hashCode * 59) + this.Description.GetHashCode();
}
if (this.Keywords != null)
{
hashCode = (hashCode * 59) + this.Keywords.GetHashCode();
}
if (this.FixedValues != null)
{
hashCode = (hashCode * 59) + this.FixedValues.GetHashCode();
}
if (this.License != null)
{
hashCode = (hashCode * 59) + this.License.GetHashCode();
}
if (this.UsageRights != null)
{
hashCode = (hashCode * 59) + this.UsageRights.GetHashCode();
}
if (this.MetadataLocalCopy != null)
{
hashCode = (hashCode * 59) + this.MetadataLocalCopy.GetHashCode();
}
if (this.Visibility != null)
{
hashCode = (hashCode * 59) + this.Visibility.GetHashCode();
}
if (this.Disciplines != null)
{
hashCode = (hashCode * 59) + this.Disciplines.GetHashCode();
}
if (this.ResourceTypeId != null)
{
hashCode = (hashCode * 59) + this.ResourceTypeId.GetHashCode();
}
if (this.ApplicationProfile != null)
{
hashCode = (hashCode * 59) + this.ApplicationProfile.GetHashCode();
}
if (this.ResourceTypeOptions != null)
{
hashCode = (hashCode * 59) + this.ResourceTypeOptions.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
// Name (string) maxLength // Name (string) maxLength
if (this.Name != null && this.Name.Length > 200) if (this.Name != null && this.Name.Length > 200)
{ {
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be less than 200.", new [] { "Name" }); yield return new ValidationResult("Invalid value for Name, length must be less than 200.", new [] { "Name" });
} }
// Name (string) minLength // Name (string) minLength
if (this.Name != null && this.Name.Length < 1) if (this.Name != null && this.Name.Length < 1)
{ {
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); yield return new ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" });
} }
// DisplayName (string) maxLength // DisplayName (string) maxLength
if (this.DisplayName != null && this.DisplayName.Length > 25) if (this.DisplayName != null && this.DisplayName.Length > 25)
{ {
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DisplayName, length must be less than 25.", new [] { "DisplayName" }); yield return new ValidationResult("Invalid value for DisplayName, length must be less than 25.", new [] { "DisplayName" });
} }
// Description (string) maxLength // Description (string) maxLength
if (this.Description != null && this.Description.Length > 10000) if (this.Description != null && this.Description.Length > 10000)
{ {
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 10000.", new [] { "Description" }); yield return new ValidationResult("Invalid value for Description, length must be less than 10000.", new [] { "Description" });
} }
// Description (string) minLength // Description (string) minLength
if (this.Description != null && this.Description.Length < 1) if (this.Description != null && this.Description.Length < 1)
{ {
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be greater than 1.", new [] { "Description" }); yield return new ValidationResult("Invalid value for Description, length must be greater than 1.", new [] { "Description" });
} }
// UsageRights (string) maxLength // UsageRights (string) maxLength
if (this.UsageRights != null && this.UsageRights.Length > 200) if (this.UsageRights != null && this.UsageRights.Length > 200)
{ {
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UsageRights, length must be less than 200.", new [] { "UsageRights" }); yield return new ValidationResult("Invalid value for UsageRights, length must be less than 200.", new [] { "UsageRights" });
} }
yield break; yield break;
......
...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model ...@@ -30,7 +30,7 @@ namespace Coscine.ApiClient.Core.Model
/// Represents the data transfer object (DTO) used for updating a resource. Inherits properties from Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ResourceForManipulationDto. /// Represents the data transfer object (DTO) used for updating a resource. Inherits properties from Coscine.Api.Core.Shared.DataTransferObjects.ParameterObjects.ResourceForManipulationDto.
/// </summary> /// </summary>
[DataContract(Name = "ResourceForUpdateDto")] [DataContract(Name = "ResourceForUpdateDto")]
public partial class ResourceForUpdateDto : IEquatable<ResourceForUpdateDto>, IValidatableObject public partial class ResourceForUpdateDto : IValidatableObject
{ {
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ResourceForUpdateDto" /> class. /// Initializes a new instance of the <see cref="ResourceForUpdateDto" /> class.
...@@ -202,191 +202,47 @@ namespace Coscine.ApiClient.Core.Model ...@@ -202,191 +202,47 @@ namespace Coscine.ApiClient.Core.Model
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); 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 ResourceForUpdateDto);
}
/// <summary>
/// Returns true if ResourceForUpdateDto instances are equal
/// </summary>
/// <param name="input">Instance of ResourceForUpdateDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ResourceForUpdateDto input)
{
if (input == null)
{
return false;
}
return
(
this.Name == input.Name ||
(this.Name != null &&
this.Name.Equals(input.Name))
) &&
(
this.DisplayName == input.DisplayName ||
(this.DisplayName != null &&
this.DisplayName.Equals(input.DisplayName))
) &&
(
this.Description == input.Description ||
(this.Description != null &&
this.Description.Equals(input.Description))
) &&
(
this.Keywords == input.Keywords ||
this.Keywords != null &&
input.Keywords != null &&
this.Keywords.SequenceEqual(input.Keywords)
) &&
(
this.FixedValues == input.FixedValues ||
this.FixedValues != null &&
input.FixedValues != null &&
this.FixedValues.SequenceEqual(input.FixedValues)
) &&
(
this.License == input.License ||
(this.License != null &&
this.License.Equals(input.License))
) &&
(
this.UsageRights == input.UsageRights ||
(this.UsageRights != null &&
this.UsageRights.Equals(input.UsageRights))
) &&
(
this.MetadataLocalCopy == input.MetadataLocalCopy ||
(this.MetadataLocalCopy != null &&
this.MetadataLocalCopy.Equals(input.MetadataLocalCopy))
) &&
(
this.Visibility == input.Visibility ||
(this.Visibility != null &&
this.Visibility.Equals(input.Visibility))
) &&
(
this.Disciplines == input.Disciplines ||
this.Disciplines != null &&
input.Disciplines != null &&
this.Disciplines.SequenceEqual(input.Disciplines)
) &&
(
this.Archived == input.Archived ||
this.Archived.Equals(input.Archived)
) &&
(
this.ResourceTypeOptions == input.ResourceTypeOptions ||
(this.ResourceTypeOptions != null &&
this.ResourceTypeOptions.Equals(input.ResourceTypeOptions))
);
}
/// <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.Name != null)
{
hashCode = (hashCode * 59) + this.Name.GetHashCode();
}
if (this.DisplayName != null)
{
hashCode = (hashCode * 59) + this.DisplayName.GetHashCode();
}
if (this.Description != null)
{
hashCode = (hashCode * 59) + this.Description.GetHashCode();
}
if (this.Keywords != null)
{
hashCode = (hashCode * 59) + this.Keywords.GetHashCode();
}
if (this.FixedValues != null)
{
hashCode = (hashCode * 59) + this.FixedValues.GetHashCode();
}
if (this.License != null)
{
hashCode = (hashCode * 59) + this.License.GetHashCode();
}
if (this.UsageRights != null)
{
hashCode = (hashCode * 59) + this.UsageRights.GetHashCode();
}
if (this.MetadataLocalCopy != null)
{
hashCode = (hashCode * 59) + this.MetadataLocalCopy.GetHashCode();
}
if (this.Visibility != null)
{
hashCode = (hashCode * 59) + this.Visibility.GetHashCode();
}
if (this.Disciplines != null)
{
hashCode = (hashCode * 59) + this.Disciplines.GetHashCode();
}
hashCode = (hashCode * 59) + this.Archived.GetHashCode();
if (this.ResourceTypeOptions != null)
{
hashCode = (hashCode * 59) + this.ResourceTypeOptions.GetHashCode();
}
return hashCode;
}
}
/// <summary> /// <summary>
/// To validate all properties of the instance /// To validate all properties of the instance
/// </summary> /// </summary>
/// <param name="validationContext">Validation context</param> /// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns> /// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{ {
// Name (string) maxLength // Name (string) maxLength
if (this.Name != null && this.Name.Length > 200) if (this.Name != null && this.Name.Length > 200)
{ {
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be less than 200.", new [] { "Name" }); yield return new ValidationResult("Invalid value for Name, length must be less than 200.", new [] { "Name" });
} }
// Name (string) minLength // Name (string) minLength
if (this.Name != null && this.Name.Length < 1) if (this.Name != null && this.Name.Length < 1)
{ {
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); yield return new ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" });
} }
// DisplayName (string) maxLength // DisplayName (string) maxLength
if (this.DisplayName != null && this.DisplayName.Length > 25) if (this.DisplayName != null && this.DisplayName.Length > 25)
{ {
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DisplayName, length must be less than 25.", new [] { "DisplayName" }); yield return new ValidationResult("Invalid value for DisplayName, length must be less than 25.", new [] { "DisplayName" });
} }
// Description (string) maxLength // Description (string) maxLength
if (this.Description != null && this.Description.Length > 10000) if (this.Description != null && this.Description.Length > 10000)
{ {
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 10000.", new [] { "Description" }); yield return new ValidationResult("Invalid value for Description, length must be less than 10000.", new [] { "Description" });
} }
// Description (string) minLength // Description (string) minLength
if (this.Description != null && this.Description.Length < 1) if (this.Description != null && this.Description.Length < 1)
{ {
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be greater than 1.", new [] { "Description" }); yield return new ValidationResult("Invalid value for Description, length must be greater than 1.", new [] { "Description" });
} }
// UsageRights (string) maxLength // UsageRights (string) maxLength
if (this.UsageRights != null && this.UsageRights.Length > 200) if (this.UsageRights != null && this.UsageRights.Length > 200)
{ {
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for UsageRights, length must be less than 200.", new [] { "UsageRights" }); yield return new ValidationResult("Invalid value for UsageRights, length must be less than 200.", new [] { "UsageRights" });
} }
yield break; yield break;
......