// 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: 'company_types')
  List<String>? get companyTypes => throw _privateConstructorUsedError;
  @JsonKey(name: 'is_active')
  bool get isActive => throw _privateConstructorUsedError;
  @JsonKey(name: 'is_partner')
  bool get isPartner => throw _privateConstructorUsedError;
  @JsonKey(name: 'is_customer')
  bool get isCustomer => throw _privateConstructorUsedError;
  @JsonKey(name: 'parent_company_id')
  int? get parentCompanyId => throw _privateConstructorUsedError;
  @JsonKey(name: 'registered_at')
  DateTime? get registeredAt => throw _privateConstructorUsedError;
  @JsonKey(name: 'child_count')
  int get childCount => 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: 'company_types') List<String>? companyTypes,
      @JsonKey(name: 'is_active') bool isActive,
      @JsonKey(name: 'is_partner') bool isPartner,
      @JsonKey(name: 'is_customer') bool isCustomer,
      @JsonKey(name: 'parent_company_id') int? parentCompanyId,
      @JsonKey(name: 'registered_at') DateTime? registeredAt,
      @JsonKey(name: 'child_count') int childCount});
}

/// @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 = freezed,
    Object? contactName = freezed,
    Object? contactPhone = freezed,
    Object? contactEmail = freezed,
    Object? companyTypes = freezed,
    Object? isActive = null,
    Object? isPartner = null,
    Object? isCustomer = null,
    Object? parentCompanyId = freezed,
    Object? registeredAt = freezed,
    Object? childCount = 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: freezed == 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?,
      companyTypes: freezed == companyTypes
          ? _value.companyTypes
          : companyTypes // ignore: cast_nullable_to_non_nullable
              as List<String>?,
      isActive: null == isActive
          ? _value.isActive
          : isActive // ignore: cast_nullable_to_non_nullable
              as bool,
      isPartner: null == isPartner
          ? _value.isPartner
          : isPartner // ignore: cast_nullable_to_non_nullable
              as bool,
      isCustomer: null == isCustomer
          ? _value.isCustomer
          : isCustomer // ignore: cast_nullable_to_non_nullable
              as bool,
      parentCompanyId: freezed == parentCompanyId
          ? _value.parentCompanyId
          : parentCompanyId // ignore: cast_nullable_to_non_nullable
              as int?,
      registeredAt: freezed == registeredAt
          ? _value.registeredAt
          : registeredAt // ignore: cast_nullable_to_non_nullable
              as DateTime?,
      childCount: null == childCount
          ? _value.childCount
          : childCount // 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: 'company_types') List<String>? companyTypes,
      @JsonKey(name: 'is_active') bool isActive,
      @JsonKey(name: 'is_partner') bool isPartner,
      @JsonKey(name: 'is_customer') bool isCustomer,
      @JsonKey(name: 'parent_company_id') int? parentCompanyId,
      @JsonKey(name: 'registered_at') DateTime? registeredAt,
      @JsonKey(name: 'child_count') int childCount});
}

/// @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 = freezed,
    Object? contactName = freezed,
    Object? contactPhone = freezed,
    Object? contactEmail = freezed,
    Object? companyTypes = freezed,
    Object? isActive = null,
    Object? isPartner = null,
    Object? isCustomer = null,
    Object? parentCompanyId = freezed,
    Object? registeredAt = freezed,
    Object? childCount = 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: freezed == 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?,
      companyTypes: freezed == companyTypes
          ? _value._companyTypes
          : companyTypes // ignore: cast_nullable_to_non_nullable
              as List<String>?,
      isActive: null == isActive
          ? _value.isActive
          : isActive // ignore: cast_nullable_to_non_nullable
              as bool,
      isPartner: null == isPartner
          ? _value.isPartner
          : isPartner // ignore: cast_nullable_to_non_nullable
              as bool,
      isCustomer: null == isCustomer
          ? _value.isCustomer
          : isCustomer // ignore: cast_nullable_to_non_nullable
              as bool,
      parentCompanyId: freezed == parentCompanyId
          ? _value.parentCompanyId
          : parentCompanyId // ignore: cast_nullable_to_non_nullable
              as int?,
      registeredAt: freezed == registeredAt
          ? _value.registeredAt
          : registeredAt // ignore: cast_nullable_to_non_nullable
              as DateTime?,
      childCount: null == childCount
          ? _value.childCount
          : childCount // ignore: cast_nullable_to_non_nullable
              as int,
    ));
  }
}

