556 lines
18 KiB
Dart
556 lines
18 KiB
Dart
// 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_hierarchy.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');
|
|
|
|
/// @nodoc
|
|
mixin _$CompanyHierarchy {
|
|
String get id => throw _privateConstructorUsedError;
|
|
String get name => throw _privateConstructorUsedError;
|
|
String? get parentId => throw _privateConstructorUsedError;
|
|
String? get parentName => throw _privateConstructorUsedError;
|
|
List<CompanyHierarchy> get children => throw _privateConstructorUsedError;
|
|
int get level => throw _privateConstructorUsedError;
|
|
String get fullPath => throw _privateConstructorUsedError;
|
|
bool get isExpanded => throw _privateConstructorUsedError;
|
|
int get totalDescendants => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of CompanyHierarchy
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$CompanyHierarchyCopyWith<CompanyHierarchy> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $CompanyHierarchyCopyWith<$Res> {
|
|
factory $CompanyHierarchyCopyWith(
|
|
CompanyHierarchy value, $Res Function(CompanyHierarchy) then) =
|
|
_$CompanyHierarchyCopyWithImpl<$Res, CompanyHierarchy>;
|
|
@useResult
|
|
$Res call(
|
|
{String id,
|
|
String name,
|
|
String? parentId,
|
|
String? parentName,
|
|
List<CompanyHierarchy> children,
|
|
int level,
|
|
String fullPath,
|
|
bool isExpanded,
|
|
int totalDescendants});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$CompanyHierarchyCopyWithImpl<$Res, $Val extends CompanyHierarchy>
|
|
implements $CompanyHierarchyCopyWith<$Res> {
|
|
_$CompanyHierarchyCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of CompanyHierarchy
|
|
/// 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? parentId = freezed,
|
|
Object? parentName = freezed,
|
|
Object? children = null,
|
|
Object? level = null,
|
|
Object? fullPath = null,
|
|
Object? isExpanded = null,
|
|
Object? totalDescendants = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
name: null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
parentId: freezed == parentId
|
|
? _value.parentId
|
|
: parentId // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
parentName: freezed == parentName
|
|
? _value.parentName
|
|
: parentName // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
children: null == children
|
|
? _value.children
|
|
: children // ignore: cast_nullable_to_non_nullable
|
|
as List<CompanyHierarchy>,
|
|
level: null == level
|
|
? _value.level
|
|
: level // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
fullPath: null == fullPath
|
|
? _value.fullPath
|
|
: fullPath // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
isExpanded: null == isExpanded
|
|
? _value.isExpanded
|
|
: isExpanded // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
totalDescendants: null == totalDescendants
|
|
? _value.totalDescendants
|
|
: totalDescendants // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$CompanyHierarchyImplCopyWith<$Res>
|
|
implements $CompanyHierarchyCopyWith<$Res> {
|
|
factory _$$CompanyHierarchyImplCopyWith(_$CompanyHierarchyImpl value,
|
|
$Res Function(_$CompanyHierarchyImpl) then) =
|
|
__$$CompanyHierarchyImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{String id,
|
|
String name,
|
|
String? parentId,
|
|
String? parentName,
|
|
List<CompanyHierarchy> children,
|
|
int level,
|
|
String fullPath,
|
|
bool isExpanded,
|
|
int totalDescendants});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$CompanyHierarchyImplCopyWithImpl<$Res>
|
|
extends _$CompanyHierarchyCopyWithImpl<$Res, _$CompanyHierarchyImpl>
|
|
implements _$$CompanyHierarchyImplCopyWith<$Res> {
|
|
__$$CompanyHierarchyImplCopyWithImpl(_$CompanyHierarchyImpl _value,
|
|
$Res Function(_$CompanyHierarchyImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of CompanyHierarchy
|
|
/// 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? parentId = freezed,
|
|
Object? parentName = freezed,
|
|
Object? children = null,
|
|
Object? level = null,
|
|
Object? fullPath = null,
|
|
Object? isExpanded = null,
|
|
Object? totalDescendants = null,
|
|
}) {
|
|
return _then(_$CompanyHierarchyImpl(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
name: null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
parentId: freezed == parentId
|
|
? _value.parentId
|
|
: parentId // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
parentName: freezed == parentName
|
|
? _value.parentName
|
|
: parentName // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
children: null == children
|
|
? _value._children
|
|
: children // ignore: cast_nullable_to_non_nullable
|
|
as List<CompanyHierarchy>,
|
|
level: null == level
|
|
? _value.level
|
|
: level // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
fullPath: null == fullPath
|
|
? _value.fullPath
|
|
: fullPath // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
isExpanded: null == isExpanded
|
|
? _value.isExpanded
|
|
: isExpanded // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
totalDescendants: null == totalDescendants
|
|
? _value.totalDescendants
|
|
: totalDescendants // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$CompanyHierarchyImpl extends _CompanyHierarchy {
|
|
const _$CompanyHierarchyImpl(
|
|
{required this.id,
|
|
required this.name,
|
|
this.parentId,
|
|
this.parentName,
|
|
final List<CompanyHierarchy> children = const [],
|
|
this.level = 0,
|
|
this.fullPath = '',
|
|
this.isExpanded = false,
|
|
this.totalDescendants = 0})
|
|
: _children = children,
|
|
super._();
|
|
|
|
@override
|
|
final String id;
|
|
@override
|
|
final String name;
|
|
@override
|
|
final String? parentId;
|
|
@override
|
|
final String? parentName;
|
|
final List<CompanyHierarchy> _children;
|
|
@override
|
|
@JsonKey()
|
|
List<CompanyHierarchy> get children {
|
|
if (_children is EqualUnmodifiableListView) return _children;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_children);
|
|
}
|
|
|
|
@override
|
|
@JsonKey()
|
|
final int level;
|
|
@override
|
|
@JsonKey()
|
|
final String fullPath;
|
|
@override
|
|
@JsonKey()
|
|
final bool isExpanded;
|
|
@override
|
|
@JsonKey()
|
|
final int totalDescendants;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'CompanyHierarchy(id: $id, name: $name, parentId: $parentId, parentName: $parentName, children: $children, level: $level, fullPath: $fullPath, isExpanded: $isExpanded, totalDescendants: $totalDescendants)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$CompanyHierarchyImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.name, name) || other.name == name) &&
|
|
(identical(other.parentId, parentId) ||
|
|
other.parentId == parentId) &&
|
|
(identical(other.parentName, parentName) ||
|
|
other.parentName == parentName) &&
|
|
const DeepCollectionEquality().equals(other._children, _children) &&
|
|
(identical(other.level, level) || other.level == level) &&
|
|
(identical(other.fullPath, fullPath) ||
|
|
other.fullPath == fullPath) &&
|
|
(identical(other.isExpanded, isExpanded) ||
|
|
other.isExpanded == isExpanded) &&
|
|
(identical(other.totalDescendants, totalDescendants) ||
|
|
other.totalDescendants == totalDescendants));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
id,
|
|
name,
|
|
parentId,
|
|
parentName,
|
|
const DeepCollectionEquality().hash(_children),
|
|
level,
|
|
fullPath,
|
|
isExpanded,
|
|
totalDescendants);
|
|
|
|
/// Create a copy of CompanyHierarchy
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$CompanyHierarchyImplCopyWith<_$CompanyHierarchyImpl> get copyWith =>
|
|
__$$CompanyHierarchyImplCopyWithImpl<_$CompanyHierarchyImpl>(
|
|
this, _$identity);
|
|
}
|
|
|
|
abstract class _CompanyHierarchy extends CompanyHierarchy {
|
|
const factory _CompanyHierarchy(
|
|
{required final String id,
|
|
required final String name,
|
|
final String? parentId,
|
|
final String? parentName,
|
|
final List<CompanyHierarchy> children,
|
|
final int level,
|
|
final String fullPath,
|
|
final bool isExpanded,
|
|
final int totalDescendants}) = _$CompanyHierarchyImpl;
|
|
const _CompanyHierarchy._() : super._();
|
|
|
|
@override
|
|
String get id;
|
|
@override
|
|
String get name;
|
|
@override
|
|
String? get parentId;
|
|
@override
|
|
String? get parentName;
|
|
@override
|
|
List<CompanyHierarchy> get children;
|
|
@override
|
|
int get level;
|
|
@override
|
|
String get fullPath;
|
|
@override
|
|
bool get isExpanded;
|
|
@override
|
|
int get totalDescendants;
|
|
|
|
/// Create a copy of CompanyHierarchy
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$CompanyHierarchyImplCopyWith<_$CompanyHierarchyImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$HierarchyValidationResult {
|
|
bool get isValid => throw _privateConstructorUsedError;
|
|
String get message => throw _privateConstructorUsedError;
|
|
List<String> get errors => throw _privateConstructorUsedError;
|
|
List<String> get warnings => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of HierarchyValidationResult
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$HierarchyValidationResultCopyWith<HierarchyValidationResult> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $HierarchyValidationResultCopyWith<$Res> {
|
|
factory $HierarchyValidationResultCopyWith(HierarchyValidationResult value,
|
|
$Res Function(HierarchyValidationResult) then) =
|
|
_$HierarchyValidationResultCopyWithImpl<$Res, HierarchyValidationResult>;
|
|
@useResult
|
|
$Res call(
|
|
{bool isValid,
|
|
String message,
|
|
List<String> errors,
|
|
List<String> warnings});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$HierarchyValidationResultCopyWithImpl<$Res,
|
|
$Val extends HierarchyValidationResult>
|
|
implements $HierarchyValidationResultCopyWith<$Res> {
|
|
_$HierarchyValidationResultCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of HierarchyValidationResult
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? isValid = null,
|
|
Object? message = null,
|
|
Object? errors = null,
|
|
Object? warnings = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
isValid: null == isValid
|
|
? _value.isValid
|
|
: isValid // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
message: null == message
|
|
? _value.message
|
|
: message // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
errors: null == errors
|
|
? _value.errors
|
|
: errors // ignore: cast_nullable_to_non_nullable
|
|
as List<String>,
|
|
warnings: null == warnings
|
|
? _value.warnings
|
|
: warnings // ignore: cast_nullable_to_non_nullable
|
|
as List<String>,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$HierarchyValidationResultImplCopyWith<$Res>
|
|
implements $HierarchyValidationResultCopyWith<$Res> {
|
|
factory _$$HierarchyValidationResultImplCopyWith(
|
|
_$HierarchyValidationResultImpl value,
|
|
$Res Function(_$HierarchyValidationResultImpl) then) =
|
|
__$$HierarchyValidationResultImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{bool isValid,
|
|
String message,
|
|
List<String> errors,
|
|
List<String> warnings});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$HierarchyValidationResultImplCopyWithImpl<$Res>
|
|
extends _$HierarchyValidationResultCopyWithImpl<$Res,
|
|
_$HierarchyValidationResultImpl>
|
|
implements _$$HierarchyValidationResultImplCopyWith<$Res> {
|
|
__$$HierarchyValidationResultImplCopyWithImpl(
|
|
_$HierarchyValidationResultImpl _value,
|
|
$Res Function(_$HierarchyValidationResultImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of HierarchyValidationResult
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? isValid = null,
|
|
Object? message = null,
|
|
Object? errors = null,
|
|
Object? warnings = null,
|
|
}) {
|
|
return _then(_$HierarchyValidationResultImpl(
|
|
isValid: null == isValid
|
|
? _value.isValid
|
|
: isValid // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
message: null == message
|
|
? _value.message
|
|
: message // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
errors: null == errors
|
|
? _value._errors
|
|
: errors // ignore: cast_nullable_to_non_nullable
|
|
as List<String>,
|
|
warnings: null == warnings
|
|
? _value._warnings
|
|
: warnings // ignore: cast_nullable_to_non_nullable
|
|
as List<String>,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$HierarchyValidationResultImpl implements _HierarchyValidationResult {
|
|
const _$HierarchyValidationResultImpl(
|
|
{required this.isValid,
|
|
this.message = '',
|
|
final List<String> errors = const [],
|
|
final List<String> warnings = const []})
|
|
: _errors = errors,
|
|
_warnings = warnings;
|
|
|
|
@override
|
|
final bool isValid;
|
|
@override
|
|
@JsonKey()
|
|
final String message;
|
|
final List<String> _errors;
|
|
@override
|
|
@JsonKey()
|
|
List<String> get errors {
|
|
if (_errors is EqualUnmodifiableListView) return _errors;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_errors);
|
|
}
|
|
|
|
final List<String> _warnings;
|
|
@override
|
|
@JsonKey()
|
|
List<String> get warnings {
|
|
if (_warnings is EqualUnmodifiableListView) return _warnings;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_warnings);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'HierarchyValidationResult(isValid: $isValid, message: $message, errors: $errors, warnings: $warnings)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$HierarchyValidationResultImpl &&
|
|
(identical(other.isValid, isValid) || other.isValid == isValid) &&
|
|
(identical(other.message, message) || other.message == message) &&
|
|
const DeepCollectionEquality().equals(other._errors, _errors) &&
|
|
const DeepCollectionEquality().equals(other._warnings, _warnings));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
isValid,
|
|
message,
|
|
const DeepCollectionEquality().hash(_errors),
|
|
const DeepCollectionEquality().hash(_warnings));
|
|
|
|
/// Create a copy of HierarchyValidationResult
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$HierarchyValidationResultImplCopyWith<_$HierarchyValidationResultImpl>
|
|
get copyWith => __$$HierarchyValidationResultImplCopyWithImpl<
|
|
_$HierarchyValidationResultImpl>(this, _$identity);
|
|
}
|
|
|
|
abstract class _HierarchyValidationResult implements HierarchyValidationResult {
|
|
const factory _HierarchyValidationResult(
|
|
{required final bool isValid,
|
|
final String message,
|
|
final List<String> errors,
|
|
final List<String> warnings}) = _$HierarchyValidationResultImpl;
|
|
|
|
@override
|
|
bool get isValid;
|
|
@override
|
|
String get message;
|
|
@override
|
|
List<String> get errors;
|
|
@override
|
|
List<String> get warnings;
|
|
|
|
/// Create a copy of HierarchyValidationResult
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$HierarchyValidationResultImplCopyWith<_$HierarchyValidationResultImpl>
|
|
get copyWith => throw _privateConstructorUsedError;
|
|
}
|