Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.facebook.ads.sdk.Group Maven / Gradle / Ivy
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*/
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.MoreExecutors;
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("install")
private Object mInstall = 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("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 APIRequestGetDocs getDocs() {
return new APIRequestGetDocs(this.getPrefixedId().toString(), context);
}
public APIRequestGetEvents getEvents() {
return new APIRequestGetEvents(this.getPrefixedId().toString(), context);
}
public APIRequestGetFeed getFeed() {
return new APIRequestGetFeed(this.getPrefixedId().toString(), context);
}
public APIRequestCreateFeed createFeed() {
return new APIRequestCreateFeed(this.getPrefixedId().toString(), context);
}
public APIRequestGetFiles getFiles() {
return new APIRequestGetFiles(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 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 Object getFieldInstall() {
return mInstall;
}
public String getFieldLink() {
return mLink;
}
public Long getFieldMemberCount() {
return mMemberCount;
}
public Long getFieldMemberRequestCount() {
return mMemberRequestCount;
}
public String getFieldName() {
return mName;
}
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);
}
}
},
MoreExecutors.directExecutor()
);
};
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);
}
}
},
MoreExecutors.directExecutor()
);
};
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);
}
}
},
MoreExecutors.directExecutor()
);
};
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 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);
}
}
},
MoreExecutors.directExecutor()
);
};
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 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",
"created_time",
"declined_count",
"description",
"discount_code_enabled",
"end_time",
"event_times",
"guest_list_enabled",
"id",
"interested_count",
"is_canceled",
"is_draft",
"is_online",
"is_page_owned",
"maybe_count",
"name",
"noreply_count",
"online_event_format",
"online_event_third_party_url",
"owner",
"parent_group",
"place",
"registration_setting",
"scheduled_publish_time",
"start_time",
"ticket_setting",
"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);
}
}
},
MoreExecutors.directExecutor()
);
};
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 requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetEvents requestCreatedTimeField (boolean value) {
this.requestField("created_time", 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 requestIsOnlineField () {
return this.requestIsOnlineField(true);
}
public APIRequestGetEvents requestIsOnlineField (boolean value) {
this.requestField("is_online", 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 requestOnlineEventFormatField () {
return this.requestOnlineEventFormatField(true);
}
public APIRequestGetEvents requestOnlineEventFormatField (boolean value) {
this.requestField("online_event_format", value);
return this;
}
public APIRequestGetEvents requestOnlineEventThirdPartyUrlField () {
return this.requestOnlineEventThirdPartyUrlField(true);
}
public APIRequestGetEvents requestOnlineEventThirdPartyUrlField (boolean value) {
this.requestField("online_event_third_party_url", 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 requestRegistrationSettingField () {
return this.requestRegistrationSettingField(true);
}
public APIRequestGetEvents requestRegistrationSettingField (boolean value) {
this.requestField("registration_setting", 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 requestTicketSettingField () {
return this.requestTicketSettingField(true);
}
public APIRequestGetEvents requestTicketSettingField (boolean value) {
this.requestField("ticket_setting", 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 APIRequestGetFeed extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"include_hidden",
"q",
"show_expired",
"since",
"until",
"with",
};
public static final String[] FIELDS = {
"actions",
"admin_creator",
"allowed_advertising_objectives",
"application",
"backdated_time",
"call_to_action",
"can_reply_privately",
"caption",
"child_attachments",
"comments_mirroring_domain",
"coordinates",
"created_time",
"description",
"event",
"expanded_height",
"expanded_width",
"feed_targeting",
"from",
"full_picture",
"height",
"icon",
"id",
"instagram_eligibility",
"is_app_share",
"is_eligible_for_promotion",
"is_expired",
"is_hidden",
"is_inline_created",
"is_instagram_eligible",
"is_popular",
"is_published",
"is_spherical",
"link",
"message",
"message_tags",
"multi_share_end_card",
"multi_share_optimized",
"name",
"object_id",
"parent_id",
"permalink_url",
"picture",
"place",
"privacy",
"promotable_id",
"promotion_status",
"properties",
"scheduled_publish_time",
"shares",
"source",
"status_type",
"story",
"story_tags",
"subscribed",
"target",
"targeting",
"timeline_visibility",
"type",
"updated_time",
"via",
"video_buying_eligibility",
"width",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return Post.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 APIRequestGetFeed.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestGetFeed(String nodeId, APIContext context) {
super(context, nodeId, "/feed", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetFeed setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetFeed setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetFeed setIncludeHidden (Boolean includeHidden) {
this.setParam("include_hidden", includeHidden);
return this;
}
public APIRequestGetFeed setIncludeHidden (String includeHidden) {
this.setParam("include_hidden", includeHidden);
return this;
}
public APIRequestGetFeed setQ (String q) {
this.setParam("q", q);
return this;
}
public APIRequestGetFeed setShowExpired (Boolean showExpired) {
this.setParam("show_expired", showExpired);
return this;
}
public APIRequestGetFeed setShowExpired (String showExpired) {
this.setParam("show_expired", showExpired);
return this;
}
public APIRequestGetFeed setSince (String since) {
this.setParam("since", since);
return this;
}
public APIRequestGetFeed setUntil (String until) {
this.setParam("until", until);
return this;
}
public APIRequestGetFeed setWith (String with) {
this.setParam("with", with);
return this;
}
public APIRequestGetFeed requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetFeed requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetFeed requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetFeed requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetFeed requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetFeed requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetFeed requestActionsField () {
return this.requestActionsField(true);
}
public APIRequestGetFeed requestActionsField (boolean value) {
this.requestField("actions", value);
return this;
}
public APIRequestGetFeed requestAdminCreatorField () {
return this.requestAdminCreatorField(true);
}
public APIRequestGetFeed requestAdminCreatorField (boolean value) {
this.requestField("admin_creator", value);
return this;
}
public APIRequestGetFeed requestAllowedAdvertisingObjectivesField () {
return this.requestAllowedAdvertisingObjectivesField(true);
}
public APIRequestGetFeed requestAllowedAdvertisingObjectivesField (boolean value) {
this.requestField("allowed_advertising_objectives", value);
return this;
}
public APIRequestGetFeed requestApplicationField () {
return this.requestApplicationField(true);
}
public APIRequestGetFeed requestApplicationField (boolean value) {
this.requestField("application", value);
return this;
}
public APIRequestGetFeed requestBackdatedTimeField () {
return this.requestBackdatedTimeField(true);
}
public APIRequestGetFeed requestBackdatedTimeField (boolean value) {
this.requestField("backdated_time", value);
return this;
}
public APIRequestGetFeed requestCallToActionField () {
return this.requestCallToActionField(true);
}
public APIRequestGetFeed requestCallToActionField (boolean value) {
this.requestField("call_to_action", value);
return this;
}
public APIRequestGetFeed requestCanReplyPrivatelyField () {
return this.requestCanReplyPrivatelyField(true);
}
public APIRequestGetFeed requestCanReplyPrivatelyField (boolean value) {
this.requestField("can_reply_privately", value);
return this;
}
public APIRequestGetFeed requestCaptionField () {
return this.requestCaptionField(true);
}
public APIRequestGetFeed requestCaptionField (boolean value) {
this.requestField("caption", value);
return this;
}
public APIRequestGetFeed requestChildAttachmentsField () {
return this.requestChildAttachmentsField(true);
}
public APIRequestGetFeed requestChildAttachmentsField (boolean value) {
this.requestField("child_attachments", value);
return this;
}
public APIRequestGetFeed requestCommentsMirroringDomainField () {
return this.requestCommentsMirroringDomainField(true);
}
public APIRequestGetFeed requestCommentsMirroringDomainField (boolean value) {
this.requestField("comments_mirroring_domain", value);
return this;
}
public APIRequestGetFeed requestCoordinatesField () {
return this.requestCoordinatesField(true);
}
public APIRequestGetFeed requestCoordinatesField (boolean value) {
this.requestField("coordinates", value);
return this;
}
public APIRequestGetFeed requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetFeed requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetFeed requestDescriptionField () {
return this.requestDescriptionField(true);
}
public APIRequestGetFeed requestDescriptionField (boolean value) {
this.requestField("description", value);
return this;
}
public APIRequestGetFeed requestEventField () {
return this.requestEventField(true);
}
public APIRequestGetFeed requestEventField (boolean value) {
this.requestField("event", value);
return this;
}
public APIRequestGetFeed requestExpandedHeightField () {
return this.requestExpandedHeightField(true);
}
public APIRequestGetFeed requestExpandedHeightField (boolean value) {
this.requestField("expanded_height", value);
return this;
}
public APIRequestGetFeed requestExpandedWidthField () {
return this.requestExpandedWidthField(true);
}
public APIRequestGetFeed requestExpandedWidthField (boolean value) {
this.requestField("expanded_width", value);
return this;
}
public APIRequestGetFeed requestFeedTargetingField () {
return this.requestFeedTargetingField(true);
}
public APIRequestGetFeed requestFeedTargetingField (boolean value) {
this.requestField("feed_targeting", value);
return this;
}
public APIRequestGetFeed requestFromField () {
return this.requestFromField(true);
}
public APIRequestGetFeed requestFromField (boolean value) {
this.requestField("from", value);
return this;
}
public APIRequestGetFeed requestFullPictureField () {
return this.requestFullPictureField(true);
}
public APIRequestGetFeed requestFullPictureField (boolean value) {
this.requestField("full_picture", value);
return this;
}
public APIRequestGetFeed requestHeightField () {
return this.requestHeightField(true);
}
public APIRequestGetFeed requestHeightField (boolean value) {
this.requestField("height", value);
return this;
}
public APIRequestGetFeed requestIconField () {
return this.requestIconField(true);
}
public APIRequestGetFeed requestIconField (boolean value) {
this.requestField("icon", value);
return this;
}
public APIRequestGetFeed requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetFeed requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetFeed requestInstagramEligibilityField () {
return this.requestInstagramEligibilityField(true);
}
public APIRequestGetFeed requestInstagramEligibilityField (boolean value) {
this.requestField("instagram_eligibility", value);
return this;
}
public APIRequestGetFeed requestIsAppShareField () {
return this.requestIsAppShareField(true);
}
public APIRequestGetFeed requestIsAppShareField (boolean value) {
this.requestField("is_app_share", value);
return this;
}
public APIRequestGetFeed requestIsEligibleForPromotionField () {
return this.requestIsEligibleForPromotionField(true);
}
public APIRequestGetFeed requestIsEligibleForPromotionField (boolean value) {
this.requestField("is_eligible_for_promotion", value);
return this;
}
public APIRequestGetFeed requestIsExpiredField () {
return this.requestIsExpiredField(true);
}
public APIRequestGetFeed requestIsExpiredField (boolean value) {
this.requestField("is_expired", value);
return this;
}
public APIRequestGetFeed requestIsHiddenField () {
return this.requestIsHiddenField(true);
}
public APIRequestGetFeed requestIsHiddenField (boolean value) {
this.requestField("is_hidden", value);
return this;
}
public APIRequestGetFeed requestIsInlineCreatedField () {
return this.requestIsInlineCreatedField(true);
}
public APIRequestGetFeed requestIsInlineCreatedField (boolean value) {
this.requestField("is_inline_created", value);
return this;
}
public APIRequestGetFeed requestIsInstagramEligibleField () {
return this.requestIsInstagramEligibleField(true);
}
public APIRequestGetFeed requestIsInstagramEligibleField (boolean value) {
this.requestField("is_instagram_eligible", value);
return this;
}
public APIRequestGetFeed requestIsPopularField () {
return this.requestIsPopularField(true);
}
public APIRequestGetFeed requestIsPopularField (boolean value) {
this.requestField("is_popular", value);
return this;
}
public APIRequestGetFeed requestIsPublishedField () {
return this.requestIsPublishedField(true);
}
public APIRequestGetFeed requestIsPublishedField (boolean value) {
this.requestField("is_published", value);
return this;
}
public APIRequestGetFeed requestIsSphericalField () {
return this.requestIsSphericalField(true);
}
public APIRequestGetFeed requestIsSphericalField (boolean value) {
this.requestField("is_spherical", value);
return this;
}
public APIRequestGetFeed requestLinkField () {
return this.requestLinkField(true);
}
public APIRequestGetFeed requestLinkField (boolean value) {
this.requestField("link", value);
return this;
}
public APIRequestGetFeed requestMessageField () {
return this.requestMessageField(true);
}
public APIRequestGetFeed requestMessageField (boolean value) {
this.requestField("message", value);
return this;
}
public APIRequestGetFeed requestMessageTagsField () {
return this.requestMessageTagsField(true);
}
public APIRequestGetFeed requestMessageTagsField (boolean value) {
this.requestField("message_tags", value);
return this;
}
public APIRequestGetFeed requestMultiShareEndCardField () {
return this.requestMultiShareEndCardField(true);
}
public APIRequestGetFeed requestMultiShareEndCardField (boolean value) {
this.requestField("multi_share_end_card", value);
return this;
}
public APIRequestGetFeed requestMultiShareOptimizedField () {
return this.requestMultiShareOptimizedField(true);
}
public APIRequestGetFeed requestMultiShareOptimizedField (boolean value) {
this.requestField("multi_share_optimized", value);
return this;
}
public APIRequestGetFeed requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetFeed requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetFeed requestObjectIdField () {
return this.requestObjectIdField(true);
}
public APIRequestGetFeed requestObjectIdField (boolean value) {
this.requestField("object_id", value);
return this;
}
public APIRequestGetFeed requestParentIdField () {
return this.requestParentIdField(true);
}
public APIRequestGetFeed requestParentIdField (boolean value) {
this.requestField("parent_id", value);
return this;
}
public APIRequestGetFeed requestPermalinkUrlField () {
return this.requestPermalinkUrlField(true);
}
public APIRequestGetFeed requestPermalinkUrlField (boolean value) {
this.requestField("permalink_url", value);
return this;
}
public APIRequestGetFeed requestPictureField () {
return this.requestPictureField(true);
}
public APIRequestGetFeed requestPictureField (boolean value) {
this.requestField("picture", value);
return this;
}
public APIRequestGetFeed requestPlaceField () {
return this.requestPlaceField(true);
}
public APIRequestGetFeed requestPlaceField (boolean value) {
this.requestField("place", value);
return this;
}
public APIRequestGetFeed requestPrivacyField () {
return this.requestPrivacyField(true);
}
public APIRequestGetFeed requestPrivacyField (boolean value) {
this.requestField("privacy", value);
return this;
}
public APIRequestGetFeed requestPromotableIdField () {
return this.requestPromotableIdField(true);
}
public APIRequestGetFeed requestPromotableIdField (boolean value) {
this.requestField("promotable_id", value);
return this;
}
public APIRequestGetFeed requestPromotionStatusField () {
return this.requestPromotionStatusField(true);
}
public APIRequestGetFeed requestPromotionStatusField (boolean value) {
this.requestField("promotion_status", value);
return this;
}
public APIRequestGetFeed requestPropertiesField () {
return this.requestPropertiesField(true);
}
public APIRequestGetFeed requestPropertiesField (boolean value) {
this.requestField("properties", value);
return this;
}
public APIRequestGetFeed requestScheduledPublishTimeField () {
return this.requestScheduledPublishTimeField(true);
}
public APIRequestGetFeed requestScheduledPublishTimeField (boolean value) {
this.requestField("scheduled_publish_time", value);
return this;
}
public APIRequestGetFeed requestSharesField () {
return this.requestSharesField(true);
}
public APIRequestGetFeed requestSharesField (boolean value) {
this.requestField("shares", value);
return this;
}
public APIRequestGetFeed requestSourceField () {
return this.requestSourceField(true);
}
public APIRequestGetFeed requestSourceField (boolean value) {
this.requestField("source", value);
return this;
}
public APIRequestGetFeed requestStatusTypeField () {
return this.requestStatusTypeField(true);
}
public APIRequestGetFeed requestStatusTypeField (boolean value) {
this.requestField("status_type", value);
return this;
}
public APIRequestGetFeed requestStoryField () {
return this.requestStoryField(true);
}
public APIRequestGetFeed requestStoryField (boolean value) {
this.requestField("story", value);
return this;
}
public APIRequestGetFeed requestStoryTagsField () {
return this.requestStoryTagsField(true);
}
public APIRequestGetFeed requestStoryTagsField (boolean value) {
this.requestField("story_tags", value);
return this;
}
public APIRequestGetFeed requestSubscribedField () {
return this.requestSubscribedField(true);
}
public APIRequestGetFeed requestSubscribedField (boolean value) {
this.requestField("subscribed", value);
return this;
}
public APIRequestGetFeed requestTargetField () {
return this.requestTargetField(true);
}
public APIRequestGetFeed requestTargetField (boolean value) {
this.requestField("target", value);
return this;
}
public APIRequestGetFeed requestTargetingField () {
return this.requestTargetingField(true);
}
public APIRequestGetFeed requestTargetingField (boolean value) {
this.requestField("targeting", value);
return this;
}
public APIRequestGetFeed requestTimelineVisibilityField () {
return this.requestTimelineVisibilityField(true);
}
public APIRequestGetFeed requestTimelineVisibilityField (boolean value) {
this.requestField("timeline_visibility", value);
return this;
}
public APIRequestGetFeed requestTypeField () {
return this.requestTypeField(true);
}
public APIRequestGetFeed requestTypeField (boolean value) {
this.requestField("type", value);
return this;
}
public APIRequestGetFeed requestUpdatedTimeField () {
return this.requestUpdatedTimeField(true);
}
public APIRequestGetFeed requestUpdatedTimeField (boolean value) {
this.requestField("updated_time", value);
return this;
}
public APIRequestGetFeed requestViaField () {
return this.requestViaField(true);
}
public APIRequestGetFeed requestViaField (boolean value) {
this.requestField("via", value);
return this;
}
public APIRequestGetFeed requestVideoBuyingEligibilityField () {
return this.requestVideoBuyingEligibilityField(true);
}
public APIRequestGetFeed requestVideoBuyingEligibilityField (boolean value) {
this.requestField("video_buying_eligibility", value);
return this;
}
public APIRequestGetFeed requestWidthField () {
return this.requestWidthField(true);
}
public APIRequestGetFeed requestWidthField (boolean value) {
this.requestField("width", value);
return this;
}
}
public static class APIRequestCreateFeed extends APIRequest {
Post lastResponse = null;
@Override
public Post getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"actions",
"album_id",
"android_key_hash",
"application_id",
"asked_fun_fact_prompt_id",
"asset3d_id",
"associated_id",
"attach_place_suggestion",
"attached_media",
"audience_exp",
"backdated_time",
"backdated_time_granularity",
"breaking_news",
"breaking_news_expiration",
"call_to_action",
"caption",
"child_attachments",
"client_mutation_id",
"composer_entry_picker",
"composer_entry_point",
"composer_entry_time",
"composer_session_events_log",
"composer_session_id",
"composer_source_surface",
"composer_type",
"connection_class",
"content_attachment",
"coordinates",
"cta_link",
"cta_type",
"description",
"direct_share_status",
"expanded_height",
"expanded_width",
"feed_targeting",
"formatting",
"fun_fact_prompt_id",
"fun_fact_toastee_id",
"height",
"home_checkin_city_id",
"image_crops",
"implicit_with_tags",
"instant_game_entry_point_data",
"ios_bundle_id",
"is_backout_draft",
"is_boost_intended",
"is_explicit_location",
"is_explicit_share",
"is_group_linking_post",
"is_photo_container",
"link",
"location_source_id",
"manual_privacy",
"message",
"multi_share_end_card",
"multi_share_optimized",
"name",
"nectar_module",
"object_attachment",
"og_action_type_id",
"og_hide_object_attachment",
"og_icon_id",
"og_object_id",
"og_phrase",
"og_set_profile_badge",
"og_suggestion_mechanism",
"page_recommendation",
"picture",
"place",
"place_attachment_setting",
"place_list",
"place_list_data",
"post_surfaces_blacklist",
"posting_to_redspace",
"privacy",
"prompt_id",
"prompt_tracking_string",
"properties",
"proxied_app_id",
"publish_event_id",
"published",
"quote",
"ref",
"referenceable_image_ids",
"referral_id",
"scheduled_publish_time",
"source",
"sponsor_id",
"sponsor_relationship",
"suggested_place_id",
"tags",
"target_surface",
"targeting",
"text_format_metadata",
"text_format_preset_id",
"text_only_place",
"throwback_camera_roll_media",
"thumbnail",
"time_since_original_post",
"title",
"tracking_info",
"unpublished_content_type",
"user_selected_tags",
"video_start_time_ms",
"viewer_coordinates",
"width",
};
public static final String[] FIELDS = {
};
@Override
public Post parseResponse(String response, String header) throws APIException {
return Post.parseResponse(response, getContext(), this, header).head();
}
@Override
public Post execute() throws APIException {
return execute(new HashMap());
}
@Override
public Post 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 Post apply(ResponseWrapper result) {
try {
return APIRequestCreateFeed.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
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 setActions (Object actions) {
this.setParam("actions", actions);
return this;
}
public APIRequestCreateFeed setActions (String actions) {
this.setParam("actions", actions);
return this;
}
public APIRequestCreateFeed setAlbumId (String albumId) {
this.setParam("album_id", albumId);
return this;
}
public APIRequestCreateFeed setAndroidKeyHash (String androidKeyHash) {
this.setParam("android_key_hash", androidKeyHash);
return this;
}
public APIRequestCreateFeed setApplicationId (String applicationId) {
this.setParam("application_id", applicationId);
return this;
}
public APIRequestCreateFeed setAskedFunFactPromptId (Long askedFunFactPromptId) {
this.setParam("asked_fun_fact_prompt_id", askedFunFactPromptId);
return this;
}
public APIRequestCreateFeed setAskedFunFactPromptId (String askedFunFactPromptId) {
this.setParam("asked_fun_fact_prompt_id", askedFunFactPromptId);
return this;
}
public APIRequestCreateFeed setAsset3dId (String asset3dId) {
this.setParam("asset3d_id", asset3dId);
return this;
}
public APIRequestCreateFeed setAssociatedId (String associatedId) {
this.setParam("associated_id", associatedId);
return this;
}
public APIRequestCreateFeed setAttachPlaceSuggestion (Boolean attachPlaceSuggestion) {
this.setParam("attach_place_suggestion", attachPlaceSuggestion);
return this;
}
public APIRequestCreateFeed setAttachPlaceSuggestion (String attachPlaceSuggestion) {
this.setParam("attach_place_suggestion", attachPlaceSuggestion);
return this;
}
public APIRequestCreateFeed setAttachedMedia (List attachedMedia) {
this.setParam("attached_media", attachedMedia);
return this;
}
public APIRequestCreateFeed setAttachedMedia (String attachedMedia) {
this.setParam("attached_media", attachedMedia);
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 setBackdatedTime (String backdatedTime) {
this.setParam("backdated_time", backdatedTime);
return this;
}
public APIRequestCreateFeed setBackdatedTimeGranularity (Post.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 setBreakingNews (Boolean breakingNews) {
this.setParam("breaking_news", breakingNews);
return this;
}
public APIRequestCreateFeed setBreakingNews (String breakingNews) {
this.setParam("breaking_news", breakingNews);
return this;
}
public APIRequestCreateFeed setBreakingNewsExpiration (Long breakingNewsExpiration) {
this.setParam("breaking_news_expiration", breakingNewsExpiration);
return this;
}
public APIRequestCreateFeed setBreakingNewsExpiration (String breakingNewsExpiration) {
this.setParam("breaking_news_expiration", breakingNewsExpiration);
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 setCaption (String caption) {
this.setParam("caption", caption);
return this;
}
public APIRequestCreateFeed setChildAttachments (List childAttachments) {
this.setParam("child_attachments", childAttachments);
return this;
}
public APIRequestCreateFeed setChildAttachments (String childAttachments) {
this.setParam("child_attachments", childAttachments);
return this;
}
public APIRequestCreateFeed setClientMutationId (String clientMutationId) {
this.setParam("client_mutation_id", clientMutationId);
return this;
}
public APIRequestCreateFeed setComposerEntryPicker (String composerEntryPicker) {
this.setParam("composer_entry_picker", composerEntryPicker);
return this;
}
public APIRequestCreateFeed setComposerEntryPoint (String composerEntryPoint) {
this.setParam("composer_entry_point", composerEntryPoint);
return this;
}
public APIRequestCreateFeed setComposerEntryTime (Long composerEntryTime) {
this.setParam("composer_entry_time", composerEntryTime);
return this;
}
public APIRequestCreateFeed setComposerEntryTime (String composerEntryTime) {
this.setParam("composer_entry_time", composerEntryTime);
return this;
}
public APIRequestCreateFeed setComposerSessionEventsLog (String composerSessionEventsLog) {
this.setParam("composer_session_events_log", composerSessionEventsLog);
return this;
}
public APIRequestCreateFeed setComposerSessionId (String composerSessionId) {
this.setParam("composer_session_id", composerSessionId);
return this;
}
public APIRequestCreateFeed setComposerSourceSurface (String composerSourceSurface) {
this.setParam("composer_source_surface", composerSourceSurface);
return this;
}
public APIRequestCreateFeed setComposerType (String composerType) {
this.setParam("composer_type", composerType);
return this;
}
public APIRequestCreateFeed setConnectionClass (String connectionClass) {
this.setParam("connection_class", connectionClass);
return this;
}
public APIRequestCreateFeed setContentAttachment (String contentAttachment) {
this.setParam("content_attachment", contentAttachment);
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 setCtaLink (String ctaLink) {
this.setParam("cta_link", ctaLink);
return this;
}
public APIRequestCreateFeed setCtaType (String ctaType) {
this.setParam("cta_type", ctaType);
return this;
}
public APIRequestCreateFeed setDescription (String description) {
this.setParam("description", description);
return this;
}
public APIRequestCreateFeed setDirectShareStatus (Long directShareStatus) {
this.setParam("direct_share_status", directShareStatus);
return this;
}
public APIRequestCreateFeed setDirectShareStatus (String directShareStatus) {
this.setParam("direct_share_status", directShareStatus);
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 setFeedTargeting (Object feedTargeting) {
this.setParam("feed_targeting", feedTargeting);
return this;
}
public APIRequestCreateFeed setFeedTargeting (String feedTargeting) {
this.setParam("feed_targeting", feedTargeting);
return this;
}
public APIRequestCreateFeed setFormatting (Post.EnumFormatting formatting) {
this.setParam("formatting", formatting);
return this;
}
public APIRequestCreateFeed setFormatting (String formatting) {
this.setParam("formatting", formatting);
return this;
}
public APIRequestCreateFeed setFunFactPromptId (String funFactPromptId) {
this.setParam("fun_fact_prompt_id", funFactPromptId);
return this;
}
public APIRequestCreateFeed setFunFactToasteeId (Long funFactToasteeId) {
this.setParam("fun_fact_toastee_id", funFactToasteeId);
return this;
}
public APIRequestCreateFeed setFunFactToasteeId (String funFactToasteeId) {
this.setParam("fun_fact_toastee_id", funFactToasteeId);
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 setHomeCheckinCityId (Object homeCheckinCityId) {
this.setParam("home_checkin_city_id", homeCheckinCityId);
return this;
}
public APIRequestCreateFeed setHomeCheckinCityId (String homeCheckinCityId) {
this.setParam("home_checkin_city_id", homeCheckinCityId);
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 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 setInstantGameEntryPointData (String instantGameEntryPointData) {
this.setParam("instant_game_entry_point_data", instantGameEntryPointData);
return this;
}
public APIRequestCreateFeed setIosBundleId (String iosBundleId) {
this.setParam("ios_bundle_id", iosBundleId);
return this;
}
public APIRequestCreateFeed setIsBackoutDraft (Boolean isBackoutDraft) {
this.setParam("is_backout_draft", isBackoutDraft);
return this;
}
public APIRequestCreateFeed setIsBackoutDraft (String isBackoutDraft) {
this.setParam("is_backout_draft", isBackoutDraft);
return this;
}
public APIRequestCreateFeed setIsBoostIntended (Boolean isBoostIntended) {
this.setParam("is_boost_intended", isBoostIntended);
return this;
}
public APIRequestCreateFeed setIsBoostIntended (String isBoostIntended) {
this.setParam("is_boost_intended", isBoostIntended);
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 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 setIsGroupLinkingPost (Boolean isGroupLinkingPost) {
this.setParam("is_group_linking_post", isGroupLinkingPost);
return this;
}
public APIRequestCreateFeed setIsGroupLinkingPost (String isGroupLinkingPost) {
this.setParam("is_group_linking_post", isGroupLinkingPost);
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 setLink (String link) {
this.setParam("link", link);
return this;
}
public APIRequestCreateFeed setLocationSourceId (String locationSourceId) {
this.setParam("location_source_id", locationSourceId);
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 setMessage (String message) {
this.setParam("message", message);
return this;
}
public APIRequestCreateFeed setMultiShareEndCard (Boolean multiShareEndCard) {
this.setParam("multi_share_end_card", multiShareEndCard);
return this;
}
public APIRequestCreateFeed setMultiShareEndCard (String multiShareEndCard) {
this.setParam("multi_share_end_card", multiShareEndCard);
return this;
}
public APIRequestCreateFeed setMultiShareOptimized (Boolean multiShareOptimized) {
this.setParam("multi_share_optimized", multiShareOptimized);
return this;
}
public APIRequestCreateFeed setMultiShareOptimized (String multiShareOptimized) {
this.setParam("multi_share_optimized", multiShareOptimized);
return this;
}
public APIRequestCreateFeed setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateFeed setNectarModule (String nectarModule) {
this.setParam("nectar_module", nectarModule);
return this;
}
public APIRequestCreateFeed setObjectAttachment (String objectAttachment) {
this.setParam("object_attachment", objectAttachment);
return this;
}
public APIRequestCreateFeed setOgActionTypeId (String ogActionTypeId) {
this.setParam("og_action_type_id", ogActionTypeId);
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 setOgIconId (String ogIconId) {
this.setParam("og_icon_id", ogIconId);
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 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 setPageRecommendation (String pageRecommendation) {
this.setParam("page_recommendation", pageRecommendation);
return this;
}
public APIRequestCreateFeed setPicture (String picture) {
this.setParam("picture", picture);
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 setPlaceAttachmentSetting (Post.EnumPlaceAttachmentSetting placeAttachmentSetting) {
this.setParam("place_attachment_setting", placeAttachmentSetting);
return this;
}
public APIRequestCreateFeed setPlaceAttachmentSetting (String placeAttachmentSetting) {
this.setParam("place_attachment_setting", placeAttachmentSetting);
return this;
}
public APIRequestCreateFeed setPlaceList (String placeList) {
this.setParam("place_list", placeList);
return this;
}
public APIRequestCreateFeed setPlaceListData (JsonArray placeListData) {
this.setParam("place_list_data", placeListData);
return this;
}
public APIRequestCreateFeed setPlaceListData (String placeListData) {
this.setParam("place_list_data", placeListData);
return this;
}
public APIRequestCreateFeed setPostSurfacesBlacklist (List postSurfacesBlacklist) {
this.setParam("post_surfaces_blacklist", postSurfacesBlacklist);
return this;
}
public APIRequestCreateFeed setPostSurfacesBlacklist (String postSurfacesBlacklist) {
this.setParam("post_surfaces_blacklist", postSurfacesBlacklist);
return this;
}
public APIRequestCreateFeed setPostingToRedspace (Post.EnumPostingToRedspace postingToRedspace) {
this.setParam("posting_to_redspace", postingToRedspace);
return this;
}
public APIRequestCreateFeed setPostingToRedspace (String postingToRedspace) {
this.setParam("posting_to_redspace", postingToRedspace);
return this;
}
public APIRequestCreateFeed setPrivacy (String privacy) {
this.setParam("privacy", privacy);
return this;
}
public APIRequestCreateFeed setPromptId (String promptId) {
this.setParam("prompt_id", promptId);
return this;
}
public APIRequestCreateFeed setPromptTrackingString (String promptTrackingString) {
this.setParam("prompt_tracking_string", promptTrackingString);
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 setProxiedAppId (String proxiedAppId) {
this.setParam("proxied_app_id", proxiedAppId);
return this;
}
public APIRequestCreateFeed setPublishEventId (Long publishEventId) {
this.setParam("publish_event_id", publishEventId);
return this;
}
public APIRequestCreateFeed setPublishEventId (String publishEventId) {
this.setParam("publish_event_id", publishEventId);
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 setQuote (String quote) {
this.setParam("quote", quote);
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 setReferenceableImageIds (List referenceableImageIds) {
this.setParam("referenceable_image_ids", referenceableImageIds);
return this;
}
public APIRequestCreateFeed setReferenceableImageIds (String referenceableImageIds) {
this.setParam("referenceable_image_ids", referenceableImageIds);
return this;
}
public APIRequestCreateFeed setReferralId (String referralId) {
this.setParam("referral_id", referralId);
return this;
}
public APIRequestCreateFeed setScheduledPublishTime (String scheduledPublishTime) {
this.setParam("scheduled_publish_time", scheduledPublishTime);
return this;
}
public APIRequestCreateFeed setSource (String source) {
this.setParam("source", source);
return this;
}
public APIRequestCreateFeed setSponsorId (String sponsorId) {
this.setParam("sponsor_id", sponsorId);
return this;
}
public APIRequestCreateFeed setSponsorRelationship (Long sponsorRelationship) {
this.setParam("sponsor_relationship", sponsorRelationship);
return this;
}
public APIRequestCreateFeed setSponsorRelationship (String sponsorRelationship) {
this.setParam("sponsor_relationship", sponsorRelationship);
return this;
}
public APIRequestCreateFeed setSuggestedPlaceId (Object suggestedPlaceId) {
this.setParam("suggested_place_id", suggestedPlaceId);
return this;
}
public APIRequestCreateFeed setSuggestedPlaceId (String suggestedPlaceId) {
this.setParam("suggested_place_id", suggestedPlaceId);
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 setTargetSurface (Post.EnumTargetSurface targetSurface) {
this.setParam("target_surface", targetSurface);
return this;
}
public APIRequestCreateFeed setTargetSurface (String targetSurface) {
this.setParam("target_surface", targetSurface);
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 setTextFormatMetadata (String textFormatMetadata) {
this.setParam("text_format_metadata", textFormatMetadata);
return this;
}
public APIRequestCreateFeed setTextFormatPresetId (String textFormatPresetId) {
this.setParam("text_format_preset_id", textFormatPresetId);
return this;
}
public APIRequestCreateFeed setTextOnlyPlace (String textOnlyPlace) {
this.setParam("text_only_place", textOnlyPlace);
return this;
}
public APIRequestCreateFeed setThrowbackCameraRollMedia (String throwbackCameraRollMedia) {
this.setParam("throwback_camera_roll_media", throwbackCameraRollMedia);
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 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 setTitle (String title) {
this.setParam("title", title);
return this;
}
public APIRequestCreateFeed setTrackingInfo (String trackingInfo) {
this.setParam("tracking_info", trackingInfo);
return this;
}
public APIRequestCreateFeed setUnpublishedContentType (Post.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 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 setVideoStartTimeMs (Long videoStartTimeMs) {
this.setParam("video_start_time_ms", videoStartTimeMs);
return this;
}
public APIRequestCreateFeed setVideoStartTimeMs (String videoStartTimeMs) {
this.setParam("video_start_time_ms", videoStartTimeMs);
return this;
}
public APIRequestCreateFeed setViewerCoordinates (Object viewerCoordinates) {
this.setParam("viewer_coordinates", viewerCoordinates);
return this;
}
public APIRequestCreateFeed setViewerCoordinates (String viewerCoordinates) {
this.setParam("viewer_coordinates", viewerCoordinates);
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 requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateFeed requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateFeed requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateFeed requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateFeed requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateFeed requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetFiles 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 APIRequestGetFiles.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestGetFiles(String nodeId, APIContext context) {
super(context, nodeId, "/files", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetFiles setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetFiles setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetFiles requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetFiles requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetFiles requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetFiles requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetFiles requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetFiles requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetGroups extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"archived",
"cover",
"created_time",
"description",
"email",
"icon",
"id",
"install",
"link",
"member_count",
"member_request_count",
"name",
"parent",
"permissions",
"privacy",
"purpose",
"subdomain",
"updated_time",
"venue",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return Group.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 APIRequestGetGroups.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestGetGroups(String nodeId, APIContext context) {
super(context, nodeId, "/groups", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetGroups setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetGroups setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetGroups requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetGroups requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetGroups requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetGroups requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetGroups requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetGroups requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetGroups requestArchivedField () {
return this.requestArchivedField(true);
}
public APIRequestGetGroups requestArchivedField (boolean value) {
this.requestField("archived", value);
return this;
}
public APIRequestGetGroups requestCoverField () {
return this.requestCoverField(true);
}
public APIRequestGetGroups requestCoverField (boolean value) {
this.requestField("cover", value);
return this;
}
public APIRequestGetGroups requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetGroups requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetGroups requestDescriptionField () {
return this.requestDescriptionField(true);
}
public APIRequestGetGroups requestDescriptionField (boolean value) {
this.requestField("description", value);
return this;
}
public APIRequestGetGroups requestEmailField () {
return this.requestEmailField(true);
}
public APIRequestGetGroups requestEmailField (boolean value) {
this.requestField("email", value);
return this;
}
public APIRequestGetGroups requestIconField () {
return this.requestIconField(true);
}
public APIRequestGetGroups requestIconField (boolean value) {
this.requestField("icon", value);
return this;
}
public APIRequestGetGroups requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetGroups requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetGroups requestInstallField () {
return this.requestInstallField(true);
}
public APIRequestGetGroups requestInstallField (boolean value) {
this.requestField("install", value);
return this;
}
public APIRequestGetGroups requestLinkField () {
return this.requestLinkField(true);
}
public APIRequestGetGroups requestLinkField (boolean value) {
this.requestField("link", value);
return this;
}
public APIRequestGetGroups requestMemberCountField () {
return this.requestMemberCountField(true);
}
public APIRequestGetGroups requestMemberCountField (boolean value) {
this.requestField("member_count", value);
return this;
}
public APIRequestGetGroups requestMemberRequestCountField () {
return this.requestMemberRequestCountField(true);
}
public APIRequestGetGroups requestMemberRequestCountField (boolean value) {
this.requestField("member_request_count", value);
return this;
}
public APIRequestGetGroups requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetGroups requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetGroups requestParentField () {
return this.requestParentField(true);
}
public APIRequestGetGroups requestParentField (boolean value) {
this.requestField("parent", value);
return this;
}
public APIRequestGetGroups requestPermissionsField () {
return this.requestPermissionsField(true);
}
public APIRequestGetGroups requestPermissionsField (boolean value) {
this.requestField("permissions", value);
return this;
}
public APIRequestGetGroups requestPrivacyField () {
return this.requestPrivacyField(true);
}
public APIRequestGetGroups requestPrivacyField (boolean value) {
this.requestField("privacy", value);
return this;
}
public APIRequestGetGroups requestPurposeField () {
return this.requestPurposeField(true);
}
public APIRequestGetGroups requestPurposeField (boolean value) {
this.requestField("purpose", value);
return this;
}
public APIRequestGetGroups requestSubdomainField () {
return this.requestSubdomainField(true);
}
public APIRequestGetGroups requestSubdomainField (boolean value) {
this.requestField("subdomain", value);
return this;
}
public APIRequestGetGroups requestUpdatedTimeField () {
return this.requestUpdatedTimeField(true);
}
public APIRequestGetGroups requestUpdatedTimeField (boolean value) {
this.requestField("updated_time", value);
return this;
}
public APIRequestGetGroups requestVenueField () {
return this.requestVenueField(true);
}
public APIRequestGetGroups requestVenueField (boolean value) {
this.requestField("venue", value);
return this;
}
}
public static class APIRequestCreateGroup extends APIRequest {
Group lastResponse = null;
@Override
public Group getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"admin",
"description",
"group_icon_id",
"group_type",
"join_setting",
"name",
"parent_id",
"post_permissions",
"post_requires_admin_approval",
"privacy",
"ref",
};
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 APIRequestCreateGroup.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestCreateGroup(String nodeId, APIContext context) {
super(context, nodeId, "/groups", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateGroup setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateGroup setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateGroup setAdmin (Long admin) {
this.setParam("admin", admin);
return this;
}
public APIRequestCreateGroup setAdmin (String admin) {
this.setParam("admin", admin);
return this;
}
public APIRequestCreateGroup setDescription (String description) {
this.setParam("description", description);
return this;
}
public APIRequestCreateGroup setGroupIconId (String groupIconId) {
this.setParam("group_icon_id", groupIconId);
return this;
}
public APIRequestCreateGroup setGroupType (Group.EnumGroupType groupType) {
this.setParam("group_type", groupType);
return this;
}
public APIRequestCreateGroup setGroupType (String groupType) {
this.setParam("group_type", groupType);
return this;
}
public APIRequestCreateGroup setJoinSetting (Group.EnumJoinSetting joinSetting) {
this.setParam("join_setting", joinSetting);
return this;
}
public APIRequestCreateGroup setJoinSetting (String joinSetting) {
this.setParam("join_setting", joinSetting);
return this;
}
public APIRequestCreateGroup setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateGroup setParentId (String parentId) {
this.setParam("parent_id", parentId);
return this;
}
public APIRequestCreateGroup setPostPermissions (Group.EnumPostPermissions postPermissions) {
this.setParam("post_permissions", postPermissions);
return this;
}
public APIRequestCreateGroup setPostPermissions (String postPermissions) {
this.setParam("post_permissions", postPermissions);
return this;
}
public APIRequestCreateGroup setPostRequiresAdminApproval (Boolean postRequiresAdminApproval) {
this.setParam("post_requires_admin_approval", postRequiresAdminApproval);
return this;
}
public APIRequestCreateGroup setPostRequiresAdminApproval (String postRequiresAdminApproval) {
this.setParam("post_requires_admin_approval", postRequiresAdminApproval);
return this;
}
public APIRequestCreateGroup setPrivacy (String privacy) {
this.setParam("privacy", privacy);
return this;
}
public APIRequestCreateGroup setRef (String ref) {
this.setParam("ref", ref);
return this;
}
public APIRequestCreateGroup requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateGroup requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateGroup requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateGroup requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateGroup requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateGroup requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetLiveVideos extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"broadcast_status",
"source",
};
public static final String[] FIELDS = {
"ad_break_config",
"ad_break_failure_reason",
"broadcast_start_time",
"copyright",
"creation_time",
"dash_ingest_url",
"dash_preview_url",
"description",
"embed_html",
"from",
"id",
"ingest_streams",
"is_manual_mode",
"is_reference_only",
"live_views",
"overlay_url",
"permalink_url",
"planned_start_time",
"recommended_encoder_settings",
"seconds_left",
"secure_stream_url",
"status",
"stream_url",
"targeting",
"title",
"total_views",
"video",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return LiveVideo.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 APIRequestGetLiveVideos.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestGetLiveVideos(String nodeId, APIContext context) {
super(context, nodeId, "/live_videos", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetLiveVideos setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetLiveVideos setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetLiveVideos setBroadcastStatus (List broadcastStatus) {
this.setParam("broadcast_status", broadcastStatus);
return this;
}
public APIRequestGetLiveVideos setBroadcastStatus (String broadcastStatus) {
this.setParam("broadcast_status", broadcastStatus);
return this;
}
public APIRequestGetLiveVideos setSource (LiveVideo.EnumSource source) {
this.setParam("source", source);
return this;
}
public APIRequestGetLiveVideos setSource (String source) {
this.setParam("source", source);
return this;
}
public APIRequestGetLiveVideos requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetLiveVideos requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetLiveVideos requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetLiveVideos requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetLiveVideos requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetLiveVideos requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetLiveVideos requestAdBreakConfigField () {
return this.requestAdBreakConfigField(true);
}
public APIRequestGetLiveVideos requestAdBreakConfigField (boolean value) {
this.requestField("ad_break_config", value);
return this;
}
public APIRequestGetLiveVideos requestAdBreakFailureReasonField () {
return this.requestAdBreakFailureReasonField(true);
}
public APIRequestGetLiveVideos requestAdBreakFailureReasonField (boolean value) {
this.requestField("ad_break_failure_reason", value);
return this;
}
public APIRequestGetLiveVideos requestBroadcastStartTimeField () {
return this.requestBroadcastStartTimeField(true);
}
public APIRequestGetLiveVideos requestBroadcastStartTimeField (boolean value) {
this.requestField("broadcast_start_time", value);
return this;
}
public APIRequestGetLiveVideos requestCopyrightField () {
return this.requestCopyrightField(true);
}
public APIRequestGetLiveVideos requestCopyrightField (boolean value) {
this.requestField("copyright", value);
return this;
}
public APIRequestGetLiveVideos requestCreationTimeField () {
return this.requestCreationTimeField(true);
}
public APIRequestGetLiveVideos requestCreationTimeField (boolean value) {
this.requestField("creation_time", value);
return this;
}
public APIRequestGetLiveVideos requestDashIngestUrlField () {
return this.requestDashIngestUrlField(true);
}
public APIRequestGetLiveVideos requestDashIngestUrlField (boolean value) {
this.requestField("dash_ingest_url", value);
return this;
}
public APIRequestGetLiveVideos requestDashPreviewUrlField () {
return this.requestDashPreviewUrlField(true);
}
public APIRequestGetLiveVideos requestDashPreviewUrlField (boolean value) {
this.requestField("dash_preview_url", value);
return this;
}
public APIRequestGetLiveVideos requestDescriptionField () {
return this.requestDescriptionField(true);
}
public APIRequestGetLiveVideos requestDescriptionField (boolean value) {
this.requestField("description", value);
return this;
}
public APIRequestGetLiveVideos requestEmbedHtmlField () {
return this.requestEmbedHtmlField(true);
}
public APIRequestGetLiveVideos requestEmbedHtmlField (boolean value) {
this.requestField("embed_html", value);
return this;
}
public APIRequestGetLiveVideos requestFromField () {
return this.requestFromField(true);
}
public APIRequestGetLiveVideos requestFromField (boolean value) {
this.requestField("from", value);
return this;
}
public APIRequestGetLiveVideos requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetLiveVideos requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetLiveVideos requestIngestStreamsField () {
return this.requestIngestStreamsField(true);
}
public APIRequestGetLiveVideos requestIngestStreamsField (boolean value) {
this.requestField("ingest_streams", value);
return this;
}
public APIRequestGetLiveVideos requestIsManualModeField () {
return this.requestIsManualModeField(true);
}
public APIRequestGetLiveVideos requestIsManualModeField (boolean value) {
this.requestField("is_manual_mode", value);
return this;
}
public APIRequestGetLiveVideos requestIsReferenceOnlyField () {
return this.requestIsReferenceOnlyField(true);
}
public APIRequestGetLiveVideos requestIsReferenceOnlyField (boolean value) {
this.requestField("is_reference_only", value);
return this;
}
public APIRequestGetLiveVideos requestLiveViewsField () {
return this.requestLiveViewsField(true);
}
public APIRequestGetLiveVideos requestLiveViewsField (boolean value) {
this.requestField("live_views", value);
return this;
}
public APIRequestGetLiveVideos requestOverlayUrlField () {
return this.requestOverlayUrlField(true);
}
public APIRequestGetLiveVideos requestOverlayUrlField (boolean value) {
this.requestField("overlay_url", value);
return this;
}
public APIRequestGetLiveVideos requestPermalinkUrlField () {
return this.requestPermalinkUrlField(true);
}
public APIRequestGetLiveVideos requestPermalinkUrlField (boolean value) {
this.requestField("permalink_url", value);
return this;
}
public APIRequestGetLiveVideos requestPlannedStartTimeField () {
return this.requestPlannedStartTimeField(true);
}
public APIRequestGetLiveVideos requestPlannedStartTimeField (boolean value) {
this.requestField("planned_start_time", value);
return this;
}
public APIRequestGetLiveVideos requestRecommendedEncoderSettingsField () {
return this.requestRecommendedEncoderSettingsField(true);
}
public APIRequestGetLiveVideos requestRecommendedEncoderSettingsField (boolean value) {
this.requestField("recommended_encoder_settings", value);
return this;
}
public APIRequestGetLiveVideos requestSecondsLeftField () {
return this.requestSecondsLeftField(true);
}
public APIRequestGetLiveVideos requestSecondsLeftField (boolean value) {
this.requestField("seconds_left", value);
return this;
}
public APIRequestGetLiveVideos requestSecureStreamUrlField () {
return this.requestSecureStreamUrlField(true);
}
public APIRequestGetLiveVideos requestSecureStreamUrlField (boolean value) {
this.requestField("secure_stream_url", value);
return this;
}
public APIRequestGetLiveVideos requestStatusField () {
return this.requestStatusField(true);
}
public APIRequestGetLiveVideos requestStatusField (boolean value) {
this.requestField("status", value);
return this;
}
public APIRequestGetLiveVideos requestStreamUrlField () {
return this.requestStreamUrlField(true);
}
public APIRequestGetLiveVideos requestStreamUrlField (boolean value) {
this.requestField("stream_url", value);
return this;
}
public APIRequestGetLiveVideos requestTargetingField () {
return this.requestTargetingField(true);
}
public APIRequestGetLiveVideos requestTargetingField (boolean value) {
this.requestField("targeting", value);
return this;
}
public APIRequestGetLiveVideos requestTitleField () {
return this.requestTitleField(true);
}
public APIRequestGetLiveVideos requestTitleField (boolean value) {
this.requestField("title", value);
return this;
}
public APIRequestGetLiveVideos requestTotalViewsField () {
return this.requestTotalViewsField(true);
}
public APIRequestGetLiveVideos requestTotalViewsField (boolean value) {
this.requestField("total_views", value);
return this;
}
public APIRequestGetLiveVideos requestVideoField () {
return this.requestVideoField(true);
}
public APIRequestGetLiveVideos requestVideoField (boolean value) {
this.requestField("video", value);
return this;
}
}
public static class APIRequestCreateLiveVideo extends APIRequest {
LiveVideo lastResponse = null;
@Override
public LiveVideo getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"content_tags",
"description",
"enable_backup_ingest",
"encoding_settings",
"event_params",
"fisheye_video_cropped",
"front_z_rotation",
"is_audio_only",
"is_spherical",
"original_fov",
"privacy",
"projection",
"published",
"schedule_custom_profile_image",
"spatial_audio_format",
"status",
"stereoscopic_mode",
"stop_on_delete_stream",
"stream_type",
"title",
};
public static final String[] FIELDS = {
};
@Override
public LiveVideo parseResponse(String response, String header) throws APIException {
return LiveVideo.parseResponse(response, getContext(), this, header).head();
}
@Override
public LiveVideo execute() throws APIException {
return execute(new HashMap());
}
@Override
public LiveVideo 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 LiveVideo apply(ResponseWrapper result) {
try {
return APIRequestCreateLiveVideo.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestCreateLiveVideo(String nodeId, APIContext context) {
super(context, nodeId, "/live_videos", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateLiveVideo setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateLiveVideo setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateLiveVideo setContentTags (List contentTags) {
this.setParam("content_tags", contentTags);
return this;
}
public APIRequestCreateLiveVideo setContentTags (String contentTags) {
this.setParam("content_tags", contentTags);
return this;
}
public APIRequestCreateLiveVideo setDescription (String description) {
this.setParam("description", description);
return this;
}
public APIRequestCreateLiveVideo setEnableBackupIngest (Boolean enableBackupIngest) {
this.setParam("enable_backup_ingest", enableBackupIngest);
return this;
}
public APIRequestCreateLiveVideo setEnableBackupIngest (String enableBackupIngest) {
this.setParam("enable_backup_ingest", enableBackupIngest);
return this;
}
public APIRequestCreateLiveVideo setEncodingSettings (String encodingSettings) {
this.setParam("encoding_settings", encodingSettings);
return this;
}
public APIRequestCreateLiveVideo setEventParams (Object eventParams) {
this.setParam("event_params", eventParams);
return this;
}
public APIRequestCreateLiveVideo setEventParams (String eventParams) {
this.setParam("event_params", eventParams);
return this;
}
public APIRequestCreateLiveVideo setFisheyeVideoCropped (Boolean fisheyeVideoCropped) {
this.setParam("fisheye_video_cropped", fisheyeVideoCropped);
return this;
}
public APIRequestCreateLiveVideo setFisheyeVideoCropped (String fisheyeVideoCropped) {
this.setParam("fisheye_video_cropped", fisheyeVideoCropped);
return this;
}
public APIRequestCreateLiveVideo setFrontZRotation (Double frontZRotation) {
this.setParam("front_z_rotation", frontZRotation);
return this;
}
public APIRequestCreateLiveVideo setFrontZRotation (String frontZRotation) {
this.setParam("front_z_rotation", frontZRotation);
return this;
}
public APIRequestCreateLiveVideo setIsAudioOnly (Boolean isAudioOnly) {
this.setParam("is_audio_only", isAudioOnly);
return this;
}
public APIRequestCreateLiveVideo setIsAudioOnly (String isAudioOnly) {
this.setParam("is_audio_only", isAudioOnly);
return this;
}
public APIRequestCreateLiveVideo setIsSpherical (Boolean isSpherical) {
this.setParam("is_spherical", isSpherical);
return this;
}
public APIRequestCreateLiveVideo setIsSpherical (String isSpherical) {
this.setParam("is_spherical", isSpherical);
return this;
}
public APIRequestCreateLiveVideo setOriginalFov (Long originalFov) {
this.setParam("original_fov", originalFov);
return this;
}
public APIRequestCreateLiveVideo setOriginalFov (String originalFov) {
this.setParam("original_fov", originalFov);
return this;
}
public APIRequestCreateLiveVideo setPrivacy (String privacy) {
this.setParam("privacy", privacy);
return this;
}
public APIRequestCreateLiveVideo setProjection (LiveVideo.EnumProjection projection) {
this.setParam("projection", projection);
return this;
}
public APIRequestCreateLiveVideo setProjection (String projection) {
this.setParam("projection", projection);
return this;
}
public APIRequestCreateLiveVideo setPublished (Boolean published) {
this.setParam("published", published);
return this;
}
public APIRequestCreateLiveVideo setPublished (String published) {
this.setParam("published", published);
return this;
}
public APIRequestCreateLiveVideo setScheduleCustomProfileImage (File scheduleCustomProfileImage) {
this.setParam("schedule_custom_profile_image", scheduleCustomProfileImage);
return this;
}
public APIRequestCreateLiveVideo setScheduleCustomProfileImage (String scheduleCustomProfileImage) {
this.setParam("schedule_custom_profile_image", scheduleCustomProfileImage);
return this;
}
public APIRequestCreateLiveVideo setSpatialAudioFormat (LiveVideo.EnumSpatialAudioFormat spatialAudioFormat) {
this.setParam("spatial_audio_format", spatialAudioFormat);
return this;
}
public APIRequestCreateLiveVideo setSpatialAudioFormat (String spatialAudioFormat) {
this.setParam("spatial_audio_format", spatialAudioFormat);
return this;
}
public APIRequestCreateLiveVideo setStatus (LiveVideo.EnumStatus status) {
this.setParam("status", status);
return this;
}
public APIRequestCreateLiveVideo setStatus (String status) {
this.setParam("status", status);
return this;
}
public APIRequestCreateLiveVideo setStereoscopicMode (LiveVideo.EnumStereoscopicMode stereoscopicMode) {
this.setParam("stereoscopic_mode", stereoscopicMode);
return this;
}
public APIRequestCreateLiveVideo setStereoscopicMode (String stereoscopicMode) {
this.setParam("stereoscopic_mode", stereoscopicMode);
return this;
}
public APIRequestCreateLiveVideo setStopOnDeleteStream (Boolean stopOnDeleteStream) {
this.setParam("stop_on_delete_stream", stopOnDeleteStream);
return this;
}
public APIRequestCreateLiveVideo setStopOnDeleteStream (String stopOnDeleteStream) {
this.setParam("stop_on_delete_stream", stopOnDeleteStream);
return this;
}
public APIRequestCreateLiveVideo setStreamType (LiveVideo.EnumStreamType streamType) {
this.setParam("stream_type", streamType);
return this;
}
public APIRequestCreateLiveVideo setStreamType (String streamType) {
this.setParam("stream_type", streamType);
return this;
}
public APIRequestCreateLiveVideo setTitle (String title) {
this.setParam("title", title);
return this;
}
public APIRequestCreateLiveVideo requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateLiveVideo requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateLiveVideo requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateLiveVideo requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateLiveVideo requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateLiveVideo requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestDeleteMembers extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"email",
"member",
};
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 APIRequestDeleteMembers.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestDeleteMembers(String nodeId, APIContext context) {
super(context, nodeId, "/members", "DELETE", Arrays.asList(PARAMS));
}
@Override
public APIRequestDeleteMembers setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestDeleteMembers setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestDeleteMembers setEmail (String email) {
this.setParam("email", email);
return this;
}
public APIRequestDeleteMembers setMember (Long member) {
this.setParam("member", member);
return this;
}
public APIRequestDeleteMembers setMember (String member) {
this.setParam("member", member);
return this;
}
public APIRequestDeleteMembers requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestDeleteMembers requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteMembers requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestDeleteMembers requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteMembers requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestDeleteMembers requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestCreateMember extends APIRequest {
Group lastResponse = null;
@Override
public Group getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"email",
"from",
"member",
"rate",
"source",
};
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 APIRequestCreateMember.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestCreateMember(String nodeId, APIContext context) {
super(context, nodeId, "/members", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateMember setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateMember setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateMember setEmail (String email) {
this.setParam("email", email);
return this;
}
public APIRequestCreateMember setFrom (Long from) {
this.setParam("from", from);
return this;
}
public APIRequestCreateMember setFrom (String from) {
this.setParam("from", from);
return this;
}
public APIRequestCreateMember setMember (Long member) {
this.setParam("member", member);
return this;
}
public APIRequestCreateMember setMember (String member) {
this.setParam("member", member);
return this;
}
public APIRequestCreateMember setRate (Long rate) {
this.setParam("rate", rate);
return this;
}
public APIRequestCreateMember setRate (String rate) {
this.setParam("rate", rate);
return this;
}
public APIRequestCreateMember setSource (String source) {
this.setParam("source", source);
return this;
}
public APIRequestCreateMember requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateMember requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateMember requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateMember requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateMember requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateMember requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetOptedInMembers extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"about",
"age_range",
"avatar_2d_profile_picture",
"birthday",
"community",
"cover",
"currency",
"education",
"email",
"favorite_athletes",
"favorite_teams",
"first_name",
"gender",
"hometown",
"id",
"id_for_avatars",
"inspirational_people",
"install_type",
"installed",
"is_guest_user",
"is_work_account",
"languages",
"last_name",
"link",
"local_news_megaphone_dismiss_status",
"local_news_subscription_status",
"locale",
"location",
"meeting_for",
"middle_name",
"name",
"name_format",
"payment_pricepoints",
"political",
"profile_pic",
"quotes",
"relationship_status",
"shared_login_upgrade_required_by",
"short_name",
"significant_other",
"sports",
"supports_donate_button_in_live_video",
"third_party_id",
"timezone",
"token_for_business",
"updated_time",
"verified",
"video_upload_limits",
"website",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return User.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 APIRequestGetOptedInMembers.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestGetOptedInMembers(String nodeId, APIContext context) {
super(context, nodeId, "/opted_in_members", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetOptedInMembers setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetOptedInMembers setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetOptedInMembers requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetOptedInMembers requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetOptedInMembers requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetOptedInMembers requestFields (List