package org.hl7.fhir.r5.utils;

import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class BuildExtensions extends ToolingExtensions {

  public static final String EXT_DESCRIPTION = "http://hl7.org/fhir/build/StructureDefinition/description";
  public static final String EXT_TITLE = "http://hl7.org/fhir/build/StructureDefinition/title";
  public static final String EXT_EXAMPLE_TYPE = "http://hl7.org/fhir/build/CodeSystem/example-type";
  public static final String EXT_NOT_REGISTERED = "http://hl7.org/fhir/build/StructureDefinition/registered";
  public static final String EXT_IG = "http://hl7.org/fhir/build/StructureDefinition/ig";
  public static final String EXT_EXAMPLE_FOR = "http://hl7.org/fhir/build/StructureDefinition/example-for";
  public static final String EXT_PATH = "http://hl7.org/fhir/build/StructureDefinition/path";
  public static final String EXT_FOOTER = "http://hl7.org/fhir/build/StructureDefinition/footer";
  public static final String EXT_FOOTER2 = "http://hl7.org/fhir/build/StructureDefinition/footer2";
  public static final String EXT_ENTERED_IN_ERROR_STATUS = "http://hl7.org/fhir/build/StructureDefinition/entered-in-error-status";
  public static final String EXT_PROPOSED_ORDER = "http://hl7.org/fhir/build/StructureDefinition/proposed-order";
  public static final String EXT_HINT = "http://hl7.org/fhir/build/StructureDefinition/hint";
  public static final String EXT_LAYOUT = "http://hl7.org/fhir/build/StructureDefinition/layout";
  public static final String EXT_TODO = "http://hl7.org/fhir/build/StructureDefinition/todo";
  public static final String EXT_COMMITTEE_NOTES = "http://hl7.org/fhir/build/StructureDefinition/committee-notes";
  public static final String EXT_UML_DIR = "http://hl7.org/fhir/build/StructureDefinition/uml-dir";
  public static final String EXT_UML_BREAK = "http://hl7.org/fhir/build/StructureDefinition/uml-break";
  public static final String EXT_SVG = "http://hl7.org/fhir/build/StructureDefinition/svg";
  public static final String EXT_OCL = "http://hl7.org/fhir/build/StructureDefinition/ocl";
  public static final String EXT_FIXED_NAME = "http://hl7.org/fhir/build/StructureDefinition/fixed-name";
  public static final String EXT_TURTLE = "http://hl7.org/fhir/build/StructureDefinition/turtle";
  public static final String EXT_NAME = "http://hl7.org/fhir/build/StructureDefinition/name";
  public static final String EXT_V2_MAP = "http://hl7.org/fhir/build/StructureDefinition/v2-map";
  public static final String EXT_V3_MAP = "http://hl7.org/fhir/build/StructureDefinition/v3-map";
  public static final String EXT_BINDING_DEFINITION = "http://hl7.org/fhir/build/StructureDefinition/binding-definition";
  public static final String EXT_URI = "http://hl7.org/fhir/build/StructureDefinition/uri";
  public static final String EXT_WEBSITE = "http://hl7.org/fhir/build/StructureDefinition/website";
  public static final String EXT_EMAIL = "http://hl7.org/fhir/build/StructureDefinition/email";
  public static final String EXT_COPYRIGHT = "http://hl7.org/fhir/build/StructureDefinition/copyright";
  public static final String EXT_CS_OID = "http://hl7.org/fhir/build/StructureDefinition/cs-oid";
  public static final String EXT_VS_OID = "http://hl7.org/fhir/build/StructureDefinition/vs-oid";
  public static final String EXT_STATUS = "http://hl7.org/fhir/build/StructureDefinition/status";
  public static final String EXT_INTRODUCTION = "http://hl7.org/fhir/build/StructureDefinition/introduction";
  public static final String EXT_NOTES = "http://hl7.org/fhir/build/StructureDefinition/notes";
  public static final String EXT_CODE = "http://hl7.org/fhir/build/StructureDefinition/code";
  public static final String EXT_TYPE = "http://hl7.org/fhir/build/StructureDefinition/type";
  public static final String EXT_SUMMARY = "http://hl7.org/fhir/build/StructureDefinition/summary";
//  public static final String EXT_EXPLANATION = "http://hl7.org/fhir/build/StructureDefinition/explanation";
  public static final String EXT_NO_BINDING = "http://hl7.org/fhir/build/StructureDefinition/no-binding";
  public static final String EXT_OP_EXAMPLE = "http://hl7.org/fhir/build/StructureDefinition/example";
  public static final String EXT_OP_EXAMPLE_CONTENT = "content";
  public static final String EXT_OP_EXAMPLE_COMMENT = "comment";
  public static final String EXT_OP_EXAMPLE_RESPONSE = "response";
  public static final String EXT_OP_EXAMPLE_LIST = "list";
  public static final String EXT_TEMPLATE = "http://hl7.org/fhir/build/StructureDefinition/template";
  public static final String EXT_BINDING_NAME = "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName";
  

  public static List<String> allConsts() {
    List<String> list = new ArrayList<>();
    for (Field field : BuildExtensions.class.getDeclaredFields()) {
      int modifiers = field.getModifiers();
      if (Modifier.isStatic(modifiers) && Modifier.isFinal(modifiers)) {
        try {
          list.add(field.get(field.getType()).toString());
        } catch (Exception e) {
        }
      }
    }
    list.addAll(ToolingExtensions.allConsts());
    return list;
  }


}
