// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark

part of 'company_list_dto.dart';

// **************************************************************************
// FreezedGenerator
// **************************************************************************

T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
    'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');

CompanyListDto _$CompanyListDtoFromJson(Map<String, dynamic> json) {
  return _CompanyListDto.fromJson(json);
}

/// @nodoc
mixin _$CompanyListDto {
  int get id => throw _privateConstructorUsedError;
  String get name => throw _privateConstructorUsedError;
  String get address => throw _privateConstructorUsedError;
  @JsonKey(name: 'contact_name')
  String? get contactName => throw _privateConstructorUsedError;
  @JsonKey(name: 'contact_phone')
  String? get contactPhone => throw _privateConstructorUsedError;
  @JsonKey(name: 'contact_email')
  String? get contactEmail => throw _privateConstructorUsedError;
  @JsonKey(name: 'is_active')
  bool get isActive => throw _privateConstructorUsedError;
  @JsonKey(name: 'created_at')
  DateTime? get createdAt => throw _privateConstructorUsedError;
  @JsonKey(name: 'branch_count')
  int get branchCount => throw _privateConstructorUsedError;

  /// Serializes this CompanyListDto to a JSON map.
  Map<String, dynamic> toJson() => throw _privateConstructorUsedError;

  /// Create a copy of CompanyListDto
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  $CompanyListDtoCopyWith<CompanyListDto> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $CompanyListDtoCopyWith<$Res> {
  factory $CompanyListDtoCopyWith(
          CompanyListDto value, $Res Function(CompanyListDto) then) =
      _$CompanyListDtoCopyWithImpl<$Res, CompanyListDto>;
  @useResult
  $Res call(
      {int id,
      String name,
      String address,
      @JsonKey(name: 'contact_name') String? contactName,
      @JsonKey(name: 'contact_phone') String? contactPhone,
      @JsonKey(name: 'contact_email') String? contactEmail,
      @JsonKey(name: 'is_active') bool isActive,
      @JsonKey(name: 'created_at') DateTime? createdAt,
      @JsonKey(name: 'branch_count') int branchCount});
}

/// @nodoc
class _$CompanyListDtoCopyWithImpl<$Res, $Val extends CompanyListDto>
    implements $CompanyListDtoCopyWith<$Res> {
  _$CompanyListDtoCopyWithImpl(this._value, this._then);

  // ignore: unused_field
  final $Val _value;
  // ignore: unused_field
  final $Res Function($Val) _then;

  /// Create a copy of CompanyListDto
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? id = null,
    Object? name = null,
    Object? address = null,
    Object? contactName = freezed,
    Object? contactPhone = freezed,
    Object? contactEmail = freezed,
    Object? isActive = null,
    Object? createdAt = freezed,
    Object? branchCount = null,
  }) {
    return _then(_value.copyWith(
      id: null == id
          ? _value.id
          : id // ignore: cast_nullable_to_non_nullable
              as int,
      name: null == name
          ? _value.name
          : name // ignore: cast_nullable_to_non_nullable
              as String,
      address: null == address
          ? _value.address
          : address // ignore: cast_nullable_to_non_nullable
              as String,
      contactName: freezed == contactName
          ? _value.contactName
          : contactName // ignore: cast_nullable_to_non_nullable
              as String?,
      contactPhone: freezed == contactPhone
          ? _value.contactPhone
          : contactPhone // ignore: cast_nullable_to_non_nullable
              as String?,
      contactEmail: freezed == contactEmail
          ? _value.contactEmail
          : contactEmail // ignore: cast_nullable_to_non_nullable
              as String?,
      isActive: null == isActive
          ? _value.isActive
          : isActive // ignore: cast_nullable_to_non_nullable
              as bool,
      createdAt: freezed == createdAt
          ? _value.createdAt
          : createdAt // ignore: cast_nullable_to_non_nullable
              as DateTime?,
      branchCount: null == branchCount
          ? _value.branchCount
          : branchCount // ignore: cast_nullable_to_non_nullable
              as int,
    ) as $Val);
  }
}

