// 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 'product_dtos.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',
);

ListProductDto _$ListProductDtoFromJson(Map<String, dynamic> json) {
  return _ListProductDto.fromJson(json);
}

/// @nodoc
mixin _$ListProductDto {
  @JsonKey(name: "products")
  List<ProductDto> get products => throw _privateConstructorUsedError;
  @JsonKey(name: "total_count")
  int get totalCount => throw _privateConstructorUsedError;
  @JsonKey(name: "page")
  int get page => throw _privateConstructorUsedError;
  @JsonKey(name: "limit")
  int get limit => throw _privateConstructorUsedError;
  @JsonKey(name: "total_pages")
  int get totalPages => throw _privateConstructorUsedError;

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

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

/// @nodoc
abstract class $ListProductDtoCopyWith<$Res> {
  factory $ListProductDtoCopyWith(
    ListProductDto value,
    $Res Function(ListProductDto) then,
  ) = _$ListProductDtoCopyWithImpl<$Res, ListProductDto>;
  @useResult
  $Res call({
    @JsonKey(name: "products") List<ProductDto> products,
    @JsonKey(name: "total_count") int totalCount,
    @JsonKey(name: "page") int page,
    @JsonKey(name: "limit") int limit,
    @JsonKey(name: "total_pages") int totalPages,
  });
}

/// @nodoc
class _$ListProductDtoCopyWithImpl<$Res, $Val extends ListProductDto>
    implements $ListProductDtoCopyWith<$Res> {
  _$ListProductDtoCopyWithImpl(this._value, this._then);

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

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

/// @nodoc
abstract class _$$ListProductDtoImplCopyWith<$Res>
    implements $ListProductDtoCopyWith<$Res> {
  factory _$$ListProductDtoImplCopyWith(
    _$ListProductDtoImpl value,
    $Res Function(_$ListProductDtoImpl) then,
  ) = __$$ListProductDtoImplCopyWithImpl<$Res>;
  @override
  @useResult
  $Res call({
    @JsonKey(name: "products") List<ProductDto> products,
    @JsonKey(name: "total_count") int totalCount,
    @JsonKey(name: "page") int page,
    @JsonKey(name: "limit") int limit,
    @JsonKey(name: "total_pages") int totalPages,
  });
}

/// @nodoc
class __$$ListProductDtoImplCopyWithImpl<$Res>
    extends _$ListProductDtoCopyWithImpl<$Res, _$ListProductDtoImpl>
    implements _$$ListProductDtoImplCopyWith<$Res> {
  __$$ListProductDtoImplCopyWithImpl(
    _$ListProductDtoImpl _value,
    $Res Function(_$ListProductDtoImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of ListProductDto
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? products = null,
    Object? totalCount = null,
    Object? page = null,
    Object? limit = null,
    Object? totalPages = null,
  }) {
    return _then(
      _$ListProductDtoImpl(
        products: null == products
            ? _value._products
            : products // ignore: cast_nullable_to_non_nullable
                  as List<ProductDto>,
        totalCount: null == totalCount
            ? _value.totalCount
            : totalCount // ignore: cast_nullable_to_non_nullable
                  as int,
        page: null == page
            ? _value.page
            : page // ignore: cast_nullable_to_non_nullable
                  as int,
        limit: null == limit
            ? _value.limit
            : limit // ignore: cast_nullable_to_non_nullable
                  as int,
        totalPages: null == totalPages
            ? _value.totalPages
            : totalPages // ignore: cast_nullable_to_non_nullable
                  as int,
      ),
    );
  }
}

/// @nodoc
@JsonSerializable()
class _$ListProductDtoImpl extends _ListProductDto {
  const _$ListProductDtoImpl({
    @JsonKey(name: "products") required final List<ProductDto> products,
    @JsonKey(name: "total_count") required this.totalCount,
    @JsonKey(name: "page") required this.page,
    @JsonKey(name: "limit") required this.limit,
    @JsonKey(name: "total_pages") required this.totalPages,
  }) : _products = products,
       super._();

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

  final List<ProductDto> _products;
  @override
  @JsonKey(name: "products")
  List<ProductDto> get products {
    if (_products is EqualUnmodifiableListView) return _products;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableListView(_products);
  }

  @override
  @JsonKey(name: "total_count")
  final int totalCount;
  @override
  @JsonKey(name: "page")
  final int page;
  @override
  @JsonKey(name: "limit")
  final int limit;
  @override
  @JsonKey(name: "total_pages")
  final int totalPages;

  @override
  String toString() {
    return 'ListProductDto(products: $products, totalCount: $totalCount, page: $page, limit: $limit, totalPages: $totalPages)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$ListProductDtoImpl &&
            const DeepCollectionEquality().equals(other._products, _products) &&
            (identical(other.totalCount, totalCount) ||
                other.totalCount == totalCount) &&
            (identical(other.page, page) || other.page == page) &&
            (identical(other.limit, limit) || other.limit == limit) &&
            (identical(other.totalPages, totalPages) ||
                other.totalPages == totalPages));
  }

  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  int get hashCode => Object.hash(
    runtimeType,
    const DeepCollectionEquality().hash(_products),
    totalCount,
    page,
    limit,
    totalPages,
  );

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

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

abstract class _ListProductDto extends ListProductDto {
  const factory _ListProductDto({
    @JsonKey(name: "products") required final List<ProductDto> products,
    @JsonKey(name: "total_count") required final int totalCount,
    @JsonKey(name: "page") required final int page,
    @JsonKey(name: "limit") required final int limit,
    @JsonKey(name: "total_pages") required final int totalPages,
  }) = _$ListProductDtoImpl;
  const _ListProductDto._() : super._();

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

  @override
  @JsonKey(name: "products")
  List<ProductDto> get products;
  @override
  @JsonKey(name: "total_count")
  int get totalCount;
  @override
  @JsonKey(name: "page")
  int get page;
  @override
  @JsonKey(name: "limit")
  int get limit;
  @override
  @JsonKey(name: "total_pages")
  int get totalPages;

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

ProductDto _$ProductDtoFromJson(Map<String, dynamic> json) {
  return _ProductDto.fromJson(json);
}

/// @nodoc
mixin _$ProductDto {
  @JsonKey(name: "id")
  String? get id => throw _privateConstructorUsedError;
  @JsonKey(name: "organization_id")
  String? get organizationId => throw _privateConstructorUsedError;
  @JsonKey(name: "category_id")
  String? get categoryId => throw _privateConstructorUsedError;
  @JsonKey(name: "sku")
  String? get sku => throw _privateConstructorUsedError;
  @JsonKey(name: "name")
  String? get name => throw _privateConstructorUsedError;
  @JsonKey(name: "description")
  String? get description => throw _privateConstructorUsedError;
  @JsonKey(name: "price")
  double? get price => throw _privateConstructorUsedError;
  @JsonKey(name: "cost")
  double? get cost => throw _privateConstructorUsedError;
  @JsonKey(name: "business_type")
  String? get businessType => throw _privateConstructorUsedError;
  @JsonKey(name: "image_url")
  String? get imageUrl => throw _privateConstructorUsedError;
  @JsonKey(name: "printer_type")
  String? get printerType => throw _privateConstructorUsedError;
  @JsonKey(name: "print_to_checker")
  bool? get printToChecker => throw _privateConstructorUsedError;
  @JsonKey(name: "metadata")
  Map<String, dynamic>? get metadata => throw _privateConstructorUsedError;
  @JsonKey(name: "is_active")
  bool? get isActive => throw _privateConstructorUsedError;
  @JsonKey(name: "created_at")
  String? get createdAt => throw _privateConstructorUsedError;
  @JsonKey(name: "updated_at")
  String? get updatedAt => throw _privateConstructorUsedError;
  @JsonKey(name: "variants")
  List<ProductVariantDto>? get variants => throw _privateConstructorUsedError;

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

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

/// @nodoc
abstract class $ProductDtoCopyWith<$Res> {
  factory $ProductDtoCopyWith(
    ProductDto value,
    $Res Function(ProductDto) then,
  ) = _$ProductDtoCopyWithImpl<$Res, ProductDto>;
  @useResult
  $Res call({
    @JsonKey(name: "id") String? id,
    @JsonKey(name: "organization_id") String? organizationId,
    @JsonKey(name: "category_id") String? categoryId,
    @JsonKey(name: "sku") String? sku,
    @JsonKey(name: "name") String? name,
    @JsonKey(name: "description") String? description,
    @JsonKey(name: "price") double? price,
    @JsonKey(name: "cost") double? cost,
    @JsonKey(name: "business_type") String? businessType,
    @JsonKey(name: "image_url") String? imageUrl,
    @JsonKey(name: "printer_type") String? printerType,
    @JsonKey(name: "print_to_checker") bool? printToChecker,
    @JsonKey(name: "metadata") Map<String, dynamic>? metadata,
    @JsonKey(name: "is_active") bool? isActive,
    @JsonKey(name: "created_at") String? createdAt,
    @JsonKey(name: "updated_at") String? updatedAt,
    @JsonKey(name: "variants") List<ProductVariantDto>? variants,
  });
}

/// @nodoc
class _$ProductDtoCopyWithImpl<$Res, $Val extends ProductDto>
    implements $ProductDtoCopyWith<$Res> {
  _$ProductDtoCopyWithImpl(this._value, this._then);

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

  /// Create a copy of ProductDto
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? id = freezed,
    Object? organizationId = freezed,
    Object? categoryId = freezed,
    Object? sku = freezed,
    Object? name = freezed,
    Object? description = freezed,
    Object? price = freezed,
    Object? cost = freezed,
    Object? businessType = freezed,
    Object? imageUrl = freezed,
    Object? printerType = freezed,
    Object? printToChecker = freezed,
    Object? metadata = freezed,
    Object? isActive = freezed,
    Object? createdAt = freezed,
    Object? updatedAt = freezed,
    Object? variants = freezed,
  }) {
    return _then(
      _value.copyWith(
            id: freezed == id
                ? _value.id
                : id // ignore: cast_nullable_to_non_nullable
                      as String?,
            organizationId: freezed == organizationId
                ? _value.organizationId
                : organizationId // ignore: cast_nullable_to_non_nullable
                      as String?,
            categoryId: freezed == categoryId
                ? _value.categoryId
                : categoryId // ignore: cast_nullable_to_non_nullable
                      as String?,
            sku: freezed == sku
                ? _value.sku
                : sku // ignore: cast_nullable_to_non_nullable
                      as String?,
            name: freezed == name
                ? _value.name
                : name // ignore: cast_nullable_to_non_nullable
                      as String?,
            description: freezed == description
                ? _value.description
                : description // ignore: cast_nullable_to_non_nullable
                      as String?,
            price: freezed == price
                ? _value.price
                : price // ignore: cast_nullable_to_non_nullable
                      as double?,
            cost: freezed == cost
                ? _value.cost
                : cost // ignore: cast_nullable_to_non_nullable
                      as double?,
            businessType: freezed == businessType
                ? _value.businessType
                : businessType // ignore: cast_nullable_to_non_nullable
                      as String?,
            imageUrl: freezed == imageUrl
                ? _value.imageUrl
                : imageUrl // ignore: cast_nullable_to_non_nullable
                      as String?,
            printerType: freezed == printerType
                ? _value.printerType
                : printerType // ignore: cast_nullable_to_non_nullable
                      as String?,
            printToChecker: freezed == printToChecker
                ? _value.printToChecker
                : printToChecker // ignore: cast_nullable_to_non_nullable
                      as bool?,
            metadata: freezed == metadata
                ? _value.metadata
                : metadata // ignore: cast_nullable_to_non_nullable
                      as Map<String, dynamic>?,
            isActive: freezed == 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 String?,
            updatedAt: freezed == updatedAt
                ? _value.updatedAt
                : updatedAt // ignore: cast_nullable_to_non_nullable
                      as String?,
            variants: freezed == variants
                ? _value.variants
                : variants // ignore: cast_nullable_to_non_nullable
                      as List<ProductVariantDto>?,
          )
          as $Val,
    );
  }
}

/// @nodoc
abstract class _$$ProductDtoImplCopyWith<$Res>
    implements $ProductDtoCopyWith<$Res> {
  factory _$$ProductDtoImplCopyWith(
    _$ProductDtoImpl value,
    $Res Function(_$ProductDtoImpl) then,
  ) = __$$ProductDtoImplCopyWithImpl<$Res>;
  @override
  @useResult
  $Res call({
    @JsonKey(name: "id") String? id,
    @JsonKey(name: "organization_id") String? organizationId,
    @JsonKey(name: "category_id") String? categoryId,
    @JsonKey(name: "sku") String? sku,
    @JsonKey(name: "name") String? name,
    @JsonKey(name: "description") String? description,
    @JsonKey(name: "price") double? price,
    @JsonKey(name: "cost") double? cost,
    @JsonKey(name: "business_type") String? businessType,
    @JsonKey(name: "image_url") String? imageUrl,
    @JsonKey(name: "printer_type") String? printerType,
    @JsonKey(name: "print_to_checker") bool? printToChecker,
    @JsonKey(name: "metadata") Map<String, dynamic>? metadata,
    @JsonKey(name: "is_active") bool? isActive,
    @JsonKey(name: "created_at") String? createdAt,
    @JsonKey(name: "updated_at") String? updatedAt,
    @JsonKey(name: "variants") List<ProductVariantDto>? variants,
  });
}

/// @nodoc
class __$$ProductDtoImplCopyWithImpl<$Res>
    extends _$ProductDtoCopyWithImpl<$Res, _$ProductDtoImpl>
    implements _$$ProductDtoImplCopyWith<$Res> {
  __$$ProductDtoImplCopyWithImpl(
    _$ProductDtoImpl _value,
    $Res Function(_$ProductDtoImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of ProductDto
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? id = freezed,
    Object? organizationId = freezed,
    Object? categoryId = freezed,
    Object? sku = freezed,
    Object? name = freezed,
    Object? description = freezed,
    Object? price = freezed,
    Object? cost = freezed,
    Object? businessType = freezed,
    Object? imageUrl = freezed,
    Object? printerType = freezed,
    Object? printToChecker = freezed,
    Object? metadata = freezed,
    Object? isActive = freezed,
    Object? createdAt = freezed,
    Object? updatedAt = freezed,
    Object? variants = freezed,
  }) {
    return _then(
      _$ProductDtoImpl(
        id: freezed == id
            ? _value.id
            : id // ignore: cast_nullable_to_non_nullable
                  as String?,
        organizationId: freezed == organizationId
            ? _value.organizationId
            : organizationId // ignore: cast_nullable_to_non_nullable
                  as String?,
        categoryId: freezed == categoryId
            ? _value.categoryId
            : categoryId // ignore: cast_nullable_to_non_nullable
                  as String?,
        sku: freezed == sku
            ? _value.sku
            : sku // ignore: cast_nullable_to_non_nullable
                  as String?,
        name: freezed == name
            ? _value.name
            : name // ignore: cast_nullable_to_non_nullable
                  as String?,
        description: freezed == description
            ? _value.description
            : description // ignore: cast_nullable_to_non_nullable
                  as String?,
        price: freezed == price
            ? _value.price
            : price // ignore: cast_nullable_to_non_nullable
                  as double?,
        cost: freezed == cost
            ? _value.cost
            : cost // ignore: cast_nullable_to_non_nullable
                  as double?,
        businessType: freezed == businessType
            ? _value.businessType
            : businessType // ignore: cast_nullable_to_non_nullable
                  as String?,
        imageUrl: freezed == imageUrl
            ? _value.imageUrl
            : imageUrl // ignore: cast_nullable_to_non_nullable
                  as String?,
        printerType: freezed == printerType
            ? _value.printerType
            : printerType // ignore: cast_nullable_to_non_nullable
                  as String?,
        printToChecker: freezed == printToChecker
            ? _value.printToChecker
            : printToChecker // ignore: cast_nullable_to_non_nullable
                  as bool?,
        metadata: freezed == metadata
            ? _value._metadata
            : metadata // ignore: cast_nullable_to_non_nullable
                  as Map<String, dynamic>?,
        isActive: freezed == 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 String?,
        updatedAt: freezed == updatedAt
            ? _value.updatedAt
            : updatedAt // ignore: cast_nullable_to_non_nullable
                  as String?,
        variants: freezed == variants
            ? _value._variants
            : variants // ignore: cast_nullable_to_non_nullable
                  as List<ProductVariantDto>?,
      ),
    );
  }
}

/// @nodoc
@JsonSerializable()
class _$ProductDtoImpl extends _ProductDto {
  const _$ProductDtoImpl({
    @JsonKey(name: "id") this.id,
    @JsonKey(name: "organization_id") this.organizationId,
    @JsonKey(name: "category_id") this.categoryId,
    @JsonKey(name: "sku") this.sku,
    @JsonKey(name: "name") this.name,
    @JsonKey(name: "description") this.description,
    @JsonKey(name: "price") this.price,
    @JsonKey(name: "cost") this.cost,
    @JsonKey(name: "business_type") this.businessType,
    @JsonKey(name: "image_url") this.imageUrl,
    @JsonKey(name: "printer_type") this.printerType,
    @JsonKey(name: "print_to_checker") this.printToChecker,
    @JsonKey(name: "metadata") final Map<String, dynamic>? metadata,
    @JsonKey(name: "is_active") this.isActive,
    @JsonKey(name: "created_at") this.createdAt,
    @JsonKey(name: "updated_at") this.updatedAt,
    @JsonKey(name: "variants") final List<ProductVariantDto>? variants,
  }) : _metadata = metadata,
       _variants = variants,
       super._();

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

  @override
  @JsonKey(name: "id")
  final String? id;
  @override
  @JsonKey(name: "organization_id")
  final String? organizationId;
  @override
  @JsonKey(name: "category_id")
  final String? categoryId;
  @override
  @JsonKey(name: "sku")
  final String? sku;
  @override
  @JsonKey(name: "name")
  final String? name;
  @override
  @JsonKey(name: "description")
  final String? description;
  @override
  @JsonKey(name: "price")
  final double? price;
  @override
  @JsonKey(name: "cost")
  final double? cost;
  @override
  @JsonKey(name: "business_type")
  final String? businessType;
  @override
  @JsonKey(name: "image_url")
  final String? imageUrl;
  @override
  @JsonKey(name: "printer_type")
  final String? printerType;
  @override
  @JsonKey(name: "print_to_checker")
  final bool? printToChecker;
  final Map<String, dynamic>? _metadata;
  @override
  @JsonKey(name: "metadata")
  Map<String, dynamic>? get metadata {
    final value = _metadata;
    if (value == null) return null;
    if (_metadata is EqualUnmodifiableMapView) return _metadata;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableMapView(value);
  }

  @override
  @JsonKey(name: "is_active")
  final bool? isActive;
  @override
  @JsonKey(name: "created_at")
  final String? createdAt;
  @override
  @JsonKey(name: "updated_at")
  final String? updatedAt;
  final List<ProductVariantDto>? _variants;
  @override
  @JsonKey(name: "variants")
  List<ProductVariantDto>? get variants {
    final value = _variants;
    if (value == null) return null;
    if (_variants is EqualUnmodifiableListView) return _variants;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableListView(value);
  }

  @override
  String toString() {
    return 'ProductDto(id: $id, organizationId: $organizationId, categoryId: $categoryId, sku: $sku, name: $name, description: $description, price: $price, cost: $cost, businessType: $businessType, imageUrl: $imageUrl, printerType: $printerType, printToChecker: $printToChecker, metadata: $metadata, isActive: $isActive, createdAt: $createdAt, updatedAt: $updatedAt, variants: $variants)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$ProductDtoImpl &&
            (identical(other.id, id) || other.id == id) &&
            (identical(other.organizationId, organizationId) ||
                other.organizationId == organizationId) &&
            (identical(other.categoryId, categoryId) ||
                other.categoryId == categoryId) &&
            (identical(other.sku, sku) || other.sku == sku) &&
            (identical(other.name, name) || other.name == name) &&
            (identical(other.description, description) ||
                other.description == description) &&
            (identical(other.price, price) || other.price == price) &&
            (identical(other.cost, cost) || other.cost == cost) &&
            (identical(other.businessType, businessType) ||
                other.businessType == businessType) &&
            (identical(other.imageUrl, imageUrl) ||
                other.imageUrl == imageUrl) &&
            (identical(other.printerType, printerType) ||
                other.printerType == printerType) &&
            (identical(other.printToChecker, printToChecker) ||
                other.printToChecker == printToChecker) &&
            const DeepCollectionEquality().equals(other._metadata, _metadata) &&
            (identical(other.isActive, isActive) ||
                other.isActive == isActive) &&
            (identical(other.createdAt, createdAt) ||
                other.createdAt == createdAt) &&
            (identical(other.updatedAt, updatedAt) ||
                other.updatedAt == updatedAt) &&
            const DeepCollectionEquality().equals(other._variants, _variants));
  }

  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  int get hashCode => Object.hash(
    runtimeType,
    id,
    organizationId,
    categoryId,
    sku,
    name,
    description,
    price,
    cost,
    businessType,
    imageUrl,
    printerType,
    printToChecker,
    const DeepCollectionEquality().hash(_metadata),
    isActive,
    createdAt,
    updatedAt,
    const DeepCollectionEquality().hash(_variants),
  );

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

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

abstract class _ProductDto extends ProductDto {
  const factory _ProductDto({
    @JsonKey(name: "id") final String? id,
    @JsonKey(name: "organization_id") final String? organizationId,
    @JsonKey(name: "category_id") final String? categoryId,
    @JsonKey(name: "sku") final String? sku,
    @JsonKey(name: "name") final String? name,
    @JsonKey(name: "description") final String? description,
    @JsonKey(name: "price") final double? price,
    @JsonKey(name: "cost") final double? cost,
    @JsonKey(name: "business_type") final String? businessType,
    @JsonKey(name: "image_url") final String? imageUrl,
    @JsonKey(name: "printer_type") final String? printerType,
    @JsonKey(name: "print_to_checker") final bool? printToChecker,
    @JsonKey(name: "metadata") final Map<String, dynamic>? metadata,
    @JsonKey(name: "is_active") final bool? isActive,
    @JsonKey(name: "created_at") final String? createdAt,
    @JsonKey(name: "updated_at") final String? updatedAt,
    @JsonKey(name: "variants") final List<ProductVariantDto>? variants,
  }) = _$ProductDtoImpl;
  const _ProductDto._() : super._();

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

  @override
  @JsonKey(name: "id")
  String? get id;
  @override
  @JsonKey(name: "organization_id")
  String? get organizationId;
  @override
  @JsonKey(name: "category_id")
  String? get categoryId;
  @override
  @JsonKey(name: "sku")
  String? get sku;
  @override
  @JsonKey(name: "name")
  String? get name;
  @override
  @JsonKey(name: "description")
  String? get description;
  @override
  @JsonKey(name: "price")
  double? get price;
  @override
  @JsonKey(name: "cost")
  double? get cost;
  @override
  @JsonKey(name: "business_type")
  String? get businessType;
  @override
  @JsonKey(name: "image_url")
  String? get imageUrl;
  @override
  @JsonKey(name: "printer_type")
  String? get printerType;
  @override
  @JsonKey(name: "print_to_checker")
  bool? get printToChecker;
  @override
  @JsonKey(name: "metadata")
  Map<String, dynamic>? get metadata;
  @override
  @JsonKey(name: "is_active")
  bool? get isActive;
  @override
  @JsonKey(name: "created_at")
  String? get createdAt;
  @override
  @JsonKey(name: "updated_at")
  String? get updatedAt;
  @override
  @JsonKey(name: "variants")
  List<ProductVariantDto>? get variants;

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

ProductVariantDto _$ProductVariantDtoFromJson(Map<String, dynamic> json) {
  return _ProductVariantDto.fromJson(json);
}

/// @nodoc
mixin _$ProductVariantDto {
  @JsonKey(name: "id")
  String? get id => throw _privateConstructorUsedError;
  @JsonKey(name: "product_id")
  String? get productId => throw _privateConstructorUsedError;
  @JsonKey(name: "name")
  String? get name => throw _privateConstructorUsedError;
  @JsonKey(name: "price_modifier")
  double? get priceModifier => throw _privateConstructorUsedError;
  @JsonKey(name: "cost")
  double? get cost => throw _privateConstructorUsedError;
  @JsonKey(name: "metadata")
  Map<String, dynamic>? get metadata => throw _privateConstructorUsedError;
  @JsonKey(name: "created_at")
  String? get createdAt => throw _privateConstructorUsedError;
  @JsonKey(name: "updated_at")
  String? get updatedAt => throw _privateConstructorUsedError;

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

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

/// @nodoc
abstract class $ProductVariantDtoCopyWith<$Res> {
  factory $ProductVariantDtoCopyWith(
    ProductVariantDto value,
    $Res Function(ProductVariantDto) then,
  ) = _$ProductVariantDtoCopyWithImpl<$Res, ProductVariantDto>;
  @useResult
  $Res call({
    @JsonKey(name: "id") String? id,
    @JsonKey(name: "product_id") String? productId,
    @JsonKey(name: "name") String? name,
    @JsonKey(name: "price_modifier") double? priceModifier,
    @JsonKey(name: "cost") double? cost,
    @JsonKey(name: "metadata") Map<String, dynamic>? metadata,
    @JsonKey(name: "created_at") String? createdAt,
    @JsonKey(name: "updated_at") String? updatedAt,
  });
}

/// @nodoc
class _$ProductVariantDtoCopyWithImpl<$Res, $Val extends ProductVariantDto>
    implements $ProductVariantDtoCopyWith<$Res> {
  _$ProductVariantDtoCopyWithImpl(this._value, this._then);

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

  /// Create a copy of ProductVariantDto
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? id = freezed,
    Object? productId = freezed,
    Object? name = freezed,
    Object? priceModifier = freezed,
    Object? cost = freezed,
    Object? metadata = freezed,
    Object? createdAt = freezed,
    Object? updatedAt = freezed,
  }) {
    return _then(
      _value.copyWith(
            id: freezed == id
                ? _value.id
                : id // ignore: cast_nullable_to_non_nullable
                      as String?,
            productId: freezed == productId
                ? _value.productId
                : productId // ignore: cast_nullable_to_non_nullable
                      as String?,
            name: freezed == name
                ? _value.name
                : name // ignore: cast_nullable_to_non_nullable
                      as String?,
            priceModifier: freezed == priceModifier
                ? _value.priceModifier
                : priceModifier // ignore: cast_nullable_to_non_nullable
                      as double?,
            cost: freezed == cost
                ? _value.cost
                : cost // ignore: cast_nullable_to_non_nullable
                      as double?,
            metadata: freezed == metadata
                ? _value.metadata
                : metadata // ignore: cast_nullable_to_non_nullable
                      as Map<String, dynamic>?,
            createdAt: freezed == createdAt
                ? _value.createdAt
                : createdAt // ignore: cast_nullable_to_non_nullable
                      as String?,
            updatedAt: freezed == updatedAt
                ? _value.updatedAt
                : updatedAt // ignore: cast_nullable_to_non_nullable
                      as String?,
          )
          as $Val,
    );
  }
}

/// @nodoc
abstract class _$$ProductVariantDtoImplCopyWith<$Res>
    implements $ProductVariantDtoCopyWith<$Res> {
  factory _$$ProductVariantDtoImplCopyWith(
    _$ProductVariantDtoImpl value,
    $Res Function(_$ProductVariantDtoImpl) then,
  ) = __$$ProductVariantDtoImplCopyWithImpl<$Res>;
  @override
  @useResult
  $Res call({
    @JsonKey(name: "id") String? id,
    @JsonKey(name: "product_id") String? productId,
    @JsonKey(name: "name") String? name,
    @JsonKey(name: "price_modifier") double? priceModifier,
    @JsonKey(name: "cost") double? cost,
    @JsonKey(name: "metadata") Map<String, dynamic>? metadata,
    @JsonKey(name: "created_at") String? createdAt,
    @JsonKey(name: "updated_at") String? updatedAt,
  });
}

/// @nodoc
class __$$ProductVariantDtoImplCopyWithImpl<$Res>
    extends _$ProductVariantDtoCopyWithImpl<$Res, _$ProductVariantDtoImpl>
    implements _$$ProductVariantDtoImplCopyWith<$Res> {
  __$$ProductVariantDtoImplCopyWithImpl(
    _$ProductVariantDtoImpl _value,
    $Res Function(_$ProductVariantDtoImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of ProductVariantDto
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? id = freezed,
    Object? productId = freezed,
    Object? name = freezed,
    Object? priceModifier = freezed,
    Object? cost = freezed,
    Object? metadata = freezed,
    Object? createdAt = freezed,
    Object? updatedAt = freezed,
  }) {
    return _then(
      _$ProductVariantDtoImpl(
        id: freezed == id
            ? _value.id
            : id // ignore: cast_nullable_to_non_nullable
                  as String?,
        productId: freezed == productId
            ? _value.productId
            : productId // ignore: cast_nullable_to_non_nullable
                  as String?,
        name: freezed == name
            ? _value.name
            : name // ignore: cast_nullable_to_non_nullable
                  as String?,
        priceModifier: freezed == priceModifier
            ? _value.priceModifier
            : priceModifier // ignore: cast_nullable_to_non_nullable
                  as double?,
        cost: freezed == cost
            ? _value.cost
            : cost // ignore: cast_nullable_to_non_nullable
                  as double?,
        metadata: freezed == metadata
            ? _value._metadata
            : metadata // ignore: cast_nullable_to_non_nullable
                  as Map<String, dynamic>?,
        createdAt: freezed == createdAt
            ? _value.createdAt
            : createdAt // ignore: cast_nullable_to_non_nullable
                  as String?,
        updatedAt: freezed == updatedAt
            ? _value.updatedAt
            : updatedAt // ignore: cast_nullable_to_non_nullable
                  as String?,
      ),
    );
  }
}

/// @nodoc
@JsonSerializable()
class _$ProductVariantDtoImpl extends _ProductVariantDto {
  const _$ProductVariantDtoImpl({
    @JsonKey(name: "id") this.id,
    @JsonKey(name: "product_id") this.productId,
    @JsonKey(name: "name") this.name,
    @JsonKey(name: "price_modifier") this.priceModifier,
    @JsonKey(name: "cost") this.cost,
    @JsonKey(name: "metadata") final Map<String, dynamic>? metadata,
    @JsonKey(name: "created_at") this.createdAt,
    @JsonKey(name: "updated_at") this.updatedAt,
  }) : _metadata = metadata,
       super._();

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

  @override
  @JsonKey(name: "id")
  final String? id;
  @override
  @JsonKey(name: "product_id")
  final String? productId;
  @override
  @JsonKey(name: "name")
  final String? name;
  @override
  @JsonKey(name: "price_modifier")
  final double? priceModifier;
  @override
  @JsonKey(name: "cost")
  final double? cost;
  final Map<String, dynamic>? _metadata;
  @override
  @JsonKey(name: "metadata")
  Map<String, dynamic>? get metadata {
    final value = _metadata;
    if (value == null) return null;
    if (_metadata is EqualUnmodifiableMapView) return _metadata;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableMapView(value);
  }

  @override
  @JsonKey(name: "created_at")
  final String? createdAt;
  @override
  @JsonKey(name: "updated_at")
  final String? updatedAt;

  @override
  String toString() {
    return 'ProductVariantDto(id: $id, productId: $productId, name: $name, priceModifier: $priceModifier, cost: $cost, metadata: $metadata, createdAt: $createdAt, updatedAt: $updatedAt)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$ProductVariantDtoImpl &&
            (identical(other.id, id) || other.id == id) &&
            (identical(other.productId, productId) ||
                other.productId == productId) &&
            (identical(other.name, name) || other.name == name) &&
            (identical(other.priceModifier, priceModifier) ||
                other.priceModifier == priceModifier) &&
            (identical(other.cost, cost) || other.cost == cost) &&
            const DeepCollectionEquality().equals(other._metadata, _metadata) &&
            (identical(other.createdAt, createdAt) ||
                other.createdAt == createdAt) &&
            (identical(other.updatedAt, updatedAt) ||
                other.updatedAt == updatedAt));
  }

  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  int get hashCode => Object.hash(
    runtimeType,
    id,
    productId,
    name,
    priceModifier,
    cost,
    const DeepCollectionEquality().hash(_metadata),
    createdAt,
    updatedAt,
  );

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

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

abstract class _ProductVariantDto extends ProductVariantDto {
  const factory _ProductVariantDto({
    @JsonKey(name: "id") final String? id,
    @JsonKey(name: "product_id") final String? productId,
    @JsonKey(name: "name") final String? name,
    @JsonKey(name: "price_modifier") final double? priceModifier,
    @JsonKey(name: "cost") final double? cost,
    @JsonKey(name: "metadata") final Map<String, dynamic>? metadata,
    @JsonKey(name: "created_at") final String? createdAt,
    @JsonKey(name: "updated_at") final String? updatedAt,
  }) = _$ProductVariantDtoImpl;
  const _ProductVariantDto._() : super._();

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

  @override
  @JsonKey(name: "id")
  String? get id;
  @override
  @JsonKey(name: "product_id")
  String? get productId;
  @override
  @JsonKey(name: "name")
  String? get name;
  @override
  @JsonKey(name: "price_modifier")
  double? get priceModifier;
  @override
  @JsonKey(name: "cost")
  double? get cost;
  @override
  @JsonKey(name: "metadata")
  Map<String, dynamic>? get metadata;
  @override
  @JsonKey(name: "created_at")
  String? get createdAt;
  @override
  @JsonKey(name: "updated_at")
  String? get updatedAt;

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