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

THPreSelectedOptionEntity $THPreSelectedOptionEntityFromJson(Map<String, dynamic> json) {
  final THPreSelectedOptionEntity tHPreSelectedOptionEntity = THPreSelectedOptionEntity();
  final String? jobId = jsonConvert.convert<String>(json['job_id']);
  if (jobId != null) {
    tHPreSelectedOptionEntity.jobId = jobId;
  }
  final String? requestId = jsonConvert.convert<String>(json['request_id']);
  if (requestId != null) {
    tHPreSelectedOptionEntity.requestId = requestId;
  }
  final String? jobTitle = jsonConvert.convert<String>(json['job_title']);
  if (jobTitle != null) {
    tHPreSelectedOptionEntity.jobTitle = jobTitle;
  }
  final String? jobDate = jsonConvert.convert<String>(json['job_date']);
  if (jobDate != null) {
    tHPreSelectedOptionEntity.jobDate = jobDate;
  }
  final String? action = jsonConvert.convert<String>(json['action']);
  if (action != null) {
    tHPreSelectedOptionEntity.action = action;
  }
  return tHPreSelectedOptionEntity;
}

Map<String, dynamic> $THPreSelectedOptionEntityToJson(THPreSelectedOptionEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['job_id'] = entity.jobId;
  data['request_id'] = entity.requestId;
  data['job_title'] = entity.jobTitle;
  data['job_date'] = entity.jobDate;
  data['action'] = entity.action;
  return data;
}

extension THPreSelectedOptionEntityExtension on THPreSelectedOptionEntity {
  THPreSelectedOptionEntity copyWith({
    String? jobId,
    String? requestId,
    String? jobTitle,
    String? jobDate,
    String? action,
  }) {
    return THPreSelectedOptionEntity()
      ..jobId = jobId ?? this.jobId
      ..requestId = requestId ?? this.requestId
      ..jobTitle = jobTitle ?? this.jobTitle
      ..jobDate = jobDate ?? this.jobDate
      ..action = action ?? this.action;
  }
}