StringPropertySchema class final
Schema for string properties in an elicitation form.
When enum or oneOf is set, this represents a single-select enum
with "type": "string".
- Implemented types
- Annotations
-
- @JsonSerializable.new(createFactory: false, createToJson: false)
Constructors
-
StringPropertySchema({String? title, String? description, int? minLength, int? maxLength, String? pattern, StringFormat? format, String? defaultValue, List<
String> ? enumValue, List<EnumOption> ? oneOf, AcpJsonObject? meta}) - Creates a StringPropertySchema value.
-
StringPropertySchema.fromJson(Map<
String, Object?> json) -
Decodes a JSON object, discarding recoverable issues.
factory
Properties
- defaultValue → String?
-
Default value.
final
- description → String?
-
Human-readable description.
final
-
enumValue
→ List<
String> ? -
Enum values for untitled single-select enums.
Must contain at least one value when present.
Optional. Omitted and
nullare equivalent and mean no untitled single-select choices are declared byenum.final - format → StringFormat?
-
String format.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxLength → int?
-
Maximum string length.
final
- meta → AcpJsonObject?
-
The _meta property is reserved by ACP to allow clients and agents to attach additional
metadata to their interactions. Implementations MUST NOT make assumptions about values at
these keys.
final
- minLength → int?
-
Minimum string length.
final
-
oneOf
→ List<
EnumOption> ? -
Titled enum options for titled single-select enums.
Must contain at least one option when present.
Optional. Omitted and
nullare equivalent and mean no titled single-select choices are declared byoneOf.final - pattern → String?
-
Pattern the string must match.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String?
-
Optional title for the property.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toAcpJson(
) → AcpJsonObject -
Converts this protocol value to its immutable JSON representation.
override
-
toJson(
) → Map< String, Object?> - Encodes this value to its wire object.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
decode(
Object? json) → AcpDecoded< StringPropertySchema> - Decodes this model and reports recoverable issues.