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.MT775;
import java.util.List;


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

    @Override
    public void bussinessValidator() {
        //  MtResult mtResult=getMtResult();
        MT775 mt775 = (MT775) 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 (mt775.getField77U() == null && mt775.getField77L() == null){
            mtResult.addDescription(Language.getLanguage("MT775_C1","[MT775]："));
        }
    }
}