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.common.base.Function;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;
import com.google.gson.JsonObject;
import com.google.gson.JsonArray;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import com.facebook.ads.sdk.APIException.MalformedResponseException;
/**
* This class is auto-generated.
*
* For any issues or feature requests related to this class, please let us know
* on github and we'll fix in our codegen framework. We'll not be able to accept
* pull request for this class.
*
*/
public class Business extends APINode {
@SerializedName("block_offline_analytics")
private Boolean mBlockOfflineAnalytics = null;
@SerializedName("created_by")
private Object mCreatedBy = null;
@SerializedName("created_time")
private String mCreatedTime = null;
@SerializedName("extended_updated_time")
private String mExtendedUpdatedTime = null;
@SerializedName("id")
private String mId = null;
@SerializedName("is_hidden")
private Boolean mIsHidden = null;
@SerializedName("is_instagram_enabled_in_fb_analytics")
private Boolean mIsInstagramEnabledInFbAnalytics = 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 Page mPrimaryPage = null;
@SerializedName("profile_picture_uri")
private String mProfilePictureUri = null;
@SerializedName("timezone_id")
private Long mTimezoneId = null;
@SerializedName("two_factor_type")
private String mTwoFactorType = null;
@SerializedName("updated_by")
private Object mUpdatedBy = null;
@SerializedName("updated_time")
private String mUpdatedTime = null;
@SerializedName("verification_status")
private String mVerificationStatus = null;
@SerializedName("vertical")
private String mVertical = null;
@SerializedName("vertical_id")
private Long mVerticalId = 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 ListenableFuture fetchByIdAsync(Long id, APIContext context) throws APIException {
return fetchByIdAsync(id.toString(), context);
}
public static Business fetchById(String id, APIContext context) throws APIException {
return
new APIRequestGet(id, context)
.requestAllFields()
.execute();
}
public static ListenableFuture fetchByIdAsync(String id, APIContext context) throws APIException {
return
new APIRequestGet(id, context)
.requestAllFields()
.executeAsync();
}
public static APINodeList fetchByIds(List ids, List fields, APIContext context) throws APIException {
return (APINodeList)(
new APIRequest(context, "", "/", "GET", Business.getParser())
.setParam("ids", APIRequest.joinStringList(ids))
.requestFields(fields)
.execute()
);
}
public static ListenableFuture> fetchByIdsAsync(List ids, List fields, APIContext context) throws APIException {
return
new APIRequest(context, "", "/", "GET", Business.getParser())
.setParam("ids", APIRequest.joinStringList(ids))
.requestFields(fields)
.executeAsyncBase();
}
private String getPrefixedId() {
return getId();
}
public String getId() {
return getFieldId().toString();
}
public static Business loadJSON(String json, APIContext context, String header) {
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;
business.header = header;
return business;
}
public static APINodeList parseResponse(String json, APIContext context, APIRequest request, String header) throws MalformedResponseException {
APINodeList businesss = new APINodeList(request, json, header);
JsonArray arr;
JsonObject obj;
JsonParser parser = new JsonParser();
Exception exception = null;
try{
JsonElement result = parser.parse(json);
if (result.isJsonArray()) {
// First, check if it's a pure JSON Array
arr = result.getAsJsonArray();
for (int i = 0; i < arr.size(); i++) {
businesss.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header));
};
return businesss;
} else if (result.isJsonObject()) {
obj = result.getAsJsonObject();
if (obj.has("data")) {
if (obj.has("paging")) {
JsonObject paging = obj.get("paging").getAsJsonObject();
if (paging.has("cursors")) {
JsonObject cursors = paging.get("cursors").getAsJsonObject();
String before = cursors.has("before") ? cursors.get("before").getAsString() : null;
String after = cursors.has("after") ? cursors.get("after").getAsString() : null;
businesss.setCursors(before, after);
}
String previous = paging.has("previous") ? paging.get("previous").getAsString() : null;
String next = paging.has("next") ? paging.get("next").getAsString() : null;
businesss.setPaging(previous, next);
if (context.hasAppSecret()) {
businesss.setAppSecret(context.getAppSecretProof());
}
}
if (obj.get("data").isJsonArray()) {
// Second, check if it's a JSON array with "data"
arr = obj.get("data").getAsJsonArray();
for (int i = 0; i < arr.size(); i++) {
businesss.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header));
};
} else if (obj.get("data").isJsonObject()) {
// Third, check if it's a JSON object with "data"
obj = obj.get("data").getAsJsonObject();
boolean isRedownload = false;
for (String s : new String[]{"campaigns", "adsets", "ads"}) {
if (obj.has(s)) {
isRedownload = true;
obj = obj.getAsJsonObject(s);
for (Map.Entry entry : obj.entrySet()) {
businesss.add(loadJSON(entry.getValue().toString(), context, header));
}
break;
}
}
if (!isRedownload) {
businesss.add(loadJSON(obj.toString(), context, header));
}
}
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, header));
}
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, header));
} else {
isIdIndexedArray = false;
break;
}
}
if (isIdIndexedArray) {
return businesss;
}
// Sixth, check if it's pure JsonObject
businesss.clear();
businesss.add(loadJSON(json, context, header));
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 APIRequestCreateAccessToken createAccessToken() {
return new APIRequestCreateAccessToken(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdStudies getAdStudies() {
return new APIRequestGetAdStudies(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAdStudy createAdStudy() {
return new APIRequestCreateAdStudy(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAdAccount createAdAccount() {
return new APIRequestCreateAdAccount(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdAccountCreationRequests getAdAccountCreationRequests() {
return new APIRequestGetAdAccountCreationRequests(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAdAccountCreationRequest createAdAccountCreationRequest() {
return new APIRequestCreateAdAccountCreationRequest(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteAdAccounts deleteAdAccounts() {
return new APIRequestDeleteAdAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdNetworkAnalytics getAdNetworkAnalytics() {
return new APIRequestGetAdNetworkAnalytics(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAdNetworkAnalytic createAdNetworkAnalytic() {
return new APIRequestCreateAdNetworkAnalytic(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdNetworkAnalyticsResults getAdNetworkAnalyticsResults() {
return new APIRequestGetAdNetworkAnalyticsResults(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 APIRequestGetAdvertisableApplications getAdvertisableApplications() {
return new APIRequestGetAdvertisableApplications(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteAgencies deleteAgencies() {
return new APIRequestDeleteAgencies(this.getPrefixedId().toString(), context);
}
public APIRequestGetAgencyPages getAgencyPages() {
return new APIRequestGetAgencyPages(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteApps deleteApps() {
return new APIRequestDeleteApps(this.getPrefixedId().toString(), context);
}
public APIRequestCreateApp createApp() {
return new APIRequestCreateApp(this.getPrefixedId().toString(), context);
}
public APIRequestCreateBlockListDraft createBlockListDraft() {
return new APIRequestCreateBlockListDraft(this.getPrefixedId().toString(), context);
}
public APIRequestGetBusinessInvoices getBusinessInvoices() {
return new APIRequestGetBusinessInvoices(this.getPrefixedId().toString(), context);
}
public APIRequestGetBusinessUsers getBusinessUsers() {
return new APIRequestGetBusinessUsers(this.getPrefixedId().toString(), context);
}
public APIRequestCreateBusinessUser createBusinessUser() {
return new APIRequestCreateBusinessUser(this.getPrefixedId().toString(), context);
}
public APIRequestGetBusinessProjects getBusinessProjects() {
return new APIRequestGetBusinessProjects(this.getPrefixedId().toString(), context);
}
public APIRequestCreateBusinessProject createBusinessProject() {
return new APIRequestCreateBusinessProject(this.getPrefixedId().toString(), context);
}
public APIRequestGetBusinessSettingLogs getBusinessSettingLogs() {
return new APIRequestGetBusinessSettingLogs(this.getPrefixedId().toString(), context);
}
public APIRequestGetCatalogSegmentProducerTos getCatalogSegmentProducerTos() {
return new APIRequestGetCatalogSegmentProducerTos(this.getPrefixedId().toString(), context);
}
public APIRequestCreateCatalogSegmentProducerTo createCatalogSegmentProducerTo() {
return new APIRequestCreateCatalogSegmentProducerTo(this.getPrefixedId().toString(), context);
}
public APIRequestCreateClaimCustomConversion createClaimCustomConversion() {
return new APIRequestCreateClaimCustomConversion(this.getPrefixedId().toString(), context);
}
public APIRequestGetClientAdAccounts getClientAdAccounts() {
return new APIRequestGetClientAdAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestCreateClientAdAccount createClientAdAccount() {
return new APIRequestCreateClientAdAccount(this.getPrefixedId().toString(), context);
}
public APIRequestGetClientApps getClientApps() {
return new APIRequestGetClientApps(this.getPrefixedId().toString(), context);
}
public APIRequestCreateClientApp createClientApp() {
return new APIRequestCreateClientApp(this.getPrefixedId().toString(), context);
}
public APIRequestGetClientPages getClientPages() {
return new APIRequestGetClientPages(this.getPrefixedId().toString(), context);
}
public APIRequestCreateClientPage createClientPage() {
return new APIRequestCreateClientPage(this.getPrefixedId().toString(), context);
}
public APIRequestGetClientPixels getClientPixels() {
return new APIRequestGetClientPixels(this.getPrefixedId().toString(), context);
}
public APIRequestGetClientProductCatalogs getClientProductCatalogs() {
return new APIRequestGetClientProductCatalogs(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteClients deleteClients() {
return new APIRequestDeleteClients(this.getPrefixedId().toString(), context);
}
public APIRequestGetCreativeCompassStudy getCreativeCompassStudy() {
return new APIRequestGetCreativeCompassStudy(this.getPrefixedId().toString(), context);
}
public APIRequestCreateCreativeCompassStudy createCreativeCompassStudy() {
return new APIRequestCreateCreativeCompassStudy(this.getPrefixedId().toString(), context);
}
public APIRequestGetCustomConversions getCustomConversions() {
return new APIRequestGetCustomConversions(this.getPrefixedId().toString(), context);
}
public APIRequestCreateCustomConversion createCustomConversion() {
return new APIRequestCreateCustomConversion(this.getPrefixedId().toString(), context);
}
public APIRequestGetDealShowsPages getDealShowsPages() {
return new APIRequestGetDealShowsPages(this.getPrefixedId().toString(), context);
}
public APIRequestGetDirectDeals getDirectDeals() {
return new APIRequestGetDirectDeals(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 APIRequestGetExtendedCredits getExtendedCredits() {
return new APIRequestGetExtendedCredits(this.getPrefixedId().toString(), context);
}
public APIRequestGetGrpPlans getGrpPlans() {
return new APIRequestGetGrpPlans(this.getPrefixedId().toString(), context);
}
public APIRequestGetInitiatedAudienceSharingRequests getInitiatedAudienceSharingRequests() {
return new APIRequestGetInitiatedAudienceSharingRequests(this.getPrefixedId().toString(), context);
}
public APIRequestGetInitiatedSharingAgreements getInitiatedSharingAgreements() {
return new APIRequestGetInitiatedSharingAgreements(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteInstagramAccounts deleteInstagramAccounts() {
return new APIRequestDeleteInstagramAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetInstagramAccounts getInstagramAccounts() {
return new APIRequestGetInstagramAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestCreateManagedBusiness createManagedBusiness() {
return new APIRequestCreateManagedBusiness(this.getPrefixedId().toString(), context);
}
public APIRequestGetMatchedSearchApplications getMatchedSearchApplications() {
return new APIRequestGetMatchedSearchApplications(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 APIRequestGetOfFLineTermsOfService getOfFLineTermsOfService() {
return new APIRequestGetOfFLineTermsOfService(this.getPrefixedId().toString(), context);
}
public APIRequestGetOwnedAdAccounts getOwnedAdAccounts() {
return new APIRequestGetOwnedAdAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestCreateOwnedAdAccount createOwnedAdAccount() {
return new APIRequestCreateOwnedAdAccount(this.getPrefixedId().toString(), context);
}
public APIRequestGetOwnedApps getOwnedApps() {
return new APIRequestGetOwnedApps(this.getPrefixedId().toString(), context);
}
public APIRequestCreateOwnedApp createOwnedApp() {
return new APIRequestCreateOwnedApp(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteOwnedBusinesses deleteOwnedBusinesses() {
return new APIRequestDeleteOwnedBusinesses(this.getPrefixedId().toString(), context);
}
public APIRequestGetOwnedBusinesses getOwnedBusinesses() {
return new APIRequestGetOwnedBusinesses(this.getPrefixedId().toString(), context);
}
public APIRequestCreateOwnedBusiness createOwnedBusiness() {
return new APIRequestCreateOwnedBusiness(this.getPrefixedId().toString(), context);
}
public APIRequestGetOwnedCustomConversions getOwnedCustomConversions() {
return new APIRequestGetOwnedCustomConversions(this.getPrefixedId().toString(), context);
}
public APIRequestGetOwnedDomains getOwnedDomains() {
return new APIRequestGetOwnedDomains(this.getPrefixedId().toString(), context);
}
public APIRequestCreateOwnedDomain createOwnedDomain() {
return new APIRequestCreateOwnedDomain(this.getPrefixedId().toString(), context);
}
public APIRequestGetOwnedInstagramAccounts getOwnedInstagramAccounts() {
return new APIRequestGetOwnedInstagramAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetOwnedPages getOwnedPages() {
return new APIRequestGetOwnedPages(this.getPrefixedId().toString(), context);
}
public APIRequestCreateOwnedPage createOwnedPage() {
return new APIRequestCreateOwnedPage(this.getPrefixedId().toString(), context);
}
public APIRequestGetOwnedPixels getOwnedPixels() {
return new APIRequestGetOwnedPixels(this.getPrefixedId().toString(), context);
}
public APIRequestGetOwnedProductCatalogs getOwnedProductCatalogs() {
return new APIRequestGetOwnedProductCatalogs(this.getPrefixedId().toString(), context);
}
public APIRequestCreateOwnedProductCatalog createOwnedProductCatalog() {
return new APIRequestCreateOwnedProductCatalog(this.getPrefixedId().toString(), context);
}
public APIRequestDeletePages deletePages() {
return new APIRequestDeletePages(this.getPrefixedId().toString(), context);
}
public APIRequestCreatePage createPage() {
return new APIRequestCreatePage(this.getPrefixedId().toString(), context);
}
public APIRequestGetPartnerIntegrations getPartnerIntegrations() {
return new APIRequestGetPartnerIntegrations(this.getPrefixedId().toString(), context);
}
public APIRequestCreatePartnerIntegration createPartnerIntegration() {
return new APIRequestCreatePartnerIntegration(this.getPrefixedId().toString(), context);
}
public APIRequestCreatePartnerAdAccount createPartnerAdAccount() {
return new APIRequestCreatePartnerAdAccount(this.getPrefixedId().toString(), context);
}
public APIRequestGetPartners getPartners() {
return new APIRequestGetPartners(this.getPrefixedId().toString(), context);
}
public APIRequestGetPendingClientAdAccounts getPendingClientAdAccounts() {
return new APIRequestGetPendingClientAdAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetPendingClientApps getPendingClientApps() {
return new APIRequestGetPendingClientApps(this.getPrefixedId().toString(), context);
}
public APIRequestGetPendingClientPages getPendingClientPages() {
return new APIRequestGetPendingClientPages(this.getPrefixedId().toString(), context);
}
public APIRequestGetPendingOfflineConversionDataSets getPendingOfflineConversionDataSets() {
return new APIRequestGetPendingOfflineConversionDataSets(this.getPrefixedId().toString(), context);
}
public APIRequestGetPendingOwnedAdAccounts getPendingOwnedAdAccounts() {
return new APIRequestGetPendingOwnedAdAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetPendingOwnedPages getPendingOwnedPages() {
return new APIRequestGetPendingOwnedPages(this.getPrefixedId().toString(), context);
}
public APIRequestGetPendingSharedPixels getPendingSharedPixels() {
return new APIRequestGetPendingSharedPixels(this.getPrefixedId().toString(), context);
}
public APIRequestGetPendingUsers getPendingUsers() {
return new APIRequestGetPendingUsers(this.getPrefixedId().toString(), context);
}
public APIRequestGetPicture getPicture() {
return new APIRequestGetPicture(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 APIRequestGetReceivedAudienceSharingRequests getReceivedAudienceSharingRequests() {
return new APIRequestGetReceivedAudienceSharingRequests(this.getPrefixedId().toString(), context);
}
public APIRequestGetReceivedSharingAgreements getReceivedSharingAgreements() {
return new APIRequestGetReceivedSharingAgreements(this.getPrefixedId().toString(), context);
}
public APIRequestGetSharedAudiencePermissions getSharedAudiencePermissions() {
return new APIRequestGetSharedAudiencePermissions(this.getPrefixedId().toString(), context);
}
public APIRequestCreateSpacoDataSetCollection createSpacoDataSetCollection() {
return new APIRequestCreateSpacoDataSetCollection(this.getPrefixedId().toString(), context);
}
public APIRequestGetSystemUsers getSystemUsers() {
return new APIRequestGetSystemUsers(this.getPrefixedId().toString(), context);
}
public APIRequestCreateSystemUser createSystemUser() {
return new APIRequestCreateSystemUser(this.getPrefixedId().toString(), context);
}
public APIRequestGetUploadEvent getUploadEvent() {
return new APIRequestGetUploadEvent(this.getPrefixedId().toString(), context);
}
public APIRequestCreateUploadEvent createUploadEvent() {
return new APIRequestCreateUploadEvent(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteUserInvitations deleteUserInvitations() {
return new APIRequestDeleteUserInvitations(this.getPrefixedId().toString(), context);
}
public APIRequestGetUserInvitations getUserInvitations() {
return new APIRequestGetUserInvitations(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteUserPermissions deleteUserPermissions() {
return new APIRequestDeleteUserPermissions(this.getPrefixedId().toString(), context);
}
public APIRequestCreateUserPermission createUserPermission() {
return new APIRequestCreateUserPermission(this.getPrefixedId().toString(), context);
}
public APIRequestCreateVietnamAdAccountCreationRequest createVietnamAdAccountCreationRequest() {
return new APIRequestCreateVietnamAdAccountCreationRequest(this.getPrefixedId().toString(), context);
}
public APIRequestGet get() {
return new APIRequestGet(this.getPrefixedId().toString(), context);
}
public APIRequestUpdate update() {
return new APIRequestUpdate(this.getPrefixedId().toString(), context);
}
public Boolean getFieldBlockOfflineAnalytics() {
return mBlockOfflineAnalytics;
}
public Object getFieldCreatedBy() {
return mCreatedBy;
}
public String getFieldCreatedTime() {
return mCreatedTime;
}
public String getFieldExtendedUpdatedTime() {
return mExtendedUpdatedTime;
}
public String getFieldId() {
return mId;
}
public Boolean getFieldIsHidden() {
return mIsHidden;
}
public Boolean getFieldIsInstagramEnabledInFbAnalytics() {
return mIsInstagramEnabledInFbAnalytics;
}
public String getFieldLink() {
return mLink;
}
public String getFieldName() {
return mName;
}
public String getFieldPaymentAccountId() {
return mPaymentAccountId;
}
public Page getFieldPrimaryPage() {
if (mPrimaryPage != null) {
mPrimaryPage.context = getContext();
}
return mPrimaryPage;
}
public String getFieldProfilePictureUri() {
return mProfilePictureUri;
}
public Long getFieldTimezoneId() {
return mTimezoneId;
}
public String getFieldTwoFactorType() {
return mTwoFactorType;
}
public Object getFieldUpdatedBy() {
return mUpdatedBy;
}
public String getFieldUpdatedTime() {
return mUpdatedTime;
}
public String getFieldVerificationStatus() {
return mVerificationStatus;
}
public String getFieldVertical() {
return mVertical;
}
public Long getFieldVerticalId() {
return mVerticalId;
}
public static class APIRequestCreateAccessToken extends APIRequest {
Business lastResponse = null;
@Override
public Business getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"app_id",
"scope",
};
public static final String[] FIELDS = {
};
@Override
public Business parseResponse(String response, String header) throws APIException {
return Business.parseResponse(response, getContext(), this, header).head();
}
@Override
public Business execute() throws APIException {
return execute(new HashMap());
}
@Override
public Business execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public Business apply(ResponseWrapper result) {
try {
return APIRequestCreateAccessToken.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateAccessToken(String nodeId, APIContext context) {
super(context, nodeId, "/access_token", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAccessToken setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAccessToken setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAccessToken setAppId (Object appId) {
this.setParam("app_id", appId);
return this;
}
public APIRequestCreateAccessToken setAppId (String appId) {
this.setParam("app_id", appId);
return this;
}
public APIRequestCreateAccessToken setScope (Object scope) {
this.setParam("scope", scope);
return this;
}
public APIRequestCreateAccessToken setScope (String scope) {
this.setParam("scope", scope);
return this;
}
public APIRequestCreateAccessToken requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAccessToken requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAccessToken requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAccessToken requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAccessToken requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAccessToken requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAdStudies extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"business",
"canceled_time",
"cooldown_start_time",
"created_by",
"created_time",
"description",
"end_time",
"id",
"name",
"observation_end_time",
"results_first_available_date",
"start_time",
"type",
"updated_by",
"updated_time",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return AdStudy.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetAdStudies.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetAdStudies(String nodeId, APIContext context) {
super(context, nodeId, "/ad_studies", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdStudies setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdStudies setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdStudies requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdStudies requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdStudies requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdStudies requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdStudies requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdStudies requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdStudies requestBusinessField () {
return this.requestBusinessField(true);
}
public APIRequestGetAdStudies requestBusinessField (boolean value) {
this.requestField("business", value);
return this;
}
public APIRequestGetAdStudies requestCanceledTimeField () {
return this.requestCanceledTimeField(true);
}
public APIRequestGetAdStudies requestCanceledTimeField (boolean value) {
this.requestField("canceled_time", value);
return this;
}
public APIRequestGetAdStudies requestCooldownStartTimeField () {
return this.requestCooldownStartTimeField(true);
}
public APIRequestGetAdStudies requestCooldownStartTimeField (boolean value) {
this.requestField("cooldown_start_time", value);
return this;
}
public APIRequestGetAdStudies requestCreatedByField () {
return this.requestCreatedByField(true);
}
public APIRequestGetAdStudies requestCreatedByField (boolean value) {
this.requestField("created_by", value);
return this;
}
public APIRequestGetAdStudies requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetAdStudies requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetAdStudies requestDescriptionField () {
return this.requestDescriptionField(true);
}
public APIRequestGetAdStudies requestDescriptionField (boolean value) {
this.requestField("description", value);
return this;
}
public APIRequestGetAdStudies requestEndTimeField () {
return this.requestEndTimeField(true);
}
public APIRequestGetAdStudies requestEndTimeField (boolean value) {
this.requestField("end_time", value);
return this;
}
public APIRequestGetAdStudies requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdStudies requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdStudies requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAdStudies requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAdStudies requestObservationEndTimeField () {
return this.requestObservationEndTimeField(true);
}
public APIRequestGetAdStudies requestObservationEndTimeField (boolean value) {
this.requestField("observation_end_time", value);
return this;
}
public APIRequestGetAdStudies requestResultsFirstAvailableDateField () {
return this.requestResultsFirstAvailableDateField(true);
}
public APIRequestGetAdStudies requestResultsFirstAvailableDateField (boolean value) {
this.requestField("results_first_available_date", value);
return this;
}
public APIRequestGetAdStudies requestStartTimeField () {
return this.requestStartTimeField(true);
}
public APIRequestGetAdStudies requestStartTimeField (boolean value) {
this.requestField("start_time", value);
return this;
}
public APIRequestGetAdStudies requestTypeField () {
return this.requestTypeField(true);
}
public APIRequestGetAdStudies requestTypeField (boolean value) {
this.requestField("type", value);
return this;
}
public APIRequestGetAdStudies requestUpdatedByField () {
return this.requestUpdatedByField(true);
}
public APIRequestGetAdStudies requestUpdatedByField (boolean value) {
this.requestField("updated_by", value);
return this;
}
public APIRequestGetAdStudies requestUpdatedTimeField () {
return this.requestUpdatedTimeField(true);
}
public APIRequestGetAdStudies requestUpdatedTimeField (boolean value) {
this.requestField("updated_time", value);
return this;
}
}
public static class APIRequestCreateAdStudy extends APIRequest {
AdStudy lastResponse = null;
@Override
public AdStudy getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"cells",
"objectives",
"end_time",
"description",
"name",
"start_time",
"viewers",
"cooldown_start_time",
"observation_end_time",
"confidence_level",
"client_business",
"type",
};
public static final String[] FIELDS = {
};
@Override
public AdStudy parseResponse(String response, String header) throws APIException {
return AdStudy.parseResponse(response, getContext(), this, header).head();
}
@Override
public AdStudy execute() throws APIException {
return execute(new HashMap());
}
@Override
public AdStudy execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public AdStudy apply(ResponseWrapper result) {
try {
return APIRequestCreateAdStudy.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
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 setObjectives (List objectives) {
this.setParam("objectives", objectives);
return this;
}
public APIRequestCreateAdStudy setObjectives (String objectives) {
this.setParam("objectives", objectives);
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 setDescription (String description) {
this.setParam("description", description);
return this;
}
public APIRequestCreateAdStudy setName (String name) {
this.setParam("name", name);
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 setViewers (List viewers) {
this.setParam("viewers", viewers);
return this;
}
public APIRequestCreateAdStudy setViewers (String viewers) {
this.setParam("viewers", viewers);
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 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 setConfidenceLevel (Double confidenceLevel) {
this.setParam("confidence_level", confidenceLevel);
return this;
}
public APIRequestCreateAdStudy setConfidenceLevel (String confidenceLevel) {
this.setParam("confidence_level", confidenceLevel);
return this;
}
public APIRequestCreateAdStudy setClientBusiness (String clientBusiness) {
this.setParam("client_business", clientBusiness);
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 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 = {
"name",
"currency",
"timezone_id",
"end_advertiser",
"funding_id",
"media_agency",
"partner",
"invoice",
"po_number",
"io",
"billing_address_id",
"sold_to_address_id",
"liable_address_id",
"invoice_group_id",
};
public static final String[] FIELDS = {
};
@Override
public AdAccount parseResponse(String response, String header) throws APIException {
return AdAccount.parseResponse(response, getContext(), this, header).head();
}
@Override
public AdAccount execute() throws APIException {
return execute(new HashMap());
}
@Override
public AdAccount execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public AdAccount apply(ResponseWrapper result) {
try {
return APIRequestCreateAdAccount.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
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 setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateAdAccount setCurrency (String currency) {
this.setParam("currency", currency);
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 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 setMediaAgency (String mediaAgency) {
this.setParam("media_agency", mediaAgency);
return this;
}
public APIRequestCreateAdAccount setPartner (String partner) {
this.setParam("partner", partner);
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 setPoNumber (String poNumber) {
this.setParam("po_number", poNumber);
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 setBillingAddressId (Object billingAddressId) {
this.setParam("billing_address_id", billingAddressId);
return this;
}
public APIRequestCreateAdAccount setBillingAddressId (String billingAddressId) {
this.setParam("billing_address_id", billingAddressId);
return this;
}
public APIRequestCreateAdAccount setSoldToAddressId (Object soldToAddressId) {
this.setParam("sold_to_address_id", soldToAddressId);
return this;
}
public APIRequestCreateAdAccount setSoldToAddressId (String soldToAddressId) {
this.setParam("sold_to_address_id", soldToAddressId);
return this;
}
public APIRequestCreateAdAccount setLiableAddressId (Object liableAddressId) {
this.setParam("liable_address_id", liableAddressId);
return this;
}
public APIRequestCreateAdAccount setLiableAddressId (String liableAddressId) {
this.setParam("liable_address_id", liableAddressId);
return this;
}
public APIRequestCreateAdAccount setInvoiceGroupId (Object invoiceGroupId) {
this.setParam("invoice_group_id", invoiceGroupId);
return this;
}
public APIRequestCreateAdAccount setInvoiceGroupId (String invoiceGroupId) {
this.setParam("invoice_group_id", invoiceGroupId);
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 APIRequestGetAdAccountCreationRequests extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"status",
};
public static final String[] FIELDS = {
"ad_accounts_currency",
"ad_accounts_info",
"additional_comment",
"address_in_chinese",
"address_in_english",
"address_in_local_language",
"advertiser_business",
"appeal_reason",
"business",
"business_registration_id",
"chinese_legal_entity_name",
"contact",
"creator",
"credit_card_id",
"disapproval_reasons",
"english_legal_entity_name",
"extended_credit_id",
"id",
"is_smb",
"is_test",
"is_under_authorization",
"legal_entity_name_in_local_language",
"official_website_url",
"planning_agency_business",
"planning_agency_business_id",
"promotable_app_ids",
"promotable_page_ids",
"promotable_urls",
"request_change_reasons",
"status",
"subvertical",
"time_created",
"vertical",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return AdAccountCreationRequest.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetAdAccountCreationRequests.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetAdAccountCreationRequests(String nodeId, APIContext context) {
super(context, nodeId, "/adaccountcreationrequests", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdAccountCreationRequests setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdAccountCreationRequests setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdAccountCreationRequests setStatus (List status) {
this.setParam("status", status);
return this;
}
public APIRequestGetAdAccountCreationRequests setStatus (String status) {
this.setParam("status", status);
return this;
}
public APIRequestGetAdAccountCreationRequests requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdAccountCreationRequests requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdAccountCreationRequests requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdAccountCreationRequests requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdAccountCreationRequests requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdAccountCreationRequests requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestAdAccountsCurrencyField () {
return this.requestAdAccountsCurrencyField(true);
}
public APIRequestGetAdAccountCreationRequests requestAdAccountsCurrencyField (boolean value) {
this.requestField("ad_accounts_currency", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestAdAccountsInfoField () {
return this.requestAdAccountsInfoField(true);
}
public APIRequestGetAdAccountCreationRequests requestAdAccountsInfoField (boolean value) {
this.requestField("ad_accounts_info", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestAdditionalCommentField () {
return this.requestAdditionalCommentField(true);
}
public APIRequestGetAdAccountCreationRequests requestAdditionalCommentField (boolean value) {
this.requestField("additional_comment", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestAddressInChineseField () {
return this.requestAddressInChineseField(true);
}
public APIRequestGetAdAccountCreationRequests requestAddressInChineseField (boolean value) {
this.requestField("address_in_chinese", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestAddressInEnglishField () {
return this.requestAddressInEnglishField(true);
}
public APIRequestGetAdAccountCreationRequests requestAddressInEnglishField (boolean value) {
this.requestField("address_in_english", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestAddressInLocalLanguageField () {
return this.requestAddressInLocalLanguageField(true);
}
public APIRequestGetAdAccountCreationRequests requestAddressInLocalLanguageField (boolean value) {
this.requestField("address_in_local_language", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestAdvertiserBusinessField () {
return this.requestAdvertiserBusinessField(true);
}
public APIRequestGetAdAccountCreationRequests requestAdvertiserBusinessField (boolean value) {
this.requestField("advertiser_business", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestAppealReasonField () {
return this.requestAppealReasonField(true);
}
public APIRequestGetAdAccountCreationRequests requestAppealReasonField (boolean value) {
this.requestField("appeal_reason", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestBusinessField () {
return this.requestBusinessField(true);
}
public APIRequestGetAdAccountCreationRequests requestBusinessField (boolean value) {
this.requestField("business", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestBusinessRegistrationIdField () {
return this.requestBusinessRegistrationIdField(true);
}
public APIRequestGetAdAccountCreationRequests requestBusinessRegistrationIdField (boolean value) {
this.requestField("business_registration_id", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestChineseLegalEntityNameField () {
return this.requestChineseLegalEntityNameField(true);
}
public APIRequestGetAdAccountCreationRequests requestChineseLegalEntityNameField (boolean value) {
this.requestField("chinese_legal_entity_name", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestContactField () {
return this.requestContactField(true);
}
public APIRequestGetAdAccountCreationRequests requestContactField (boolean value) {
this.requestField("contact", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestCreatorField () {
return this.requestCreatorField(true);
}
public APIRequestGetAdAccountCreationRequests requestCreatorField (boolean value) {
this.requestField("creator", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestCreditCardIdField () {
return this.requestCreditCardIdField(true);
}
public APIRequestGetAdAccountCreationRequests requestCreditCardIdField (boolean value) {
this.requestField("credit_card_id", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestDisapprovalReasonsField () {
return this.requestDisapprovalReasonsField(true);
}
public APIRequestGetAdAccountCreationRequests requestDisapprovalReasonsField (boolean value) {
this.requestField("disapproval_reasons", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestEnglishLegalEntityNameField () {
return this.requestEnglishLegalEntityNameField(true);
}
public APIRequestGetAdAccountCreationRequests requestEnglishLegalEntityNameField (boolean value) {
this.requestField("english_legal_entity_name", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestExtendedCreditIdField () {
return this.requestExtendedCreditIdField(true);
}
public APIRequestGetAdAccountCreationRequests requestExtendedCreditIdField (boolean value) {
this.requestField("extended_credit_id", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdAccountCreationRequests requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestIsSmbField () {
return this.requestIsSmbField(true);
}
public APIRequestGetAdAccountCreationRequests requestIsSmbField (boolean value) {
this.requestField("is_smb", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestIsTestField () {
return this.requestIsTestField(true);
}
public APIRequestGetAdAccountCreationRequests requestIsTestField (boolean value) {
this.requestField("is_test", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestIsUnderAuthorizationField () {
return this.requestIsUnderAuthorizationField(true);
}
public APIRequestGetAdAccountCreationRequests requestIsUnderAuthorizationField (boolean value) {
this.requestField("is_under_authorization", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestLegalEntityNameInLocalLanguageField () {
return this.requestLegalEntityNameInLocalLanguageField(true);
}
public APIRequestGetAdAccountCreationRequests requestLegalEntityNameInLocalLanguageField (boolean value) {
this.requestField("legal_entity_name_in_local_language", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestOfficialWebsiteUrlField () {
return this.requestOfficialWebsiteUrlField(true);
}
public APIRequestGetAdAccountCreationRequests requestOfficialWebsiteUrlField (boolean value) {
this.requestField("official_website_url", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestPlanningAgencyBusinessField () {
return this.requestPlanningAgencyBusinessField(true);
}
public APIRequestGetAdAccountCreationRequests requestPlanningAgencyBusinessField (boolean value) {
this.requestField("planning_agency_business", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestPlanningAgencyBusinessIdField () {
return this.requestPlanningAgencyBusinessIdField(true);
}
public APIRequestGetAdAccountCreationRequests requestPlanningAgencyBusinessIdField (boolean value) {
this.requestField("planning_agency_business_id", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestPromotableAppIdsField () {
return this.requestPromotableAppIdsField(true);
}
public APIRequestGetAdAccountCreationRequests requestPromotableAppIdsField (boolean value) {
this.requestField("promotable_app_ids", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestPromotablePageIdsField () {
return this.requestPromotablePageIdsField(true);
}
public APIRequestGetAdAccountCreationRequests requestPromotablePageIdsField (boolean value) {
this.requestField("promotable_page_ids", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestPromotableUrlsField () {
return this.requestPromotableUrlsField(true);
}
public APIRequestGetAdAccountCreationRequests requestPromotableUrlsField (boolean value) {
this.requestField("promotable_urls", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestRequestChangeReasonsField () {
return this.requestRequestChangeReasonsField(true);
}
public APIRequestGetAdAccountCreationRequests requestRequestChangeReasonsField (boolean value) {
this.requestField("request_change_reasons", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestStatusField () {
return this.requestStatusField(true);
}
public APIRequestGetAdAccountCreationRequests requestStatusField (boolean value) {
this.requestField("status", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestSubverticalField () {
return this.requestSubverticalField(true);
}
public APIRequestGetAdAccountCreationRequests requestSubverticalField (boolean value) {
this.requestField("subvertical", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestTimeCreatedField () {
return this.requestTimeCreatedField(true);
}
public APIRequestGetAdAccountCreationRequests requestTimeCreatedField (boolean value) {
this.requestField("time_created", value);
return this;
}
public APIRequestGetAdAccountCreationRequests requestVerticalField () {
return this.requestVerticalField(true);
}
public APIRequestGetAdAccountCreationRequests requestVerticalField (boolean value) {
this.requestField("vertical", value);
return this;
}
}
public static class APIRequestCreateAdAccountCreationRequest extends APIRequest {
AdAccountCreationRequest lastResponse = null;
@Override
public AdAccountCreationRequest getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"extended_credit_id",
"ad_accounts_info",
"business_registration",
"planning_agency_business_id",
"english_legal_entity_name",
"legal_entity_name_in_local_language",
"chinese_legal_entity_name",
"address_in_chinese",
"address_in_local_language",
"address_in_english",
"official_website_url",
"business_registration_id",
"vertical",
"subvertical",
"promotable_page_urls",
"promotable_page_ids",
"promotable_app_ids",
"promotable_urls",
"contact",
"additional_comment",
"is_smb",
"is_test",
"advertiser_business_id",
};
public static final String[] FIELDS = {
};
@Override
public AdAccountCreationRequest parseResponse(String response, String header) throws APIException {
return AdAccountCreationRequest.parseResponse(response, getContext(), this, header).head();
}
@Override
public AdAccountCreationRequest execute() throws APIException {
return execute(new HashMap());
}
@Override
public AdAccountCreationRequest execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public AdAccountCreationRequest apply(ResponseWrapper result) {
try {
return APIRequestCreateAdAccountCreationRequest.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateAdAccountCreationRequest(String nodeId, APIContext context) {
super(context, nodeId, "/adaccountcreationrequests", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAdAccountCreationRequest setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAdAccountCreationRequest setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAdAccountCreationRequest setExtendedCreditId (Object extendedCreditId) {
this.setParam("extended_credit_id", extendedCreditId);
return this;
}
public APIRequestCreateAdAccountCreationRequest setExtendedCreditId (String extendedCreditId) {
this.setParam("extended_credit_id", extendedCreditId);
return this;
}
public APIRequestCreateAdAccountCreationRequest setAdAccountsInfo (List adAccountsInfo) {
this.setParam("ad_accounts_info", adAccountsInfo);
return this;
}
public APIRequestCreateAdAccountCreationRequest setAdAccountsInfo (String adAccountsInfo) {
this.setParam("ad_accounts_info", adAccountsInfo);
return this;
}
public APIRequestCreateAdAccountCreationRequest setBusinessRegistration (File businessRegistration) {
this.setParam("business_registration", businessRegistration);
return this;
}
public APIRequestCreateAdAccountCreationRequest setBusinessRegistration (String businessRegistration) {
this.setParam("business_registration", businessRegistration);
return this;
}
public APIRequestCreateAdAccountCreationRequest setPlanningAgencyBusinessId (String planningAgencyBusinessId) {
this.setParam("planning_agency_business_id", planningAgencyBusinessId);
return this;
}
public APIRequestCreateAdAccountCreationRequest setEnglishLegalEntityName (String englishLegalEntityName) {
this.setParam("english_legal_entity_name", englishLegalEntityName);
return this;
}
public APIRequestCreateAdAccountCreationRequest setLegalEntityNameInLocalLanguage (String legalEntityNameInLocalLanguage) {
this.setParam("legal_entity_name_in_local_language", legalEntityNameInLocalLanguage);
return this;
}
public APIRequestCreateAdAccountCreationRequest setChineseLegalEntityName (String chineseLegalEntityName) {
this.setParam("chinese_legal_entity_name", chineseLegalEntityName);
return this;
}
public APIRequestCreateAdAccountCreationRequest setAddressInChinese (String addressInChinese) {
this.setParam("address_in_chinese", addressInChinese);
return this;
}
public APIRequestCreateAdAccountCreationRequest setAddressInLocalLanguage (String addressInLocalLanguage) {
this.setParam("address_in_local_language", addressInLocalLanguage);
return this;
}
public APIRequestCreateAdAccountCreationRequest setAddressInEnglish (Object addressInEnglish) {
this.setParam("address_in_english", addressInEnglish);
return this;
}
public APIRequestCreateAdAccountCreationRequest setAddressInEnglish (String addressInEnglish) {
this.setParam("address_in_english", addressInEnglish);
return this;
}
public APIRequestCreateAdAccountCreationRequest setOfficialWebsiteUrl (Object officialWebsiteUrl) {
this.setParam("official_website_url", officialWebsiteUrl);
return this;
}
public APIRequestCreateAdAccountCreationRequest setOfficialWebsiteUrl (String officialWebsiteUrl) {
this.setParam("official_website_url", officialWebsiteUrl);
return this;
}
public APIRequestCreateAdAccountCreationRequest setBusinessRegistrationId (String businessRegistrationId) {
this.setParam("business_registration_id", businessRegistrationId);
return this;
}
public APIRequestCreateAdAccountCreationRequest setVertical (AdAccountCreationRequest.EnumVertical vertical) {
this.setParam("vertical", vertical);
return this;
}
public APIRequestCreateAdAccountCreationRequest setVertical (String vertical) {
this.setParam("vertical", vertical);
return this;
}
public APIRequestCreateAdAccountCreationRequest setSubvertical (AdAccountCreationRequest.EnumSubvertical subvertical) {
this.setParam("subvertical", subvertical);
return this;
}
public APIRequestCreateAdAccountCreationRequest setSubvertical (String subvertical) {
this.setParam("subvertical", subvertical);
return this;
}
public APIRequestCreateAdAccountCreationRequest setPromotablePageUrls (List promotablePageUrls) {
this.setParam("promotable_page_urls", promotablePageUrls);
return this;
}
public APIRequestCreateAdAccountCreationRequest setPromotablePageUrls (String promotablePageUrls) {
this.setParam("promotable_page_urls", promotablePageUrls);
return this;
}
public APIRequestCreateAdAccountCreationRequest setPromotablePageIds (List promotablePageIds) {
this.setParam("promotable_page_ids", promotablePageIds);
return this;
}
public APIRequestCreateAdAccountCreationRequest setPromotablePageIds (String promotablePageIds) {
this.setParam("promotable_page_ids", promotablePageIds);
return this;
}
public APIRequestCreateAdAccountCreationRequest setPromotableAppIds (List promotableAppIds) {
this.setParam("promotable_app_ids", promotableAppIds);
return this;
}
public APIRequestCreateAdAccountCreationRequest setPromotableAppIds (String promotableAppIds) {
this.setParam("promotable_app_ids", promotableAppIds);
return this;
}
public APIRequestCreateAdAccountCreationRequest setPromotableUrls (List promotableUrls) {
this.setParam("promotable_urls", promotableUrls);
return this;
}
public APIRequestCreateAdAccountCreationRequest setPromotableUrls (String promotableUrls) {
this.setParam("promotable_urls", promotableUrls);
return this;
}
public APIRequestCreateAdAccountCreationRequest setContact (Object contact) {
this.setParam("contact", contact);
return this;
}
public APIRequestCreateAdAccountCreationRequest setContact (String contact) {
this.setParam("contact", contact);
return this;
}
public APIRequestCreateAdAccountCreationRequest setAdditionalComment (String additionalComment) {
this.setParam("additional_comment", additionalComment);
return this;
}
public APIRequestCreateAdAccountCreationRequest setIsSmb (Boolean isSmb) {
this.setParam("is_smb", isSmb);
return this;
}
public APIRequestCreateAdAccountCreationRequest setIsSmb (String isSmb) {
this.setParam("is_smb", isSmb);
return this;
}
public APIRequestCreateAdAccountCreationRequest setIsTest (Boolean isTest) {
this.setParam("is_test", isTest);
return this;
}
public APIRequestCreateAdAccountCreationRequest setIsTest (String isTest) {
this.setParam("is_test", isTest);
return this;
}
public APIRequestCreateAdAccountCreationRequest setAdvertiserBusinessId (String advertiserBusinessId) {
this.setParam("advertiser_business_id", advertiserBusinessId);
return this;
}
public APIRequestCreateAdAccountCreationRequest requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAdAccountCreationRequest requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdAccountCreationRequest requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAdAccountCreationRequest requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdAccountCreationRequest requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAdAccountCreationRequest requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestDeleteAdAccounts extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"adaccount_id",
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestDeleteAdAccounts.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestDeleteAdAccounts(String nodeId, APIContext context) {
super(context, nodeId, "/adaccounts", "DELETE", Arrays.asList(PARAMS));
}
@Override
public APIRequestDeleteAdAccounts setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestDeleteAdAccounts setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestDeleteAdAccounts setAdaccountId (String adaccountId) {
this.setParam("adaccount_id", adaccountId);
return this;
}
public APIRequestDeleteAdAccounts requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestDeleteAdAccounts requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAdAccounts requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestDeleteAdAccounts requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAdAccounts requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestDeleteAdAccounts requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAdNetworkAnalytics extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"aggregation_period",
"breakdowns",
"filters",
"limit",
"metrics",
"ordering_column",
"ordering_type",
"since",
"until",
};
public static final String[] FIELDS = {
"query_id",
"results",
"id",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return AdNetworkAnalyticsSyncQueryResult.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetAdNetworkAnalytics.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetAdNetworkAnalytics(String nodeId, APIContext context) {
super(context, nodeId, "/adnetworkanalytics", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdNetworkAnalytics setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdNetworkAnalytics setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdNetworkAnalytics setAggregationPeriod (Business.EnumAggregationPeriod aggregationPeriod) {
this.setParam("aggregation_period", aggregationPeriod);
return this;
}
public APIRequestGetAdNetworkAnalytics setAggregationPeriod (String aggregationPeriod) {
this.setParam("aggregation_period", aggregationPeriod);
return this;
}
public APIRequestGetAdNetworkAnalytics setBreakdowns (List breakdowns) {
this.setParam("breakdowns", breakdowns);
return this;
}
public APIRequestGetAdNetworkAnalytics setBreakdowns (String breakdowns) {
this.setParam("breakdowns", breakdowns);
return this;
}
public APIRequestGetAdNetworkAnalytics setFilters (List> filters) {
this.setParam("filters", filters);
return this;
}
public APIRequestGetAdNetworkAnalytics setFilters (String filters) {
this.setParam("filters", filters);
return this;
}
public APIRequestGetAdNetworkAnalytics setLimit (Long limit) {
this.setParam("limit", limit);
return this;
}
public APIRequestGetAdNetworkAnalytics setLimit (String limit) {
this.setParam("limit", limit);
return this;
}
public APIRequestGetAdNetworkAnalytics setMetrics (List metrics) {
this.setParam("metrics", metrics);
return this;
}
public APIRequestGetAdNetworkAnalytics setMetrics (String metrics) {
this.setParam("metrics", metrics);
return this;
}
public APIRequestGetAdNetworkAnalytics setOrderingColumn (Business.EnumOrderingColumn orderingColumn) {
this.setParam("ordering_column", orderingColumn);
return this;
}
public APIRequestGetAdNetworkAnalytics setOrderingColumn (String orderingColumn) {
this.setParam("ordering_column", orderingColumn);
return this;
}
public APIRequestGetAdNetworkAnalytics setOrderingType (Business.EnumOrderingType orderingType) {
this.setParam("ordering_type", orderingType);
return this;
}
public APIRequestGetAdNetworkAnalytics setOrderingType (String orderingType) {
this.setParam("ordering_type", orderingType);
return this;
}
public APIRequestGetAdNetworkAnalytics setSince (Object since) {
this.setParam("since", since);
return this;
}
public APIRequestGetAdNetworkAnalytics setSince (String since) {
this.setParam("since", since);
return this;
}
public APIRequestGetAdNetworkAnalytics setUntil (Object until) {
this.setParam("until", until);
return this;
}
public APIRequestGetAdNetworkAnalytics setUntil (String until) {
this.setParam("until", until);
return this;
}
public APIRequestGetAdNetworkAnalytics requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdNetworkAnalytics requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdNetworkAnalytics requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdNetworkAnalytics requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdNetworkAnalytics requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdNetworkAnalytics requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdNetworkAnalytics requestQueryIdField () {
return this.requestQueryIdField(true);
}
public APIRequestGetAdNetworkAnalytics requestQueryIdField (boolean value) {
this.requestField("query_id", value);
return this;
}
public APIRequestGetAdNetworkAnalytics requestResultsField () {
return this.requestResultsField(true);
}
public APIRequestGetAdNetworkAnalytics requestResultsField (boolean value) {
this.requestField("results", value);
return this;
}
public APIRequestGetAdNetworkAnalytics requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdNetworkAnalytics requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
}
public static class APIRequestCreateAdNetworkAnalytic extends APIRequest {
Business lastResponse = null;
@Override
public Business getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"aggregation_period",
"breakdowns",
"metrics",
"filters",
"limit",
"ordering_column",
"ordering_type",
"since",
"until",
};
public static final String[] FIELDS = {
};
@Override
public Business parseResponse(String response, String header) throws APIException {
return Business.parseResponse(response, getContext(), this, header).head();
}
@Override
public Business execute() throws APIException {
return execute(new HashMap());
}
@Override
public Business execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public Business apply(ResponseWrapper result) {
try {
return APIRequestCreateAdNetworkAnalytic.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateAdNetworkAnalytic(String nodeId, APIContext context) {
super(context, nodeId, "/adnetworkanalytics", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAdNetworkAnalytic setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAdNetworkAnalytic setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAdNetworkAnalytic setAggregationPeriod (Business.EnumAggregationPeriod aggregationPeriod) {
this.setParam("aggregation_period", aggregationPeriod);
return this;
}
public APIRequestCreateAdNetworkAnalytic setAggregationPeriod (String aggregationPeriod) {
this.setParam("aggregation_period", aggregationPeriod);
return this;
}
public APIRequestCreateAdNetworkAnalytic setBreakdowns (List breakdowns) {
this.setParam("breakdowns", breakdowns);
return this;
}
public APIRequestCreateAdNetworkAnalytic setBreakdowns (String breakdowns) {
this.setParam("breakdowns", breakdowns);
return this;
}
public APIRequestCreateAdNetworkAnalytic setMetrics (List metrics) {
this.setParam("metrics", metrics);
return this;
}
public APIRequestCreateAdNetworkAnalytic setMetrics (String metrics) {
this.setParam("metrics", metrics);
return this;
}
public APIRequestCreateAdNetworkAnalytic setFilters (List filters) {
this.setParam("filters", filters);
return this;
}
public APIRequestCreateAdNetworkAnalytic setFilters (String filters) {
this.setParam("filters", filters);
return this;
}
public APIRequestCreateAdNetworkAnalytic setLimit (Long limit) {
this.setParam("limit", limit);
return this;
}
public APIRequestCreateAdNetworkAnalytic setLimit (String limit) {
this.setParam("limit", limit);
return this;
}
public APIRequestCreateAdNetworkAnalytic setOrderingColumn (Business.EnumOrderingColumn orderingColumn) {
this.setParam("ordering_column", orderingColumn);
return this;
}
public APIRequestCreateAdNetworkAnalytic setOrderingColumn (String orderingColumn) {
this.setParam("ordering_column", orderingColumn);
return this;
}
public APIRequestCreateAdNetworkAnalytic setOrderingType (Business.EnumOrderingType orderingType) {
this.setParam("ordering_type", orderingType);
return this;
}
public APIRequestCreateAdNetworkAnalytic setOrderingType (String orderingType) {
this.setParam("ordering_type", orderingType);
return this;
}
public APIRequestCreateAdNetworkAnalytic setSince (Object since) {
this.setParam("since", since);
return this;
}
public APIRequestCreateAdNetworkAnalytic setSince (String since) {
this.setParam("since", since);
return this;
}
public APIRequestCreateAdNetworkAnalytic setUntil (Object until) {
this.setParam("until", until);
return this;
}
public APIRequestCreateAdNetworkAnalytic setUntil (String until) {
this.setParam("until", until);
return this;
}
public APIRequestCreateAdNetworkAnalytic requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAdNetworkAnalytic requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdNetworkAnalytic requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAdNetworkAnalytic requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdNetworkAnalytic requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAdNetworkAnalytic requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAdNetworkAnalyticsResults extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"query_ids",
};
public static final String[] FIELDS = {
"data",
"error",
"query_id",
"results",
"status",
"id",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return AdNetworkAnalyticsAsyncQueryResult.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetAdNetworkAnalyticsResults.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetAdNetworkAnalyticsResults(String nodeId, APIContext context) {
super(context, nodeId, "/adnetworkanalytics_results", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdNetworkAnalyticsResults setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdNetworkAnalyticsResults setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdNetworkAnalyticsResults setQueryIds (List queryIds) {
this.setParam("query_ids", queryIds);
return this;
}
public APIRequestGetAdNetworkAnalyticsResults setQueryIds (String queryIds) {
this.setParam("query_ids", queryIds);
return this;
}
public APIRequestGetAdNetworkAnalyticsResults requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdNetworkAnalyticsResults requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdNetworkAnalyticsResults requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdNetworkAnalyticsResults requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdNetworkAnalyticsResults requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdNetworkAnalyticsResults requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdNetworkAnalyticsResults requestDataField () {
return this.requestDataField(true);
}
public APIRequestGetAdNetworkAnalyticsResults requestDataField (boolean value) {
this.requestField("data", value);
return this;
}
public APIRequestGetAdNetworkAnalyticsResults requestErrorField () {
return this.requestErrorField(true);
}
public APIRequestGetAdNetworkAnalyticsResults requestErrorField (boolean value) {
this.requestField("error", value);
return this;
}
public APIRequestGetAdNetworkAnalyticsResults requestQueryIdField () {
return this.requestQueryIdField(true);
}
public APIRequestGetAdNetworkAnalyticsResults requestQueryIdField (boolean value) {
this.requestField("query_id", value);
return this;
}
public APIRequestGetAdNetworkAnalyticsResults requestResultsField () {
return this.requestResultsField(true);
}
public APIRequestGetAdNetworkAnalyticsResults requestResultsField (boolean value) {
this.requestField("results", value);
return this;
}
public APIRequestGetAdNetworkAnalyticsResults requestStatusField () {
return this.requestStatusField(true);
}
public APIRequestGetAdNetworkAnalyticsResults requestStatusField (boolean value) {
this.requestField("status", value);
return this;
}
public APIRequestGetAdNetworkAnalyticsResults requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdNetworkAnalyticsResults requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
}
public static class APIRequestGetAdsPixels extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"name_filter",
"id_filter",
"sort_by",
};
public static final String[] FIELDS = {
"automatic_matching_fields",
"can_proxy",
"code",
"creation_time",
"creator",
"data_use_setting",
"enable_automatic_matching",
"first_party_cookie_status",
"id",
"is_created_by_business",
"last_fired_time",
"name",
"owner_ad_account",
"owner_business",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return AdsPixel.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetAdsPixels.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
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 setNameFilter (String nameFilter) {
this.setParam("name_filter", nameFilter);
return this;
}
public APIRequestGetAdsPixels setIdFilter (String idFilter) {
this.setParam("id_filter", idFilter);
return this;
}
public APIRequestGetAdsPixels setSortBy (AdsPixel.EnumSortBy sortBy) {
this.setParam("sort_by", sortBy);
return this;
}
public APIRequestGetAdsPixels setSortBy (String sortBy) {
this.setParam("sort_by", sortBy);
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 requestAutomaticMatchingFieldsField () {
return this.requestAutomaticMatchingFieldsField(true);
}
public APIRequestGetAdsPixels requestAutomaticMatchingFieldsField (boolean value) {
this.requestField("automatic_matching_fields", value);
return this;
}
public APIRequestGetAdsPixels requestCanProxyField () {
return this.requestCanProxyField(true);
}
public APIRequestGetAdsPixels requestCanProxyField (boolean value) {
this.requestField("can_proxy", 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 requestCreatorField () {
return this.requestCreatorField(true);
}
public APIRequestGetAdsPixels requestCreatorField (boolean value) {
this.requestField("creator", value);
return this;
}
public APIRequestGetAdsPixels requestDataUseSettingField () {
return this.requestDataUseSettingField(true);
}
public APIRequestGetAdsPixels requestDataUseSettingField (boolean value) {
this.requestField("data_use_setting", value);
return this;
}
public APIRequestGetAdsPixels requestEnableAutomaticMatchingField () {
return this.requestEnableAutomaticMatchingField(true);
}
public APIRequestGetAdsPixels requestEnableAutomaticMatchingField (boolean value) {
this.requestField("enable_automatic_matching", value);
return this;
}
public APIRequestGetAdsPixels requestFirstPartyCookieStatusField () {
return this.requestFirstPartyCookieStatusField(true);
}
public APIRequestGetAdsPixels requestFirstPartyCookieStatusField (boolean value) {
this.requestField("first_party_cookie_status", 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, String header) throws APIException {
return AdsPixel.parseResponse(response, getContext(), this, header).head();
}
@Override
public AdsPixel execute() throws APIException {
return execute(new HashMap());
}
@Override
public AdsPixel execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public AdsPixel apply(ResponseWrapper result) {
try {
return APIRequestCreateAdsPixel.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
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 APIRequestGetAdvertisableApplications extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"adaccount_id",
"offset",
};
public static final String[] FIELDS = {
"has_insight_permission",
"id",
"name",
"photo_url",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return BusinessAdvertisableApplicationsResult.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetAdvertisableApplications.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetAdvertisableApplications(String nodeId, APIContext context) {
super(context, nodeId, "/advertisable_applications", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdvertisableApplications setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdvertisableApplications setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdvertisableApplications setAdaccountId (Long adaccountId) {
this.setParam("adaccount_id", adaccountId);
return this;
}
public APIRequestGetAdvertisableApplications setAdaccountId (String adaccountId) {
this.setParam("adaccount_id", adaccountId);
return this;
}
public APIRequestGetAdvertisableApplications setOffset (Long offset) {
this.setParam("offset", offset);
return this;
}
public APIRequestGetAdvertisableApplications setOffset (String offset) {
this.setParam("offset", offset);
return this;
}
public APIRequestGetAdvertisableApplications requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdvertisableApplications requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdvertisableApplications requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdvertisableApplications requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdvertisableApplications requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdvertisableApplications requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdvertisableApplications requestHasInsightPermissionField () {
return this.requestHasInsightPermissionField(true);
}
public APIRequestGetAdvertisableApplications requestHasInsightPermissionField (boolean value) {
this.requestField("has_insight_permission", value);
return this;
}
public APIRequestGetAdvertisableApplications requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdvertisableApplications requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdvertisableApplications requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAdvertisableApplications requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAdvertisableApplications requestPhotoUrlField () {
return this.requestPhotoUrlField(true);
}
public APIRequestGetAdvertisableApplications requestPhotoUrlField (boolean value) {
this.requestField("photo_url", value);
return this;
}
}
public static class APIRequestDeleteAgencies extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"business",
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestDeleteAgencies.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestDeleteAgencies(String nodeId, APIContext context) {
super(context, nodeId, "/agencies", "DELETE", Arrays.asList(PARAMS));
}
@Override
public APIRequestDeleteAgencies setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestDeleteAgencies setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestDeleteAgencies setBusiness (String business) {
this.setParam("business", business);
return this;
}
public APIRequestDeleteAgencies requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestDeleteAgencies requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAgencies requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestDeleteAgencies requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAgencies requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestDeleteAgencies requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAgencyPages extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"agency_id",
};
public static final String[] FIELDS = {
"about",
"access_token",
"ad_campaign",
"affiliation",
"app_id",
"app_links",
"artists_we_like",
"attire",
"awards",
"band_interests",
"band_members",
"best_page",
"bio",
"birthday",
"booking_agent",
"built",
"business",
"can_checkin",
"can_post",
"category",
"category_list",
"checkins",
"company_overview",
"connected_instagram_account",
"contact_address",
"context",
"copyright_attribution_insights",
"copyright_whitelisted_ig_partners",
"country_page_likes",
"cover",
"culinary_team",
"current_location",
"description",
"description_html",
"directed_by",
"display_subtext",
"displayed_message_response_time",
"emails",
"engagement",
"fan_count",
"featured_video",
"features",
"food_styles",
"founded",
"general_info",
"general_manager",
"genre",
"global_brand_page_name",
"global_brand_root_id",
"has_added_app",
"has_whatsapp_business_number",
"has_whatsapp_number",
"hometown",
"hours",
"id",
"impressum",
"influences",
"instagram_business_account",
"instant_articles_review_status",
"is_always_open",
"is_chain",
"is_community_page",
"is_eligible_for_branded_content",
"is_messenger_bot_get_started_enabled",
"is_messenger_platform_bot",
"is_owned",
"is_permanently_closed",
"is_published",
"is_unclaimed",
"is_verified",
"is_webhooks_subscribed",
"keywords",
"leadgen_form_preview_details",
"leadgen_has_crm_integration",
"leadgen_has_fat_ping_crm_integration",
"leadgen_tos_acceptance_time",
"leadgen_tos_accepted",
"leadgen_tos_accepting_user",
"link",
"location",
"members",
"merchant_id",
"merchant_review_status",
"messenger_ads_default_icebreakers",
"messenger_ads_default_page_welcome_message",
"messenger_ads_default_quick_replies",
"messenger_ads_quick_replies_type",
"mission",
"mpg",
"name",
"name_with_location_descriptor",
"network",
"new_like_count",
"offer_eligible",
"overall_star_rating",
"page_token",
"parent_page",
"parking",
"payment_options",
"personal_info",
"personal_interests",
"pharma_safety_info",
"phone",
"place_type",
"plot_outline",
"preferred_audience",
"press_contact",
"price_range",
"privacy_info_url",
"produced_by",
"products",
"promotion_eligible",
"promotion_ineligible_reason",
"public_transit",
"rating_count",
"recipient",
"record_label",
"release_date",
"restaurant_services",
"restaurant_specialties",
"schedule",
"screenplay_by",
"season",
"single_line_address",
"starring",
"start_info",
"store_code",
"store_location_descriptor",
"store_number",
"studio",
"supports_instant_articles",
"talking_about_count",
"unread_message_count",
"unread_notif_count",
"unseen_message_count",
"username",
"verification_status",
"voip_info",
"website",
"were_here_count",
"whatsapp_number",
"written_by",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return Page.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetAgencyPages.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetAgencyPages(String nodeId, APIContext context) {
super(context, nodeId, "/agency_pages", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAgencyPages setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAgencyPages setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAgencyPages setAgencyId (String agencyId) {
this.setParam("agency_id", agencyId);
return this;
}
public APIRequestGetAgencyPages requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAgencyPages requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAgencyPages requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAgencyPages requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAgencyPages requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAgencyPages requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAgencyPages requestAboutField () {
return this.requestAboutField(true);
}
public APIRequestGetAgencyPages requestAboutField (boolean value) {
this.requestField("about", value);
return this;
}
public APIRequestGetAgencyPages requestAccessTokenField () {
return this.requestAccessTokenField(true);
}
public APIRequestGetAgencyPages requestAccessTokenField (boolean value) {
this.requestField("access_token", value);
return this;
}
public APIRequestGetAgencyPages requestAdCampaignField () {
return this.requestAdCampaignField(true);
}
public APIRequestGetAgencyPages requestAdCampaignField (boolean value) {
this.requestField("ad_campaign", value);
return this;
}
public APIRequestGetAgencyPages requestAffiliationField () {
return this.requestAffiliationField(true);
}
public APIRequestGetAgencyPages requestAffiliationField (boolean value) {
this.requestField("affiliation", value);
return this;
}
public APIRequestGetAgencyPages requestAppIdField () {
return this.requestAppIdField(true);
}
public APIRequestGetAgencyPages requestAppIdField (boolean value) {
this.requestField("app_id", value);
return this;
}
public APIRequestGetAgencyPages requestAppLinksField () {
return this.requestAppLinksField(true);
}
public APIRequestGetAgencyPages requestAppLinksField (boolean value) {
this.requestField("app_links", value);
return this;
}
public APIRequestGetAgencyPages requestArtistsWeLikeField () {
return this.requestArtistsWeLikeField(true);
}
public APIRequestGetAgencyPages requestArtistsWeLikeField (boolean value) {
this.requestField("artists_we_like", value);
return this;
}
public APIRequestGetAgencyPages requestAttireField () {
return this.requestAttireField(true);
}
public APIRequestGetAgencyPages requestAttireField (boolean value) {
this.requestField("attire", value);
return this;
}
public APIRequestGetAgencyPages requestAwardsField () {
return this.requestAwardsField(true);
}
public APIRequestGetAgencyPages requestAwardsField (boolean value) {
this.requestField("awards", value);
return this;
}
public APIRequestGetAgencyPages requestBandInterestsField () {
return this.requestBandInterestsField(true);
}
public APIRequestGetAgencyPages requestBandInterestsField (boolean value) {
this.requestField("band_interests", value);
return this;
}
public APIRequestGetAgencyPages requestBandMembersField () {
return this.requestBandMembersField(true);
}
public APIRequestGetAgencyPages requestBandMembersField (boolean value) {
this.requestField("band_members", value);
return this;
}
public APIRequestGetAgencyPages requestBestPageField () {
return this.requestBestPageField(true);
}
public APIRequestGetAgencyPages requestBestPageField (boolean value) {
this.requestField("best_page", value);
return this;
}
public APIRequestGetAgencyPages requestBioField () {
return this.requestBioField(true);
}
public APIRequestGetAgencyPages requestBioField (boolean value) {
this.requestField("bio", value);
return this;
}
public APIRequestGetAgencyPages requestBirthdayField () {
return this.requestBirthdayField(true);
}
public APIRequestGetAgencyPages requestBirthdayField (boolean value) {
this.requestField("birthday", value);
return this;
}
public APIRequestGetAgencyPages requestBookingAgentField () {
return this.requestBookingAgentField(true);
}
public APIRequestGetAgencyPages requestBookingAgentField (boolean value) {
this.requestField("booking_agent", value);
return this;
}
public APIRequestGetAgencyPages requestBuiltField () {
return this.requestBuiltField(true);
}
public APIRequestGetAgencyPages requestBuiltField (boolean value) {
this.requestField("built", value);
return this;
}
public APIRequestGetAgencyPages requestBusinessField () {
return this.requestBusinessField(true);
}
public APIRequestGetAgencyPages requestBusinessField (boolean value) {
this.requestField("business", value);
return this;
}
public APIRequestGetAgencyPages requestCanCheckinField () {
return this.requestCanCheckinField(true);
}
public APIRequestGetAgencyPages requestCanCheckinField (boolean value) {
this.requestField("can_checkin", value);
return this;
}
public APIRequestGetAgencyPages requestCanPostField () {
return this.requestCanPostField(true);
}
public APIRequestGetAgencyPages requestCanPostField (boolean value) {
this.requestField("can_post", value);
return this;
}
public APIRequestGetAgencyPages requestCategoryField () {
return this.requestCategoryField(true);
}
public APIRequestGetAgencyPages requestCategoryField (boolean value) {
this.requestField("category", value);
return this;
}
public APIRequestGetAgencyPages requestCategoryListField () {
return this.requestCategoryListField(true);
}
public APIRequestGetAgencyPages requestCategoryListField (boolean value) {
this.requestField("category_list", value);
return this;
}
public APIRequestGetAgencyPages requestCheckinsField () {
return this.requestCheckinsField(true);
}
public APIRequestGetAgencyPages requestCheckinsField (boolean value) {
this.requestField("checkins", value);
return this;
}
public APIRequestGetAgencyPages requestCompanyOverviewField () {
return this.requestCompanyOverviewField(true);
}
public APIRequestGetAgencyPages requestCompanyOverviewField (boolean value) {
this.requestField("company_overview", value);
return this;
}
public APIRequestGetAgencyPages requestConnectedInstagramAccountField () {
return this.requestConnectedInstagramAccountField(true);
}
public APIRequestGetAgencyPages requestConnectedInstagramAccountField (boolean value) {
this.requestField("connected_instagram_account", value);
return this;
}
public APIRequestGetAgencyPages requestContactAddressField () {
return this.requestContactAddressField(true);
}
public APIRequestGetAgencyPages requestContactAddressField (boolean value) {
this.requestField("contact_address", value);
return this;
}
public APIRequestGetAgencyPages requestContextField () {
return this.requestContextField(true);
}
public APIRequestGetAgencyPages requestContextField (boolean value) {
this.requestField("context", value);
return this;
}
public APIRequestGetAgencyPages requestCopyrightAttributionInsightsField () {
return this.requestCopyrightAttributionInsightsField(true);
}
public APIRequestGetAgencyPages requestCopyrightAttributionInsightsField (boolean value) {
this.requestField("copyright_attribution_insights", value);
return this;
}
public APIRequestGetAgencyPages requestCopyrightWhitelistedIgPartnersField () {
return this.requestCopyrightWhitelistedIgPartnersField(true);
}
public APIRequestGetAgencyPages requestCopyrightWhitelistedIgPartnersField (boolean value) {
this.requestField("copyright_whitelisted_ig_partners", value);
return this;
}
public APIRequestGetAgencyPages requestCountryPageLikesField () {
return this.requestCountryPageLikesField(true);
}
public APIRequestGetAgencyPages requestCountryPageLikesField (boolean value) {
this.requestField("country_page_likes", value);
return this;
}
public APIRequestGetAgencyPages requestCoverField () {
return this.requestCoverField(true);
}
public APIRequestGetAgencyPages requestCoverField (boolean value) {
this.requestField("cover", value);
return this;
}
public APIRequestGetAgencyPages requestCulinaryTeamField () {
return this.requestCulinaryTeamField(true);
}
public APIRequestGetAgencyPages requestCulinaryTeamField (boolean value) {
this.requestField("culinary_team", value);
return this;
}
public APIRequestGetAgencyPages requestCurrentLocationField () {
return this.requestCurrentLocationField(true);
}
public APIRequestGetAgencyPages requestCurrentLocationField (boolean value) {
this.requestField("current_location", value);
return this;
}
public APIRequestGetAgencyPages requestDescriptionField () {
return this.requestDescriptionField(true);
}
public APIRequestGetAgencyPages requestDescriptionField (boolean value) {
this.requestField("description", value);
return this;
}
public APIRequestGetAgencyPages requestDescriptionHtmlField () {
return this.requestDescriptionHtmlField(true);
}
public APIRequestGetAgencyPages requestDescriptionHtmlField (boolean value) {
this.requestField("description_html", value);
return this;
}
public APIRequestGetAgencyPages requestDirectedByField () {
return this.requestDirectedByField(true);
}
public APIRequestGetAgencyPages requestDirectedByField (boolean value) {
this.requestField("directed_by", value);
return this;
}
public APIRequestGetAgencyPages requestDisplaySubtextField () {
return this.requestDisplaySubtextField(true);
}
public APIRequestGetAgencyPages requestDisplaySubtextField (boolean value) {
this.requestField("display_subtext", value);
return this;
}
public APIRequestGetAgencyPages requestDisplayedMessageResponseTimeField () {
return this.requestDisplayedMessageResponseTimeField(true);
}
public APIRequestGetAgencyPages requestDisplayedMessageResponseTimeField (boolean value) {
this.requestField("displayed_message_response_time", value);
return this;
}
public APIRequestGetAgencyPages requestEmailsField () {
return this.requestEmailsField(true);
}
public APIRequestGetAgencyPages requestEmailsField (boolean value) {
this.requestField("emails", value);
return this;
}
public APIRequestGetAgencyPages requestEngagementField () {
return this.requestEngagementField(true);
}
public APIRequestGetAgencyPages requestEngagementField (boolean value) {
this.requestField("engagement", value);
return this;
}
public APIRequestGetAgencyPages requestFanCountField () {
return this.requestFanCountField(true);
}
public APIRequestGetAgencyPages requestFanCountField (boolean value) {
this.requestField("fan_count", value);
return this;
}
public APIRequestGetAgencyPages requestFeaturedVideoField () {
return this.requestFeaturedVideoField(true);
}
public APIRequestGetAgencyPages requestFeaturedVideoField (boolean value) {
this.requestField("featured_video", value);
return this;
}
public APIRequestGetAgencyPages requestFeaturesField () {
return this.requestFeaturesField(true);
}
public APIRequestGetAgencyPages requestFeaturesField (boolean value) {
this.requestField("features", value);
return this;
}
public APIRequestGetAgencyPages requestFoodStylesField () {
return this.requestFoodStylesField(true);
}
public APIRequestGetAgencyPages requestFoodStylesField (boolean value) {
this.requestField("food_styles", value);
return this;
}
public APIRequestGetAgencyPages requestFoundedField () {
return this.requestFoundedField(true);
}
public APIRequestGetAgencyPages requestFoundedField (boolean value) {
this.requestField("founded", value);
return this;
}
public APIRequestGetAgencyPages requestGeneralInfoField () {
return this.requestGeneralInfoField(true);
}
public APIRequestGetAgencyPages requestGeneralInfoField (boolean value) {
this.requestField("general_info", value);
return this;
}
public APIRequestGetAgencyPages requestGeneralManagerField () {
return this.requestGeneralManagerField(true);
}
public APIRequestGetAgencyPages requestGeneralManagerField (boolean value) {
this.requestField("general_manager", value);
return this;
}
public APIRequestGetAgencyPages requestGenreField () {
return this.requestGenreField(true);
}
public APIRequestGetAgencyPages requestGenreField (boolean value) {
this.requestField("genre", value);
return this;
}
public APIRequestGetAgencyPages requestGlobalBrandPageNameField () {
return this.requestGlobalBrandPageNameField(true);
}
public APIRequestGetAgencyPages requestGlobalBrandPageNameField (boolean value) {
this.requestField("global_brand_page_name", value);
return this;
}
public APIRequestGetAgencyPages requestGlobalBrandRootIdField () {
return this.requestGlobalBrandRootIdField(true);
}
public APIRequestGetAgencyPages requestGlobalBrandRootIdField (boolean value) {
this.requestField("global_brand_root_id", value);
return this;
}
public APIRequestGetAgencyPages requestHasAddedAppField () {
return this.requestHasAddedAppField(true);
}
public APIRequestGetAgencyPages requestHasAddedAppField (boolean value) {
this.requestField("has_added_app", value);
return this;
}
public APIRequestGetAgencyPages requestHasWhatsappBusinessNumberField () {
return this.requestHasWhatsappBusinessNumberField(true);
}
public APIRequestGetAgencyPages requestHasWhatsappBusinessNumberField (boolean value) {
this.requestField("has_whatsapp_business_number", value);
return this;
}
public APIRequestGetAgencyPages requestHasWhatsappNumberField () {
return this.requestHasWhatsappNumberField(true);
}
public APIRequestGetAgencyPages requestHasWhatsappNumberField (boolean value) {
this.requestField("has_whatsapp_number", value);
return this;
}
public APIRequestGetAgencyPages requestHometownField () {
return this.requestHometownField(true);
}
public APIRequestGetAgencyPages requestHometownField (boolean value) {
this.requestField("hometown", value);
return this;
}
public APIRequestGetAgencyPages requestHoursField () {
return this.requestHoursField(true);
}
public APIRequestGetAgencyPages requestHoursField (boolean value) {
this.requestField("hours", value);
return this;
}
public APIRequestGetAgencyPages requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAgencyPages requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAgencyPages requestImpressumField () {
return this.requestImpressumField(true);
}
public APIRequestGetAgencyPages requestImpressumField (boolean value) {
this.requestField("impressum", value);
return this;
}
public APIRequestGetAgencyPages requestInfluencesField () {
return this.requestInfluencesField(true);
}
public APIRequestGetAgencyPages requestInfluencesField (boolean value) {
this.requestField("influences", value);
return this;
}
public APIRequestGetAgencyPages requestInstagramBusinessAccountField () {
return this.requestInstagramBusinessAccountField(true);
}
public APIRequestGetAgencyPages requestInstagramBusinessAccountField (boolean value) {
this.requestField("instagram_business_account", value);
return this;
}
public APIRequestGetAgencyPages requestInstantArticlesReviewStatusField () {
return this.requestInstantArticlesReviewStatusField(true);
}
public APIRequestGetAgencyPages requestInstantArticlesReviewStatusField (boolean value) {
this.requestField("instant_articles_review_status", value);
return this;
}
public APIRequestGetAgencyPages requestIsAlwaysOpenField () {
return this.requestIsAlwaysOpenField(true);
}
public APIRequestGetAgencyPages requestIsAlwaysOpenField (boolean value) {
this.requestField("is_always_open", value);
return this;
}
public APIRequestGetAgencyPages requestIsChainField () {
return this.requestIsChainField(true);
}
public APIRequestGetAgencyPages requestIsChainField (boolean value) {
this.requestField("is_chain", value);
return this;
}
public APIRequestGetAgencyPages requestIsCommunityPageField () {
return this.requestIsCommunityPageField(true);
}
public APIRequestGetAgencyPages requestIsCommunityPageField (boolean value) {
this.requestField("is_community_page", value);
return this;
}
public APIRequestGetAgencyPages requestIsEligibleForBrandedContentField () {
return this.requestIsEligibleForBrandedContentField(true);
}
public APIRequestGetAgencyPages requestIsEligibleForBrandedContentField (boolean value) {
this.requestField("is_eligible_for_branded_content", value);
return this;
}
public APIRequestGetAgencyPages requestIsMessengerBotGetStartedEnabledField () {
return this.requestIsMessengerBotGetStartedEnabledField(true);
}
public APIRequestGetAgencyPages requestIsMessengerBotGetStartedEnabledField (boolean value) {
this.requestField("is_messenger_bot_get_started_enabled", value);
return this;
}
public APIRequestGetAgencyPages requestIsMessengerPlatformBotField () {
return this.requestIsMessengerPlatformBotField(true);
}
public APIRequestGetAgencyPages requestIsMessengerPlatformBotField (boolean value) {
this.requestField("is_messenger_platform_bot", value);
return this;
}
public APIRequestGetAgencyPages requestIsOwnedField () {
return this.requestIsOwnedField(true);
}
public APIRequestGetAgencyPages requestIsOwnedField (boolean value) {
this.requestField("is_owned", value);
return this;
}
public APIRequestGetAgencyPages requestIsPermanentlyClosedField () {
return this.requestIsPermanentlyClosedField(true);
}
public APIRequestGetAgencyPages requestIsPermanentlyClosedField (boolean value) {
this.requestField("is_permanently_closed", value);
return this;
}
public APIRequestGetAgencyPages requestIsPublishedField () {
return this.requestIsPublishedField(true);
}
public APIRequestGetAgencyPages requestIsPublishedField (boolean value) {
this.requestField("is_published", value);
return this;
}
public APIRequestGetAgencyPages requestIsUnclaimedField () {
return this.requestIsUnclaimedField(true);
}
public APIRequestGetAgencyPages requestIsUnclaimedField (boolean value) {
this.requestField("is_unclaimed", value);
return this;
}
public APIRequestGetAgencyPages requestIsVerifiedField () {
return this.requestIsVerifiedField(true);
}
public APIRequestGetAgencyPages requestIsVerifiedField (boolean value) {
this.requestField("is_verified", value);
return this;
}
public APIRequestGetAgencyPages requestIsWebhooksSubscribedField () {
return this.requestIsWebhooksSubscribedField(true);
}
public APIRequestGetAgencyPages requestIsWebhooksSubscribedField (boolean value) {
this.requestField("is_webhooks_subscribed", value);
return this;
}
public APIRequestGetAgencyPages requestKeywordsField () {
return this.requestKeywordsField(true);
}
public APIRequestGetAgencyPages requestKeywordsField (boolean value) {
this.requestField("keywords", value);
return this;
}
public APIRequestGetAgencyPages requestLeadgenFormPreviewDetailsField () {
return this.requestLeadgenFormPreviewDetailsField(true);
}
public APIRequestGetAgencyPages requestLeadgenFormPreviewDetailsField (boolean value) {
this.requestField("leadgen_form_preview_details", value);
return this;
}
public APIRequestGetAgencyPages requestLeadgenHasCrmIntegrationField () {
return this.requestLeadgenHasCrmIntegrationField(true);
}
public APIRequestGetAgencyPages requestLeadgenHasCrmIntegrationField (boolean value) {
this.requestField("leadgen_has_crm_integration", value);
return this;
}
public APIRequestGetAgencyPages requestLeadgenHasFatPingCrmIntegrationField () {
return this.requestLeadgenHasFatPingCrmIntegrationField(true);
}
public APIRequestGetAgencyPages requestLeadgenHasFatPingCrmIntegrationField (boolean value) {
this.requestField("leadgen_has_fat_ping_crm_integration", value);
return this;
}
public APIRequestGetAgencyPages requestLeadgenTosAcceptanceTimeField () {
return this.requestLeadgenTosAcceptanceTimeField(true);
}
public APIRequestGetAgencyPages requestLeadgenTosAcceptanceTimeField (boolean value) {
this.requestField("leadgen_tos_acceptance_time", value);
return this;
}
public APIRequestGetAgencyPages requestLeadgenTosAcceptedField () {
return this.requestLeadgenTosAcceptedField(true);
}
public APIRequestGetAgencyPages requestLeadgenTosAcceptedField (boolean value) {
this.requestField("leadgen_tos_accepted", value);
return this;
}
public APIRequestGetAgencyPages requestLeadgenTosAcceptingUserField () {
return this.requestLeadgenTosAcceptingUserField(true);
}
public APIRequestGetAgencyPages requestLeadgenTosAcceptingUserField (boolean value) {
this.requestField("leadgen_tos_accepting_user", value);
return this;
}
public APIRequestGetAgencyPages requestLinkField () {
return this.requestLinkField(true);
}
public APIRequestGetAgencyPages requestLinkField (boolean value) {
this.requestField("link", value);
return this;
}
public APIRequestGetAgencyPages requestLocationField () {
return this.requestLocationField(true);
}
public APIRequestGetAgencyPages requestLocationField (boolean value) {
this.requestField("location", value);
return this;
}
public APIRequestGetAgencyPages requestMembersField () {
return this.requestMembersField(true);
}
public APIRequestGetAgencyPages requestMembersField (boolean value) {
this.requestField("members", value);
return this;
}
public APIRequestGetAgencyPages requestMerchantIdField () {
return this.requestMerchantIdField(true);
}
public APIRequestGetAgencyPages requestMerchantIdField (boolean value) {
this.requestField("merchant_id", value);
return this;
}
public APIRequestGetAgencyPages requestMerchantReviewStatusField () {
return this.requestMerchantReviewStatusField(true);
}
public APIRequestGetAgencyPages requestMerchantReviewStatusField (boolean value) {
this.requestField("merchant_review_status", value);
return this;
}
public APIRequestGetAgencyPages requestMessengerAdsDefaultIcebreakersField () {
return this.requestMessengerAdsDefaultIcebreakersField(true);
}
public APIRequestGetAgencyPages requestMessengerAdsDefaultIcebreakersField (boolean value) {
this.requestField("messenger_ads_default_icebreakers", value);
return this;
}
public APIRequestGetAgencyPages requestMessengerAdsDefaultPageWelcomeMessageField () {
return this.requestMessengerAdsDefaultPageWelcomeMessageField(true);
}
public APIRequestGetAgencyPages requestMessengerAdsDefaultPageWelcomeMessageField (boolean value) {
this.requestField("messenger_ads_default_page_welcome_message", value);
return this;
}
public APIRequestGetAgencyPages requestMessengerAdsDefaultQuickRepliesField () {
return this.requestMessengerAdsDefaultQuickRepliesField(true);
}
public APIRequestGetAgencyPages requestMessengerAdsDefaultQuickRepliesField (boolean value) {
this.requestField("messenger_ads_default_quick_replies", value);
return this;
}
public APIRequestGetAgencyPages requestMessengerAdsQuickRepliesTypeField () {
return this.requestMessengerAdsQuickRepliesTypeField(true);
}
public APIRequestGetAgencyPages requestMessengerAdsQuickRepliesTypeField (boolean value) {
this.requestField("messenger_ads_quick_replies_type", value);
return this;
}
public APIRequestGetAgencyPages requestMissionField () {
return this.requestMissionField(true);
}
public APIRequestGetAgencyPages requestMissionField (boolean value) {
this.requestField("mission", value);
return this;
}
public APIRequestGetAgencyPages requestMpgField () {
return this.requestMpgField(true);
}
public APIRequestGetAgencyPages requestMpgField (boolean value) {
this.requestField("mpg", value);
return this;
}
public APIRequestGetAgencyPages requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAgencyPages requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAgencyPages requestNameWithLocationDescriptorField () {
return this.requestNameWithLocationDescriptorField(true);
}
public APIRequestGetAgencyPages requestNameWithLocationDescriptorField (boolean value) {
this.requestField("name_with_location_descriptor", value);
return this;
}
public APIRequestGetAgencyPages requestNetworkField () {
return this.requestNetworkField(true);
}
public APIRequestGetAgencyPages requestNetworkField (boolean value) {
this.requestField("network", value);
return this;
}
public APIRequestGetAgencyPages requestNewLikeCountField () {
return this.requestNewLikeCountField(true);
}
public APIRequestGetAgencyPages requestNewLikeCountField (boolean value) {
this.requestField("new_like_count", value);
return this;
}
public APIRequestGetAgencyPages requestOfferEligibleField () {
return this.requestOfferEligibleField(true);
}
public APIRequestGetAgencyPages requestOfferEligibleField (boolean value) {
this.requestField("offer_eligible", value);
return this;
}
public APIRequestGetAgencyPages requestOverallStarRatingField () {
return this.requestOverallStarRatingField(true);
}
public APIRequestGetAgencyPages requestOverallStarRatingField (boolean value) {
this.requestField("overall_star_rating", value);
return this;
}
public APIRequestGetAgencyPages requestPageTokenField () {
return this.requestPageTokenField(true);
}
public APIRequestGetAgencyPages requestPageTokenField (boolean value) {
this.requestField("page_token", value);
return this;
}
public APIRequestGetAgencyPages requestParentPageField () {
return this.requestParentPageField(true);
}
public APIRequestGetAgencyPages requestParentPageField (boolean value) {
this.requestField("parent_page", value);
return this;
}
public APIRequestGetAgencyPages requestParkingField () {
return this.requestParkingField(true);
}
public APIRequestGetAgencyPages requestParkingField (boolean value) {
this.requestField("parking", value);
return this;
}
public APIRequestGetAgencyPages requestPaymentOptionsField () {
return this.requestPaymentOptionsField(true);
}
public APIRequestGetAgencyPages requestPaymentOptionsField (boolean value) {
this.requestField("payment_options", value);
return this;
}
public APIRequestGetAgencyPages requestPersonalInfoField () {
return this.requestPersonalInfoField(true);
}
public APIRequestGetAgencyPages requestPersonalInfoField (boolean value) {
this.requestField("personal_info", value);
return this;
}
public APIRequestGetAgencyPages requestPersonalInterestsField () {
return this.requestPersonalInterestsField(true);
}
public APIRequestGetAgencyPages requestPersonalInterestsField (boolean value) {
this.requestField("personal_interests", value);
return this;
}
public APIRequestGetAgencyPages requestPharmaSafetyInfoField () {
return this.requestPharmaSafetyInfoField(true);
}
public APIRequestGetAgencyPages requestPharmaSafetyInfoField (boolean value) {
this.requestField("pharma_safety_info", value);
return this;
}
public APIRequestGetAgencyPages requestPhoneField () {
return this.requestPhoneField(true);
}
public APIRequestGetAgencyPages requestPhoneField (boolean value) {
this.requestField("phone", value);
return this;
}
public APIRequestGetAgencyPages requestPlaceTypeField () {
return this.requestPlaceTypeField(true);
}
public APIRequestGetAgencyPages requestPlaceTypeField (boolean value) {
this.requestField("place_type", value);
return this;
}
public APIRequestGetAgencyPages requestPlotOutlineField () {
return this.requestPlotOutlineField(true);
}
public APIRequestGetAgencyPages requestPlotOutlineField (boolean value) {
this.requestField("plot_outline", value);
return this;
}
public APIRequestGetAgencyPages requestPreferredAudienceField () {
return this.requestPreferredAudienceField(true);
}
public APIRequestGetAgencyPages requestPreferredAudienceField (boolean value) {
this.requestField("preferred_audience", value);
return this;
}
public APIRequestGetAgencyPages requestPressContactField () {
return this.requestPressContactField(true);
}
public APIRequestGetAgencyPages requestPressContactField (boolean value) {
this.requestField("press_contact", value);
return this;
}
public APIRequestGetAgencyPages requestPriceRangeField () {
return this.requestPriceRangeField(true);
}
public APIRequestGetAgencyPages requestPriceRangeField (boolean value) {
this.requestField("price_range", value);
return this;
}
public APIRequestGetAgencyPages requestPrivacyInfoUrlField () {
return this.requestPrivacyInfoUrlField(true);
}
public APIRequestGetAgencyPages requestPrivacyInfoUrlField (boolean value) {
this.requestField("privacy_info_url", value);
return this;
}
public APIRequestGetAgencyPages requestProducedByField () {
return this.requestProducedByField(true);
}
public APIRequestGetAgencyPages requestProducedByField (boolean value) {
this.requestField("produced_by", value);
return this;
}
public APIRequestGetAgencyPages requestProductsField () {
return this.requestProductsField(true);
}
public APIRequestGetAgencyPages requestProductsField (boolean value) {
this.requestField("products", value);
return this;
}
public APIRequestGetAgencyPages requestPromotionEligibleField () {
return this.requestPromotionEligibleField(true);
}
public APIRequestGetAgencyPages requestPromotionEligibleField (boolean value) {
this.requestField("promotion_eligible", value);
return this;
}
public APIRequestGetAgencyPages requestPromotionIneligibleReasonField () {
return this.requestPromotionIneligibleReasonField(true);
}
public APIRequestGetAgencyPages requestPromotionIneligibleReasonField (boolean value) {
this.requestField("promotion_ineligible_reason", value);
return this;
}
public APIRequestGetAgencyPages requestPublicTransitField () {
return this.requestPublicTransitField(true);
}
public APIRequestGetAgencyPages requestPublicTransitField (boolean value) {
this.requestField("public_transit", value);
return this;
}
public APIRequestGetAgencyPages requestRatingCountField () {
return this.requestRatingCountField(true);
}
public APIRequestGetAgencyPages requestRatingCountField (boolean value) {
this.requestField("rating_count", value);
return this;
}
public APIRequestGetAgencyPages requestRecipientField () {
return this.requestRecipientField(true);
}
public APIRequestGetAgencyPages requestRecipientField (boolean value) {
this.requestField("recipient", value);
return this;
}
public APIRequestGetAgencyPages requestRecordLabelField () {
return this.requestRecordLabelField(true);
}
public APIRequestGetAgencyPages requestRecordLabelField (boolean value) {
this.requestField("record_label", value);
return this;
}
public APIRequestGetAgencyPages requestReleaseDateField () {
return this.requestReleaseDateField(true);
}
public APIRequestGetAgencyPages requestReleaseDateField (boolean value) {
this.requestField("release_date", value);
return this;
}
public APIRequestGetAgencyPages requestRestaurantServicesField () {
return this.requestRestaurantServicesField(true);
}
public APIRequestGetAgencyPages requestRestaurantServicesField (boolean value) {
this.requestField("restaurant_services", value);
return this;
}
public APIRequestGetAgencyPages requestRestaurantSpecialtiesField () {
return this.requestRestaurantSpecialtiesField(true);
}
public APIRequestGetAgencyPages requestRestaurantSpecialtiesField (boolean value) {
this.requestField("restaurant_specialties", value);
return this;
}
public APIRequestGetAgencyPages requestScheduleField () {
return this.requestScheduleField(true);
}
public APIRequestGetAgencyPages requestScheduleField (boolean value) {
this.requestField("schedule", value);
return this;
}
public APIRequestGetAgencyPages requestScreenplayByField () {
return this.requestScreenplayByField(true);
}
public APIRequestGetAgencyPages requestScreenplayByField (boolean value) {
this.requestField("screenplay_by", value);
return this;
}
public APIRequestGetAgencyPages requestSeasonField () {
return this.requestSeasonField(true);
}
public APIRequestGetAgencyPages requestSeasonField (boolean value) {
this.requestField("season", value);
return this;
}
public APIRequestGetAgencyPages requestSingleLineAddressField () {
return this.requestSingleLineAddressField(true);
}
public APIRequestGetAgencyPages requestSingleLineAddressField (boolean value) {
this.requestField("single_line_address", value);
return this;
}
public APIRequestGetAgencyPages requestStarringField () {
return this.requestStarringField(true);
}
public APIRequestGetAgencyPages requestStarringField (boolean value) {
this.requestField("starring", value);
return this;
}
public APIRequestGetAgencyPages requestStartInfoField () {
return this.requestStartInfoField(true);
}
public APIRequestGetAgencyPages requestStartInfoField (boolean value) {
this.requestField("start_info", value);
return this;
}
public APIRequestGetAgencyPages requestStoreCodeField () {
return this.requestStoreCodeField(true);
}
public APIRequestGetAgencyPages requestStoreCodeField (boolean value) {
this.requestField("store_code", value);
return this;
}
public APIRequestGetAgencyPages requestStoreLocationDescriptorField () {
return this.requestStoreLocationDescriptorField(true);
}
public APIRequestGetAgencyPages requestStoreLocationDescriptorField (boolean value) {
this.requestField("store_location_descriptor", value);
return this;
}
public APIRequestGetAgencyPages requestStoreNumberField () {
return this.requestStoreNumberField(true);
}
public APIRequestGetAgencyPages requestStoreNumberField (boolean value) {
this.requestField("store_number", value);
return this;
}
public APIRequestGetAgencyPages requestStudioField () {
return this.requestStudioField(true);
}
public APIRequestGetAgencyPages requestStudioField (boolean value) {
this.requestField("studio", value);
return this;
}
public APIRequestGetAgencyPages requestSupportsInstantArticlesField () {
return this.requestSupportsInstantArticlesField(true);
}
public APIRequestGetAgencyPages requestSupportsInstantArticlesField (boolean value) {
this.requestField("supports_instant_articles", value);
return this;
}
public APIRequestGetAgencyPages requestTalkingAboutCountField () {
return this.requestTalkingAboutCountField(true);
}
public APIRequestGetAgencyPages requestTalkingAboutCountField (boolean value) {
this.requestField("talking_about_count", value);
return this;
}
public APIRequestGetAgencyPages requestUnreadMessageCountField () {
return this.requestUnreadMessageCountField(true);
}
public APIRequestGetAgencyPages requestUnreadMessageCountField (boolean value) {
this.requestField("unread_message_count", value);
return this;
}
public APIRequestGetAgencyPages requestUnreadNotifCountField () {
return this.requestUnreadNotifCountField(true);
}
public APIRequestGetAgencyPages requestUnreadNotifCountField (boolean value) {
this.requestField("unread_notif_count", value);
return this;
}
public APIRequestGetAgencyPages requestUnseenMessageCountField () {
return this.requestUnseenMessageCountField(true);
}
public APIRequestGetAgencyPages requestUnseenMessageCountField (boolean value) {
this.requestField("unseen_message_count", value);
return this;
}
public APIRequestGetAgencyPages requestUsernameField () {
return this.requestUsernameField(true);
}
public APIRequestGetAgencyPages requestUsernameField (boolean value) {
this.requestField("username", value);
return this;
}
public APIRequestGetAgencyPages requestVerificationStatusField () {
return this.requestVerificationStatusField(true);
}
public APIRequestGetAgencyPages requestVerificationStatusField (boolean value) {
this.requestField("verification_status", value);
return this;
}
public APIRequestGetAgencyPages requestVoipInfoField () {
return this.requestVoipInfoField(true);
}
public APIRequestGetAgencyPages requestVoipInfoField (boolean value) {
this.requestField("voip_info", value);
return this;
}
public APIRequestGetAgencyPages requestWebsiteField () {
return this.requestWebsiteField(true);
}
public APIRequestGetAgencyPages requestWebsiteField (boolean value) {
this.requestField("website", value);
return this;
}
public APIRequestGetAgencyPages requestWereHereCountField () {
return this.requestWereHereCountField(true);
}
public APIRequestGetAgencyPages requestWereHereCountField (boolean value) {
this.requestField("were_here_count", value);
return this;
}
public APIRequestGetAgencyPages requestWhatsappNumberField () {
return this.requestWhatsappNumberField(true);
}
public APIRequestGetAgencyPages requestWhatsappNumberField (boolean value) {
this.requestField("whatsapp_number", value);
return this;
}
public APIRequestGetAgencyPages requestWrittenByField () {
return this.requestWrittenByField(true);
}
public APIRequestGetAgencyPages requestWrittenByField (boolean value) {
this.requestField("written_by", value);
return this;
}
}
public static class APIRequestDeleteApps extends APIRequest {
APINodeList