class RequestScheduleResourceProvider extends AbstractControllerResourceProvider {

  @Override
  public RequestStatus createResources(Request request) throws SystemException,
      UnsupportedPropertyException, ResourceAlreadyExistsException,
      NoSuchParentResourceException {

    final Set<RequestScheduleRequest> requests = new HashSet<>();

    for (Map<String, Object> propertyMap : request.getProperties()) {
      requests.add(getRequestScheduleRequest(propertyMap));
    }

    Set<RequestScheduleResponse> responses =
      createResources(new Command<Set<RequestScheduleResponse>>() {
      @Override
      public Set<RequestScheduleResponse> invoke() throws AmbariException {
        return createRequestSchedules(requests);
      }
    });

    notifyCreate(Resource.Type.RequestSchedule, request);

    Set<Resource> associatedResources = new HashSet<>();
    for (RequestScheduleResponse response : responses) {
      Resource resource = new ResourceImpl(Resource.Type.RequestSchedule);
      resource.setProperty(ID, response.getId());
      associatedResources.add(resource);
    }

    return getRequestStatus(null, associatedResources);
  }

  protected  RequestScheduleResourceProvider(AmbariManagementController managementController);

}