package messages.customization.structure;

/*Generated by MPS */

import jetbrains.mps.smodel.runtime.BaseStructureAspectDescriptor;
import jetbrains.mps.smodel.runtime.ConceptDescriptor;
import java.util.Collection;
import java.util.Arrays;
import org.jetbrains.annotations.Nullable;
import jetbrains.mps.smodel.adapter.ids.SConceptId;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.smodel.runtime.impl.ConceptDescriptorBuilder2;
import jetbrains.mps.smodel.adapter.ids.PrimitiveTypeId;

public class StructureAspectDescriptor extends BaseStructureAspectDescriptor {
  /*package*/ final ConceptDescriptor myConceptAuxConcept = createDescriptorForAuxConcept();
  /*package*/ final ConceptDescriptor myConceptBrokenConcept = createDescriptorForBrokenConcept();
  /*package*/ final ConceptDescriptor myConceptCardinalityTestConcept = createDescriptorForCardinalityTestConcept();
  /*package*/ final ConceptDescriptor myConceptCardinalityTestConcept0 = createDescriptorForCardinalityTestConcept0();
  /*package*/ final ConceptDescriptor myConceptIncorrectTargetTestConcept = createDescriptorForIncorrectTargetTestConcept();
  /*package*/ final ConceptDescriptor myConceptTestConcept = createDescriptorForTestConcept();
  /*package*/ final ConceptDescriptor myConceptTestConcept0 = createDescriptorForTestConcept0();
  private final LanguageConceptSwitch myIndexSwitch;

  public StructureAspectDescriptor() {
    myIndexSwitch = new LanguageConceptSwitch();
  }


  @Override
  public void reportDependencies(jetbrains.mps.smodel.runtime.StructureAspectDescriptor.Dependencies deps) {
    deps.extendedLanguage(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, "jetbrains.mps.lang.core");
    deps.aggregatedLanguage(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, "jetbrains.mps.lang.core");
  }

  @Override
  public Collection<ConceptDescriptor> getDescriptors() {
    return Arrays.asList(myConceptAuxConcept, myConceptBrokenConcept, myConceptCardinalityTestConcept, myConceptCardinalityTestConcept0, myConceptIncorrectTargetTestConcept, myConceptTestConcept, myConceptTestConcept0);
  }

  @Override
  @Nullable
  public ConceptDescriptor getDescriptor(SConceptId id) {
    switch (myIndexSwitch.index(id)) {
      case LanguageConceptSwitch.AuxConcept:
        return myConceptAuxConcept;
      case LanguageConceptSwitch.BrokenConcept:
        return myConceptBrokenConcept;
      case LanguageConceptSwitch.CardinalityTestConcept:
        return myConceptCardinalityTestConcept;
      case LanguageConceptSwitch.CardinalityTestConcept0:
        return myConceptCardinalityTestConcept0;
      case LanguageConceptSwitch.IncorrectTargetTestConcept:
        return myConceptIncorrectTargetTestConcept;
      case LanguageConceptSwitch.TestConcept:
        return myConceptTestConcept;
      case LanguageConceptSwitch.TestConcept0:
        return myConceptTestConcept0;
      default:
        return null;
    }
  }


  /*package*/ int internalIndex(SAbstractConcept c) {
    return myIndexSwitch.index(c);
  }

