SearchRequestBean.fromJson constructor

SearchRequestBean.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory SearchRequestBean.fromJson(Map<String, Object?> json) {
  return SearchRequestBean(
    expand: (json[r'expand'] as List<Object?>?)
            ?.map((i) => i as String? ?? '')
            .toList() ??
        [],
    fields: (json[r'fields'] as List<Object?>?)
            ?.map((i) => i as String? ?? '')
            .toList() ??
        [],
    fieldsByKeys: json[r'fieldsByKeys'] as bool? ?? false,
    jql: json[r'jql'] as String?,
    maxResults: (json[r'maxResults'] as num?)?.toInt(),
    properties: (json[r'properties'] as List<Object?>?)
            ?.map((i) => i as String? ?? '')
            .toList() ??
        [],
    startAt: (json[r'startAt'] as num?)?.toInt(),
    validateQuery: json[r'validateQuery'] != null
        ? SearchRequestBeanValidateQuery.fromValue(
            json[r'validateQuery']! as String)
        : null,
  );
}