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
NamestringNumberintTypestringLabelstringIsMapboolIsRepeatedboolMessageTypeBowireMessageInfoEnumValuesList<BowireEnumValue>
Properties
Description
Human-readable description from the source schema. Optional.
public string? Description { get; init; }
Property Value
EnumValues
public List<BowireEnumValue>? EnumValues { get; init; }
Property Value
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
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
IsMap
public bool IsMap { get; init; }
Property Value
IsRepeated
public bool IsRepeated { get; init; }
Property Value
Label
public string Label { get; init; }
Property Value
MessageType
public BowireMessageInfo? MessageType { get; init; }
Property Value
Name
public string Name { get; init; }
Property Value
Number
public int Number { get; init; }
Property Value
Required
True if the source schema marks this field as required.
public bool Required { get; init; }
Property Value
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
Type
public string Type { get; init; }
Property Value
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
NamestringNumberintTypestringLabelstringIsMapboolIsRepeatedboolMessageTypeBowireMessageInfoEnumValuesList<BowireEnumValue>
Equals(BowireFieldInfo?)
public bool Equals(BowireFieldInfo? other)
Parameters
otherBowireFieldInfo
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(BowireFieldInfo?, BowireFieldInfo?)
public static bool operator ==(BowireFieldInfo? left, BowireFieldInfo? right)
Parameters
leftBowireFieldInforightBowireFieldInfo
Returns
operator !=(BowireFieldInfo?, BowireFieldInfo?)
public static bool operator !=(BowireFieldInfo? left, BowireFieldInfo? right)
Parameters
leftBowireFieldInforightBowireFieldInfo