  private static ConceptDescriptor createDescriptorForAuxConcept() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("messages.customization", "AuxConcept", 0x7cf7c95bc81e4da9L, 0xa05645e480a7abd3L, 0x2807c18666f87283L);
    b.class_(false, false, true);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.origin("r:7117f6c4-faaf-4889-b5b9-3fe628e41cf8(messages.customization.structure)/2884486869351428739");
    b.version(3);
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForBrokenConcept() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("messages.customization", "BrokenConcept", 0x7cf7c95bc81e4da9L, 0xa05645e480a7abd3L, 0x61692e8b97e7c311L);
    b.class_(false, false, true);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.origin("r:7117f6c4-faaf-4889-b5b9-3fe628e41cf8(messages.customization.structure)/7019192671317508881");
    b.version(3);
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForCardinalityTestConcept() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("messages.customization", "CardinalityTestConcept", 0x7cf7c95bc81e4da9L, 0xa05645e480a7abd3L, 0x61692e8b97e96c6cL);
    b.class_(false, false, true);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.parent(0x7cf7c95bc81e4da9L, 0xa05645e480a7abd3L, 0x61692e8b97ee826fL);
    b.origin("r:7117f6c4-faaf-4889-b5b9-3fe628e41cf8(messages.customization.structure)/7019192671317617772");
    b.version(3);
    b.associate("obligatoryref", 0x61692e8b97e8bfb0L).target(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL).optional(false).origin("7019192671317617778").done();
    b.aggregate("obligatorychild", 0x61692e8b97e8bfb4L).target(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL).optional(false).ordered(true).multiple(false).origin("7019192671317617776").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForCardinalityTestConcept0() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("messages.customization", "CardinalityTestConcept0", 0x7cf7c95bc81e4da9L, 0xa05645e480a7abd3L, 0x61692e8b97ee826fL);
    b.interface_();
    b.origin("r:7117f6c4-faaf-4889-b5b9-3fe628e41cf8(messages.customization.structure)/7019192671317951087");
    b.version(3);
    b.aggregate("singleRoleChild", 0x61692e8b97ee8284L).target(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL).optional(true).ordered(true).multiple(false).origin("7019192671317951108").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForIncorrectTargetTestConcept() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("messages.customization", "IncorrectTargetTestConcept", 0x7cf7c95bc81e4da9L, 0xa05645e480a7abd3L, 0x19e9e9b662255d2L);
    b.class_(false, false, true);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.origin("r:7117f6c4-faaf-4889-b5b9-3fe628e41cf8(messages.customization.structure)/116705030628857298");
    b.version(3);
    b.associate("obligatoryref", 0x61692e8b97e8bfb0L).target(0x7cf7c95bc81e4da9L, 0xa05645e480a7abd3L, 0x2807c18666f87283L).optional(true).origin("116705030628857300").done();
    b.aggregate("obligatorychild", 0x61692e8b97e8bfb4L).target(0x7cf7c95bc81e4da9L, 0xa05645e480a7abd3L, 0x2807c18666f87283L).optional(true).ordered(true).multiple(false).origin("116705030628857299").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForTestConcept() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("messages.customization", "TestConcept", 0x7cf7c95bc81e4da9L, 0xa05645e480a7abd3L, 0x530a123e5fc34d34L);
    b.class_(false, false, true);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.parent(0x7cf7c95bc81e4da9L, 0xa05645e480a7abd3L, 0x2807c18666f81300L);
    b.origin("r:7117f6c4-faaf-4889-b5b9-3fe628e41cf8(messages.customization.structure)/5983615114019032372");
    b.version(3);
    b.property("prop", 0x50310db2af989958L).type(PrimitiveTypeId.INTEGER).origin("5778414857994410328").done();
    b.associate("link", 0x161a25d497067a9eL).target(0x7cf7c95bc81e4da9L, 0xa05645e480a7abd3L, 0x530a123e5fc34d34L).optional(true).origin("1592627013225970334").done();
    b.aggregate("child", 0x2807c18666f812fdL).target(0x7cf7c95bc81e4da9L, 0xa05645e480a7abd3L, 0x530a123e5fc34d34L).optional(true).ordered(true).multiple(false).origin("2884486869351404285").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForTestConcept0() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("messages.customization", "TestConcept0", 0x7cf7c95bc81e4da9L, 0xa05645e480a7abd3L, 0x2807c18666f81300L);
    b.interface_();
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.origin("r:7117f6c4-faaf-4889-b5b9-3fe628e41cf8(messages.customization.structure)/2884486869351404288");
    b.version(3);
    return b.create();
  }
}
