code: private void populateRepackagedToCredentialReference(ModelNode payload, String repackagedPropName, String propertyName) {
          ModelNode value = payload.get(repackagedPropName);
          if (payload.hasDefined(repackagedPropName) && value.asString().trim().length() > 0) {
              payload.get(CREDENTIAL_REFERENCE).get(propertyName).set(value);
          }
          payload.remove(repackagedPropName);
      }
docs: create a flat node, copying the credential-reference complex attribute as regular attributes of the payload