Skip to content
This repository was archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew4850 committed Apr 26, 2022
2 parents 197f3ac + 8d054fb commit 93b9e0b
Show file tree
Hide file tree
Showing 121 changed files with 2,891 additions and 414 deletions.
15 changes: 15 additions & 0 deletions src/API/Discord.API.Status/Models/AffectedComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,32 @@

namespace Discord.API.Status.Models
{
/// <summary>
/// A component that is affected by an issue.
/// </summary>
public class AffectedComponent
{
/// <summary>
/// Gets the code of the issue that altered the component status.
/// </summary>
[JsonPropertyName("code")]
public string Code { get; set; }

/// <summary>
/// Gets the name of the comonent.
/// </summary>
[JsonPropertyName("name")]
public string Name { get; set; }

/// <summary>
/// Gets the status of the component before the issue.
/// </summary>
[JsonPropertyName("old_status")]
public string OldStatus { get; set; }

/// <summary>
/// Gets the status of the component with the issue.
/// </summary>
[JsonPropertyName("new_status")]
public string NewStatus { get; set; }
}
Expand Down
12 changes: 12 additions & 0 deletions src/API/Discord.API.Status/Models/AllMetrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,26 @@

namespace Discord.API.Status.Models
{
/// <summary>
/// The set of all response time metrics over a period.
/// </summary>
public class AllMetrics
{
/// <summary>
/// Gets the peroid of time the metrics cover.
/// </summary>
[JsonPropertyName("period")]
public Period Period { get; set; }

/// <summary>
/// Gets the set of individual response time elements.
/// </summary>
[JsonPropertyName("metrics")]
public MetricElement[] Metrics { get; set; }

/// <summary>
/// Gets the summary of the response time.
/// </summary>
[JsonPropertyName("summary")]
public Summary Summary { get; set; }
}
Expand Down
36 changes: 36 additions & 0 deletions src/API/Discord.API.Status/Models/Component.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,74 @@

namespace Discord.API.Status.Models
{
/// <summary>
/// A component status of the Discord API.
/// </summary>
public partial class Component
{
/// <summary>
/// Gets the status of the component.
/// </summary>
[JsonPropertyName("status")]
public string Status { get; set; }

/// <summary>
/// Gets the name of the component.
/// </summary>
[JsonPropertyName("name")]
public string Name { get; set; }

/// <summary>
/// Gets the time the component was created.
/// </summary>
[JsonPropertyName("created_at")]
public DateTimeOffset CreatedAt { get; set; }

/// <summary>
/// Gets the time the component status was last updated.
/// </summary>
[JsonPropertyName("updated_at")]
public DateTimeOffset UpdatedAt { get; set; }

/// <summary>
/// Gets the ordering position of the component.
/// </summary>
[JsonPropertyName("position")]
public long Position { get; set; }

/// <summary>
/// Gets the description of the component.
/// </summary>
[JsonPropertyName("description")]
public string? Description { get; set; }

/// <summary>
/// Gets a value indicating whether or not the component is a showcase.
/// </summary>
[JsonPropertyName("showcase")]
public bool Showcase { get; set; }

/// <summary>
/// Gets the id of the component.
/// </summary>
[JsonPropertyName("id")]
public string Id { get; set; }

/// <summary>
/// Gets the page id of the component.
/// </summary>
[JsonPropertyName("page_id")]
public string PageId { get; set; }

/// <summary>
/// Gets the group id of the component.
/// </summary>
[JsonPropertyName("group_id")]
public object GroupId { get; set; }

/// <summary>
/// Gets a list of child components.
/// </summary>
[JsonPropertyName("components")]
public string[]? Components { get; set; }
}
Expand Down
9 changes: 9 additions & 0 deletions src/API/Discord.API.Status/Models/Datum.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@

namespace Discord.API.Status.Models
{
/// <summary>
/// A response time datum.
/// </summary>
public partial class Datum
{
/// <summary>
/// Gets the timestamp represented.
/// </summary>
[JsonPropertyName("timestamp")]
public long Timestamp { get; set; }

/// <summary>
/// Gets the average response time during this time.
/// </summary>
[JsonPropertyName("value")]
public ushort Value { get; set; }
}
Expand Down
75 changes: 75 additions & 0 deletions src/API/Discord.API.Status/Models/Incident.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,77 +8,152 @@

namespace Discord.API.Status.Models
{
/// <summary>
/// An incident in the Discord API.
/// </summary>
public partial class Incident
{
/// <summary>
/// Gets the name of the incident.
/// </summary>
[JsonPropertyName("name")]
public string Name { get; set; }

/// <summary>
/// Gets the status of the api.
/// </summary>
[JsonPropertyName("status")]
public string Status { get; set; }

/// <summary>
/// Gets the time the incident began.
/// </summary>
[JsonPropertyName("created_at")]
public DateTimeOffset? CreatedAt { get; set; }

/// <summary>
/// Gets the time of the last incident update.
/// </summary>
[JsonPropertyName("updated_at")]
public DateTimeOffset? UpdatedAt { get; set; }

/// <summary>
/// Gets the time monitoring began.
/// </summary>
[JsonPropertyName("monitoring_at")]
public DateTimeOffset? MonitoringAt { get; set; }

/// <summary>
/// Gets the time the incident was resolved at.
/// </summary>
[JsonPropertyName("resolved_at")]
public DateTimeOffset? ResolvedAt { get; set; }

/// <summary>
/// Gets the impact of the incident.
/// </summary>
[JsonPropertyName("impact")]
public string Impact { get; set; }

/// <summary>
/// Gets the short link url to the incident.
/// </summary>
[JsonPropertyName("shortlink")]
public string Shortlink { get; set; }

/// <summary>
/// Gets a value indicating whether or not the post mortem of the incident is ignored.
/// </summary>
[JsonPropertyName("postmortem_ignored")]
public bool PostmortemIgnored { get; set; }

/// <summary>
/// Gets the post mortem of the incident.
/// </summary>
[JsonPropertyName("postmortem_body")]
public object PostmortemBody { get; set; }

/// <summary>
/// Gets the time the post mortem body was last updated.
/// </summary>
[JsonPropertyName("postmortem_body_last_updated_at")]
public object PostmortemBodyLastUpdatedAt { get; set; }

/// <summary>
/// Gets the time when the post mortem was published.
/// </summary>
[JsonPropertyName("postmortem_published_at")]
public object PostmortemPublishedAt { get; set; }

/// <summary>
/// Gets a value indicating whether or not post mortem subscribers are notified.
/// </summary>
[JsonPropertyName("postmortem_notified_subscribers")]
public bool PostmortemNotifiedSubscribers { get; set; }

/// <summary>
/// Gets a value indicating whether or not the post mortem was posted on Twitter.
/// </summary>
[JsonPropertyName("postmortem_notified_twitter")]
public bool PostmortemNotifiedTwitter { get; set; }

/// <summary>
/// TODO: Investigate.
/// </summary>
[JsonPropertyName("scheduled_for")]
public object ScheduledFor { get; set; }

/// <summary>
/// TODO: Investigate.
/// </summary>
[JsonPropertyName("scheduled_until")]
public object ScheduledUntil { get; set; }

/// <summary>
/// TODO: Investigate.
/// </summary>
[JsonPropertyName("scheduled_remind_prior")]
public bool ScheduledRemindPrior { get; set; }

/// <summary>
/// TODO: Investigate.
/// </summary>
[JsonPropertyName("scheduled_reminded_at")]
public object ScheduledRemindedAt { get; set; }

/// <summary>
/// TODO: Investigate.
/// </summary>
[JsonPropertyName("impact_override")]
public string ImpactOverride { get; set; }

/// <summary>
/// TODO: Investigate.
/// </summary>
[JsonPropertyName("scheduled_auto_in_progress")]
public bool ScheduledAutoInProgress { get; set; }

/// <summary>
/// Gets a value indicating whether or not the incident is scheduled for auto complete.
/// </summary>
[JsonPropertyName("scheduled_auto_completed")]
public bool ScheduledAutoCompleted { get; set; }

/// <summary>
/// Gets the incident id.
/// </summary>
[JsonPropertyName("id")]
public string Id { get; set; }

/// <summary>
/// Gets the page id for the incident.
/// </summary>
[JsonPropertyName("page_id")]
public string PageId { get; set; }

/// <summary>
/// Gets a list of updates to the incident.
/// </summary>
[JsonPropertyName("incident_updates")]
public IncidentUpdate[] IncidentUpdates { get; set; }
}
Expand Down
15 changes: 15 additions & 0 deletions src/API/Discord.API.Status/Models/Index.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,32 @@

namespace Discord.API.Status.Models
{
/// <summary>
/// An index of the discord api status.
/// </summary>
public class Index
{
/// <summary>
/// Gets the index page.
/// </summary>
[JsonPropertyName("page")]
public Page Page { get; set; }

/// <summary>
/// Gets the status for the index.
/// </summary>
[JsonPropertyName("status")]
public StatusClass Status { get; set; }

/// <summary>
/// Gets the component statuses for the index.
/// </summary>
[JsonPropertyName("components")]
public Component[] Components { get; set; }

/// <summary>
/// Gets the index incidents.
/// </summary>
[JsonPropertyName("incidents")]
public Incident[] Incidents { get; set; }
}
Expand Down
12 changes: 12 additions & 0 deletions src/API/Discord.API.Status/Models/Period.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,26 @@

namespace Discord.API.Status.Models
{
/// <summary>
/// The period of time a metrics set covers.
/// </summary>
public partial class Period
{
/// <summary>
/// Gets the number of metrics in the peroid.
/// </summary>
[JsonPropertyName("count")]
public long Count { get; set; }

/// <summary>
/// Gets the interval of time between metric.
/// </summary>
[JsonPropertyName("interval")]
public long Interval { get; set; }

/// <summary>
/// Gets the interval identifier.
/// </summary>
[JsonPropertyName("identifier")]
public string Identifier { get; set; }
}
Expand Down
3 changes: 3 additions & 0 deletions src/API/Discord.API/Gateways/Models/Handshake/Ready.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ internal class Ready
[JsonPropertyName("guilds")]
public JsonGuild[] Guilds { get; set; }

[JsonPropertyName("private_channels")]
public JsonChannel[] PrivateChannels { get; set; }

[JsonPropertyName("session_id")]
public string SessionId { get; set; }

Expand Down
Loading

0 comments on commit 93b9e0b

Please sign in to comment.