mirrored_repositories/video-calling-app-flutter/lib/apis/models
// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'user_details.dart';

// **************************************************************************
// CopyWithGenerator
// **************************************************************************

abstract class _$UserDetailsCWProxy {
  UserDetails about(String? about);

  UserDetails accountStatus(String accountStatus);

  UserDetails avatar(UserAvatar? avatar);

  UserDetails createdAt(DateTime createdAt);

  UserDetails deviceId(String? deviceId);

  UserDetails dob(String? dob);

  UserDetails email(String email);

  UserDetails fname(String fname);

  UserDetails followersCount(int followersCount);

  UserDetails followingCount(int followingCount);

  UserDetails followingStatus(String followingStatus);

  UserDetails gender(String? gender);

  UserDetails id(String id);

  UserDetails isPrivate(bool isPrivate);

  UserDetails isValid(bool isValid);

  UserDetails isVerified(bool isVerified);

  UserDetails lname(String lname);

  UserDetails postsCount(int postsCount);

  UserDetails profession(String? profession);

  UserDetails role(String role);

  UserDetails uname(String uname);

  UserDetails updatedAt(DateTime updatedAt);

  UserDetails website(String? website);

  /// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `UserDetails(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
  ///
  /// Usage
  /// ```dart
  /// UserDetails(...).copyWith(id: 12, name: "My name")
  /// ````
  UserDetails call({
    String? about,
    String? accountStatus,
    UserAvatar? avatar,
    DateTime? createdAt,
    String? deviceId,
    String? dob,
    String? email,
    String? fname,
    int? followersCount,
    int? followingCount,
    String? followingStatus,
    String? gender,
    String? id,
    bool? isPrivate,
    bool? isValid,
    bool? isVerified,
    String? lname,
    int? postsCount,
    String? profession,
    String? role,
    String? uname,
    DateTime? updatedAt,
    String? website,
  });
}

/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfUserDetails.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfUserDetails.copyWith.fieldName(...)`
class _$UserDetailsCWProxyImpl implements _$UserDetailsCWProxy {
  final UserDetails _value;

  const _$UserDetailsCWProxyImpl(this._value);

  @override
  UserDetails about(String? about) => this(about: about);

  @override
  UserDetails accountStatus(String accountStatus) =>
      this(accountStatus: accountStatus);

  @override
  UserDetails avatar(UserAvatar? avatar) => this(avatar: avatar);

  @override
  UserDetails createdAt(DateTime createdAt) => this(createdAt: createdAt);

  @override
  UserDetails deviceId(String? deviceId) => this(deviceId: deviceId);

  @override
  UserDetails dob(String? dob) => this(dob: dob);

  @override
  UserDetails email(String email) => this(email: email);

  @override
  UserDetails fname(String fname) => this(fname: fname);

  @override
  UserDetails followersCount(int followersCount) =>
      this(followersCount: followersCount);

  @override
  UserDetails followingCount(int followingCount) =>
      this(followingCount: followingCount);

  @override
  UserDetails followingStatus(String followingStatus) =>
      this(followingStatus: followingStatus);

  @override
  UserDetails gender(String? gender) => this(gender: gender);

  @override
  UserDetails id(String id) => this(id: id);

  @override
  UserDetails isPrivate(bool isPrivate) => this(isPrivate: isPrivate);

  @override
  UserDetails isValid(bool isValid) => this(isValid: isValid);

  @override
  UserDetails isVerified(bool isVerified) => this(isVerified: isVerified);

  @override
  UserDetails lname(String lname) => this(lname: lname);

  @override
  UserDetails postsCount(int postsCount) => this(postsCount: postsCount);

  @override
  UserDetails profession(String? profession) => this(profession: profession);

  @override
  UserDetails role(String role) => this(role: role);

  @override
  UserDetails uname(String uname) => this(uname: uname);

  @override
  UserDetails updatedAt(DateTime updatedAt) => this(updatedAt: updatedAt);

  @override
  UserDetails website(String? website) => this(website: website);

  @override

  /// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `UserDetails(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
  ///
  /// Usage
  /// ```dart
  /// UserDetails(...).copyWith(id: 12, name: "My name")
  /// ````
  UserDetails call({
    Object? about = const $CopyWithPlaceholder(),
    Object? accountStatus = const $CopyWithPlaceholder(),
    Object? avatar = const $CopyWithPlaceholder(),
    Object? createdAt = const $CopyWithPlaceholder(),
    Object? deviceId = const $CopyWithPlaceholder(),
    Object? dob = const $CopyWithPlaceholder(),
    Object? email = const $CopyWithPlaceholder(),
    Object? fname = const $CopyWithPlaceholder(),
    Object? followersCount = const $CopyWithPlaceholder(),
    Object? followingCount = const $CopyWithPlaceholder(),
    Object? followingStatus = const $CopyWithPlaceholder(),
    Object? gender = const $CopyWithPlaceholder(),
    Object? id = const $CopyWithPlaceholder(),
    Object? isPrivate = const $CopyWithPlaceholder(),
    Object? isValid = const $CopyWithPlaceholder(),
    Object? isVerified = const $CopyWithPlaceholder(),
    Object? lname = const $CopyWithPlaceholder(),
    Object? postsCount = const $CopyWithPlaceholder(),
    Object? profession = const $CopyWithPlaceholder(),
    Object? role = const $CopyWithPlaceholder(),
    Object? uname = const $CopyWithPlaceholder(),
    Object? updatedAt = const $CopyWithPlaceholder(),
    Object? website = const $CopyWithPlaceholder(),
  }) {
    return UserDetails(
      about: about == const $CopyWithPlaceholder()
          ? _value.about
          // ignore: cast_nullable_to_non_nullable
          : about as String?,
      accountStatus:
          accountStatus == const $CopyWithPlaceholder() || accountStatus == null
              ? _value.accountStatus
              // ignore: cast_nullable_to_non_nullable
              : accountStatus as String,
      avatar: avatar == const $CopyWithPlaceholder()
          ? _value.avatar
          // ignore: cast_nullable_to_non_nullable
          : avatar as UserAvatar?,
      createdAt: createdAt == const $CopyWithPlaceholder() || createdAt == null
          ? _value.createdAt
          // ignore: cast_nullable_to_non_nullable
          : createdAt as DateTime,
      deviceId: deviceId == const $CopyWithPlaceholder()
          ? _value.deviceId
          // ignore: cast_nullable_to_non_nullable
          : deviceId as String?,
      dob: dob == const $CopyWithPlaceholder()
          ? _value.dob
          // ignore: cast_nullable_to_non_nullable
          : dob as String?,
      email: email == const $CopyWithPlaceholder() || email == null
          ? _value.email
          // ignore: cast_nullable_to_non_nullable
          : email as String,
      fname: fname == const $CopyWithPlaceholder() || fname == null
          ? _value.fname
          // ignore: cast_nullable_to_non_nullable
          : fname as String,
      followersCount: followersCount == const $CopyWithPlaceholder() ||
              followersCount == null
          ? _value.followersCount
          // ignore: cast_nullable_to_non_nullable
          : followersCount as int,
      followingCount: followingCount == const $CopyWithPlaceholder() ||
              followingCount == null
          ? _value.followingCount
          // ignore: cast_nullable_to_non_nullable
          : followingCount as int,
      followingStatus: followingStatus == const $CopyWithPlaceholder() ||
              followingStatus == null
          ? _value.followingStatus
          // ignore: cast_nullable_to_non_nullable
          : followingStatus as String,
      gender: gender == const $CopyWithPlaceholder()
          ? _value.gender
          // ignore: cast_nullable_to_non_nullable
          : gender as String?,
      id: id == const $CopyWithPlaceholder() || id == null
          ? _value.id
          // ignore: cast_nullable_to_non_nullable
          : id as String,
      isPrivate: isPrivate == const $CopyWithPlaceholder() || isPrivate == null
          ? _value.isPrivate
          // ignore: cast_nullable_to_non_nullable
          : isPrivate as bool,
      isValid: isValid == const $CopyWithPlaceholder() || isValid == null
          ? _value.isValid
          // ignore: cast_nullable_to_non_nullable
          : isValid as bool,
      isVerified:
          isVerified == const $CopyWithPlaceholder() || isVerified == null
              ? _value.isVerified
              // ignore: cast_nullable_to_non_nullable
              : isVerified as bool,
      lname: lname == const $CopyWithPlaceholder() || lname == null
          ? _value.lname
          // ignore: cast_nullable_to_non_nullable
          : lname as String,
      postsCount:
          postsCount == const $CopyWithPlaceholder() || postsCount == null
              ? _value.postsCount
              // ignore: cast_nullable_to_non_nullable
              : postsCount as int,
      profession: profession == const $CopyWithPlaceholder()
          ? _value.profession
          // ignore: cast_nullable_to_non_nullable
          : profession as String?,
      role: role == const $CopyWithPlaceholder() || role == null
          ? _value.role
          // ignore: cast_nullable_to_non_nullable
          : role as String,
      uname: uname == const $CopyWithPlaceholder() || uname == null
          ? _value.uname
          // ignore: cast_nullable_to_non_nullable
          : uname as String,
      updatedAt: updatedAt == const $CopyWithPlaceholder() || updatedAt == null
          ? _value.updatedAt
          // ignore: cast_nullable_to_non_nullable
          : updatedAt as DateTime,
      website: website == const $CopyWithPlaceholder()
          ? _value.website
          // ignore: cast_nullable_to_non_nullable
          : website as String?,
    );
  }
}

