com.facebook.ads.sdk.Group Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of facebook-java-business-sdk Show documentation
Show all versions of facebook-java-business-sdk Show documentation
Facebook Business Solutions SDK for Java
/**
* Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to
* use, copy, modify, and distribute this software in source code or binary
* form for use in connection with the web services and APIs provided by
* Facebook.
*
* As with any software that integrates with the Facebook platform, your use
* of this software is subject to the Facebook Developer Principles and
* Policies [http://developers.facebook.com/policy/]. This copyright notice
* shall be included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*/
package com.facebook.ads.sdk;
import java.io.File;
import java.lang.reflect.Modifier;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.common.base.Function;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;
import com.google.gson.JsonObject;
import com.google.gson.JsonArray;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import com.facebook.ads.sdk.APIException.MalformedResponseException;
/**
* This class is auto-generated.
*
* For any issues or feature requests related to this class, please let us know
* on github and we'll fix in our codegen framework. We'll not be able to accept
* pull request for this class.
*
*/
public class Group extends APINode {
@SerializedName("archived")
private Boolean mArchived = null;
@SerializedName("cover")
private CoverPhoto mCover = null;
@SerializedName("created_time")
private String mCreatedTime = null;
@SerializedName("description")
private String mDescription = null;
@SerializedName("email")
private String mEmail = null;
@SerializedName("icon")
private String mIcon = null;
@SerializedName("id")
private String mId = null;
@SerializedName("link")
private String mLink = null;
@SerializedName("member_count")
private Long mMemberCount = null;
@SerializedName("member_request_count")
private Long mMemberRequestCount = null;
@SerializedName("name")
private String mName = null;
@SerializedName("owner")
private Object mOwner = null;
@SerializedName("parent")
private Object mParent = null;
@SerializedName("permissions")
private List mPermissions = null;
@SerializedName("privacy")
private String mPrivacy = null;
@SerializedName("purpose")
private String mPurpose = null;
@SerializedName("subdomain")
private String mSubdomain = null;
@SerializedName("updated_time")
private String mUpdatedTime = null;
@SerializedName("venue")
private Location mVenue = null;
protected static Gson gson = null;
Group() {
}
public Group(Long id, APIContext context) {
this(id.toString(), context);
}
public Group(String id, APIContext context) {
this.mId = id;
this.context = context;
}
public Group fetch() throws APIException{
Group newInstance = fetchById(this.getPrefixedId().toString(), this.context);
this.copyFrom(newInstance);
return this;
}
public static Group fetchById(Long id, APIContext context) throws APIException {
return fetchById(id.toString(), context);
}
public static ListenableFuture fetchByIdAsync(Long id, APIContext context) throws APIException {
return fetchByIdAsync(id.toString(), context);
}
public static Group fetchById(String id, APIContext context) throws APIException {
return
new APIRequestGet(id, context)
.requestAllFields()
.execute();
}
public static ListenableFuture fetchByIdAsync(String id, APIContext context) throws APIException {
return
new APIRequestGet(id, context)
.requestAllFields()
.executeAsync();
}
public static APINodeList fetchByIds(List ids, List fields, APIContext context) throws APIException {
return (APINodeList)(
new APIRequest(context, "", "/", "GET", Group.getParser())
.setParam("ids", APIRequest.joinStringList(ids))
.requestFields(fields)
.execute()
);
}
public static ListenableFuture> fetchByIdsAsync(List ids, List fields, APIContext context) throws APIException {
return
new APIRequest(context, "", "/", "GET", Group.getParser())
.setParam("ids", APIRequest.joinStringList(ids))
.requestFields(fields)
.executeAsyncBase();
}
private String getPrefixedId() {
return getId();
}
public String getId() {
return getFieldId().toString();
}
public static Group loadJSON(String json, APIContext context, String header) {
Group group = getGson().fromJson(json, Group.class);
if (context.isDebug()) {
JsonParser parser = new JsonParser();
JsonElement o1 = parser.parse(json);
JsonElement o2 = parser.parse(group.toString());
if (o1.getAsJsonObject().get("__fb_trace_id__") != null) {
o2.getAsJsonObject().add("__fb_trace_id__", o1.getAsJsonObject().get("__fb_trace_id__"));
}
if (!o1.equals(o2)) {
context.log("[Warning] When parsing response, object is not consistent with JSON:");
context.log("[JSON]" + o1);
context.log("[Object]" + o2);
};
}
group.context = context;
group.rawValue = json;
group.header = header;
return group;
}
public static APINodeList parseResponse(String json, APIContext context, APIRequest request, String header) throws MalformedResponseException {
APINodeList groups = new APINodeList(request, json, header);
JsonArray arr;
JsonObject obj;
JsonParser parser = new JsonParser();
Exception exception = null;
try{
JsonElement result = parser.parse(json);
if (result.isJsonArray()) {
// First, check if it's a pure JSON Array
arr = result.getAsJsonArray();
for (int i = 0; i < arr.size(); i++) {
groups.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header));
};
return groups;
} else if (result.isJsonObject()) {
obj = result.getAsJsonObject();
if (obj.has("data")) {
if (obj.has("paging")) {
JsonObject paging = obj.get("paging").getAsJsonObject();
if (paging.has("cursors")) {
JsonObject cursors = paging.get("cursors").getAsJsonObject();
String before = cursors.has("before") ? cursors.get("before").getAsString() : null;
String after = cursors.has("after") ? cursors.get("after").getAsString() : null;
groups.setCursors(before, after);
}
String previous = paging.has("previous") ? paging.get("previous").getAsString() : null;
String next = paging.has("next") ? paging.get("next").getAsString() : null;
groups.setPaging(previous, next);
if (context.hasAppSecret()) {
groups.setAppSecret(context.getAppSecretProof());
}
}
if (obj.get("data").isJsonArray()) {
// Second, check if it's a JSON array with "data"
arr = obj.get("data").getAsJsonArray();
for (int i = 0; i < arr.size(); i++) {
groups.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header));
};
} else if (obj.get("data").isJsonObject()) {
// Third, check if it's a JSON object with "data"
obj = obj.get("data").getAsJsonObject();
boolean isRedownload = false;
for (String s : new String[]{"campaigns", "adsets", "ads"}) {
if (obj.has(s)) {
isRedownload = true;
obj = obj.getAsJsonObject(s);
for (Map.Entry entry : obj.entrySet()) {
groups.add(loadJSON(entry.getValue().toString(), context, header));
}
break;
}
}
if (!isRedownload) {
groups.add(loadJSON(obj.toString(), context, header));
}
}
return groups;
} else if (obj.has("images")) {
// Fourth, check if it's a map of image objects
obj = obj.get("images").getAsJsonObject();
for (Map.Entry entry : obj.entrySet()) {
groups.add(loadJSON(entry.getValue().toString(), context, header));
}
return groups;
} else {
// Fifth, check if it's an array of objects indexed by id
boolean isIdIndexedArray = true;
for (Map.Entry entry : obj.entrySet()) {
String key = (String) entry.getKey();
if (key.equals("__fb_trace_id__")) {
continue;
}
JsonElement value = (JsonElement) entry.getValue();
if (
value != null &&
value.isJsonObject() &&
value.getAsJsonObject().has("id") &&
value.getAsJsonObject().get("id") != null &&
value.getAsJsonObject().get("id").getAsString().equals(key)
) {
groups.add(loadJSON(value.toString(), context, header));
} else {
isIdIndexedArray = false;
break;
}
}
if (isIdIndexedArray) {
return groups;
}
// Sixth, check if it's pure JsonObject
groups.clear();
groups.add(loadJSON(json, context, header));
return groups;
}
}
} catch (Exception e) {
exception = e;
}
throw new MalformedResponseException(
"Invalid response string: " + json,
exception
);
}
@Override
public APIContext getContext() {
return context;
}
@Override
public void setContext(APIContext context) {
this.context = context;
}
@Override
public String toString() {
return getGson().toJson(this);
}
public APIRequestDeleteAdmins deleteAdmins() {
return new APIRequestDeleteAdmins(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAdmin createAdmin() {
return new APIRequestCreateAdmin(this.getPrefixedId().toString(), context);
}
public APIRequestGetAlbums getAlbums() {
return new APIRequestGetAlbums(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAlbum createAlbum() {
return new APIRequestCreateAlbum(this.getPrefixedId().toString(), context);
}
public APIRequestGetDocs getDocs() {
return new APIRequestGetDocs(this.getPrefixedId().toString(), context);
}
public APIRequestCreateDoc createDoc() {
return new APIRequestCreateDoc(this.getPrefixedId().toString(), context);
}
public APIRequestGetEvents getEvents() {
return new APIRequestGetEvents(this.getPrefixedId().toString(), context);
}
public APIRequestCreateFeed createFeed() {
return new APIRequestCreateFeed(this.getPrefixedId().toString(), context);
}
public APIRequestCreateGroupThread createGroupThread() {
return new APIRequestCreateGroupThread(this.getPrefixedId().toString(), context);
}
public APIRequestGetGroups getGroups() {
return new APIRequestGetGroups(this.getPrefixedId().toString(), context);
}
public APIRequestCreateGroup createGroup() {
return new APIRequestCreateGroup(this.getPrefixedId().toString(), context);
}
public APIRequestGetLiveVideos getLiveVideos() {
return new APIRequestGetLiveVideos(this.getPrefixedId().toString(), context);
}
public APIRequestCreateLiveVideo createLiveVideo() {
return new APIRequestCreateLiveVideo(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteMembers deleteMembers() {
return new APIRequestDeleteMembers(this.getPrefixedId().toString(), context);
}
public APIRequestCreateMember createMember() {
return new APIRequestCreateMember(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteModerators deleteModerators() {
return new APIRequestDeleteModerators(this.getPrefixedId().toString(), context);
}
public APIRequestCreateModerator createModerator() {
return new APIRequestCreateModerator(this.getPrefixedId().toString(), context);
}
public APIRequestCreateOpenGraphActionFeed createOpenGraphActionFeed() {
return new APIRequestCreateOpenGraphActionFeed(this.getPrefixedId().toString(), context);
}
public APIRequestGetOptedInMembers getOptedInMembers() {
return new APIRequestGetOptedInMembers(this.getPrefixedId().toString(), context);
}
public APIRequestCreatePhoto createPhoto() {
return new APIRequestCreatePhoto(this.getPrefixedId().toString(), context);
}
public APIRequestGetPicture getPicture() {
return new APIRequestGetPicture(this.getPrefixedId().toString(), context);
}
public APIRequestGetVideos getVideos() {
return new APIRequestGetVideos(this.getPrefixedId().toString(), context);
}
public APIRequestCreateVideo createVideo() {
return new APIRequestCreateVideo(this.getPrefixedId().toString(), context);
}
public APIRequestGet get() {
return new APIRequestGet(this.getPrefixedId().toString(), context);
}
public APIRequestUpdate update() {
return new APIRequestUpdate(this.getPrefixedId().toString(), context);
}
public Boolean getFieldArchived() {
return mArchived;
}
public CoverPhoto getFieldCover() {
return mCover;
}
public String getFieldCreatedTime() {
return mCreatedTime;
}
public String getFieldDescription() {
return mDescription;
}
public String getFieldEmail() {
return mEmail;
}
public String getFieldIcon() {
return mIcon;
}
public String getFieldId() {
return mId;
}
public String getFieldLink() {
return mLink;
}
public Long getFieldMemberCount() {
return mMemberCount;
}
public Long getFieldMemberRequestCount() {
return mMemberRequestCount;
}
public String getFieldName() {
return mName;
}
public Object getFieldOwner() {
return mOwner;
}
public Object getFieldParent() {
return mParent;
}
public List getFieldPermissions() {
return mPermissions;
}
public String getFieldPrivacy() {
return mPrivacy;
}
public String getFieldPurpose() {
return mPurpose;
}
public String getFieldSubdomain() {
return mSubdomain;
}
public String getFieldUpdatedTime() {
return mUpdatedTime;
}
public Location getFieldVenue() {
return mVenue;
}
public static class APIRequestDeleteAdmins extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"uid",
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestDeleteAdmins.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestDeleteAdmins(String nodeId, APIContext context) {
super(context, nodeId, "/admins", "DELETE", Arrays.asList(PARAMS));
}
@Override
public APIRequestDeleteAdmins setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestDeleteAdmins setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestDeleteAdmins setUid (Long uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestDeleteAdmins setUid (String uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestDeleteAdmins requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestDeleteAdmins requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAdmins requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestDeleteAdmins requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAdmins requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestDeleteAdmins requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestCreateAdmin extends APIRequest {
Group lastResponse = null;
@Override
public Group getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"uid",
};
public static final String[] FIELDS = {
};
@Override
public Group parseResponse(String response, String header) throws APIException {
return Group.parseResponse(response, getContext(), this, header).head();
}
@Override
public Group execute() throws APIException {
return execute(new HashMap());
}
@Override
public Group execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public Group apply(ResponseWrapper result) {
try {
return APIRequestCreateAdmin.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateAdmin(String nodeId, APIContext context) {
super(context, nodeId, "/admins", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAdmin setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAdmin setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAdmin setUid (Long uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestCreateAdmin setUid (String uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestCreateAdmin requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAdmin requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdmin requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAdmin requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdmin requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAdmin requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAlbums extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"backdated_time",
"backdated_time_granularity",
"can_backdate",
"can_upload",
"count",
"cover_photo",
"created_time",
"description",
"edit_link",
"event",
"from",
"id",
"is_user_facing",
"link",
"location",
"modified_major",
"name",
"photo_count",
"place",
"privacy",
"type",
"updated_time",
"video_count",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return Album.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetAlbums.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetAlbums(String nodeId, APIContext context) {
super(context, nodeId, "/albums", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAlbums setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAlbums setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAlbums requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAlbums requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAlbums requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAlbums requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAlbums requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAlbums requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAlbums requestBackdatedTimeField () {
return this.requestBackdatedTimeField(true);
}
public APIRequestGetAlbums requestBackdatedTimeField (boolean value) {
this.requestField("backdated_time", value);
return this;
}
public APIRequestGetAlbums requestBackdatedTimeGranularityField () {
return this.requestBackdatedTimeGranularityField(true);
}
public APIRequestGetAlbums requestBackdatedTimeGranularityField (boolean value) {
this.requestField("backdated_time_granularity", value);
return this;
}
public APIRequestGetAlbums requestCanBackdateField () {
return this.requestCanBackdateField(true);
}
public APIRequestGetAlbums requestCanBackdateField (boolean value) {
this.requestField("can_backdate", value);
return this;
}
public APIRequestGetAlbums requestCanUploadField () {
return this.requestCanUploadField(true);
}
public APIRequestGetAlbums requestCanUploadField (boolean value) {
this.requestField("can_upload", value);
return this;
}
public APIRequestGetAlbums requestCountField () {
return this.requestCountField(true);
}
public APIRequestGetAlbums requestCountField (boolean value) {
this.requestField("count", value);
return this;
}
public APIRequestGetAlbums requestCoverPhotoField () {
return this.requestCoverPhotoField(true);
}
public APIRequestGetAlbums requestCoverPhotoField (boolean value) {
this.requestField("cover_photo", value);
return this;
}
public APIRequestGetAlbums requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetAlbums requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetAlbums requestDescriptionField () {
return this.requestDescriptionField(true);
}
public APIRequestGetAlbums requestDescriptionField (boolean value) {
this.requestField("description", value);
return this;
}
public APIRequestGetAlbums requestEditLinkField () {
return this.requestEditLinkField(true);
}
public APIRequestGetAlbums requestEditLinkField (boolean value) {
this.requestField("edit_link", value);
return this;
}
public APIRequestGetAlbums requestEventField () {
return this.requestEventField(true);
}
public APIRequestGetAlbums requestEventField (boolean value) {
this.requestField("event", value);
return this;
}
public APIRequestGetAlbums requestFromField () {
return this.requestFromField(true);
}
public APIRequestGetAlbums requestFromField (boolean value) {
this.requestField("from", value);
return this;
}
public APIRequestGetAlbums requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAlbums requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAlbums requestIsUserFacingField () {
return this.requestIsUserFacingField(true);
}
public APIRequestGetAlbums requestIsUserFacingField (boolean value) {
this.requestField("is_user_facing", value);
return this;
}
public APIRequestGetAlbums requestLinkField () {
return this.requestLinkField(true);
}
public APIRequestGetAlbums requestLinkField (boolean value) {
this.requestField("link", value);
return this;
}
public APIRequestGetAlbums requestLocationField () {
return this.requestLocationField(true);
}
public APIRequestGetAlbums requestLocationField (boolean value) {
this.requestField("location", value);
return this;
}
public APIRequestGetAlbums requestModifiedMajorField () {
return this.requestModifiedMajorField(true);
}
public APIRequestGetAlbums requestModifiedMajorField (boolean value) {
this.requestField("modified_major", value);
return this;
}
public APIRequestGetAlbums requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAlbums requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAlbums requestPhotoCountField () {
return this.requestPhotoCountField(true);
}
public APIRequestGetAlbums requestPhotoCountField (boolean value) {
this.requestField("photo_count", value);
return this;
}
public APIRequestGetAlbums requestPlaceField () {
return this.requestPlaceField(true);
}
public APIRequestGetAlbums requestPlaceField (boolean value) {
this.requestField("place", value);
return this;
}
public APIRequestGetAlbums requestPrivacyField () {
return this.requestPrivacyField(true);
}
public APIRequestGetAlbums requestPrivacyField (boolean value) {
this.requestField("privacy", value);
return this;
}
public APIRequestGetAlbums requestTypeField () {
return this.requestTypeField(true);
}
public APIRequestGetAlbums requestTypeField (boolean value) {
this.requestField("type", value);
return this;
}
public APIRequestGetAlbums requestUpdatedTimeField () {
return this.requestUpdatedTimeField(true);
}
public APIRequestGetAlbums requestUpdatedTimeField (boolean value) {
this.requestField("updated_time", value);
return this;
}
public APIRequestGetAlbums requestVideoCountField () {
return this.requestVideoCountField(true);
}
public APIRequestGetAlbums requestVideoCountField (boolean value) {
this.requestField("video_count", value);
return this;
}
}
public static class APIRequestCreateAlbum extends APIRequest {
Album lastResponse = null;
@Override
public Album getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"is_default",
"name",
"description",
"contributors",
"make_shared_album",
"location",
"visible",
"privacy",
"place",
"tags",
"message",
};
public static final String[] FIELDS = {
};
@Override
public Album parseResponse(String response, String header) throws APIException {
return Album.parseResponse(response, getContext(), this, header).head();
}
@Override
public Album execute() throws APIException {
return execute(new HashMap());
}
@Override
public Album execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public Album apply(ResponseWrapper result) {
try {
return APIRequestCreateAlbum.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateAlbum(String nodeId, APIContext context) {
super(context, nodeId, "/albums", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAlbum setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAlbum setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAlbum setIsDefault (Boolean isDefault) {
this.setParam("is_default", isDefault);
return this;
}
public APIRequestCreateAlbum setIsDefault (String isDefault) {
this.setParam("is_default", isDefault);
return this;
}
public APIRequestCreateAlbum setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateAlbum setDescription (String description) {
this.setParam("description", description);
return this;
}
public APIRequestCreateAlbum setContributors (List contributors) {
this.setParam("contributors", contributors);
return this;
}
public APIRequestCreateAlbum setContributors (String contributors) {
this.setParam("contributors", contributors);
return this;
}
public APIRequestCreateAlbum setMakeSharedAlbum (Boolean makeSharedAlbum) {
this.setParam("make_shared_album", makeSharedAlbum);
return this;
}
public APIRequestCreateAlbum setMakeSharedAlbum (String makeSharedAlbum) {
this.setParam("make_shared_album", makeSharedAlbum);
return this;
}
public APIRequestCreateAlbum setLocation (String location) {
this.setParam("location", location);
return this;
}
public APIRequestCreateAlbum setVisible (String visible) {
this.setParam("visible", visible);
return this;
}
public APIRequestCreateAlbum setPrivacy (Object privacy) {
this.setParam("privacy", privacy);
return this;
}
public APIRequestCreateAlbum setPrivacy (String privacy) {
this.setParam("privacy", privacy);
return this;
}
public APIRequestCreateAlbum setPlace (Object place) {
this.setParam("place", place);
return this;
}
public APIRequestCreateAlbum setPlace (String place) {
this.setParam("place", place);
return this;
}
public APIRequestCreateAlbum setTags (List tags) {
this.setParam("tags", tags);
return this;
}
public APIRequestCreateAlbum setTags (String tags) {
this.setParam("tags", tags);
return this;
}
public APIRequestCreateAlbum setMessage (String message) {
this.setParam("message", message);
return this;
}
public APIRequestCreateAlbum requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAlbum requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAlbum requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAlbum requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAlbum requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAlbum requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetDocs extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetDocs.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetDocs(String nodeId, APIContext context) {
super(context, nodeId, "/docs", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetDocs setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetDocs setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetDocs requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetDocs requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetDocs requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetDocs requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetDocs requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetDocs requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestCreateDoc extends APIRequest {
APINode lastResponse = null;
@Override
public APINode getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"body",
"title",
};
public static final String[] FIELDS = {
};
@Override
public APINode parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header).head();
}
@Override
public APINode execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINode execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public APINode apply(ResponseWrapper result) {
try {
return APIRequestCreateDoc.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateDoc(String nodeId, APIContext context) {
super(context, nodeId, "/docs", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateDoc setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateDoc setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateDoc setBody (String body) {
this.setParam("body", body);
return this;
}
public APIRequestCreateDoc setTitle (String title) {
this.setParam("title", title);
return this;
}
public APIRequestCreateDoc requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateDoc requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateDoc requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateDoc requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateDoc requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateDoc requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetEvents extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"attending_count",
"can_guests_invite",
"category",
"cover",
"declined_count",
"description",
"discount_code_enabled",
"end_time",
"event_times",
"guest_list_enabled",
"id",
"interested_count",
"is_canceled",
"is_draft",
"is_page_owned",
"maybe_count",
"name",
"noreply_count",
"owner",
"parent_group",
"place",
"scheduled_publish_time",
"start_time",
"ticket_uri",
"ticket_uri_start_sales_time",
"ticketing_privacy_uri",
"ticketing_terms_uri",
"timezone",
"type",
"updated_time",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return Event.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetEvents.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetEvents(String nodeId, APIContext context) {
super(context, nodeId, "/events", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetEvents setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetEvents setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetEvents requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetEvents requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetEvents requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetEvents requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetEvents requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetEvents requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetEvents requestAttendingCountField () {
return this.requestAttendingCountField(true);
}
public APIRequestGetEvents requestAttendingCountField (boolean value) {
this.requestField("attending_count", value);
return this;
}
public APIRequestGetEvents requestCanGuestsInviteField () {
return this.requestCanGuestsInviteField(true);
}
public APIRequestGetEvents requestCanGuestsInviteField (boolean value) {
this.requestField("can_guests_invite", value);
return this;
}
public APIRequestGetEvents requestCategoryField () {
return this.requestCategoryField(true);
}
public APIRequestGetEvents requestCategoryField (boolean value) {
this.requestField("category", value);
return this;
}
public APIRequestGetEvents requestCoverField () {
return this.requestCoverField(true);
}
public APIRequestGetEvents requestCoverField (boolean value) {
this.requestField("cover", value);
return this;
}
public APIRequestGetEvents requestDeclinedCountField () {
return this.requestDeclinedCountField(true);
}
public APIRequestGetEvents requestDeclinedCountField (boolean value) {
this.requestField("declined_count", value);
return this;
}
public APIRequestGetEvents requestDescriptionField () {
return this.requestDescriptionField(true);
}
public APIRequestGetEvents requestDescriptionField (boolean value) {
this.requestField("description", value);
return this;
}
public APIRequestGetEvents requestDiscountCodeEnabledField () {
return this.requestDiscountCodeEnabledField(true);
}
public APIRequestGetEvents requestDiscountCodeEnabledField (boolean value) {
this.requestField("discount_code_enabled", value);
return this;
}
public APIRequestGetEvents requestEndTimeField () {
return this.requestEndTimeField(true);
}
public APIRequestGetEvents requestEndTimeField (boolean value) {
this.requestField("end_time", value);
return this;
}
public APIRequestGetEvents requestEventTimesField () {
return this.requestEventTimesField(true);
}
public APIRequestGetEvents requestEventTimesField (boolean value) {
this.requestField("event_times", value);
return this;
}
public APIRequestGetEvents requestGuestListEnabledField () {
return this.requestGuestListEnabledField(true);
}
public APIRequestGetEvents requestGuestListEnabledField (boolean value) {
this.requestField("guest_list_enabled", value);
return this;
}
public APIRequestGetEvents requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetEvents requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetEvents requestInterestedCountField () {
return this.requestInterestedCountField(true);
}
public APIRequestGetEvents requestInterestedCountField (boolean value) {
this.requestField("interested_count", value);
return this;
}
public APIRequestGetEvents requestIsCanceledField () {
return this.requestIsCanceledField(true);
}
public APIRequestGetEvents requestIsCanceledField (boolean value) {
this.requestField("is_canceled", value);
return this;
}
public APIRequestGetEvents requestIsDraftField () {
return this.requestIsDraftField(true);
}
public APIRequestGetEvents requestIsDraftField (boolean value) {
this.requestField("is_draft", value);
return this;
}
public APIRequestGetEvents requestIsPageOwnedField () {
return this.requestIsPageOwnedField(true);
}
public APIRequestGetEvents requestIsPageOwnedField (boolean value) {
this.requestField("is_page_owned", value);
return this;
}
public APIRequestGetEvents requestMaybeCountField () {
return this.requestMaybeCountField(true);
}
public APIRequestGetEvents requestMaybeCountField (boolean value) {
this.requestField("maybe_count", value);
return this;
}
public APIRequestGetEvents requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetEvents requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetEvents requestNoreplyCountField () {
return this.requestNoreplyCountField(true);
}
public APIRequestGetEvents requestNoreplyCountField (boolean value) {
this.requestField("noreply_count", value);
return this;
}
public APIRequestGetEvents requestOwnerField () {
return this.requestOwnerField(true);
}
public APIRequestGetEvents requestOwnerField (boolean value) {
this.requestField("owner", value);
return this;
}
public APIRequestGetEvents requestParentGroupField () {
return this.requestParentGroupField(true);
}
public APIRequestGetEvents requestParentGroupField (boolean value) {
this.requestField("parent_group", value);
return this;
}
public APIRequestGetEvents requestPlaceField () {
return this.requestPlaceField(true);
}
public APIRequestGetEvents requestPlaceField (boolean value) {
this.requestField("place", value);
return this;
}
public APIRequestGetEvents requestScheduledPublishTimeField () {
return this.requestScheduledPublishTimeField(true);
}
public APIRequestGetEvents requestScheduledPublishTimeField (boolean value) {
this.requestField("scheduled_publish_time", value);
return this;
}
public APIRequestGetEvents requestStartTimeField () {
return this.requestStartTimeField(true);
}
public APIRequestGetEvents requestStartTimeField (boolean value) {
this.requestField("start_time", value);
return this;
}
public APIRequestGetEvents requestTicketUriField () {
return this.requestTicketUriField(true);
}
public APIRequestGetEvents requestTicketUriField (boolean value) {
this.requestField("ticket_uri", value);
return this;
}
public APIRequestGetEvents requestTicketUriStartSalesTimeField () {
return this.requestTicketUriStartSalesTimeField(true);
}
public APIRequestGetEvents requestTicketUriStartSalesTimeField (boolean value) {
this.requestField("ticket_uri_start_sales_time", value);
return this;
}
public APIRequestGetEvents requestTicketingPrivacyUriField () {
return this.requestTicketingPrivacyUriField(true);
}
public APIRequestGetEvents requestTicketingPrivacyUriField (boolean value) {
this.requestField("ticketing_privacy_uri", value);
return this;
}
public APIRequestGetEvents requestTicketingTermsUriField () {
return this.requestTicketingTermsUriField(true);
}
public APIRequestGetEvents requestTicketingTermsUriField (boolean value) {
this.requestField("ticketing_terms_uri", value);
return this;
}
public APIRequestGetEvents requestTimezoneField () {
return this.requestTimezoneField(true);
}
public APIRequestGetEvents requestTimezoneField (boolean value) {
this.requestField("timezone", value);
return this;
}
public APIRequestGetEvents requestTypeField () {
return this.requestTypeField(true);
}
public APIRequestGetEvents requestTypeField (boolean value) {
this.requestField("type", value);
return this;
}
public APIRequestGetEvents requestUpdatedTimeField () {
return this.requestUpdatedTimeField(true);
}
public APIRequestGetEvents requestUpdatedTimeField (boolean value) {
this.requestField("updated_time", value);
return this;
}
}
public static class APIRequestCreateFeed extends APIRequest {
APINode lastResponse = null;
@Override
public APINode getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"picture",
"name",
"link",
"caption",
"description",
"quote",
"source",
"properties",
"object_attachment",
"height",
"width",
"expanded_height",
"expanded_width",
"referral_id",
"thumbnail",
"image_crops",
"call_to_action",
"time_since_original_post",
"client_mutation_id",
"privacy",
"composer_session_id",
"content_attachment",
"actions",
"targeting",
"feed_targeting",
"ref",
"tags",
"place",
"is_explicit_location",
"og_action_type_id",
"og_object_id",
"og_phrase",
"og_icon_id",
"og_set_profile_badge",
"og_suggestion_mechanism",
"og_hide_object_attachment",
"backdated_time",
"backdated_time_granularity",
"published",
"scheduled_publish_time",
"unpublished_content_type",
"application_id",
"proxied_app_id",
"ios_bundle_id",
"android_key_hash",
"user_selected_tags",
"nectar_module",
"manual_privacy",
"audience_exp",
"coordinates",
"is_explicit_share",
"is_photo_container",
"implicit_with_tags",
"child_attachments",
"suggested_place_id",
"attach_place_suggestion",
"viewer_coordinates",
"album_id",
"multi_share_optimized",
"multi_share_end_card",
"title",
"attached_media",
"home_checkin_city_id",
"text_only_place",
"connection_class",
"associated_id",
"posting_to_redspace",
"place_attachment_setting",
"checkin_entry_point",
"is_backout_draft",
"sponsor_id",
"direct_share_status",
"sponsor_relationship",
"referenceable_image_ids",
"prompt_id",
"prompt_tracking_string",
"post_surfaces_blacklist",
"tracking_info",
"text_format_preset_id",
"cta_link",
"cta_type",
"place_list_data",
"formatting",
"target_surface",
"adaptive_type",
"animated_effect_id",
"asked_fun_fact_prompt_id",
"asset3d_id",
"composer_entry_picker",
"composer_entry_point",
"composer_entry_time",
"composer_session_events_log",
"composer_source_surface",
"composer_type",
"fun_fact_prompt_id",
"fun_fact_toastee_id",
"is_group_linking_post",
"has_nickname",
"holiday_card",
"instant_game_entry_point_data",
"is_boost_intended",
"location_source_id",
"message",
"offer_like_post_id",
"page_recommendation",
"place_list",
"publish_event_id",
"react_mode_metadata",
"sales_promo_id",
"text_format_metadata",
"throwback_camera_roll_media",
"video_start_time_ms",
};
public static final String[] FIELDS = {
};
@Override
public APINode parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header).head();
}
@Override
public APINode execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINode execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public APINode apply(ResponseWrapper result) {
try {
return APIRequestCreateFeed.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateFeed(String nodeId, APIContext context) {
super(context, nodeId, "/feed", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateFeed setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateFeed setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateFeed setPicture (String picture) {
this.setParam("picture", picture);
return this;
}
public APIRequestCreateFeed setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateFeed setLink (String link) {
this.setParam("link", link);
return this;
}
public APIRequestCreateFeed setCaption (String caption) {
this.setParam("caption", caption);
return this;
}
public APIRequestCreateFeed setDescription (String description) {
this.setParam("description", description);
return this;
}
public APIRequestCreateFeed setQuote (String quote) {
this.setParam("quote", quote);
return this;
}
public APIRequestCreateFeed setSource (String source) {
this.setParam("source", source);
return this;
}
public APIRequestCreateFeed setProperties (Object properties) {
this.setParam("properties", properties);
return this;
}
public APIRequestCreateFeed setProperties (String properties) {
this.setParam("properties", properties);
return this;
}
public APIRequestCreateFeed setObjectAttachment (String objectAttachment) {
this.setParam("object_attachment", objectAttachment);
return this;
}
public APIRequestCreateFeed setHeight (Long height) {
this.setParam("height", height);
return this;
}
public APIRequestCreateFeed setHeight (String height) {
this.setParam("height", height);
return this;
}
public APIRequestCreateFeed setWidth (Long width) {
this.setParam("width", width);
return this;
}
public APIRequestCreateFeed setWidth (String width) {
this.setParam("width", width);
return this;
}
public APIRequestCreateFeed setExpandedHeight (Long expandedHeight) {
this.setParam("expanded_height", expandedHeight);
return this;
}
public APIRequestCreateFeed setExpandedHeight (String expandedHeight) {
this.setParam("expanded_height", expandedHeight);
return this;
}
public APIRequestCreateFeed setExpandedWidth (Long expandedWidth) {
this.setParam("expanded_width", expandedWidth);
return this;
}
public APIRequestCreateFeed setExpandedWidth (String expandedWidth) {
this.setParam("expanded_width", expandedWidth);
return this;
}
public APIRequestCreateFeed setReferralId (String referralId) {
this.setParam("referral_id", referralId);
return this;
}
public APIRequestCreateFeed setThumbnail (File thumbnail) {
this.setParam("thumbnail", thumbnail);
return this;
}
public APIRequestCreateFeed setThumbnail (String thumbnail) {
this.setParam("thumbnail", thumbnail);
return this;
}
public APIRequestCreateFeed setImageCrops (Map imageCrops) {
this.setParam("image_crops", imageCrops);
return this;
}
public APIRequestCreateFeed setImageCrops (String imageCrops) {
this.setParam("image_crops", imageCrops);
return this;
}
public APIRequestCreateFeed setCallToAction (Object callToAction) {
this.setParam("call_to_action", callToAction);
return this;
}
public APIRequestCreateFeed setCallToAction (String callToAction) {
this.setParam("call_to_action", callToAction);
return this;
}
public APIRequestCreateFeed setTimeSinceOriginalPost (Long timeSinceOriginalPost) {
this.setParam("time_since_original_post", timeSinceOriginalPost);
return this;
}
public APIRequestCreateFeed setTimeSinceOriginalPost (String timeSinceOriginalPost) {
this.setParam("time_since_original_post", timeSinceOriginalPost);
return this;
}
public APIRequestCreateFeed setClientMutationId (String clientMutationId) {
this.setParam("client_mutation_id", clientMutationId);
return this;
}
public APIRequestCreateFeed setPrivacy (Object privacy) {
this.setParam("privacy", privacy);
return this;
}
public APIRequestCreateFeed setPrivacy (String privacy) {
this.setParam("privacy", privacy);
return this;
}
public APIRequestCreateFeed setComposerSessionId (String composerSessionId) {
this.setParam("composer_session_id", composerSessionId);
return this;
}
public APIRequestCreateFeed setContentAttachment (String contentAttachment) {
this.setParam("content_attachment", contentAttachment);
return this;
}
public APIRequestCreateFeed setActions (Object actions) {
this.setParam("actions", actions);
return this;
}
public APIRequestCreateFeed setActions (String actions) {
this.setParam("actions", actions);
return this;
}
public APIRequestCreateFeed setTargeting (Object targeting) {
this.setParam("targeting", targeting);
return this;
}
public APIRequestCreateFeed setTargeting (String targeting) {
this.setParam("targeting", targeting);
return this;
}
public APIRequestCreateFeed setFeedTargeting (Object feedTargeting) {
this.setParam("feed_targeting", feedTargeting);
return this;
}
public APIRequestCreateFeed setFeedTargeting (String feedTargeting) {
this.setParam("feed_targeting", feedTargeting);
return this;
}
public APIRequestCreateFeed setRef (List ref) {
this.setParam("ref", ref);
return this;
}
public APIRequestCreateFeed setRef (String ref) {
this.setParam("ref", ref);
return this;
}
public APIRequestCreateFeed setTags (List tags) {
this.setParam("tags", tags);
return this;
}
public APIRequestCreateFeed setTags (String tags) {
this.setParam("tags", tags);
return this;
}
public APIRequestCreateFeed setPlace (Object place) {
this.setParam("place", place);
return this;
}
public APIRequestCreateFeed setPlace (String place) {
this.setParam("place", place);
return this;
}
public APIRequestCreateFeed setIsExplicitLocation (Boolean isExplicitLocation) {
this.setParam("is_explicit_location", isExplicitLocation);
return this;
}
public APIRequestCreateFeed setIsExplicitLocation (String isExplicitLocation) {
this.setParam("is_explicit_location", isExplicitLocation);
return this;
}
public APIRequestCreateFeed setOgActionTypeId (String ogActionTypeId) {
this.setParam("og_action_type_id", ogActionTypeId);
return this;
}
public APIRequestCreateFeed setOgObjectId (String ogObjectId) {
this.setParam("og_object_id", ogObjectId);
return this;
}
public APIRequestCreateFeed setOgPhrase (String ogPhrase) {
this.setParam("og_phrase", ogPhrase);
return this;
}
public APIRequestCreateFeed setOgIconId (String ogIconId) {
this.setParam("og_icon_id", ogIconId);
return this;
}
public APIRequestCreateFeed setOgSetProfileBadge (Boolean ogSetProfileBadge) {
this.setParam("og_set_profile_badge", ogSetProfileBadge);
return this;
}
public APIRequestCreateFeed setOgSetProfileBadge (String ogSetProfileBadge) {
this.setParam("og_set_profile_badge", ogSetProfileBadge);
return this;
}
public APIRequestCreateFeed setOgSuggestionMechanism (String ogSuggestionMechanism) {
this.setParam("og_suggestion_mechanism", ogSuggestionMechanism);
return this;
}
public APIRequestCreateFeed setOgHideObjectAttachment (Boolean ogHideObjectAttachment) {
this.setParam("og_hide_object_attachment", ogHideObjectAttachment);
return this;
}
public APIRequestCreateFeed setOgHideObjectAttachment (String ogHideObjectAttachment) {
this.setParam("og_hide_object_attachment", ogHideObjectAttachment);
return this;
}
public APIRequestCreateFeed setBackdatedTime (String backdatedTime) {
this.setParam("backdated_time", backdatedTime);
return this;
}
public APIRequestCreateFeed setBackdatedTimeGranularity (EnumBackdatedTimeGranularity backdatedTimeGranularity) {
this.setParam("backdated_time_granularity", backdatedTimeGranularity);
return this;
}
public APIRequestCreateFeed setBackdatedTimeGranularity (String backdatedTimeGranularity) {
this.setParam("backdated_time_granularity", backdatedTimeGranularity);
return this;
}
public APIRequestCreateFeed setPublished (Boolean published) {
this.setParam("published", published);
return this;
}
public APIRequestCreateFeed setPublished (String published) {
this.setParam("published", published);
return this;
}
public APIRequestCreateFeed setScheduledPublishTime (String scheduledPublishTime) {
this.setParam("scheduled_publish_time", scheduledPublishTime);
return this;
}
public APIRequestCreateFeed setUnpublishedContentType (EnumUnpublishedContentType unpublishedContentType) {
this.setParam("unpublished_content_type", unpublishedContentType);
return this;
}
public APIRequestCreateFeed setUnpublishedContentType (String unpublishedContentType) {
this.setParam("unpublished_content_type", unpublishedContentType);
return this;
}
public APIRequestCreateFeed setApplicationId (String applicationId) {
this.setParam("application_id", applicationId);
return this;
}
public APIRequestCreateFeed setProxiedAppId (String proxiedAppId) {
this.setParam("proxied_app_id", proxiedAppId);
return this;
}
public APIRequestCreateFeed setIosBundleId (String iosBundleId) {
this.setParam("ios_bundle_id", iosBundleId);
return this;
}
public APIRequestCreateFeed setAndroidKeyHash (String androidKeyHash) {
this.setParam("android_key_hash", androidKeyHash);
return this;
}
public APIRequestCreateFeed setUserSelectedTags (Boolean userSelectedTags) {
this.setParam("user_selected_tags", userSelectedTags);
return this;
}
public APIRequestCreateFeed setUserSelectedTags (String userSelectedTags) {
this.setParam("user_selected_tags", userSelectedTags);
return this;
}
public APIRequestCreateFeed setNectarModule (String nectarModule) {
this.setParam("nectar_module", nectarModule);
return this;
}
public APIRequestCreateFeed setManualPrivacy (Boolean manualPrivacy) {
this.setParam("manual_privacy", manualPrivacy);
return this;
}
public APIRequestCreateFeed setManualPrivacy (String manualPrivacy) {
this.setParam("manual_privacy", manualPrivacy);
return this;
}
public APIRequestCreateFeed setAudienceExp (Boolean audienceExp) {
this.setParam("audience_exp", audienceExp);
return this;
}
public APIRequestCreateFeed setAudienceExp (String audienceExp) {
this.setParam("audience_exp", audienceExp);
return this;
}
public APIRequestCreateFeed setCoordinates (Object coordinates) {
this.setParam("coordinates", coordinates);
return this;
}
public APIRequestCreateFeed setCoordinates (String coordinates) {
this.setParam("coordinates", coordinates);
return this;
}
public APIRequestCreateFeed setIsExplicitShare (Boolean isExplicitShare) {
this.setParam("is_explicit_share", isExplicitShare);
return this;
}
public APIRequestCreateFeed setIsExplicitShare (String isExplicitShare) {
this.setParam("is_explicit_share", isExplicitShare);
return this;
}
public APIRequestCreateFeed setIsPhotoContainer (Boolean isPhotoContainer) {
this.setParam("is_photo_container", isPhotoContainer);
return this;
}
public APIRequestCreateFeed setIsPhotoContainer (String isPhotoContainer) {
this.setParam("is_photo_container", isPhotoContainer);
return this;
}
public APIRequestCreateFeed setImplicitWithTags (List implicitWithTags) {
this.setParam("implicit_with_tags", implicitWithTags);
return this;
}
public APIRequestCreateFeed setImplicitWithTags (String implicitWithTags) {
this.setParam("implicit_with_tags", implicitWithTags);
return this;
}
public APIRequestCreateFeed setChildAttachments (List