All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.optaplanner.openshift.employeerostering.shared.spot.SpotRestServiceBuilder Maven / Gradle / Ivy

The newest version!
package org.optaplanner.openshift.employeerostering.shared.spot;

import com.github.nmorel.gwtjackson.client.ObjectMapper;
import com.github.nmorel.gwtjackson.client.ObjectReader;
import com.github.nmorel.gwtjackson.rest.api.RestCallback;
import com.github.nmorel.gwtjackson.rest.api.RestRequestBuilder;
import com.google.gwt.core.client.GWT;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.Long;
import java.lang.Void;
import java.util.List;

/**
 * Generated REST service builder for {@link org.optaplanner.openshift.employeerostering.shared.spot.SpotRestService}.
 */
public final class SpotRestServiceBuilder {
  private static ObjectReader1 objectreader1;

  private static ObjectReader2 objectreader2;

  private static ObjectMapper1 objectmapper1;

  private SpotRestServiceBuilder() {
  }

  private static ObjectReader1 getObjectReader1() {
    if (objectreader1 == null) {
      objectreader1 = GWT.create(ObjectReader1.class);
    }
    return objectreader1;
  }

  private static ObjectReader2 getObjectReader2() {
    if (objectreader2 == null) {
      objectreader2 = GWT.create(ObjectReader2.class);
    }
    return objectreader2;
  }

  private static ObjectMapper1 getObjectMapper1() {
    if (objectmapper1 == null) {
      objectmapper1 = GWT.create(ObjectMapper1.class);
    }
    return objectmapper1;
  }

  public static final RestRequestBuilder> getSpotList(final Integer tenantId) {
    return new RestRequestBuilder>()
          .method(RequestBuilder.GET)
          .url("/tenant/{tenantId}/spot/")
          .addPathParam("tenantId", tenantId)
          .responseConverter(getObjectReader1());
  }

  public static final Request getSpotList(final Integer tenantId, RestCallback> _callback_) {
    return getSpotList(tenantId)
          .callback(_callback_)
          .send();
  }

  public static final RestRequestBuilder getSpot(final Integer tenantId, final Long id) {
    return new RestRequestBuilder()
          .method(RequestBuilder.GET)
          .url("/tenant/{tenantId}/spot/{id}")
          .addPathParam("tenantId", tenantId)
          .addPathParam("id", id)
          .responseConverter(getObjectMapper1());
  }

  public static final Request getSpot(final Integer tenantId, final Long id, RestCallback _callback_) {
    return getSpot(tenantId, id)
          .callback(_callback_)
          .send();
  }

  public static final RestRequestBuilder addSpot(final Integer tenantId, final Spot spot) {
    return new RestRequestBuilder()
          .method(RequestBuilder.POST)
          .url("/tenant/{tenantId}/spot/add")
          .body(spot)
          .bodyConverter(getObjectMapper1())
          .addPathParam("tenantId", tenantId)
          .responseConverter(getObjectMapper1());
  }

  public static final Request addSpot(final Integer tenantId, final Spot spot, RestCallback _callback_) {
    return addSpot(tenantId, spot)
          .callback(_callback_)
          .send();
  }

  public static final RestRequestBuilder updateSpot(final Integer tenantId, final Spot spot) {
    return new RestRequestBuilder()
          .method(RequestBuilder.POST)
          .url("/tenant/{tenantId}/spot/update")
          .body(spot)
          .bodyConverter(getObjectMapper1())
          .addPathParam("tenantId", tenantId)
          .responseConverter(getObjectMapper1());
  }

  public static final Request updateSpot(final Integer tenantId, final Spot spot, RestCallback _callback_) {
    return updateSpot(tenantId, spot)
          .callback(_callback_)
          .send();
  }

  public static final RestRequestBuilder removeSpot(final Integer tenantId, final Long id) {
    return new RestRequestBuilder()
          .method(RequestBuilder.DELETE)
          .url("/tenant/{tenantId}/spot/{id}")
          .addPathParam("tenantId", tenantId)
          .addPathParam("id", id)
          .responseConverter(getObjectReader2());
  }

  public static final Request removeSpot(final Integer tenantId, final Long id, RestCallback _callback_) {
    return removeSpot(tenantId, id)
          .callback(_callback_)
          .send();
  }

  interface ObjectReader1 extends ObjectReader> {
  }

  interface ObjectReader2 extends ObjectReader {
  }

  interface ObjectMapper1 extends ObjectMapper {
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy