Select Git revision
data_to_single_hdf5.py
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
ProjectAdminDto.cs 22.78 KiB
/*
* 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>
/// Represents a data transfer object (DTO) for an administrative view of a project. Extends the base information in Coscine.Api.Core.Shared.DataTransferObjects.ReturnObjects.ProjectDto.
/// </summary>
[DataContract(Name = "ProjectAdminDto")]
public partial class ProjectAdminDto : IEquatable<ProjectAdminDto>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="ProjectAdminDto" /> class.
/// </summary>
/// <param name="id">Unique identifier for the project..</param>
/// <param name="pid">Persistent identifier for the project..</param>
/// <param name="name">Name of the project..</param>
/// <param name="description">Description of the project..</param>
/// <param name="startDate">Start date of the project..</param>
/// <param name="endDate">End date of the project..</param>
/// <param name="keywords">Collection of keywords associated with the project..</param>
/// <param name="displayName">Display name of the project..</param>
/// <param name="principleInvestigators">Principal investigators involved in the project..</param>
/// <param name="grantId">Grant ID associated with the project..</param>
/// <param name="visibility">visibility.</param>
/// <param name="disciplines">Disciplines related to the project..</param>
/// <param name="organizations">Organizations associated with the project..</param>
/// <param name="slug">Slug for the project..</param>
/// <param name="creator">creator.</param>
/// <param name="creationDate">Date of creation of the project..</param>
/// <param name="subProjects">Collection of sub-projects associated with this project..</param>
/// <param name="parent">parent.</param>
/// <param name="deleted">Indicates whether the project is marked as deleted..</param>
/// <param name="projectResources">Collection of minimal project resource details associated with the project..</param>
/// <param name="projectRoles">Collection of minimal project role details associated with the project..</param>
/// <param name="projectQuota">Collection of project quotas associated with the project..</param>
public ProjectAdminDto(Guid id = default(Guid), string pid = default(string), string name = default(string), string description = default(string), DateTime startDate = default(DateTime), DateTime endDate = default(DateTime), List<string> keywords = default(List<string>), string displayName = default(string), string principleInvestigators = default(string), string grantId = default(string), VisibilityDto visibility = default(VisibilityDto), List<DisciplineDto> disciplines = default(List<DisciplineDto>), List<OrganizationDto> organizations = default(List<OrganizationDto>), string slug = default(string), UserMinimalDto creator = default(UserMinimalDto), DateTime? creationDate = default(DateTime?), List<ProjectDto> subProjects = default(List<ProjectDto>), ProjectMinimalDto parent = default(ProjectMinimalDto), bool deleted = default(bool), List<ProjectResourceMinimalDto> projectResources = default(List<ProjectResourceMinimalDto>), List<ProjectRoleMinimalDto> projectRoles = default(List<ProjectRoleMinimalDto>), List<ProjectQuotaDto> projectQuota = default(List<ProjectQuotaDto>))
{
this.Id = id;
this.Pid = pid;
this.Name = name;
this.Description = description;
this.StartDate = startDate;
this.EndDate = endDate;
this.Keywords = keywords;
this.DisplayName = displayName;
this.PrincipleInvestigators = principleInvestigators;
this.GrantId = grantId;
this.Visibility = visibility;
this.Disciplines = disciplines;
this.Organizations = organizations;
this.Slug = slug;
this.Creator = creator;
this.CreationDate = creationDate;
this.SubProjects = subProjects;
this.Parent = parent;
this.Deleted = deleted;
this.ProjectResources = projectResources;
this.ProjectRoles = projectRoles;
this.ProjectQuota = projectQuota;
}
/// <summary>
/// Unique identifier for the project.
/// </summary>
/// <value>Unique identifier for the project.</value>
[DataMember(Name = "id", EmitDefaultValue = false)]
public Guid Id { get; set; }
/// <summary>
/// Persistent identifier for the project.
/// </summary>
/// <value>Persistent identifier for the project.</value>
[DataMember(Name = "pid", EmitDefaultValue = false)]
public string Pid { get; set; }
/// <summary>
/// Name of the project.
/// </summary>
/// <value>Name of the project.</value>
[DataMember(Name = "name", EmitDefaultValue = false)]
public string Name { get; set; }
/// <summary>
/// Description of the project.
/// </summary>
/// <value>Description of the project.</value>
[DataMember(Name = "description", EmitDefaultValue = false)]
public string Description { get; set; }
/// <summary>
/// Start date of the project.
/// </summary>
/// <value>Start date of the project.</value>
[DataMember(Name = "startDate", EmitDefaultValue = false)]
public DateTime StartDate { get; set; }
/// <summary>
/// End date of the project.
/// </summary>
/// <value>End date of the project.</value>
[DataMember(Name = "endDate", EmitDefaultValue = false)]
public DateTime EndDate { get; set; }
/// <summary>
/// Collection of keywords associated with the project.
/// </summary>
/// <value>Collection of keywords associated with the project.</value>
[DataMember(Name = "keywords", EmitDefaultValue = true)]
public List<string> Keywords { get; set; }
/// <summary>
/// Display name of the project.
/// </summary>
/// <value>Display name of the project.</value>
[DataMember(Name = "displayName", EmitDefaultValue = true)]
public string DisplayName { get; set; }
/// <summary>
/// Principal investigators involved in the project.
/// </summary>
/// <value>Principal investigators involved in the project.</value>
[DataMember(Name = "principleInvestigators", EmitDefaultValue = true)]
public string PrincipleInvestigators { get; set; }
/// <summary>
/// Grant ID associated with the project.
/// </summary>
/// <value>Grant ID associated with the project.</value>
[DataMember(Name = "grantId", EmitDefaultValue = true)]
public string GrantId { get; set; }
/// <summary>
/// Gets or Sets Visibility
/// </summary>
[DataMember(Name = "visibility", EmitDefaultValue = false)]
public VisibilityDto Visibility { get; set; }
/// <summary>
/// Disciplines related to the project.
/// </summary>
/// <value>Disciplines related to the project.</value>
[DataMember(Name = "disciplines", EmitDefaultValue = false)]
public List<DisciplineDto> Disciplines { get; set; }
/// <summary>
/// Organizations associated with the project.
/// </summary>
/// <value>Organizations associated with the project.</value>
[DataMember(Name = "organizations", EmitDefaultValue = false)]
public List<OrganizationDto> Organizations { get; set; }
/// <summary>
/// Slug for the project.
/// </summary>
/// <value>Slug for the project.</value>
[DataMember(Name = "slug", EmitDefaultValue = false)]
public string Slug { get; set; }
/// <summary>
/// Gets or Sets Creator
/// </summary>
[DataMember(Name = "creator", EmitDefaultValue = false)]
public UserMinimalDto Creator { get; set; }
/// <summary>
/// Date of creation of the project.
/// </summary>
/// <value>Date of creation of the project.</value>
[DataMember(Name = "creationDate", EmitDefaultValue = true)]
public DateTime? CreationDate { get; set; }
/// <summary>
/// Collection of sub-projects associated with this project.
/// </summary>
/// <value>Collection of sub-projects associated with this project.</value>
[DataMember(Name = "subProjects", EmitDefaultValue = true)]
public List<ProjectDto> SubProjects { get; set; }
/// <summary>
/// Gets or Sets Parent
/// </summary>
[DataMember(Name = "parent", EmitDefaultValue = false)]
public ProjectMinimalDto Parent { get; set; }
/// <summary>
/// Indicates whether the project is marked as deleted.
/// </summary>
/// <value>Indicates whether the project is marked as deleted.</value>
[DataMember(Name = "deleted", EmitDefaultValue = true)]
public bool Deleted { get; set; }
/// <summary>
/// Collection of minimal project resource details associated with the project.
/// </summary>
/// <value>Collection of minimal project resource details associated with the project.</value>
[DataMember(Name = "projectResources", EmitDefaultValue = false)]
public List<ProjectResourceMinimalDto> ProjectResources { get; set; }
/// <summary>
/// Collection of minimal project role details associated with the project.
/// </summary>
/// <value>Collection of minimal project role details associated with the project.</value>
[DataMember(Name = "projectRoles", EmitDefaultValue = false)]
public List<ProjectRoleMinimalDto> ProjectRoles { get; set; }
/// <summary>
/// Collection of project quotas associated with the project.
/// </summary>
/// <value>Collection of project quotas associated with the project.</value>
[DataMember(Name = "projectQuota", EmitDefaultValue = false)]
public List<ProjectQuotaDto> ProjectQuota { 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 ProjectAdminDto {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Pid: ").Append(Pid).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" Description: ").Append(Description).Append("\n");
sb.Append(" StartDate: ").Append(StartDate).Append("\n");
sb.Append(" EndDate: ").Append(EndDate).Append("\n");
sb.Append(" Keywords: ").Append(Keywords).Append("\n");
sb.Append(" DisplayName: ").Append(DisplayName).Append("\n");
sb.Append(" PrincipleInvestigators: ").Append(PrincipleInvestigators).Append("\n");
sb.Append(" GrantId: ").Append(GrantId).Append("\n");
sb.Append(" Visibility: ").Append(Visibility).Append("\n");
sb.Append(" Disciplines: ").Append(Disciplines).Append("\n");
sb.Append(" Organizations: ").Append(Organizations).Append("\n");
sb.Append(" Slug: ").Append(Slug).Append("\n");
sb.Append(" Creator: ").Append(Creator).Append("\n");
sb.Append(" CreationDate: ").Append(CreationDate).Append("\n");
sb.Append(" SubProjects: ").Append(SubProjects).Append("\n");
sb.Append(" Parent: ").Append(Parent).Append("\n");
sb.Append(" Deleted: ").Append(Deleted).Append("\n");
sb.Append(" ProjectResources: ").Append(ProjectResources).Append("\n");
sb.Append(" ProjectRoles: ").Append(ProjectRoles).Append("\n");
sb.Append(" ProjectQuota: ").Append(ProjectQuota).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 ProjectAdminDto);
}
/// <summary>
/// Returns true if ProjectAdminDto instances are equal
/// </summary>
/// <param name="input">Instance of ProjectAdminDto to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(ProjectAdminDto 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.Name == input.Name ||
(this.Name != null &&
this.Name.Equals(input.Name))
) &&
(
this.Description == input.Description ||
(this.Description != null &&
this.Description.Equals(input.Description))
) &&
(
this.StartDate == input.StartDate ||
(this.StartDate != null &&
this.StartDate.Equals(input.StartDate))
) &&
(
this.EndDate == input.EndDate ||
(this.EndDate != null &&
this.EndDate.Equals(input.EndDate))
) &&
(
this.Keywords == input.Keywords ||
this.Keywords != null &&
input.Keywords != null &&
this.Keywords.SequenceEqual(input.Keywords)
) &&
(
this.DisplayName == input.DisplayName ||
(this.DisplayName != null &&
this.DisplayName.Equals(input.DisplayName))
) &&
(
this.PrincipleInvestigators == input.PrincipleInvestigators ||
(this.PrincipleInvestigators != null &&
this.PrincipleInvestigators.Equals(input.PrincipleInvestigators))
) &&
(
this.GrantId == input.GrantId ||
(this.GrantId != null &&
this.GrantId.Equals(input.GrantId))
) &&
(
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.Organizations == input.Organizations ||
this.Organizations != null &&
input.Organizations != null &&
this.Organizations.SequenceEqual(input.Organizations)
) &&
(
this.Slug == input.Slug ||
(this.Slug != null &&
this.Slug.Equals(input.Slug))
) &&
(
this.Creator == input.Creator ||
(this.Creator != null &&
this.Creator.Equals(input.Creator))
) &&
(
this.CreationDate == input.CreationDate ||
(this.CreationDate != null &&
this.CreationDate.Equals(input.CreationDate))
) &&
(
this.SubProjects == input.SubProjects ||
this.SubProjects != null &&
input.SubProjects != null &&
this.SubProjects.SequenceEqual(input.SubProjects)
) &&
(
this.Parent == input.Parent ||
(this.Parent != null &&
this.Parent.Equals(input.Parent))
) &&
(
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.ProjectRoles == input.ProjectRoles ||
this.ProjectRoles != null &&
input.ProjectRoles != null &&
this.ProjectRoles.SequenceEqual(input.ProjectRoles)
) &&
(
this.ProjectQuota == input.ProjectQuota ||
this.ProjectQuota != null &&
input.ProjectQuota != null &&
this.ProjectQuota.SequenceEqual(input.ProjectQuota)
);
}
/// <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.Name != null)
{
hashCode = (hashCode * 59) + this.Name.GetHashCode();
}
if (this.Description != null)
{
hashCode = (hashCode * 59) + this.Description.GetHashCode();
}
if (this.StartDate != null)
{
hashCode = (hashCode * 59) + this.StartDate.GetHashCode();
}
if (this.EndDate != null)
{
hashCode = (hashCode * 59) + this.EndDate.GetHashCode();
}
if (this.Keywords != null)
{
hashCode = (hashCode * 59) + this.Keywords.GetHashCode();
}
if (this.DisplayName != null)
{
hashCode = (hashCode * 59) + this.DisplayName.GetHashCode();
}
if (this.PrincipleInvestigators != null)
{
hashCode = (hashCode * 59) + this.PrincipleInvestigators.GetHashCode();
}
if (this.GrantId != null)
{
hashCode = (hashCode * 59) + this.GrantId.GetHashCode();
}
if (this.Visibility != null)
{
hashCode = (hashCode * 59) + this.Visibility.GetHashCode();
}
if (this.Disciplines != null)
{
hashCode = (hashCode * 59) + this.Disciplines.GetHashCode();
}
if (this.Organizations != null)
{
hashCode = (hashCode * 59) + this.Organizations.GetHashCode();
}
if (this.Slug != null)
{
hashCode = (hashCode * 59) + this.Slug.GetHashCode();
}
if (this.Creator != null)
{
hashCode = (hashCode * 59) + this.Creator.GetHashCode();
}
if (this.CreationDate != null)
{
hashCode = (hashCode * 59) + this.CreationDate.GetHashCode();
}
if (this.SubProjects != null)
{
hashCode = (hashCode * 59) + this.SubProjects.GetHashCode();
}
if (this.Parent != null)
{
hashCode = (hashCode * 59) + this.Parent.GetHashCode();
}
hashCode = (hashCode * 59) + this.Deleted.GetHashCode();
if (this.ProjectResources != null)
{
hashCode = (hashCode * 59) + this.ProjectResources.GetHashCode();
}
if (this.ProjectRoles != null)
{
hashCode = (hashCode * 59) + this.ProjectRoles.GetHashCode();
}
if (this.ProjectQuota != null)
{
hashCode = (hashCode * 59) + this.ProjectQuota.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;
}
}
}