/// @nodoc
abstract class _$$CompanyListDtoImplCopyWith<$Res>
    implements $CompanyListDtoCopyWith<$Res> {
  factory _$$CompanyListDtoImplCopyWith(_$CompanyListDtoImpl value,
          $Res Function(_$CompanyListDtoImpl) then) =
      __$$CompanyListDtoImplCopyWithImpl<$Res>;
  @override
  @useResult
  $Res call(
      {int id,
      String name,
      String address,
      @JsonKey(name: 'contact_name') String? contactName,
      @JsonKey(name: 'contact_phone') String? contactPhone,
      @JsonKey(name: 'contact_email') String? contactEmail,
      @JsonKey(name: 'is_active') bool isActive,
      @JsonKey(name: 'created_at') DateTime? createdAt,
      @JsonKey(name: 'branch_count') int branchCount});
}

/// @nodoc
class __$$CompanyListDtoImplCopyWithImpl<$Res>
    extends _$CompanyListDtoCopyWithImpl<$Res, _$CompanyListDtoImpl>
    implements _$$CompanyListDtoImplCopyWith<$Res> {
  __$$CompanyListDtoImplCopyWithImpl(
      _$CompanyListDtoImpl _value, $Res Function(_$CompanyListDtoImpl) _then)
      : super(_value, _then);

  /// Create a copy of CompanyListDto
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? id = null,
    Object? name = null,
    Object? address = null,
    Object? contactName = freezed,
    Object? contactPhone = freezed,
    Object? contactEmail = freezed,
    Object? isActive = null,
    Object? createdAt = freezed,
    Object? branchCount = null,
  }) {
    return _then(_$CompanyListDtoImpl(
      id: null == id
          ? _value.id
          : id // ignore: cast_nullable_to_non_nullable
              as int,
      name: null == name
          ? _value.name
          : name // ignore: cast_nullable_to_non_nullable
              as String,
      address: null == address
          ? _value.address
          : address // ignore: cast_nullable_to_non_nullable
              as String,
      contactName: freezed == contactName
          ? _value.contactName
          : contactName // ignore: cast_nullable_to_non_nullable
              as String?,
      contactPhone: freezed == contactPhone
          ? _value.contactPhone
          : contactPhone // ignore: cast_nullable_to_non_nullable
              as String?,
      contactEmail: freezed == contactEmail
          ? _value.contactEmail
          : contactEmail // ignore: cast_nullable_to_non_nullable
              as String?,
      isActive: null == isActive
          ? _value.isActive
          : isActive // ignore: cast_nullable_to_non_nullable
              as bool,
      createdAt: freezed == createdAt
          ? _value.createdAt
          : createdAt // ignore: cast_nullable_to_non_nullable
              as DateTime?,
      branchCount: null == branchCount
          ? _value.branchCount
          : branchCount // ignore: cast_nullable_to_non_nullable
              as int,
    ));
  }
}

/// @nodoc
@JsonSerializable()
class _$CompanyListDtoImpl implements _CompanyListDto {
  const _$CompanyListDtoImpl(
      {required this.id,
      required this.name,
      required this.address,
      @JsonKey(name: 'contact_name') this.contactName,
      @JsonKey(name: 'contact_phone') this.contactPhone,
      @JsonKey(name: 'contact_email') this.contactEmail,
      @JsonKey(name: 'is_active') required this.isActive,
      @JsonKey(name: 'created_at') this.createdAt,
      @JsonKey(name: 'branch_count') this.branchCount = 0});

  factory _$CompanyListDtoImpl.fromJson(Map<String, dynamic> json) =>
      _$$CompanyListDtoImplFromJson(json);

  @override
  final int id;
  @override
  final String name;
  @override
  final String address;
  @override
  @JsonKey(name: 'contact_name')
  final String? contactName;
  @override
  @JsonKey(name: 'contact_phone')
  final String? contactPhone;
  @override
  @JsonKey(name: 'contact_email')
  final String? contactEmail;
  @override
  @JsonKey(name: 'is_active')
  final bool isActive;
  @override
  @JsonKey(name: 'created_at')
  final DateTime? createdAt;
  @override
  @JsonKey(name: 'branch_count')
  final int branchCount;

  @override
  String toString() {
    return 'CompanyListDto(id: $id, name: $name, address: $address, contactName: $contactName, contactPhone: $contactPhone, contactEmail: $contactEmail, isActive: $isActive, createdAt: $createdAt, branchCount: $branchCount)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$CompanyListDtoImpl &&
            (identical(other.id, id) || other.id == id) &&
            (identical(other.name, name) || other.name == name) &&
            (identical(other.address, address) || other.address == address) &&
            (identical(other.contactName, contactName) ||
                other.contactName == contactName) &&
            (identical(other.contactPhone, contactPhone) ||
                other.contactPhone == contactPhone) &&
            (identical(other.contactEmail, contactEmail) ||
                other.contactEmail == contactEmail) &&
            (identical(other.isActive, isActive) ||
                other.isActive == isActive) &&
            (identical(other.createdAt, createdAt) ||
                other.createdAt == createdAt) &&
            (identical(other.branchCount, branchCount) ||
                other.branchCount == branchCount));
  }

  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  int get hashCode => Object.hash(runtimeType, id, name, address, contactName,
      contactPhone, contactEmail, isActive, createdAt, branchCount);

  /// Create a copy of CompanyListDto
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$CompanyListDtoImplCopyWith<_$CompanyListDtoImpl> get copyWith =>
      __$$CompanyListDtoImplCopyWithImpl<_$CompanyListDtoImpl>(
          this, _$identity);

  @override
  Map<String, dynamic> toJson() {
    return _$$CompanyListDtoImplToJson(
      this,
    );
  }
}

abstract class _CompanyListDto implements CompanyListDto {
  const factory _CompanyListDto(
          {required final int id,
          required final String name,
          required final String address,
          @JsonKey(name: 'contact_name') final String? contactName,
          @JsonKey(name: 'contact_phone') final String? contactPhone,
          @JsonKey(name: 'contact_email') final String? contactEmail,
          @JsonKey(name: 'is_active') required final bool isActive,
          @JsonKey(name: 'created_at') final DateTime? createdAt,
          @JsonKey(name: 'branch_count') final int branchCount}) =
      _$CompanyListDtoImpl;

  factory _CompanyListDto.fromJson(Map<String, dynamic> json) =
      _$CompanyListDtoImpl.fromJson;

  @override
  int get id;
  @override
  String get name;
  @override
  String get address;
  @override
  @JsonKey(name: 'contact_name')
  String? get contactName;
  @override
  @JsonKey(name: 'contact_phone')
  String? get contactPhone;
  @override
  @JsonKey(name: 'contact_email')
  String? get contactEmail;
  @override
  @JsonKey(name: 'is_active')
  bool get isActive;
  @override
  @JsonKey(name: 'created_at')
  DateTime? get createdAt;
  @override
  @JsonKey(name: 'branch_count')
  int get branchCount;

  /// Create a copy of CompanyListDto
  /// with the given fields replaced by the non-null parameter values.
  @override
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$CompanyListDtoImplCopyWith<_$CompanyListDtoImpl> get copyWith =>
      throw _privateConstructorUsedError;
}

CompanyWithBranches _$CompanyWithBranchesFromJson(Map<String, dynamic> json) {
  return _CompanyWithBranches.fromJson(json);
}

/// @nodoc
mixin _$CompanyWithBranches {
  CompanyResponse get company => throw _privateConstructorUsedError;
  List<BranchListDto> get branches => throw _privateConstructorUsedError;

  /// Serializes this CompanyWithBranches to a JSON map.
  Map<String, dynamic> toJson() => throw _privateConstructorUsedError;

  /// Create a copy of CompanyWithBranches
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  $CompanyWithBranchesCopyWith<CompanyWithBranches> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $CompanyWithBranchesCopyWith<$Res> {
  factory $CompanyWithBranchesCopyWith(
          CompanyWithBranches value, $Res Function(CompanyWithBranches) then) =
      _$CompanyWithBranchesCopyWithImpl<$Res, CompanyWithBranches>;
  @useResult
  $Res call({CompanyResponse company, List<BranchListDto> branches});

  $CompanyResponseCopyWith<$Res> get company;
}

/// @nodoc
class _$CompanyWithBranchesCopyWithImpl<$Res, $Val extends CompanyWithBranches>
    implements $CompanyWithBranchesCopyWith<$Res> {
  _$CompanyWithBranchesCopyWithImpl(this._value, this._then);

  // ignore: unused_field
  final $Val _value;
  // ignore: unused_field
  final $Res Function($Val) _then;

  /// Create a copy of CompanyWithBranches
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? company = null,
    Object? branches = null,
  }) {
    return _then(_value.copyWith(
      company: null == company
          ? _value.company
          : company // ignore: cast_nullable_to_non_nullable
              as CompanyResponse,
      branches: null == branches
          ? _value.branches
          : branches // ignore: cast_nullable_to_non_nullable
              as List<BranchListDto>,
    ) as $Val);
  }

  /// Create a copy of CompanyWithBranches
  /// with the given fields replaced by the non-null parameter values.
  @override
  @pragma('vm:prefer-inline')
  $CompanyResponseCopyWith<$Res> get company {
    return $CompanyResponseCopyWith<$Res>(_value.company, (value) {
      return _then(_value.copyWith(company: value) as $Val);
    });
  }
}

