package jetbrains.mps.make.script.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_Result extends EnumerationDescriptorBase {

  public EnumerationDescriptor_Result() {
    super(0x95f8a3e6f9944ca0L, 0xa65e763c9bae2d3bL, 0x20c069f80a9472daL, "Result", "r:308041c6-80bc-4e26-b4b1-473fd45c9339(jetbrains.mps.make.script.structure)/4241665505353446958");
  }

  private final EnumerationDescriptor.MemberDescriptor myMember_SUCCESS_0 = new EnumerationDescriptor.MemberDescriptor("SUCCESS", "success", 0x20c069f80a9472dbL, "r:308041c6-80bc-4e26-b4b1-473fd45c9339(jetbrains.mps.make.script.structure)/4241665505353446960");
  private final EnumerationDescriptor.MemberDescriptor myMember_FAILURE_0 = new EnumerationDescriptor.MemberDescriptor("FAILURE", "failure", 0x20c069f80a9472dcL, "r:308041c6-80bc-4e26-b4b1-473fd45c9339(jetbrains.mps.make.script.structure)/4241665505353446961");

  private final EnumerationLiteralsIndex myIndex = EnumerationLiteralsIndex.build(0x95f8a3e6f9944ca0L, 0xa65e763c9bae2d3bL, 0x20c069f80a9472daL, 0x20c069f80a9472dbL, 0x20c069f80a9472dcL);
  private final List<EnumerationDescriptor.MemberDescriptor> myMembers = new EnumerationDescriptorBase.MembersList(myIndex, myMember_SUCCESS_0, myMember_FAILURE_0);

  @Nullable
  @Override
  public EnumerationDescriptor.MemberDescriptor getDefault() {
    return myMember_SUCCESS_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 "SUCCESS":
        return myMember_SUCCESS_0;
      case "FAILURE":
        return myMember_FAILURE_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);
  }
}
