package com.linkedin.restli.examples.greetings.client; import java.util.EnumSet; import java.util.HashMap; import javax.annotation.Generated; import com.linkedin.data.template.DynamicRecordMetadata; import com.linkedin.restli.client.OptionsRequestBuilder; import com.linkedin.restli.client.RestliRequestOptions; import com.linkedin.restli.client.base.BuilderBase; import com.linkedin.restli.common.ResourceMethod; import com.linkedin.restli.common.ResourceSpec; import com.linkedin.restli.common.ResourceSpecImpl; import com.linkedin.restli.examples.greetings.api.Greeting; /** * generated from: com.linkedin.restli.examples.greetings.server.ExceptionsResource * */ @Generated(value = "com.linkedin.pegasus.generator.JavaCodeUtil", comments = "Rest.li Request Builder. Generated from /Users/jodzga/dev/pegasus_trunk/pegasus/restli-int-test-api/src/main/idl/com.linkedin.restli.examples.greetings.client.exceptions.restspec.json.", date = "Thu Mar 31 14:16:21 PDT 2016") public class ExceptionsRequestBuilders extends BuilderBase { private final static String ORIGINAL_RESOURCE_PATH = "exceptions"; private final static ResourceSpec _resourceSpec; static { HashMap<String, DynamicRecordMetadata> requestMetadataMap = new HashMap<String, DynamicRecordMetadata>(); HashMap<String, DynamicRecordMetadata> responseMetadataMap = new HashMap<String, DynamicRecordMetadata>(); HashMap<String, com.linkedin.restli.common.CompoundKey.TypeInfo> keyParts = new HashMap<String, com.linkedin.restli.common.CompoundKey.TypeInfo>(); _resourceSpec = new ResourceSpecImpl(EnumSet.of(ResourceMethod.GET, ResourceMethod.CREATE, ResourceMethod.BATCH_CREATE), requestMetadataMap, responseMetadataMap, Long.class, null, null, Greeting.class, keyParts); } public ExceptionsRequestBuilders() { this(RestliRequestOptions.DEFAULT_OPTIONS); } public ExceptionsRequestBuilders(RestliRequestOptions requestOptions) { super(ORIGINAL_RESOURCE_PATH, requestOptions); } public ExceptionsRequestBuilders(String primaryResourceName) { this(primaryResourceName, RestliRequestOptions.DEFAULT_OPTIONS); } public ExceptionsRequestBuilders(String primaryResourceName, RestliRequestOptions requestOptions) { super(primaryResourceName, requestOptions); } public static String getPrimaryResource() { return ORIGINAL_RESOURCE_PATH; } public OptionsRequestBuilder options() { return new OptionsRequestBuilder(getBaseUriTemplate(), getRequestOptions()); } /** * For a batch create request, responds with an error for requests to create insulting greetings, responds * with 201 created for all other requests. * * @return * builder for the resource method */ public ExceptionsBatchCreateRequestBuilder batchCreate() { return new ExceptionsBatchCreateRequestBuilder(getBaseUriTemplate(), _resourceSpec, getRequestOptions()); } /** * Responds with an error for requests to create insulting greetings, responds * with 201 created for all other requests. * * @return * builder for the resource method */ public ExceptionsCreateRequestBuilder create() { return new ExceptionsCreateRequestBuilder(getBaseUriTemplate(), _resourceSpec, getRequestOptions()); } public ExceptionsGetRequestBuilder get() { return new ExceptionsGetRequestBuilder(getBaseUriTemplate(), _resourceSpec, getRequestOptions()); } }