Map<String, dynamic> toJson() { final fieldName = this.fieldName; final sort = this.sort; return { if (fieldName != null) 'FieldName': fieldName, if (sort != null) 'Sort': sort.toValue(), }; }