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.BusinessAssetGroup Maven / Gradle / Ivy
/**
* Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to
* use, copy, modify, and distribute this software in source code or binary
* form for use in connection with the web services and APIs provided by
* Facebook.
*
* As with any software that integrates with the Facebook platform, your use
* of this software is subject to the Facebook Developer Principles and
* Policies [http://developers.facebook.com/policy/]. This copyright notice
* shall be included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*/
package com.facebook.ads.sdk;
import java.io.File;
import java.lang.reflect.Modifier;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.common.base.Function;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;
import com.google.gson.JsonObject;
import com.google.gson.JsonArray;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import com.facebook.ads.sdk.APIException.MalformedResponseException;
/**
* This class is auto-generated.
*
* For any issues or feature requests related to this class, please let us know
* on github and we'll fix in our codegen framework. We'll not be able to accept
* pull request for this class.
*
*/
public class BusinessAssetGroup extends APINode {
@SerializedName("id")
private String mId = null;
@SerializedName("name")
private String mName = null;
protected static Gson gson = null;
BusinessAssetGroup() {
}
public BusinessAssetGroup(Long id, APIContext context) {
this(id.toString(), context);
}
public BusinessAssetGroup(String id, APIContext context) {
this.mId = id;
this.context = context;
}
public BusinessAssetGroup fetch() throws APIException{
BusinessAssetGroup newInstance = fetchById(this.getPrefixedId().toString(), this.context);
this.copyFrom(newInstance);
return this;
}
public static BusinessAssetGroup 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 BusinessAssetGroup 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", BusinessAssetGroup.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", BusinessAssetGroup.getParser())
.setParam("ids", APIRequest.joinStringList(ids))
.requestFields(fields)
.executeAsyncBase();
}
private String getPrefixedId() {
return getId();
}
public String getId() {
return getFieldId().toString();
}
public static BusinessAssetGroup loadJSON(String json, APIContext context, String header) {
BusinessAssetGroup businessAssetGroup = getGson().fromJson(json, BusinessAssetGroup.class);
if (context.isDebug()) {
JsonParser parser = new JsonParser();
JsonElement o1 = parser.parse(json);
JsonElement o2 = parser.parse(businessAssetGroup.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);
}
}
businessAssetGroup.context = context;
businessAssetGroup.rawValue = json;
businessAssetGroup.header = header;
return businessAssetGroup;
}
public static APINodeList parseResponse(String json, APIContext context, APIRequest request, String header) throws MalformedResponseException {
APINodeList businessAssetGroups = 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++) {
businessAssetGroups.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header));
};
return businessAssetGroups;
} 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;
businessAssetGroups.setCursors(before, after);
}
String previous = paging.has("previous") ? paging.get("previous").getAsString() : null;
String next = paging.has("next") ? paging.get("next").getAsString() : null;
businessAssetGroups.setPaging(previous, next);
if (context.hasAppSecret()) {
businessAssetGroups.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++) {
businessAssetGroups.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()) {
businessAssetGroups.add(loadJSON(entry.getValue().toString(), context, header));
}
break;
}
}
if (!isRedownload) {
businessAssetGroups.add(loadJSON(obj.toString(), context, header));
}
}
return businessAssetGroups;
} 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()) {
businessAssetGroups.add(loadJSON(entry.getValue().toString(), context, header));
}
return businessAssetGroups;
} 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)
) {
businessAssetGroups.add(loadJSON(value.toString(), context, header));
} else {
isIdIndexedArray = false;
break;
}
}
if (isIdIndexedArray) {
return businessAssetGroups;
}
// Sixth, check if it's pure JsonObject
businessAssetGroups.clear();
businessAssetGroups.add(loadJSON(json, context, header));
return businessAssetGroups;
}
}
} 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 APIRequestDeleteAssignedUsers deleteAssignedUsers() {
return new APIRequestDeleteAssignedUsers(this.getPrefixedId().toString(), context);
}
public APIRequestGetAssignedUsers getAssignedUsers() {
return new APIRequestGetAssignedUsers(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAssignedUser createAssignedUser() {
return new APIRequestCreateAssignedUser(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteContainedAdAccounts deleteContainedAdAccounts() {
return new APIRequestDeleteContainedAdAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetContainedAdAccounts getContainedAdAccounts() {
return new APIRequestGetContainedAdAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestCreateContainedAdAccount createContainedAdAccount() {
return new APIRequestCreateContainedAdAccount(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteContainedApplications deleteContainedApplications() {
return new APIRequestDeleteContainedApplications(this.getPrefixedId().toString(), context);
}
public APIRequestGetContainedApplications getContainedApplications() {
return new APIRequestGetContainedApplications(this.getPrefixedId().toString(), context);
}
public APIRequestCreateContainedApplication createContainedApplication() {
return new APIRequestCreateContainedApplication(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteContainedCustomConversions deleteContainedCustomConversions() {
return new APIRequestDeleteContainedCustomConversions(this.getPrefixedId().toString(), context);
}
public APIRequestGetContainedCustomConversions getContainedCustomConversions() {
return new APIRequestGetContainedCustomConversions(this.getPrefixedId().toString(), context);
}
public APIRequestCreateContainedCustomConversion createContainedCustomConversion() {
return new APIRequestCreateContainedCustomConversion(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteContainedInstagramAccounts deleteContainedInstagramAccounts() {
return new APIRequestDeleteContainedInstagramAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetContainedInstagramAccounts getContainedInstagramAccounts() {
return new APIRequestGetContainedInstagramAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestCreateContainedInstagramAccount createContainedInstagramAccount() {
return new APIRequestCreateContainedInstagramAccount(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteContainedOfflineConversionDataSets deleteContainedOfflineConversionDataSets() {
return new APIRequestDeleteContainedOfflineConversionDataSets(this.getPrefixedId().toString(), context);
}
public APIRequestGetContainedOfflineConversionDataSets getContainedOfflineConversionDataSets() {
return new APIRequestGetContainedOfflineConversionDataSets(this.getPrefixedId().toString(), context);
}
public APIRequestCreateContainedOfflineConversionDataSet createContainedOfflineConversionDataSet() {
return new APIRequestCreateContainedOfflineConversionDataSet(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteContainedPages deleteContainedPages() {
return new APIRequestDeleteContainedPages(this.getPrefixedId().toString(), context);
}
public APIRequestGetContainedPages getContainedPages() {
return new APIRequestGetContainedPages(this.getPrefixedId().toString(), context);
}
public APIRequestCreateContainedPage createContainedPage() {
return new APIRequestCreateContainedPage(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteContainedPixels deleteContainedPixels() {
return new APIRequestDeleteContainedPixels(this.getPrefixedId().toString(), context);
}
public APIRequestGetContainedPixels getContainedPixels() {
return new APIRequestGetContainedPixels(this.getPrefixedId().toString(), context);
}
public APIRequestCreateContainedPixel createContainedPixel() {
return new APIRequestCreateContainedPixel(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteContainedProductCatalogs deleteContainedProductCatalogs() {
return new APIRequestDeleteContainedProductCatalogs(this.getPrefixedId().toString(), context);
}
public APIRequestGetContainedProductCatalogs getContainedProductCatalogs() {
return new APIRequestGetContainedProductCatalogs(this.getPrefixedId().toString(), context);
}
public APIRequestCreateContainedProductCatalog createContainedProductCatalog() {
return new APIRequestCreateContainedProductCatalog(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 String getFieldId() {
return mId;
}
public String getFieldName() {
return mName;
}
public static class APIRequestDeleteAssignedUsers extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"user",
};
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 APIRequestDeleteAssignedUsers.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestDeleteAssignedUsers(String nodeId, APIContext context) {
super(context, nodeId, "/assigned_users", "DELETE", Arrays.asList(PARAMS));
}
@Override
public APIRequestDeleteAssignedUsers setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestDeleteAssignedUsers setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestDeleteAssignedUsers setUser (Long user) {
this.setParam("user", user);
return this;
}
public APIRequestDeleteAssignedUsers setUser (String user) {
this.setParam("user", user);
return this;
}
public APIRequestDeleteAssignedUsers requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestDeleteAssignedUsers requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAssignedUsers requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestDeleteAssignedUsers requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAssignedUsers requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestDeleteAssignedUsers requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAssignedUsers extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"business",
};
public static final String[] FIELDS = {
"business",
"id",
"name",
"user_type",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return AssignedUser.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 APIRequestGetAssignedUsers.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetAssignedUsers(String nodeId, APIContext context) {
super(context, nodeId, "/assigned_users", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAssignedUsers setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAssignedUsers setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAssignedUsers setBusiness (String business) {
this.setParam("business", business);
return this;
}
public APIRequestGetAssignedUsers requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAssignedUsers requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAssignedUsers requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAssignedUsers requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAssignedUsers requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAssignedUsers requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAssignedUsers requestBusinessField () {
return this.requestBusinessField(true);
}
public APIRequestGetAssignedUsers requestBusinessField (boolean value) {
this.requestField("business", value);
return this;
}
public APIRequestGetAssignedUsers requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAssignedUsers requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAssignedUsers requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAssignedUsers requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAssignedUsers requestUserTypeField () {
return this.requestUserTypeField(true);
}
public APIRequestGetAssignedUsers requestUserTypeField (boolean value) {
this.requestField("user_type", value);
return this;
}
}
public static class APIRequestCreateAssignedUser extends APIRequest {
BusinessAssetGroup lastResponse = null;
@Override
public BusinessAssetGroup getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"adaccount_tasks",
"offline_conversion_data_set_tasks",
"page_tasks",
"pixel_tasks",
"user",
};
public static final String[] FIELDS = {
};
@Override
public BusinessAssetGroup parseResponse(String response, String header) throws APIException {
return BusinessAssetGroup.parseResponse(response, getContext(), this, header).head();
}
@Override
public BusinessAssetGroup execute() throws APIException {
return execute(new HashMap());
}
@Override
public BusinessAssetGroup 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 BusinessAssetGroup apply(ResponseWrapper result) {
try {
return APIRequestCreateAssignedUser.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateAssignedUser(String nodeId, APIContext context) {
super(context, nodeId, "/assigned_users", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAssignedUser setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAssignedUser setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAssignedUser setAdaccountTasks (List adaccountTasks) {
this.setParam("adaccount_tasks", adaccountTasks);
return this;
}
public APIRequestCreateAssignedUser setAdaccountTasks (String adaccountTasks) {
this.setParam("adaccount_tasks", adaccountTasks);
return this;
}
public APIRequestCreateAssignedUser setOfflineConversionDataSetTasks (List offlineConversionDataSetTasks) {
this.setParam("offline_conversion_data_set_tasks", offlineConversionDataSetTasks);
return this;
}
public APIRequestCreateAssignedUser setOfflineConversionDataSetTasks (String offlineConversionDataSetTasks) {
this.setParam("offline_conversion_data_set_tasks", offlineConversionDataSetTasks);
return this;
}
public APIRequestCreateAssignedUser setPageTasks (List pageTasks) {
this.setParam("page_tasks", pageTasks);
return this;
}
public APIRequestCreateAssignedUser setPageTasks (String pageTasks) {
this.setParam("page_tasks", pageTasks);
return this;
}
public APIRequestCreateAssignedUser setPixelTasks (List pixelTasks) {
this.setParam("pixel_tasks", pixelTasks);
return this;
}
public APIRequestCreateAssignedUser setPixelTasks (String pixelTasks) {
this.setParam("pixel_tasks", pixelTasks);
return this;
}
public APIRequestCreateAssignedUser setUser (Long user) {
this.setParam("user", user);
return this;
}
public APIRequestCreateAssignedUser setUser (String user) {
this.setParam("user", user);
return this;
}
public APIRequestCreateAssignedUser requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAssignedUser requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAssignedUser requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAssignedUser requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAssignedUser requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAssignedUser requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestDeleteContainedAdAccounts extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"asset_id",
};
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 APIRequestDeleteContainedAdAccounts.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestDeleteContainedAdAccounts(String nodeId, APIContext context) {
super(context, nodeId, "/contained_adaccounts", "DELETE", Arrays.asList(PARAMS));
}
@Override
public APIRequestDeleteContainedAdAccounts setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestDeleteContainedAdAccounts setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestDeleteContainedAdAccounts setAssetId (String assetId) {
this.setParam("asset_id", assetId);
return this;
}
public APIRequestDeleteContainedAdAccounts requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestDeleteContainedAdAccounts requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteContainedAdAccounts requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestDeleteContainedAdAccounts requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteContainedAdAccounts requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestDeleteContainedAdAccounts requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetContainedAdAccounts extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"account_id",
"account_status",
"ad_account_promotable_objects",
"age",
"agency_client_declaration",
"amount_spent",
"attribution_spec",
"balance",
"business",
"business_city",
"business_country_code",
"business_name",
"business_state",
"business_street",
"business_street2",
"business_zip",
"capabilities",
"created_time",
"currency",
"disable_reason",
"end_advertiser",
"end_advertiser_name",
"existing_customers",
"extended_credit_invoice_group",
"failed_delivery_checks",
"fb_entity",
"funding_source",
"funding_source_details",
"has_advertiser_opted_in_odax",
"has_migrated_permissions",
"has_page_authorized_adaccount",
"id",
"io_number",
"is_attribution_spec_system_default",
"is_direct_deals_enabled",
"is_in_3ds_authorization_enabled_market",
"is_notifications_enabled",
"is_personal",
"is_prepay_account",
"is_tax_id_required",
"line_numbers",
"media_agency",
"min_campaign_group_spend_cap",
"min_daily_budget",
"name",
"offsite_pixels_tos_accepted",
"owner",
"partner",
"rf_spec",
"show_checkout_experience",
"spend_cap",
"tax_id",
"tax_id_status",
"tax_id_type",
"timezone_id",
"timezone_name",
"timezone_offset_hours_utc",
"tos_accepted",
"user_tasks",
"user_tos_accepted",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return AdAccount.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 APIRequestGetContainedAdAccounts.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetContainedAdAccounts(String nodeId, APIContext context) {
super(context, nodeId, "/contained_adaccounts", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetContainedAdAccounts setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetContainedAdAccounts setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetContainedAdAccounts requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetContainedAdAccounts requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetContainedAdAccounts requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetContainedAdAccounts requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetContainedAdAccounts requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetContainedAdAccounts requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetContainedAdAccounts requestAccountIdField () {
return this.requestAccountIdField(true);
}
public APIRequestGetContainedAdAccounts requestAccountIdField (boolean value) {
this.requestField("account_id", value);
return this;
}
public APIRequestGetContainedAdAccounts requestAccountStatusField () {
return this.requestAccountStatusField(true);
}
public APIRequestGetContainedAdAccounts requestAccountStatusField (boolean value) {
this.requestField("account_status", value);
return this;
}
public APIRequestGetContainedAdAccounts requestAdAccountPromotableObjectsField () {
return this.requestAdAccountPromotableObjectsField(true);
}
public APIRequestGetContainedAdAccounts requestAdAccountPromotableObjectsField (boolean value) {
this.requestField("ad_account_promotable_objects", value);
return this;
}
public APIRequestGetContainedAdAccounts requestAgeField () {
return this.requestAgeField(true);
}
public APIRequestGetContainedAdAccounts requestAgeField (boolean value) {
this.requestField("age", value);
return this;
}
public APIRequestGetContainedAdAccounts requestAgencyClientDeclarationField () {
return this.requestAgencyClientDeclarationField(true);
}
public APIRequestGetContainedAdAccounts requestAgencyClientDeclarationField (boolean value) {
this.requestField("agency_client_declaration", value);
return this;
}
public APIRequestGetContainedAdAccounts requestAmountSpentField () {
return this.requestAmountSpentField(true);
}
public APIRequestGetContainedAdAccounts requestAmountSpentField (boolean value) {
this.requestField("amount_spent", value);
return this;
}
public APIRequestGetContainedAdAccounts requestAttributionSpecField () {
return this.requestAttributionSpecField(true);
}
public APIRequestGetContainedAdAccounts requestAttributionSpecField (boolean value) {
this.requestField("attribution_spec", value);
return this;
}
public APIRequestGetContainedAdAccounts requestBalanceField () {
return this.requestBalanceField(true);
}
public APIRequestGetContainedAdAccounts requestBalanceField (boolean value) {
this.requestField("balance", value);
return this;
}
public APIRequestGetContainedAdAccounts requestBusinessField () {
return this.requestBusinessField(true);
}
public APIRequestGetContainedAdAccounts requestBusinessField (boolean value) {
this.requestField("business", value);
return this;
}
public APIRequestGetContainedAdAccounts requestBusinessCityField () {
return this.requestBusinessCityField(true);
}
public APIRequestGetContainedAdAccounts requestBusinessCityField (boolean value) {
this.requestField("business_city", value);
return this;
}
public APIRequestGetContainedAdAccounts requestBusinessCountryCodeField () {
return this.requestBusinessCountryCodeField(true);
}
public APIRequestGetContainedAdAccounts requestBusinessCountryCodeField (boolean value) {
this.requestField("business_country_code", value);
return this;
}
public APIRequestGetContainedAdAccounts requestBusinessNameField () {
return this.requestBusinessNameField(true);
}
public APIRequestGetContainedAdAccounts requestBusinessNameField (boolean value) {
this.requestField("business_name", value);
return this;
}
public APIRequestGetContainedAdAccounts requestBusinessStateField () {
return this.requestBusinessStateField(true);
}
public APIRequestGetContainedAdAccounts requestBusinessStateField (boolean value) {
this.requestField("business_state", value);
return this;
}
public APIRequestGetContainedAdAccounts requestBusinessStreetField () {
return this.requestBusinessStreetField(true);
}
public APIRequestGetContainedAdAccounts requestBusinessStreetField (boolean value) {
this.requestField("business_street", value);
return this;
}
public APIRequestGetContainedAdAccounts requestBusinessStreet2Field () {
return this.requestBusinessStreet2Field(true);
}
public APIRequestGetContainedAdAccounts requestBusinessStreet2Field (boolean value) {
this.requestField("business_street2", value);
return this;
}
public APIRequestGetContainedAdAccounts requestBusinessZipField () {
return this.requestBusinessZipField(true);
}
public APIRequestGetContainedAdAccounts requestBusinessZipField (boolean value) {
this.requestField("business_zip", value);
return this;
}
public APIRequestGetContainedAdAccounts requestCapabilitiesField () {
return this.requestCapabilitiesField(true);
}
public APIRequestGetContainedAdAccounts requestCapabilitiesField (boolean value) {
this.requestField("capabilities", value);
return this;
}
public APIRequestGetContainedAdAccounts requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetContainedAdAccounts requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetContainedAdAccounts requestCurrencyField () {
return this.requestCurrencyField(true);
}
public APIRequestGetContainedAdAccounts requestCurrencyField (boolean value) {
this.requestField("currency", value);
return this;
}
public APIRequestGetContainedAdAccounts requestDisableReasonField () {
return this.requestDisableReasonField(true);
}
public APIRequestGetContainedAdAccounts requestDisableReasonField (boolean value) {
this.requestField("disable_reason", value);
return this;
}
public APIRequestGetContainedAdAccounts requestEndAdvertiserField () {
return this.requestEndAdvertiserField(true);
}
public APIRequestGetContainedAdAccounts requestEndAdvertiserField (boolean value) {
this.requestField("end_advertiser", value);
return this;
}
public APIRequestGetContainedAdAccounts requestEndAdvertiserNameField () {
return this.requestEndAdvertiserNameField(true);
}
public APIRequestGetContainedAdAccounts requestEndAdvertiserNameField (boolean value) {
this.requestField("end_advertiser_name", value);
return this;
}
public APIRequestGetContainedAdAccounts requestExistingCustomersField () {
return this.requestExistingCustomersField(true);
}
public APIRequestGetContainedAdAccounts requestExistingCustomersField (boolean value) {
this.requestField("existing_customers", value);
return this;
}
public APIRequestGetContainedAdAccounts requestExtendedCreditInvoiceGroupField () {
return this.requestExtendedCreditInvoiceGroupField(true);
}
public APIRequestGetContainedAdAccounts requestExtendedCreditInvoiceGroupField (boolean value) {
this.requestField("extended_credit_invoice_group", value);
return this;
}
public APIRequestGetContainedAdAccounts requestFailedDeliveryChecksField () {
return this.requestFailedDeliveryChecksField(true);
}
public APIRequestGetContainedAdAccounts requestFailedDeliveryChecksField (boolean value) {
this.requestField("failed_delivery_checks", value);
return this;
}
public APIRequestGetContainedAdAccounts requestFbEntityField () {
return this.requestFbEntityField(true);
}
public APIRequestGetContainedAdAccounts requestFbEntityField (boolean value) {
this.requestField("fb_entity", value);
return this;
}
public APIRequestGetContainedAdAccounts requestFundingSourceField () {
return this.requestFundingSourceField(true);
}
public APIRequestGetContainedAdAccounts requestFundingSourceField (boolean value) {
this.requestField("funding_source", value);
return this;
}
public APIRequestGetContainedAdAccounts requestFundingSourceDetailsField () {
return this.requestFundingSourceDetailsField(true);
}
public APIRequestGetContainedAdAccounts requestFundingSourceDetailsField (boolean value) {
this.requestField("funding_source_details", value);
return this;
}
public APIRequestGetContainedAdAccounts requestHasAdvertiserOptedInOdaxField () {
return this.requestHasAdvertiserOptedInOdaxField(true);
}
public APIRequestGetContainedAdAccounts requestHasAdvertiserOptedInOdaxField (boolean value) {
this.requestField("has_advertiser_opted_in_odax", value);
return this;
}
public APIRequestGetContainedAdAccounts requestHasMigratedPermissionsField () {
return this.requestHasMigratedPermissionsField(true);
}
public APIRequestGetContainedAdAccounts requestHasMigratedPermissionsField (boolean value) {
this.requestField("has_migrated_permissions", value);
return this;
}
public APIRequestGetContainedAdAccounts requestHasPageAuthorizedAdaccountField () {
return this.requestHasPageAuthorizedAdaccountField(true);
}
public APIRequestGetContainedAdAccounts requestHasPageAuthorizedAdaccountField (boolean value) {
this.requestField("has_page_authorized_adaccount", value);
return this;
}
public APIRequestGetContainedAdAccounts requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetContainedAdAccounts requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetContainedAdAccounts requestIoNumberField () {
return this.requestIoNumberField(true);
}
public APIRequestGetContainedAdAccounts requestIoNumberField (boolean value) {
this.requestField("io_number", value);
return this;
}
public APIRequestGetContainedAdAccounts requestIsAttributionSpecSystemDefaultField () {
return this.requestIsAttributionSpecSystemDefaultField(true);
}
public APIRequestGetContainedAdAccounts requestIsAttributionSpecSystemDefaultField (boolean value) {
this.requestField("is_attribution_spec_system_default", value);
return this;
}
public APIRequestGetContainedAdAccounts requestIsDirectDealsEnabledField () {
return this.requestIsDirectDealsEnabledField(true);
}
public APIRequestGetContainedAdAccounts requestIsDirectDealsEnabledField (boolean value) {
this.requestField("is_direct_deals_enabled", value);
return this;
}
public APIRequestGetContainedAdAccounts requestIsIn3dsAuthorizationEnabledMarketField () {
return this.requestIsIn3dsAuthorizationEnabledMarketField(true);
}
public APIRequestGetContainedAdAccounts requestIsIn3dsAuthorizationEnabledMarketField (boolean value) {
this.requestField("is_in_3ds_authorization_enabled_market", value);
return this;
}
public APIRequestGetContainedAdAccounts requestIsNotificationsEnabledField () {
return this.requestIsNotificationsEnabledField(true);
}
public APIRequestGetContainedAdAccounts requestIsNotificationsEnabledField (boolean value) {
this.requestField("is_notifications_enabled", value);
return this;
}
public APIRequestGetContainedAdAccounts requestIsPersonalField () {
return this.requestIsPersonalField(true);
}
public APIRequestGetContainedAdAccounts requestIsPersonalField (boolean value) {
this.requestField("is_personal", value);
return this;
}
public APIRequestGetContainedAdAccounts requestIsPrepayAccountField () {
return this.requestIsPrepayAccountField(true);
}
public APIRequestGetContainedAdAccounts requestIsPrepayAccountField (boolean value) {
this.requestField("is_prepay_account", value);
return this;
}
public APIRequestGetContainedAdAccounts requestIsTaxIdRequiredField () {
return this.requestIsTaxIdRequiredField(true);
}
public APIRequestGetContainedAdAccounts requestIsTaxIdRequiredField (boolean value) {
this.requestField("is_tax_id_required", value);
return this;
}
public APIRequestGetContainedAdAccounts requestLineNumbersField () {
return this.requestLineNumbersField(true);
}
public APIRequestGetContainedAdAccounts requestLineNumbersField (boolean value) {
this.requestField("line_numbers", value);
return this;
}
public APIRequestGetContainedAdAccounts requestMediaAgencyField () {
return this.requestMediaAgencyField(true);
}
public APIRequestGetContainedAdAccounts requestMediaAgencyField (boolean value) {
this.requestField("media_agency", value);
return this;
}
public APIRequestGetContainedAdAccounts requestMinCampaignGroupSpendCapField () {
return this.requestMinCampaignGroupSpendCapField(true);
}
public APIRequestGetContainedAdAccounts requestMinCampaignGroupSpendCapField (boolean value) {
this.requestField("min_campaign_group_spend_cap", value);
return this;
}
public APIRequestGetContainedAdAccounts requestMinDailyBudgetField () {
return this.requestMinDailyBudgetField(true);
}
public APIRequestGetContainedAdAccounts requestMinDailyBudgetField (boolean value) {
this.requestField("min_daily_budget", value);
return this;
}
public APIRequestGetContainedAdAccounts requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetContainedAdAccounts requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetContainedAdAccounts requestOffsitePixelsTosAcceptedField () {
return this.requestOffsitePixelsTosAcceptedField(true);
}
public APIRequestGetContainedAdAccounts requestOffsitePixelsTosAcceptedField (boolean value) {
this.requestField("offsite_pixels_tos_accepted", value);
return this;
}
public APIRequestGetContainedAdAccounts requestOwnerField () {
return this.requestOwnerField(true);
}
public APIRequestGetContainedAdAccounts requestOwnerField (boolean value) {
this.requestField("owner", value);
return this;
}
public APIRequestGetContainedAdAccounts requestPartnerField () {
return this.requestPartnerField(true);
}
public APIRequestGetContainedAdAccounts requestPartnerField (boolean value) {
this.requestField("partner", value);
return this;
}
public APIRequestGetContainedAdAccounts requestRfSpecField () {
return this.requestRfSpecField(true);
}
public APIRequestGetContainedAdAccounts requestRfSpecField (boolean value) {
this.requestField("rf_spec", value);
return this;
}
public APIRequestGetContainedAdAccounts requestShowCheckoutExperienceField () {
return this.requestShowCheckoutExperienceField(true);
}
public APIRequestGetContainedAdAccounts requestShowCheckoutExperienceField (boolean value) {
this.requestField("show_checkout_experience", value);
return this;
}
public APIRequestGetContainedAdAccounts requestSpendCapField () {
return this.requestSpendCapField(true);
}
public APIRequestGetContainedAdAccounts requestSpendCapField (boolean value) {
this.requestField("spend_cap", value);
return this;
}
public APIRequestGetContainedAdAccounts requestTaxIdField () {
return this.requestTaxIdField(true);
}
public APIRequestGetContainedAdAccounts requestTaxIdField (boolean value) {
this.requestField("tax_id", value);
return this;
}
public APIRequestGetContainedAdAccounts requestTaxIdStatusField () {
return this.requestTaxIdStatusField(true);
}
public APIRequestGetContainedAdAccounts requestTaxIdStatusField (boolean value) {
this.requestField("tax_id_status", value);
return this;
}
public APIRequestGetContainedAdAccounts requestTaxIdTypeField () {
return this.requestTaxIdTypeField(true);
}
public APIRequestGetContainedAdAccounts requestTaxIdTypeField (boolean value) {
this.requestField("tax_id_type", value);
return this;
}
public APIRequestGetContainedAdAccounts requestTimezoneIdField () {
return this.requestTimezoneIdField(true);
}
public APIRequestGetContainedAdAccounts requestTimezoneIdField (boolean value) {
this.requestField("timezone_id", value);
return this;
}
public APIRequestGetContainedAdAccounts requestTimezoneNameField () {
return this.requestTimezoneNameField(true);
}
public APIRequestGetContainedAdAccounts requestTimezoneNameField (boolean value) {
this.requestField("timezone_name", value);
return this;
}
public APIRequestGetContainedAdAccounts requestTimezoneOffsetHoursUtcField () {
return this.requestTimezoneOffsetHoursUtcField(true);
}
public APIRequestGetContainedAdAccounts requestTimezoneOffsetHoursUtcField (boolean value) {
this.requestField("timezone_offset_hours_utc", value);
return this;
}
public APIRequestGetContainedAdAccounts requestTosAcceptedField () {
return this.requestTosAcceptedField(true);
}
public APIRequestGetContainedAdAccounts requestTosAcceptedField (boolean value) {
this.requestField("tos_accepted", value);
return this;
}
public APIRequestGetContainedAdAccounts requestUserTasksField () {
return this.requestUserTasksField(true);
}
public APIRequestGetContainedAdAccounts requestUserTasksField (boolean value) {
this.requestField("user_tasks", value);
return this;
}
public APIRequestGetContainedAdAccounts requestUserTosAcceptedField () {
return this.requestUserTosAcceptedField(true);
}
public APIRequestGetContainedAdAccounts requestUserTosAcceptedField (boolean value) {
this.requestField("user_tos_accepted", value);
return this;
}
}
public static class APIRequestCreateContainedAdAccount extends APIRequest {
BusinessAssetGroup lastResponse = null;
@Override
public BusinessAssetGroup getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"asset_id",
};
public static final String[] FIELDS = {
};
@Override
public BusinessAssetGroup parseResponse(String response, String header) throws APIException {
return BusinessAssetGroup.parseResponse(response, getContext(), this, header).head();
}
@Override
public BusinessAssetGroup execute() throws APIException {
return execute(new HashMap());
}
@Override
public BusinessAssetGroup 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 BusinessAssetGroup apply(ResponseWrapper result) {
try {
return APIRequestCreateContainedAdAccount.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateContainedAdAccount(String nodeId, APIContext context) {
super(context, nodeId, "/contained_adaccounts", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateContainedAdAccount setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateContainedAdAccount setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateContainedAdAccount setAssetId (String assetId) {
this.setParam("asset_id", assetId);
return this;
}
public APIRequestCreateContainedAdAccount requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateContainedAdAccount requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateContainedAdAccount requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateContainedAdAccount requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateContainedAdAccount requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateContainedAdAccount requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestDeleteContainedApplications extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"asset_id",
};
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 APIRequestDeleteContainedApplications.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestDeleteContainedApplications(String nodeId, APIContext context) {
super(context, nodeId, "/contained_applications", "DELETE", Arrays.asList(PARAMS));
}
@Override
public APIRequestDeleteContainedApplications setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestDeleteContainedApplications setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestDeleteContainedApplications setAssetId (String assetId) {
this.setParam("asset_id", assetId);
return this;
}
public APIRequestDeleteContainedApplications requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestDeleteContainedApplications requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteContainedApplications requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestDeleteContainedApplications requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteContainedApplications requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestDeleteContainedApplications requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetContainedApplications extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"aam_rules",
"an_ad_space_limit",
"an_platforms",
"android_key_hash",
"android_sdk_error_categories",
"app_domains",
"app_events_config",
"app_events_feature_bitmask",
"app_events_session_timeout",
"app_install_tracked",
"app_name",
"app_signals_binding_ios",
"app_type",
"auth_dialog_data_help_url",
"auth_dialog_headline",
"auth_dialog_perms_explanation",
"auth_referral_default_activity_privacy",
"auth_referral_enabled",
"auth_referral_extended_perms",
"auth_referral_friend_perms",
"auth_referral_response_type",
"auth_referral_user_perms",
"auto_event_mapping_android",
"auto_event_mapping_ios",
"auto_event_setup_enabled",
"canvas_fluid_height",
"canvas_fluid_width",
"canvas_url",
"category",
"client_config",
"company",
"configured_ios_sso",
"contact_email",
"created_time",
"creator_uid",
"daily_active_users",
"daily_active_users_rank",
"deauth_callback_url",
"default_share_mode",
"description",
"financial_id",
"gdpv4_chrome_custom_tabs_enabled",
"gdpv4_enabled",
"gdpv4_nux_content",
"gdpv4_nux_enabled",
"has_messenger_product",
"hosting_url",
"icon_url",
"id",
"ios_bundle_id",
"ios_sdk_dialog_flows",
"ios_sdk_error_categories",
"ios_sfvc_attr",
"ios_supports_native_proxy_auth_flow",
"ios_supports_system_auth",
"ipad_app_store_id",
"iphone_app_store_id",
"latest_sdk_version",
"link",
"logging_token",
"login_secret",
"logo_url",
"migrations",
"mobile_profile_section_url",
"mobile_web_url",
"monthly_active_users",
"monthly_active_users_rank",
"name",
"namespace",
"object_store_urls",
"page_tab_default_name",
"page_tab_url",
"photo_url",
"privacy_policy_url",
"profile_section_url",
"property_id",
"real_time_mode_devices",
"restrictions",
"restrictive_data_filter_params",
"restrictive_data_filter_rules",
"sdk_update_message",
"seamless_login",
"secure_canvas_url",
"secure_page_tab_url",
"server_ip_whitelist",
"smart_login_bookmark_icon_url",
"smart_login_menu_icon_url",
"social_discovery",
"subcategory",
"suggested_events_setting",
"supported_platforms",
"supports_apprequests_fast_app_switch",
"supports_attribution",
"supports_implicit_sdk_logging",
"suppress_native_ios_gdp",
"terms_of_service_url",
"url_scheme_suffix",
"user_support_email",
"user_support_url",
"website_url",
"weekly_active_users",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return Application.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 APIRequestGetContainedApplications.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetContainedApplications(String nodeId, APIContext context) {
super(context, nodeId, "/contained_applications", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetContainedApplications setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetContainedApplications setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetContainedApplications requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetContainedApplications requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetContainedApplications requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetContainedApplications requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetContainedApplications requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetContainedApplications requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetContainedApplications requestAamRulesField () {
return this.requestAamRulesField(true);
}
public APIRequestGetContainedApplications requestAamRulesField (boolean value) {
this.requestField("aam_rules", value);
return this;
}
public APIRequestGetContainedApplications requestAnAdSpaceLimitField () {
return this.requestAnAdSpaceLimitField(true);
}
public APIRequestGetContainedApplications requestAnAdSpaceLimitField (boolean value) {
this.requestField("an_ad_space_limit", value);
return this;
}
public APIRequestGetContainedApplications requestAnPlatformsField () {
return this.requestAnPlatformsField(true);
}
public APIRequestGetContainedApplications requestAnPlatformsField (boolean value) {
this.requestField("an_platforms", value);
return this;
}
public APIRequestGetContainedApplications requestAndroidKeyHashField () {
return this.requestAndroidKeyHashField(true);
}
public APIRequestGetContainedApplications requestAndroidKeyHashField (boolean value) {
this.requestField("android_key_hash", value);
return this;
}
public APIRequestGetContainedApplications requestAndroidSdkErrorCategoriesField () {
return this.requestAndroidSdkErrorCategoriesField(true);
}
public APIRequestGetContainedApplications requestAndroidSdkErrorCategoriesField (boolean value) {
this.requestField("android_sdk_error_categories", value);
return this;
}
public APIRequestGetContainedApplications requestAppDomainsField () {
return this.requestAppDomainsField(true);
}
public APIRequestGetContainedApplications requestAppDomainsField (boolean value) {
this.requestField("app_domains", value);
return this;
}
public APIRequestGetContainedApplications requestAppEventsConfigField () {
return this.requestAppEventsConfigField(true);
}
public APIRequestGetContainedApplications requestAppEventsConfigField (boolean value) {
this.requestField("app_events_config", value);
return this;
}
public APIRequestGetContainedApplications requestAppEventsFeatureBitmaskField () {
return this.requestAppEventsFeatureBitmaskField(true);
}
public APIRequestGetContainedApplications requestAppEventsFeatureBitmaskField (boolean value) {
this.requestField("app_events_feature_bitmask", value);
return this;
}
public APIRequestGetContainedApplications requestAppEventsSessionTimeoutField () {
return this.requestAppEventsSessionTimeoutField(true);
}
public APIRequestGetContainedApplications requestAppEventsSessionTimeoutField (boolean value) {
this.requestField("app_events_session_timeout", value);
return this;
}
public APIRequestGetContainedApplications requestAppInstallTrackedField () {
return this.requestAppInstallTrackedField(true);
}
public APIRequestGetContainedApplications requestAppInstallTrackedField (boolean value) {
this.requestField("app_install_tracked", value);
return this;
}
public APIRequestGetContainedApplications requestAppNameField () {
return this.requestAppNameField(true);
}
public APIRequestGetContainedApplications requestAppNameField (boolean value) {
this.requestField("app_name", value);
return this;
}
public APIRequestGetContainedApplications requestAppSignalsBindingIosField () {
return this.requestAppSignalsBindingIosField(true);
}
public APIRequestGetContainedApplications requestAppSignalsBindingIosField (boolean value) {
this.requestField("app_signals_binding_ios", value);
return this;
}
public APIRequestGetContainedApplications requestAppTypeField () {
return this.requestAppTypeField(true);
}
public APIRequestGetContainedApplications requestAppTypeField (boolean value) {
this.requestField("app_type", value);
return this;
}
public APIRequestGetContainedApplications requestAuthDialogDataHelpUrlField () {
return this.requestAuthDialogDataHelpUrlField(true);
}
public APIRequestGetContainedApplications requestAuthDialogDataHelpUrlField (boolean value) {
this.requestField("auth_dialog_data_help_url", value);
return this;
}
public APIRequestGetContainedApplications requestAuthDialogHeadlineField () {
return this.requestAuthDialogHeadlineField(true);
}
public APIRequestGetContainedApplications requestAuthDialogHeadlineField (boolean value) {
this.requestField("auth_dialog_headline", value);
return this;
}
public APIRequestGetContainedApplications requestAuthDialogPermsExplanationField () {
return this.requestAuthDialogPermsExplanationField(true);
}
public APIRequestGetContainedApplications requestAuthDialogPermsExplanationField (boolean value) {
this.requestField("auth_dialog_perms_explanation", value);
return this;
}
public APIRequestGetContainedApplications requestAuthReferralDefaultActivityPrivacyField () {
return this.requestAuthReferralDefaultActivityPrivacyField(true);
}
public APIRequestGetContainedApplications requestAuthReferralDefaultActivityPrivacyField (boolean value) {
this.requestField("auth_referral_default_activity_privacy", value);
return this;
}
public APIRequestGetContainedApplications requestAuthReferralEnabledField () {
return this.requestAuthReferralEnabledField(true);
}
public APIRequestGetContainedApplications requestAuthReferralEnabledField (boolean value) {
this.requestField("auth_referral_enabled", value);
return this;
}
public APIRequestGetContainedApplications requestAuthReferralExtendedPermsField () {
return this.requestAuthReferralExtendedPermsField(true);
}
public APIRequestGetContainedApplications requestAuthReferralExtendedPermsField (boolean value) {
this.requestField("auth_referral_extended_perms", value);
return this;
}
public APIRequestGetContainedApplications requestAuthReferralFriendPermsField () {
return this.requestAuthReferralFriendPermsField(true);
}
public APIRequestGetContainedApplications requestAuthReferralFriendPermsField (boolean value) {
this.requestField("auth_referral_friend_perms", value);
return this;
}
public APIRequestGetContainedApplications requestAuthReferralResponseTypeField () {
return this.requestAuthReferralResponseTypeField(true);
}
public APIRequestGetContainedApplications requestAuthReferralResponseTypeField (boolean value) {
this.requestField("auth_referral_response_type", value);
return this;
}
public APIRequestGetContainedApplications requestAuthReferralUserPermsField () {
return this.requestAuthReferralUserPermsField(true);
}
public APIRequestGetContainedApplications requestAuthReferralUserPermsField (boolean value) {
this.requestField("auth_referral_user_perms", value);
return this;
}
public APIRequestGetContainedApplications requestAutoEventMappingAndroidField () {
return this.requestAutoEventMappingAndroidField(true);
}
public APIRequestGetContainedApplications requestAutoEventMappingAndroidField (boolean value) {
this.requestField("auto_event_mapping_android", value);
return this;
}
public APIRequestGetContainedApplications requestAutoEventMappingIosField () {
return this.requestAutoEventMappingIosField(true);
}
public APIRequestGetContainedApplications requestAutoEventMappingIosField (boolean value) {
this.requestField("auto_event_mapping_ios", value);
return this;
}
public APIRequestGetContainedApplications requestAutoEventSetupEnabledField () {
return this.requestAutoEventSetupEnabledField(true);
}
public APIRequestGetContainedApplications requestAutoEventSetupEnabledField (boolean value) {
this.requestField("auto_event_setup_enabled", value);
return this;
}
public APIRequestGetContainedApplications requestCanvasFluidHeightField () {
return this.requestCanvasFluidHeightField(true);
}
public APIRequestGetContainedApplications requestCanvasFluidHeightField (boolean value) {
this.requestField("canvas_fluid_height", value);
return this;
}
public APIRequestGetContainedApplications requestCanvasFluidWidthField () {
return this.requestCanvasFluidWidthField(true);
}
public APIRequestGetContainedApplications requestCanvasFluidWidthField (boolean value) {
this.requestField("canvas_fluid_width", value);
return this;
}
public APIRequestGetContainedApplications requestCanvasUrlField () {
return this.requestCanvasUrlField(true);
}
public APIRequestGetContainedApplications requestCanvasUrlField (boolean value) {
this.requestField("canvas_url", value);
return this;
}
public APIRequestGetContainedApplications requestCategoryField () {
return this.requestCategoryField(true);
}
public APIRequestGetContainedApplications requestCategoryField (boolean value) {
this.requestField("category", value);
return this;
}
public APIRequestGetContainedApplications requestClientConfigField () {
return this.requestClientConfigField(true);
}
public APIRequestGetContainedApplications requestClientConfigField (boolean value) {
this.requestField("client_config", value);
return this;
}
public APIRequestGetContainedApplications requestCompanyField () {
return this.requestCompanyField(true);
}
public APIRequestGetContainedApplications requestCompanyField (boolean value) {
this.requestField("company", value);
return this;
}
public APIRequestGetContainedApplications requestConfiguredIosSsoField () {
return this.requestConfiguredIosSsoField(true);
}
public APIRequestGetContainedApplications requestConfiguredIosSsoField (boolean value) {
this.requestField("configured_ios_sso", value);
return this;
}
public APIRequestGetContainedApplications requestContactEmailField () {
return this.requestContactEmailField(true);
}
public APIRequestGetContainedApplications requestContactEmailField (boolean value) {
this.requestField("contact_email", value);
return this;
}
public APIRequestGetContainedApplications requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetContainedApplications requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetContainedApplications requestCreatorUidField () {
return this.requestCreatorUidField(true);
}
public APIRequestGetContainedApplications requestCreatorUidField (boolean value) {
this.requestField("creator_uid", value);
return this;
}
public APIRequestGetContainedApplications requestDailyActiveUsersField () {
return this.requestDailyActiveUsersField(true);
}
public APIRequestGetContainedApplications requestDailyActiveUsersField (boolean value) {
this.requestField("daily_active_users", value);
return this;
}
public APIRequestGetContainedApplications requestDailyActiveUsersRankField () {
return this.requestDailyActiveUsersRankField(true);
}
public APIRequestGetContainedApplications requestDailyActiveUsersRankField (boolean value) {
this.requestField("daily_active_users_rank", value);
return this;
}
public APIRequestGetContainedApplications requestDeauthCallbackUrlField () {
return this.requestDeauthCallbackUrlField(true);
}
public APIRequestGetContainedApplications requestDeauthCallbackUrlField (boolean value) {
this.requestField("deauth_callback_url", value);
return this;
}
public APIRequestGetContainedApplications requestDefaultShareModeField () {
return this.requestDefaultShareModeField(true);
}
public APIRequestGetContainedApplications requestDefaultShareModeField (boolean value) {
this.requestField("default_share_mode", value);
return this;
}
public APIRequestGetContainedApplications requestDescriptionField () {
return this.requestDescriptionField(true);
}
public APIRequestGetContainedApplications requestDescriptionField (boolean value) {
this.requestField("description", value);
return this;
}
public APIRequestGetContainedApplications requestFinancialIdField () {
return this.requestFinancialIdField(true);
}
public APIRequestGetContainedApplications requestFinancialIdField (boolean value) {
this.requestField("financial_id", value);
return this;
}
public APIRequestGetContainedApplications requestGdpv4ChromeCustomTabsEnabledField () {
return this.requestGdpv4ChromeCustomTabsEnabledField(true);
}
public APIRequestGetContainedApplications requestGdpv4ChromeCustomTabsEnabledField (boolean value) {
this.requestField("gdpv4_chrome_custom_tabs_enabled", value);
return this;
}
public APIRequestGetContainedApplications requestGdpv4EnabledField () {
return this.requestGdpv4EnabledField(true);
}
public APIRequestGetContainedApplications requestGdpv4EnabledField (boolean value) {
this.requestField("gdpv4_enabled", value);
return this;
}
public APIRequestGetContainedApplications requestGdpv4NuxContentField () {
return this.requestGdpv4NuxContentField(true);
}
public APIRequestGetContainedApplications requestGdpv4NuxContentField (boolean value) {
this.requestField("gdpv4_nux_content", value);
return this;
}
public APIRequestGetContainedApplications requestGdpv4NuxEnabledField () {
return this.requestGdpv4NuxEnabledField(true);
}
public APIRequestGetContainedApplications requestGdpv4NuxEnabledField (boolean value) {
this.requestField("gdpv4_nux_enabled", value);
return this;
}
public APIRequestGetContainedApplications requestHasMessengerProductField () {
return this.requestHasMessengerProductField(true);
}
public APIRequestGetContainedApplications requestHasMessengerProductField (boolean value) {
this.requestField("has_messenger_product", value);
return this;
}
public APIRequestGetContainedApplications requestHostingUrlField () {
return this.requestHostingUrlField(true);
}
public APIRequestGetContainedApplications requestHostingUrlField (boolean value) {
this.requestField("hosting_url", value);
return this;
}
public APIRequestGetContainedApplications requestIconUrlField () {
return this.requestIconUrlField(true);
}
public APIRequestGetContainedApplications requestIconUrlField (boolean value) {
this.requestField("icon_url", value);
return this;
}
public APIRequestGetContainedApplications requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetContainedApplications requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetContainedApplications requestIosBundleIdField () {
return this.requestIosBundleIdField(true);
}
public APIRequestGetContainedApplications requestIosBundleIdField (boolean value) {
this.requestField("ios_bundle_id", value);
return this;
}
public APIRequestGetContainedApplications requestIosSdkDialogFlowsField () {
return this.requestIosSdkDialogFlowsField(true);
}
public APIRequestGetContainedApplications requestIosSdkDialogFlowsField (boolean value) {
this.requestField("ios_sdk_dialog_flows", value);
return this;
}
public APIRequestGetContainedApplications requestIosSdkErrorCategoriesField () {
return this.requestIosSdkErrorCategoriesField(true);
}
public APIRequestGetContainedApplications requestIosSdkErrorCategoriesField (boolean value) {
this.requestField("ios_sdk_error_categories", value);
return this;
}
public APIRequestGetContainedApplications requestIosSfvcAttrField () {
return this.requestIosSfvcAttrField(true);
}
public APIRequestGetContainedApplications requestIosSfvcAttrField (boolean value) {
this.requestField("ios_sfvc_attr", value);
return this;
}
public APIRequestGetContainedApplications requestIosSupportsNativeProxyAuthFlowField () {
return this.requestIosSupportsNativeProxyAuthFlowField(true);
}
public APIRequestGetContainedApplications requestIosSupportsNativeProxyAuthFlowField (boolean value) {
this.requestField("ios_supports_native_proxy_auth_flow", value);
return this;
}
public APIRequestGetContainedApplications requestIosSupportsSystemAuthField () {
return this.requestIosSupportsSystemAuthField(true);
}
public APIRequestGetContainedApplications requestIosSupportsSystemAuthField (boolean value) {
this.requestField("ios_supports_system_auth", value);
return this;
}
public APIRequestGetContainedApplications requestIpadAppStoreIdField () {
return this.requestIpadAppStoreIdField(true);
}
public APIRequestGetContainedApplications requestIpadAppStoreIdField (boolean value) {
this.requestField("ipad_app_store_id", value);
return this;
}
public APIRequestGetContainedApplications requestIphoneAppStoreIdField () {
return this.requestIphoneAppStoreIdField(true);
}
public APIRequestGetContainedApplications requestIphoneAppStoreIdField (boolean value) {
this.requestField("iphone_app_store_id", value);
return this;
}
public APIRequestGetContainedApplications requestLatestSdkVersionField () {
return this.requestLatestSdkVersionField(true);
}
public APIRequestGetContainedApplications requestLatestSdkVersionField (boolean value) {
this.requestField("latest_sdk_version", value);
return this;
}
public APIRequestGetContainedApplications requestLinkField () {
return this.requestLinkField(true);
}
public APIRequestGetContainedApplications requestLinkField (boolean value) {
this.requestField("link", value);
return this;
}
public APIRequestGetContainedApplications requestLoggingTokenField () {
return this.requestLoggingTokenField(true);
}
public APIRequestGetContainedApplications requestLoggingTokenField (boolean value) {
this.requestField("logging_token", value);
return this;
}
public APIRequestGetContainedApplications requestLoginSecretField () {
return this.requestLoginSecretField(true);
}
public APIRequestGetContainedApplications requestLoginSecretField (boolean value) {
this.requestField("login_secret", value);
return this;
}
public APIRequestGetContainedApplications requestLogoUrlField () {
return this.requestLogoUrlField(true);
}
public APIRequestGetContainedApplications requestLogoUrlField (boolean value) {
this.requestField("logo_url", value);
return this;
}
public APIRequestGetContainedApplications requestMigrationsField () {
return this.requestMigrationsField(true);
}
public APIRequestGetContainedApplications requestMigrationsField (boolean value) {
this.requestField("migrations", value);
return this;
}
public APIRequestGetContainedApplications requestMobileProfileSectionUrlField () {
return this.requestMobileProfileSectionUrlField(true);
}
public APIRequestGetContainedApplications requestMobileProfileSectionUrlField (boolean value) {
this.requestField("mobile_profile_section_url", value);
return this;
}
public APIRequestGetContainedApplications requestMobileWebUrlField () {
return this.requestMobileWebUrlField(true);
}
public APIRequestGetContainedApplications requestMobileWebUrlField (boolean value) {
this.requestField("mobile_web_url", value);
return this;
}
public APIRequestGetContainedApplications requestMonthlyActiveUsersField () {
return this.requestMonthlyActiveUsersField(true);
}
public APIRequestGetContainedApplications requestMonthlyActiveUsersField (boolean value) {
this.requestField("monthly_active_users", value);
return this;
}
public APIRequestGetContainedApplications requestMonthlyActiveUsersRankField () {
return this.requestMonthlyActiveUsersRankField(true);
}
public APIRequestGetContainedApplications requestMonthlyActiveUsersRankField (boolean value) {
this.requestField("monthly_active_users_rank", value);
return this;
}
public APIRequestGetContainedApplications requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetContainedApplications requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetContainedApplications requestNamespaceField () {
return this.requestNamespaceField(true);
}
public APIRequestGetContainedApplications requestNamespaceField (boolean value) {
this.requestField("namespace", value);
return this;
}
public APIRequestGetContainedApplications requestObjectStoreUrlsField () {
return this.requestObjectStoreUrlsField(true);
}
public APIRequestGetContainedApplications requestObjectStoreUrlsField (boolean value) {
this.requestField("object_store_urls", value);
return this;
}
public APIRequestGetContainedApplications requestPageTabDefaultNameField () {
return this.requestPageTabDefaultNameField(true);
}
public APIRequestGetContainedApplications requestPageTabDefaultNameField (boolean value) {
this.requestField("page_tab_default_name", value);
return this;
}
public APIRequestGetContainedApplications requestPageTabUrlField () {
return this.requestPageTabUrlField(true);
}
public APIRequestGetContainedApplications requestPageTabUrlField (boolean value) {
this.requestField("page_tab_url", value);
return this;
}
public APIRequestGetContainedApplications requestPhotoUrlField () {
return this.requestPhotoUrlField(true);
}
public APIRequestGetContainedApplications requestPhotoUrlField (boolean value) {
this.requestField("photo_url", value);
return this;
}
public APIRequestGetContainedApplications requestPrivacyPolicyUrlField () {
return this.requestPrivacyPolicyUrlField(true);
}
public APIRequestGetContainedApplications requestPrivacyPolicyUrlField (boolean value) {
this.requestField("privacy_policy_url", value);
return this;
}
public APIRequestGetContainedApplications requestProfileSectionUrlField () {
return this.requestProfileSectionUrlField(true);
}
public APIRequestGetContainedApplications requestProfileSectionUrlField (boolean value) {
this.requestField("profile_section_url", value);
return this;
}
public APIRequestGetContainedApplications requestPropertyIdField () {
return this.requestPropertyIdField(true);
}
public APIRequestGetContainedApplications requestPropertyIdField (boolean value) {
this.requestField("property_id", value);
return this;
}
public APIRequestGetContainedApplications requestRealTimeModeDevicesField () {
return this.requestRealTimeModeDevicesField(true);
}
public APIRequestGetContainedApplications requestRealTimeModeDevicesField (boolean value) {
this.requestField("real_time_mode_devices", value);
return this;
}
public APIRequestGetContainedApplications requestRestrictionsField () {
return this.requestRestrictionsField(true);
}
public APIRequestGetContainedApplications requestRestrictionsField (boolean value) {
this.requestField("restrictions", value);
return this;
}
public APIRequestGetContainedApplications requestRestrictiveDataFilterParamsField () {
return this.requestRestrictiveDataFilterParamsField(true);
}
public APIRequestGetContainedApplications requestRestrictiveDataFilterParamsField (boolean value) {
this.requestField("restrictive_data_filter_params", value);
return this;
}
public APIRequestGetContainedApplications requestRestrictiveDataFilterRulesField () {
return this.requestRestrictiveDataFilterRulesField(true);
}
public APIRequestGetContainedApplications requestRestrictiveDataFilterRulesField (boolean value) {
this.requestField("restrictive_data_filter_rules", value);
return this;
}
public APIRequestGetContainedApplications requestSdkUpdateMessageField () {
return this.requestSdkUpdateMessageField(true);
}
public APIRequestGetContainedApplications requestSdkUpdateMessageField (boolean value) {
this.requestField("sdk_update_message", value);
return this;
}
public APIRequestGetContainedApplications requestSeamlessLoginField () {
return this.requestSeamlessLoginField(true);
}
public APIRequestGetContainedApplications requestSeamlessLoginField (boolean value) {
this.requestField("seamless_login", value);
return this;
}
public APIRequestGetContainedApplications requestSecureCanvasUrlField () {
return this.requestSecureCanvasUrlField(true);
}
public APIRequestGetContainedApplications requestSecureCanvasUrlField (boolean value) {
this.requestField("secure_canvas_url", value);
return this;
}
public APIRequestGetContainedApplications requestSecurePageTabUrlField () {
return this.requestSecurePageTabUrlField(true);
}
public APIRequestGetContainedApplications requestSecurePageTabUrlField (boolean value) {
this.requestField("secure_page_tab_url", value);
return this;
}
public APIRequestGetContainedApplications requestServerIpWhitelistField () {
return this.requestServerIpWhitelistField(true);
}
public APIRequestGetContainedApplications requestServerIpWhitelistField (boolean value) {
this.requestField("server_ip_whitelist", value);
return this;
}
public APIRequestGetContainedApplications requestSmartLoginBookmarkIconUrlField () {
return this.requestSmartLoginBookmarkIconUrlField(true);
}
public APIRequestGetContainedApplications requestSmartLoginBookmarkIconUrlField (boolean value) {
this.requestField("smart_login_bookmark_icon_url", value);
return this;
}
public APIRequestGetContainedApplications requestSmartLoginMenuIconUrlField () {
return this.requestSmartLoginMenuIconUrlField(true);
}
public APIRequestGetContainedApplications requestSmartLoginMenuIconUrlField (boolean value) {
this.requestField("smart_login_menu_icon_url", value);
return this;
}
public APIRequestGetContainedApplications requestSocialDiscoveryField () {
return this.requestSocialDiscoveryField(true);
}
public APIRequestGetContainedApplications requestSocialDiscoveryField (boolean value) {
this.requestField("social_discovery", value);
return this;
}
public APIRequestGetContainedApplications requestSubcategoryField () {
return this.requestSubcategoryField(true);
}
public APIRequestGetContainedApplications requestSubcategoryField (boolean value) {
this.requestField("subcategory", value);
return this;
}
public APIRequestGetContainedApplications requestSuggestedEventsSettingField () {
return this.requestSuggestedEventsSettingField(true);
}
public APIRequestGetContainedApplications requestSuggestedEventsSettingField (boolean value) {
this.requestField("suggested_events_setting", value);
return this;
}
public APIRequestGetContainedApplications requestSupportedPlatformsField () {
return this.requestSupportedPlatformsField(true);
}
public APIRequestGetContainedApplications requestSupportedPlatformsField (boolean value) {
this.requestField("supported_platforms", value);
return this;
}
public APIRequestGetContainedApplications requestSupportsApprequestsFastAppSwitchField () {
return this.requestSupportsApprequestsFastAppSwitchField(true);
}
public APIRequestGetContainedApplications requestSupportsApprequestsFastAppSwitchField (boolean value) {
this.requestField("supports_apprequests_fast_app_switch", value);
return this;
}
public APIRequestGetContainedApplications requestSupportsAttributionField () {
return this.requestSupportsAttributionField(true);
}
public APIRequestGetContainedApplications requestSupportsAttributionField (boolean value) {
this.requestField("supports_attribution", value);
return this;
}
public APIRequestGetContainedApplications requestSupportsImplicitSdkLoggingField () {
return this.requestSupportsImplicitSdkLoggingField(true);
}
public APIRequestGetContainedApplications requestSupportsImplicitSdkLoggingField (boolean value) {
this.requestField("supports_implicit_sdk_logging", value);
return this;
}
public APIRequestGetContainedApplications requestSuppressNativeIosGdpField () {
return this.requestSuppressNativeIosGdpField(true);
}
public APIRequestGetContainedApplications requestSuppressNativeIosGdpField (boolean value) {
this.requestField("suppress_native_ios_gdp", value);
return this;
}
public APIRequestGetContainedApplications requestTermsOfServiceUrlField () {
return this.requestTermsOfServiceUrlField(true);
}
public APIRequestGetContainedApplications requestTermsOfServiceUrlField (boolean value) {
this.requestField("terms_of_service_url", value);
return this;
}
public APIRequestGetContainedApplications requestUrlSchemeSuffixField () {
return this.requestUrlSchemeSuffixField(true);
}
public APIRequestGetContainedApplications requestUrlSchemeSuffixField (boolean value) {
this.requestField("url_scheme_suffix", value);
return this;
}
public APIRequestGetContainedApplications requestUserSupportEmailField () {
return this.requestUserSupportEmailField(true);
}
public APIRequestGetContainedApplications requestUserSupportEmailField (boolean value) {
this.requestField("user_support_email", value);
return this;
}
public APIRequestGetContainedApplications requestUserSupportUrlField () {
return this.requestUserSupportUrlField(true);
}
public APIRequestGetContainedApplications requestUserSupportUrlField (boolean value) {
this.requestField("user_support_url", value);
return this;
}
public APIRequestGetContainedApplications requestWebsiteUrlField () {
return this.requestWebsiteUrlField(true);
}
public APIRequestGetContainedApplications requestWebsiteUrlField (boolean value) {
this.requestField("website_url", value);
return this;
}
public APIRequestGetContainedApplications requestWeeklyActiveUsersField () {
return this.requestWeeklyActiveUsersField(true);
}
public APIRequestGetContainedApplications requestWeeklyActiveUsersField (boolean value) {
this.requestField("weekly_active_users", value);
return this;
}
}
public static class APIRequestCreateContainedApplication extends APIRequest {
BusinessAssetGroup lastResponse = null;
@Override
public BusinessAssetGroup getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"asset_id",
};
public static final String[] FIELDS = {
};
@Override
public BusinessAssetGroup parseResponse(String response, String header) throws APIException {
return BusinessAssetGroup.parseResponse(response, getContext(), this, header).head();
}
@Override
public BusinessAssetGroup execute() throws APIException {
return execute(new HashMap());
}
@Override
public BusinessAssetGroup 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 BusinessAssetGroup apply(ResponseWrapper result) {
try {
return APIRequestCreateContainedApplication.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateContainedApplication(String nodeId, APIContext context) {
super(context, nodeId, "/contained_applications", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateContainedApplication setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateContainedApplication setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateContainedApplication setAssetId (String assetId) {
this.setParam("asset_id", assetId);
return this;
}
public APIRequestCreateContainedApplication requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateContainedApplication requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateContainedApplication requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateContainedApplication requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateContainedApplication requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateContainedApplication requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestDeleteContainedCustomConversions extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"asset_id",
};
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 APIRequestDeleteContainedCustomConversions.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestDeleteContainedCustomConversions(String nodeId, APIContext context) {
super(context, nodeId, "/contained_custom_conversions", "DELETE", Arrays.asList(PARAMS));
}
@Override
public APIRequestDeleteContainedCustomConversions setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestDeleteContainedCustomConversions setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestDeleteContainedCustomConversions setAssetId (String assetId) {
this.setParam("asset_id", assetId);
return this;
}
public APIRequestDeleteContainedCustomConversions requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestDeleteContainedCustomConversions requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteContainedCustomConversions requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestDeleteContainedCustomConversions requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteContainedCustomConversions requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestDeleteContainedCustomConversions requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetContainedCustomConversions extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"account_id",
"aggregation_rule",
"business",
"creation_time",
"custom_event_type",
"data_sources",
"default_conversion_value",
"description",
"event_source_type",
"first_fired_time",
"id",
"is_archived",
"is_unavailable",
"last_fired_time",
"name",
"offline_conversion_data_set",
"pixel",
"retention_days",
"rule",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return CustomConversion.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 APIRequestGetContainedCustomConversions.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetContainedCustomConversions(String nodeId, APIContext context) {
super(context, nodeId, "/contained_custom_conversions", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetContainedCustomConversions setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetContainedCustomConversions setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetContainedCustomConversions requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetContainedCustomConversions requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetContainedCustomConversions requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetContainedCustomConversions requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetContainedCustomConversions requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetContainedCustomConversions requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetContainedCustomConversions requestAccountIdField () {
return this.requestAccountIdField(true);
}
public APIRequestGetContainedCustomConversions requestAccountIdField (boolean value) {
this.requestField("account_id", value);
return this;
}
public APIRequestGetContainedCustomConversions requestAggregationRuleField () {
return this.requestAggregationRuleField(true);
}
public APIRequestGetContainedCustomConversions requestAggregationRuleField (boolean value) {
this.requestField("aggregation_rule", value);
return this;
}
public APIRequestGetContainedCustomConversions requestBusinessField () {
return this.requestBusinessField(true);
}
public APIRequestGetContainedCustomConversions requestBusinessField (boolean value) {
this.requestField("business", value);
return this;
}
public APIRequestGetContainedCustomConversions requestCreationTimeField () {
return this.requestCreationTimeField(true);
}
public APIRequestGetContainedCustomConversions requestCreationTimeField (boolean value) {
this.requestField("creation_time", value);
return this;
}
public APIRequestGetContainedCustomConversions requestCustomEventTypeField () {
return this.requestCustomEventTypeField(true);
}
public APIRequestGetContainedCustomConversions requestCustomEventTypeField (boolean value) {
this.requestField("custom_event_type", value);
return this;
}
public APIRequestGetContainedCustomConversions requestDataSourcesField () {
return this.requestDataSourcesField(true);
}
public APIRequestGetContainedCustomConversions requestDataSourcesField (boolean value) {
this.requestField("data_sources", value);
return this;
}
public APIRequestGetContainedCustomConversions requestDefaultConversionValueField () {
return this.requestDefaultConversionValueField(true);
}
public APIRequestGetContainedCustomConversions requestDefaultConversionValueField (boolean value) {
this.requestField("default_conversion_value", value);
return this;
}
public APIRequestGetContainedCustomConversions requestDescriptionField () {
return this.requestDescriptionField(true);
}
public APIRequestGetContainedCustomConversions requestDescriptionField (boolean value) {
this.requestField("description", value);
return this;
}
public APIRequestGetContainedCustomConversions requestEventSourceTypeField () {
return this.requestEventSourceTypeField(true);
}
public APIRequestGetContainedCustomConversions requestEventSourceTypeField (boolean value) {
this.requestField("event_source_type", value);
return this;
}
public APIRequestGetContainedCustomConversions requestFirstFiredTimeField () {
return this.requestFirstFiredTimeField(true);
}
public APIRequestGetContainedCustomConversions requestFirstFiredTimeField (boolean value) {
this.requestField("first_fired_time", value);
return this;
}
public APIRequestGetContainedCustomConversions requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetContainedCustomConversions requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetContainedCustomConversions requestIsArchivedField () {
return this.requestIsArchivedField(true);
}
public APIRequestGetContainedCustomConversions requestIsArchivedField (boolean value) {
this.requestField("is_archived", value);
return this;
}
public APIRequestGetContainedCustomConversions requestIsUnavailableField () {
return this.requestIsUnavailableField(true);
}
public APIRequestGetContainedCustomConversions requestIsUnavailableField (boolean value) {
this.requestField("is_unavailable", value);
return this;
}
public APIRequestGetContainedCustomConversions requestLastFiredTimeField () {
return this.requestLastFiredTimeField(true);
}
public APIRequestGetContainedCustomConversions requestLastFiredTimeField (boolean value) {
this.requestField("last_fired_time", value);
return this;
}
public APIRequestGetContainedCustomConversions requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetContainedCustomConversions requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetContainedCustomConversions requestOfflineConversionDataSetField () {
return this.requestOfflineConversionDataSetField(true);
}
public APIRequestGetContainedCustomConversions requestOfflineConversionDataSetField (boolean value) {
this.requestField("offline_conversion_data_set", value);
return this;
}
public APIRequestGetContainedCustomConversions requestPixelField () {
return this.requestPixelField(true);
}
public APIRequestGetContainedCustomConversions requestPixelField (boolean value) {
this.requestField("pixel", value);
return this;
}
public APIRequestGetContainedCustomConversions requestRetentionDaysField () {
return this.requestRetentionDaysField(true);
}
public APIRequestGetContainedCustomConversions requestRetentionDaysField (boolean value) {
this.requestField("retention_days", value);
return this;
}
public APIRequestGetContainedCustomConversions requestRuleField () {
return this.requestRuleField(true);
}
public APIRequestGetContainedCustomConversions requestRuleField (boolean value) {
this.requestField("rule", value);
return this;
}
}
public static class APIRequestCreateContainedCustomConversion extends APIRequest {
BusinessAssetGroup lastResponse = null;
@Override
public BusinessAssetGroup getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"asset_id",
};
public static final String[] FIELDS = {
};
@Override
public BusinessAssetGroup parseResponse(String response, String header) throws APIException {
return BusinessAssetGroup.parseResponse(response, getContext(), this, header).head();
}
@Override
public BusinessAssetGroup execute() throws APIException {
return execute(new HashMap());
}
@Override
public BusinessAssetGroup 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 BusinessAssetGroup apply(ResponseWrapper result) {
try {
return APIRequestCreateContainedCustomConversion.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateContainedCustomConversion(String nodeId, APIContext context) {
super(context, nodeId, "/contained_custom_conversions", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateContainedCustomConversion setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateContainedCustomConversion setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateContainedCustomConversion setAssetId (String assetId) {
this.setParam("asset_id", assetId);
return this;
}
public APIRequestCreateContainedCustomConversion requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateContainedCustomConversion requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateContainedCustomConversion requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateContainedCustomConversion requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateContainedCustomConversion requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateContainedCustomConversion requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestDeleteContainedInstagramAccounts extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"asset_id",
};
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 APIRequestDeleteContainedInstagramAccounts.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestDeleteContainedInstagramAccounts(String nodeId, APIContext context) {
super(context, nodeId, "/contained_instagram_accounts", "DELETE", Arrays.asList(PARAMS));
}
@Override
public APIRequestDeleteContainedInstagramAccounts setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestDeleteContainedInstagramAccounts setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestDeleteContainedInstagramAccounts setAssetId (String assetId) {
this.setParam("asset_id", assetId);
return this;
}
public APIRequestDeleteContainedInstagramAccounts requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestDeleteContainedInstagramAccounts requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteContainedInstagramAccounts requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestDeleteContainedInstagramAccounts requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteContainedInstagramAccounts requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestDeleteContainedInstagramAccounts requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetContainedInstagramAccounts extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"follow_count",
"followed_by_count",
"has_profile_picture",
"id",
"is_private",
"is_published",
"media_count",
"profile_pic",
"username",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return InstagramUser.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 APIRequestGetContainedInstagramAccounts.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetContainedInstagramAccounts(String nodeId, APIContext context) {
super(context, nodeId, "/contained_instagram_accounts", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetContainedInstagramAccounts setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetContainedInstagramAccounts setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetContainedInstagramAccounts requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetContainedInstagramAccounts requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetContainedInstagramAccounts requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetContainedInstagramAccounts requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetContainedInstagramAccounts requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetContainedInstagramAccounts requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetContainedInstagramAccounts requestFollowCountField () {
return this.requestFollowCountField(true);
}
public APIRequestGetContainedInstagramAccounts requestFollowCountField (boolean value) {
this.requestField("follow_count", value);
return this;
}
public APIRequestGetContainedInstagramAccounts requestFollowedByCountField () {
return this.requestFollowedByCountField(true);
}
public APIRequestGetContainedInstagramAccounts requestFollowedByCountField (boolean value) {
this.requestField("followed_by_count", value);
return this;
}
public APIRequestGetContainedInstagramAccounts requestHasProfilePictureField () {
return this.requestHasProfilePictureField(true);
}
public APIRequestGetContainedInstagramAccounts requestHasProfilePictureField (boolean value) {
this.requestField("has_profile_picture", value);
return this;
}
public APIRequestGetContainedInstagramAccounts requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetContainedInstagramAccounts requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetContainedInstagramAccounts requestIsPrivateField () {
return this.requestIsPrivateField(true);
}
public APIRequestGetContainedInstagramAccounts requestIsPrivateField (boolean value) {
this.requestField("is_private", value);
return this;
}
public APIRequestGetContainedInstagramAccounts requestIsPublishedField () {
return this.requestIsPublishedField(true);
}
public APIRequestGetContainedInstagramAccounts requestIsPublishedField (boolean value) {
this.requestField("is_published", value);
return this;
}
public APIRequestGetContainedInstagramAccounts requestMediaCountField () {
return this.requestMediaCountField(true);
}
public APIRequestGetContainedInstagramAccounts requestMediaCountField (boolean value) {
this.requestField("media_count", value);
return this;
}
public APIRequestGetContainedInstagramAccounts requestProfilePicField () {
return this.requestProfilePicField(true);
}
public APIRequestGetContainedInstagramAccounts requestProfilePicField (boolean value) {
this.requestField("profile_pic", value);
return this;
}
public APIRequestGetContainedInstagramAccounts requestUsernameField () {
return this.requestUsernameField(true);
}
public APIRequestGetContainedInstagramAccounts requestUsernameField (boolean value) {
this.requestField("username", value);
return this;
}
}
public static class APIRequestCreateContainedInstagramAccount extends APIRequest {
BusinessAssetGroup lastResponse = null;
@Override
public BusinessAssetGroup getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"asset_id",
};
public static final String[] FIELDS = {
};
@Override
public BusinessAssetGroup parseResponse(String response, String header) throws APIException {
return BusinessAssetGroup.parseResponse(response, getContext(), this, header).head();
}
@Override
public BusinessAssetGroup execute() throws APIException {
return execute(new HashMap());
}
@Override
public BusinessAssetGroup 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 BusinessAssetGroup apply(ResponseWrapper result) {
try {
return APIRequestCreateContainedInstagramAccount.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateContainedInstagramAccount(String nodeId, APIContext context) {
super(context, nodeId, "/contained_instagram_accounts", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateContainedInstagramAccount setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateContainedInstagramAccount setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateContainedInstagramAccount setAssetId (String assetId) {
this.setParam("asset_id", assetId);
return this;
}
public APIRequestCreateContainedInstagramAccount requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateContainedInstagramAccount requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateContainedInstagramAccount requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateContainedInstagramAccount requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateContainedInstagramAccount requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateContainedInstagramAccount requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestDeleteContainedOfflineConversionDataSets extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"asset_id",
};
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