// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'livestock_model.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

_LivestockData _$LivestockDataFromJson(Map<String, dynamic> json) =>
    _LivestockData(
      rancher: json['rancher'] == null
          ? null
          : Rancher.fromJson(json['rancher'] as Map<String, dynamic>),
      herd: json['herd'] == null
          ? null
          : Herd.fromJson(json['herd'] as Map<String, dynamic>),
      livestock: (json['livestock'] as List<dynamic>?)
          ?.map((e) => Livestock.fromJson(e as Map<String, dynamic>))
          .toList(),
    );

Map<String, dynamic> _$LivestockDataToJson(_LivestockData instance) =>
    <String, dynamic>{
      'rancher': instance.rancher,
      'herd': instance.herd,
      'livestock': instance.livestock,
    };

_Rancher _$RancherFromJson(Map<String, dynamic> json) => _Rancher(
  name: json['name'] as String?,
  phone: json['phone'] as String?,
  image: json['image'] as String?,
);

Map<String, dynamic> _$RancherToJson(_Rancher instance) => <String, dynamic>{
  'name': instance.name,
  'phone': instance.phone,
  'image': instance.image,
};

_Herd _$HerdFromJson(Map<String, dynamic> json) => _Herd(
  location: json['location'] == null
      ? null
      : Location.fromJson(json['location'] as Map<String, dynamic>),
  address: json['address'] as String?,
  image: json['image'] as String?,
);

Map<String, dynamic> _$HerdToJson(_Herd instance) => <String, dynamic>{
  'location': instance.location,
  'address': instance.address,
  'image': instance.image,
};

_Location _$LocationFromJson(Map<String, dynamic> json) => _Location(
  lat: (json['lat'] as num?)?.toDouble(),
  lng: (json['lng'] as num?)?.toDouble(),
);

Map<String, dynamic> _$LocationToJson(_Location instance) => <String, dynamic>{
  'lat': instance.lat,
  'lng': instance.lng,
};

_Livestock _$LivestockFromJson(Map<String, dynamic> json) => _Livestock(
  species: json['species'] as String?,
  breed: json['breed'] as String?,
  dateOfBirth: json['date_of_birth'] as String?,
  sex: json['sex'] as String?,
  motherTag: json['mother_tag'] as String?,
  fatherTag: json['father_tag'] as String?,
  tagNumber: json['tag_number'] as String?,
  tagType: json['tag_type'] as String?,
  image: json['image'] as String?,
);

Map<String, dynamic> _$LivestockToJson(_Livestock instance) =>
    <String, dynamic>{
      'species': instance.species,
      'breed': instance.breed,
      'date_of_birth': instance.dateOfBirth,
      'sex': instance.sex,
      'mother_tag': instance.motherTag,
      'father_tag': instance.fatherTag,
      'tag_number': instance.tagNumber,
      'tag_type': instance.tagType,
      'image': instance.image,
    };
