package jetbrains.mps.lang.editor.editorTest.enumMigration;

/*Generated by MPS */

import org.jetbrains.mps.openapi.language.SEnumerationLiteral;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SEnumOperations;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import jetbrains.mps.lang.smodel.EnumerationLiteralsIndex;

public class SubstTestEnum_MigrationUtils {
  public static String value(SEnumerationLiteral enummember) {
    switch (enumSwitchIndex.indexNullable(enummember)) {
      case 0:
        return null;
      case 1:
        return "v2";
      case 2:
        return "v3";
      default:
        return null;
    }
  }
  public static SEnumerationLiteral fromValue(String value) {
    if (value == null) {
      return SEnumOperations.getMember(MetaAdapterFactory.getEnumeration(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0xd4944c0b03f658cL, "jetbrains.mps.lang.editor.editorTest.structure.SubstTestEnum"), 0xd4944c0b03f658dL, "v1");
    }
    switch (value) {
      case "v2":
        return SEnumOperations.getMember(MetaAdapterFactory.getEnumeration(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0xd4944c0b03f658cL, "jetbrains.mps.lang.editor.editorTest.structure.SubstTestEnum"), 0xd4944c0b03f65d3L, "v2");
      case "v3":
        return SEnumOperations.getMember(MetaAdapterFactory.getEnumeration(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0xd4944c0b03f658cL, "jetbrains.mps.lang.editor.editorTest.structure.SubstTestEnum"), 0xd4944c0b03f65d6L, "v3");
      default:
        return null;
    }
  }
  private static final EnumerationLiteralsIndex enumSwitchIndex = EnumerationLiteralsIndex.build(0x81f0abb8d71e4d13L, 0xa0c1d2291fbb28b7L, 0xd4944c0b03f658cL, 0xd4944c0b03f658dL, 0xd4944c0b03f65d3L, 0xd4944c0b03f65d6L);
}
