package jetbrains.mps.lang.structure.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_EnumerationMemberIdentifierPolicy extends EnumerationDescriptorBase {

  public EnumerationDescriptor_EnumerationMemberIdentifierPolicy() {
    super(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x116d5fab105L, "EnumerationMemberIdentifierPolicy", "r:00000000-0000-4000-0000-011c89590292(jetbrains.mps.lang.structure.structure)/4241665505353447577");
  }

  private final EnumerationDescriptor.MemberDescriptor myMember_derive_from_presentation_0 = new EnumerationDescriptor.MemberDescriptor("derive_from_presentation", "derive from presentation", 0x116d5fab106L, "r:00000000-0000-4000-0000-011c89590292(jetbrains.mps.lang.structure.structure)/4241665505353447579");
  private final EnumerationDescriptor.MemberDescriptor myMember_derive_from_internal_value_0 = new EnumerationDescriptor.MemberDescriptor("derive_from_internal_value", "derive from internal value", 0x116d5fd31b6L, "r:00000000-0000-4000-0000-011c89590292(jetbrains.mps.lang.structure.structure)/4241665505353447580");
  private final EnumerationDescriptor.MemberDescriptor myMember_custom_0 = new EnumerationDescriptor.MemberDescriptor("custom", "custom", 0x116d5fd9aa3L, "r:00000000-0000-4000-0000-011c89590292(jetbrains.mps.lang.structure.structure)/4241665505353447581");

  private final EnumerationLiteralsIndex myIndex = EnumerationLiteralsIndex.build(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x116d5fab105L, 0x116d5fab106L, 0x116d5fd31b6L, 0x116d5fd9aa3L);
  private final List<EnumerationDescriptor.MemberDescriptor> myMembers = new EnumerationDescriptorBase.MembersList(myIndex, myMember_derive_from_presentation_0, myMember_derive_from_internal_value_0, myMember_custom_0);

  @Nullable
  @Override
  public EnumerationDescriptor.MemberDescriptor getDefault() {
    return myMember_derive_from_presentation_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 "derive_from_presentation":
        return myMember_derive_from_presentation_0;
      case "derive_from_internal_value":
        return myMember_derive_from_internal_value_0;
      case "custom":
        return myMember_custom_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);
  }
}
