package jetbrains.mps.lang.smodelTests.structure;

/*Generated by MPS */

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

public class StructureAspectDescriptor extends BaseStructureAspectDescriptor {
  /*package*/ final ConceptDescriptor myConceptChild = createDescriptorForChild();
  /*package*/ final ConceptDescriptor myConceptChildSubConcept = createDescriptorForChildSubConcept();
  /*package*/ final ConceptDescriptor myConceptChildSubConceptSuppressError = createDescriptorForChildSubConceptSuppressError();
  /*package*/ final ConceptDescriptor myConceptGrandChild = createDescriptorForGrandChild();
  /*package*/ final ConceptDescriptor myConceptNPTypesystem_ConceptA = createDescriptorForNPTypesystem_ConceptA();
  /*package*/ final ConceptDescriptor myConceptNPTypesystem_ConceptB = createDescriptorForNPTypesystem_ConceptB();
  /*package*/ final ConceptDescriptor myConceptNPTypesystem_IntA = createDescriptorForNPTypesystem_IntA();
  /*package*/ final ConceptDescriptor myConceptNPTypesystem_IntB = createDescriptorForNPTypesystem_IntB();
  /*package*/ final ConceptDescriptor myConceptNPTypesystem_RefToIntA = createDescriptorForNPTypesystem_RefToIntA();
  /*package*/ final ConceptDescriptor myConceptReferenceContainer = createDescriptorForReferenceContainer();
  /*package*/ final ConceptDescriptor myConceptReferenceContainerSubConcept = createDescriptorForReferenceContainerSubConcept();
  /*package*/ final ConceptDescriptor myConceptRoot = createDescriptorForRoot();
  /*package*/ final ConceptDescriptor myConceptTestEnum_Container = createDescriptorForTestEnum_Container();
  /*package*/ final EnumerationDescriptor myEnumerationTestEnum_Switch = new EnumerationDescriptor_TestEnum_Switch();
  /*package*/ final EnumerationDescriptor myEnumerationTestEnum_WODefault = new EnumerationDescriptor_TestEnum_WODefault();
  /*package*/ final EnumerationDescriptor myEnumerationTestEnum_WithDefault = new EnumerationDescriptor_TestEnum_WithDefault();
  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");
  }

  @Override
  public Collection<ConceptDescriptor> getDescriptors() {
    return Arrays.asList(myConceptChild, myConceptChildSubConcept, myConceptChildSubConceptSuppressError, myConceptGrandChild, myConceptNPTypesystem_ConceptA, myConceptNPTypesystem_ConceptB, myConceptNPTypesystem_IntA, myConceptNPTypesystem_IntB, myConceptNPTypesystem_RefToIntA, myConceptReferenceContainer, myConceptReferenceContainerSubConcept, myConceptRoot, myConceptTestEnum_Container);
  }

  @Override
  @Nullable
  public ConceptDescriptor getDescriptor(SConceptId id) {
    switch (myIndexSwitch.index(id)) {
      case LanguageConceptSwitch.Child:
        return myConceptChild;
      case LanguageConceptSwitch.ChildSubConcept:
        return myConceptChildSubConcept;
      case LanguageConceptSwitch.ChildSubConceptSuppressError:
        return myConceptChildSubConceptSuppressError;
      case LanguageConceptSwitch.GrandChild:
        return myConceptGrandChild;
      case LanguageConceptSwitch.NPTypesystem_ConceptA:
        return myConceptNPTypesystem_ConceptA;
      case LanguageConceptSwitch.NPTypesystem_ConceptB:
        return myConceptNPTypesystem_ConceptB;
      case LanguageConceptSwitch.NPTypesystem_IntA:
        return myConceptNPTypesystem_IntA;
      case LanguageConceptSwitch.NPTypesystem_IntB:
        return myConceptNPTypesystem_IntB;
      case LanguageConceptSwitch.NPTypesystem_RefToIntA:
        return myConceptNPTypesystem_RefToIntA;
      case LanguageConceptSwitch.ReferenceContainer:
        return myConceptReferenceContainer;
      case LanguageConceptSwitch.ReferenceContainerSubConcept:
        return myConceptReferenceContainerSubConcept;
      case LanguageConceptSwitch.Root:
        return myConceptRoot;
      case LanguageConceptSwitch.TestEnum_Container:
        return myConceptTestEnum_Container;
      default:
        return null;
    }
  }

  @Override
  public Collection<DataTypeDescriptor> getDataTypeDescriptors() {
    return Arrays.asList(myEnumerationTestEnum_Switch, myEnumerationTestEnum_WODefault, myEnumerationTestEnum_WithDefault);
  }

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

  private static ConceptDescriptor createDescriptorForChild() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.smodelTests", "Child", 0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x3dd540b968e9fbfL);
    b.class_(false, false, false);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.origin("r:43b4d418-d4ca-4d97-ab07-31e4f3ddb3e5(jetbrains.mps.lang.smodelTests.structure)/278471160714141631");
    b.version(3);
    b.aggregate("grandChild_0_1", 0x3dd540b968e9fc0L).target(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x3dd540b968e9fc4L).optional(true).ordered(true).multiple(false).origin("278471160714141632").done();
    b.aggregate("grandChild_1", 0x3dd540b968e9fc1L).target(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x3dd540b968e9fc4L).optional(false).ordered(true).multiple(false).origin("278471160714141633").done();
    b.aggregate("grandChild_0_n", 0x3dd540b968e9fc2L).target(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x3dd540b968e9fc4L).optional(true).ordered(true).multiple(true).origin("278471160714141634").done();
    b.aggregate("grandChild_1_n", 0x3dd540b968e9fc3L).target(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x3dd540b968e9fc4L).optional(false).ordered(true).multiple(true).origin("278471160714141635").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForChildSubConcept() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.smodelTests", "ChildSubConcept", 0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x7a02788de4ab4dL);
    b.class_(false, false, false);
    // extends: jetbrains.mps.lang.smodelTests.structure.Child
    b.super_(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x3dd540b968e9fbfL);
    b.origin("r:43b4d418-d4ca-4d97-ab07-31e4f3ddb3e5(jetbrains.mps.lang.smodelTests.structure)/34342663958604621");
    b.version(3);
    b.aggregate("specializedGranChild_0_1", 0x7a02788de4ab4eL).target(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x3dd540b968e9fc4L).optional(true).ordered(true).multiple(false).origin("34342663958604622").specialize(0x3dd540b968e9fbfL, 0x3dd540b968e9fc0L).done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForChildSubConceptSuppressError() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.smodelTests", "ChildSubConceptSuppressError", 0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x2e6fb09209ce6473L);
    b.class_(false, false, false);
    // extends: jetbrains.mps.lang.smodelTests.structure.Child
    b.super_(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x3dd540b968e9fbfL);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2f16f1b357e19f42L);
    b.origin("r:43b4d418-d4ca-4d97-ab07-31e4f3ddb3e5(jetbrains.mps.lang.smodelTests.structure)/3346087189435802739");
    b.version(3);
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForGrandChild() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.smodelTests", "GrandChild", 0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x3dd540b968e9fc4L);
    b.class_(false, false, false);
    b.origin("r:43b4d418-d4ca-4d97-ab07-31e4f3ddb3e5(jetbrains.mps.lang.smodelTests.structure)/278471160714141636");
    b.version(3);
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForNPTypesystem_ConceptA() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.smodelTests", "NPTypesystem_ConceptA", 0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x76fa9e459df911fL);
    b.class_(false, false, false);
    b.parent(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x76fa9e459dda66eL);
    b.origin("r:43b4d418-d4ca-4d97-ab07-31e4f3ddb3e5(jetbrains.mps.lang.smodelTests.structure)/535833678905839903");
    b.version(3);
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForNPTypesystem_ConceptB() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.smodelTests", "NPTypesystem_ConceptB", 0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x76fa9e459df9122L);
    b.class_(false, false, false);
    b.parent(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x76fa9e459dda66fL);
    b.origin("r:43b4d418-d4ca-4d97-ab07-31e4f3ddb3e5(jetbrains.mps.lang.smodelTests.structure)/535833678905839906");
    b.version(3);
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForNPTypesystem_IntA() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.smodelTests", "NPTypesystem_IntA", 0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x76fa9e459dda66eL);
    b.interface_();
    b.origin("r:43b4d418-d4ca-4d97-ab07-31e4f3ddb3e5(jetbrains.mps.lang.smodelTests.structure)/535833678905714286");
    b.version(3);
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForNPTypesystem_IntB() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.smodelTests", "NPTypesystem_IntB", 0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x76fa9e459dda66fL);
    b.interface_();
    b.origin("r:43b4d418-d4ca-4d97-ab07-31e4f3ddb3e5(jetbrains.mps.lang.smodelTests.structure)/535833678905714287");
    b.version(3);
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForNPTypesystem_RefToIntA() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.smodelTests", "NPTypesystem_RefToIntA", 0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x76fa9e459e19e64L);
    b.class_(false, false, false);
    b.origin("r:43b4d418-d4ca-4d97-ab07-31e4f3ddb3e5(jetbrains.mps.lang.smodelTests.structure)/535833678905974372");
    b.version(3);
    b.associate("ref", 0x76fa9e459e19e65L).target(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x76fa9e459dda66eL).optional(false).origin("535833678905974373").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForReferenceContainer() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.smodelTests", "ReferenceContainer", 0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x798c0d67da965ac6L);
    b.class_(false, false, false);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2f16f1b357e19f42L);
    b.origin("r:43b4d418-d4ca-4d97-ab07-31e4f3ddb3e5(jetbrains.mps.lang.smodelTests.structure)/8758390115028851398");
    b.version(3);
    b.associate("root", 0x798c0d67da965ac7L).target(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x3dd540b968e9fc5L).optional(false).origin("8758390115028851399").done();
    b.associate("leftChild", 0x798c0d67da965ac8L).target(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x3dd540b968e9fbfL).optional(true).origin("8758390115028851400").done();
    b.associate("rightChild", 0x798c0d67da965ac9L).target(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x3dd540b968e9fbfL).optional(true).origin("8758390115028851401").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForReferenceContainerSubConcept() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.smodelTests", "ReferenceContainerSubConcept", 0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x279bb63b8ca8b7feL);
    b.class_(false, false, false);
    // extends: jetbrains.mps.lang.smodelTests.structure.ReferenceContainer
    b.super_(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x798c0d67da965ac6L);
    b.origin("r:43b4d418-d4ca-4d97-ab07-31e4f3ddb3e5(jetbrains.mps.lang.smodelTests.structure)/2854075155748534270");
    b.version(3);
    b.associate("specializedRightChild", 0x279bb63b8ca8b800L).target(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x7a02788de4ab4dL).optional(true).origin("2854075155748534272").specialize(0x798c0d67da965ac6L, 0x798c0d67da965ac9L).done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForRoot() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.smodelTests", "Root", 0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x3dd540b968e9fc5L);
    b.class_(false, false, false);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
    b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2f16f1b357e19f42L);
    b.origin("r:43b4d418-d4ca-4d97-ab07-31e4f3ddb3e5(jetbrains.mps.lang.smodelTests.structure)/278471160714141637");
    b.version(3);
    b.aggregate("child_0_n", 0x3dd540b968e9fc6L).target(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x3dd540b968e9fbfL).optional(true).ordered(true).multiple(true).origin("278471160714141638").done();
    b.aggregate("child_1_n", 0x3dd540b968e9fc7L).target(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x3dd540b968e9fbfL).optional(false).ordered(true).multiple(true).origin("278471160714141639").done();
    b.aggregate("childSubConcept_0_n", 0x7a02788de4ab50L).target(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x7a02788de4ab4dL).optional(true).ordered(true).multiple(true).origin("34342663958604624").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForTestEnum_Container() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.smodelTests", "TestEnum_Container", 0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x61fc446ba477f2e1L);
    b.class_(false, false, false);
    b.origin("r:43b4d418-d4ca-4d97-ab07-31e4f3ddb3e5(jetbrains.mps.lang.smodelTests.structure)/7060593544921608929");
    b.version(3);
    b.property("enumWithDefault", 0x61fc446ba477f2e2L).type(MetaIdFactory.dataTypeId(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x55fd055f8f014dbfL)).origin("7060593544921608930").done();
    b.property("enumWODefault", 0x61fc446ba477f2e4L).type(MetaIdFactory.dataTypeId(0xb02ae39f4c164545L, 0x8dfa88df16804e7eL, 0x55fd055f8f014df2L)).origin("7060593544921608932").done();
    return b.create();
  }
}