/// @nodoc
abstract class _$$CompanyWithBranchesImplCopyWith<$Res>
    implements $CompanyWithBranchesCopyWith<$Res> {
  factory _$$CompanyWithBranchesImplCopyWith(_$CompanyWithBranchesImpl value,
          $Res Function(_$CompanyWithBranchesImpl) then) =
      __$$CompanyWithBranchesImplCopyWithImpl<$Res>;
  @override
  @useResult
  $Res call({CompanyResponse company, List<BranchListDto> branches});

  @override
  $CompanyResponseCopyWith<$Res> get company;
}

/// @nodoc
class __$$CompanyWithBranchesImplCopyWithImpl<$Res>
    extends _$CompanyWithBranchesCopyWithImpl<$Res, _$CompanyWithBranchesImpl>
    implements _$$CompanyWithBranchesImplCopyWith<$Res> {
  __$$CompanyWithBranchesImplCopyWithImpl(_$CompanyWithBranchesImpl _value,
      $Res Function(_$CompanyWithBranchesImpl) _then)
      : super(_value, _then);

  /// Create a copy of CompanyWithBranches
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? company = null,
    Object? branches = null,
  }) {
    return _then(_$CompanyWithBranchesImpl(
      company: null == company
          ? _value.company
          : company // ignore: cast_nullable_to_non_nullable
              as CompanyResponse,
      branches: null == branches
          ? _value._branches
          : branches // ignore: cast_nullable_to_non_nullable
              as List<BranchListDto>,
    ));
  }
}

/// @nodoc
@JsonSerializable()
class _$CompanyWithBranchesImpl implements _CompanyWithBranches {
  const _$CompanyWithBranchesImpl(
      {required this.company, final List<BranchListDto> branches = const []})
      : _branches = branches;

  factory _$CompanyWithBranchesImpl.fromJson(Map<String, dynamic> json) =>
      _$$CompanyWithBranchesImplFromJson(json);

  @override
  final CompanyResponse company;
  final List<BranchListDto> _branches;
  @override
  @JsonKey()
  List<BranchListDto> get branches {
    if (_branches is EqualUnmodifiableListView) return _branches;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableListView(_branches);
  }

  @override
  String toString() {
    return 'CompanyWithBranches(company: $company, branches: $branches)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$CompanyWithBranchesImpl &&
            (identical(other.company, company) || other.company == company) &&
            const DeepCollectionEquality().equals(other._branches, _branches));
  }

  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  int get hashCode => Object.hash(
      runtimeType, company, const DeepCollectionEquality().hash(_branches));

  /// Create a copy of CompanyWithBranches
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$CompanyWithBranchesImplCopyWith<_$CompanyWithBranchesImpl> get copyWith =>
      __$$CompanyWithBranchesImplCopyWithImpl<_$CompanyWithBranchesImpl>(
          this, _$identity);

  @override
  Map<String, dynamic> toJson() {
    return _$$CompanyWithBranchesImplToJson(
      this,
    );
  }
}

abstract class _CompanyWithBranches implements CompanyWithBranches {
  const factory _CompanyWithBranches(
      {required final CompanyResponse company,
      final List<BranchListDto> branches}) = _$CompanyWithBranchesImpl;

  factory _CompanyWithBranches.fromJson(Map<String, dynamic> json) =
      _$CompanyWithBranchesImpl.fromJson;

  @override
  CompanyResponse get company;
  @override
  List<BranchListDto> get branches;

  /// Create a copy of CompanyWithBranches
  /// with the given fields replaced by the non-null parameter values.
  @override
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$CompanyWithBranchesImplCopyWith<_$CompanyWithBranchesImpl> get copyWith =>
      throw _privateConstructorUsedError;
}
