
package com.streamsets.pipeline.lib.generator.xml;

import com.streamsets.pipeline.api.ErrorCode;
import com.streamsets.pipeline.api.GenerateResourceBundle;

@GenerateResourceBundle
public enum Errors implements ErrorCode {
  XML_GENERATOR_00("Record root field must be Map or ListMap instead of '{}'"),
  XML_GENERATOR_01("Record Field '{}' of type Field Ref is unsupported for json serialization"),
  XML_GENERATOR_02("Record generated XML does not conform to specified schemas(s): {}"),
  XML_GENERATOR_03("Record does not have a root field"),
  XML_GENERATOR_04("Record root field must have 1 element"),
  XML_GENERATOR_05("Record root field cannot be a List"),
  XML_GENERATOR_06("Record didn't generate any XML"),
  XML_GENERATOR_07("Undefined namespace for '{}' attribute prefix"),
  XML_GENERATOR_08("Undefined namespace for '{}' element prefix"),
  ;

  private final String msg;

  Errors(String msg) {
    this.msg = msg;
  }

  @Override
  public String getCode() {
    return name();
  }

  @Override
  public String getMessage() {
    return msg;
  }
}
