#region ========================================================================= USING ===================================================================================== using System.Collections.Generic; using System.Text.Json.Serialization; #endregion namespace Lumina.Plugins.MusicBrainz.Common.Models.Contracts.Responses; /// /// Represents a response for a relationship between a MusicBrainz entity and another entity. /// internal sealed record MusicBrainzRelationResponse { /// /// Gets the type of the relationship (e.g., producer, composer, member of band). /// [JsonPropertyName("type")] public string? Type { get; init; } /// /// Gets the MusicBrainz identifier of the type of the relationship. /// [JsonPropertyName("type-id")] public string? TypeId { get; init; } /// /// Gets the direction of the relationship. /// [JsonPropertyName("direction")] public string? Direction { get; init; } /// /// Gets the type of the entity the relationship targets. /// [JsonPropertyName("target-type")] public string? TargetType { get; init; } /// /// Gets the artist the relationship targets, when the target is an artist. /// [JsonPropertyName("artist")] public MusicBrainzArtistResponse? Artist { get; init; } /// /// Gets the work the relationship targets, when the target is a work. /// [JsonPropertyName("work")] public MusicBrainzWorkResponse? Work { get; init; } /// /// Gets the URL the relationship targets, when the target is a URL. /// [JsonPropertyName("url")] public MusicBrainzUrlResponse? Url { get; init; } /// /// Gets the attributes of the relationship (e.g., the instrument that was performed). /// [JsonPropertyName("attributes")] public List Attributes { get; init; } = []; }