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.Application Maven / Gradle / Ivy
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.facebook.ads.sdk;
import java.io.File;
import java.lang.reflect.Modifier;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.common.base.Function;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.SettableFuture;
import com.google.gson.JsonObject;
import com.google.gson.JsonArray;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import com.facebook.ads.sdk.APIException.MalformedResponseException;
/**
* This class is auto-generated.
*
* For any issues or feature requests related to this class, please let us know
* on github and we'll fix in our codegen framework. We'll not be able to accept
* pull request for this class.
*
*/
public class Application extends APINode {
@SerializedName("aam_rules")
private String mAamRules = null;
@SerializedName("an_ad_space_limit")
private Long mAnAdSpaceLimit = null;
@SerializedName("an_platforms")
private List mAnPlatforms = null;
@SerializedName("android_key_hash")
private List mAndroidKeyHash = null;
@SerializedName("android_sdk_error_categories")
private List mAndroidSdkErrorCategories = null;
@SerializedName("app_domains")
private List mAppDomains = null;
@SerializedName("app_events_config")
private Object mAppEventsConfig = null;
@SerializedName("app_events_feature_bitmask")
private Long mAppEventsFeatureBitmask = null;
@SerializedName("app_events_session_timeout")
private Long mAppEventsSessionTimeout = null;
@SerializedName("app_install_tracked")
private Boolean mAppInstallTracked = null;
@SerializedName("app_name")
private String mAppName = null;
@SerializedName("app_signals_binding_ios")
private List mAppSignalsBindingIos = null;
@SerializedName("app_type")
private Long mAppType = null;
@SerializedName("auth_dialog_data_help_url")
private String mAuthDialogDataHelpUrl = null;
@SerializedName("auth_dialog_headline")
private String mAuthDialogHeadline = null;
@SerializedName("auth_dialog_perms_explanation")
private String mAuthDialogPermsExplanation = null;
@SerializedName("auth_referral_default_activity_privacy")
private String mAuthReferralDefaultActivityPrivacy = null;
@SerializedName("auth_referral_enabled")
private Long mAuthReferralEnabled = null;
@SerializedName("auth_referral_extended_perms")
private List mAuthReferralExtendedPerms = null;
@SerializedName("auth_referral_friend_perms")
private List mAuthReferralFriendPerms = null;
@SerializedName("auth_referral_response_type")
private String mAuthReferralResponseType = null;
@SerializedName("auth_referral_user_perms")
private List mAuthReferralUserPerms = null;
@SerializedName("auto_event_mapping_android")
private List mAutoEventMappingAndroid = null;
@SerializedName("auto_event_mapping_ios")
private List mAutoEventMappingIos = null;
@SerializedName("auto_event_setup_enabled")
private Boolean mAutoEventSetupEnabled = null;
@SerializedName("auto_log_app_events_default")
private Boolean mAutoLogAppEventsDefault = null;
@SerializedName("auto_log_app_events_enabled")
private Boolean mAutoLogAppEventsEnabled = null;
@SerializedName("business")
private Business mBusiness = null;
@SerializedName("canvas_fluid_height")
private Boolean mCanvasFluidHeight = null;
@SerializedName("canvas_fluid_width")
private Long mCanvasFluidWidth = null;
@SerializedName("canvas_url")
private String mCanvasUrl = null;
@SerializedName("category")
private String mCategory = null;
@SerializedName("client_config")
private Map mClientConfig = null;
@SerializedName("company")
private String mCompany = null;
@SerializedName("configured_ios_sso")
private Boolean mConfiguredIosSso = null;
@SerializedName("contact_email")
private String mContactEmail = null;
@SerializedName("created_time")
private String mCreatedTime = null;
@SerializedName("creator_uid")
private String mCreatorUid = null;
@SerializedName("daily_active_users")
private String mDailyActiveUsers = null;
@SerializedName("daily_active_users_rank")
private Long mDailyActiveUsersRank = null;
@SerializedName("deauth_callback_url")
private String mDeauthCallbackUrl = null;
@SerializedName("default_share_mode")
private String mDefaultShareMode = null;
@SerializedName("description")
private String mDescription = null;
@SerializedName("enigma_config")
private Object mEnigmaConfig = null;
@SerializedName("financial_id")
private String mFinancialId = null;
@SerializedName("gdpv4_chrome_custom_tabs_enabled")
private Boolean mGdpv4ChromeCustomTabsEnabled = null;
@SerializedName("gdpv4_enabled")
private Boolean mGdpv4Enabled = null;
@SerializedName("gdpv4_nux_content")
private String mGdpv4NuxContent = null;
@SerializedName("gdpv4_nux_enabled")
private Boolean mGdpv4NuxEnabled = null;
@SerializedName("has_messenger_product")
private Boolean mHasMessengerProduct = null;
@SerializedName("hosting_url")
private String mHostingUrl = null;
@SerializedName("icon_url")
private String mIconUrl = null;
@SerializedName("id")
private String mId = null;
@SerializedName("ios_bundle_id")
private List mIosBundleId = null;
@SerializedName("ios_sdk_dialog_flows")
private Object mIosSdkDialogFlows = null;
@SerializedName("ios_sdk_error_categories")
private List mIosSdkErrorCategories = null;
@SerializedName("ios_sfvc_attr")
private Boolean mIosSfvcAttr = null;
@SerializedName("ios_supports_native_proxy_auth_flow")
private Boolean mIosSupportsNativeProxyAuthFlow = null;
@SerializedName("ios_supports_system_auth")
private Boolean mIosSupportsSystemAuth = null;
@SerializedName("ipad_app_store_id")
private String mIpadAppStoreId = null;
@SerializedName("iphone_app_store_id")
private String mIphoneAppStoreId = null;
@SerializedName("latest_sdk_version")
private Object mLatestSdkVersion = null;
@SerializedName("link")
private String mLink = null;
@SerializedName("logging_token")
private String mLoggingToken = null;
@SerializedName("logo_url")
private String mLogoUrl = null;
@SerializedName("migrations")
private Map mMigrations = null;
@SerializedName("mobile_profile_section_url")
private String mMobileProfileSectionUrl = null;
@SerializedName("mobile_web_url")
private String mMobileWebUrl = null;
@SerializedName("monthly_active_users")
private String mMonthlyActiveUsers = null;
@SerializedName("monthly_active_users_rank")
private Long mMonthlyActiveUsersRank = null;
@SerializedName("name")
private String mName = null;
@SerializedName("namespace")
private String mNamespace = null;
@SerializedName("object_store_urls")
private Object mObjectStoreUrls = null;
@SerializedName("owner_business")
private Business mOwnerBusiness = null;
@SerializedName("page_tab_default_name")
private String mPageTabDefaultName = null;
@SerializedName("page_tab_url")
private String mPageTabUrl = null;
@SerializedName("photo_url")
private String mPhotoUrl = null;
@SerializedName("privacy_policy_url")
private String mPrivacyPolicyUrl = null;
@SerializedName("profile_section_url")
private String mProfileSectionUrl = null;
@SerializedName("property_id")
private String mPropertyId = null;
@SerializedName("protected_mode_rules")
private Object mProtectedModeRules = null;
@SerializedName("real_time_mode_devices")
private List mRealTimeModeDevices = null;
@SerializedName("restrictions")
private Object mRestrictions = null;
@SerializedName("restrictive_data_filter_params")
private String mRestrictiveDataFilterParams = null;
@SerializedName("restrictive_data_filter_rules")
private String mRestrictiveDataFilterRules = null;
@SerializedName("sdk_update_message")
private String mSdkUpdateMessage = null;
@SerializedName("seamless_login")
private Long mSeamlessLogin = null;
@SerializedName("secure_canvas_url")
private String mSecureCanvasUrl = null;
@SerializedName("secure_page_tab_url")
private String mSecurePageTabUrl = null;
@SerializedName("server_ip_whitelist")
private String mServerIpWhitelist = null;
@SerializedName("smart_login_bookmark_icon_url")
private String mSmartLoginBookmarkIconUrl = null;
@SerializedName("smart_login_menu_icon_url")
private String mSmartLoginMenuIconUrl = null;
@SerializedName("social_discovery")
private Long mSocialDiscovery = null;
@SerializedName("subcategory")
private String mSubcategory = null;
@SerializedName("suggested_events_setting")
private String mSuggestedEventsSetting = null;
@SerializedName("supported_platforms")
private List mSupportedPlatforms = null;
@SerializedName("supports_apprequests_fast_app_switch")
private Object mSupportsApprequestsFastAppSwitch = null;
@SerializedName("supports_attribution")
private Boolean mSupportsAttribution = null;
@SerializedName("supports_implicit_sdk_logging")
private Boolean mSupportsImplicitSdkLogging = null;
@SerializedName("suppress_native_ios_gdp")
private Boolean mSuppressNativeIosGdp = null;
@SerializedName("terms_of_service_url")
private String mTermsOfServiceUrl = null;
@SerializedName("url_scheme_suffix")
private String mUrlSchemeSuffix = null;
@SerializedName("user_support_email")
private String mUserSupportEmail = null;
@SerializedName("user_support_url")
private String mUserSupportUrl = null;
@SerializedName("website_url")
private String mWebsiteUrl = null;
@SerializedName("weekly_active_users")
private String mWeeklyActiveUsers = null;
protected static Gson gson = null;
Application() {
}
public Application(Long id, APIContext context) {
this(id.toString(), context);
}
public Application(String id, APIContext context) {
this.mId = id;
this.context = context;
}
public Application fetch() throws APIException{
Application newInstance = fetchById(this.getPrefixedId().toString(), this.context);
this.copyFrom(newInstance);
return this;
}
public static Application 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 Application 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", Application.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", Application.getParser())
.setParam("ids", APIRequest.joinStringList(ids))
.requestFields(fields)
.executeAsyncBase();
}
private String getPrefixedId() {
return getId();
}
public String getId() {
return getFieldId().toString();
}
public static Application loadJSON(String json, APIContext context, String header) {
Application application = getGson().fromJson(json, Application.class);
if (context.isDebug()) {
JsonParser parser = new JsonParser();
JsonElement o1 = parser.parse(json);
JsonElement o2 = parser.parse(application.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);
}
}
application.context = context;
application.rawValue = json;
application.header = header;
return application;
}
public static APINodeList parseResponse(String json, APIContext context, APIRequest request, String header) throws MalformedResponseException {
APINodeList applications = 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++) {
applications.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header));
};
return applications;
} 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;
applications.setCursors(before, after);
}
String previous = paging.has("previous") ? paging.get("previous").getAsString() : null;
String next = paging.has("next") ? paging.get("next").getAsString() : null;
applications.setPaging(previous, next);
if (context.hasAppSecret()) {
applications.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++) {
applications.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()) {
applications.add(loadJSON(entry.getValue().toString(), context, header));
}
break;
}
}
if (!isRedownload) {
applications.add(loadJSON(obj.toString(), context, header));
}
}
return applications;
} 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()) {
applications.add(loadJSON(entry.getValue().toString(), context, header));
}
return applications;
} 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)
) {
applications.add(loadJSON(value.toString(), context, header));
} else {
isIdIndexedArray = false;
break;
}
}
if (isIdIndexedArray) {
return applications;
}
// Sixth, check if it's pure JsonObject
applications.clear();
applications.add(loadJSON(json, context, header));
return applications;
}
}
} 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 APIRequestDeleteAccounts deleteAccounts() {
return new APIRequestDeleteAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetAccounts getAccounts() {
return new APIRequestGetAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAccount createAccount() {
return new APIRequestCreateAccount(this.getPrefixedId().toString(), context);
}
public APIRequestCreateActivity createActivity() {
return new APIRequestCreateActivity(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdPlacementGroups getAdPlacementGroups() {
return new APIRequestGetAdPlacementGroups(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdNetworkPlacements getAdNetworkPlacements() {
return new APIRequestGetAdNetworkPlacements(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 APIRequestGetAemAttribution getAemAttribution() {
return new APIRequestGetAemAttribution(this.getPrefixedId().toString(), context);
}
public APIRequestGetAemConversionConfigs getAemConversionConfigs() {
return new APIRequestGetAemConversionConfigs(this.getPrefixedId().toString(), context);
}
public APIRequestGetAemConversionFilter getAemConversionFilter() {
return new APIRequestGetAemConversionFilter(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAemConversion createAemConversion() {
return new APIRequestCreateAemConversion(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAemSkanReadiness createAemSkanReadiness() {
return new APIRequestCreateAemSkanReadiness(this.getPrefixedId().toString(), context);
}
public APIRequestGetAgencies getAgencies() {
return new APIRequestGetAgencies(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAggregateRevenue createAggregateRevenue() {
return new APIRequestCreateAggregateRevenue(this.getPrefixedId().toString(), context);
}
public APIRequestGetAndroidDialogConfigs getAndroidDialogConfigs() {
return new APIRequestGetAndroidDialogConfigs(this.getPrefixedId().toString(), context);
}
public APIRequestGetAppCapiSettings getAppCapiSettings() {
return new APIRequestGetAppCapiSettings(this.getPrefixedId().toString(), context);
}
public APIRequestGetAppEventTypes getAppEventTypes() {
return new APIRequestGetAppEventTypes(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAppIndexing createAppIndexing() {
return new APIRequestCreateAppIndexing(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAppIndexingSession createAppIndexingSession() {
return new APIRequestCreateAppIndexingSession(this.getPrefixedId().toString(), context);
}
public APIRequestGetAppInstalledGroups getAppInstalledGroups() {
return new APIRequestGetAppInstalledGroups(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAppPushDeviceToken createAppPushDeviceToken() {
return new APIRequestCreateAppPushDeviceToken(this.getPrefixedId().toString(), context);
}
public APIRequestGetAppAssets getAppAssets() {
return new APIRequestGetAppAssets(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAsset createAsset() {
return new APIRequestCreateAsset(this.getPrefixedId().toString(), context);
}
public APIRequestGetAuthorizedAdAccounts getAuthorizedAdAccounts() {
return new APIRequestGetAuthorizedAdAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetButtonAutoDetectionDeviceSelection getButtonAutoDetectionDeviceSelection() {
return new APIRequestGetButtonAutoDetectionDeviceSelection(this.getPrefixedId().toString(), context);
}
public APIRequestGetCloudbridgeSettings getCloudbridgeSettings() {
return new APIRequestGetCloudbridgeSettings(this.getPrefixedId().toString(), context);
}
public APIRequestCreateCodelessEventMapping createCodelessEventMapping() {
return new APIRequestCreateCodelessEventMapping(this.getPrefixedId().toString(), context);
}
public APIRequestGetConnectedClientBusinesses getConnectedClientBusinesses() {
return new APIRequestGetConnectedClientBusinesses(this.getPrefixedId().toString(), context);
}
public APIRequestGetDaChecks getDaChecks() {
return new APIRequestGetDaChecks(this.getPrefixedId().toString(), context);
}
public APIRequestCreateDomainReport createDomainReport() {
return new APIRequestCreateDomainReport(this.getPrefixedId().toString(), context);
}
public APIRequestGetIapPurchases getIapPurchases() {
return new APIRequestGetIapPurchases(this.getPrefixedId().toString(), context);
}
public APIRequestGetIosDialogConfigs getIosDialogConfigs() {
return new APIRequestGetIosDialogConfigs(this.getPrefixedId().toString(), context);
}
public APIRequestGetLinkedDataset getLinkedDataset() {
return new APIRequestGetLinkedDataset(this.getPrefixedId().toString(), context);
}
public APIRequestGetMessageTemplates getMessageTemplates() {
return new APIRequestGetMessageTemplates(this.getPrefixedId().toString(), context);
}
public APIRequestCreateMmpAuditing createMmpAuditing() {
return new APIRequestCreateMmpAuditing(this.getPrefixedId().toString(), context);
}
public APIRequestGetMobileSdkGk getMobileSdkGk() {
return new APIRequestGetMobileSdkGk(this.getPrefixedId().toString(), context);
}
public APIRequestGetMonetizedDigitalStoreObjects getMonetizedDigitalStoreObjects() {
return new APIRequestGetMonetizedDigitalStoreObjects(this.getPrefixedId().toString(), context);
}
public APIRequestCreateMonetizedDigitalStoreObject createMonetizedDigitalStoreObject() {
return new APIRequestCreateMonetizedDigitalStoreObject(this.getPrefixedId().toString(), context);
}
public APIRequestGetObjectTypes getObjectTypes() {
return new APIRequestGetObjectTypes(this.getPrefixedId().toString(), context);
}
public APIRequestGetObjects getObjects() {
return new APIRequestGetObjects(this.getPrefixedId().toString(), context);
}
public APIRequestCreateOccludesPopup createOccludesPopup() {
return new APIRequestCreateOccludesPopup(this.getPrefixedId().toString(), context);
}
public APIRequestGetPermissions getPermissions() {
return new APIRequestGetPermissions(this.getPrefixedId().toString(), context);
}
public APIRequestGetProducts getProducts() {
return new APIRequestGetProducts(this.getPrefixedId().toString(), context);
}
public APIRequestGetPurchases getPurchases() {
return new APIRequestGetPurchases(this.getPrefixedId().toString(), context);
}
public APIRequestGetRoles getRoles() {
return new APIRequestGetRoles(this.getPrefixedId().toString(), context);
}
public APIRequestGetServerDomainInfos getServerDomainInfos() {
return new APIRequestGetServerDomainInfos(this.getPrefixedId().toString(), context);
}
public APIRequestGetSgwDatasetStatus getSgwDatasetStatus() {
return new APIRequestGetSgwDatasetStatus(this.getPrefixedId().toString(), context);
}
public APIRequestGetSgwInstallDeferralLink getSgwInstallDeferralLink() {
return new APIRequestGetSgwInstallDeferralLink(this.getPrefixedId().toString(), context);
}
public APIRequestGetSubscribedDomains getSubscribedDomains() {
return new APIRequestGetSubscribedDomains(this.getPrefixedId().toString(), context);
}
public APIRequestCreateSubscribedDomain createSubscribedDomain() {
return new APIRequestCreateSubscribedDomain(this.getPrefixedId().toString(), context);
}
public APIRequestGetSubscribedDomainsPhishing getSubscribedDomainsPhishing() {
return new APIRequestGetSubscribedDomainsPhishing(this.getPrefixedId().toString(), context);
}
public APIRequestCreateSubscribedDomainsPhishing createSubscribedDomainsPhishing() {
return new APIRequestCreateSubscribedDomainsPhishing(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteSubscriptions deleteSubscriptions() {
return new APIRequestDeleteSubscriptions(this.getPrefixedId().toString(), context);
}
public APIRequestGetSubscriptions getSubscriptions() {
return new APIRequestGetSubscriptions(this.getPrefixedId().toString(), context);
}
public APIRequestCreateSubscription createSubscription() {
return new APIRequestCreateSubscription(this.getPrefixedId().toString(), context);
}
public APIRequestCreateUpload createUpload() {
return new APIRequestCreateUpload(this.getPrefixedId().toString(), context);
}
public APIRequestCreateWhatsAppBusinessSolution createWhatsAppBusinessSolution() {
return new APIRequestCreateWhatsAppBusinessSolution(this.getPrefixedId().toString(), context);
}
public APIRequestGetWhatsAppBusinessSolutions getWhatsAppBusinessSolutions() {
return new APIRequestGetWhatsAppBusinessSolutions(this.getPrefixedId().toString(), context);
}
public APIRequestGet get() {
return new APIRequestGet(this.getPrefixedId().toString(), context);
}
public APIRequestUpdate update() {
return new APIRequestUpdate(this.getPrefixedId().toString(), context);
}
public String getFieldAamRules() {
return mAamRules;
}
public Long getFieldAnAdSpaceLimit() {
return mAnAdSpaceLimit;
}
public List getFieldAnPlatforms() {
return mAnPlatforms;
}
public List getFieldAndroidKeyHash() {
return mAndroidKeyHash;
}
public List getFieldAndroidSdkErrorCategories() {
return mAndroidSdkErrorCategories;
}
public List getFieldAppDomains() {
return mAppDomains;
}
public Object getFieldAppEventsConfig() {
return mAppEventsConfig;
}
public Long getFieldAppEventsFeatureBitmask() {
return mAppEventsFeatureBitmask;
}
public Long getFieldAppEventsSessionTimeout() {
return mAppEventsSessionTimeout;
}
public Boolean getFieldAppInstallTracked() {
return mAppInstallTracked;
}
public String getFieldAppName() {
return mAppName;
}
public List getFieldAppSignalsBindingIos() {
return mAppSignalsBindingIos;
}
public Long getFieldAppType() {
return mAppType;
}
public String getFieldAuthDialogDataHelpUrl() {
return mAuthDialogDataHelpUrl;
}
public String getFieldAuthDialogHeadline() {
return mAuthDialogHeadline;
}
public String getFieldAuthDialogPermsExplanation() {
return mAuthDialogPermsExplanation;
}
public String getFieldAuthReferralDefaultActivityPrivacy() {
return mAuthReferralDefaultActivityPrivacy;
}
public Long getFieldAuthReferralEnabled() {
return mAuthReferralEnabled;
}
public List getFieldAuthReferralExtendedPerms() {
return mAuthReferralExtendedPerms;
}
public List getFieldAuthReferralFriendPerms() {
return mAuthReferralFriendPerms;
}
public String getFieldAuthReferralResponseType() {
return mAuthReferralResponseType;
}
public List getFieldAuthReferralUserPerms() {
return mAuthReferralUserPerms;
}
public List getFieldAutoEventMappingAndroid() {
return mAutoEventMappingAndroid;
}
public List getFieldAutoEventMappingIos() {
return mAutoEventMappingIos;
}
public Boolean getFieldAutoEventSetupEnabled() {
return mAutoEventSetupEnabled;
}
public Boolean getFieldAutoLogAppEventsDefault() {
return mAutoLogAppEventsDefault;
}
public Boolean getFieldAutoLogAppEventsEnabled() {
return mAutoLogAppEventsEnabled;
}
public Business getFieldBusiness() {
if (mBusiness != null) {
mBusiness.context = getContext();
}
return mBusiness;
}
public Boolean getFieldCanvasFluidHeight() {
return mCanvasFluidHeight;
}
public Long getFieldCanvasFluidWidth() {
return mCanvasFluidWidth;
}
public String getFieldCanvasUrl() {
return mCanvasUrl;
}
public String getFieldCategory() {
return mCategory;
}
public Map getFieldClientConfig() {
return mClientConfig;
}
public String getFieldCompany() {
return mCompany;
}
public Boolean getFieldConfiguredIosSso() {
return mConfiguredIosSso;
}
public String getFieldContactEmail() {
return mContactEmail;
}
public String getFieldCreatedTime() {
return mCreatedTime;
}
public String getFieldCreatorUid() {
return mCreatorUid;
}
public String getFieldDailyActiveUsers() {
return mDailyActiveUsers;
}
public Long getFieldDailyActiveUsersRank() {
return mDailyActiveUsersRank;
}
public String getFieldDeauthCallbackUrl() {
return mDeauthCallbackUrl;
}
public String getFieldDefaultShareMode() {
return mDefaultShareMode;
}
public String getFieldDescription() {
return mDescription;
}
public Object getFieldEnigmaConfig() {
return mEnigmaConfig;
}
public String getFieldFinancialId() {
return mFinancialId;
}
public Boolean getFieldGdpv4ChromeCustomTabsEnabled() {
return mGdpv4ChromeCustomTabsEnabled;
}
public Boolean getFieldGdpv4Enabled() {
return mGdpv4Enabled;
}
public String getFieldGdpv4NuxContent() {
return mGdpv4NuxContent;
}
public Boolean getFieldGdpv4NuxEnabled() {
return mGdpv4NuxEnabled;
}
public Boolean getFieldHasMessengerProduct() {
return mHasMessengerProduct;
}
public String getFieldHostingUrl() {
return mHostingUrl;
}
public String getFieldIconUrl() {
return mIconUrl;
}
public String getFieldId() {
return mId;
}
public List getFieldIosBundleId() {
return mIosBundleId;
}
public Object getFieldIosSdkDialogFlows() {
return mIosSdkDialogFlows;
}
public List getFieldIosSdkErrorCategories() {
return mIosSdkErrorCategories;
}
public Boolean getFieldIosSfvcAttr() {
return mIosSfvcAttr;
}
public Boolean getFieldIosSupportsNativeProxyAuthFlow() {
return mIosSupportsNativeProxyAuthFlow;
}
public Boolean getFieldIosSupportsSystemAuth() {
return mIosSupportsSystemAuth;
}
public String getFieldIpadAppStoreId() {
return mIpadAppStoreId;
}
public String getFieldIphoneAppStoreId() {
return mIphoneAppStoreId;
}
public Object getFieldLatestSdkVersion() {
return mLatestSdkVersion;
}
public String getFieldLink() {
return mLink;
}
public String getFieldLoggingToken() {
return mLoggingToken;
}
public String getFieldLogoUrl() {
return mLogoUrl;
}
public Map getFieldMigrations() {
return mMigrations;
}
public String getFieldMobileProfileSectionUrl() {
return mMobileProfileSectionUrl;
}
public String getFieldMobileWebUrl() {
return mMobileWebUrl;
}
public String getFieldMonthlyActiveUsers() {
return mMonthlyActiveUsers;
}
public Long getFieldMonthlyActiveUsersRank() {
return mMonthlyActiveUsersRank;
}
public String getFieldName() {
return mName;
}
public String getFieldNamespace() {
return mNamespace;
}
public Object getFieldObjectStoreUrls() {
return mObjectStoreUrls;
}
public Business getFieldOwnerBusiness() {
if (mOwnerBusiness != null) {
mOwnerBusiness.context = getContext();
}
return mOwnerBusiness;
}
public String getFieldPageTabDefaultName() {
return mPageTabDefaultName;
}
public String getFieldPageTabUrl() {
return mPageTabUrl;
}
public String getFieldPhotoUrl() {
return mPhotoUrl;
}
public String getFieldPrivacyPolicyUrl() {
return mPrivacyPolicyUrl;
}
public String getFieldProfileSectionUrl() {
return mProfileSectionUrl;
}
public String getFieldPropertyId() {
return mPropertyId;
}
public Object getFieldProtectedModeRules() {
return mProtectedModeRules;
}
public List getFieldRealTimeModeDevices() {
return mRealTimeModeDevices;
}
public Object getFieldRestrictions() {
return mRestrictions;
}
public String getFieldRestrictiveDataFilterParams() {
return mRestrictiveDataFilterParams;
}
public String getFieldRestrictiveDataFilterRules() {
return mRestrictiveDataFilterRules;
}
public String getFieldSdkUpdateMessage() {
return mSdkUpdateMessage;
}
public Long getFieldSeamlessLogin() {
return mSeamlessLogin;
}
public String getFieldSecureCanvasUrl() {
return mSecureCanvasUrl;
}
public String getFieldSecurePageTabUrl() {
return mSecurePageTabUrl;
}
public String getFieldServerIpWhitelist() {
return mServerIpWhitelist;
}
public String getFieldSmartLoginBookmarkIconUrl() {
return mSmartLoginBookmarkIconUrl;
}
public String getFieldSmartLoginMenuIconUrl() {
return mSmartLoginMenuIconUrl;
}
public Long getFieldSocialDiscovery() {
return mSocialDiscovery;
}
public String getFieldSubcategory() {
return mSubcategory;
}
public String getFieldSuggestedEventsSetting() {
return mSuggestedEventsSetting;
}
public List getFieldSupportedPlatforms() {
return mSupportedPlatforms;
}
public Object getFieldSupportsApprequestsFastAppSwitch() {
return mSupportsApprequestsFastAppSwitch;
}
public Boolean getFieldSupportsAttribution() {
return mSupportsAttribution;
}
public Boolean getFieldSupportsImplicitSdkLogging() {
return mSupportsImplicitSdkLogging;
}
public Boolean getFieldSuppressNativeIosGdp() {
return mSuppressNativeIosGdp;
}
public String getFieldTermsOfServiceUrl() {
return mTermsOfServiceUrl;
}
public String getFieldUrlSchemeSuffix() {
return mUrlSchemeSuffix;
}
public String getFieldUserSupportEmail() {
return mUserSupportEmail;
}
public String getFieldUserSupportUrl() {
return mUserSupportUrl;
}
public String getFieldWebsiteUrl() {
return mWebsiteUrl;
}
public String getFieldWeeklyActiveUsers() {
return mWeeklyActiveUsers;
}
public static class APIRequestDeleteAccounts extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"type",
"uid",
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestDeleteAccounts.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestDeleteAccounts(String nodeId, APIContext context) {
super(context, nodeId, "/accounts", "DELETE", Arrays.asList(PARAMS));
}
@Override
public APIRequestDeleteAccounts setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestDeleteAccounts setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestDeleteAccounts setType (EnumType type) {
this.setParam("type", type);
return this;
}
public APIRequestDeleteAccounts setType (String type) {
this.setParam("type", type);
return this;
}
public APIRequestDeleteAccounts setUid (Long uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestDeleteAccounts setUid (String uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestDeleteAccounts requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestDeleteAccounts requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAccounts requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestDeleteAccounts requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAccounts requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestDeleteAccounts requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAccounts extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"type",
};
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 APIRequestGetAccounts.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestGetAccounts(String nodeId, APIContext context) {
super(context, nodeId, "/accounts", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAccounts setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAccounts setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAccounts setType (EnumType type) {
this.setParam("type", type);
return this;
}
public APIRequestGetAccounts setType (String type) {
this.setParam("type", type);
return this;
}
public APIRequestGetAccounts requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAccounts requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAccounts requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAccounts requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAccounts requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAccounts requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestCreateAccount extends APIRequest {
APINode lastResponse = null;
@Override
public APINode getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"installed",
"minor",
"name",
"owner_access_token",
"permissions",
"type",
"uid",
};
public static final String[] FIELDS = {
};
@Override
public APINode parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header).head();
}
@Override
public APINode execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINode execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public APINode apply(ResponseWrapper result) {
try {
return APIRequestCreateAccount.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestCreateAccount(String nodeId, APIContext context) {
super(context, nodeId, "/accounts", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAccount setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAccount setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAccount setInstalled (Boolean installed) {
this.setParam("installed", installed);
return this;
}
public APIRequestCreateAccount setInstalled (String installed) {
this.setParam("installed", installed);
return this;
}
public APIRequestCreateAccount setMinor (Boolean minor) {
this.setParam("minor", minor);
return this;
}
public APIRequestCreateAccount setMinor (String minor) {
this.setParam("minor", minor);
return this;
}
public APIRequestCreateAccount setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateAccount setOwnerAccessToken (String ownerAccessToken) {
this.setParam("owner_access_token", ownerAccessToken);
return this;
}
public APIRequestCreateAccount setPermissions (List permissions) {
this.setParam("permissions", permissions);
return this;
}
public APIRequestCreateAccount setPermissions (String permissions) {
this.setParam("permissions", permissions);
return this;
}
public APIRequestCreateAccount setType (EnumType type) {
this.setParam("type", type);
return this;
}
public APIRequestCreateAccount setType (String type) {
this.setParam("type", type);
return this;
}
public APIRequestCreateAccount setUid (Long uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestCreateAccount setUid (String uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestCreateAccount requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAccount requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAccount requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAccount requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAccount requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAccount requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestCreateActivity extends APIRequest {
APINode lastResponse = null;
@Override
public APINode getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"advertiser_id",
"advertiser_tracking_enabled",
"anon_id",
"app_user_id",
"application_tracking_enabled",
"attribution",
"attribution_referrer",
"attribution_sources",
"auto_publish",
"bundle_id",
"bundle_short_version",
"bundle_version",
"campaign_ids",
"click_id",
"consider_views",
"custom_events",
"custom_events_file",
"data_processing_options",
"data_processing_options_country",
"data_processing_options_state",
"device_token",
"event",
"event_id",
"extinfo",
"google_install_referrer",
"include_dwell_data",
"include_video_data",
"install_id",
"install_referrer",
"install_timestamp",
"installer_package",
"is_fb",
"limited_data_use",
"meta_install_referrer",
"migration_bundle",
"operational_parameters",
"page_id",
"page_scoped_user_id",
"receipt_data",
"sdk_version",
"ud",
"url_schemes",
"user_id",
"user_id_type",
"vendor_id",
"windows_attribution_id",
};
public static final String[] FIELDS = {
};
@Override
public APINode parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header).head();
}
@Override
public APINode execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINode execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public APINode apply(ResponseWrapper result) {
try {
return APIRequestCreateActivity.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestCreateActivity(String nodeId, APIContext context) {
super(context, nodeId, "/activities", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateActivity setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateActivity setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateActivity setAdvertiserId (String advertiserId) {
this.setParam("advertiser_id", advertiserId);
return this;
}
public APIRequestCreateActivity setAdvertiserTrackingEnabled (Boolean advertiserTrackingEnabled) {
this.setParam("advertiser_tracking_enabled", advertiserTrackingEnabled);
return this;
}
public APIRequestCreateActivity setAdvertiserTrackingEnabled (String advertiserTrackingEnabled) {
this.setParam("advertiser_tracking_enabled", advertiserTrackingEnabled);
return this;
}
public APIRequestCreateActivity setAnonId (String anonId) {
this.setParam("anon_id", anonId);
return this;
}
public APIRequestCreateActivity setAppUserId (String appUserId) {
this.setParam("app_user_id", appUserId);
return this;
}
public APIRequestCreateActivity setApplicationTrackingEnabled (Boolean applicationTrackingEnabled) {
this.setParam("application_tracking_enabled", applicationTrackingEnabled);
return this;
}
public APIRequestCreateActivity setApplicationTrackingEnabled (String applicationTrackingEnabled) {
this.setParam("application_tracking_enabled", applicationTrackingEnabled);
return this;
}
public APIRequestCreateActivity setAttribution (String attribution) {
this.setParam("attribution", attribution);
return this;
}
public APIRequestCreateActivity setAttributionReferrer (String attributionReferrer) {
this.setParam("attribution_referrer", attributionReferrer);
return this;
}
public APIRequestCreateActivity setAttributionSources (List> attributionSources) {
this.setParam("attribution_sources", attributionSources);
return this;
}
public APIRequestCreateActivity setAttributionSources (String attributionSources) {
this.setParam("attribution_sources", attributionSources);
return this;
}
public APIRequestCreateActivity setAutoPublish (Boolean autoPublish) {
this.setParam("auto_publish", autoPublish);
return this;
}
public APIRequestCreateActivity setAutoPublish (String autoPublish) {
this.setParam("auto_publish", autoPublish);
return this;
}
public APIRequestCreateActivity setBundleId (String bundleId) {
this.setParam("bundle_id", bundleId);
return this;
}
public APIRequestCreateActivity setBundleShortVersion (String bundleShortVersion) {
this.setParam("bundle_short_version", bundleShortVersion);
return this;
}
public APIRequestCreateActivity setBundleVersion (String bundleVersion) {
this.setParam("bundle_version", bundleVersion);
return this;
}
public APIRequestCreateActivity setCampaignIds (String campaignIds) {
this.setParam("campaign_ids", campaignIds);
return this;
}
public APIRequestCreateActivity setClickId (String clickId) {
this.setParam("click_id", clickId);
return this;
}
public APIRequestCreateActivity setConsiderViews (Boolean considerViews) {
this.setParam("consider_views", considerViews);
return this;
}
public APIRequestCreateActivity setConsiderViews (String considerViews) {
this.setParam("consider_views", considerViews);
return this;
}
public APIRequestCreateActivity setCustomEvents (List customEvents) {
this.setParam("custom_events", customEvents);
return this;
}
public APIRequestCreateActivity setCustomEvents (String customEvents) {
this.setParam("custom_events", customEvents);
return this;
}
public APIRequestCreateActivity setCustomEventsFile (File customEventsFile) {
this.setParam("custom_events_file", customEventsFile);
return this;
}
public APIRequestCreateActivity setCustomEventsFile (String customEventsFile) {
this.setParam("custom_events_file", customEventsFile);
return this;
}
public APIRequestCreateActivity setDataProcessingOptions (List dataProcessingOptions) {
this.setParam("data_processing_options", dataProcessingOptions);
return this;
}
public APIRequestCreateActivity setDataProcessingOptions (String dataProcessingOptions) {
this.setParam("data_processing_options", dataProcessingOptions);
return this;
}
public APIRequestCreateActivity setDataProcessingOptionsCountry (Long dataProcessingOptionsCountry) {
this.setParam("data_processing_options_country", dataProcessingOptionsCountry);
return this;
}
public APIRequestCreateActivity setDataProcessingOptionsCountry (String dataProcessingOptionsCountry) {
this.setParam("data_processing_options_country", dataProcessingOptionsCountry);
return this;
}
public APIRequestCreateActivity setDataProcessingOptionsState (Long dataProcessingOptionsState) {
this.setParam("data_processing_options_state", dataProcessingOptionsState);
return this;
}
public APIRequestCreateActivity setDataProcessingOptionsState (String dataProcessingOptionsState) {
this.setParam("data_processing_options_state", dataProcessingOptionsState);
return this;
}
public APIRequestCreateActivity setDeviceToken (String deviceToken) {
this.setParam("device_token", deviceToken);
return this;
}
public APIRequestCreateActivity setEvent (EnumEvent event) {
this.setParam("event", event);
return this;
}
public APIRequestCreateActivity setEvent (String event) {
this.setParam("event", event);
return this;
}
public APIRequestCreateActivity setEventId (String eventId) {
this.setParam("event_id", eventId);
return this;
}
public APIRequestCreateActivity setExtinfo (Object extinfo) {
this.setParam("extinfo", extinfo);
return this;
}
public APIRequestCreateActivity setExtinfo (String extinfo) {
this.setParam("extinfo", extinfo);
return this;
}
public APIRequestCreateActivity setGoogleInstallReferrer (String googleInstallReferrer) {
this.setParam("google_install_referrer", googleInstallReferrer);
return this;
}
public APIRequestCreateActivity setIncludeDwellData (Boolean includeDwellData) {
this.setParam("include_dwell_data", includeDwellData);
return this;
}
public APIRequestCreateActivity setIncludeDwellData (String includeDwellData) {
this.setParam("include_dwell_data", includeDwellData);
return this;
}
public APIRequestCreateActivity setIncludeVideoData (Boolean includeVideoData) {
this.setParam("include_video_data", includeVideoData);
return this;
}
public APIRequestCreateActivity setIncludeVideoData (String includeVideoData) {
this.setParam("include_video_data", includeVideoData);
return this;
}
public APIRequestCreateActivity setInstallId (String installId) {
this.setParam("install_id", installId);
return this;
}
public APIRequestCreateActivity setInstallReferrer (String installReferrer) {
this.setParam("install_referrer", installReferrer);
return this;
}
public APIRequestCreateActivity setInstallTimestamp (Long installTimestamp) {
this.setParam("install_timestamp", installTimestamp);
return this;
}
public APIRequestCreateActivity setInstallTimestamp (String installTimestamp) {
this.setParam("install_timestamp", installTimestamp);
return this;
}
public APIRequestCreateActivity setInstallerPackage (String installerPackage) {
this.setParam("installer_package", installerPackage);
return this;
}
public APIRequestCreateActivity setIsFb (Boolean isFb) {
this.setParam("is_fb", isFb);
return this;
}
public APIRequestCreateActivity setIsFb (String isFb) {
this.setParam("is_fb", isFb);
return this;
}
public APIRequestCreateActivity setLimitedDataUse (Boolean limitedDataUse) {
this.setParam("limited_data_use", limitedDataUse);
return this;
}
public APIRequestCreateActivity setLimitedDataUse (String limitedDataUse) {
this.setParam("limited_data_use", limitedDataUse);
return this;
}
public APIRequestCreateActivity setMetaInstallReferrer (String metaInstallReferrer) {
this.setParam("meta_install_referrer", metaInstallReferrer);
return this;
}
public APIRequestCreateActivity setMigrationBundle (String migrationBundle) {
this.setParam("migration_bundle", migrationBundle);
return this;
}
public APIRequestCreateActivity setOperationalParameters (List> operationalParameters) {
this.setParam("operational_parameters", operationalParameters);
return this;
}
public APIRequestCreateActivity setOperationalParameters (String operationalParameters) {
this.setParam("operational_parameters", operationalParameters);
return this;
}
public APIRequestCreateActivity setPageId (Long pageId) {
this.setParam("page_id", pageId);
return this;
}
public APIRequestCreateActivity setPageId (String pageId) {
this.setParam("page_id", pageId);
return this;
}
public APIRequestCreateActivity setPageScopedUserId (Long pageScopedUserId) {
this.setParam("page_scoped_user_id", pageScopedUserId);
return this;
}
public APIRequestCreateActivity setPageScopedUserId (String pageScopedUserId) {
this.setParam("page_scoped_user_id", pageScopedUserId);
return this;
}
public APIRequestCreateActivity setReceiptData (String receiptData) {
this.setParam("receipt_data", receiptData);
return this;
}
public APIRequestCreateActivity setSdkVersion (String sdkVersion) {
this.setParam("sdk_version", sdkVersion);
return this;
}
public APIRequestCreateActivity setUd (Map ud) {
this.setParam("ud", ud);
return this;
}
public APIRequestCreateActivity setUd (String ud) {
this.setParam("ud", ud);
return this;
}
public APIRequestCreateActivity setUrlSchemes (List urlSchemes) {
this.setParam("url_schemes", urlSchemes);
return this;
}
public APIRequestCreateActivity setUrlSchemes (String urlSchemes) {
this.setParam("url_schemes", urlSchemes);
return this;
}
public APIRequestCreateActivity setUserId (String userId) {
this.setParam("user_id", userId);
return this;
}
public APIRequestCreateActivity setUserIdType (EnumUserIdType userIdType) {
this.setParam("user_id_type", userIdType);
return this;
}
public APIRequestCreateActivity setUserIdType (String userIdType) {
this.setParam("user_id_type", userIdType);
return this;
}
public APIRequestCreateActivity setVendorId (String vendorId) {
this.setParam("vendor_id", vendorId);
return this;
}
public APIRequestCreateActivity setWindowsAttributionId (String windowsAttributionId) {
this.setParam("windows_attribution_id", windowsAttributionId);
return this;
}
public APIRequestCreateActivity requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateActivity requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateActivity requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateActivity requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateActivity requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateActivity requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAdPlacementGroups extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetAdPlacementGroups.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestGetAdPlacementGroups(String nodeId, APIContext context) {
super(context, nodeId, "/ad_placement_groups", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdPlacementGroups setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdPlacementGroups setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdPlacementGroups requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdPlacementGroups requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdPlacementGroups requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdPlacementGroups requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdPlacementGroups requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdPlacementGroups requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAdNetworkPlacements extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"request_id",
};
public static final String[] FIELDS = {
"bundle_id",
"display_format",
"external_placement_id",
"google_display_format",
"id",
"name",
"placement_group",
"platform",
"status",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return AdPlacement.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 APIRequestGetAdNetworkPlacements.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestGetAdNetworkPlacements(String nodeId, APIContext context) {
super(context, nodeId, "/adnetwork_placements", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdNetworkPlacements setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdNetworkPlacements setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdNetworkPlacements setRequestId (String requestId) {
this.setParam("request_id", requestId);
return this;
}
public APIRequestGetAdNetworkPlacements requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdNetworkPlacements requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdNetworkPlacements requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdNetworkPlacements requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdNetworkPlacements requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdNetworkPlacements requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdNetworkPlacements requestBundleIdField () {
return this.requestBundleIdField(true);
}
public APIRequestGetAdNetworkPlacements requestBundleIdField (boolean value) {
this.requestField("bundle_id", value);
return this;
}
public APIRequestGetAdNetworkPlacements requestDisplayFormatField () {
return this.requestDisplayFormatField(true);
}
public APIRequestGetAdNetworkPlacements requestDisplayFormatField (boolean value) {
this.requestField("display_format", value);
return this;
}
public APIRequestGetAdNetworkPlacements requestExternalPlacementIdField () {
return this.requestExternalPlacementIdField(true);
}
public APIRequestGetAdNetworkPlacements requestExternalPlacementIdField (boolean value) {
this.requestField("external_placement_id", value);
return this;
}
public APIRequestGetAdNetworkPlacements requestGoogleDisplayFormatField () {
return this.requestGoogleDisplayFormatField(true);
}
public APIRequestGetAdNetworkPlacements requestGoogleDisplayFormatField (boolean value) {
this.requestField("google_display_format", value);
return this;
}
public APIRequestGetAdNetworkPlacements requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdNetworkPlacements requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdNetworkPlacements requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAdNetworkPlacements requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAdNetworkPlacements requestPlacementGroupField () {
return this.requestPlacementGroupField(true);
}
public APIRequestGetAdNetworkPlacements requestPlacementGroupField (boolean value) {
this.requestField("placement_group", value);
return this;
}
public APIRequestGetAdNetworkPlacements requestPlatformField () {
return this.requestPlatformField(true);
}
public APIRequestGetAdNetworkPlacements requestPlatformField (boolean value) {
this.requestField("platform", value);
return this;
}
public APIRequestGetAdNetworkPlacements requestStatusField () {
return this.requestStatusField(true);
}
public APIRequestGetAdNetworkPlacements requestStatusField (boolean value) {
this.requestField("status", 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",
"should_include_until",
"since",
"until",
};
public static final String[] FIELDS = {
"omitted_results",
"query_id",
"results",
};
@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);
}
}
},
MoreExecutors.directExecutor()
);
};
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 (AdNetworkAnalyticsSyncQueryResult.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 (AdNetworkAnalyticsSyncQueryResult.EnumOrderingColumn orderingColumn) {
this.setParam("ordering_column", orderingColumn);
return this;
}
public APIRequestGetAdNetworkAnalytics setOrderingColumn (String orderingColumn) {
this.setParam("ordering_column", orderingColumn);
return this;
}
public APIRequestGetAdNetworkAnalytics setOrderingType (AdNetworkAnalyticsSyncQueryResult.EnumOrderingType orderingType) {
this.setParam("ordering_type", orderingType);
return this;
}
public APIRequestGetAdNetworkAnalytics setOrderingType (String orderingType) {
this.setParam("ordering_type", orderingType);
return this;
}
public APIRequestGetAdNetworkAnalytics setShouldIncludeUntil (Boolean shouldIncludeUntil) {
this.setParam("should_include_until", shouldIncludeUntil);
return this;
}
public APIRequestGetAdNetworkAnalytics setShouldIncludeUntil (String shouldIncludeUntil) {
this.setParam("should_include_until", shouldIncludeUntil);
return this;
}
public APIRequestGetAdNetworkAnalytics setSince (String since) {
this.setParam("since", since);
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 requestOmittedResultsField () {
return this.requestOmittedResultsField(true);
}
public APIRequestGetAdNetworkAnalytics requestOmittedResultsField (boolean value) {
this.requestField("omitted_results", 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 static class APIRequestCreateAdNetworkAnalytic extends APIRequest {
Application lastResponse = null;
@Override
public Application 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 = {
};
@Override
public Application parseResponse(String response, String header) throws APIException {
return Application.parseResponse(response, getContext(), this, header).head();
}
@Override
public Application execute() throws APIException {
return execute(new HashMap());
}
@Override
public Application 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 Application apply(ResponseWrapper result) {
try {
return APIRequestCreateAdNetworkAnalytic.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
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 (AdNetworkAnalyticsSyncQueryResult.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 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 setMetrics (List metrics) {
this.setParam("metrics", metrics);
return this;
}
public APIRequestCreateAdNetworkAnalytic setMetrics (String metrics) {
this.setParam("metrics", metrics);
return this;
}
public APIRequestCreateAdNetworkAnalytic setOrderingColumn (AdNetworkAnalyticsSyncQueryResult.EnumOrderingColumn orderingColumn) {
this.setParam("ordering_column", orderingColumn);
return this;
}
public APIRequestCreateAdNetworkAnalytic setOrderingColumn (String orderingColumn) {
this.setParam("ordering_column", orderingColumn);
return this;
}
public APIRequestCreateAdNetworkAnalytic setOrderingType (AdNetworkAnalyticsSyncQueryResult.EnumOrderingType orderingType) {
this.setParam("ordering_type", orderingType);
return this;
}
public APIRequestCreateAdNetworkAnalytic setOrderingType (String orderingType) {
this.setParam("ordering_type", orderingType);
return this;
}
public APIRequestCreateAdNetworkAnalytic setSince (String since) {
this.setParam("since", since);
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",
"omitted_results",
"query_id",
"results",
"status",
};
@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);
}
}
},
MoreExecutors.directExecutor()
);
};
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 requestOmittedResultsField () {
return this.requestOmittedResultsField(true);
}
public APIRequestGetAdNetworkAnalyticsResults requestOmittedResultsField (boolean value) {
this.requestField("omitted_results", 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 static class APIRequestGetAemAttribution extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"advertiser_ids",
"fb_content_data",
};
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 APIRequestGetAemAttribution.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestGetAemAttribution(String nodeId, APIContext context) {
super(context, nodeId, "/aem_attribution", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAemAttribution setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAemAttribution setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAemAttribution setAdvertiserIds (List advertiserIds) {
this.setParam("advertiser_ids", advertiserIds);
return this;
}
public APIRequestGetAemAttribution setAdvertiserIds (String advertiserIds) {
this.setParam("advertiser_ids", advertiserIds);
return this;
}
public APIRequestGetAemAttribution setFbContentData (String fbContentData) {
this.setParam("fb_content_data", fbContentData);
return this;
}
public APIRequestGetAemAttribution requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAemAttribution requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAemAttribution requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAemAttribution requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAemAttribution requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAemAttribution requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAemConversionConfigs extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"advertiser_ids",
};
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 APIRequestGetAemConversionConfigs.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestGetAemConversionConfigs(String nodeId, APIContext context) {
super(context, nodeId, "/aem_conversion_configs", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAemConversionConfigs setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAemConversionConfigs setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAemConversionConfigs setAdvertiserIds (List advertiserIds) {
this.setParam("advertiser_ids", advertiserIds);
return this;
}
public APIRequestGetAemConversionConfigs setAdvertiserIds (String advertiserIds) {
this.setParam("advertiser_ids", advertiserIds);
return this;
}
public APIRequestGetAemConversionConfigs requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAemConversionConfigs requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAemConversionConfigs requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAemConversionConfigs requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAemConversionConfigs requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAemConversionConfigs requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAemConversionFilter extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"catalog_id",
"fb_content_ids",
};
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 APIRequestGetAemConversionFilter.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};
public APIRequestGetAemConversionFilter(String nodeId, APIContext context) {
super(context, nodeId, "/aem_conversion_filter", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAemConversionFilter setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAemConversionFilter setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAemConversionFilter setCatalogId (String catalogId) {
this.setParam("catalog_id", catalogId);
return this;
}
public APIRequestGetAemConversionFilter setFbContentIds (String fbContentIds) {
this.setParam("fb_content_ids", fbContentIds);
return this;
}
public APIRequestGetAemConversionFilter requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAemConversionFilter requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAemConversionFilter requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAemConversionFilter requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAemConversionFilter requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAemConversionFilter requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestCreateAemConversion extends APIRequest {
APINode lastResponse = null;
@Override
public APINode getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"aem_conversions",
};
public static final String[] FIELDS = {
};
@Override
public APINode parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header).head();
}
@Override
public APINode execute() throws APIException {
return execute(new HashMap