package com.brilliance.isc.swift.objmtconvert.model.busvalidator.mt4xx;

import com.brilliance.isc.swift.objmtconvert.model.AbsMTValidator;

import com.brilliance.isc.swift.objmtconvert.model.busvalidator.ValidatorMethod;
import com.brilliance.isc.swift.objmtconvert.result.MtResult;
import com.prowidesoftware.swift.model.Tag;
import com.prowidesoftware.swift.model.field.Field32A;
import com.prowidesoftware.swift.model.field.Field32B;
import com.prowidesoftware.swift.model.field.Field32K;
import com.prowidesoftware.swift.model.mt.mt4xx.MT410;

import java.util.List;

/**
 * @author zh
 * @create 2023-03-03-10:27
 */
public class MT410Validator extends AbsMTValidator {

    public MT410Validator(String mtStr, MtResult mtResult)
    {
        super(mtStr,mtResult);
    }

    @Override
    public void bussinessValidator() {
        //   MtResult mtResult=getMtResult();
        List<Tag> tags = this.getAbstractMT().getSwiftMessage().getBlock4().getTags();
        String msgType = "MT410";
        mtResult = ValidatorMethod.mt4xxField202132(tags,mtResult,msgType);
        MT410 mt410 = (MT410) this.getAbstractMT();
        List<Field32A> listField32A = mt410.getField32A();
        List<Field32B> listField32B = mt410.getField32B();
        List<Field32K> listField32K = mt410.getField32K();
        mtResult = ValidatorMethod.mt4xxField32(listField32A, listField32B, listField32K, mtResult,msgType);
        //   return mtResult;
    }
}
