using System;
using System.Diagnostics;
using System.Globalization;
namespace Octokit
{
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class IssueEvent
{
public IssueEvent() { }
public IssueEvent(long id, string nodeId, string url, User actor, User assignee, Label label, EventInfoState @event, string commitId, DateTimeOffset createdAt, Issue issue, string commitUrl, RenameInfo rename, IssueEventProjectCard projectCard)
{
Id = id;
NodeId = nodeId;
Url = url;
Actor = actor;
Assignee = assignee;
Label = label;
Event = @event;
CommitId = commitId;
CreatedAt = createdAt;
Issue = issue;
CommitUrl = commitUrl;
Rename = rename;
ProjectCard = projectCard;
}
///
/// The id of the issue/pull request event.
///
public long Id { get; protected set; }
///
/// GraphQL Node Id
///
public string NodeId { get; protected set; }
///
/// The URL for this issue/pull request event.
///
public string Url { get; protected set; }
///
/// Always the User that generated the event.
///
public User Actor { get; protected set; }
///
/// The user that was assigned, if the event was 'Assigned'.
///
public User Assignee { get; protected set; }
///
/// The label that was assigned, if the event was 'Labeled'
///
public Label Label { get; protected set; }
///
/// Identifies the actual type of Event that occurred.
///
public StringEnum Event { get; protected set; }
///
/// The String SHA of a commit that referenced this Issue.
///
public string CommitId { get; protected set; }
///
/// The commit URL of a commit that referenced this issue.
///
public string CommitUrl { get; protected set; }
///
/// Date the event occurred for the issue/pull request.
///
public DateTimeOffset CreatedAt { get; protected set; }
///
/// The issue associated to this event.
///
public Issue Issue { get; protected set; }
///
/// An object containing rename details
/// Only provided for renamed events
///
public RenameInfo Rename { get; protected set; }
///
/// Information about the project card that triggered the event.
/// The project_card attribute is not returned if someone deletes the project board, or if you do not have permission to view it.
///
public IssueEventProjectCard ProjectCard { get; protected set; }
internal string DebuggerDisplay
{
get { return string.Format(CultureInfo.InvariantCulture, "Id: {0} CreatedAt: {1}", Id, CreatedAt); }
}
}
}