package jetbrains.mps.lang.editor.structure;

/*Generated by MPS */

import jetbrains.mps.smodel.runtime.EnumerationDescriptorBase;
import jetbrains.mps.smodel.adapter.ids.PrimitiveTypeId;
import jetbrains.mps.smodel.runtime.EnumerationDescriptor;
import jetbrains.mps.lang.smodel.EnumerationLiteralsIndex;
import java.util.List;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.NotNull;

public class EnumerationDescriptor__FontStyle_Enum extends EnumerationDescriptorBase {

  public EnumerationDescriptor__FontStyle_Enum() {
    super(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1006551b180L, "_FontStyle_Enum", "r:00000000-0000-4000-0000-011c8959029e(jetbrains.mps.lang.editor.structure)/4241665505353445972", PrimitiveTypeId.STRING);
  }

  private final EnumerationDescriptor.MemberDescriptor myMember_BOLD_0 = new EnumerationDescriptor.MemberDescriptor("BOLD", "bold", 0x100655257feL, "r:00000000-0000-4000-0000-011c8959029e(jetbrains.mps.lang.editor.structure)/4241665505353445974", "bold", "BOLD");
  private final EnumerationDescriptor.MemberDescriptor myMember_ITALIC_0 = new EnumerationDescriptor.MemberDescriptor("ITALIC", "italic", 0x1006552a404L, "r:00000000-0000-4000-0000-011c8959029e(jetbrains.mps.lang.editor.structure)/4241665505353445975", "italic", "ITALIC");
  private final EnumerationDescriptor.MemberDescriptor myMember_BOLD_ITALIC_0 = new EnumerationDescriptor.MemberDescriptor("BOLD_ITALIC", "boldItalic", 0x1006577889aL, "r:00000000-0000-4000-0000-011c8959029e(jetbrains.mps.lang.editor.structure)/4241665505353445976", "boldItalic", "BOLD_ITALIC");
  private final EnumerationDescriptor.MemberDescriptor myMember_PLAIN_0 = new EnumerationDescriptor.MemberDescriptor("PLAIN", "plain", 0x1082a1c2aa1L, "r:00000000-0000-4000-0000-011c8959029e(jetbrains.mps.lang.editor.structure)/4241665505353445977", "plain", "PLAIN");
  private final EnumerationDescriptor.MemberDescriptor myMember_QUERY_0 = new EnumerationDescriptor.MemberDescriptor("QUERY", "query", 0x11c47b3e786L, "r:00000000-0000-4000-0000-011c8959029e(jetbrains.mps.lang.editor.structure)/4241665505353445978", "query", "QUERY");

  private final EnumerationLiteralsIndex myIndex = EnumerationLiteralsIndex.build(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1006551b180L, 0x100655257feL, 0x1006552a404L, 0x1006577889aL, 0x1082a1c2aa1L, 0x11c47b3e786L);
  private final List<EnumerationDescriptor.MemberDescriptor> myMembers = new EnumerationDescriptorBase.MembersList(myIndex, myMember_BOLD_0, myMember_ITALIC_0, myMember_BOLD_ITALIC_0, myMember_PLAIN_0, myMember_QUERY_0);

  @Nullable
  @Override
  public EnumerationDescriptor.MemberDescriptor getDefault() {
    return myMember_PLAIN_0;
  }

  @NotNull
  @Override
  public List<EnumerationDescriptor.MemberDescriptor> getMembers() {
    return myMembers;
  }

  @Nullable
  @Override
  public EnumerationDescriptor.MemberDescriptor getMember(@Nullable String memberName) {
    if (memberName == null) {
      return null;
    }
    switch (memberName) {
      case "BOLD":
        return myMember_BOLD_0;
      case "ITALIC":
        return myMember_ITALIC_0;
      case "BOLD_ITALIC":
        return myMember_BOLD_ITALIC_0;
      case "PLAIN":
        return myMember_PLAIN_0;
      case "QUERY":
        return myMember_QUERY_0;
    }
    return null;
  }

  @Nullable
  @Override
  public EnumerationDescriptor.MemberDescriptor getMember(long idValue) {
    int index = myIndex.index(idValue);
    if (index == -1) {
      return null;
    }
    return myMembers.get(index);
  }
}
