Class BowireCatalogueDocument

Namespace
Kuestenlogik.Bowire.Sources
Assembly
Kuestenlogik.Bowire.dll

Top-level shape of a catalogue document. Matches the spec in #136 — providers that fetch JSON over the wire (local file, http, agent) deserialise into this record. Version defaults to 1 so payloads that omit the field stay parsable.

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

Constructors

BowireCatalogueDocument(int, IReadOnlyList<BowireCatalogueEntry>?)

Top-level shape of a catalogue document. Matches the spec in #136 — providers that fetch JSON over the wire (local file, http, agent) deserialise into this record. Version defaults to 1 so payloads that omit the field stay parsable.

public BowireCatalogueDocument(int Version = 1, IReadOnlyList<BowireCatalogueEntry>? Entries = null)

Parameters

Version int

Document schema version. Currently 1. Bumped only on a breaking shape change so old providers can refuse to consume a payload they don't understand.

Entries IReadOnlyList<BowireCatalogueEntry>

The catalogue rows. Empty / null is allowed.

Properties

Entries

The catalogue rows. Empty / null is allowed.

[JsonPropertyName("entries")]
public IReadOnlyList<BowireCatalogueEntry>? Entries { get; init; }

Property Value

IReadOnlyList<BowireCatalogueEntry>

Version

Document schema version. Currently 1. Bumped only on a breaking shape change so old providers can refuse to consume a payload they don't understand.

[JsonPropertyName("version")]
public int Version { get; init; }

Property Value

int

Methods

Deconstruct(out int, out IReadOnlyList<BowireCatalogueEntry>?)

public void Deconstruct(out int Version, out IReadOnlyList<BowireCatalogueEntry>? Entries)

Parameters

Version int
Entries IReadOnlyList<BowireCatalogueEntry>

Equals(BowireCatalogueDocument?)

public bool Equals(BowireCatalogueDocument? other)

Parameters

other BowireCatalogueDocument

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(BowireCatalogueDocument?, BowireCatalogueDocument?)

public static bool operator ==(BowireCatalogueDocument? left, BowireCatalogueDocument? right)

Parameters

left BowireCatalogueDocument
right BowireCatalogueDocument

Returns

bool

operator !=(BowireCatalogueDocument?, BowireCatalogueDocument?)

public static bool operator !=(BowireCatalogueDocument? left, BowireCatalogueDocument? right)

Parameters

left BowireCatalogueDocument
right BowireCatalogueDocument

Returns

bool