import 'package:mohem_flutter_app/models/get_eit_dff_structure_list_model.dart';

class GetAbsenceDffStructureList {
  String? aLPHANUMERICALLOWEDFLAG;
  String? aPPLICATIONCOLUMNNAME;
  String? cHILDSEGMENTSDV;
  List<String>? cHILDSEGMENTSDVSplited;
  String? cHILDSEGMENTSVS;
  List<String>? cHILDSEGMENTSVSSplited;
  String? dEFAULTTYPE;
  String? dEFAULTVALUE;
  String? dESCFLEXCONTEXTCODE;
  String? dESCFLEXCONTEXTNAME;
  String? dESCFLEXNAME;
  String? dISPLAYFLAG;
  String? eNABLEDFLAG;
  ESERVICESDV? eSERVICESDV;
  List<ESERVICESVS>? eSERVICESVS;
  String? fLEXVALUESETNAME;
  String? fORMATTYPE;
  String? fORMATTYPEDSP;
  bool? isEmptyOption;
  String? lONGLISTFLAG;
  int? mAXIMUMSIZE;
  String? mAXIMUMVALUE;
  String? mINIMUMVALUE;
  String? mOBILEENABLED;
  String? nUMBERPRECISION;
  String? nUMERICMODEENABLEDFLAG;
  String? pARENTSEGMENTSDV;
  List<PARENTSEGMENTSDVSplited>? pARENTSEGMENTSDVSplited;
  String? pARENTSEGMENTSVS;
  List<PARENTSEGMENTSVSSplitedVS>? pARENTSEGMENTSVSSplitedVS;
  String? rEADONLY;
  String? rEQUIREDFLAG;
  String? sEGMENTNAME;
  String? sEGMENTPROMPT;
  int? sEGMENTSEQNUM;
  String? uPPERCASEONLYFLAG;
  String? uSEDFLAG;
  String? vALIDATIONTYPE;
  String? vALIDATIONTYPEDSP;

  GetAbsenceDffStructureList(
      {this.aLPHANUMERICALLOWEDFLAG,
      this.aPPLICATIONCOLUMNNAME,
      this.cHILDSEGMENTSDV,
      this.cHILDSEGMENTSDVSplited,
      this.cHILDSEGMENTSVS,
      this.cHILDSEGMENTSVSSplited,
      this.dEFAULTTYPE,
      this.dEFAULTVALUE,
      this.dESCFLEXCONTEXTCODE,
      this.dESCFLEXCONTEXTNAME,
      this.dESCFLEXNAME,
      this.dISPLAYFLAG,
      this.eNABLEDFLAG,
      this.eSERVICESDV,
      this.eSERVICESVS,
      this.fLEXVALUESETNAME,
      this.fORMATTYPE,
      this.fORMATTYPEDSP,
      this.isEmptyOption,
      this.lONGLISTFLAG,
      this.mAXIMUMSIZE,
      this.mAXIMUMVALUE,
      this.mINIMUMVALUE,
      this.mOBILEENABLED,
      this.nUMBERPRECISION,
      this.nUMERICMODEENABLEDFLAG,
      this.pARENTSEGMENTSDV,
      this.pARENTSEGMENTSDVSplited,
      this.pARENTSEGMENTSVS,
      this.pARENTSEGMENTSVSSplitedVS,
      this.rEADONLY,
      this.rEQUIREDFLAG,
      this.sEGMENTNAME,
      this.sEGMENTPROMPT,
      this.sEGMENTSEQNUM,
      this.uPPERCASEONLYFLAG,
      this.uSEDFLAG,
      this.vALIDATIONTYPE,
      this.vALIDATIONTYPEDSP});