/// @nodoc
@JsonSerializable()
class _$CompanyListDtoImpl implements _CompanyListDto {
  const _$CompanyListDtoImpl(
      {required this.id,
      required this.name,
      this.address,
      @JsonKey(name: 'contact_name') this.contactName,
      @JsonKey(name: 'contact_phone') this.contactPhone,
      @JsonKey(name: 'contact_email') this.contactEmail,
      @JsonKey(name: 'company_types') final List<String>? companyTypes,
      @JsonKey(name: 'is_active') required this.isActive,
      @JsonKey(name: 'is_partner') this.isPartner = false,
      @JsonKey(name: 'is_customer') this.isCustomer = false,
      @JsonKey(name: 'parent_company_id') this.parentCompanyId,
      @JsonKey(name: 'registered_at') this.registeredAt,
      @JsonKey(name: 'child_count') this.childCount = 0})
      : _companyTypes = companyTypes;

  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;
  final List<String>? _companyTypes;
  @override
  @JsonKey(name: 'company_types')
  List<String>? get companyTypes {
    final value = _companyTypes;
    if (value == null) return null;
    if (_companyTypes is EqualUnmodifiableListView) return _companyTypes;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableListView(value);
  }

  @override
  @JsonKey(name: 'is_active')
  final bool isActive;
  @override
  @JsonKey(name: 'is_partner')
  final bool isPartner;
  @override
  @JsonKey(name: 'is_customer')
  final bool isCustomer;
  @override
  @JsonKey(name: 'parent_company_id')
  final int? parentCompanyId;
  @override
  @JsonKey(name: 'registered_at')
  final DateTime? registeredAt;
  @override
  @JsonKey(name: 'child_count')
  final int childCount;

  @override
  String toString() {
    return 'CompanyListDto(id: $id, name: $name, address: $address, contactName: $contactName, contactPhone: $contactPhone, contactEmail: $contactEmail, companyTypes: $companyTypes, isActive: $isActive, isPartner: $isPartner, isCustomer: $isCustomer, parentCompanyId: $parentCompanyId, registeredAt: $registeredAt, childCount: $childCount)';
  }

  @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) &&
            const DeepCollectionEquality()
                .equals(other._companyTypes, _companyTypes) &&
            (identical(other.isActive, isActive) ||
                other.isActive == isActive) &&
            (identical(other.isPartner, isPartner) ||
                other.isPartner == isPartner) &&
            (identical(other.isCustomer, isCustomer) ||
                other.isCustomer == isCustomer) &&
            (identical(other.parentCompanyId, parentCompanyId) ||
                other.parentCompanyId == parentCompanyId) &&
            (identical(other.registeredAt, registeredAt) ||
                other.registeredAt == registeredAt) &&
            (identical(other.childCount, childCount) ||
                other.childCount == childCount));
  }

  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  int get hashCode => Object.hash(
      runtimeType,
      id,
      name,
      address,
      contactName,
      contactPhone,
      contactEmail,
      const DeepCollectionEquality().hash(_companyTypes),
      isActive,
      isPartner,
      isCustomer,
      parentCompanyId,
      registeredAt,
      childCount);

  /// 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,
          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: 'company_types') final List<String>? companyTypes,
          @JsonKey(name: 'is_active') required final bool isActive,
          @JsonKey(name: 'is_partner') final bool isPartner,
          @JsonKey(name: 'is_customer') final bool isCustomer,
          @JsonKey(name: 'parent_company_id') final int? parentCompanyId,
          @JsonKey(name: 'registered_at') final DateTime? registeredAt,
          @JsonKey(name: 'child_count') final int childCount}) =
      _$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: 'company_types')
  List<String>? get companyTypes;
  @override
  @JsonKey(name: 'is_active')
  bool get isActive;
  @override
  @JsonKey(name: 'is_partner')
  bool get isPartner;
  @override
  @JsonKey(name: 'is_customer')
  bool get isCustomer;
  @override
  @JsonKey(name: 'parent_company_id')
  int? get parentCompanyId;
  @override
  @JsonKey(name: 'registered_at')
  DateTime? get registeredAt;
  @override
  @JsonKey(name: 'child_count')
  int get childCount;

  /// 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;
}

