com.cloudera.api.model
Class ApiBatchRequestElement

java.lang.Object
  extended by com.cloudera.api.model.ApiBatchRequestElement

public class ApiBatchRequestElement
extends Object

A single element of a batch request, often part of a list with other elements.


Nested Class Summary
static class ApiBatchRequestElement.HTTPMethod
           
 
Constructor Summary
ApiBatchRequestElement()
           
 
Method Summary
 boolean equals(Object obj)
           
 String getAcceptType()
          Accept header of the request element.
 Object getBody()
          Optional body of the request.
 String getContentType()
          Content-Type header of the request element.
 ApiBatchRequestElement.HTTPMethod getMethod()
          The type of request (e.g.
 String getUrl()
          The URL of the request.
 int hashCode()
           
 void setAcceptType(String acceptType)
           
 void setBody(Object body)
           
 void setContentType(String contentType)
           
 void setMethod(ApiBatchRequestElement.HTTPMethod method)
           
 void setUrl(String url)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApiBatchRequestElement

public ApiBatchRequestElement()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getMethod

public ApiBatchRequestElement.HTTPMethod getMethod()
The type of request (e.g. POST, GET, etc.).


setMethod

public void setMethod(ApiBatchRequestElement.HTTPMethod method)

getUrl

public String getUrl()
The URL of the request. Must not have a scheme, host, or port. The path should be prefixed with "/api/", and should include path and query parameters.


setUrl

public void setUrl(String url)

getBody

public Object getBody()
Optional body of the request. Must be serialized in accordance with getContentType(). For application/json, use ApiObjectMapper.


setBody

public void setBody(Object body)

getContentType

public String getContentType()
Content-Type header of the request element. If unset, the element will be treated as if the wildcard type had been specified unless it has a body, in which case it will fall back to application/json.


setContentType

public void setContentType(String contentType)

getAcceptType

public String getAcceptType()
Accept header of the request element. The response body (if it exists) will be in this representation. If unset, the element will be treated as if the wildcard type had been requested.


setAcceptType

public void setAcceptType(String acceptType)


Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.