Class BowireFieldInfo

Namespace
Kuestenlogik.Bowire.Models
Assembly
Kuestenlogik.Bowire.dll

Describes a single field within a message. Originally modeled after protobuf, extended with an optional Source annotation so REST parameters from different locations (path, query, header, body) can share the same shape as protobuf fields.

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

Constructors

BowireFieldInfo(string, int, string, string, bool, bool, BowireMessageInfo?, List<BowireEnumValue>?)

Describes a single field within a message. Originally modeled after protobuf, extended with an optional Source annotation so REST parameters from different locations (path, query, header, body) can share the same shape as protobuf fields.

public BowireFieldInfo(string Name, int Number, string Type, string Label, bool IsMap, bool IsRepeated, BowireMessageInfo? MessageType, List<BowireEnumValue>? EnumValues)

Parameters

Name string
Number int
Type string
Label string
IsMap bool
IsRepeated bool
MessageType BowireMessageInfo
EnumValues List<BowireEnumValue>

Properties

Description

Human-readable description from the source schema. Optional.

public string? Description { get; init; }

Property Value

string

EnumValues

public List<BowireEnumValue>? EnumValues { get; init; }

Property Value

List<BowireEnumValue>

Example

Example value from the source schema, used to pre-fill the form. Stored as JSON-serializable string.

public string? Example { get; init; }

Property Value

string

IsBinary

True for REST multipart/form-data fields whose schema declares format: binary (file upload). The frontend renders a file picker instead of a text input, the form value travels as base64 in the JSON envelope, and RestInvoker decodes it back into a StreamContent on the multipart wire.

public bool IsBinary { get; init; }

Property Value

bool

IsMap

public bool IsMap { get; init; }

Property Value

bool

IsRepeated

public bool IsRepeated { get; init; }

Property Value

bool

Label

public string Label { get; init; }

Property Value

string

MessageType

public BowireMessageInfo? MessageType { get; init; }

Property Value

BowireMessageInfo

Name

public string Name { get; init; }

Property Value

string

Number

public int Number { get; init; }

Property Value

int

Required

True if the source schema marks this field as required.

public bool Required { get; init; }

Property Value

bool

Source

Where this field travels in a REST request: "path", "query", "header", or "body". Null for non-REST protocols.

public string? Source { get; init; }

Property Value

string

Type

public string Type { get; init; }

Property Value

string

Methods

Deconstruct(out string, out int, out string, out string, out bool, out bool, out BowireMessageInfo?, out List<BowireEnumValue>?)

public void Deconstruct(out string Name, out int Number, out string Type, out string Label, out bool IsMap, out bool IsRepeated, out BowireMessageInfo? MessageType, out List<BowireEnumValue>? EnumValues)

Parameters

Name string
Number int
Type string
Label string
IsMap bool
IsRepeated bool
MessageType BowireMessageInfo
EnumValues List<BowireEnumValue>

Equals(BowireFieldInfo?)

public bool Equals(BowireFieldInfo? other)

Parameters

other BowireFieldInfo

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 ==(BowireFieldInfo?, BowireFieldInfo?)

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

Parameters

left BowireFieldInfo
right BowireFieldInfo

Returns

bool

operator !=(BowireFieldInfo?, BowireFieldInfo?)

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

Parameters

left BowireFieldInfo
right BowireFieldInfo

Returns

bool