CompanyWithChildren _$CompanyWithChildrenFromJson(Map<String, dynamic> json) {
  return _CompanyWithChildren.fromJson(json);
}

/// @nodoc
mixin _$CompanyWithChildren {
  CompanyDto get company => throw _privateConstructorUsedError;
  List<CompanyDto> get children => throw _privateConstructorUsedError;

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

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

/// @nodoc
abstract class $CompanyWithChildrenCopyWith<$Res> {
  factory $CompanyWithChildrenCopyWith(
          CompanyWithChildren value, $Res Function(CompanyWithChildren) then) =
      _$CompanyWithChildrenCopyWithImpl<$Res, CompanyWithChildren>;
  @useResult
  $Res call({CompanyDto company, List<CompanyDto> children});

  $CompanyDtoCopyWith<$Res> get company;
}

/// @nodoc
class _$CompanyWithChildrenCopyWithImpl<$Res, $Val extends CompanyWithChildren>
    implements $CompanyWithChildrenCopyWith<$Res> {
  _$CompanyWithChildrenCopyWithImpl(this._value, this._then);

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

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

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

/// @nodoc
abstract class _$$CompanyWithChildrenImplCopyWith<$Res>
    implements $CompanyWithChildrenCopyWith<$Res> {
  factory _$$CompanyWithChildrenImplCopyWith(_$CompanyWithChildrenImpl value,
          $Res Function(_$CompanyWithChildrenImpl) then) =
      __$$CompanyWithChildrenImplCopyWithImpl<$Res>;
  @override
  @useResult
  $Res call({CompanyDto company, List<CompanyDto> children});

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

/// @nodoc
class __$$CompanyWithChildrenImplCopyWithImpl<$Res>
    extends _$CompanyWithChildrenCopyWithImpl<$Res, _$CompanyWithChildrenImpl>
    implements _$$CompanyWithChildrenImplCopyWith<$Res> {
  __$$CompanyWithChildrenImplCopyWithImpl(_$CompanyWithChildrenImpl _value,
      $Res Function(_$CompanyWithChildrenImpl) _then)
      : super(_value, _then);

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

/// @nodoc
@JsonSerializable()
class _$CompanyWithChildrenImpl implements _CompanyWithChildren {
  const _$CompanyWithChildrenImpl(
      {required this.company, final List<CompanyDto> children = const []})
      : _children = children;

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

  @override
  final CompanyDto company;
  final List<CompanyDto> _children;
  @override
  @JsonKey()
  List<CompanyDto> get children {
    if (_children is EqualUnmodifiableListView) return _children;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableListView(_children);
  }

  @override
  String toString() {
    return 'CompanyWithChildren(company: $company, children: $children)';
  }

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

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

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

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

abstract class _CompanyWithChildren implements CompanyWithChildren {
  const factory _CompanyWithChildren(
      {required final CompanyDto company,
      final List<CompanyDto> children}) = _$CompanyWithChildrenImpl;

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

  @override
  CompanyDto get company;
  @override
  List<CompanyDto> get children;

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