import 'package:domain/generated/json/base/json_convert_content.dart';
import 'package:domain/entity/response/agency_option_entity.dart';
import 'package:domain/entity/response/index_option_entity.dart';


AgencyOptionEntity $AgencyOptionEntityFromJson(Map<String, dynamic> json) {
  final AgencyOptionEntity agencyOptionEntity = AgencyOptionEntity();
  final List<IndexOptionEntity>? statusList = (json['status_list'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<IndexOptionEntity>(e) as IndexOptionEntity).toList();
  if (statusList != null) {
    agencyOptionEntity.statusList = statusList;
  }
  return agencyOptionEntity;
}

Map<String, dynamic> $AgencyOptionEntityToJson(AgencyOptionEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['status_list'] = entity.statusList?.map((v) => v.toJson()).toList();
  return data;
}

extension AgencyOptionEntityExtension on AgencyOptionEntity {
  AgencyOptionEntity copyWith({
    List<IndexOptionEntity>? statusList,
  }) {
    return AgencyOptionEntity()
      ..statusList = statusList ?? this.statusList;
  }
}