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

ContractPositionRateSpecificOptionEntity $ContractPositionRateSpecificOptionEntityFromJson(Map<String, dynamic> json) {
  final ContractPositionRateSpecificOptionEntity contractPositionRateSpecificOptionEntity = ContractPositionRateSpecificOptionEntity();
  final String? positionId = jsonConvert.convert<String>(json['position_id']);
  if (positionId != null) {
    contractPositionRateSpecificOptionEntity.positionId = positionId;
  }
  final String? agencyName = jsonConvert.convert<String>(json['agency_name']);
  if (agencyName != null) {
    contractPositionRateSpecificOptionEntity.agencyName = agencyName;
  }
  final String? position = jsonConvert.convert<String>(json['position']);
  if (position != null) {
    contractPositionRateSpecificOptionEntity.position = position;
  }
  final String? contractId = jsonConvert.convert<String>(json['contract_id']);
  if (contractId != null) {
    contractPositionRateSpecificOptionEntity.contractId = contractId;
  }
  return contractPositionRateSpecificOptionEntity;
}

Map<String, dynamic> $ContractPositionRateSpecificOptionEntityToJson(ContractPositionRateSpecificOptionEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['position_id'] = entity.positionId;
  data['agency_name'] = entity.agencyName;
  data['position'] = entity.position;
  data['contract_id'] = entity.contractId;
  return data;
}

extension ContractPositionRateSpecificOptionEntityExtension on ContractPositionRateSpecificOptionEntity {
  ContractPositionRateSpecificOptionEntity copyWith({
    String? positionId,
    String? agencyName,
    String? position,
    String? contractId,
  }) {
    return ContractPositionRateSpecificOptionEntity()
      ..positionId = positionId ?? this.positionId
      ..agencyName = agencyName ?? this.agencyName
      ..position = position ?? this.position
      ..contractId = contractId ?? this.contractId;
  }
}