package jetbrains.mps.lang.aspect.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.runtime.ConceptKind;
import jetbrains.mps.smodel.runtime.StaticScope;

public class StructureAspectDescriptor extends BaseStructureAspectDescriptor {
  /*package*/ final ConceptDescriptor myConceptAspectRootConfiguration = createDescriptorForAspectRootConfiguration();
  /*package*/ final ConceptDescriptor myConceptEmptyAspectRootConfig = createDescriptorForEmptyAspectRootConfig();
  /*package*/ final ConceptDescriptor myConceptIAspectConcept = createDescriptorForIAspectConcept();
  /*package*/ final ConceptDescriptor myConceptLanguageAspectDescriptor = createDescriptorForLanguageAspectDescriptor();
  /*package*/ final ConceptDescriptor myConceptSimpleAspectOrderRef = createDescriptorForSimpleAspectOrderRef();
  /*package*/ final ConceptDescriptor myConceptSimpleLanguageAspectDescriptor = createDescriptorForSimpleLanguageAspectDescriptor();
  /*package*/ final ConceptDescriptor myConceptSpecificAspectRootConfig = createDescriptorForSpecificAspectRootConfig();
  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.extendedLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage");
    deps.extendedLanguage(0xc9d137c4325944f8L, 0x80ff33ab2b506ee4L, "jetbrains.mps.lang.util.order");
    deps.aggregatedLanguage(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, "jetbrains.mps.lang.smodel");
    deps.aggregatedLanguage(0x982eb8df2c964bd7L, 0x996311712ea622e5L, "jetbrains.mps.lang.resources");
    deps.aggregatedLanguage(0xc9d137c4325944f8L, 0x80ff33ab2b506ee4L, "jetbrains.mps.lang.util.order");
    deps.aggregatedLanguage(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, "jetbrains.mps.lang.structure");
  }

  @Override
  public Collection<ConceptDescriptor> getDescriptors() {
    return Arrays.asList(myConceptAspectRootConfiguration, myConceptEmptyAspectRootConfig, myConceptIAspectConcept, myConceptLanguageAspectDescriptor, myConceptSimpleAspectOrderRef, myConceptSimpleLanguageAspectDescriptor, myConceptSpecificAspectRootConfig);
  }

  @Override
  @Nullable
  public ConceptDescriptor getDescriptor(SConceptId id) {
    switch (myIndexSwitch.index(id)) {
      case LanguageConceptSwitch.AspectRootConfiguration:
        return myConceptAspectRootConfiguration;
      case LanguageConceptSwitch.EmptyAspectRootConfig:
        return myConceptEmptyAspectRootConfig;
      case LanguageConceptSwitch.IAspectConcept:
        return myConceptIAspectConcept;
      case LanguageConceptSwitch.LanguageAspectDescriptor:
        return myConceptLanguageAspectDescriptor;
      case LanguageConceptSwitch.SimpleAspectOrderRef:
        return myConceptSimpleAspectOrderRef;
      case LanguageConceptSwitch.SimpleLanguageAspectDescriptor:
        return myConceptSimpleLanguageAspectDescriptor;
      case LanguageConceptSwitch.SpecificAspectRootConfig:
        return myConceptSpecificAspectRootConfig;
      default:
        return null;
    }
  }


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

  private static ConceptDescriptor createDescriptorForAspectRootConfiguration() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.aspect", "AspectRootConfiguration", 0xf159adf43c9340f9L, 0x9c5a1f245a8697afL, 0x6ed0e6c2f31b3ddbL);
    b.class_(false, true, false);
    b.origin("r:2ea71bfd-fe13-4525-9346-023b05757b39(jetbrains.mps.lang.aspect.structure)/7985135864304582107");
    b.version(3);
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForEmptyAspectRootConfig() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.aspect", "EmptyAspectRootConfig", 0xf159adf43c9340f9L, 0x9c5a1f245a8697afL, 0x6ed0e6c2f31bdea6L);
    b.class_(false, false, false);
    // extends: jetbrains.mps.lang.aspect.structure.AspectRootConfiguration
    b.super_(0xf159adf43c9340f9L, 0x9c5a1f245a8697afL, 0x6ed0e6c2f31b3ddbL);
    b.origin("r:2ea71bfd-fe13-4525-9346-023b05757b39(jetbrains.mps.lang.aspect.structure)/7985135864304623270");
    b.version(3);
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForIAspectConcept() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.aspect", "IAspectConcept", 0xf159adf43c9340f9L, 0x9c5a1f245a8697afL, 0x7bcf8452e0dac0c9L);
    b.interface_();
    b.origin("r:2ea71bfd-fe13-4525-9346-023b05757b39(jetbrains.mps.lang.aspect.structure)/8921494878338859209");
    b.version(3);
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForLanguageAspectDescriptor() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.aspect", "LanguageAspectDescriptor", 0xf159adf43c9340f9L, 0x9c5a1f245a8697afL, 0x2d72cdccef70b086L);
    b.class_(false, false, false);
    // extends: jetbrains.mps.baseLanguage.structure.ClassConcept
    b.super_(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c108ca66L);
    b.parent(0xc7d5b9dda05f4be2L, 0xbc73f2e16994cc67L, 0xea740fb893a13edL);
    b.origin("r:2ea71bfd-fe13-4525-9346-023b05757b39(jetbrains.mps.lang.aspect.structure)/3274906159125934214");
    b.version(3);
    b.kind(ConceptKind.INTERFACE, StaticScope.GLOBAL);
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForSimpleAspectOrderRef() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.aspect", "SimpleAspectOrderRef", 0xf159adf43c9340f9L, 0x9c5a1f245a8697afL, 0x26c6e1a7a20d8efL);
    b.class_(false, false, false);
    // extends: jetbrains.mps.lang.util.order.structure.OrderParticipantReference
    b.super_(0xc9d137c4325944f8L, 0x80ff33ab2b506ee4L, 0x22035699bdd7814bL);
    b.origin("r:2ea71bfd-fe13-4525-9346-023b05757b39(jetbrains.mps.lang.aspect.structure)/174635545557784815");
    b.version(3);
    b.associate("target", 0x26c6e1a7a20dbc1L).target(0xf159adf43c9340f9L, 0x9c5a1f245a8697afL, 0x2fa4a8cdf0c9b076L).optional(true).origin("174635545557785537").specialize(0xc9d137c4325944f8L, 0x80ff33ab2b506ee4L, 0x22035699bdd7814bL, 0x22035699bdd7814cL).done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForSimpleLanguageAspectDescriptor() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.aspect", "SimpleLanguageAspectDescriptor", 0xf159adf43c9340f9L, 0x9c5a1f245a8697afL, 0x2fa4a8cdf0c9b076L);
    b.class_(false, false, true);
    b.parent(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x11a3afa8c0dL);
    b.parent(0xc9d137c4325944f8L, 0x80ff33ab2b506ee4L, 0x2085244dcb20c1dcL);
    b.origin("r:2ea71bfd-fe13-4525-9346-023b05757b39(jetbrains.mps.lang.aspect.structure)/3433054418424672374");
    b.version(3);
    b.associate("proponent", 0x74f2640a65e2f4d9L).target(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979ba0450L).optional(true).origin("8426907848585442521").done();
    b.aggregate("mainLanguages", 0x54be5be5620c1b77L).target(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x312abca18ab8c318L).optional(true).ordered(true).multiple(true).origin("6106419185511570295").done();
    b.aggregate("additionalLanguages", 0x54be5be5620c1b7dL).target(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x312abca18ab8c318L).optional(true).ordered(true).multiple(true).origin("6106419185511570301").done();
    b.aggregate("devkit", 0x721adb764b494af2L).target(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x721adb764b3f4dbeL).optional(true).ordered(true).multiple(false).origin("8222125370833980146").done();
    b.aggregate("icon", 0x2fa4a8cdf0cff495L).target(0x982eb8df2c964bd7L, 0x996311712ea622e5L, 0x26417c3774289eeeL).optional(true).ordered(true).multiple(false).origin("3433054418425083029").done();
    b.aggregate("helpUrl", 0x4197d5560e700dfbL).target(0x982eb8df2c964bd7L, 0x996311712ea622e5L, 0x47d8f9811b73d397L).optional(true).ordered(true).multiple(false).origin("4726480899534753275").done();
    b.aggregate("order", 0x2085244dcb121e81L).target(0xc9d137c4325944f8L, 0x80ff33ab2b506ee4L, 0x22035699bdd78145L).optional(true).ordered(true).multiple(false).origin("2343319097654255233").done();
    b.aggregate("rootCfg", 0x6ed0e6c2f31b3e37L).target(0xf159adf43c9340f9L, 0x9c5a1f245a8697afL, 0x6ed0e6c2f31b3ddbL).optional(true).ordered(true).multiple(false).origin("7985135864304582199").done();
    return b.create();
  }
  private static ConceptDescriptor createDescriptorForSpecificAspectRootConfig() {
    ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("jetbrains.mps.lang.aspect", "SpecificAspectRootConfig", 0xf159adf43c9340f9L, 0x9c5a1f245a8697afL, 0x6ed0e6c2f31b3e45L);
    b.class_(false, false, false);
    // extends: jetbrains.mps.lang.aspect.structure.AspectRootConfiguration
    b.super_(0xf159adf43c9340f9L, 0x9c5a1f245a8697afL, 0x6ed0e6c2f31b3ddbL);
    b.origin("r:2ea71bfd-fe13-4525-9346-023b05757b39(jetbrains.mps.lang.aspect.structure)/7985135864304582213");
    b.version(3);
    b.aggregate("primary", 0x6ed0e6c2f31b559aL).target(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x6ed0e6c2f31b3f42L).optional(true).ordered(true).multiple(true).origin("7985135864304588186").done();
    b.aggregate("secondary", 0x6ed0e6c2f31b559cL).target(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x6ed0e6c2f31b3f42L).optional(true).ordered(true).multiple(true).origin("7985135864304588188").done();
    b.aggregate("auxiliary", 0x6ed0e6c2f31b559fL).target(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x6ed0e6c2f31b3f42L).optional(true).ordered(true).multiple(true).origin("7985135864304588191").done();
    return b.create();
  }
}