extension $UserDetailsCopyWith on UserDetails {
  /// Returns a callable class that can be used as follows: `instanceOfUserDetails.copyWith(...)` or like so:`instanceOfUserDetails.copyWith.fieldName(...)`.
  // ignore: library_private_types_in_public_api
  _$UserDetailsCWProxy get copyWith => _$UserDetailsCWProxyImpl(this);
}

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

UserDetails _$UserDetailsFromJson(Map<String, dynamic> json) => UserDetails(
      id: json['_id'] as String,
      fname: json['fname'] as String,
      lname: json['lname'] as String,
      email: json['email'] as String,
      uname: json['uname'] as String,
      avatar: json['avatar'] == null
          ? null
          : UserAvatar.fromJson(json['avatar'] as Map<String, dynamic>),
      gender: json['gender'] as String?,
      dob: json['dob'] as String?,
      about: json['about'] as String?,
      website: json['website'] as String?,
      profession: json['profession'] as String?,
      followersCount: json['followersCount'] as int,
      followingCount: json['followingCount'] as int,
      followingStatus: json['followingStatus'] as String,
      postsCount: json['postsCount'] as int,
      accountStatus: json['accountStatus'] as String,
      isPrivate: json['isPrivate'] as bool,
      isValid: json['isValid'] as bool,
      isVerified: json['isVerified'] as bool,
      role: json['role'] as String,
      deviceId: json['deviceId'] as String?,
      createdAt: DateTime.parse(json['createdAt'] as String),
      updatedAt: DateTime.parse(json['updatedAt'] as String),
    );

Map<String, dynamic> _$UserDetailsToJson(UserDetails instance) =>
    <String, dynamic>{
      '_id': instance.id,
      'fname': instance.fname,
      'lname': instance.lname,
      'email': instance.email,
      'uname': instance.uname,
      'avatar': instance.avatar,
      'gender': instance.gender,
      'dob': instance.dob,
      'about': instance.about,
      'profession': instance.profession,
      'website': instance.website,
      'postsCount': instance.postsCount,
      'followersCount': instance.followersCount,
      'followingCount': instance.followingCount,
      'followingStatus': instance.followingStatus,
      'accountStatus': instance.accountStatus,
      'isPrivate': instance.isPrivate,
      'isValid': instance.isValid,
      'isVerified': instance.isVerified,
      'role': instance.role,
      'deviceId': instance.deviceId,
      'createdAt': instance.createdAt.toIso8601String(),
      'updatedAt': instance.updatedAt.toIso8601String(),
    };
