package jetbrains.mps.baseLanguage.logging.actions;

/*Generated by MPS */

import jetbrains.mps.openapi.actions.descriptor.NodeFactory;
import org.jetbrains.mps.openapi.model.SNode;
import org.jetbrains.mps.openapi.model.SModel;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations;
import org.jetbrains.mps.openapi.language.SConcept;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import org.jetbrains.mps.openapi.language.SContainmentLink;
import org.jetbrains.mps.openapi.language.SProperty;

public class LogStatementConversions {
  public static class NodeFactory_6057591418743042050 implements NodeFactory {
    public void setup(SNode newNode, SNode sampleNode, SNode enclosingNode, int index, SModel model) {
      {
        final SNode msg = sampleNode;
        if (SNodeOperations.isInstanceOf(msg, CONCEPTS.MsgStatement$Pu)) {
          SLinkOperations.setTarget(newNode, LINKS.message$TfWL, SLinkOperations.getTarget(msg, LINKS.message$I3Bb));
          SPropertyOperations.assignEnum(newNode, PROPS.severity$TfuJ, SPropertyOperations.getEnum(msg, PROPS.severity$lcf9));
          SLinkOperations.setTarget(newNode, LINKS.throwable$TgqN, SLinkOperations.getTarget(msg, LINKS.throwable$I3Qc));
        }
      }
      {
        final SNode msg = sampleNode;
        if (SNodeOperations.isInstanceOf(msg, CONCEPTS.LogLowLevelStatement$3g)) {
          SLinkOperations.setTarget(newNode, LINKS.message$TfWL, SLinkOperations.getTarget(msg, LINKS.message$TfWL));
          SPropertyOperations.assignEnum(newNode, PROPS.severity$TfuJ, SPropertyOperations.getEnum(msg, PROPS.severity$TfuJ));
          SLinkOperations.setTarget(newNode, LINKS.throwable$TgqN, SLinkOperations.getTarget(msg, LINKS.throwable$TgqN));
        }
      }
    }
  }
  public static class NodeFactory_6057591418743066490 implements NodeFactory {
    public void setup(SNode newNode, SNode sampleNode, SNode enclosingNode, int index, SModel model) {
      {
        final SNode msg = sampleNode;
        if (SNodeOperations.isInstanceOf(msg, CONCEPTS.MsgStatement$Pu)) {
          SLinkOperations.setTarget(newNode, LINKS.message$I3Bb, SLinkOperations.getTarget(msg, LINKS.message$I3Bb));
          SPropertyOperations.assignEnum(newNode, PROPS.severity$lcf9, SPropertyOperations.getEnum(msg, PROPS.severity$lcf9));
          SLinkOperations.setTarget(newNode, LINKS.throwable$I3Qc, SLinkOperations.getTarget(msg, LINKS.throwable$I3Qc));
          SLinkOperations.setTarget(newNode, LINKS.hint$bvDr, SLinkOperations.getTarget(msg, LINKS.hint$bvDr));
        }
      }
      {
        final SNode msg = sampleNode;
        if (SNodeOperations.isInstanceOf(msg, CONCEPTS.LogLowLevelStatement$3g)) {
          SLinkOperations.setTarget(newNode, LINKS.message$I3Bb, SLinkOperations.getTarget(msg, LINKS.message$TfWL));
          SPropertyOperations.assignEnum(newNode, PROPS.severity$lcf9, SPropertyOperations.getEnum(msg, PROPS.severity$TfuJ));
          SLinkOperations.setTarget(newNode, LINKS.throwable$I3Qc, SLinkOperations.getTarget(msg, LINKS.throwable$TgqN));
        }
      }
    }
  }

  private static final class CONCEPTS {
    /*package*/ static final SConcept MsgStatement$Pu = MetaAdapterFactory.getConcept(0x760a0a8ceabb4521L, 0x8bfd65db761a9ba3L, 0x57e2cf14f6d5a71dL, "jetbrains.mps.baseLanguage.logging.structure.MsgStatement");
    /*package*/ static final SConcept LogLowLevelStatement$3g = MetaAdapterFactory.getConcept(0x760a0a8ceabb4521L, 0x8bfd65db761a9ba3L, 0x1c3d779b2be2f0b9L, "jetbrains.mps.baseLanguage.logging.structure.LogLowLevelStatement");
  }

  private static final class LINKS {
    /*package*/ static final SContainmentLink message$TfWL = MetaAdapterFactory.getContainmentLink(0x760a0a8ceabb4521L, 0x8bfd65db761a9ba3L, 0x1c3d779b2be2f0b9L, 0x1c3d779b2be2f1b9L, "message");
    /*package*/ static final SContainmentLink message$I3Bb = MetaAdapterFactory.getContainmentLink(0x760a0a8ceabb4521L, 0x8bfd65db761a9ba3L, 0x57e2cf14f6d5a71dL, 0x4f67298c4630c25eL, "message");
    /*package*/ static final SContainmentLink throwable$TgqN = MetaAdapterFactory.getContainmentLink(0x760a0a8ceabb4521L, 0x8bfd65db761a9ba3L, 0x1c3d779b2be2f0b9L, 0x1c3d779b2be2f1bbL, "throwable");
    /*package*/ static final SContainmentLink throwable$I3Qc = MetaAdapterFactory.getContainmentLink(0x760a0a8ceabb4521L, 0x8bfd65db761a9ba3L, 0x57e2cf14f6d5a71dL, 0x4f67298c4630c25fL, "throwable");
    /*package*/ static final SContainmentLink hint$bvDr = MetaAdapterFactory.getContainmentLink(0x760a0a8ceabb4521L, 0x8bfd65db761a9ba3L, 0x57e2cf14f6d5a71dL, 0x1d19c0e87d9d67c2L, "hint");
  }

  private static final class PROPS {
    /*package*/ static final SProperty severity$TfuJ = MetaAdapterFactory.getProperty(0x760a0a8ceabb4521L, 0x8bfd65db761a9ba3L, 0x1c3d779b2be2f0b9L, 0x1c3d779b2be2f1b7L, "severity");
    /*package*/ static final SProperty severity$lcf9 = MetaAdapterFactory.getProperty(0x760a0a8ceabb4521L, 0x8bfd65db761a9ba3L, 0x57e2cf14f6d5a71dL, 0x57e2cf14f6d5d81fL, "severity");
  }
}
