// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'user_dto.dart';

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

_$UserDtoImpl _$$UserDtoImplFromJson(Map<String, dynamic> json) =>
    _$UserDtoImpl(
      id: (json['id'] as num?)?.toInt(),
      name: json['name'] as String,
      phone: json['phone'] as String?,
      email: json['email'] as String?,
      companiesId: (json['companies_id'] as num).toInt(),
      company: json['company'] == null
          ? null
          : CompanyNameDto.fromJson(json['company'] as Map<String, dynamic>),
    );

Map<String, dynamic> _$$UserDtoImplToJson(_$UserDtoImpl instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'phone': instance.phone,
      'email': instance.email,
      'companies_id': instance.companiesId,
      'company': instance.company,
    };

_$UserRequestDtoImpl _$$UserRequestDtoImplFromJson(Map<String, dynamic> json) =>
    _$UserRequestDtoImpl(
      name: json['name'] as String,
      phone: json['phone'] as String?,
      email: json['email'] as String?,
      companiesId: (json['companies_id'] as num).toInt(),
    );

Map<String, dynamic> _$$UserRequestDtoImplToJson(
        _$UserRequestDtoImpl instance) =>
    <String, dynamic>{
      'name': instance.name,
      'phone': instance.phone,
      'email': instance.email,
      'companies_id': instance.companiesId,
    };

_$UserUpdateRequestDtoImpl _$$UserUpdateRequestDtoImplFromJson(
        Map<String, dynamic> json) =>
    _$UserUpdateRequestDtoImpl(
      name: json['name'] as String?,
      phone: json['phone'] as String?,
      email: json['email'] as String?,
      companiesId: (json['companies_id'] as num?)?.toInt(),
    );

Map<String, dynamic> _$$UserUpdateRequestDtoImplToJson(
        _$UserUpdateRequestDtoImpl instance) =>
    <String, dynamic>{
      'name': instance.name,
      'phone': instance.phone,
      'email': instance.email,
      'companies_id': instance.companiesId,
    };

_$UserListResponseImpl _$$UserListResponseImplFromJson(
        Map<String, dynamic> json) =>
    _$UserListResponseImpl(
      items: (json['data'] as List<dynamic>)
          .map((e) => UserDto.fromJson(e as Map<String, dynamic>))
          .toList(),
      totalCount: (json['total'] as num).toInt(),
      currentPage: (json['page'] as num).toInt(),
      totalPages: (json['total_pages'] as num).toInt(),
      pageSize: (json['page_size'] as num?)?.toInt(),
    );

Map<String, dynamic> _$$UserListResponseImplToJson(
        _$UserListResponseImpl instance) =>
    <String, dynamic>{
      'data': instance.items,
      'total': instance.totalCount,
      'page': instance.currentPage,
      'total_pages': instance.totalPages,
      'page_size': instance.pageSize,
    };

_$UserListDtoImpl _$$UserListDtoImplFromJson(Map<String, dynamic> json) =>
    _$UserListDtoImpl(
      users: (json['users'] as List<dynamic>)
          .map((e) => UserDto.fromJson(e as Map<String, dynamic>))
          .toList(),
      total: (json['total'] as num).toInt(),
      page: (json['page'] as num).toInt(),
      perPage: (json['per_page'] as num).toInt(),
      totalPages: (json['total_pages'] as num).toInt(),
    );

Map<String, dynamic> _$$UserListDtoImplToJson(_$UserListDtoImpl instance) =>
    <String, dynamic>{
      'users': instance.users,
      'total': instance.total,
      'page': instance.page,
      'per_page': instance.perPage,
      'total_pages': instance.totalPages,
    };

_$CheckUsernameResponseImpl _$$CheckUsernameResponseImplFromJson(
        Map<String, dynamic> json) =>
    _$CheckUsernameResponseImpl(
      available: json['available'] as bool,
      message: json['message'] as String?,
    );

Map<String, dynamic> _$$CheckUsernameResponseImplToJson(
        _$CheckUsernameResponseImpl instance) =>
    <String, dynamic>{
      'available': instance.available,
      'message': instance.message,
    };
