public class CollectionUpdateRequest extends Request
gsonBuilder
Constructor and Description |
---|
CollectionUpdateRequest(com.google.gson.JsonObject collection,
com.google.gson.JsonArray items,
boolean add)
Create a new update request for the specified collection and values.
|
CollectionUpdateRequest(String collectionRef,
com.google.gson.JsonArray items,
boolean adding)
Create a new update request for the specified collection and values.
|
Modifier and Type | Method and Description |
---|---|
String |
getBody()
Get the JSON encoded string representation of the object to be updated.
|
Fetch |
getFetch()
Get the current list of fields to be returned on the updated object.
|
void |
setFetch(Fetch fetch)
Set the current list of fields to be returned on the updated object.
|
String |
toUrl()
Convert this request into a url compatible with the WSAPI.
|
addParam, getGsonBuilder, getParams, setGsonBuilder, setParams
public CollectionUpdateRequest(com.google.gson.JsonObject collection, com.google.gson.JsonArray items, boolean add)
collection
- the collection to be updateditems
- the items to be added or removedadd
- true if adding, false if removingpublic CollectionUpdateRequest(String collectionRef, com.google.gson.JsonArray items, boolean adding)
collectionRef
- the ref of the collection to be updated. May be absolute or relative, e.g. "/defect/12345/tags"items
- the items to be added or removedadding
- true if adding, false if removingpublic String getBody()
public Fetch getFetch()
Get the current list of fields to be returned on the updated object.
By default all fields will be returned in the response (fetch=true).public void setFetch(Fetch fetch)
fetch
- the list of fields to be returned.Copyright © 2016. All Rights Reserved.