FacetAttributeDefinition.fromJson constructor

FacetAttributeDefinition.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory FacetAttributeDefinition.fromJson(Map<String, dynamic> json) {
  return FacetAttributeDefinition(
    type: (json['Type'] as String).toFacetAttributeType(),
    defaultValue: json['DefaultValue'] != null
        ? TypedAttributeValue.fromJson(
            json['DefaultValue'] as Map<String, dynamic>)
        : null,
    isImmutable: json['IsImmutable'] as bool?,
    rules: (json['Rules'] as Map<String, dynamic>?)?.map(
        (k, e) => MapEntry(k, Rule.fromJson(e as Map<String, dynamic>))),
  );
}