void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
      if (null != preDowngradeXml) {
        preDowngradeTasks = preDowngradeXml.copyUpgrade ? preTasks :
          preDowngradeXml.tasks;
      }

      if (null != postDowngradeXml) {
        postDowngradeTasks = postDowngradeXml.copyUpgrade ? postTasks :
          postDowngradeXml.tasks;
      }

      ProcessingService service = (ProcessingService) parent;

      if (LOG.isDebugEnabled()) {
        LOG.debug("Processing component {}/{} preUpgrade={} postUpgrade={} preDowngrade={} postDowngrade={}",
            preTasks, preDowngradeTasks, postTasks, postDowngradeTasks);
      }

      if (null != preTasks && null == preDowngradeTasks) {
        String error = String.format("Upgrade pack must contain pre-downgrade elements if "
            + "pre-upgrade exists for processing component %s/%s", service.name, name);

        throw new RuntimeException(error);
      }

      if (null != postTasks && null == postDowngradeTasks) {
        String error = String.format("Upgrade pack must contain post-downgrade elements if "
            + "post-upgrade exists for processing component %s/%s", service.name, name);

        throw new RuntimeException(error);
      }

      // !!! check for config tasks and mark the associated service
      initializeTasks(service.name, preTasks);
      initializeTasks(service.name, postTasks);
      initializeTasks(service.name, tasks);
      initializeTasks(service.name, preDowngradeTasks);
      initializeTasks(service.name, postDowngradeTasks);
    }
This method verifies that if {@code pre-upgrade} is defined, that there is also
a sibling {@code pre-downgrade} defined.  Similarly, {@code post-upgrade} must have a
sibling {@code post-downgrade}.  This is because the JDK (include 1.8) JAXB doesn't
support XSD xpath assertions for siblings.

@param unmarshaller  the unmarshaller
@param parent        the parent
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/UpgradePack.java