// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'product_mobile_card_model.dart';

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

ProductMobileCardModel _$ProductMobileCardModelFromJson(
  Map<String, dynamic> json,
) => ProductMobileCardModel(
  id: json['id'] as String?,
  productModelCode: json['product_model_code'] as String?,
  code: json['code'] as String?,
  name: json['name'] as String?,
  dataDurationApply: json['data_duration_apply'] as String?,
  productDescription: json['description'] as String?,
  startTime: json['start_time'] as String?,
  endTime: json['end_time'] as String?,
  limitQuantityPerTransaction:
      json['limit_quantity_per_transaction'] as String?,
  brandId: json['brand_id'] as String?,
  brandCode: json['brand_code'] as String?,
  brandName: json['brand_name'] as String?,
  pointReward: json['point_reward'] as String?,
  brandLogo: json['brand_logo'] as String?,
  images:
      (json['images'] as List<dynamic>?)
          ?.map((e) => MobileCardImageModel.fromJson(e as Map<String, dynamic>))
          .toList(),
  language:
      json['language'] == null
          ? null
          : MobileCardLanguageModel.fromJson(
            json['language'] as Map<String, dynamic>,
          ),
  prices:
      (json['prices'] as List<dynamic>?)
          ?.map((e) => MobileCardPriceModel.fromJson(e as Map<String, dynamic>))
          .toList(),
);

Map<String, dynamic> _$ProductMobileCardModelToJson(
  ProductMobileCardModel instance,
) => <String, dynamic>{
  'id': instance.id,
  'product_model_code': instance.productModelCode,
  'code': instance.code,
  'name': instance.name,
  'data_duration_apply': instance.dataDurationApply,
  'description': instance.productDescription,
  'start_time': instance.startTime,
  'end_time': instance.endTime,
  'limit_quantity_per_transaction': instance.limitQuantityPerTransaction,
  'brand_id': instance.brandId,
  'brand_code': instance.brandCode,
  'brand_name': instance.brandName,
  'point_reward': instance.pointReward,
  'brand_logo': instance.brandLogo,
  'images': instance.images?.map((e) => e.toJson()).toList(),
  'language': instance.language?.toJson(),
  'prices': instance.prices?.map((e) => e.toJson()).toList(),
};

ProductMobileCardResponse _$ProductMobileCardResponseFromJson(
  Map<String, dynamic> json,
) => ProductMobileCardResponse(
  products:
      (json['products'] as List<dynamic>?)
          ?.map(
            (e) => ProductMobileCardModel.fromJson(e as Map<String, dynamic>),
          )
          .toList(),
);

Map<String, dynamic> _$ProductMobileCardResponseToJson(
  ProductMobileCardResponse instance,
) => <String, dynamic>{'products': instance.products};

MobileCardImageModel _$MobileCardImageModelFromJson(
  Map<String, dynamic> json,
) => MobileCardImageModel(
  id: json['id'] as String?,
  caption: json['caption'] as String?,
  imageUrl: json['image_url'] as String?,
);

Map<String, dynamic> _$MobileCardImageModelToJson(
  MobileCardImageModel instance,
) => <String, dynamic>{
  'id': instance.id,
  'caption': instance.caption,
  'image_url': instance.imageUrl,
};

MobileCardLanguageModel _$MobileCardLanguageModelFromJson(
  Map<String, dynamic> json,
) => MobileCardLanguageModel(
  content: json['content'] as String?,
  termAndCondition: json['term_and_condition'] as String?,
  stockRemark: json['stock_remark'] as String?,
);

Map<String, dynamic> _$MobileCardLanguageModelToJson(
  MobileCardLanguageModel instance,
) => <String, dynamic>{
  'content': instance.content,
  'term_and_condition': instance.termAndCondition,
  'stock_remark': instance.stockRemark,
};

MobileCardPriceModel _$MobileCardPriceModelFromJson(
  Map<String, dynamic> json,
) => MobileCardPriceModel(
  channelCode: json['channel_code'] as String?,
  channelName: json['channel_name'] as String?,
  payPoint: json['pay_point'] as String?,
  originalPrice: json['original_price'] as String?,
  poolCode: json['pool_code'] as String?,
  subPoolCode: json['sub_pool_code'] as String?,
  currencyCode: json['currency_code'] as String?,
);

Map<String, dynamic> _$MobileCardPriceModelToJson(
  MobileCardPriceModel instance,
) => <String, dynamic>{
  'channel_code': instance.channelCode,
  'channel_name': instance.channelName,
  'pay_point': instance.payPoint,
  'original_price': instance.originalPrice,
  'pool_code': instance.poolCode,
  'sub_pool_code': instance.subPoolCode,
  'currency_code': instance.currencyCode,
};