  GetAbsenceDffStructureList.fromJson(Map<String, dynamic> json) {
    aLPHANUMERICALLOWEDFLAG = json['ALPHANUMERIC_ALLOWED_FLAG'];
    aPPLICATIONCOLUMNNAME = json['APPLICATION_COLUMN_NAME'];
    cHILDSEGMENTSDV = json['CHILD_SEGMENTS_DV'];
    cHILDSEGMENTSDVSplited = json['CHILD_SEGMENTS_DV_Splited'] == null ? <String>[] : json['CHILD_SEGMENTS_DV_Splited'].cast<String>();
    cHILDSEGMENTSVS = json['CHILD_SEGMENTS_VS'];
    cHILDSEGMENTSVSSplited = json['CHILD_SEGMENTS_VS_Splited']== null ? <String>[] : json['CHILD_SEGMENTS_VS_Splited'].cast<String>();
    dEFAULTTYPE = json['DEFAULT_TYPE'];
    dEFAULTVALUE = json['DEFAULT_VALUE'];
    dESCFLEXCONTEXTCODE = json['DESC_FLEX_CONTEXT_CODE'];
    dESCFLEXCONTEXTNAME = json['DESC_FLEX_CONTEXT_NAME'];
    dESCFLEXNAME = json['DESC_FLEX_NAME'];
    dISPLAYFLAG = json['DISPLAY_FLAG'];
    eNABLEDFLAG = json['ENABLED_FLAG'];
    eSERVICESDV = json['E_SERVICES_DV'] != null ? new ESERVICESDV.fromJson(json['E_SERVICES_DV']) : null;
    if (json['E_SERVICES_VS'] != null) {
      eSERVICESVS = <ESERVICESVS>[];
      json['E_SERVICES_VS'].forEach((v) {
        eSERVICESVS!.add(new ESERVICESVS.fromJson(v));
      });
    }
    fLEXVALUESETNAME = json['FLEX_VALUE_SET_NAME'];
    fORMATTYPE = json['FORMAT_TYPE'];
    fORMATTYPEDSP = json['FORMAT_TYPE_DSP'];
    isEmptyOption = json['IsEmptyOption'];
    lONGLISTFLAG = json['LONGLIST_FLAG'];
    mAXIMUMSIZE = json['MAXIMUM_SIZE'];
    mAXIMUMVALUE = json['MAXIMUM_VALUE'];
    mINIMUMVALUE = json['MINIMUM_VALUE'];
    mOBILEENABLED = json['MOBILE_ENABLED'];
    nUMBERPRECISION = json['NUMBER_PRECISION'];
    nUMERICMODEENABLEDFLAG = json['NUMERIC_MODE_ENABLED_FLAG'];
    pARENTSEGMENTSDV = json['PARENT_SEGMENTS_DV'];
    if (json['PARENT_SEGMENTS_DV_Splited'] != null) {
      pARENTSEGMENTSDVSplited = <PARENTSEGMENTSDVSplited>[];
      json['PARENT_SEGMENTS_DV_Splited'].forEach((v) {
        pARENTSEGMENTSDVSplited!.add(PARENTSEGMENTSDVSplited.fromJson(v));
      });
    }
    pARENTSEGMENTSVS = json['PARENT_SEGMENTS_VS'];
    if (json['PARENT_SEGMENTS_VS_SplitedVS'] != null) {
      pARENTSEGMENTSVSSplitedVS = <PARENTSEGMENTSVSSplitedVS>[];
      json['PARENT_SEGMENTS_VS_SplitedVS'].forEach((v) {
        pARENTSEGMENTSVSSplitedVS!.add(new PARENTSEGMENTSVSSplitedVS.fromJson(v));
      });
    }
    rEADONLY = json['READ_ONLY'];
    rEQUIREDFLAG = json['REQUIRED_FLAG'];
    sEGMENTNAME = json['SEGMENT_NAME'];
    sEGMENTPROMPT = json['SEGMENT_PROMPT'];
    sEGMENTSEQNUM = json['SEGMENT_SEQ_NUM'];
    uPPERCASEONLYFLAG = json['UPPERCASE_ONLY_FLAG'];
    uSEDFLAG = json['USED_FLAG'];
    vALIDATIONTYPE = json['VALIDATION_TYPE'];
    vALIDATIONTYPEDSP = json['VALIDATION_TYPE_DSP'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> data = new Map<String, dynamic>();
    data['ALPHANUMERIC_ALLOWED_FLAG'] = this.aLPHANUMERICALLOWEDFLAG;
    data['APPLICATION_COLUMN_NAME'] = this.aPPLICATIONCOLUMNNAME;
    data['CHILD_SEGMENTS_DV'] = this.cHILDSEGMENTSDV;
    data['CHILD_SEGMENTS_DV_Splited'] = this.cHILDSEGMENTSDVSplited;
    data['CHILD_SEGMENTS_VS'] = this.cHILDSEGMENTSVS;
    data['CHILD_SEGMENTS_VS_Splited'] = this.cHILDSEGMENTSVSSplited;
    data['DEFAULT_TYPE'] = this.dEFAULTTYPE;
    data['DEFAULT_VALUE'] = this.dEFAULTVALUE;
    data['DESC_FLEX_CONTEXT_CODE'] = this.dESCFLEXCONTEXTCODE;
    data['DESC_FLEX_CONTEXT_NAME'] = this.dESCFLEXCONTEXTNAME;
    data['DESC_FLEX_NAME'] = this.dESCFLEXNAME;
    data['DISPLAY_FLAG'] = this.dISPLAYFLAG;
    data['ENABLED_FLAG'] = this.eNABLEDFLAG;
    if (this.eSERVICESDV != null) {
      data['E_SERVICES_DV'] = this.eSERVICESDV!.toJson();
    }
    if (this.eSERVICESVS != null) {
      data['E_SERVICES_VS'] = this.eSERVICESVS!.map((v) => v.toJson()).toList();
    }
    data['FLEX_VALUE_SET_NAME'] = this.fLEXVALUESETNAME;
    data['FORMAT_TYPE'] = this.fORMATTYPE;
    data['FORMAT_TYPE_DSP'] = this.fORMATTYPEDSP;
    data['IsEmptyOption'] = this.isEmptyOption;
    data['LONGLIST_FLAG'] = this.lONGLISTFLAG;
    data['MAXIMUM_SIZE'] = this.mAXIMUMSIZE;
    data['MAXIMUM_VALUE'] = this.mAXIMUMVALUE;
    data['MINIMUM_VALUE'] = this.mINIMUMVALUE;
    data['MOBILE_ENABLED'] = this.mOBILEENABLED;
    data['NUMBER_PRECISION'] = this.nUMBERPRECISION;
    data['NUMERIC_MODE_ENABLED_FLAG'] = this.nUMERICMODEENABLEDFLAG;
    data['PARENT_SEGMENTS_DV'] = this.pARENTSEGMENTSDV;
    if (this.pARENTSEGMENTSDVSplited != null) {
      data['PARENT_SEGMENTS_DV_Splited'] = this.pARENTSEGMENTSDVSplited!.map((v) => v.toJson()).toList();
    }
    data['PARENT_SEGMENTS_VS'] = this.pARENTSEGMENTSVS;
    if (this.pARENTSEGMENTSVSSplitedVS != null) {
      data['PARENT_SEGMENTS_VS_SplitedVS'] = this.pARENTSEGMENTSVSSplitedVS!.map((v) => v.toJson()).toList();
    }
    data['READ_ONLY'] = this.rEADONLY;
    data['REQUIRED_FLAG'] = this.rEQUIREDFLAG;
    data['SEGMENT_NAME'] = this.sEGMENTNAME;
    data['SEGMENT_PROMPT'] = this.sEGMENTPROMPT;
    data['SEGMENT_SEQ_NUM'] = this.sEGMENTSEQNUM;
    data['UPPERCASE_ONLY_FLAG'] = this.uPPERCASEONLYFLAG;
    data['USED_FLAG'] = this.uSEDFLAG;
    data['VALIDATION_TYPE'] = this.vALIDATIONTYPE;
    data['VALIDATION_TYPE_DSP'] = this.vALIDATIONTYPEDSP;
    return data;
  }

  bool get isDefaultTypeIsCDPS => (dEFAULTTYPE == "C" || dEFAULTTYPE == "D" || dEFAULTTYPE == "P" || dEFAULTTYPE == "S");
}
