// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'membership_level_model.dart';

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

MembershipLevelModel _$MembershipLevelModelFromJson(
  Map<String, dynamic> json,
) => MembershipLevelModel(
  id: json['id'] as String?,
  rank: json['membership_level_rank'] as String?,
  levelName: json['membership_level_name'] as String?,
  description: json['membership_level_description'] as String?,
  content: json['membership_level_content'] as String?,
  levelTextColor: json['level_text_color'] as String?,
  logo: json['logo'] as String?,
  levelStartAtDate: json['level_start_at_date'] as String?,
  levelEndAtDate: json['level_end_at_date'] as String?,
  refreshAfterMonths:
      json['refresh_level_after_months_from_start_date'] as String?,
  upgradePointThreshold:
      json['upgrade_when_counter_is_greater_or_equal'] as String?,
  upgradeGmvThreshold:
      json['upgrade_when_counter_gmv_is_greater_or_equal'] as String?,
  downgradePointThreshold:
      json['downgrade_level_when_counter_is_less_than'] as String?,
  condition: json['membership_level_term_and_condition'] as String?,
  upgradeToLevelId: json['upgrade_to_membership_level_id'] as String?,
  downgradeToLevelId: json['downgrade_to_membership_level_id'] as String?,
  conditions:
      (json['membership_level_term_and_conditions'] as List<dynamic>?)
          ?.map(
            (e) => MembershipLevelTermAndConditionModel.fromJson(
              e as Map<String, dynamic>,
            ),
          )
          .toList(),
  accumulatedCounter:
      json['accumulated_counter'] == null
          ? null
          : AccumulatedCounter.fromJson(
            json['accumulated_counter'] as Map<String, dynamic>,
          ),
  images:
      (json['images'] as List<dynamic>?)
          ?.map((e) => ImageModel.fromJson(e as Map<String, dynamic>))
          .toList(),
);

Map<String, dynamic> _$MembershipLevelModelToJson(
  MembershipLevelModel instance,
) => <String, dynamic>{
  'id': instance.id,
  'membership_level_rank': instance.rank,
  'membership_level_name': instance.levelName,
  'membership_level_description': instance.description,
  'membership_level_content': instance.content,
  'level_text_color': instance.levelTextColor,
  'logo': instance.logo,
  'level_start_at_date': instance.levelStartAtDate,
  'level_end_at_date': instance.levelEndAtDate,
  'refresh_level_after_months_from_start_date': instance.refreshAfterMonths,
  'upgrade_when_counter_is_greater_or_equal': instance.upgradePointThreshold,
  'upgrade_when_counter_gmv_is_greater_or_equal': instance.upgradeGmvThreshold,
  'downgrade_level_when_counter_is_less_than': instance.downgradePointThreshold,
  'upgrade_to_membership_level_id': instance.upgradeToLevelId,
  'membership_level_term_and_condition': instance.condition,
  'downgrade_to_membership_level_id': instance.downgradeToLevelId,
  'membership_level_term_and_conditions': instance.conditions,
  'accumulated_counter': instance.accumulatedCounter,
  'images': instance.images,
};
