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

IdAddressEntity $IdAddressEntityFromJson(Map<String, dynamic> json) {
  final IdAddressEntity idAddressEntity = IdAddressEntity();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    idAddressEntity.id = id;
  }
  final String? address = jsonConvert.convert<String>(json['address']);
  if (address != null) {
    idAddressEntity.address = address;
  }
  return idAddressEntity;
}

Map<String, dynamic> $IdAddressEntityToJson(IdAddressEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['address'] = entity.address;
  return data;
}

extension IdAddressEntityExtension on IdAddressEntity {
  IdAddressEntity copyWith({
    String? id,
    String? address,
  }) {
    return IdAddressEntity()
      ..id = id ?? this.id
      ..address = address ?? this.address;
  }
}