Table of Contents

Class GroupUpdateResult

Namespace
Nyra.Entities
Assembly
Nyra.dll

The result of a group update, the players it reached and the per-guild failures.

public sealed record GroupUpdateResult : IEquatable<GroupUpdateResult>
Inheritance
GroupUpdateResult
Implements
Inherited Members

Properties

CreatedAt

When the group was created, Unix epoch milliseconds.

[JsonPropertyName("createdAt")]
[JsonInclude]
public long CreatedAt { get; }

Property Value

long

CreatedAtTime

When the group was created, as a date.

[JsonIgnore]
public DateTimeOffset CreatedAtTime { get; }

Property Value

DateTimeOffset

Remarks

MinValue when the epoch value is out of the convertible range, which the exact floor of the range reads as too, so the sentinel cannot be told apart from it.

Errors

Per-guild failures of the update.

[JsonPropertyName("errors")]
[JsonInclude]
public IReadOnlyList<GroupGuildError> Errors { get; }

Property Value

IReadOnlyList<GroupGuildError>

Remarks

The group update answers 200 even when individual guilds fail, each failure lands here with the server's error text, always check this list, an empty one means every member was reached. Null entries the wire carries are dropped, a null list reads as empty.

GuildIds

The membership after the update's additions and removals were applied.

[JsonPropertyName("guildIds")]
[JsonInclude]
[JsonConverter(typeof(SnowflakeListConverter))]
public IReadOnlyList<ulong> GuildIds { get; }

Property Value

IReadOnlyList<ulong>

Id

The id of the updated group.

[JsonPropertyName("id")]
[JsonInclude]
public string Id { get; }

Property Value

string

Players

The players of the member guilds the update reached.

[JsonPropertyName("players")]
[JsonInclude]
public IReadOnlyList<Player> Players { get; }

Property Value

IReadOnlyList<Player>

Remarks

The reached players, a member that failed mid-update is in errors instead, membership itself is GuildIds. Null entries the wire carries are dropped, a null list reads as empty.

Methods

Equals(GroupUpdateResult?)

Indicates whether both results carry the same id, membership, players and failures.

public bool Equals(GroupUpdateResult? other)

Parameters

other GroupUpdateResult

The result to compare with.

Returns

bool

Whether the members match, the collections compared by content.

GetHashCode()

Returns a hash of the result's comparable members.

public override int GetHashCode()

Returns

int

The hash code.