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

part of 'profile.dart';

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

abstract class _$ProfileCWProxy {
  Profile about(String? about);

  Profile accountStatus(String accountStatus);

  Profile avatar(UserAvatar? avatar);

  Profile countryCode(String? countryCode);

  Profile createdAt(DateTime createdAt);

  Profile dob(String? dob);

  Profile email(String email);

  Profile emailVerified(bool emailVerified);

  Profile fname(String fname);

  Profile followersCount(int followersCount);

  Profile followingCount(int followingCount);

  Profile gender(String? gender);

  Profile id(String id);

  Profile isPrivate(bool isPrivate);

  Profile isValid(bool isValid);

  Profile isVerified(bool isVerified);

  Profile lname(String lname);

  Profile location(String? location);

  Profile phone(String? phone);

  Profile phoneVerified(bool? phoneVerified);

  Profile postsCount(int postsCount);

  Profile profession(String? profession);

  Profile role(String role);

  Profile uname(String uname);

  Profile updatedAt(DateTime updatedAt);

  Profile verificationStatus(String verificationStatus);

  Profile 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 `Profile(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
  ///
  /// Usage
  /// ```dart
  /// Profile(...).copyWith(id: 12, name: "My name")
  /// ````
  Profile call({
    String? about,
    String? accountStatus,
    UserAvatar? avatar,
    String? countryCode,
    DateTime? createdAt,
    String? dob,
    String? email,
    bool? emailVerified,
    String? fname,
    int? followersCount,
    int? followingCount,
    String? gender,
    String? id,
    bool? isPrivate,
    bool? isValid,
    bool? isVerified,
    String? lname,
    String? location,
    String? phone,
    bool? phoneVerified,
    int? postsCount,
    String? profession,
    String? role,
    String? uname,
    DateTime? updatedAt,
    String? verificationStatus,
    String? website,
  });
}

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

  const _$ProfileCWProxyImpl(this._value);

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

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

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

  @override
  Profile countryCode(String? countryCode) => this(countryCode: countryCode);

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

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

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

  @override
  Profile emailVerified(bool emailVerified) =>
      this(emailVerified: emailVerified);

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

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

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

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

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

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

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

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

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

  @override
  Profile location(String? location) => this(location: location);

  @override
  Profile phone(String? phone) => this(phone: phone);

  @override
  Profile phoneVerified(bool? phoneVerified) =>
      this(phoneVerified: phoneVerified);

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

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

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

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

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

  @override
  Profile verificationStatus(String verificationStatus) =>
      this(verificationStatus: verificationStatus);

  @override
  Profile 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 `Profile(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
  ///
  /// Usage
  /// ```dart
  /// Profile(...).copyWith(id: 12, name: "My name")
  /// ````
  Profile call({
    Object? about = const $CopyWithPlaceholder(),
    Object? accountStatus = const $CopyWithPlaceholder(),
    Object? avatar = const $CopyWithPlaceholder(),
    Object? countryCode = const $CopyWithPlaceholder(),
    Object? createdAt = const $CopyWithPlaceholder(),
    Object? dob = const $CopyWithPlaceholder(),
    Object? email = const $CopyWithPlaceholder(),
    Object? emailVerified = const $CopyWithPlaceholder(),
    Object? fname = const $CopyWithPlaceholder(),
    Object? followersCount = const $CopyWithPlaceholder(),
    Object? followingCount = 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? location = const $CopyWithPlaceholder(),
    Object? phone = const $CopyWithPlaceholder(),
    Object? phoneVerified = const $CopyWithPlaceholder(),
    Object? postsCount = const $CopyWithPlaceholder(),
    Object? profession = const $CopyWithPlaceholder(),
    Object? role = const $CopyWithPlaceholder(),
    Object? uname = const $CopyWithPlaceholder(),
    Object? updatedAt = const $CopyWithPlaceholder(),
    Object? verificationStatus = const $CopyWithPlaceholder(),
    Object? website = const $CopyWithPlaceholder(),
  }) {
    return Profile(
      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?,
      countryCode: countryCode == const $CopyWithPlaceholder()
          ? _value.countryCode
          // ignore: cast_nullable_to_non_nullable
          : countryCode as String?,
      createdAt: createdAt == const $CopyWithPlaceholder() || createdAt == null
          ? _value.createdAt
          // ignore: cast_nullable_to_non_nullable
          : createdAt as DateTime,
      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,
      emailVerified:
          emailVerified == const $CopyWithPlaceholder() || emailVerified == null
              ? _value.emailVerified
              // ignore: cast_nullable_to_non_nullable
              : emailVerified as bool,
      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,
      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,
      location: location == const $CopyWithPlaceholder()
          ? _value.location
          // ignore: cast_nullable_to_non_nullable
          : location as String?,
      phone: phone == const $CopyWithPlaceholder()
          ? _value.phone
          // ignore: cast_nullable_to_non_nullable
          : phone as String?,
      phoneVerified: phoneVerified == const $CopyWithPlaceholder()
          ? _value.phoneVerified
          // ignore: cast_nullable_to_non_nullable
          : phoneVerified as bool?,
      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,
      verificationStatus: verificationStatus == const $CopyWithPlaceholder() ||
              verificationStatus == null
          ? _value.verificationStatus
          // ignore: cast_nullable_to_non_nullable
          : verificationStatus as String,
      website: website == const $CopyWithPlaceholder()
          ? _value.website
          // ignore: cast_nullable_to_non_nullable
          : website as String?,
    );
  }
}

extension $ProfileCopyWith on Profile {
  /// Returns a callable class that can be used as follows: `instanceOfProfile.copyWith(...)` or like so:`instanceOfProfile.copyWith.fieldName(...)`.
  // ignore: library_private_types_in_public_api
  _$ProfileCWProxy get copyWith => _$ProfileCWProxyImpl(this);
}

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

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

Map<String, dynamic> _$ProfileToJson(Profile instance) => <String, dynamic>{
      '_id': instance.id,
      'fname': instance.fname,
      'lname': instance.lname,
      'email': instance.email,
      'emailVerified': instance.emailVerified,
      'uname': instance.uname,
      'avatar': instance.avatar,
      'phone': instance.phone,
      'countryCode': instance.countryCode,
      'phoneVerified': instance.phoneVerified,
      'gender': instance.gender,
      'dob': instance.dob,
      'about': instance.about,
      'profession': instance.profession,
      'location': instance.location,
      'website': instance.website,
      'postsCount': instance.postsCount,
      'followersCount': instance.followersCount,
      'followingCount': instance.followingCount,
      'accountStatus': instance.accountStatus,
      'isPrivate': instance.isPrivate,
      'isValid': instance.isValid,
      'isVerified': instance.isVerified,
      'verificationStatus': instance.verificationStatus,
      'role': instance.role,
      'createdAt': instance.createdAt.toIso8601String(),
      'updatedAt': instance.updatedAt.toIso8601String(),
    };
