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.Business 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.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-genereated.
*
* 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 Business extends APINode {
@SerializedName("created_by")
private User mCreatedBy = null;
@SerializedName("created_time")
private String mCreatedTime = null;
@SerializedName("id")
private String mId = null;
@SerializedName("link")
private String mLink = null;
@SerializedName("name")
private String mName = null;
@SerializedName("payment_account_id")
private String mPaymentAccountId = null;
@SerializedName("primary_page")
private Object mPrimaryPage = null;
@SerializedName("timezone_id")
private Long mTimezoneId = null;
@SerializedName("two_factor_type")
private String mTwoFactorType = null;
@SerializedName("updated_by")
private User mUpdatedBy = null;
@SerializedName("updated_time")
private String mUpdatedTime = null;
protected static Gson gson = null;
Business() {
}
public Business(Long id, APIContext context) {
this(id.toString(), context);
}
public Business(String id, APIContext context) {
this.mId = id;
this.context = context;
}
public Business fetch() throws APIException{
Business newInstance = fetchById(this.getPrefixedId().toString(), this.context);
this.copyFrom(newInstance);
return this;
}
public static Business fetchById(Long id, APIContext context) throws APIException {
return fetchById(id.toString(), context);
}
public static Business fetchById(String id, APIContext context) throws APIException {
Business business =
new APIRequestGet(id, context)
.requestAllFields()
.execute();
return business;
}
public static APINodeList fetchByIds(List ids, List fields, APIContext context) throws APIException {
return (APINodeList)(
new APIRequest(context, "", "/", "GET", Business.getParser())
.setParam("ids", APIRequest.joinStringList(ids))
.requestFields(fields)
.execute()
);
}
private String getPrefixedId() {
return getId();
}
public String getId() {
return getFieldId().toString();
}
public static Business loadJSON(String json, APIContext context) {
Business business = getGson().fromJson(json, Business.class);
if (context.isDebug()) {
JsonParser parser = new JsonParser();
JsonElement o1 = parser.parse(json);
JsonElement o2 = parser.parse(business.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);
};
}
business.context = context;
business.rawValue = json;
return business;
}
public static APINodeList parseResponse(String json, APIContext context, APIRequest request) throws MalformedResponseException {
APINodeList businesss = new APINodeList(request, json);
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++) {
businesss.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context));
};
return businesss;
} else if (result.isJsonObject()) {
obj = result.getAsJsonObject();
if (obj.has("data")) {
if (obj.has("paging")) {
JsonObject paging = obj.get("paging").getAsJsonObject().get("cursors").getAsJsonObject();
String before = paging.has("before") ? paging.get("before").getAsString() : null;
String after = paging.has("after") ? paging.get("after").getAsString() : null;
businesss.setPaging(before, after);
}
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++) {
businesss.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context));
};
} 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()) {
businesss.add(loadJSON(entry.getValue().toString(), context));
}
break;
}
}
if (!isRedownload) {
businesss.add(loadJSON(obj.toString(), context));
}
}
return businesss;
} 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()) {
businesss.add(loadJSON(entry.getValue().toString(), context));
}
return businesss;
} 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)
) {
businesss.add(loadJSON(value.toString(), context));
} else {
isIdIndexedArray = false;
break;
}
}
if (isIdIndexedArray) {
return businesss;
}
// Sixth, check if it's pure JsonObject
businesss.clear();
businesss.add(loadJSON(json, context));
return businesss;
}
}
} 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 APIRequestCreateAdStudy createAdStudy() {
return new APIRequestCreateAdStudy(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAdAccount createAdAccount() {
return new APIRequestCreateAdAccount(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAdAccounts createAdAccounts() {
return new APIRequestCreateAdAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdsPixels getAdsPixels() {
return new APIRequestGetAdsPixels(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAdsPixel createAdsPixel() {
return new APIRequestCreateAdsPixel(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteApps deleteApps() {
return new APIRequestDeleteApps(this.getPrefixedId().toString(), context);
}
public APIRequestGetAssignedAdAccounts getAssignedAdAccounts() {
return new APIRequestGetAssignedAdAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetAssignedPages getAssignedPages() {
return new APIRequestGetAssignedPages(this.getPrefixedId().toString(), context);
}
public APIRequestGetAssignedProductCatalogs getAssignedProductCatalogs() {
return new APIRequestGetAssignedProductCatalogs(this.getPrefixedId().toString(), context);
}
public APIRequestGetClientAdAccountRequests getClientAdAccountRequests() {
return new APIRequestGetClientAdAccountRequests(this.getPrefixedId().toString(), context);
}
public APIRequestGetClientAdAccounts getClientAdAccounts() {
return new APIRequestGetClientAdAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetClientPageRequests getClientPageRequests() {
return new APIRequestGetClientPageRequests(this.getPrefixedId().toString(), context);
}
public APIRequestGetClientPages getClientPages() {
return new APIRequestGetClientPages(this.getPrefixedId().toString(), context);
}
public APIRequestGetEventSourceGroups getEventSourceGroups() {
return new APIRequestGetEventSourceGroups(this.getPrefixedId().toString(), context);
}
public APIRequestCreateEventSourceGroup createEventSourceGroup() {
return new APIRequestCreateEventSourceGroup(this.getPrefixedId().toString(), context);
}
public APIRequestGetGrpPlans getGrpPlans() {
return new APIRequestGetGrpPlans(this.getPrefixedId().toString(), context);
}
public APIRequestGetInstagramAccounts getInstagramAccounts() {
return new APIRequestGetInstagramAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetMeasurementReports getMeasurementReports() {
return new APIRequestGetMeasurementReports(this.getPrefixedId().toString(), context);
}
public APIRequestCreateMeasurementReport createMeasurementReport() {
return new APIRequestCreateMeasurementReport(this.getPrefixedId().toString(), context);
}
public APIRequestGetOfflineConversionDataSets getOfflineConversionDataSets() {
return new APIRequestGetOfflineConversionDataSets(this.getPrefixedId().toString(), context);
}
public APIRequestCreateOfflineConversionDataSet createOfflineConversionDataSet() {
return new APIRequestCreateOfflineConversionDataSet(this.getPrefixedId().toString(), context);
}
public APIRequestGetOwnedAdAccountRequests getOwnedAdAccountRequests() {
return new APIRequestGetOwnedAdAccountRequests(this.getPrefixedId().toString(), context);
}
public APIRequestGetOwnedAdAccounts getOwnedAdAccounts() {
return new APIRequestGetOwnedAdAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetOwnedInstagramAccounts getOwnedInstagramAccounts() {
return new APIRequestGetOwnedInstagramAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetOwnedPageRequests getOwnedPageRequests() {
return new APIRequestGetOwnedPageRequests(this.getPrefixedId().toString(), context);
}
public APIRequestGetOwnedPages getOwnedPages() {
return new APIRequestGetOwnedPages(this.getPrefixedId().toString(), context);
}
public APIRequestGetOwnedPixels getOwnedPixels() {
return new APIRequestGetOwnedPixels(this.getPrefixedId().toString(), context);
}
public APIRequestGetPicture getPicture() {
return new APIRequestGetPicture(this.getPrefixedId().toString(), context);
}
public APIRequestGetProductCatalogs getProductCatalogs() {
return new APIRequestGetProductCatalogs(this.getPrefixedId().toString(), context);
}
public APIRequestCreateProductCatalog createProductCatalog() {
return new APIRequestCreateProductCatalog(this.getPrefixedId().toString(), context);
}
public APIRequestGetReceivedAudiencePermissions getReceivedAudiencePermissions() {
return new APIRequestGetReceivedAudiencePermissions(this.getPrefixedId().toString(), context);
}
public APIRequestGetSharedAudiencePermissions getSharedAudiencePermissions() {
return new APIRequestGetSharedAudiencePermissions(this.getPrefixedId().toString(), context);
}
public APIRequestGetSystemUsers getSystemUsers() {
return new APIRequestGetSystemUsers(this.getPrefixedId().toString(), context);
}
public APIRequestCreateUserPermission createUserPermission() {
return new APIRequestCreateUserPermission(this.getPrefixedId().toString(), context);
}
public APIRequestGet get() {
return new APIRequestGet(this.getPrefixedId().toString(), context);
}
public User getFieldCreatedBy() {
if (mCreatedBy != null) {
mCreatedBy.context = getContext();
}
return mCreatedBy;
}
public String getFieldCreatedTime() {
return mCreatedTime;
}
public String getFieldId() {
return mId;
}
public String getFieldLink() {
return mLink;
}
public String getFieldName() {
return mName;
}
public String getFieldPaymentAccountId() {
return mPaymentAccountId;
}
public Object getFieldPrimaryPage() {
return mPrimaryPage;
}
public Long getFieldTimezoneId() {
return mTimezoneId;
}
public String getFieldTwoFactorType() {
return mTwoFactorType;
}
public User getFieldUpdatedBy() {
if (mUpdatedBy != null) {
mUpdatedBy.context = getContext();
}
return mUpdatedBy;
}
public String getFieldUpdatedTime() {
return mUpdatedTime;
}
public static class APIRequestCreateAdStudy extends APIRequest {
AdStudy lastResponse = null;
@Override
public AdStudy getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"cells",
"confidence_level",
"cooldown_start_time",
"description",
"end_time",
"name",
"objectives",
"observation_end_time",
"start_time",
"type",
"viewers",
};
public static final String[] FIELDS = {
};
@Override
public AdStudy parseResponse(String response) throws APIException {
return AdStudy.parseResponse(response, getContext(), this).head();
}
@Override
public AdStudy execute() throws APIException {
return execute(new HashMap());
}
@Override
public AdStudy execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestCreateAdStudy(String nodeId, APIContext context) {
super(context, nodeId, "/ad_studies", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAdStudy setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAdStudy setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAdStudy setCells (List cells) {
this.setParam("cells", cells);
return this;
}
public APIRequestCreateAdStudy setCells (String cells) {
this.setParam("cells", cells);
return this;
}
public APIRequestCreateAdStudy setConfidenceLevel (Double confidenceLevel) {
this.setParam("confidence_level", confidenceLevel);
return this;
}
public APIRequestCreateAdStudy setConfidenceLevel (String confidenceLevel) {
this.setParam("confidence_level", confidenceLevel);
return this;
}
public APIRequestCreateAdStudy setCooldownStartTime (Long cooldownStartTime) {
this.setParam("cooldown_start_time", cooldownStartTime);
return this;
}
public APIRequestCreateAdStudy setCooldownStartTime (String cooldownStartTime) {
this.setParam("cooldown_start_time", cooldownStartTime);
return this;
}
public APIRequestCreateAdStudy setDescription (String description) {
this.setParam("description", description);
return this;
}
public APIRequestCreateAdStudy setEndTime (Long endTime) {
this.setParam("end_time", endTime);
return this;
}
public APIRequestCreateAdStudy setEndTime (String endTime) {
this.setParam("end_time", endTime);
return this;
}
public APIRequestCreateAdStudy setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateAdStudy setObjectives (List objectives) {
this.setParam("objectives", objectives);
return this;
}
public APIRequestCreateAdStudy setObjectives (String objectives) {
this.setParam("objectives", objectives);
return this;
}
public APIRequestCreateAdStudy setObservationEndTime (Long observationEndTime) {
this.setParam("observation_end_time", observationEndTime);
return this;
}
public APIRequestCreateAdStudy setObservationEndTime (String observationEndTime) {
this.setParam("observation_end_time", observationEndTime);
return this;
}
public APIRequestCreateAdStudy setStartTime (Long startTime) {
this.setParam("start_time", startTime);
return this;
}
public APIRequestCreateAdStudy setStartTime (String startTime) {
this.setParam("start_time", startTime);
return this;
}
public APIRequestCreateAdStudy setType (AdStudy.EnumType type) {
this.setParam("type", type);
return this;
}
public APIRequestCreateAdStudy setType (String type) {
this.setParam("type", type);
return this;
}
public APIRequestCreateAdStudy setViewers (List viewers) {
this.setParam("viewers", viewers);
return this;
}
public APIRequestCreateAdStudy setViewers (String viewers) {
this.setParam("viewers", viewers);
return this;
}
public APIRequestCreateAdStudy requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAdStudy requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdStudy requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAdStudy requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdStudy requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAdStudy requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestCreateAdAccount extends APIRequest {
AdAccount lastResponse = null;
@Override
public AdAccount getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"currency",
"end_advertiser",
"funding_id",
"invoice",
"io",
"media_agency",
"name",
"partner",
"po_number",
"timezone_id",
};
public static final String[] FIELDS = {
};
@Override
public AdAccount parseResponse(String response) throws APIException {
return AdAccount.parseResponse(response, getContext(), this).head();
}
@Override
public AdAccount execute() throws APIException {
return execute(new HashMap());
}
@Override
public AdAccount execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestCreateAdAccount(String nodeId, APIContext context) {
super(context, nodeId, "/adaccount", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAdAccount setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAdAccount setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAdAccount setCurrency (String currency) {
this.setParam("currency", currency);
return this;
}
public APIRequestCreateAdAccount setEndAdvertiser (Object endAdvertiser) {
this.setParam("end_advertiser", endAdvertiser);
return this;
}
public APIRequestCreateAdAccount setEndAdvertiser (String endAdvertiser) {
this.setParam("end_advertiser", endAdvertiser);
return this;
}
public APIRequestCreateAdAccount setFundingId (String fundingId) {
this.setParam("funding_id", fundingId);
return this;
}
public APIRequestCreateAdAccount setInvoice (Boolean invoice) {
this.setParam("invoice", invoice);
return this;
}
public APIRequestCreateAdAccount setInvoice (String invoice) {
this.setParam("invoice", invoice);
return this;
}
public APIRequestCreateAdAccount setIo (Boolean io) {
this.setParam("io", io);
return this;
}
public APIRequestCreateAdAccount setIo (String io) {
this.setParam("io", io);
return this;
}
public APIRequestCreateAdAccount setMediaAgency (String mediaAgency) {
this.setParam("media_agency", mediaAgency);
return this;
}
public APIRequestCreateAdAccount setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateAdAccount setPartner (String partner) {
this.setParam("partner", partner);
return this;
}
public APIRequestCreateAdAccount setPoNumber (String poNumber) {
this.setParam("po_number", poNumber);
return this;
}
public APIRequestCreateAdAccount setTimezoneId (Long timezoneId) {
this.setParam("timezone_id", timezoneId);
return this;
}
public APIRequestCreateAdAccount setTimezoneId (String timezoneId) {
this.setParam("timezone_id", timezoneId);
return this;
}
public APIRequestCreateAdAccount requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAdAccount requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdAccount requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAdAccount requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdAccount requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAdAccount requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestCreateAdAccounts extends APIRequest {
AdAccount lastResponse = null;
@Override
public AdAccount getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"access_type",
"adaccount_id",
"permitted_roles",
};
public static final String[] FIELDS = {
};
@Override
public AdAccount parseResponse(String response) throws APIException {
return AdAccount.parseResponse(response, getContext(), this).head();
}
@Override
public AdAccount execute() throws APIException {
return execute(new HashMap());
}
@Override
public AdAccount execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestCreateAdAccounts(String nodeId, APIContext context) {
super(context, nodeId, "/adaccounts", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAdAccounts setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAdAccounts setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAdAccounts setAccessType (AdAccount.EnumAccessType accessType) {
this.setParam("access_type", accessType);
return this;
}
public APIRequestCreateAdAccounts setAccessType (String accessType) {
this.setParam("access_type", accessType);
return this;
}
public APIRequestCreateAdAccounts setAdaccountId (String adaccountId) {
this.setParam("adaccount_id", adaccountId);
return this;
}
public APIRequestCreateAdAccounts setPermittedRoles (List permittedRoles) {
this.setParam("permitted_roles", permittedRoles);
return this;
}
public APIRequestCreateAdAccounts setPermittedRoles (String permittedRoles) {
this.setParam("permitted_roles", permittedRoles);
return this;
}
public APIRequestCreateAdAccounts requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAdAccounts requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdAccounts requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAdAccounts requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdAccounts requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAdAccounts requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAdsPixels extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"id_filter",
"name_filter",
};
public static final String[] FIELDS = {
"code",
"creation_time",
"id",
"is_created_by_business",
"last_fired_time",
"name",
"owner_ad_account",
"owner_business",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return AdsPixel.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAdsPixels(String nodeId, APIContext context) {
super(context, nodeId, "/adspixels", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdsPixels setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdsPixels setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdsPixels setIdFilter (String idFilter) {
this.setParam("id_filter", idFilter);
return this;
}
public APIRequestGetAdsPixels setNameFilter (String nameFilter) {
this.setParam("name_filter", nameFilter);
return this;
}
public APIRequestGetAdsPixels requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdsPixels requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdsPixels requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdsPixels requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdsPixels requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdsPixels requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdsPixels requestCodeField () {
return this.requestCodeField(true);
}
public APIRequestGetAdsPixels requestCodeField (boolean value) {
this.requestField("code", value);
return this;
}
public APIRequestGetAdsPixels requestCreationTimeField () {
return this.requestCreationTimeField(true);
}
public APIRequestGetAdsPixels requestCreationTimeField (boolean value) {
this.requestField("creation_time", value);
return this;
}
public APIRequestGetAdsPixels requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdsPixels requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdsPixels requestIsCreatedByBusinessField () {
return this.requestIsCreatedByBusinessField(true);
}
public APIRequestGetAdsPixels requestIsCreatedByBusinessField (boolean value) {
this.requestField("is_created_by_business", value);
return this;
}
public APIRequestGetAdsPixels requestLastFiredTimeField () {
return this.requestLastFiredTimeField(true);
}
public APIRequestGetAdsPixels requestLastFiredTimeField (boolean value) {
this.requestField("last_fired_time", value);
return this;
}
public APIRequestGetAdsPixels requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAdsPixels requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAdsPixels requestOwnerAdAccountField () {
return this.requestOwnerAdAccountField(true);
}
public APIRequestGetAdsPixels requestOwnerAdAccountField (boolean value) {
this.requestField("owner_ad_account", value);
return this;
}
public APIRequestGetAdsPixels requestOwnerBusinessField () {
return this.requestOwnerBusinessField(true);
}
public APIRequestGetAdsPixels requestOwnerBusinessField (boolean value) {
this.requestField("owner_business", value);
return this;
}
}
public static class APIRequestCreateAdsPixel extends APIRequest {
AdsPixel lastResponse = null;
@Override
public AdsPixel getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"name",
};
public static final String[] FIELDS = {
};
@Override
public AdsPixel parseResponse(String response) throws APIException {
return AdsPixel.parseResponse(response, getContext(), this).head();
}
@Override
public AdsPixel execute() throws APIException {
return execute(new HashMap());
}
@Override
public AdsPixel execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestCreateAdsPixel(String nodeId, APIContext context) {
super(context, nodeId, "/adspixels", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAdsPixel setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAdsPixel setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAdsPixel setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateAdsPixel requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAdsPixel requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdsPixel requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAdsPixel requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdsPixel requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAdsPixel requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestDeleteApps extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"app_id",
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return APINode.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestDeleteApps(String nodeId, APIContext context) {
super(context, nodeId, "/apps", "DELETE", Arrays.asList(PARAMS));
}
@Override
public APIRequestDeleteApps setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestDeleteApps setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestDeleteApps setAppId (Long appId) {
this.setParam("app_id", appId);
return this;
}
public APIRequestDeleteApps setAppId (String appId) {
this.setParam("app_id", appId);
return this;
}
public APIRequestDeleteApps requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestDeleteApps requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteApps requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestDeleteApps requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteApps requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestDeleteApps requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAssignedAdAccounts extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"email",
"user_id",
};
public static final String[] FIELDS = {
"account_id",
"account_status",
"age",
"agency_client_declaration",
"amount_spent",
"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",
"failed_delivery_checks",
"funding_source",
"funding_source_details",
"has_migrated_permissions",
"id",
"io_number",
"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",
"salesforce_invoice_group_id",
"show_checkout_experience",
"spend_cap",
"tax_id",
"tax_id_status",
"tax_id_type",
"timezone_id",
"timezone_name",
"timezone_offset_hours_utc",
"tos_accepted",
"user_role",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return AdAccount.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAssignedAdAccounts(String nodeId, APIContext context) {
super(context, nodeId, "/assigned_ad_accounts", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAssignedAdAccounts setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAssignedAdAccounts setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAssignedAdAccounts setEmail (String email) {
this.setParam("email", email);
return this;
}
public APIRequestGetAssignedAdAccounts setUserId (Long userId) {
this.setParam("user_id", userId);
return this;
}
public APIRequestGetAssignedAdAccounts setUserId (String userId) {
this.setParam("user_id", userId);
return this;
}
public APIRequestGetAssignedAdAccounts requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAssignedAdAccounts requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAssignedAdAccounts requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAssignedAdAccounts requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAssignedAdAccounts requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAssignedAdAccounts requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAssignedAdAccounts requestAccountIdField () {
return this.requestAccountIdField(true);
}
public APIRequestGetAssignedAdAccounts requestAccountIdField (boolean value) {
this.requestField("account_id", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestAccountStatusField () {
return this.requestAccountStatusField(true);
}
public APIRequestGetAssignedAdAccounts requestAccountStatusField (boolean value) {
this.requestField("account_status", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestAgeField () {
return this.requestAgeField(true);
}
public APIRequestGetAssignedAdAccounts requestAgeField (boolean value) {
this.requestField("age", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestAgencyClientDeclarationField () {
return this.requestAgencyClientDeclarationField(true);
}
public APIRequestGetAssignedAdAccounts requestAgencyClientDeclarationField (boolean value) {
this.requestField("agency_client_declaration", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestAmountSpentField () {
return this.requestAmountSpentField(true);
}
public APIRequestGetAssignedAdAccounts requestAmountSpentField (boolean value) {
this.requestField("amount_spent", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestBalanceField () {
return this.requestBalanceField(true);
}
public APIRequestGetAssignedAdAccounts requestBalanceField (boolean value) {
this.requestField("balance", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestBusinessField () {
return this.requestBusinessField(true);
}
public APIRequestGetAssignedAdAccounts requestBusinessField (boolean value) {
this.requestField("business", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestBusinessCityField () {
return this.requestBusinessCityField(true);
}
public APIRequestGetAssignedAdAccounts requestBusinessCityField (boolean value) {
this.requestField("business_city", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestBusinessCountryCodeField () {
return this.requestBusinessCountryCodeField(true);
}
public APIRequestGetAssignedAdAccounts requestBusinessCountryCodeField (boolean value) {
this.requestField("business_country_code", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestBusinessNameField () {
return this.requestBusinessNameField(true);
}
public APIRequestGetAssignedAdAccounts requestBusinessNameField (boolean value) {
this.requestField("business_name", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestBusinessStateField () {
return this.requestBusinessStateField(true);
}
public APIRequestGetAssignedAdAccounts requestBusinessStateField (boolean value) {
this.requestField("business_state", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestBusinessStreetField () {
return this.requestBusinessStreetField(true);
}
public APIRequestGetAssignedAdAccounts requestBusinessStreetField (boolean value) {
this.requestField("business_street", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestBusinessStreet2Field () {
return this.requestBusinessStreet2Field(true);
}
public APIRequestGetAssignedAdAccounts requestBusinessStreet2Field (boolean value) {
this.requestField("business_street2", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestBusinessZipField () {
return this.requestBusinessZipField(true);
}
public APIRequestGetAssignedAdAccounts requestBusinessZipField (boolean value) {
this.requestField("business_zip", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestCapabilitiesField () {
return this.requestCapabilitiesField(true);
}
public APIRequestGetAssignedAdAccounts requestCapabilitiesField (boolean value) {
this.requestField("capabilities", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetAssignedAdAccounts requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestCurrencyField () {
return this.requestCurrencyField(true);
}
public APIRequestGetAssignedAdAccounts requestCurrencyField (boolean value) {
this.requestField("currency", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestDisableReasonField () {
return this.requestDisableReasonField(true);
}
public APIRequestGetAssignedAdAccounts requestDisableReasonField (boolean value) {
this.requestField("disable_reason", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestEndAdvertiserField () {
return this.requestEndAdvertiserField(true);
}
public APIRequestGetAssignedAdAccounts requestEndAdvertiserField (boolean value) {
this.requestField("end_advertiser", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestEndAdvertiserNameField () {
return this.requestEndAdvertiserNameField(true);
}
public APIRequestGetAssignedAdAccounts requestEndAdvertiserNameField (boolean value) {
this.requestField("end_advertiser_name", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestFailedDeliveryChecksField () {
return this.requestFailedDeliveryChecksField(true);
}
public APIRequestGetAssignedAdAccounts requestFailedDeliveryChecksField (boolean value) {
this.requestField("failed_delivery_checks", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestFundingSourceField () {
return this.requestFundingSourceField(true);
}
public APIRequestGetAssignedAdAccounts requestFundingSourceField (boolean value) {
this.requestField("funding_source", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestFundingSourceDetailsField () {
return this.requestFundingSourceDetailsField(true);
}
public APIRequestGetAssignedAdAccounts requestFundingSourceDetailsField (boolean value) {
this.requestField("funding_source_details", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestHasMigratedPermissionsField () {
return this.requestHasMigratedPermissionsField(true);
}
public APIRequestGetAssignedAdAccounts requestHasMigratedPermissionsField (boolean value) {
this.requestField("has_migrated_permissions", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAssignedAdAccounts requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestIoNumberField () {
return this.requestIoNumberField(true);
}
public APIRequestGetAssignedAdAccounts requestIoNumberField (boolean value) {
this.requestField("io_number", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestIsNotificationsEnabledField () {
return this.requestIsNotificationsEnabledField(true);
}
public APIRequestGetAssignedAdAccounts requestIsNotificationsEnabledField (boolean value) {
this.requestField("is_notifications_enabled", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestIsPersonalField () {
return this.requestIsPersonalField(true);
}
public APIRequestGetAssignedAdAccounts requestIsPersonalField (boolean value) {
this.requestField("is_personal", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestIsPrepayAccountField () {
return this.requestIsPrepayAccountField(true);
}
public APIRequestGetAssignedAdAccounts requestIsPrepayAccountField (boolean value) {
this.requestField("is_prepay_account", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestIsTaxIdRequiredField () {
return this.requestIsTaxIdRequiredField(true);
}
public APIRequestGetAssignedAdAccounts requestIsTaxIdRequiredField (boolean value) {
this.requestField("is_tax_id_required", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestLineNumbersField () {
return this.requestLineNumbersField(true);
}
public APIRequestGetAssignedAdAccounts requestLineNumbersField (boolean value) {
this.requestField("line_numbers", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestMediaAgencyField () {
return this.requestMediaAgencyField(true);
}
public APIRequestGetAssignedAdAccounts requestMediaAgencyField (boolean value) {
this.requestField("media_agency", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestMinCampaignGroupSpendCapField () {
return this.requestMinCampaignGroupSpendCapField(true);
}
public APIRequestGetAssignedAdAccounts requestMinCampaignGroupSpendCapField (boolean value) {
this.requestField("min_campaign_group_spend_cap", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestMinDailyBudgetField () {
return this.requestMinDailyBudgetField(true);
}
public APIRequestGetAssignedAdAccounts requestMinDailyBudgetField (boolean value) {
this.requestField("min_daily_budget", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAssignedAdAccounts requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestOffsitePixelsTosAcceptedField () {
return this.requestOffsitePixelsTosAcceptedField(true);
}
public APIRequestGetAssignedAdAccounts requestOffsitePixelsTosAcceptedField (boolean value) {
this.requestField("offsite_pixels_tos_accepted", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestOwnerField () {
return this.requestOwnerField(true);
}
public APIRequestGetAssignedAdAccounts requestOwnerField (boolean value) {
this.requestField("owner", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestPartnerField () {
return this.requestPartnerField(true);
}
public APIRequestGetAssignedAdAccounts requestPartnerField (boolean value) {
this.requestField("partner", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestRfSpecField () {
return this.requestRfSpecField(true);
}
public APIRequestGetAssignedAdAccounts requestRfSpecField (boolean value) {
this.requestField("rf_spec", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestSalesforceInvoiceGroupIdField () {
return this.requestSalesforceInvoiceGroupIdField(true);
}
public APIRequestGetAssignedAdAccounts requestSalesforceInvoiceGroupIdField (boolean value) {
this.requestField("salesforce_invoice_group_id", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestShowCheckoutExperienceField () {
return this.requestShowCheckoutExperienceField(true);
}
public APIRequestGetAssignedAdAccounts requestShowCheckoutExperienceField (boolean value) {
this.requestField("show_checkout_experience", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestSpendCapField () {
return this.requestSpendCapField(true);
}
public APIRequestGetAssignedAdAccounts requestSpendCapField (boolean value) {
this.requestField("spend_cap", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestTaxIdField () {
return this.requestTaxIdField(true);
}
public APIRequestGetAssignedAdAccounts requestTaxIdField (boolean value) {
this.requestField("tax_id", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestTaxIdStatusField () {
return this.requestTaxIdStatusField(true);
}
public APIRequestGetAssignedAdAccounts requestTaxIdStatusField (boolean value) {
this.requestField("tax_id_status", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestTaxIdTypeField () {
return this.requestTaxIdTypeField(true);
}
public APIRequestGetAssignedAdAccounts requestTaxIdTypeField (boolean value) {
this.requestField("tax_id_type", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestTimezoneIdField () {
return this.requestTimezoneIdField(true);
}
public APIRequestGetAssignedAdAccounts requestTimezoneIdField (boolean value) {
this.requestField("timezone_id", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestTimezoneNameField () {
return this.requestTimezoneNameField(true);
}
public APIRequestGetAssignedAdAccounts requestTimezoneNameField (boolean value) {
this.requestField("timezone_name", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestTimezoneOffsetHoursUtcField () {
return this.requestTimezoneOffsetHoursUtcField(true);
}
public APIRequestGetAssignedAdAccounts requestTimezoneOffsetHoursUtcField (boolean value) {
this.requestField("timezone_offset_hours_utc", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestTosAcceptedField () {
return this.requestTosAcceptedField(true);
}
public APIRequestGetAssignedAdAccounts requestTosAcceptedField (boolean value) {
this.requestField("tos_accepted", value);
return this;
}
public APIRequestGetAssignedAdAccounts requestUserRoleField () {
return this.requestUserRoleField(true);
}
public APIRequestGetAssignedAdAccounts requestUserRoleField (boolean value) {
this.requestField("user_role", value);
return this;
}
}
public static class APIRequestGetAssignedPages extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"email",
"user_id",
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return APINode.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAssignedPages(String nodeId, APIContext context) {
super(context, nodeId, "/assigned_pages", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAssignedPages setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAssignedPages setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAssignedPages setEmail (String email) {
this.setParam("email", email);
return this;
}
public APIRequestGetAssignedPages setUserId (Long userId) {
this.setParam("user_id", userId);
return this;
}
public APIRequestGetAssignedPages setUserId (String userId) {
this.setParam("user_id", userId);
return this;
}
public APIRequestGetAssignedPages requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAssignedPages requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAssignedPages requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAssignedPages requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAssignedPages requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAssignedPages requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAssignedProductCatalogs extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"email",
"user_id",
};
public static final String[] FIELDS = {
"business",
"da_display_settings",
"default_image_url",
"fallback_image_url",
"feed_count",
"id",
"image_padding_landscape",
"image_padding_square",
"name",
"product_count",
"vertical",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return ProductCatalog.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAssignedProductCatalogs(String nodeId, APIContext context) {
super(context, nodeId, "/assigned_product_catalogs", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAssignedProductCatalogs setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAssignedProductCatalogs setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAssignedProductCatalogs setEmail (String email) {
this.setParam("email", email);
return this;
}
public APIRequestGetAssignedProductCatalogs setUserId (Long userId) {
this.setParam("user_id", userId);
return this;
}
public APIRequestGetAssignedProductCatalogs setUserId (String userId) {
this.setParam("user_id", userId);
return this;
}
public APIRequestGetAssignedProductCatalogs requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAssignedProductCatalogs requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAssignedProductCatalogs requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAssignedProductCatalogs requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAssignedProductCatalogs requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAssignedProductCatalogs requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAssignedProductCatalogs requestBusinessField () {
return this.requestBusinessField(true);
}
public APIRequestGetAssignedProductCatalogs requestBusinessField (boolean value) {
this.requestField("business", value);
return this;
}
public APIRequestGetAssignedProductCatalogs requestDaDisplaySettingsField () {
return this.requestDaDisplaySettingsField(true);
}
public APIRequestGetAssignedProductCatalogs requestDaDisplaySettingsField (boolean value) {
this.requestField("da_display_settings", value);
return this;
}
public APIRequestGetAssignedProductCatalogs requestDefaultImageUrlField () {
return this.requestDefaultImageUrlField(true);
}
public APIRequestGetAssignedProductCatalogs requestDefaultImageUrlField (boolean value) {
this.requestField("default_image_url", value);
return this;
}
public APIRequestGetAssignedProductCatalogs requestFallbackImageUrlField () {
return this.requestFallbackImageUrlField(true);
}
public APIRequestGetAssignedProductCatalogs requestFallbackImageUrlField (boolean value) {
this.requestField("fallback_image_url", value);
return this;
}
public APIRequestGetAssignedProductCatalogs requestFeedCountField () {
return this.requestFeedCountField(true);
}
public APIRequestGetAssignedProductCatalogs requestFeedCountField (boolean value) {
this.requestField("feed_count", value);
return this;
}
public APIRequestGetAssignedProductCatalogs requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAssignedProductCatalogs requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAssignedProductCatalogs requestImagePaddingLandscapeField () {
return this.requestImagePaddingLandscapeField(true);
}
public APIRequestGetAssignedProductCatalogs requestImagePaddingLandscapeField (boolean value) {
this.requestField("image_padding_landscape", value);
return this;
}
public APIRequestGetAssignedProductCatalogs requestImagePaddingSquareField () {
return this.requestImagePaddingSquareField(true);
}
public APIRequestGetAssignedProductCatalogs requestImagePaddingSquareField (boolean value) {
this.requestField("image_padding_square", value);
return this;
}
public APIRequestGetAssignedProductCatalogs requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAssignedProductCatalogs requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAssignedProductCatalogs requestProductCountField () {
return this.requestProductCountField(true);
}
public APIRequestGetAssignedProductCatalogs requestProductCountField (boolean value) {
this.requestField("product_count", value);
return this;
}
public APIRequestGetAssignedProductCatalogs requestVerticalField () {
return this.requestVerticalField(true);
}
public APIRequestGetAssignedProductCatalogs requestVerticalField (boolean value) {
this.requestField("vertical", value);
return this;
}
}
public static class APIRequestGetClientAdAccountRequests extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"ad_account",
"id",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return BusinessAdAccountRequest.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetClientAdAccountRequests(String nodeId, APIContext context) {
super(context, nodeId, "/client_ad_account_requests", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetClientAdAccountRequests setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetClientAdAccountRequests setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetClientAdAccountRequests requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetClientAdAccountRequests requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetClientAdAccountRequests requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetClientAdAccountRequests requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetClientAdAccountRequests requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetClientAdAccountRequests requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetClientAdAccountRequests requestAdAccountField () {
return this.requestAdAccountField(true);
}
public APIRequestGetClientAdAccountRequests requestAdAccountField (boolean value) {
this.requestField("ad_account", value);
return this;
}
public APIRequestGetClientAdAccountRequests requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetClientAdAccountRequests requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
}
public static class APIRequestGetClientAdAccounts 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",
"age",
"agency_client_declaration",
"amount_spent",
"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",
"failed_delivery_checks",
"funding_source",
"funding_source_details",
"has_migrated_permissions",
"id",
"io_number",
"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",
"salesforce_invoice_group_id",
"show_checkout_experience",
"spend_cap",
"tax_id",
"tax_id_status",
"tax_id_type",
"timezone_id",
"timezone_name",
"timezone_offset_hours_utc",
"tos_accepted",
"user_role",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return AdAccount.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetClientAdAccounts(String nodeId, APIContext context) {
super(context, nodeId, "/client_ad_accounts", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetClientAdAccounts setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetClientAdAccounts setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetClientAdAccounts requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetClientAdAccounts requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetClientAdAccounts requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetClientAdAccounts requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetClientAdAccounts requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetClientAdAccounts requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetClientAdAccounts requestAccountIdField () {
return this.requestAccountIdField(true);
}
public APIRequestGetClientAdAccounts requestAccountIdField (boolean value) {
this.requestField("account_id", value);
return this;
}
public APIRequestGetClientAdAccounts requestAccountStatusField () {
return this.requestAccountStatusField(true);
}
public APIRequestGetClientAdAccounts requestAccountStatusField (boolean value) {
this.requestField("account_status", value);
return this;
}
public APIRequestGetClientAdAccounts requestAgeField () {
return this.requestAgeField(true);
}
public APIRequestGetClientAdAccounts requestAgeField (boolean value) {
this.requestField("age", value);
return this;
}
public APIRequestGetClientAdAccounts requestAgencyClientDeclarationField () {
return this.requestAgencyClientDeclarationField(true);
}
public APIRequestGetClientAdAccounts requestAgencyClientDeclarationField (boolean value) {
this.requestField("agency_client_declaration", value);
return this;
}
public APIRequestGetClientAdAccounts requestAmountSpentField () {
return this.requestAmountSpentField(true);
}
public APIRequestGetClientAdAccounts requestAmountSpentField (boolean value) {
this.requestField("amount_spent", value);
return this;
}
public APIRequestGetClientAdAccounts requestBalanceField () {
return this.requestBalanceField(true);
}
public APIRequestGetClientAdAccounts requestBalanceField (boolean value) {
this.requestField("balance", value);
return this;
}
public APIRequestGetClientAdAccounts requestBusinessField () {
return this.requestBusinessField(true);
}
public APIRequestGetClientAdAccounts requestBusinessField (boolean value) {
this.requestField("business", value);
return this;
}
public APIRequestGetClientAdAccounts requestBusinessCityField () {
return this.requestBusinessCityField(true);
}
public APIRequestGetClientAdAccounts requestBusinessCityField (boolean value) {
this.requestField("business_city", value);
return this;
}
public APIRequestGetClientAdAccounts requestBusinessCountryCodeField () {
return this.requestBusinessCountryCodeField(true);
}
public APIRequestGetClientAdAccounts requestBusinessCountryCodeField (boolean value) {
this.requestField("business_country_code", value);
return this;
}
public APIRequestGetClientAdAccounts requestBusinessNameField () {
return this.requestBusinessNameField(true);
}
public APIRequestGetClientAdAccounts requestBusinessNameField (boolean value) {
this.requestField("business_name", value);
return this;
}
public APIRequestGetClientAdAccounts requestBusinessStateField () {
return this.requestBusinessStateField(true);
}
public APIRequestGetClientAdAccounts requestBusinessStateField (boolean value) {
this.requestField("business_state", value);
return this;
}
public APIRequestGetClientAdAccounts requestBusinessStreetField () {
return this.requestBusinessStreetField(true);
}
public APIRequestGetClientAdAccounts requestBusinessStreetField (boolean value) {
this.requestField("business_street", value);
return this;
}
public APIRequestGetClientAdAccounts requestBusinessStreet2Field () {
return this.requestBusinessStreet2Field(true);
}
public APIRequestGetClientAdAccounts requestBusinessStreet2Field (boolean value) {
this.requestField("business_street2", value);
return this;
}
public APIRequestGetClientAdAccounts requestBusinessZipField () {
return this.requestBusinessZipField(true);
}
public APIRequestGetClientAdAccounts requestBusinessZipField (boolean value) {
this.requestField("business_zip", value);
return this;
}
public APIRequestGetClientAdAccounts requestCapabilitiesField () {
return this.requestCapabilitiesField(true);
}
public APIRequestGetClientAdAccounts requestCapabilitiesField (boolean value) {
this.requestField("capabilities", value);
return this;
}
public APIRequestGetClientAdAccounts requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetClientAdAccounts requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetClientAdAccounts requestCurrencyField () {
return this.requestCurrencyField(true);
}
public APIRequestGetClientAdAccounts requestCurrencyField (boolean value) {
this.requestField("currency", value);
return this;
}
public APIRequestGetClientAdAccounts requestDisableReasonField () {
return this.requestDisableReasonField(true);
}
public APIRequestGetClientAdAccounts requestDisableReasonField (boolean value) {
this.requestField("disable_reason", value);
return this;
}
public APIRequestGetClientAdAccounts requestEndAdvertiserField () {
return this.requestEndAdvertiserField(true);
}
public APIRequestGetClientAdAccounts requestEndAdvertiserField (boolean value) {
this.requestField("end_advertiser", value);
return this;
}
public APIRequestGetClientAdAccounts requestEndAdvertiserNameField () {
return this.requestEndAdvertiserNameField(true);
}
public APIRequestGetClientAdAccounts requestEndAdvertiserNameField (boolean value) {
this.requestField("end_advertiser_name", value);
return this;
}
public APIRequestGetClientAdAccounts requestFailedDeliveryChecksField () {
return this.requestFailedDeliveryChecksField(true);
}
public APIRequestGetClientAdAccounts requestFailedDeliveryChecksField (boolean value) {
this.requestField("failed_delivery_checks", value);
return this;
}
public APIRequestGetClientAdAccounts requestFundingSourceField () {
return this.requestFundingSourceField(true);
}
public APIRequestGetClientAdAccounts requestFundingSourceField (boolean value) {
this.requestField("funding_source", value);
return this;
}
public APIRequestGetClientAdAccounts requestFundingSourceDetailsField () {
return this.requestFundingSourceDetailsField(true);
}
public APIRequestGetClientAdAccounts requestFundingSourceDetailsField (boolean value) {
this.requestField("funding_source_details", value);
return this;
}
public APIRequestGetClientAdAccounts requestHasMigratedPermissionsField () {
return this.requestHasMigratedPermissionsField(true);
}
public APIRequestGetClientAdAccounts requestHasMigratedPermissionsField (boolean value) {
this.requestField("has_migrated_permissions", value);
return this;
}
public APIRequestGetClientAdAccounts requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetClientAdAccounts requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetClientAdAccounts requestIoNumberField () {
return this.requestIoNumberField(true);
}
public APIRequestGetClientAdAccounts requestIoNumberField (boolean value) {
this.requestField("io_number", value);
return this;
}
public APIRequestGetClientAdAccounts requestIsNotificationsEnabledField () {
return this.requestIsNotificationsEnabledField(true);
}
public APIRequestGetClientAdAccounts requestIsNotificationsEnabledField (boolean value) {
this.requestField("is_notifications_enabled", value);
return this;
}
public APIRequestGetClientAdAccounts requestIsPersonalField () {
return this.requestIsPersonalField(true);
}
public APIRequestGetClientAdAccounts requestIsPersonalField (boolean value) {
this.requestField("is_personal", value);
return this;
}
public APIRequestGetClientAdAccounts requestIsPrepayAccountField () {
return this.requestIsPrepayAccountField(true);
}
public APIRequestGetClientAdAccounts requestIsPrepayAccountField (boolean value) {
this.requestField("is_prepay_account", value);
return this;
}
public APIRequestGetClientAdAccounts requestIsTaxIdRequiredField () {
return this.requestIsTaxIdRequiredField(true);
}
public APIRequestGetClientAdAccounts requestIsTaxIdRequiredField (boolean value) {
this.requestField("is_tax_id_required", value);
return this;
}
public APIRequestGetClientAdAccounts requestLineNumbersField () {
return this.requestLineNumbersField(true);
}
public APIRequestGetClientAdAccounts requestLineNumbersField (boolean value) {
this.requestField("line_numbers", value);
return this;
}
public APIRequestGetClientAdAccounts requestMediaAgencyField () {
return this.requestMediaAgencyField(true);
}
public APIRequestGetClientAdAccounts requestMediaAgencyField (boolean value) {
this.requestField("media_agency", value);
return this;
}
public APIRequestGetClientAdAccounts requestMinCampaignGroupSpendCapField () {
return this.requestMinCampaignGroupSpendCapField(true);
}
public APIRequestGetClientAdAccounts requestMinCampaignGroupSpendCapField (boolean value) {
this.requestField("min_campaign_group_spend_cap", value);
return this;
}
public APIRequestGetClientAdAccounts requestMinDailyBudgetField () {
return this.requestMinDailyBudgetField(true);
}
public APIRequestGetClientAdAccounts requestMinDailyBudgetField (boolean value) {
this.requestField("min_daily_budget", value);
return this;
}
public APIRequestGetClientAdAccounts requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetClientAdAccounts requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetClientAdAccounts requestOffsitePixelsTosAcceptedField () {
return this.requestOffsitePixelsTosAcceptedField(true);
}
public APIRequestGetClientAdAccounts requestOffsitePixelsTosAcceptedField (boolean value) {
this.requestField("offsite_pixels_tos_accepted", value);
return this;
}
public APIRequestGetClientAdAccounts requestOwnerField () {
return this.requestOwnerField(true);
}
public APIRequestGetClientAdAccounts requestOwnerField (boolean value) {
this.requestField("owner", value);
return this;
}
public APIRequestGetClientAdAccounts requestPartnerField () {
return this.requestPartnerField(true);
}
public APIRequestGetClientAdAccounts requestPartnerField (boolean value) {
this.requestField("partner", value);
return this;
}
public APIRequestGetClientAdAccounts requestRfSpecField () {
return this.requestRfSpecField(true);
}
public APIRequestGetClientAdAccounts requestRfSpecField (boolean value) {
this.requestField("rf_spec", value);
return this;
}
public APIRequestGetClientAdAccounts requestSalesforceInvoiceGroupIdField () {
return this.requestSalesforceInvoiceGroupIdField(true);
}
public APIRequestGetClientAdAccounts requestSalesforceInvoiceGroupIdField (boolean value) {
this.requestField("salesforce_invoice_group_id", value);
return this;
}
public APIRequestGetClientAdAccounts requestShowCheckoutExperienceField () {
return this.requestShowCheckoutExperienceField(true);
}
public APIRequestGetClientAdAccounts requestShowCheckoutExperienceField (boolean value) {
this.requestField("show_checkout_experience", value);
return this;
}
public APIRequestGetClientAdAccounts requestSpendCapField () {
return this.requestSpendCapField(true);
}
public APIRequestGetClientAdAccounts requestSpendCapField (boolean value) {
this.requestField("spend_cap", value);
return this;
}
public APIRequestGetClientAdAccounts requestTaxIdField () {
return this.requestTaxIdField(true);
}
public APIRequestGetClientAdAccounts requestTaxIdField (boolean value) {
this.requestField("tax_id", value);
return this;
}
public APIRequestGetClientAdAccounts requestTaxIdStatusField () {
return this.requestTaxIdStatusField(true);
}
public APIRequestGetClientAdAccounts requestTaxIdStatusField (boolean value) {
this.requestField("tax_id_status", value);
return this;
}
public APIRequestGetClientAdAccounts requestTaxIdTypeField () {
return this.requestTaxIdTypeField(true);
}
public APIRequestGetClientAdAccounts requestTaxIdTypeField (boolean value) {
this.requestField("tax_id_type", value);
return this;
}
public APIRequestGetClientAdAccounts requestTimezoneIdField () {
return this.requestTimezoneIdField(true);
}
public APIRequestGetClientAdAccounts requestTimezoneIdField (boolean value) {
this.requestField("timezone_id", value);
return this;
}
public APIRequestGetClientAdAccounts requestTimezoneNameField () {
return this.requestTimezoneNameField(true);
}
public APIRequestGetClientAdAccounts requestTimezoneNameField (boolean value) {
this.requestField("timezone_name", value);
return this;
}
public APIRequestGetClientAdAccounts requestTimezoneOffsetHoursUtcField () {
return this.requestTimezoneOffsetHoursUtcField(true);
}
public APIRequestGetClientAdAccounts requestTimezoneOffsetHoursUtcField (boolean value) {
this.requestField("timezone_offset_hours_utc", value);
return this;
}
public APIRequestGetClientAdAccounts requestTosAcceptedField () {
return this.requestTosAcceptedField(true);
}
public APIRequestGetClientAdAccounts requestTosAcceptedField (boolean value) {
this.requestField("tos_accepted", value);
return this;
}
public APIRequestGetClientAdAccounts requestUserRoleField () {
return this.requestUserRoleField(true);
}
public APIRequestGetClientAdAccounts requestUserRoleField (boolean value) {
this.requestField("user_role", value);
return this;
}
}
public static class APIRequestGetClientPageRequests extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"id",
"page",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return BusinessPageRequest.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetClientPageRequests(String nodeId, APIContext context) {
super(context, nodeId, "/client_page_requests", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetClientPageRequests setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetClientPageRequests setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetClientPageRequests requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetClientPageRequests requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetClientPageRequests requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetClientPageRequests requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetClientPageRequests requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetClientPageRequests requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetClientPageRequests requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetClientPageRequests requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetClientPageRequests requestPageField () {
return this.requestPageField(true);
}
public APIRequestGetClientPageRequests requestPageField (boolean value) {
this.requestField("page", value);
return this;
}
}
public static class APIRequestGetClientPages extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return APINode.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetClientPages(String nodeId, APIContext context) {
super(context, nodeId, "/client_pages", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetClientPages setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetClientPages setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetClientPages requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetClientPages requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetClientPages requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetClientPages requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetClientPages requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetClientPages requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetEventSourceGroups extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"business",
"event_sources",
"id",
"name",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return EventSourceGroup.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetEventSourceGroups(String nodeId, APIContext context) {
super(context, nodeId, "/event_source_groups", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetEventSourceGroups setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetEventSourceGroups setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetEventSourceGroups requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetEventSourceGroups requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetEventSourceGroups requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetEventSourceGroups requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetEventSourceGroups requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetEventSourceGroups requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetEventSourceGroups requestBusinessField () {
return this.requestBusinessField(true);
}
public APIRequestGetEventSourceGroups requestBusinessField (boolean value) {
this.requestField("business", value);
return this;
}
public APIRequestGetEventSourceGroups requestEventSourcesField () {
return this.requestEventSourcesField(true);
}
public APIRequestGetEventSourceGroups requestEventSourcesField (boolean value) {
this.requestField("event_sources", value);
return this;
}
public APIRequestGetEventSourceGroups requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetEventSourceGroups requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetEventSourceGroups requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetEventSourceGroups requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
}
public static class APIRequestCreateEventSourceGroup extends APIRequest {
EventSourceGroup lastResponse = null;
@Override
public EventSourceGroup getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"event_sources",
"name",
};
public static final String[] FIELDS = {
};
@Override
public EventSourceGroup parseResponse(String response) throws APIException {
return EventSourceGroup.parseResponse(response, getContext(), this).head();
}
@Override
public EventSourceGroup execute() throws APIException {
return execute(new HashMap());
}
@Override
public EventSourceGroup execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestCreateEventSourceGroup(String nodeId, APIContext context) {
super(context, nodeId, "/event_source_groups", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateEventSourceGroup setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateEventSourceGroup setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateEventSourceGroup setEventSources (List eventSources) {
this.setParam("event_sources", eventSources);
return this;
}
public APIRequestCreateEventSourceGroup setEventSources (String eventSources) {
this.setParam("event_sources", eventSources);
return this;
}
public APIRequestCreateEventSourceGroup setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateEventSourceGroup requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateEventSourceGroup requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateEventSourceGroup requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateEventSourceGroup requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateEventSourceGroup requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateEventSourceGroup requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetGrpPlans extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"status",
};
public static final String[] FIELDS = {
"account_id",
"campaign_group_id",
"campaign_id",
"campaign_time_start",
"campaign_time_stop",
"curve_budget_reach",
"daily_impression_curve",
"destination_id",
"expiration_time",
"external_budget",
"external_impression",
"external_maximum_budget",
"external_maximum_impression",
"external_maximum_reach",
"external_minimum_budget",
"external_minimum_impression",
"external_minimum_reach",
"external_reach",
"frequency_cap",
"grp_dmas_audience_size",
"holdout_percentage",
"id",
"instagram_destination_id",
"interval_frequency_cap",
"interval_frequency_cap_reset_period",
"name",
"pause_periods",
"placement_breakdown",
"prediction_mode",
"prediction_progress",
"reservation_status",
"status",
"story_event_type",
"target_audience_size",
"target_spec",
"time_created",
"time_updated",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return ReachFrequencyPrediction.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetGrpPlans(String nodeId, APIContext context) {
super(context, nodeId, "/grp_plans", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetGrpPlans setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetGrpPlans setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetGrpPlans setStatus (ReachFrequencyPrediction.EnumStatus status) {
this.setParam("status", status);
return this;
}
public APIRequestGetGrpPlans setStatus (String status) {
this.setParam("status", status);
return this;
}
public APIRequestGetGrpPlans requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetGrpPlans requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetGrpPlans requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetGrpPlans requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetGrpPlans requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetGrpPlans requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetGrpPlans requestAccountIdField () {
return this.requestAccountIdField(true);
}
public APIRequestGetGrpPlans requestAccountIdField (boolean value) {
this.requestField("account_id", value);
return this;
}
public APIRequestGetGrpPlans requestCampaignGroupIdField () {
return this.requestCampaignGroupIdField(true);
}
public APIRequestGetGrpPlans requestCampaignGroupIdField (boolean value) {
this.requestField("campaign_group_id", value);
return this;
}
public APIRequestGetGrpPlans requestCampaignIdField () {
return this.requestCampaignIdField(true);
}
public APIRequestGetGrpPlans requestCampaignIdField (boolean value) {
this.requestField("campaign_id", value);
return this;
}
public APIRequestGetGrpPlans requestCampaignTimeStartField () {
return this.requestCampaignTimeStartField(true);
}
public APIRequestGetGrpPlans requestCampaignTimeStartField (boolean value) {
this.requestField("campaign_time_start", value);
return this;
}
public APIRequestGetGrpPlans requestCampaignTimeStopField () {
return this.requestCampaignTimeStopField(true);
}
public APIRequestGetGrpPlans requestCampaignTimeStopField (boolean value) {
this.requestField("campaign_time_stop", value);
return this;
}
public APIRequestGetGrpPlans requestCurveBudgetReachField () {
return this.requestCurveBudgetReachField(true);
}
public APIRequestGetGrpPlans requestCurveBudgetReachField (boolean value) {
this.requestField("curve_budget_reach", value);
return this;
}
public APIRequestGetGrpPlans requestDailyImpressionCurveField () {
return this.requestDailyImpressionCurveField(true);
}
public APIRequestGetGrpPlans requestDailyImpressionCurveField (boolean value) {
this.requestField("daily_impression_curve", value);
return this;
}
public APIRequestGetGrpPlans requestDestinationIdField () {
return this.requestDestinationIdField(true);
}
public APIRequestGetGrpPlans requestDestinationIdField (boolean value) {
this.requestField("destination_id", value);
return this;
}
public APIRequestGetGrpPlans requestExpirationTimeField () {
return this.requestExpirationTimeField(true);
}
public APIRequestGetGrpPlans requestExpirationTimeField (boolean value) {
this.requestField("expiration_time", value);
return this;
}
public APIRequestGetGrpPlans requestExternalBudgetField () {
return this.requestExternalBudgetField(true);
}
public APIRequestGetGrpPlans requestExternalBudgetField (boolean value) {
this.requestField("external_budget", value);
return this;
}
public APIRequestGetGrpPlans requestExternalImpressionField () {
return this.requestExternalImpressionField(true);
}
public APIRequestGetGrpPlans requestExternalImpressionField (boolean value) {
this.requestField("external_impression", value);
return this;
}
public APIRequestGetGrpPlans requestExternalMaximumBudgetField () {
return this.requestExternalMaximumBudgetField(true);
}
public APIRequestGetGrpPlans requestExternalMaximumBudgetField (boolean value) {
this.requestField("external_maximum_budget", value);
return this;
}
public APIRequestGetGrpPlans requestExternalMaximumImpressionField () {
return this.requestExternalMaximumImpressionField(true);
}
public APIRequestGetGrpPlans requestExternalMaximumImpressionField (boolean value) {
this.requestField("external_maximum_impression", value);
return this;
}
public APIRequestGetGrpPlans requestExternalMaximumReachField () {
return this.requestExternalMaximumReachField(true);
}
public APIRequestGetGrpPlans requestExternalMaximumReachField (boolean value) {
this.requestField("external_maximum_reach", value);
return this;
}
public APIRequestGetGrpPlans requestExternalMinimumBudgetField () {
return this.requestExternalMinimumBudgetField(true);
}
public APIRequestGetGrpPlans requestExternalMinimumBudgetField (boolean value) {
this.requestField("external_minimum_budget", value);
return this;
}
public APIRequestGetGrpPlans requestExternalMinimumImpressionField () {
return this.requestExternalMinimumImpressionField(true);
}
public APIRequestGetGrpPlans requestExternalMinimumImpressionField (boolean value) {
this.requestField("external_minimum_impression", value);
return this;
}
public APIRequestGetGrpPlans requestExternalMinimumReachField () {
return this.requestExternalMinimumReachField(true);
}
public APIRequestGetGrpPlans requestExternalMinimumReachField (boolean value) {
this.requestField("external_minimum_reach", value);
return this;
}
public APIRequestGetGrpPlans requestExternalReachField () {
return this.requestExternalReachField(true);
}
public APIRequestGetGrpPlans requestExternalReachField (boolean value) {
this.requestField("external_reach", value);
return this;
}
public APIRequestGetGrpPlans requestFrequencyCapField () {
return this.requestFrequencyCapField(true);
}
public APIRequestGetGrpPlans requestFrequencyCapField (boolean value) {
this.requestField("frequency_cap", value);
return this;
}
public APIRequestGetGrpPlans requestGrpDmasAudienceSizeField () {
return this.requestGrpDmasAudienceSizeField(true);
}
public APIRequestGetGrpPlans requestGrpDmasAudienceSizeField (boolean value) {
this.requestField("grp_dmas_audience_size", value);
return this;
}
public APIRequestGetGrpPlans requestHoldoutPercentageField () {
return this.requestHoldoutPercentageField(true);
}
public APIRequestGetGrpPlans requestHoldoutPercentageField (boolean value) {
this.requestField("holdout_percentage", value);
return this;
}
public APIRequestGetGrpPlans requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetGrpPlans requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetGrpPlans requestInstagramDestinationIdField () {
return this.requestInstagramDestinationIdField(true);
}
public APIRequestGetGrpPlans requestInstagramDestinationIdField (boolean value) {
this.requestField("instagram_destination_id", value);
return this;
}
public APIRequestGetGrpPlans requestIntervalFrequencyCapField () {
return this.requestIntervalFrequencyCapField(true);
}
public APIRequestGetGrpPlans requestIntervalFrequencyCapField (boolean value) {
this.requestField("interval_frequency_cap", value);
return this;
}
public APIRequestGetGrpPlans requestIntervalFrequencyCapResetPeriodField () {
return this.requestIntervalFrequencyCapResetPeriodField(true);
}
public APIRequestGetGrpPlans requestIntervalFrequencyCapResetPeriodField (boolean value) {
this.requestField("interval_frequency_cap_reset_period", value);
return this;
}
public APIRequestGetGrpPlans requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetGrpPlans requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetGrpPlans requestPausePeriodsField () {
return this.requestPausePeriodsField(true);
}
public APIRequestGetGrpPlans requestPausePeriodsField (boolean value) {
this.requestField("pause_periods", value);
return this;
}
public APIRequestGetGrpPlans requestPlacementBreakdownField () {
return this.requestPlacementBreakdownField(true);
}
public APIRequestGetGrpPlans requestPlacementBreakdownField (boolean value) {
this.requestField("placement_breakdown", value);
return this;
}
public APIRequestGetGrpPlans requestPredictionModeField () {
return this.requestPredictionModeField(true);
}
public APIRequestGetGrpPlans requestPredictionModeField (boolean value) {
this.requestField("prediction_mode", value);
return this;
}
public APIRequestGetGrpPlans requestPredictionProgressField () {
return this.requestPredictionProgressField(true);
}
public APIRequestGetGrpPlans requestPredictionProgressField (boolean value) {
this.requestField("prediction_progress", value);
return this;
}
public APIRequestGetGrpPlans requestReservationStatusField () {
return this.requestReservationStatusField(true);
}
public APIRequestGetGrpPlans requestReservationStatusField (boolean value) {
this.requestField("reservation_status", value);
return this;
}
public APIRequestGetGrpPlans requestStatusField () {
return this.requestStatusField(true);
}
public APIRequestGetGrpPlans requestStatusField (boolean value) {
this.requestField("status", value);
return this;
}
public APIRequestGetGrpPlans requestStoryEventTypeField () {
return this.requestStoryEventTypeField(true);
}
public APIRequestGetGrpPlans requestStoryEventTypeField (boolean value) {
this.requestField("story_event_type", value);
return this;
}
public APIRequestGetGrpPlans requestTargetAudienceSizeField () {
return this.requestTargetAudienceSizeField(true);
}
public APIRequestGetGrpPlans requestTargetAudienceSizeField (boolean value) {
this.requestField("target_audience_size", value);
return this;
}
public APIRequestGetGrpPlans requestTargetSpecField () {
return this.requestTargetSpecField(true);
}
public APIRequestGetGrpPlans requestTargetSpecField (boolean value) {
this.requestField("target_spec", value);
return this;
}
public APIRequestGetGrpPlans requestTimeCreatedField () {
return this.requestTimeCreatedField(true);
}
public APIRequestGetGrpPlans requestTimeCreatedField (boolean value) {
this.requestField("time_created", value);
return this;
}
public APIRequestGetGrpPlans requestTimeUpdatedField () {
return this.requestTimeUpdatedField(true);
}
public APIRequestGetGrpPlans requestTimeUpdatedField (boolean value) {
this.requestField("time_updated", value);
return this;
}
}
public static class APIRequestGetInstagramAccounts extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return APINode.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetInstagramAccounts(String nodeId, APIContext context) {
super(context, nodeId, "/instagram_accounts", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetInstagramAccounts setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetInstagramAccounts setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetInstagramAccounts requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetInstagramAccounts requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetInstagramAccounts requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetInstagramAccounts requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetInstagramAccounts requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetInstagramAccounts requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetMeasurementReports extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"filters",
"report_type",
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return APINode.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetMeasurementReports(String nodeId, APIContext context) {
super(context, nodeId, "/measurement_reports", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetMeasurementReports setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetMeasurementReports setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetMeasurementReports setFilters (List filters) {
this.setParam("filters", filters);
return this;
}
public APIRequestGetMeasurementReports setFilters (String filters) {
this.setParam("filters", filters);
return this;
}
public APIRequestGetMeasurementReports setReportType (EnumReportType reportType) {
this.setParam("report_type", reportType);
return this;
}
public APIRequestGetMeasurementReports setReportType (String reportType) {
this.setParam("report_type", reportType);
return this;
}
public APIRequestGetMeasurementReports requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetMeasurementReports requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetMeasurementReports requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetMeasurementReports requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetMeasurementReports requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetMeasurementReports requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestCreateMeasurementReport extends APIRequest {
APINode lastResponse = null;
@Override
public APINode getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"metadata",
"report_type",
};
public static final String[] FIELDS = {
};
@Override
public APINode parseResponse(String response) throws APIException {
return APINode.parseResponse(response, getContext(), this).head();
}
@Override
public APINode execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINode execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestCreateMeasurementReport(String nodeId, APIContext context) {
super(context, nodeId, "/measurement_reports", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateMeasurementReport setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateMeasurementReport setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateMeasurementReport setMetadata (String metadata) {
this.setParam("metadata", metadata);
return this;
}
public APIRequestCreateMeasurementReport setReportType (EnumReportType reportType) {
this.setParam("report_type", reportType);
return this;
}
public APIRequestCreateMeasurementReport setReportType (String reportType) {
this.setParam("report_type", reportType);
return this;
}
public APIRequestCreateMeasurementReport requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateMeasurementReport requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateMeasurementReport requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateMeasurementReport requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateMeasurementReport requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateMeasurementReport requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetOfflineConversionDataSets extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return APINode.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetOfflineConversionDataSets(String nodeId, APIContext context) {
super(context, nodeId, "/offline_conversion_data_sets", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetOfflineConversionDataSets setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetOfflineConversionDataSets setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetOfflineConversionDataSets requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetOfflineConversionDataSets requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetOfflineConversionDataSets requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetOfflineConversionDataSets requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetOfflineConversionDataSets requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetOfflineConversionDataSets requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestCreateOfflineConversionDataSet extends APIRequest {
APINode lastResponse = null;
@Override
public APINode getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"auto_assign_to_new_accounts_only",
"description",
"enable_auto_assign_to_accounts",
"name",
};
public static final String[] FIELDS = {
};
@Override
public APINode parseResponse(String response) throws APIException {
return APINode.parseResponse(response, getContext(), this).head();
}
@Override
public APINode execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINode execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestCreateOfflineConversionDataSet(String nodeId, APIContext context) {
super(context, nodeId, "/offline_conversion_data_sets", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateOfflineConversionDataSet setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateOfflineConversionDataSet setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateOfflineConversionDataSet setAutoAssignToNewAccountsOnly (Boolean autoAssignToNewAccountsOnly) {
this.setParam("auto_assign_to_new_accounts_only", autoAssignToNewAccountsOnly);
return this;
}
public APIRequestCreateOfflineConversionDataSet setAutoAssignToNewAccountsOnly (String autoAssignToNewAccountsOnly) {
this.setParam("auto_assign_to_new_accounts_only", autoAssignToNewAccountsOnly);
return this;
}
public APIRequestCreateOfflineConversionDataSet setDescription (String description) {
this.setParam("description", description);
return this;
}
public APIRequestCreateOfflineConversionDataSet setEnableAutoAssignToAccounts (Boolean enableAutoAssignToAccounts) {
this.setParam("enable_auto_assign_to_accounts", enableAutoAssignToAccounts);
return this;
}
public APIRequestCreateOfflineConversionDataSet setEnableAutoAssignToAccounts (String enableAutoAssignToAccounts) {
this.setParam("enable_auto_assign_to_accounts", enableAutoAssignToAccounts);
return this;
}
public APIRequestCreateOfflineConversionDataSet setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateOfflineConversionDataSet requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateOfflineConversionDataSet requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateOfflineConversionDataSet requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateOfflineConversionDataSet requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateOfflineConversionDataSet requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateOfflineConversionDataSet requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetOwnedAdAccountRequests extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"ad_account",
"id",
"permitted_roles",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return LegacyBusinessAdAccountRequest.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetOwnedAdAccountRequests(String nodeId, APIContext context) {
super(context, nodeId, "/owned_ad_account_requests", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetOwnedAdAccountRequests setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetOwnedAdAccountRequests setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetOwnedAdAccountRequests requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetOwnedAdAccountRequests requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetOwnedAdAccountRequests requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetOwnedAdAccountRequests requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetOwnedAdAccountRequests requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetOwnedAdAccountRequests requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetOwnedAdAccountRequests requestAdAccountField () {
return this.requestAdAccountField(true);
}
public APIRequestGetOwnedAdAccountRequests requestAdAccountField (boolean value) {
this.requestField("ad_account", value);
return this;
}
public APIRequestGetOwnedAdAccountRequests requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetOwnedAdAccountRequests requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetOwnedAdAccountRequests requestPermittedRolesField () {
return this.requestPermittedRolesField(true);
}
public APIRequestGetOwnedAdAccountRequests requestPermittedRolesField (boolean value) {
this.requestField("permitted_roles", value);
return this;
}
}
public static class APIRequestGetOwnedAdAccounts 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",
"age",
"agency_client_declaration",
"amount_spent",
"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",
"failed_delivery_checks",
"funding_source",
"funding_source_details",
"has_migrated_permissions",
"id",
"io_number",
"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",
"salesforce_invoice_group_id",
"show_checkout_experience",
"spend_cap",
"tax_id",
"tax_id_status",
"tax_id_type",
"timezone_id",
"timezone_name",
"timezone_offset_hours_utc",
"tos_accepted",
"user_role",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return AdAccount.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetOwnedAdAccounts(String nodeId, APIContext context) {
super(context, nodeId, "/owned_ad_accounts", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetOwnedAdAccounts setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetOwnedAdAccounts setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetOwnedAdAccounts requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetOwnedAdAccounts requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetOwnedAdAccounts requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetOwnedAdAccounts requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetOwnedAdAccounts requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetOwnedAdAccounts requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetOwnedAdAccounts requestAccountIdField () {
return this.requestAccountIdField(true);
}
public APIRequestGetOwnedAdAccounts requestAccountIdField (boolean value) {
this.requestField("account_id", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestAccountStatusField () {
return this.requestAccountStatusField(true);
}
public APIRequestGetOwnedAdAccounts requestAccountStatusField (boolean value) {
this.requestField("account_status", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestAgeField () {
return this.requestAgeField(true);
}
public APIRequestGetOwnedAdAccounts requestAgeField (boolean value) {
this.requestField("age", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestAgencyClientDeclarationField () {
return this.requestAgencyClientDeclarationField(true);
}
public APIRequestGetOwnedAdAccounts requestAgencyClientDeclarationField (boolean value) {
this.requestField("agency_client_declaration", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestAmountSpentField () {
return this.requestAmountSpentField(true);
}
public APIRequestGetOwnedAdAccounts requestAmountSpentField (boolean value) {
this.requestField("amount_spent", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestBalanceField () {
return this.requestBalanceField(true);
}
public APIRequestGetOwnedAdAccounts requestBalanceField (boolean value) {
this.requestField("balance", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestBusinessField () {
return this.requestBusinessField(true);
}
public APIRequestGetOwnedAdAccounts requestBusinessField (boolean value) {
this.requestField("business", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestBusinessCityField () {
return this.requestBusinessCityField(true);
}
public APIRequestGetOwnedAdAccounts requestBusinessCityField (boolean value) {
this.requestField("business_city", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestBusinessCountryCodeField () {
return this.requestBusinessCountryCodeField(true);
}
public APIRequestGetOwnedAdAccounts requestBusinessCountryCodeField (boolean value) {
this.requestField("business_country_code", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestBusinessNameField () {
return this.requestBusinessNameField(true);
}
public APIRequestGetOwnedAdAccounts requestBusinessNameField (boolean value) {
this.requestField("business_name", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestBusinessStateField () {
return this.requestBusinessStateField(true);
}
public APIRequestGetOwnedAdAccounts requestBusinessStateField (boolean value) {
this.requestField("business_state", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestBusinessStreetField () {
return this.requestBusinessStreetField(true);
}
public APIRequestGetOwnedAdAccounts requestBusinessStreetField (boolean value) {
this.requestField("business_street", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestBusinessStreet2Field () {
return this.requestBusinessStreet2Field(true);
}
public APIRequestGetOwnedAdAccounts requestBusinessStreet2Field (boolean value) {
this.requestField("business_street2", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestBusinessZipField () {
return this.requestBusinessZipField(true);
}
public APIRequestGetOwnedAdAccounts requestBusinessZipField (boolean value) {
this.requestField("business_zip", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestCapabilitiesField () {
return this.requestCapabilitiesField(true);
}
public APIRequestGetOwnedAdAccounts requestCapabilitiesField (boolean value) {
this.requestField("capabilities", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetOwnedAdAccounts requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestCurrencyField () {
return this.requestCurrencyField(true);
}
public APIRequestGetOwnedAdAccounts requestCurrencyField (boolean value) {
this.requestField("currency", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestDisableReasonField () {
return this.requestDisableReasonField(true);
}
public APIRequestGetOwnedAdAccounts requestDisableReasonField (boolean value) {
this.requestField("disable_reason", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestEndAdvertiserField () {
return this.requestEndAdvertiserField(true);
}
public APIRequestGetOwnedAdAccounts requestEndAdvertiserField (boolean value) {
this.requestField("end_advertiser", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestEndAdvertiserNameField () {
return this.requestEndAdvertiserNameField(true);
}
public APIRequestGetOwnedAdAccounts requestEndAdvertiserNameField (boolean value) {
this.requestField("end_advertiser_name", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestFailedDeliveryChecksField () {
return this.requestFailedDeliveryChecksField(true);
}
public APIRequestGetOwnedAdAccounts requestFailedDeliveryChecksField (boolean value) {
this.requestField("failed_delivery_checks", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestFundingSourceField () {
return this.requestFundingSourceField(true);
}
public APIRequestGetOwnedAdAccounts requestFundingSourceField (boolean value) {
this.requestField("funding_source", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestFundingSourceDetailsField () {
return this.requestFundingSourceDetailsField(true);
}
public APIRequestGetOwnedAdAccounts requestFundingSourceDetailsField (boolean value) {
this.requestField("funding_source_details", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestHasMigratedPermissionsField () {
return this.requestHasMigratedPermissionsField(true);
}
public APIRequestGetOwnedAdAccounts requestHasMigratedPermissionsField (boolean value) {
this.requestField("has_migrated_permissions", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetOwnedAdAccounts requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestIoNumberField () {
return this.requestIoNumberField(true);
}
public APIRequestGetOwnedAdAccounts requestIoNumberField (boolean value) {
this.requestField("io_number", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestIsNotificationsEnabledField () {
return this.requestIsNotificationsEnabledField(true);
}
public APIRequestGetOwnedAdAccounts requestIsNotificationsEnabledField (boolean value) {
this.requestField("is_notifications_enabled", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestIsPersonalField () {
return this.requestIsPersonalField(true);
}
public APIRequestGetOwnedAdAccounts requestIsPersonalField (boolean value) {
this.requestField("is_personal", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestIsPrepayAccountField () {
return this.requestIsPrepayAccountField(true);
}
public APIRequestGetOwnedAdAccounts requestIsPrepayAccountField (boolean value) {
this.requestField("is_prepay_account", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestIsTaxIdRequiredField () {
return this.requestIsTaxIdRequiredField(true);
}
public APIRequestGetOwnedAdAccounts requestIsTaxIdRequiredField (boolean value) {
this.requestField("is_tax_id_required", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestLineNumbersField () {
return this.requestLineNumbersField(true);
}
public APIRequestGetOwnedAdAccounts requestLineNumbersField (boolean value) {
this.requestField("line_numbers", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestMediaAgencyField () {
return this.requestMediaAgencyField(true);
}
public APIRequestGetOwnedAdAccounts requestMediaAgencyField (boolean value) {
this.requestField("media_agency", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestMinCampaignGroupSpendCapField () {
return this.requestMinCampaignGroupSpendCapField(true);
}
public APIRequestGetOwnedAdAccounts requestMinCampaignGroupSpendCapField (boolean value) {
this.requestField("min_campaign_group_spend_cap", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestMinDailyBudgetField () {
return this.requestMinDailyBudgetField(true);
}
public APIRequestGetOwnedAdAccounts requestMinDailyBudgetField (boolean value) {
this.requestField("min_daily_budget", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetOwnedAdAccounts requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestOffsitePixelsTosAcceptedField () {
return this.requestOffsitePixelsTosAcceptedField(true);
}
public APIRequestGetOwnedAdAccounts requestOffsitePixelsTosAcceptedField (boolean value) {
this.requestField("offsite_pixels_tos_accepted", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestOwnerField () {
return this.requestOwnerField(true);
}
public APIRequestGetOwnedAdAccounts requestOwnerField (boolean value) {
this.requestField("owner", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestPartnerField () {
return this.requestPartnerField(true);
}
public APIRequestGetOwnedAdAccounts requestPartnerField (boolean value) {
this.requestField("partner", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestRfSpecField () {
return this.requestRfSpecField(true);
}
public APIRequestGetOwnedAdAccounts requestRfSpecField (boolean value) {
this.requestField("rf_spec", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestSalesforceInvoiceGroupIdField () {
return this.requestSalesforceInvoiceGroupIdField(true);
}
public APIRequestGetOwnedAdAccounts requestSalesforceInvoiceGroupIdField (boolean value) {
this.requestField("salesforce_invoice_group_id", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestShowCheckoutExperienceField () {
return this.requestShowCheckoutExperienceField(true);
}
public APIRequestGetOwnedAdAccounts requestShowCheckoutExperienceField (boolean value) {
this.requestField("show_checkout_experience", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestSpendCapField () {
return this.requestSpendCapField(true);
}
public APIRequestGetOwnedAdAccounts requestSpendCapField (boolean value) {
this.requestField("spend_cap", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestTaxIdField () {
return this.requestTaxIdField(true);
}
public APIRequestGetOwnedAdAccounts requestTaxIdField (boolean value) {
this.requestField("tax_id", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestTaxIdStatusField () {
return this.requestTaxIdStatusField(true);
}
public APIRequestGetOwnedAdAccounts requestTaxIdStatusField (boolean value) {
this.requestField("tax_id_status", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestTaxIdTypeField () {
return this.requestTaxIdTypeField(true);
}
public APIRequestGetOwnedAdAccounts requestTaxIdTypeField (boolean value) {
this.requestField("tax_id_type", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestTimezoneIdField () {
return this.requestTimezoneIdField(true);
}
public APIRequestGetOwnedAdAccounts requestTimezoneIdField (boolean value) {
this.requestField("timezone_id", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestTimezoneNameField () {
return this.requestTimezoneNameField(true);
}
public APIRequestGetOwnedAdAccounts requestTimezoneNameField (boolean value) {
this.requestField("timezone_name", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestTimezoneOffsetHoursUtcField () {
return this.requestTimezoneOffsetHoursUtcField(true);
}
public APIRequestGetOwnedAdAccounts requestTimezoneOffsetHoursUtcField (boolean value) {
this.requestField("timezone_offset_hours_utc", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestTosAcceptedField () {
return this.requestTosAcceptedField(true);
}
public APIRequestGetOwnedAdAccounts requestTosAcceptedField (boolean value) {
this.requestField("tos_accepted", value);
return this;
}
public APIRequestGetOwnedAdAccounts requestUserRoleField () {
return this.requestUserRoleField(true);
}
public APIRequestGetOwnedAdAccounts requestUserRoleField (boolean value) {
this.requestField("user_role", value);
return this;
}
}
public static class APIRequestGetOwnedInstagramAccounts extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return APINode.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetOwnedInstagramAccounts(String nodeId, APIContext context) {
super(context, nodeId, "/owned_instagram_accounts", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetOwnedInstagramAccounts setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetOwnedInstagramAccounts setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetOwnedInstagramAccounts requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetOwnedInstagramAccounts requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetOwnedInstagramAccounts requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetOwnedInstagramAccounts requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetOwnedInstagramAccounts requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetOwnedInstagramAccounts requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetOwnedPageRequests extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"id",
"page",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return BusinessPageRequest.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList