package jetbrains.mps.lang.test.structure;

/*Generated by MPS */

import jetbrains.mps.smodel.runtime.EnumerationDescriptorBase;
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_ExecutionModelAccessMode extends EnumerationDescriptorBase {

  public EnumerationDescriptor_ExecutionModelAccessMode() {
    super(0x8585453e6bfb4d80L, 0x98deb16074f1d86cL, 0x2451232bcdee06b8L, "ExecutionModelAccessMode", "r:00000000-0000-4000-0000-011c89590388(jetbrains.mps.lang.test.structure)/2616911529524463288");
  }

  private final EnumerationDescriptor.MemberDescriptor myMember_unset_0 = new EnumerationDescriptor.MemberDescriptor("unset", "unset", 0x4bf9938bddc2d016L, "r:00000000-0000-4000-0000-011c89590388(jetbrains.mps.lang.test.structure)/5474569050975817750");
  private final EnumerationDescriptor.MemberDescriptor myMember_none_0 = new EnumerationDescriptor.MemberDescriptor("none", "none", 0x2451232bcdee06b9L, "r:00000000-0000-4000-0000-011c89590388(jetbrains.mps.lang.test.structure)/2616911529524463289");
  private final EnumerationDescriptor.MemberDescriptor myMember_read_0 = new EnumerationDescriptor.MemberDescriptor("read", "read", 0x2451232bcdee06baL, "r:00000000-0000-4000-0000-011c89590388(jetbrains.mps.lang.test.structure)/2616911529524463290");
  private final EnumerationDescriptor.MemberDescriptor myMember_command_0 = new EnumerationDescriptor.MemberDescriptor("command", "command", 0x2451232bcdee06bdL, "r:00000000-0000-4000-0000-011c89590388(jetbrains.mps.lang.test.structure)/2616911529524463293");

  private final EnumerationLiteralsIndex myIndex = EnumerationLiteralsIndex.build(0x8585453e6bfb4d80L, 0x98deb16074f1d86cL, 0x2451232bcdee06b8L, 0x4bf9938bddc2d016L, 0x2451232bcdee06b9L, 0x2451232bcdee06baL, 0x2451232bcdee06bdL);
  private final List<EnumerationDescriptor.MemberDescriptor> myMembers = new EnumerationDescriptorBase.MembersList(myIndex, myMember_unset_0, myMember_none_0, myMember_read_0, myMember_command_0);

  @Nullable
  @Override
  public EnumerationDescriptor.MemberDescriptor getDefault() {
    return myMember_unset_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 "unset":
        return myMember_unset_0;
      case "none":
        return myMember_none_0;
      case "read":
        return myMember_read_0;
      case "command":
        return myMember_command_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);
  }
}
