CommandPayloadDefinition class abstract
- Available extensions
- Annotations
-
- @freezed
Constructors
-
CommandPayloadDefinition({required String parameter, String? description, @CommandPayloadDataTypeConverter() required CommandPayloadDataType dataType, bool? isRequired, num? minValue, num? maxValue, int? minLength, int? maxLength, List<
String> ? choices, @RegExpOrNullConverter() RegExp? regexPattern, List<CommandPayloadDefinition> ? nested, int? maxQuantity}) -
constfactory
-
CommandPayloadDefinition.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
choices
→ List<
String> ? -
choicesis the list of choices of the parameter. Only for CommandPayloadDataType.choiceno setterinherited -
copyWith
→ $CommandPayloadDefinitionCopyWith<
CommandPayloadDefinition> -
Create a copy of CommandPayloadDefinition
with the given fields replaced by the non-null parameter values.
no setterinherited
- dataType → CommandPayloadDataType
-
dataTypeis the data type of the parameter.no setterinherited - description → String?
-
descriptionis the fallback name of the parameter, when the translation is not available.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- isRequired → bool?
-
isRequiredis the parameter is required.no setterinherited - maxLength → int?
-
maxLengthis the maximum length of the parameter. Only for CommandPayloadDataType.stringno setterinherited - maxQuantity → int?
-
maxQuantityis the maximum quantity of the nested parameters.no setterinherited - maxValue → num?
-
maxValueis the maximum value of the parameter. Only for CommandPayloadDataType.integer and CommandPayloadDataType.floatno setterinherited - minLength → int?
-
minLengthis the minimum length of the parameter. Only for CommandPayloadDataType.stringno setterinherited - minValue → num?
-
minValueis the minimum value of the parameter. Only for CommandPayloadDataType.integer and CommandPayloadDataType.floatno setterinherited -
nested
→ List<
CommandPayloadDefinition> ? -
nestedis the nested object of the parameter. Only for CommandPayloadDataType.nestedno setterinherited - parameter → String
-
parameteris the name of the parameter, this is also the translation key.no setterinherited - regexPattern → RegExp?
-
regexPatternis the regex pattern of the parameter.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_CommandPayloadDefinition value)) → TResult -
Available on CommandPayloadDefinition, provided by the CommandPayloadDefinitionPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_CommandPayloadDefinition value)?) → TResult? -
Available on CommandPayloadDefinition, provided by the CommandPayloadDefinitionPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_CommandPayloadDefinition value)?, {required TResult orElse()}) → TResult -
Available on CommandPayloadDefinition, provided by the CommandPayloadDefinitionPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String parameter, String? description, CommandPayloadDataType dataType, bool? isRequired, num? minValue, num? maxValue, int? minLength, int? maxLength, List< String> ? choices, RegExp? regexPattern, List<CommandPayloadDefinition> ? nested, int? maxQuantity)?, {required TResult orElse()}) → TResult -
Available on CommandPayloadDefinition, provided by the CommandPayloadDefinitionPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this CommandPayloadDefinition to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String parameter, String? description, CommandPayloadDataType dataType, bool? isRequired, num? minValue, num? maxValue, int? minLength, int? maxLength, List< String> ? choices, RegExp? regexPattern, List<CommandPayloadDefinition> ? nested, int? maxQuantity)) → TResult -
Available on CommandPayloadDefinition, provided by the CommandPayloadDefinitionPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String parameter, String? description, CommandPayloadDataType dataType, bool? isRequired, num? minValue, num? maxValue, int? minLength, int? maxLength, List< String> ? choices, RegExp? regexPattern, List<CommandPayloadDefinition> ? nested, int? maxQuantity)?) → TResult? -
Available on CommandPayloadDefinition, provided by the CommandPayloadDefinitionPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited