private ServiceComponentHostRequest changeRequest(Map<String, Object> properties) {
    ServiceComponentHostRequest serviceComponentHostRequest = new ServiceComponentHostRequest(
            (String) properties.get(CLUSTER_NAME),
            (String) properties.get(SERVICE_NAME),
            (String) properties.get(COMPONENT_NAME),
            (String) properties.get(HOST_NAME),
            (String) properties.get(STATE));
    if (properties.get(DESIRED_STATE) != null) {
      serviceComponentHostRequest.setDesiredState((String)properties.get(DESIRED_STATE));
    }
    if (properties.get(STALE_CONFIGS) != null) {
      serviceComponentHostRequest.setStaleConfig(
              properties.get(STALE_CONFIGS).toString().toLowerCase());
    }

    if (properties.get(DESIRED_ADMIN_STATE) != null) {
      serviceComponentHostRequest.setAdminState(
              properties.get(DESIRED_ADMIN_STATE).toString());
    }

    Object o = properties.get(MAINTENANCE_STATE);
    if (null != o) {
      serviceComponentHostRequest.setMaintenanceState (o.toString());
    }

    return serviceComponentHostRequest;
  }
Put changes to component request object from a map of property values.

@param properties the predicate
@return the component request object
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java