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


import com.brilliance.isc.swift.objmtconvert.model.AbsMTValidator;
import com.brilliance.isc.swift.objmtconvert.result.MtResult;
import com.brilliance.isc.swift.objmtconvert.util.Language;
import com.prowidesoftware.swift.model.Tag;
import com.prowidesoftware.swift.model.mt.mt7xx.MT761;
import java.util.List;


public class MT761Validator extends AbsMTValidator {
    public MT761Validator(String mtStr, MtResult mtResult) {
        super(mtStr, mtResult);
    }

    @Override
    public void bussinessValidator() {
        //  MtResult mtResult=getMtResult();
        MT761 mt761 = (MT761) this.getAbstractMT();
        List<Tag> tags = this.getAbstractMT().getSwiftMessage().getBlock4().getTags();

        //C1 Either field 77U or field 77L must be present, both may be present (Error code(s): C19).
            //字段77U或字段77L必须存在一个。（错误代码：C19）。
        if (mt761.getField77U() == null && mt761.getField77L() == null){
            mtResult.addDescription(Language.getLanguage("MT761_C1","[MT761]："));
        }
    }
}