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.AdAccount Maven / Gradle / Ivy
/**
* Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to
* use, copy, modify, and distribute this software in source code or binary
* form for use in connection with the web services and APIs provided by
* Facebook.
*
* As with any software that integrates with the Facebook platform, your use
* of this software is subject to the Facebook Developer Principles and
* Policies [http://developers.facebook.com/policy/]. This copyright notice
* shall be included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*/
package com.facebook.ads.sdk;
import java.io.File;
import java.lang.reflect.Modifier;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.gson.JsonObject;
import com.google.gson.JsonArray;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import com.facebook.ads.sdk.APIException.MalformedResponseException;
/**
* This class is auto-genereated.
*
* For any issues or feature requests related to this class, please let us know
* on github and we'll fix in our codegen framework. We'll not be able to accept
* pull request for this class.
*
*/
public class AdAccount extends APINode {
@SerializedName("account_id")
private String mAccountId = null;
@SerializedName("account_status")
private Long mAccountStatus = null;
@SerializedName("age")
private Double mAge = null;
@SerializedName("agency_client_declaration")
private AgencyClientDeclaration mAgencyClientDeclaration = null;
@SerializedName("amount_spent")
private String mAmountSpent = null;
@SerializedName("balance")
private String mBalance = null;
@SerializedName("business")
private Business mBusiness = null;
@SerializedName("business_city")
private String mBusinessCity = null;
@SerializedName("business_country_code")
private String mBusinessCountryCode = null;
@SerializedName("business_name")
private String mBusinessName = null;
@SerializedName("business_state")
private String mBusinessState = null;
@SerializedName("business_street")
private String mBusinessStreet = null;
@SerializedName("business_street2")
private String mBusinessStreet2 = null;
@SerializedName("business_zip")
private String mBusinessZip = null;
@SerializedName("can_create_brand_lift_study")
private Boolean mCanCreateBrandLiftStudy = null;
@SerializedName("capabilities")
private List mCapabilities = null;
@SerializedName("created_time")
private String mCreatedTime = null;
@SerializedName("currency")
private String mCurrency = null;
@SerializedName("disable_reason")
private Long mDisableReason = null;
@SerializedName("end_advertiser")
private String mEndAdvertiser = null;
@SerializedName("end_advertiser_name")
private String mEndAdvertiserName = null;
@SerializedName("failed_delivery_checks")
private List mFailedDeliveryChecks = null;
@SerializedName("funding_source")
private String mFundingSource = null;
@SerializedName("funding_source_details")
private FundingSourceDetails mFundingSourceDetails = null;
@SerializedName("has_migrated_permissions")
private Boolean mHasMigratedPermissions = null;
@SerializedName("id")
private String mId = null;
@SerializedName("io_number")
private String mIoNumber = null;
@SerializedName("is_notifications_enabled")
private Boolean mIsNotificationsEnabled = null;
@SerializedName("is_personal")
private Long mIsPersonal = null;
@SerializedName("is_prepay_account")
private Boolean mIsPrepayAccount = null;
@SerializedName("is_tax_id_required")
private Boolean mIsTaxIdRequired = null;
@SerializedName("line_numbers")
private List mLineNumbers = null;
@SerializedName("media_agency")
private String mMediaAgency = null;
@SerializedName("min_campaign_group_spend_cap")
private String mMinCampaignGroupSpendCap = null;
@SerializedName("min_daily_budget")
private Long mMinDailyBudget = null;
@SerializedName("name")
private String mName = null;
@SerializedName("offsite_pixels_tos_accepted")
private Boolean mOffsitePixelsTosAccepted = null;
@SerializedName("owner")
private String mOwner = null;
@SerializedName("partner")
private String mPartner = null;
@SerializedName("rf_spec")
private ReachFrequencySpec mRfSpec = null;
@SerializedName("salesforce_invoice_group_id")
private String mSalesforceInvoiceGroupId = null;
@SerializedName("show_checkout_experience")
private Boolean mShowCheckoutExperience = null;
@SerializedName("spend_cap")
private String mSpendCap = null;
@SerializedName("tax_id")
private String mTaxId = null;
@SerializedName("tax_id_status")
private Long mTaxIdStatus = null;
@SerializedName("tax_id_type")
private String mTaxIdType = null;
@SerializedName("timezone_id")
private Long mTimezoneId = null;
@SerializedName("timezone_name")
private String mTimezoneName = null;
@SerializedName("timezone_offset_hours_utc")
private Double mTimezoneOffsetHoursUtc = null;
@SerializedName("tos_accepted")
private Map mTosAccepted = null;
@SerializedName("user_role")
private String mUserRole = null;
protected static Gson gson = null;
AdAccount() {
}
public AdAccount(Long id, APIContext context) {
this(id.toString(), context);
}
public AdAccount(String id, APIContext context) {
this.mId = id;
this.context = context;
}
public AdAccount fetch() throws APIException{
AdAccount newInstance = fetchById(this.getPrefixedId().toString(), this.context);
this.copyFrom(newInstance);
mId = mId.replaceAll("act_", "");
return this;
}
public static AdAccount fetchById(Long id, APIContext context) throws APIException {
return fetchById(id.toString(), context);
}
public static AdAccount fetchById(String id, APIContext context) throws APIException {
AdAccount adAccount =
new APIRequestGet(id, context)
.requestAllFields()
.execute();
return adAccount;
}
public static APINodeList fetchByIds(List ids, List fields, APIContext context) throws APIException {
return (APINodeList)(
new APIRequest(context, "", "/", "GET", AdAccount.getParser())
.setParam("ids", APIRequest.joinStringList(ids))
.requestFields(fields)
.execute()
);
}
private String getPrefixedId() {
return "act_" + getId();
}
public String getId() {
return getFieldId().toString();
}
public static AdAccount loadJSON(String json, APIContext context) {
AdAccount adAccount = getGson().fromJson(json, AdAccount.class);
if (context.isDebug()) {
JsonParser parser = new JsonParser();
JsonElement o1 = parser.parse(json);
JsonElement o2 = parser.parse(adAccount.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);
};
}
adAccount.context = context;
adAccount.rawValue = json;
JsonParser parser = new JsonParser();
JsonObject o = parser.parse(json).getAsJsonObject();
if (o.has("account_id")) {
String accountId = o.get("account_id").getAsString();
if (accountId != null) {
adAccount.mId = accountId;
}
}
if (adAccount.mId != null) {
adAccount.mId = adAccount.mId.replaceAll("act_", "");
}
return adAccount;
}
public static APINodeList parseResponse(String json, APIContext context, APIRequest request) throws MalformedResponseException {
APINodeList adAccounts = new APINodeList(request, json);
JsonArray arr;
JsonObject obj;
JsonParser parser = new JsonParser();
Exception exception = null;
try{
JsonElement result = parser.parse(json);
if (result.isJsonArray()) {
// First, check if it's a pure JSON Array
arr = result.getAsJsonArray();
for (int i = 0; i < arr.size(); i++) {
adAccounts.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context));
};
return adAccounts;
} else if (result.isJsonObject()) {
obj = result.getAsJsonObject();
if (obj.has("data")) {
if (obj.has("paging")) {
JsonObject paging = obj.get("paging").getAsJsonObject().get("cursors").getAsJsonObject();
String before = paging.has("before") ? paging.get("before").getAsString() : null;
String after = paging.has("after") ? paging.get("after").getAsString() : null;
adAccounts.setPaging(before, after);
}
if (obj.get("data").isJsonArray()) {
// Second, check if it's a JSON array with "data"
arr = obj.get("data").getAsJsonArray();
for (int i = 0; i < arr.size(); i++) {
adAccounts.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context));
};
} else if (obj.get("data").isJsonObject()) {
// Third, check if it's a JSON object with "data"
obj = obj.get("data").getAsJsonObject();
boolean isRedownload = false;
for (String s : new String[]{"campaigns", "adsets", "ads"}) {
if (obj.has(s)) {
isRedownload = true;
obj = obj.getAsJsonObject(s);
for (Map.Entry entry : obj.entrySet()) {
adAccounts.add(loadJSON(entry.getValue().toString(), context));
}
break;
}
}
if (!isRedownload) {
adAccounts.add(loadJSON(obj.toString(), context));
}
}
return adAccounts;
} 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()) {
adAccounts.add(loadJSON(entry.getValue().toString(), context));
}
return adAccounts;
} 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)
) {
adAccounts.add(loadJSON(value.toString(), context));
} else {
isIdIndexedArray = false;
break;
}
}
if (isIdIndexedArray) {
return adAccounts;
}
// Sixth, check if it's pure JsonObject
adAccounts.clear();
adAccounts.add(loadJSON(json, context));
return adAccounts;
}
}
} 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 APIRequestGetActivities getActivities() {
return new APIRequestGetActivities(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdPlacePageSets getAdPlacePageSets() {
return new APIRequestGetAdPlacePageSets(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAdPlacePageSet createAdPlacePageSet() {
return new APIRequestCreateAdPlacePageSet(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdCreatives getAdCreatives() {
return new APIRequestGetAdCreatives(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAdCreative createAdCreative() {
return new APIRequestCreateAdCreative(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdCreativesByLabels getAdCreativesByLabels() {
return new APIRequestGetAdCreativesByLabels(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteAdImages deleteAdImages() {
return new APIRequestDeleteAdImages(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdImages getAdImages() {
return new APIRequestGetAdImages(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAdImage createAdImage() {
return new APIRequestCreateAdImage(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdLabels getAdLabels() {
return new APIRequestGetAdLabels(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAdLabel createAdLabel() {
return new APIRequestCreateAdLabel(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdReportRuns getAdReportRuns() {
return new APIRequestGetAdReportRuns(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdReportSchedules getAdReportSchedules() {
return new APIRequestGetAdReportSchedules(this.getPrefixedId().toString(), context);
}
public APIRequestGetAds getAds() {
return new APIRequestGetAds(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAd createAd() {
return new APIRequestCreateAd(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdsByLabels getAdsByLabels() {
return new APIRequestGetAdsByLabels(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdSets getAdSets() {
return new APIRequestGetAdSets(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAdSet createAdSet() {
return new APIRequestCreateAdSet(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdSetsByLabels getAdSetsByLabels() {
return new APIRequestGetAdSetsByLabels(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 APIRequestGetAdVideos getAdVideos() {
return new APIRequestGetAdVideos(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAdVideo createAdVideo() {
return new APIRequestCreateAdVideo(this.getPrefixedId().toString(), context);
}
public APIRequestGetApplications getApplications() {
return new APIRequestGetApplications(this.getPrefixedId().toString(), context);
}
public APIRequestGetAsyncAdRequestSets getAsyncAdRequestSets() {
return new APIRequestGetAsyncAdRequestSets(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAsyncAdRequestSet createAsyncAdRequestSet() {
return new APIRequestCreateAsyncAdRequestSet(this.getPrefixedId().toString(), context);
}
public APIRequestGetBroadTargetingCategories getBroadTargetingCategories() {
return new APIRequestGetBroadTargetingCategories(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteCampaigns deleteCampaigns() {
return new APIRequestDeleteCampaigns(this.getPrefixedId().toString(), context);
}
public APIRequestGetCampaigns getCampaigns() {
return new APIRequestGetCampaigns(this.getPrefixedId().toString(), context);
}
public APIRequestCreateCampaign createCampaign() {
return new APIRequestCreateCampaign(this.getPrefixedId().toString(), context);
}
public APIRequestGetCampaignsByLabels getCampaignsByLabels() {
return new APIRequestGetCampaignsByLabels(this.getPrefixedId().toString(), context);
}
public APIRequestGetCustomAudiences getCustomAudiences() {
return new APIRequestGetCustomAudiences(this.getPrefixedId().toString(), context);
}
public APIRequestCreateCustomAudience createCustomAudience() {
return new APIRequestCreateCustomAudience(this.getPrefixedId().toString(), context);
}
public APIRequestGetCustomAudiencesTos getCustomAudiencesTos() {
return new APIRequestGetCustomAudiencesTos(this.getPrefixedId().toString(), context);
}
public APIRequestCreateCustomConversion createCustomConversion() {
return new APIRequestCreateCustomConversion(this.getPrefixedId().toString(), context);
}
public APIRequestGetGeneratePreviews getGeneratePreviews() {
return new APIRequestGetGeneratePreviews(this.getPrefixedId().toString(), context);
}
public APIRequestGetInsights getInsights() {
return new APIRequestGetInsights(this.getPrefixedId().toString(), context);
}
public APIRequestGetInsightsAsync getInsightsAsync() {
return new APIRequestGetInsightsAsync(this.getPrefixedId().toString(), context);
}
public APIRequestGetInstagramAccounts getInstagramAccounts() {
return new APIRequestGetInstagramAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetLeadGenForms getLeadGenForms() {
return new APIRequestGetLeadGenForms(this.getPrefixedId().toString(), context);
}
public APIRequestGetMinimumBudgets getMinimumBudgets() {
return new APIRequestGetMinimumBudgets(this.getPrefixedId().toString(), context);
}
public APIRequestGetOfflineConversionDataSets getOfflineConversionDataSets() {
return new APIRequestGetOfflineConversionDataSets(this.getPrefixedId().toString(), context);
}
public APIRequestCreateOfflineConversion createOfflineConversion() {
return new APIRequestCreateOfflineConversion(this.getPrefixedId().toString(), context);
}
public APIRequestGetOffsitePixels getOffsitePixels() {
return new APIRequestGetOffsitePixels(this.getPrefixedId().toString(), context);
}
public APIRequestCreateOffsitePixel createOffsitePixel() {
return new APIRequestCreateOffsitePixel(this.getPrefixedId().toString(), context);
}
public APIRequestGetPartnerCategories getPartnerCategories() {
return new APIRequestGetPartnerCategories(this.getPrefixedId().toString(), context);
}
public APIRequestGetPartners getPartners() {
return new APIRequestGetPartners(this.getPrefixedId().toString(), context);
}
public APIRequestCreateProductAudience createProductAudience() {
return new APIRequestCreateProductAudience(this.getPrefixedId().toString(), context);
}
public APIRequestGetPublisherBlockLists getPublisherBlockLists() {
return new APIRequestGetPublisherBlockLists(this.getPrefixedId().toString(), context);
}
public APIRequestCreatePublisherBlockList createPublisherBlockList() {
return new APIRequestCreatePublisherBlockList(this.getPrefixedId().toString(), context);
}
public APIRequestGetRateCard getRateCard() {
return new APIRequestGetRateCard(this.getPrefixedId().toString(), context);
}
public APIRequestGetReachEstimate getReachEstimate() {
return new APIRequestGetReachEstimate(this.getPrefixedId().toString(), context);
}
public APIRequestGetReachFrequencyPredictions getReachFrequencyPredictions() {
return new APIRequestGetReachFrequencyPredictions(this.getPrefixedId().toString(), context);
}
public APIRequestCreateReachFrequencyPrediction createReachFrequencyPrediction() {
return new APIRequestCreateReachFrequencyPrediction(this.getPrefixedId().toString(), context);
}
public APIRequestGetRoas getRoas() {
return new APIRequestGetRoas(this.getPrefixedId().toString(), context);
}
public APIRequestGetTargetingBrowse getTargetingBrowse() {
return new APIRequestGetTargetingBrowse(this.getPrefixedId().toString(), context);
}
public APIRequestGetTargetingSearch getTargetingSearch() {
return new APIRequestGetTargetingSearch(this.getPrefixedId().toString(), context);
}
public APIRequestGetTargetingSentenceLines getTargetingSentenceLines() {
return new APIRequestGetTargetingSentenceLines(this.getPrefixedId().toString(), context);
}
public APIRequestGetTargetingSuggestions getTargetingSuggestions() {
return new APIRequestGetTargetingSuggestions(this.getPrefixedId().toString(), context);
}
public APIRequestGetTargetingValidation getTargetingValidation() {
return new APIRequestGetTargetingValidation(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteTracking deleteTracking() {
return new APIRequestDeleteTracking(this.getPrefixedId().toString(), context);
}
public APIRequestCreateTracking createTracking() {
return new APIRequestCreateTracking(this.getPrefixedId().toString(), context);
}
public APIRequestGetTransactions getTransactions() {
return new APIRequestGetTransactions(this.getPrefixedId().toString(), context);
}
public APIRequestGetUsers getUsers() {
return new APIRequestGetUsers(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 getFieldAccountId() {
return mAccountId;
}
public Long getFieldAccountStatus() {
return mAccountStatus;
}
public Double getFieldAge() {
return mAge;
}
public AgencyClientDeclaration getFieldAgencyClientDeclaration() {
return mAgencyClientDeclaration;
}
public String getFieldAmountSpent() {
return mAmountSpent;
}
public String getFieldBalance() {
return mBalance;
}
public Business getFieldBusiness() {
if (mBusiness != null) {
mBusiness.context = getContext();
}
return mBusiness;
}
public String getFieldBusinessCity() {
return mBusinessCity;
}
public String getFieldBusinessCountryCode() {
return mBusinessCountryCode;
}
public String getFieldBusinessName() {
return mBusinessName;
}
public String getFieldBusinessState() {
return mBusinessState;
}
public String getFieldBusinessStreet() {
return mBusinessStreet;
}
public String getFieldBusinessStreet2() {
return mBusinessStreet2;
}
public String getFieldBusinessZip() {
return mBusinessZip;
}
public Boolean getFieldCanCreateBrandLiftStudy() {
return mCanCreateBrandLiftStudy;
}
public List getFieldCapabilities() {
return mCapabilities;
}
public String getFieldCreatedTime() {
return mCreatedTime;
}
public String getFieldCurrency() {
return mCurrency;
}
public Long getFieldDisableReason() {
return mDisableReason;
}
public String getFieldEndAdvertiser() {
return mEndAdvertiser;
}
public String getFieldEndAdvertiserName() {
return mEndAdvertiserName;
}
public List getFieldFailedDeliveryChecks() {
return mFailedDeliveryChecks;
}
public String getFieldFundingSource() {
return mFundingSource;
}
public FundingSourceDetails getFieldFundingSourceDetails() {
return mFundingSourceDetails;
}
public Boolean getFieldHasMigratedPermissions() {
return mHasMigratedPermissions;
}
public String getFieldId() {
return mId;
}
public String getFieldIoNumber() {
return mIoNumber;
}
public Boolean getFieldIsNotificationsEnabled() {
return mIsNotificationsEnabled;
}
public Long getFieldIsPersonal() {
return mIsPersonal;
}
public Boolean getFieldIsPrepayAccount() {
return mIsPrepayAccount;
}
public Boolean getFieldIsTaxIdRequired() {
return mIsTaxIdRequired;
}
public List getFieldLineNumbers() {
return mLineNumbers;
}
public String getFieldMediaAgency() {
return mMediaAgency;
}
public String getFieldMinCampaignGroupSpendCap() {
return mMinCampaignGroupSpendCap;
}
public Long getFieldMinDailyBudget() {
return mMinDailyBudget;
}
public String getFieldName() {
return mName;
}
public Boolean getFieldOffsitePixelsTosAccepted() {
return mOffsitePixelsTosAccepted;
}
public String getFieldOwner() {
return mOwner;
}
public String getFieldPartner() {
return mPartner;
}
public ReachFrequencySpec getFieldRfSpec() {
return mRfSpec;
}
public String getFieldSalesforceInvoiceGroupId() {
return mSalesforceInvoiceGroupId;
}
public Boolean getFieldShowCheckoutExperience() {
return mShowCheckoutExperience;
}
public String getFieldSpendCap() {
return mSpendCap;
}
public String getFieldTaxId() {
return mTaxId;
}
public Long getFieldTaxIdStatus() {
return mTaxIdStatus;
}
public String getFieldTaxIdType() {
return mTaxIdType;
}
public Long getFieldTimezoneId() {
return mTimezoneId;
}
public String getFieldTimezoneName() {
return mTimezoneName;
}
public Double getFieldTimezoneOffsetHoursUtc() {
return mTimezoneOffsetHoursUtc;
}
public Map getFieldTosAccepted() {
return mTosAccepted;
}
public String getFieldUserRole() {
return mUserRole;
}
public static class APIRequestGetActivities extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"add_children",
"business_id",
"category",
"extra_oids",
"oid",
"since",
"uid",
"until",
};
public static final String[] FIELDS = {
"actor_id",
"actor_name",
"application_id",
"application_name",
"date_time_in_timezone",
"event_time",
"event_type",
"extra_data",
"object_id",
"object_name",
"translated_event_type",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return AdActivity.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetActivities(String nodeId, APIContext context) {
super(context, nodeId, "/activities", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetActivities setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetActivities setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetActivities setAddChildren (Boolean addChildren) {
this.setParam("add_children", addChildren);
return this;
}
public APIRequestGetActivities setAddChildren (String addChildren) {
this.setParam("add_children", addChildren);
return this;
}
public APIRequestGetActivities setBusinessId (String businessId) {
this.setParam("business_id", businessId);
return this;
}
public APIRequestGetActivities setCategory (AdActivity.EnumCategory category) {
this.setParam("category", category);
return this;
}
public APIRequestGetActivities setCategory (String category) {
this.setParam("category", category);
return this;
}
public APIRequestGetActivities setExtraOids (List extraOids) {
this.setParam("extra_oids", extraOids);
return this;
}
public APIRequestGetActivities setExtraOids (String extraOids) {
this.setParam("extra_oids", extraOids);
return this;
}
public APIRequestGetActivities setOid (String oid) {
this.setParam("oid", oid);
return this;
}
public APIRequestGetActivities setSince (String since) {
this.setParam("since", since);
return this;
}
public APIRequestGetActivities setUid (Long uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestGetActivities setUid (String uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestGetActivities setUntil (String until) {
this.setParam("until", until);
return this;
}
public APIRequestGetActivities requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetActivities requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetActivities requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetActivities requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetActivities requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetActivities requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetActivities requestActorIdField () {
return this.requestActorIdField(true);
}
public APIRequestGetActivities requestActorIdField (boolean value) {
this.requestField("actor_id", value);
return this;
}
public APIRequestGetActivities requestActorNameField () {
return this.requestActorNameField(true);
}
public APIRequestGetActivities requestActorNameField (boolean value) {
this.requestField("actor_name", value);
return this;
}
public APIRequestGetActivities requestApplicationIdField () {
return this.requestApplicationIdField(true);
}
public APIRequestGetActivities requestApplicationIdField (boolean value) {
this.requestField("application_id", value);
return this;
}
public APIRequestGetActivities requestApplicationNameField () {
return this.requestApplicationNameField(true);
}
public APIRequestGetActivities requestApplicationNameField (boolean value) {
this.requestField("application_name", value);
return this;
}
public APIRequestGetActivities requestDateTimeInTimezoneField () {
return this.requestDateTimeInTimezoneField(true);
}
public APIRequestGetActivities requestDateTimeInTimezoneField (boolean value) {
this.requestField("date_time_in_timezone", value);
return this;
}
public APIRequestGetActivities requestEventTimeField () {
return this.requestEventTimeField(true);
}
public APIRequestGetActivities requestEventTimeField (boolean value) {
this.requestField("event_time", value);
return this;
}
public APIRequestGetActivities requestEventTypeField () {
return this.requestEventTypeField(true);
}
public APIRequestGetActivities requestEventTypeField (boolean value) {
this.requestField("event_type", value);
return this;
}
public APIRequestGetActivities requestExtraDataField () {
return this.requestExtraDataField(true);
}
public APIRequestGetActivities requestExtraDataField (boolean value) {
this.requestField("extra_data", value);
return this;
}
public APIRequestGetActivities requestObjectIdField () {
return this.requestObjectIdField(true);
}
public APIRequestGetActivities requestObjectIdField (boolean value) {
this.requestField("object_id", value);
return this;
}
public APIRequestGetActivities requestObjectNameField () {
return this.requestObjectNameField(true);
}
public APIRequestGetActivities requestObjectNameField (boolean value) {
this.requestField("object_name", value);
return this;
}
public APIRequestGetActivities requestTranslatedEventTypeField () {
return this.requestTranslatedEventTypeField(true);
}
public APIRequestGetActivities requestTranslatedEventTypeField (boolean value) {
this.requestField("translated_event_type", value);
return this;
}
}
public static class APIRequestGetAdPlacePageSets extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"account_id",
"id",
"location_types",
"name",
"pages_count",
"parent_page",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return AdPlacePageSet.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAdPlacePageSets(String nodeId, APIContext context) {
super(context, nodeId, "/ad_place_page_sets", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdPlacePageSets setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdPlacePageSets setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdPlacePageSets requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdPlacePageSets requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdPlacePageSets requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdPlacePageSets requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdPlacePageSets requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdPlacePageSets requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdPlacePageSets requestAccountIdField () {
return this.requestAccountIdField(true);
}
public APIRequestGetAdPlacePageSets requestAccountIdField (boolean value) {
this.requestField("account_id", value);
return this;
}
public APIRequestGetAdPlacePageSets requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdPlacePageSets requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdPlacePageSets requestLocationTypesField () {
return this.requestLocationTypesField(true);
}
public APIRequestGetAdPlacePageSets requestLocationTypesField (boolean value) {
this.requestField("location_types", value);
return this;
}
public APIRequestGetAdPlacePageSets requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAdPlacePageSets requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAdPlacePageSets requestPagesCountField () {
return this.requestPagesCountField(true);
}
public APIRequestGetAdPlacePageSets requestPagesCountField (boolean value) {
this.requestField("pages_count", value);
return this;
}
public APIRequestGetAdPlacePageSets requestParentPageField () {
return this.requestParentPageField(true);
}
public APIRequestGetAdPlacePageSets requestParentPageField (boolean value) {
this.requestField("parent_page", value);
return this;
}
}
public static class APIRequestCreateAdPlacePageSet extends APIRequest {
AdPlacePageSet lastResponse = null;
@Override
public AdPlacePageSet getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"location_types",
"name",
"parent_page",
};
public static final String[] FIELDS = {
};
@Override
public AdPlacePageSet parseResponse(String response) throws APIException {
return AdPlacePageSet.parseResponse(response, getContext(), this).head();
}
@Override
public AdPlacePageSet execute() throws APIException {
return execute(new HashMap());
}
@Override
public AdPlacePageSet execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestCreateAdPlacePageSet(String nodeId, APIContext context) {
super(context, nodeId, "/ad_place_page_sets", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAdPlacePageSet setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAdPlacePageSet setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAdPlacePageSet setLocationTypes (List locationTypes) {
this.setParam("location_types", locationTypes);
return this;
}
public APIRequestCreateAdPlacePageSet setLocationTypes (String locationTypes) {
this.setParam("location_types", locationTypes);
return this;
}
public APIRequestCreateAdPlacePageSet setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateAdPlacePageSet setParentPage (String parentPage) {
this.setParam("parent_page", parentPage);
return this;
}
public APIRequestCreateAdPlacePageSet requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAdPlacePageSet requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdPlacePageSet requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAdPlacePageSet requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdPlacePageSet requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAdPlacePageSet requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAdCreatives extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"account_id",
"actor_id",
"adlabels",
"applink_treatment",
"body",
"call_to_action_type",
"effective_instagram_story_id",
"effective_object_story_id",
"id",
"image_crops",
"image_hash",
"image_url",
"instagram_actor_id",
"instagram_permalink_url",
"instagram_story_id",
"link_og_id",
"link_url",
"name",
"object_id",
"object_story_id",
"object_story_spec",
"object_type",
"object_url",
"platform_customizations",
"product_set_id",
"status",
"template_url",
"template_url_spec",
"thumbnail_url",
"title",
"url_tags",
"use_page_actor_override",
"video_id",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return AdCreative.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAdCreatives(String nodeId, APIContext context) {
super(context, nodeId, "/adcreatives", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdCreatives setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdCreatives setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdCreatives requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdCreatives requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdCreatives requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdCreatives requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdCreatives requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdCreatives requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdCreatives requestAccountIdField () {
return this.requestAccountIdField(true);
}
public APIRequestGetAdCreatives requestAccountIdField (boolean value) {
this.requestField("account_id", value);
return this;
}
public APIRequestGetAdCreatives requestActorIdField () {
return this.requestActorIdField(true);
}
public APIRequestGetAdCreatives requestActorIdField (boolean value) {
this.requestField("actor_id", value);
return this;
}
public APIRequestGetAdCreatives requestAdlabelsField () {
return this.requestAdlabelsField(true);
}
public APIRequestGetAdCreatives requestAdlabelsField (boolean value) {
this.requestField("adlabels", value);
return this;
}
public APIRequestGetAdCreatives requestApplinkTreatmentField () {
return this.requestApplinkTreatmentField(true);
}
public APIRequestGetAdCreatives requestApplinkTreatmentField (boolean value) {
this.requestField("applink_treatment", value);
return this;
}
public APIRequestGetAdCreatives requestBodyField () {
return this.requestBodyField(true);
}
public APIRequestGetAdCreatives requestBodyField (boolean value) {
this.requestField("body", value);
return this;
}
public APIRequestGetAdCreatives requestCallToActionTypeField () {
return this.requestCallToActionTypeField(true);
}
public APIRequestGetAdCreatives requestCallToActionTypeField (boolean value) {
this.requestField("call_to_action_type", value);
return this;
}
public APIRequestGetAdCreatives requestEffectiveInstagramStoryIdField () {
return this.requestEffectiveInstagramStoryIdField(true);
}
public APIRequestGetAdCreatives requestEffectiveInstagramStoryIdField (boolean value) {
this.requestField("effective_instagram_story_id", value);
return this;
}
public APIRequestGetAdCreatives requestEffectiveObjectStoryIdField () {
return this.requestEffectiveObjectStoryIdField(true);
}
public APIRequestGetAdCreatives requestEffectiveObjectStoryIdField (boolean value) {
this.requestField("effective_object_story_id", value);
return this;
}
public APIRequestGetAdCreatives requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdCreatives requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdCreatives requestImageCropsField () {
return this.requestImageCropsField(true);
}
public APIRequestGetAdCreatives requestImageCropsField (boolean value) {
this.requestField("image_crops", value);
return this;
}
public APIRequestGetAdCreatives requestImageHashField () {
return this.requestImageHashField(true);
}
public APIRequestGetAdCreatives requestImageHashField (boolean value) {
this.requestField("image_hash", value);
return this;
}
public APIRequestGetAdCreatives requestImageUrlField () {
return this.requestImageUrlField(true);
}
public APIRequestGetAdCreatives requestImageUrlField (boolean value) {
this.requestField("image_url", value);
return this;
}
public APIRequestGetAdCreatives requestInstagramActorIdField () {
return this.requestInstagramActorIdField(true);
}
public APIRequestGetAdCreatives requestInstagramActorIdField (boolean value) {
this.requestField("instagram_actor_id", value);
return this;
}
public APIRequestGetAdCreatives requestInstagramPermalinkUrlField () {
return this.requestInstagramPermalinkUrlField(true);
}
public APIRequestGetAdCreatives requestInstagramPermalinkUrlField (boolean value) {
this.requestField("instagram_permalink_url", value);
return this;
}
public APIRequestGetAdCreatives requestInstagramStoryIdField () {
return this.requestInstagramStoryIdField(true);
}
public APIRequestGetAdCreatives requestInstagramStoryIdField (boolean value) {
this.requestField("instagram_story_id", value);
return this;
}
public APIRequestGetAdCreatives requestLinkOgIdField () {
return this.requestLinkOgIdField(true);
}
public APIRequestGetAdCreatives requestLinkOgIdField (boolean value) {
this.requestField("link_og_id", value);
return this;
}
public APIRequestGetAdCreatives requestLinkUrlField () {
return this.requestLinkUrlField(true);
}
public APIRequestGetAdCreatives requestLinkUrlField (boolean value) {
this.requestField("link_url", value);
return this;
}
public APIRequestGetAdCreatives requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAdCreatives requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAdCreatives requestObjectIdField () {
return this.requestObjectIdField(true);
}
public APIRequestGetAdCreatives requestObjectIdField (boolean value) {
this.requestField("object_id", value);
return this;
}
public APIRequestGetAdCreatives requestObjectStoryIdField () {
return this.requestObjectStoryIdField(true);
}
public APIRequestGetAdCreatives requestObjectStoryIdField (boolean value) {
this.requestField("object_story_id", value);
return this;
}
public APIRequestGetAdCreatives requestObjectStorySpecField () {
return this.requestObjectStorySpecField(true);
}
public APIRequestGetAdCreatives requestObjectStorySpecField (boolean value) {
this.requestField("object_story_spec", value);
return this;
}
public APIRequestGetAdCreatives requestObjectTypeField () {
return this.requestObjectTypeField(true);
}
public APIRequestGetAdCreatives requestObjectTypeField (boolean value) {
this.requestField("object_type", value);
return this;
}
public APIRequestGetAdCreatives requestObjectUrlField () {
return this.requestObjectUrlField(true);
}
public APIRequestGetAdCreatives requestObjectUrlField (boolean value) {
this.requestField("object_url", value);
return this;
}
public APIRequestGetAdCreatives requestPlatformCustomizationsField () {
return this.requestPlatformCustomizationsField(true);
}
public APIRequestGetAdCreatives requestPlatformCustomizationsField (boolean value) {
this.requestField("platform_customizations", value);
return this;
}
public APIRequestGetAdCreatives requestProductSetIdField () {
return this.requestProductSetIdField(true);
}
public APIRequestGetAdCreatives requestProductSetIdField (boolean value) {
this.requestField("product_set_id", value);
return this;
}
public APIRequestGetAdCreatives requestStatusField () {
return this.requestStatusField(true);
}
public APIRequestGetAdCreatives requestStatusField (boolean value) {
this.requestField("status", value);
return this;
}
public APIRequestGetAdCreatives requestTemplateUrlField () {
return this.requestTemplateUrlField(true);
}
public APIRequestGetAdCreatives requestTemplateUrlField (boolean value) {
this.requestField("template_url", value);
return this;
}
public APIRequestGetAdCreatives requestTemplateUrlSpecField () {
return this.requestTemplateUrlSpecField(true);
}
public APIRequestGetAdCreatives requestTemplateUrlSpecField (boolean value) {
this.requestField("template_url_spec", value);
return this;
}
public APIRequestGetAdCreatives requestThumbnailUrlField () {
return this.requestThumbnailUrlField(true);
}
public APIRequestGetAdCreatives requestThumbnailUrlField (boolean value) {
this.requestField("thumbnail_url", value);
return this;
}
public APIRequestGetAdCreatives requestTitleField () {
return this.requestTitleField(true);
}
public APIRequestGetAdCreatives requestTitleField (boolean value) {
this.requestField("title", value);
return this;
}
public APIRequestGetAdCreatives requestUrlTagsField () {
return this.requestUrlTagsField(true);
}
public APIRequestGetAdCreatives requestUrlTagsField (boolean value) {
this.requestField("url_tags", value);
return this;
}
public APIRequestGetAdCreatives requestUsePageActorOverrideField () {
return this.requestUsePageActorOverrideField(true);
}
public APIRequestGetAdCreatives requestUsePageActorOverrideField (boolean value) {
this.requestField("use_page_actor_override", value);
return this;
}
public APIRequestGetAdCreatives requestVideoIdField () {
return this.requestVideoIdField(true);
}
public APIRequestGetAdCreatives requestVideoIdField (boolean value) {
this.requestField("video_id", value);
return this;
}
}
public static class APIRequestCreateAdCreative extends APIRequest {
AdCreative lastResponse = null;
@Override
public AdCreative getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"actor_id",
"adlabels",
"applink_treatment",
"body",
"call_to_action",
"dynamic_ad_voice",
"image_crops",
"image_file",
"image_hash",
"image_url",
"instagram_actor_id",
"instagram_permalink_url",
"instagram_story_id",
"link_og_id",
"link_url",
"name",
"object_id",
"object_story_id",
"object_story_spec",
"object_type",
"object_url",
"platform_customizations",
"product_set_id",
"template_url",
"template_url_spec",
"thumbnail_url",
"title",
"url_tags",
"use_page_actor_override",
};
public static final String[] FIELDS = {
};
@Override
public AdCreative parseResponse(String response) throws APIException {
return AdCreative.parseResponse(response, getContext(), this).head();
}
@Override
public AdCreative execute() throws APIException {
return execute(new HashMap());
}
@Override
public AdCreative execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestCreateAdCreative(String nodeId, APIContext context) {
super(context, nodeId, "/adcreatives", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAdCreative setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAdCreative setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAdCreative setActorId (Long actorId) {
this.setParam("actor_id", actorId);
return this;
}
public APIRequestCreateAdCreative setActorId (String actorId) {
this.setParam("actor_id", actorId);
return this;
}
public APIRequestCreateAdCreative setAdlabels (List adlabels) {
this.setParam("adlabels", adlabels);
return this;
}
public APIRequestCreateAdCreative setAdlabels (String adlabels) {
this.setParam("adlabels", adlabels);
return this;
}
public APIRequestCreateAdCreative setApplinkTreatment (AdCreative.EnumApplinkTreatment applinkTreatment) {
this.setParam("applink_treatment", applinkTreatment);
return this;
}
public APIRequestCreateAdCreative setApplinkTreatment (String applinkTreatment) {
this.setParam("applink_treatment", applinkTreatment);
return this;
}
public APIRequestCreateAdCreative setBody (String body) {
this.setParam("body", body);
return this;
}
public APIRequestCreateAdCreative setCallToAction (Object callToAction) {
this.setParam("call_to_action", callToAction);
return this;
}
public APIRequestCreateAdCreative setCallToAction (String callToAction) {
this.setParam("call_to_action", callToAction);
return this;
}
public APIRequestCreateAdCreative setDynamicAdVoice (AdCreative.EnumDynamicAdVoice dynamicAdVoice) {
this.setParam("dynamic_ad_voice", dynamicAdVoice);
return this;
}
public APIRequestCreateAdCreative setDynamicAdVoice (String dynamicAdVoice) {
this.setParam("dynamic_ad_voice", dynamicAdVoice);
return this;
}
public APIRequestCreateAdCreative setImageCrops (Map imageCrops) {
this.setParam("image_crops", imageCrops);
return this;
}
public APIRequestCreateAdCreative setImageCrops (String imageCrops) {
this.setParam("image_crops", imageCrops);
return this;
}
public APIRequestCreateAdCreative setImageFile (String imageFile) {
this.setParam("image_file", imageFile);
return this;
}
public APIRequestCreateAdCreative setImageHash (String imageHash) {
this.setParam("image_hash", imageHash);
return this;
}
public APIRequestCreateAdCreative setImageUrl (String imageUrl) {
this.setParam("image_url", imageUrl);
return this;
}
public APIRequestCreateAdCreative setInstagramActorId (String instagramActorId) {
this.setParam("instagram_actor_id", instagramActorId);
return this;
}
public APIRequestCreateAdCreative setInstagramPermalinkUrl (String instagramPermalinkUrl) {
this.setParam("instagram_permalink_url", instagramPermalinkUrl);
return this;
}
public APIRequestCreateAdCreative setInstagramStoryId (Long instagramStoryId) {
this.setParam("instagram_story_id", instagramStoryId);
return this;
}
public APIRequestCreateAdCreative setInstagramStoryId (String instagramStoryId) {
this.setParam("instagram_story_id", instagramStoryId);
return this;
}
public APIRequestCreateAdCreative setLinkOgId (String linkOgId) {
this.setParam("link_og_id", linkOgId);
return this;
}
public APIRequestCreateAdCreative setLinkUrl (String linkUrl) {
this.setParam("link_url", linkUrl);
return this;
}
public APIRequestCreateAdCreative setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateAdCreative setObjectId (Long objectId) {
this.setParam("object_id", objectId);
return this;
}
public APIRequestCreateAdCreative setObjectId (String objectId) {
this.setParam("object_id", objectId);
return this;
}
public APIRequestCreateAdCreative setObjectStoryId (String objectStoryId) {
this.setParam("object_story_id", objectStoryId);
return this;
}
public APIRequestCreateAdCreative setObjectStorySpec (AdCreativeObjectStorySpec objectStorySpec) {
this.setParam("object_story_spec", objectStorySpec);
return this;
}
public APIRequestCreateAdCreative setObjectStorySpec (String objectStorySpec) {
this.setParam("object_story_spec", objectStorySpec);
return this;
}
public APIRequestCreateAdCreative setObjectType (String objectType) {
this.setParam("object_type", objectType);
return this;
}
public APIRequestCreateAdCreative setObjectUrl (String objectUrl) {
this.setParam("object_url", objectUrl);
return this;
}
public APIRequestCreateAdCreative setPlatformCustomizations (Object platformCustomizations) {
this.setParam("platform_customizations", platformCustomizations);
return this;
}
public APIRequestCreateAdCreative setPlatformCustomizations (String platformCustomizations) {
this.setParam("platform_customizations", platformCustomizations);
return this;
}
public APIRequestCreateAdCreative setProductSetId (String productSetId) {
this.setParam("product_set_id", productSetId);
return this;
}
public APIRequestCreateAdCreative setTemplateUrl (String templateUrl) {
this.setParam("template_url", templateUrl);
return this;
}
public APIRequestCreateAdCreative setTemplateUrlSpec (Object templateUrlSpec) {
this.setParam("template_url_spec", templateUrlSpec);
return this;
}
public APIRequestCreateAdCreative setTemplateUrlSpec (String templateUrlSpec) {
this.setParam("template_url_spec", templateUrlSpec);
return this;
}
public APIRequestCreateAdCreative setThumbnailUrl (String thumbnailUrl) {
this.setParam("thumbnail_url", thumbnailUrl);
return this;
}
public APIRequestCreateAdCreative setTitle (String title) {
this.setParam("title", title);
return this;
}
public APIRequestCreateAdCreative setUrlTags (String urlTags) {
this.setParam("url_tags", urlTags);
return this;
}
public APIRequestCreateAdCreative setUsePageActorOverride (Boolean usePageActorOverride) {
this.setParam("use_page_actor_override", usePageActorOverride);
return this;
}
public APIRequestCreateAdCreative setUsePageActorOverride (String usePageActorOverride) {
this.setParam("use_page_actor_override", usePageActorOverride);
return this;
}
public APIRequestCreateAdCreative requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAdCreative requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdCreative requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAdCreative requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdCreative requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAdCreative requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAdCreativesByLabels extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"ad_label_ids",
"operator",
};
public static final String[] FIELDS = {
"account_id",
"actor_id",
"adlabels",
"applink_treatment",
"body",
"call_to_action_type",
"effective_instagram_story_id",
"effective_object_story_id",
"id",
"image_crops",
"image_hash",
"image_url",
"instagram_actor_id",
"instagram_permalink_url",
"instagram_story_id",
"link_og_id",
"link_url",
"name",
"object_id",
"object_story_id",
"object_story_spec",
"object_type",
"object_url",
"platform_customizations",
"product_set_id",
"status",
"template_url",
"template_url_spec",
"thumbnail_url",
"title",
"url_tags",
"use_page_actor_override",
"video_id",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return AdCreative.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAdCreativesByLabels(String nodeId, APIContext context) {
super(context, nodeId, "/adcreativesbylabels", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdCreativesByLabels setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdCreativesByLabels setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdCreativesByLabels setAdLabelIds (List adLabelIds) {
this.setParam("ad_label_ids", adLabelIds);
return this;
}
public APIRequestGetAdCreativesByLabels setAdLabelIds (String adLabelIds) {
this.setParam("ad_label_ids", adLabelIds);
return this;
}
public APIRequestGetAdCreativesByLabels setOperator (AdCreative.EnumOperator operator) {
this.setParam("operator", operator);
return this;
}
public APIRequestGetAdCreativesByLabels setOperator (String operator) {
this.setParam("operator", operator);
return this;
}
public APIRequestGetAdCreativesByLabels requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdCreativesByLabels requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdCreativesByLabels requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdCreativesByLabels requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdCreativesByLabels requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdCreativesByLabels requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdCreativesByLabels requestAccountIdField () {
return this.requestAccountIdField(true);
}
public APIRequestGetAdCreativesByLabels requestAccountIdField (boolean value) {
this.requestField("account_id", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestActorIdField () {
return this.requestActorIdField(true);
}
public APIRequestGetAdCreativesByLabels requestActorIdField (boolean value) {
this.requestField("actor_id", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestAdlabelsField () {
return this.requestAdlabelsField(true);
}
public APIRequestGetAdCreativesByLabels requestAdlabelsField (boolean value) {
this.requestField("adlabels", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestApplinkTreatmentField () {
return this.requestApplinkTreatmentField(true);
}
public APIRequestGetAdCreativesByLabels requestApplinkTreatmentField (boolean value) {
this.requestField("applink_treatment", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestBodyField () {
return this.requestBodyField(true);
}
public APIRequestGetAdCreativesByLabels requestBodyField (boolean value) {
this.requestField("body", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestCallToActionTypeField () {
return this.requestCallToActionTypeField(true);
}
public APIRequestGetAdCreativesByLabels requestCallToActionTypeField (boolean value) {
this.requestField("call_to_action_type", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestEffectiveInstagramStoryIdField () {
return this.requestEffectiveInstagramStoryIdField(true);
}
public APIRequestGetAdCreativesByLabels requestEffectiveInstagramStoryIdField (boolean value) {
this.requestField("effective_instagram_story_id", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestEffectiveObjectStoryIdField () {
return this.requestEffectiveObjectStoryIdField(true);
}
public APIRequestGetAdCreativesByLabels requestEffectiveObjectStoryIdField (boolean value) {
this.requestField("effective_object_story_id", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdCreativesByLabels requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestImageCropsField () {
return this.requestImageCropsField(true);
}
public APIRequestGetAdCreativesByLabels requestImageCropsField (boolean value) {
this.requestField("image_crops", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestImageHashField () {
return this.requestImageHashField(true);
}
public APIRequestGetAdCreativesByLabels requestImageHashField (boolean value) {
this.requestField("image_hash", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestImageUrlField () {
return this.requestImageUrlField(true);
}
public APIRequestGetAdCreativesByLabels requestImageUrlField (boolean value) {
this.requestField("image_url", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestInstagramActorIdField () {
return this.requestInstagramActorIdField(true);
}
public APIRequestGetAdCreativesByLabels requestInstagramActorIdField (boolean value) {
this.requestField("instagram_actor_id", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestInstagramPermalinkUrlField () {
return this.requestInstagramPermalinkUrlField(true);
}
public APIRequestGetAdCreativesByLabels requestInstagramPermalinkUrlField (boolean value) {
this.requestField("instagram_permalink_url", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestInstagramStoryIdField () {
return this.requestInstagramStoryIdField(true);
}
public APIRequestGetAdCreativesByLabels requestInstagramStoryIdField (boolean value) {
this.requestField("instagram_story_id", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestLinkOgIdField () {
return this.requestLinkOgIdField(true);
}
public APIRequestGetAdCreativesByLabels requestLinkOgIdField (boolean value) {
this.requestField("link_og_id", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestLinkUrlField () {
return this.requestLinkUrlField(true);
}
public APIRequestGetAdCreativesByLabels requestLinkUrlField (boolean value) {
this.requestField("link_url", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAdCreativesByLabels requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestObjectIdField () {
return this.requestObjectIdField(true);
}
public APIRequestGetAdCreativesByLabels requestObjectIdField (boolean value) {
this.requestField("object_id", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestObjectStoryIdField () {
return this.requestObjectStoryIdField(true);
}
public APIRequestGetAdCreativesByLabels requestObjectStoryIdField (boolean value) {
this.requestField("object_story_id", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestObjectStorySpecField () {
return this.requestObjectStorySpecField(true);
}
public APIRequestGetAdCreativesByLabels requestObjectStorySpecField (boolean value) {
this.requestField("object_story_spec", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestObjectTypeField () {
return this.requestObjectTypeField(true);
}
public APIRequestGetAdCreativesByLabels requestObjectTypeField (boolean value) {
this.requestField("object_type", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestObjectUrlField () {
return this.requestObjectUrlField(true);
}
public APIRequestGetAdCreativesByLabels requestObjectUrlField (boolean value) {
this.requestField("object_url", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestPlatformCustomizationsField () {
return this.requestPlatformCustomizationsField(true);
}
public APIRequestGetAdCreativesByLabels requestPlatformCustomizationsField (boolean value) {
this.requestField("platform_customizations", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestProductSetIdField () {
return this.requestProductSetIdField(true);
}
public APIRequestGetAdCreativesByLabels requestProductSetIdField (boolean value) {
this.requestField("product_set_id", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestStatusField () {
return this.requestStatusField(true);
}
public APIRequestGetAdCreativesByLabels requestStatusField (boolean value) {
this.requestField("status", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestTemplateUrlField () {
return this.requestTemplateUrlField(true);
}
public APIRequestGetAdCreativesByLabels requestTemplateUrlField (boolean value) {
this.requestField("template_url", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestTemplateUrlSpecField () {
return this.requestTemplateUrlSpecField(true);
}
public APIRequestGetAdCreativesByLabels requestTemplateUrlSpecField (boolean value) {
this.requestField("template_url_spec", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestThumbnailUrlField () {
return this.requestThumbnailUrlField(true);
}
public APIRequestGetAdCreativesByLabels requestThumbnailUrlField (boolean value) {
this.requestField("thumbnail_url", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestTitleField () {
return this.requestTitleField(true);
}
public APIRequestGetAdCreativesByLabels requestTitleField (boolean value) {
this.requestField("title", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestUrlTagsField () {
return this.requestUrlTagsField(true);
}
public APIRequestGetAdCreativesByLabels requestUrlTagsField (boolean value) {
this.requestField("url_tags", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestUsePageActorOverrideField () {
return this.requestUsePageActorOverrideField(true);
}
public APIRequestGetAdCreativesByLabels requestUsePageActorOverrideField (boolean value) {
this.requestField("use_page_actor_override", value);
return this;
}
public APIRequestGetAdCreativesByLabels requestVideoIdField () {
return this.requestVideoIdField(true);
}
public APIRequestGetAdCreativesByLabels requestVideoIdField (boolean value) {
this.requestField("video_id", value);
return this;
}
}
public static class APIRequestDeleteAdImages extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"hash",
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return APINode.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestDeleteAdImages(String nodeId, APIContext context) {
super(context, nodeId, "/adimages", "DELETE", Arrays.asList(PARAMS));
}
@Override
public APIRequestDeleteAdImages setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestDeleteAdImages setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestDeleteAdImages setHash (String hash) {
this.setParam("hash", hash);
return this;
}
public APIRequestDeleteAdImages requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestDeleteAdImages requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAdImages requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestDeleteAdImages requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAdImages requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestDeleteAdImages requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAdImages extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"biz_tag_id",
"business_id",
"hashes",
"minheight",
"minwidth",
"name",
};
public static final String[] FIELDS = {
"account_id",
"created_time",
"creatives",
"hash",
"height",
"id",
"is_associated_creatives_in_adgroups",
"name",
"original_height",
"original_width",
"permalink_url",
"status",
"updated_time",
"url",
"url_128",
"width",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return AdImage.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAdImages(String nodeId, APIContext context) {
super(context, nodeId, "/adimages", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdImages setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdImages setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdImages setBizTagId (Long bizTagId) {
this.setParam("biz_tag_id", bizTagId);
return this;
}
public APIRequestGetAdImages setBizTagId (String bizTagId) {
this.setParam("biz_tag_id", bizTagId);
return this;
}
public APIRequestGetAdImages setBusinessId (String businessId) {
this.setParam("business_id", businessId);
return this;
}
public APIRequestGetAdImages setHashes (List hashes) {
this.setParam("hashes", hashes);
return this;
}
public APIRequestGetAdImages setHashes (String hashes) {
this.setParam("hashes", hashes);
return this;
}
public APIRequestGetAdImages setMinheight (Long minheight) {
this.setParam("minheight", minheight);
return this;
}
public APIRequestGetAdImages setMinheight (String minheight) {
this.setParam("minheight", minheight);
return this;
}
public APIRequestGetAdImages setMinwidth (Long minwidth) {
this.setParam("minwidth", minwidth);
return this;
}
public APIRequestGetAdImages setMinwidth (String minwidth) {
this.setParam("minwidth", minwidth);
return this;
}
public APIRequestGetAdImages setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestGetAdImages requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdImages requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdImages requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdImages requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdImages requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdImages requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdImages requestAccountIdField () {
return this.requestAccountIdField(true);
}
public APIRequestGetAdImages requestAccountIdField (boolean value) {
this.requestField("account_id", value);
return this;
}
public APIRequestGetAdImages requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetAdImages requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetAdImages requestCreativesField () {
return this.requestCreativesField(true);
}
public APIRequestGetAdImages requestCreativesField (boolean value) {
this.requestField("creatives", value);
return this;
}
public APIRequestGetAdImages requestHashField () {
return this.requestHashField(true);
}
public APIRequestGetAdImages requestHashField (boolean value) {
this.requestField("hash", value);
return this;
}
public APIRequestGetAdImages requestHeightField () {
return this.requestHeightField(true);
}
public APIRequestGetAdImages requestHeightField (boolean value) {
this.requestField("height", value);
return this;
}
public APIRequestGetAdImages requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdImages requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdImages requestIsAssociatedCreativesInAdgroupsField () {
return this.requestIsAssociatedCreativesInAdgroupsField(true);
}
public APIRequestGetAdImages requestIsAssociatedCreativesInAdgroupsField (boolean value) {
this.requestField("is_associated_creatives_in_adgroups", value);
return this;
}
public APIRequestGetAdImages requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAdImages requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAdImages requestOriginalHeightField () {
return this.requestOriginalHeightField(true);
}
public APIRequestGetAdImages requestOriginalHeightField (boolean value) {
this.requestField("original_height", value);
return this;
}
public APIRequestGetAdImages requestOriginalWidthField () {
return this.requestOriginalWidthField(true);
}
public APIRequestGetAdImages requestOriginalWidthField (boolean value) {
this.requestField("original_width", value);
return this;
}
public APIRequestGetAdImages requestPermalinkUrlField () {
return this.requestPermalinkUrlField(true);
}
public APIRequestGetAdImages requestPermalinkUrlField (boolean value) {
this.requestField("permalink_url", value);
return this;
}
public APIRequestGetAdImages requestStatusField () {
return this.requestStatusField(true);
}
public APIRequestGetAdImages requestStatusField (boolean value) {
this.requestField("status", value);
return this;
}
public APIRequestGetAdImages requestUpdatedTimeField () {
return this.requestUpdatedTimeField(true);
}
public APIRequestGetAdImages requestUpdatedTimeField (boolean value) {
this.requestField("updated_time", value);
return this;
}
public APIRequestGetAdImages requestUrlField () {
return this.requestUrlField(true);
}
public APIRequestGetAdImages requestUrlField (boolean value) {
this.requestField("url", value);
return this;
}
public APIRequestGetAdImages requestUrl128Field () {
return this.requestUrl128Field(true);
}
public APIRequestGetAdImages requestUrl128Field (boolean value) {
this.requestField("url_128", value);
return this;
}
public APIRequestGetAdImages requestWidthField () {
return this.requestWidthField(true);
}
public APIRequestGetAdImages requestWidthField (boolean value) {
this.requestField("width", value);
return this;
}
}
public static class APIRequestCreateAdImage extends APIRequest {
AdImage lastResponse = null;
@Override
public AdImage getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"copy_from",
"file",
};
public static final String[] FIELDS = {
};
@Override
public AdImage parseResponse(String response) throws APIException {
return AdImage.parseResponse(response, getContext(), this).head();
}
@Override
public AdImage execute() throws APIException {
return execute(new HashMap());
}
@Override
public AdImage execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestCreateAdImage(String nodeId, APIContext context) {
super(context, nodeId, "/adimages", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAdImage setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAdImage setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAdImage addUploadFile (String uploadName, File file) {
this.setParam(uploadName, file);
return this;
}
public APIRequestCreateAdImage setUseVideoEndpoint(boolean useVideoEndpoint) {
this.useVideoEndpoint = useVideoEndpoint;
return this;
}
public APIRequestCreateAdImage setCopyFrom (Object copyFrom) {
this.setParam("copy_from", copyFrom);
return this;
}
public APIRequestCreateAdImage setCopyFrom (String copyFrom) {
this.setParam("copy_from", copyFrom);
return this;
}
public APIRequestCreateAdImage requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAdImage requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdImage requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAdImage requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdImage requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAdImage requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAdLabels extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"account",
"created_time",
"id",
"name",
"updated_time",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return AdLabel.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAdLabels(String nodeId, APIContext context) {
super(context, nodeId, "/adlabels", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdLabels setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdLabels setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdLabels requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdLabels requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdLabels requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdLabels requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdLabels requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdLabels requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdLabels requestAccountField () {
return this.requestAccountField(true);
}
public APIRequestGetAdLabels requestAccountField (boolean value) {
this.requestField("account", value);
return this;
}
public APIRequestGetAdLabels requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetAdLabels requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetAdLabels requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdLabels requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdLabels requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAdLabels requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAdLabels requestUpdatedTimeField () {
return this.requestUpdatedTimeField(true);
}
public APIRequestGetAdLabels requestUpdatedTimeField (boolean value) {
this.requestField("updated_time", value);
return this;
}
}
public static class APIRequestCreateAdLabel extends APIRequest {
AdLabel lastResponse = null;
@Override
public AdLabel getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"name",
};
public static final String[] FIELDS = {
};
@Override
public AdLabel parseResponse(String response) throws APIException {
return AdLabel.parseResponse(response, getContext(), this).head();
}
@Override
public AdLabel execute() throws APIException {
return execute(new HashMap());
}
@Override
public AdLabel execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestCreateAdLabel(String nodeId, APIContext context) {
super(context, nodeId, "/adlabels", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAdLabel setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAdLabel setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAdLabel setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateAdLabel requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAdLabel requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdLabel requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAdLabel requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdLabel requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAdLabel requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAdReportRuns extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"account_id",
"async_percent_completion",
"async_status",
"date_start",
"date_stop",
"emails",
"friendly_name",
"id",
"is_bookmarked",
"is_running",
"schedule_id",
"time_completed",
"time_ref",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return AdReportRun.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAdReportRuns(String nodeId, APIContext context) {
super(context, nodeId, "/adreportruns", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdReportRuns setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdReportRuns setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdReportRuns requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdReportRuns requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdReportRuns requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdReportRuns requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdReportRuns requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdReportRuns requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdReportRuns requestAccountIdField () {
return this.requestAccountIdField(true);
}
public APIRequestGetAdReportRuns requestAccountIdField (boolean value) {
this.requestField("account_id", value);
return this;
}
public APIRequestGetAdReportRuns requestAsyncPercentCompletionField () {
return this.requestAsyncPercentCompletionField(true);
}
public APIRequestGetAdReportRuns requestAsyncPercentCompletionField (boolean value) {
this.requestField("async_percent_completion", value);
return this;
}
public APIRequestGetAdReportRuns requestAsyncStatusField () {
return this.requestAsyncStatusField(true);
}
public APIRequestGetAdReportRuns requestAsyncStatusField (boolean value) {
this.requestField("async_status", value);
return this;
}
public APIRequestGetAdReportRuns requestDateStartField () {
return this.requestDateStartField(true);
}
public APIRequestGetAdReportRuns requestDateStartField (boolean value) {
this.requestField("date_start", value);
return this;
}
public APIRequestGetAdReportRuns requestDateStopField () {
return this.requestDateStopField(true);
}
public APIRequestGetAdReportRuns requestDateStopField (boolean value) {
this.requestField("date_stop", value);
return this;
}
public APIRequestGetAdReportRuns requestEmailsField () {
return this.requestEmailsField(true);
}
public APIRequestGetAdReportRuns requestEmailsField (boolean value) {
this.requestField("emails", value);
return this;
}
public APIRequestGetAdReportRuns requestFriendlyNameField () {
return this.requestFriendlyNameField(true);
}
public APIRequestGetAdReportRuns requestFriendlyNameField (boolean value) {
this.requestField("friendly_name", value);
return this;
}
public APIRequestGetAdReportRuns requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdReportRuns requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdReportRuns requestIsBookmarkedField () {
return this.requestIsBookmarkedField(true);
}
public APIRequestGetAdReportRuns requestIsBookmarkedField (boolean value) {
this.requestField("is_bookmarked", value);
return this;
}
public APIRequestGetAdReportRuns requestIsRunningField () {
return this.requestIsRunningField(true);
}
public APIRequestGetAdReportRuns requestIsRunningField (boolean value) {
this.requestField("is_running", value);
return this;
}
public APIRequestGetAdReportRuns requestScheduleIdField () {
return this.requestScheduleIdField(true);
}
public APIRequestGetAdReportRuns requestScheduleIdField (boolean value) {
this.requestField("schedule_id", value);
return this;
}
public APIRequestGetAdReportRuns requestTimeCompletedField () {
return this.requestTimeCompletedField(true);
}
public APIRequestGetAdReportRuns requestTimeCompletedField (boolean value) {
this.requestField("time_completed", value);
return this;
}
public APIRequestGetAdReportRuns requestTimeRefField () {
return this.requestTimeRefField(true);
}
public APIRequestGetAdReportRuns requestTimeRefField (boolean value) {
this.requestField("time_ref", value);
return this;
}
}
public static class APIRequestGetAdReportSchedules extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return APINode.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAdReportSchedules(String nodeId, APIContext context) {
super(context, nodeId, "/adreportschedules", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdReportSchedules setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdReportSchedules setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdReportSchedules requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdReportSchedules requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdReportSchedules requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdReportSchedules requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdReportSchedules requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdReportSchedules requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAds extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"ad_draft_id",
"date_preset",
"effective_status",
"include_deleted",
"time_range",
"updated_since",
};
public static final String[] FIELDS = {
"account_id",
"ad_review_feedback",
"adlabels",
"adset",
"adset_id",
"bid_amount",
"bid_info",
"bid_type",
"campaign",
"campaign_id",
"configured_status",
"conversion_specs",
"created_time",
"creative",
"effective_status",
"id",
"last_updated_by_app_id",
"name",
"recommendations",
"status",
"tracking_specs",
"updated_time",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return Ad.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAds(String nodeId, APIContext context) {
super(context, nodeId, "/ads", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAds setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAds setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAds setAdDraftId (String adDraftId) {
this.setParam("ad_draft_id", adDraftId);
return this;
}
public APIRequestGetAds setDatePreset (Ad.EnumDatePreset datePreset) {
this.setParam("date_preset", datePreset);
return this;
}
public APIRequestGetAds setDatePreset (String datePreset) {
this.setParam("date_preset", datePreset);
return this;
}
public APIRequestGetAds setEffectiveStatus (List effectiveStatus) {
this.setParam("effective_status", effectiveStatus);
return this;
}
public APIRequestGetAds setEffectiveStatus (String effectiveStatus) {
this.setParam("effective_status", effectiveStatus);
return this;
}
public APIRequestGetAds setIncludeDeleted (Boolean includeDeleted) {
this.setParam("include_deleted", includeDeleted);
return this;
}
public APIRequestGetAds setIncludeDeleted (String includeDeleted) {
this.setParam("include_deleted", includeDeleted);
return this;
}
public APIRequestGetAds setTimeRange (Object timeRange) {
this.setParam("time_range", timeRange);
return this;
}
public APIRequestGetAds setTimeRange (String timeRange) {
this.setParam("time_range", timeRange);
return this;
}
public APIRequestGetAds setUpdatedSince (Long updatedSince) {
this.setParam("updated_since", updatedSince);
return this;
}
public APIRequestGetAds setUpdatedSince (String updatedSince) {
this.setParam("updated_since", updatedSince);
return this;
}
public APIRequestGetAds requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAds requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAds requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAds requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAds requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAds requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAds requestAccountIdField () {
return this.requestAccountIdField(true);
}
public APIRequestGetAds requestAccountIdField (boolean value) {
this.requestField("account_id", value);
return this;
}
public APIRequestGetAds requestAdReviewFeedbackField () {
return this.requestAdReviewFeedbackField(true);
}
public APIRequestGetAds requestAdReviewFeedbackField (boolean value) {
this.requestField("ad_review_feedback", value);
return this;
}
public APIRequestGetAds requestAdlabelsField () {
return this.requestAdlabelsField(true);
}
public APIRequestGetAds requestAdlabelsField (boolean value) {
this.requestField("adlabels", value);
return this;
}
public APIRequestGetAds requestAdsetField () {
return this.requestAdsetField(true);
}
public APIRequestGetAds requestAdsetField (boolean value) {
this.requestField("adset", value);
return this;
}
public APIRequestGetAds requestAdsetIdField () {
return this.requestAdsetIdField(true);
}
public APIRequestGetAds requestAdsetIdField (boolean value) {
this.requestField("adset_id", value);
return this;
}
public APIRequestGetAds requestBidAmountField () {
return this.requestBidAmountField(true);
}
public APIRequestGetAds requestBidAmountField (boolean value) {
this.requestField("bid_amount", value);
return this;
}
public APIRequestGetAds requestBidInfoField () {
return this.requestBidInfoField(true);
}
public APIRequestGetAds requestBidInfoField (boolean value) {
this.requestField("bid_info", value);
return this;
}
public APIRequestGetAds requestBidTypeField () {
return this.requestBidTypeField(true);
}
public APIRequestGetAds requestBidTypeField (boolean value) {
this.requestField("bid_type", value);
return this;
}
public APIRequestGetAds requestCampaignField () {
return this.requestCampaignField(true);
}
public APIRequestGetAds requestCampaignField (boolean value) {
this.requestField("campaign", value);
return this;
}
public APIRequestGetAds requestCampaignIdField () {
return this.requestCampaignIdField(true);
}
public APIRequestGetAds requestCampaignIdField (boolean value) {
this.requestField("campaign_id", value);
return this;
}
public APIRequestGetAds requestConfiguredStatusField () {
return this.requestConfiguredStatusField(true);
}
public APIRequestGetAds requestConfiguredStatusField (boolean value) {
this.requestField("configured_status", value);
return this;
}
public APIRequestGetAds requestConversionSpecsField () {
return this.requestConversionSpecsField(true);
}
public APIRequestGetAds requestConversionSpecsField (boolean value) {
this.requestField("conversion_specs", value);
return this;
}
public APIRequestGetAds requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetAds requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetAds requestCreativeField () {
return this.requestCreativeField(true);
}
public APIRequestGetAds requestCreativeField (boolean value) {
this.requestField("creative", value);
return this;
}
public APIRequestGetAds requestEffectiveStatusField () {
return this.requestEffectiveStatusField(true);
}
public APIRequestGetAds requestEffectiveStatusField (boolean value) {
this.requestField("effective_status", value);
return this;
}
public APIRequestGetAds requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAds requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAds requestLastUpdatedByAppIdField () {
return this.requestLastUpdatedByAppIdField(true);
}
public APIRequestGetAds requestLastUpdatedByAppIdField (boolean value) {
this.requestField("last_updated_by_app_id", value);
return this;
}
public APIRequestGetAds requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAds requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAds requestRecommendationsField () {
return this.requestRecommendationsField(true);
}
public APIRequestGetAds requestRecommendationsField (boolean value) {
this.requestField("recommendations", value);
return this;
}
public APIRequestGetAds requestStatusField () {
return this.requestStatusField(true);
}
public APIRequestGetAds requestStatusField (boolean value) {
this.requestField("status", value);
return this;
}
public APIRequestGetAds requestTrackingSpecsField () {
return this.requestTrackingSpecsField(true);
}
public APIRequestGetAds requestTrackingSpecsField (boolean value) {
this.requestField("tracking_specs", value);
return this;
}
public APIRequestGetAds requestUpdatedTimeField () {
return this.requestUpdatedTimeField(true);
}
public APIRequestGetAds requestUpdatedTimeField (boolean value) {
this.requestField("updated_time", value);
return this;
}
}
public static class APIRequestCreateAd extends APIRequest {
Ad lastResponse = null;
@Override
public Ad getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"adlabels",
"adset_id",
"adset_spec",
"bid_amount",
"creative",
"date_format",
"display_sequence",
"execution_options",
"name",
"redownload",
"status",
"tracking_specs",
"file",
};
public static final String[] FIELDS = {
};
@Override
public Ad parseResponse(String response) throws APIException {
return Ad.parseResponse(response, getContext(), this).head();
}
@Override
public Ad execute() throws APIException {
return execute(new HashMap());
}
@Override
public Ad execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestCreateAd(String nodeId, APIContext context) {
super(context, nodeId, "/ads", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAd setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAd setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAd addUploadFile (String uploadName, File file) {
this.setParam(uploadName, file);
return this;
}
public APIRequestCreateAd setUseVideoEndpoint(boolean useVideoEndpoint) {
this.useVideoEndpoint = useVideoEndpoint;
return this;
}
public APIRequestCreateAd setAdlabels (List adlabels) {
this.setParam("adlabels", adlabels);
return this;
}
public APIRequestCreateAd setAdlabels (String adlabels) {
this.setParam("adlabels", adlabels);
return this;
}
public APIRequestCreateAd setAdsetId (Long adsetId) {
this.setParam("adset_id", adsetId);
return this;
}
public APIRequestCreateAd setAdsetId (String adsetId) {
this.setParam("adset_id", adsetId);
return this;
}
public APIRequestCreateAd setAdsetSpec (AdSet adsetSpec) {
this.setParam("adset_spec", adsetSpec);
return this;
}
public APIRequestCreateAd setAdsetSpec (String adsetSpec) {
this.setParam("adset_spec", adsetSpec);
return this;
}
public APIRequestCreateAd setBidAmount (Long bidAmount) {
this.setParam("bid_amount", bidAmount);
return this;
}
public APIRequestCreateAd setBidAmount (String bidAmount) {
this.setParam("bid_amount", bidAmount);
return this;
}
public APIRequestCreateAd setCreative (AdCreative creative) {
this.setParam("creative", creative);
return this;
}
public APIRequestCreateAd setCreative (String creative) {
this.setParam("creative", creative);
return this;
}
public APIRequestCreateAd setDateFormat (String dateFormat) {
this.setParam("date_format", dateFormat);
return this;
}
public APIRequestCreateAd setDisplaySequence (Long displaySequence) {
this.setParam("display_sequence", displaySequence);
return this;
}
public APIRequestCreateAd setDisplaySequence (String displaySequence) {
this.setParam("display_sequence", displaySequence);
return this;
}
public APIRequestCreateAd setExecutionOptions (List executionOptions) {
this.setParam("execution_options", executionOptions);
return this;
}
public APIRequestCreateAd setExecutionOptions (String executionOptions) {
this.setParam("execution_options", executionOptions);
return this;
}
public APIRequestCreateAd setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateAd setRedownload (Boolean redownload) {
this.setParam("redownload", redownload);
return this;
}
public APIRequestCreateAd setRedownload (String redownload) {
this.setParam("redownload", redownload);
return this;
}
public APIRequestCreateAd setStatus (Ad.EnumStatus status) {
this.setParam("status", status);
return this;
}
public APIRequestCreateAd setStatus (String status) {
this.setParam("status", status);
return this;
}
public APIRequestCreateAd setTrackingSpecs (Object trackingSpecs) {
this.setParam("tracking_specs", trackingSpecs);
return this;
}
public APIRequestCreateAd setTrackingSpecs (String trackingSpecs) {
this.setParam("tracking_specs", trackingSpecs);
return this;
}
public APIRequestCreateAd requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAd requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAd requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAd requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAd requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAd requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAdsByLabels extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"ad_label_ids",
"operator",
};
public static final String[] FIELDS = {
"account_id",
"ad_review_feedback",
"adlabels",
"adset",
"adset_id",
"bid_amount",
"bid_info",
"bid_type",
"campaign",
"campaign_id",
"configured_status",
"conversion_specs",
"created_time",
"creative",
"effective_status",
"id",
"last_updated_by_app_id",
"name",
"recommendations",
"status",
"tracking_specs",
"updated_time",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return Ad.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAdsByLabels(String nodeId, APIContext context) {
super(context, nodeId, "/adsbylabels", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdsByLabels setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdsByLabels setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdsByLabels setAdLabelIds (List adLabelIds) {
this.setParam("ad_label_ids", adLabelIds);
return this;
}
public APIRequestGetAdsByLabels setAdLabelIds (String adLabelIds) {
this.setParam("ad_label_ids", adLabelIds);
return this;
}
public APIRequestGetAdsByLabels setOperator (Ad.EnumOperator operator) {
this.setParam("operator", operator);
return this;
}
public APIRequestGetAdsByLabels setOperator (String operator) {
this.setParam("operator", operator);
return this;
}
public APIRequestGetAdsByLabels requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdsByLabels requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdsByLabels requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdsByLabels requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdsByLabels requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdsByLabels requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdsByLabels requestAccountIdField () {
return this.requestAccountIdField(true);
}
public APIRequestGetAdsByLabels requestAccountIdField (boolean value) {
this.requestField("account_id", value);
return this;
}
public APIRequestGetAdsByLabels requestAdReviewFeedbackField () {
return this.requestAdReviewFeedbackField(true);
}
public APIRequestGetAdsByLabels requestAdReviewFeedbackField (boolean value) {
this.requestField("ad_review_feedback", value);
return this;
}
public APIRequestGetAdsByLabels requestAdlabelsField () {
return this.requestAdlabelsField(true);
}
public APIRequestGetAdsByLabels requestAdlabelsField (boolean value) {
this.requestField("adlabels", value);
return this;
}
public APIRequestGetAdsByLabels requestAdsetField () {
return this.requestAdsetField(true);
}
public APIRequestGetAdsByLabels requestAdsetField (boolean value) {
this.requestField("adset", value);
return this;
}
public APIRequestGetAdsByLabels requestAdsetIdField () {
return this.requestAdsetIdField(true);
}
public APIRequestGetAdsByLabels requestAdsetIdField (boolean value) {
this.requestField("adset_id", value);
return this;
}
public APIRequestGetAdsByLabels requestBidAmountField () {
return this.requestBidAmountField(true);
}
public APIRequestGetAdsByLabels requestBidAmountField (boolean value) {
this.requestField("bid_amount", value);
return this;
}
public APIRequestGetAdsByLabels requestBidInfoField () {
return this.requestBidInfoField(true);
}
public APIRequestGetAdsByLabels requestBidInfoField (boolean value) {
this.requestField("bid_info", value);
return this;
}
public APIRequestGetAdsByLabels requestBidTypeField () {
return this.requestBidTypeField(true);
}
public APIRequestGetAdsByLabels requestBidTypeField (boolean value) {
this.requestField("bid_type", value);
return this;
}
public APIRequestGetAdsByLabels requestCampaignField () {
return this.requestCampaignField(true);
}
public APIRequestGetAdsByLabels requestCampaignField (boolean value) {
this.requestField("campaign", value);
return this;
}
public APIRequestGetAdsByLabels requestCampaignIdField () {
return this.requestCampaignIdField(true);
}
public APIRequestGetAdsByLabels requestCampaignIdField (boolean value) {
this.requestField("campaign_id", value);
return this;
}
public APIRequestGetAdsByLabels requestConfiguredStatusField () {
return this.requestConfiguredStatusField(true);
}
public APIRequestGetAdsByLabels requestConfiguredStatusField (boolean value) {
this.requestField("configured_status", value);
return this;
}
public APIRequestGetAdsByLabels requestConversionSpecsField () {
return this.requestConversionSpecsField(true);
}
public APIRequestGetAdsByLabels requestConversionSpecsField (boolean value) {
this.requestField("conversion_specs", value);
return this;
}
public APIRequestGetAdsByLabels requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetAdsByLabels requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetAdsByLabels requestCreativeField () {
return this.requestCreativeField(true);
}
public APIRequestGetAdsByLabels requestCreativeField (boolean value) {
this.requestField("creative", value);
return this;
}
public APIRequestGetAdsByLabels requestEffectiveStatusField () {
return this.requestEffectiveStatusField(true);
}
public APIRequestGetAdsByLabels requestEffectiveStatusField (boolean value) {
this.requestField("effective_status", value);
return this;
}
public APIRequestGetAdsByLabels requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdsByLabels requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdsByLabels requestLastUpdatedByAppIdField () {
return this.requestLastUpdatedByAppIdField(true);
}
public APIRequestGetAdsByLabels requestLastUpdatedByAppIdField (boolean value) {
this.requestField("last_updated_by_app_id", value);
return this;
}
public APIRequestGetAdsByLabels requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAdsByLabels requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAdsByLabels requestRecommendationsField () {
return this.requestRecommendationsField(true);
}
public APIRequestGetAdsByLabels requestRecommendationsField (boolean value) {
this.requestField("recommendations", value);
return this;
}
public APIRequestGetAdsByLabels requestStatusField () {
return this.requestStatusField(true);
}
public APIRequestGetAdsByLabels requestStatusField (boolean value) {
this.requestField("status", value);
return this;
}
public APIRequestGetAdsByLabels requestTrackingSpecsField () {
return this.requestTrackingSpecsField(true);
}
public APIRequestGetAdsByLabels requestTrackingSpecsField (boolean value) {
this.requestField("tracking_specs", value);
return this;
}
public APIRequestGetAdsByLabels requestUpdatedTimeField () {
return this.requestUpdatedTimeField(true);
}
public APIRequestGetAdsByLabels requestUpdatedTimeField (boolean value) {
this.requestField("updated_time", value);
return this;
}
}
public static class APIRequestGetAdSets extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"ad_draft_id",
"date_preset",
"effective_status",
"include_deleted",
"is_completed",
"time_range",
};
public static final String[] FIELDS = {
"account_id",
"adlabels",
"adset_schedule",
"attribution_spec",
"bid_amount",
"bid_info",
"billing_event",
"budget_remaining",
"campaign",
"campaign_id",
"configured_status",
"created_time",
"creative_sequence",
"daily_budget",
"effective_status",
"end_time",
"frequency_cap",
"frequency_cap_reset_period",
"frequency_control_specs",
"id",
"is_autobid",
"is_average_price_pacing",
"lifetime_budget",
"lifetime_frequency_cap",
"lifetime_imps",
"name",
"optimization_goal",
"pacing_type",
"promoted_object",
"recommendations",
"recurring_budget_semantics",
"rf_prediction_id",
"rtb_flag",
"start_time",
"status",
"targeting",
"time_based_ad_rotation_id_blocks",
"time_based_ad_rotation_intervals",
"updated_time",
"use_new_app_click",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return AdSet.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAdSets(String nodeId, APIContext context) {
super(context, nodeId, "/adsets", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdSets setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdSets setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdSets setAdDraftId (String adDraftId) {
this.setParam("ad_draft_id", adDraftId);
return this;
}
public APIRequestGetAdSets setDatePreset (AdSet.EnumDatePreset datePreset) {
this.setParam("date_preset", datePreset);
return this;
}
public APIRequestGetAdSets setDatePreset (String datePreset) {
this.setParam("date_preset", datePreset);
return this;
}
public APIRequestGetAdSets setEffectiveStatus (List effectiveStatus) {
this.setParam("effective_status", effectiveStatus);
return this;
}
public APIRequestGetAdSets setEffectiveStatus (String effectiveStatus) {
this.setParam("effective_status", effectiveStatus);
return this;
}
public APIRequestGetAdSets setIncludeDeleted (Boolean includeDeleted) {
this.setParam("include_deleted", includeDeleted);
return this;
}
public APIRequestGetAdSets setIncludeDeleted (String includeDeleted) {
this.setParam("include_deleted", includeDeleted);
return this;
}
public APIRequestGetAdSets setIsCompleted (Boolean isCompleted) {
this.setParam("is_completed", isCompleted);
return this;
}
public APIRequestGetAdSets setIsCompleted (String isCompleted) {
this.setParam("is_completed", isCompleted);
return this;
}
public APIRequestGetAdSets setTimeRange (Object timeRange) {
this.setParam("time_range", timeRange);
return this;
}
public APIRequestGetAdSets setTimeRange (String timeRange) {
this.setParam("time_range", timeRange);
return this;
}
public APIRequestGetAdSets requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdSets requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdSets requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdSets requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdSets requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdSets requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdSets requestAccountIdField () {
return this.requestAccountIdField(true);
}
public APIRequestGetAdSets requestAccountIdField (boolean value) {
this.requestField("account_id", value);
return this;
}
public APIRequestGetAdSets requestAdlabelsField () {
return this.requestAdlabelsField(true);
}
public APIRequestGetAdSets requestAdlabelsField (boolean value) {
this.requestField("adlabels", value);
return this;
}
public APIRequestGetAdSets requestAdsetScheduleField () {
return this.requestAdsetScheduleField(true);
}
public APIRequestGetAdSets requestAdsetScheduleField (boolean value) {
this.requestField("adset_schedule", value);
return this;
}
public APIRequestGetAdSets requestAttributionSpecField () {
return this.requestAttributionSpecField(true);
}
public APIRequestGetAdSets requestAttributionSpecField (boolean value) {
this.requestField("attribution_spec", value);
return this;
}
public APIRequestGetAdSets requestBidAmountField () {
return this.requestBidAmountField(true);
}
public APIRequestGetAdSets requestBidAmountField (boolean value) {
this.requestField("bid_amount", value);
return this;
}
public APIRequestGetAdSets requestBidInfoField () {
return this.requestBidInfoField(true);
}
public APIRequestGetAdSets requestBidInfoField (boolean value) {
this.requestField("bid_info", value);
return this;
}
public APIRequestGetAdSets requestBillingEventField () {
return this.requestBillingEventField(true);
}
public APIRequestGetAdSets requestBillingEventField (boolean value) {
this.requestField("billing_event", value);
return this;
}
public APIRequestGetAdSets requestBudgetRemainingField () {
return this.requestBudgetRemainingField(true);
}
public APIRequestGetAdSets requestBudgetRemainingField (boolean value) {
this.requestField("budget_remaining", value);
return this;
}
public APIRequestGetAdSets requestCampaignField () {
return this.requestCampaignField(true);
}
public APIRequestGetAdSets requestCampaignField (boolean value) {
this.requestField("campaign", value);
return this;
}
public APIRequestGetAdSets requestCampaignIdField () {
return this.requestCampaignIdField(true);
}
public APIRequestGetAdSets requestCampaignIdField (boolean value) {
this.requestField("campaign_id", value);
return this;
}
public APIRequestGetAdSets requestConfiguredStatusField () {
return this.requestConfiguredStatusField(true);
}
public APIRequestGetAdSets requestConfiguredStatusField (boolean value) {
this.requestField("configured_status", value);
return this;
}
public APIRequestGetAdSets requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetAdSets requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetAdSets requestCreativeSequenceField () {
return this.requestCreativeSequenceField(true);
}
public APIRequestGetAdSets requestCreativeSequenceField (boolean value) {
this.requestField("creative_sequence", value);
return this;
}
public APIRequestGetAdSets requestDailyBudgetField () {
return this.requestDailyBudgetField(true);
}
public APIRequestGetAdSets requestDailyBudgetField (boolean value) {
this.requestField("daily_budget", value);
return this;
}
public APIRequestGetAdSets requestEffectiveStatusField () {
return this.requestEffectiveStatusField(true);
}
public APIRequestGetAdSets requestEffectiveStatusField (boolean value) {
this.requestField("effective_status", value);
return this;
}
public APIRequestGetAdSets requestEndTimeField () {
return this.requestEndTimeField(true);
}
public APIRequestGetAdSets requestEndTimeField (boolean value) {
this.requestField("end_time", value);
return this;
}
public APIRequestGetAdSets requestFrequencyCapField () {
return this.requestFrequencyCapField(true);
}
public APIRequestGetAdSets requestFrequencyCapField (boolean value) {
this.requestField("frequency_cap", value);
return this;
}
public APIRequestGetAdSets requestFrequencyCapResetPeriodField () {
return this.requestFrequencyCapResetPeriodField(true);
}
public APIRequestGetAdSets requestFrequencyCapResetPeriodField (boolean value) {
this.requestField("frequency_cap_reset_period", value);
return this;
}
public APIRequestGetAdSets requestFrequencyControlSpecsField () {
return this.requestFrequencyControlSpecsField(true);
}
public APIRequestGetAdSets requestFrequencyControlSpecsField (boolean value) {
this.requestField("frequency_control_specs", value);
return this;
}
public APIRequestGetAdSets requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdSets requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdSets requestIsAutobidField () {
return this.requestIsAutobidField(true);
}
public APIRequestGetAdSets requestIsAutobidField (boolean value) {
this.requestField("is_autobid", value);
return this;
}
public APIRequestGetAdSets requestIsAveragePricePacingField () {
return this.requestIsAveragePricePacingField(true);
}
public APIRequestGetAdSets requestIsAveragePricePacingField (boolean value) {
this.requestField("is_average_price_pacing", value);
return this;
}
public APIRequestGetAdSets requestLifetimeBudgetField () {
return this.requestLifetimeBudgetField(true);
}
public APIRequestGetAdSets requestLifetimeBudgetField (boolean value) {
this.requestField("lifetime_budget", value);
return this;
}
public APIRequestGetAdSets requestLifetimeFrequencyCapField () {
return this.requestLifetimeFrequencyCapField(true);
}
public APIRequestGetAdSets requestLifetimeFrequencyCapField (boolean value) {
this.requestField("lifetime_frequency_cap", value);
return this;
}
public APIRequestGetAdSets requestLifetimeImpsField () {
return this.requestLifetimeImpsField(true);
}
public APIRequestGetAdSets requestLifetimeImpsField (boolean value) {
this.requestField("lifetime_imps", value);
return this;
}
public APIRequestGetAdSets requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAdSets requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAdSets requestOptimizationGoalField () {
return this.requestOptimizationGoalField(true);
}
public APIRequestGetAdSets requestOptimizationGoalField (boolean value) {
this.requestField("optimization_goal", value);
return this;
}
public APIRequestGetAdSets requestPacingTypeField () {
return this.requestPacingTypeField(true);
}
public APIRequestGetAdSets requestPacingTypeField (boolean value) {
this.requestField("pacing_type", value);
return this;
}
public APIRequestGetAdSets requestPromotedObjectField () {
return this.requestPromotedObjectField(true);
}
public APIRequestGetAdSets requestPromotedObjectField (boolean value) {
this.requestField("promoted_object", value);
return this;
}
public APIRequestGetAdSets requestRecommendationsField () {
return this.requestRecommendationsField(true);
}
public APIRequestGetAdSets requestRecommendationsField (boolean value) {
this.requestField("recommendations", value);
return this;
}
public APIRequestGetAdSets requestRecurringBudgetSemanticsField () {
return this.requestRecurringBudgetSemanticsField(true);
}
public APIRequestGetAdSets requestRecurringBudgetSemanticsField (boolean value) {
this.requestField("recurring_budget_semantics", value);
return this;
}
public APIRequestGetAdSets requestRfPredictionIdField () {
return this.requestRfPredictionIdField(true);
}
public APIRequestGetAdSets requestRfPredictionIdField (boolean value) {
this.requestField("rf_prediction_id", value);
return this;
}
public APIRequestGetAdSets requestRtbFlagField () {
return this.requestRtbFlagField(true);
}
public APIRequestGetAdSets requestRtbFlagField (boolean value) {
this.requestField("rtb_flag", value);
return this;
}
public APIRequestGetAdSets requestStartTimeField () {
return this.requestStartTimeField(true);
}
public APIRequestGetAdSets requestStartTimeField (boolean value) {
this.requestField("start_time", value);
return this;
}
public APIRequestGetAdSets requestStatusField () {
return this.requestStatusField(true);
}
public APIRequestGetAdSets requestStatusField (boolean value) {
this.requestField("status", value);
return this;
}
public APIRequestGetAdSets requestTargetingField () {
return this.requestTargetingField(true);
}
public APIRequestGetAdSets requestTargetingField (boolean value) {
this.requestField("targeting", value);
return this;
}
public APIRequestGetAdSets requestTimeBasedAdRotationIdBlocksField () {
return this.requestTimeBasedAdRotationIdBlocksField(true);
}
public APIRequestGetAdSets requestTimeBasedAdRotationIdBlocksField (boolean value) {
this.requestField("time_based_ad_rotation_id_blocks", value);
return this;
}
public APIRequestGetAdSets requestTimeBasedAdRotationIntervalsField () {
return this.requestTimeBasedAdRotationIntervalsField(true);
}
public APIRequestGetAdSets requestTimeBasedAdRotationIntervalsField (boolean value) {
this.requestField("time_based_ad_rotation_intervals", value);
return this;
}
public APIRequestGetAdSets requestUpdatedTimeField () {
return this.requestUpdatedTimeField(true);
}
public APIRequestGetAdSets requestUpdatedTimeField (boolean value) {
this.requestField("updated_time", value);
return this;
}
public APIRequestGetAdSets requestUseNewAppClickField () {
return this.requestUseNewAppClickField(true);
}
public APIRequestGetAdSets requestUseNewAppClickField (boolean value) {
this.requestField("use_new_app_click", value);
return this;
}
}
public static class APIRequestCreateAdSet extends APIRequest {
AdSet lastResponse = null;
@Override
public AdSet getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"adlabels",
"adset_schedule",
"attribution_spec",
"bid_amount",
"billing_event",
"campaign_id",
"campaign_spec",
"creative_sequence",
"daily_budget",
"daily_imps",
"end_time",
"execution_options",
"frequency_control_specs",
"is_autobid",
"is_average_price_pacing",
"lifetime_budget",
"lifetime_imps",
"name",
"optimization_goal",
"pacing_type",
"promoted_object",
"redownload",
"rf_prediction_id",
"rtb_flag",
"start_time",
"status",
"targeting",
"time_based_ad_rotation_id_blocks",
"time_based_ad_rotation_intervals",
};
public static final String[] FIELDS = {
};
@Override
public AdSet parseResponse(String response) throws APIException {
return AdSet.parseResponse(response, getContext(), this).head();
}
@Override
public AdSet execute() throws APIException {
return execute(new HashMap());
}
@Override
public AdSet execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestCreateAdSet(String nodeId, APIContext context) {
super(context, nodeId, "/adsets", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAdSet setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAdSet setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAdSet setAdlabels (List adlabels) {
this.setParam("adlabels", adlabels);
return this;
}
public APIRequestCreateAdSet setAdlabels (String adlabels) {
this.setParam("adlabels", adlabels);
return this;
}
public APIRequestCreateAdSet setAdsetSchedule (List adsetSchedule) {
this.setParam("adset_schedule", adsetSchedule);
return this;
}
public APIRequestCreateAdSet setAdsetSchedule (String adsetSchedule) {
this.setParam("adset_schedule", adsetSchedule);
return this;
}
public APIRequestCreateAdSet setAttributionSpec (List> attributionSpec) {
this.setParam("attribution_spec", attributionSpec);
return this;
}
public APIRequestCreateAdSet setAttributionSpec (String attributionSpec) {
this.setParam("attribution_spec", attributionSpec);
return this;
}
public APIRequestCreateAdSet setBidAmount (Long bidAmount) {
this.setParam("bid_amount", bidAmount);
return this;
}
public APIRequestCreateAdSet setBidAmount (String bidAmount) {
this.setParam("bid_amount", bidAmount);
return this;
}
public APIRequestCreateAdSet setBillingEvent (AdSet.EnumBillingEvent billingEvent) {
this.setParam("billing_event", billingEvent);
return this;
}
public APIRequestCreateAdSet setBillingEvent (String billingEvent) {
this.setParam("billing_event", billingEvent);
return this;
}
public APIRequestCreateAdSet setCampaignId (String campaignId) {
this.setParam("campaign_id", campaignId);
return this;
}
public APIRequestCreateAdSet setCampaignSpec (Object campaignSpec) {
this.setParam("campaign_spec", campaignSpec);
return this;
}
public APIRequestCreateAdSet setCampaignSpec (String campaignSpec) {
this.setParam("campaign_spec", campaignSpec);
return this;
}
public APIRequestCreateAdSet setCreativeSequence (List creativeSequence) {
this.setParam("creative_sequence", creativeSequence);
return this;
}
public APIRequestCreateAdSet setCreativeSequence (String creativeSequence) {
this.setParam("creative_sequence", creativeSequence);
return this;
}
public APIRequestCreateAdSet setDailyBudget (Long dailyBudget) {
this.setParam("daily_budget", dailyBudget);
return this;
}
public APIRequestCreateAdSet setDailyBudget (String dailyBudget) {
this.setParam("daily_budget", dailyBudget);
return this;
}
public APIRequestCreateAdSet setDailyImps (Long dailyImps) {
this.setParam("daily_imps", dailyImps);
return this;
}
public APIRequestCreateAdSet setDailyImps (String dailyImps) {
this.setParam("daily_imps", dailyImps);
return this;
}
public APIRequestCreateAdSet setEndTime (String endTime) {
this.setParam("end_time", endTime);
return this;
}
public APIRequestCreateAdSet setExecutionOptions (List executionOptions) {
this.setParam("execution_options", executionOptions);
return this;
}
public APIRequestCreateAdSet setExecutionOptions (String executionOptions) {
this.setParam("execution_options", executionOptions);
return this;
}
public APIRequestCreateAdSet setFrequencyControlSpecs (List frequencyControlSpecs) {
this.setParam("frequency_control_specs", frequencyControlSpecs);
return this;
}
public APIRequestCreateAdSet setFrequencyControlSpecs (String frequencyControlSpecs) {
this.setParam("frequency_control_specs", frequencyControlSpecs);
return this;
}
public APIRequestCreateAdSet setIsAutobid (Boolean isAutobid) {
this.setParam("is_autobid", isAutobid);
return this;
}
public APIRequestCreateAdSet setIsAutobid (String isAutobid) {
this.setParam("is_autobid", isAutobid);
return this;
}
public APIRequestCreateAdSet setIsAveragePricePacing (Boolean isAveragePricePacing) {
this.setParam("is_average_price_pacing", isAveragePricePacing);
return this;
}
public APIRequestCreateAdSet setIsAveragePricePacing (String isAveragePricePacing) {
this.setParam("is_average_price_pacing", isAveragePricePacing);
return this;
}
public APIRequestCreateAdSet setLifetimeBudget (Long lifetimeBudget) {
this.setParam("lifetime_budget", lifetimeBudget);
return this;
}
public APIRequestCreateAdSet setLifetimeBudget (String lifetimeBudget) {
this.setParam("lifetime_budget", lifetimeBudget);
return this;
}
public APIRequestCreateAdSet setLifetimeImps (Long lifetimeImps) {
this.setParam("lifetime_imps", lifetimeImps);
return this;
}
public APIRequestCreateAdSet setLifetimeImps (String lifetimeImps) {
this.setParam("lifetime_imps", lifetimeImps);
return this;
}
public APIRequestCreateAdSet setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateAdSet setOptimizationGoal (AdSet.EnumOptimizationGoal optimizationGoal) {
this.setParam("optimization_goal", optimizationGoal);
return this;
}
public APIRequestCreateAdSet setOptimizationGoal (String optimizationGoal) {
this.setParam("optimization_goal", optimizationGoal);
return this;
}
public APIRequestCreateAdSet setPacingType (List pacingType) {
this.setParam("pacing_type", pacingType);
return this;
}
public APIRequestCreateAdSet setPacingType (String pacingType) {
this.setParam("pacing_type", pacingType);
return this;
}
public APIRequestCreateAdSet setPromotedObject (Object promotedObject) {
this.setParam("promoted_object", promotedObject);
return this;
}
public APIRequestCreateAdSet setPromotedObject (String promotedObject) {
this.setParam("promoted_object", promotedObject);
return this;
}
public APIRequestCreateAdSet setRedownload (Boolean redownload) {
this.setParam("redownload", redownload);
return this;
}
public APIRequestCreateAdSet setRedownload (String redownload) {
this.setParam("redownload", redownload);
return this;
}
public APIRequestCreateAdSet setRfPredictionId (String rfPredictionId) {
this.setParam("rf_prediction_id", rfPredictionId);
return this;
}
public APIRequestCreateAdSet setRtbFlag (Boolean rtbFlag) {
this.setParam("rtb_flag", rtbFlag);
return this;
}
public APIRequestCreateAdSet setRtbFlag (String rtbFlag) {
this.setParam("rtb_flag", rtbFlag);
return this;
}
public APIRequestCreateAdSet setStartTime (String startTime) {
this.setParam("start_time", startTime);
return this;
}
public APIRequestCreateAdSet setStatus (AdSet.EnumStatus status) {
this.setParam("status", status);
return this;
}
public APIRequestCreateAdSet setStatus (String status) {
this.setParam("status", status);
return this;
}
public APIRequestCreateAdSet setTargeting (Targeting targeting) {
this.setParam("targeting", targeting);
return this;
}
public APIRequestCreateAdSet setTargeting (String targeting) {
this.setParam("targeting", targeting);
return this;
}
public APIRequestCreateAdSet setTimeBasedAdRotationIdBlocks (List> timeBasedAdRotationIdBlocks) {
this.setParam("time_based_ad_rotation_id_blocks", timeBasedAdRotationIdBlocks);
return this;
}
public APIRequestCreateAdSet setTimeBasedAdRotationIdBlocks (String timeBasedAdRotationIdBlocks) {
this.setParam("time_based_ad_rotation_id_blocks", timeBasedAdRotationIdBlocks);
return this;
}
public APIRequestCreateAdSet setTimeBasedAdRotationIntervals (List timeBasedAdRotationIntervals) {
this.setParam("time_based_ad_rotation_intervals", timeBasedAdRotationIntervals);
return this;
}
public APIRequestCreateAdSet setTimeBasedAdRotationIntervals (String timeBasedAdRotationIntervals) {
this.setParam("time_based_ad_rotation_intervals", timeBasedAdRotationIntervals);
return this;
}
public APIRequestCreateAdSet requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAdSet requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdSet requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAdSet requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdSet requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAdSet requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAdSetsByLabels extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"ad_label_ids",
"operator",
};
public static final String[] FIELDS = {
"account_id",
"adlabels",
"adset_schedule",
"attribution_spec",
"bid_amount",
"bid_info",
"billing_event",
"budget_remaining",
"campaign",
"campaign_id",
"configured_status",
"created_time",
"creative_sequence",
"daily_budget",
"effective_status",
"end_time",
"frequency_cap",
"frequency_cap_reset_period",
"frequency_control_specs",
"id",
"is_autobid",
"is_average_price_pacing",
"lifetime_budget",
"lifetime_frequency_cap",
"lifetime_imps",
"name",
"optimization_goal",
"pacing_type",
"promoted_object",
"recommendations",
"recurring_budget_semantics",
"rf_prediction_id",
"rtb_flag",
"start_time",
"status",
"targeting",
"time_based_ad_rotation_id_blocks",
"time_based_ad_rotation_intervals",
"updated_time",
"use_new_app_click",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return AdSet.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAdSetsByLabels(String nodeId, APIContext context) {
super(context, nodeId, "/adsetsbylabels", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdSetsByLabels setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdSetsByLabels setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdSetsByLabels setAdLabelIds (List adLabelIds) {
this.setParam("ad_label_ids", adLabelIds);
return this;
}
public APIRequestGetAdSetsByLabels setAdLabelIds (String adLabelIds) {
this.setParam("ad_label_ids", adLabelIds);
return this;
}
public APIRequestGetAdSetsByLabels setOperator (AdSet.EnumOperator operator) {
this.setParam("operator", operator);
return this;
}
public APIRequestGetAdSetsByLabels setOperator (String operator) {
this.setParam("operator", operator);
return this;
}
public APIRequestGetAdSetsByLabels requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdSetsByLabels requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdSetsByLabels requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdSetsByLabels requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdSetsByLabels requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdSetsByLabels requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdSetsByLabels requestAccountIdField () {
return this.requestAccountIdField(true);
}
public APIRequestGetAdSetsByLabels requestAccountIdField (boolean value) {
this.requestField("account_id", value);
return this;
}
public APIRequestGetAdSetsByLabels requestAdlabelsField () {
return this.requestAdlabelsField(true);
}
public APIRequestGetAdSetsByLabels requestAdlabelsField (boolean value) {
this.requestField("adlabels", value);
return this;
}
public APIRequestGetAdSetsByLabels requestAdsetScheduleField () {
return this.requestAdsetScheduleField(true);
}
public APIRequestGetAdSetsByLabels requestAdsetScheduleField (boolean value) {
this.requestField("adset_schedule", value);
return this;
}
public APIRequestGetAdSetsByLabels requestAttributionSpecField () {
return this.requestAttributionSpecField(true);
}
public APIRequestGetAdSetsByLabels requestAttributionSpecField (boolean value) {
this.requestField("attribution_spec", value);
return this;
}
public APIRequestGetAdSetsByLabels requestBidAmountField () {
return this.requestBidAmountField(true);
}
public APIRequestGetAdSetsByLabels requestBidAmountField (boolean value) {
this.requestField("bid_amount", value);
return this;
}
public APIRequestGetAdSetsByLabels requestBidInfoField () {
return this.requestBidInfoField(true);
}
public APIRequestGetAdSetsByLabels requestBidInfoField (boolean value) {
this.requestField("bid_info", value);
return this;
}
public APIRequestGetAdSetsByLabels requestBillingEventField () {
return this.requestBillingEventField(true);
}
public APIRequestGetAdSetsByLabels requestBillingEventField (boolean value) {
this.requestField("billing_event", value);
return this;
}
public APIRequestGetAdSetsByLabels requestBudgetRemainingField () {
return this.requestBudgetRemainingField(true);
}
public APIRequestGetAdSetsByLabels requestBudgetRemainingField (boolean value) {
this.requestField("budget_remaining", value);
return this;
}
public APIRequestGetAdSetsByLabels requestCampaignField () {
return this.requestCampaignField(true);
}
public APIRequestGetAdSetsByLabels requestCampaignField (boolean value) {
this.requestField("campaign", value);
return this;
}
public APIRequestGetAdSetsByLabels requestCampaignIdField () {
return this.requestCampaignIdField(true);
}
public APIRequestGetAdSetsByLabels requestCampaignIdField (boolean value) {
this.requestField("campaign_id", value);
return this;
}
public APIRequestGetAdSetsByLabels requestConfiguredStatusField () {
return this.requestConfiguredStatusField(true);
}
public APIRequestGetAdSetsByLabels requestConfiguredStatusField (boolean value) {
this.requestField("configured_status", value);
return this;
}
public APIRequestGetAdSetsByLabels requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetAdSetsByLabels requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetAdSetsByLabels requestCreativeSequenceField () {
return this.requestCreativeSequenceField(true);
}
public APIRequestGetAdSetsByLabels requestCreativeSequenceField (boolean value) {
this.requestField("creative_sequence", value);
return this;
}
public APIRequestGetAdSetsByLabels requestDailyBudgetField () {
return this.requestDailyBudgetField(true);
}
public APIRequestGetAdSetsByLabels requestDailyBudgetField (boolean value) {
this.requestField("daily_budget", value);
return this;
}
public APIRequestGetAdSetsByLabels requestEffectiveStatusField () {
return this.requestEffectiveStatusField(true);
}
public APIRequestGetAdSetsByLabels requestEffectiveStatusField (boolean value) {
this.requestField("effective_status", value);
return this;
}
public APIRequestGetAdSetsByLabels requestEndTimeField () {
return this.requestEndTimeField(true);
}
public APIRequestGetAdSetsByLabels requestEndTimeField (boolean value) {
this.requestField("end_time", value);
return this;
}
public APIRequestGetAdSetsByLabels requestFrequencyCapField () {
return this.requestFrequencyCapField(true);
}
public APIRequestGetAdSetsByLabels requestFrequencyCapField (boolean value) {
this.requestField("frequency_cap", value);
return this;
}
public APIRequestGetAdSetsByLabels requestFrequencyCapResetPeriodField () {
return this.requestFrequencyCapResetPeriodField(true);
}
public APIRequestGetAdSetsByLabels requestFrequencyCapResetPeriodField (boolean value) {
this.requestField("frequency_cap_reset_period", value);
return this;
}
public APIRequestGetAdSetsByLabels requestFrequencyControlSpecsField () {
return this.requestFrequencyControlSpecsField(true);
}
public APIRequestGetAdSetsByLabels requestFrequencyControlSpecsField (boolean value) {
this.requestField("frequency_control_specs", value);
return this;
}
public APIRequestGetAdSetsByLabels requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdSetsByLabels requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdSetsByLabels requestIsAutobidField () {
return this.requestIsAutobidField(true);
}
public APIRequestGetAdSetsByLabels requestIsAutobidField (boolean value) {
this.requestField("is_autobid", value);
return this;
}
public APIRequestGetAdSetsByLabels requestIsAveragePricePacingField () {
return this.requestIsAveragePricePacingField(true);
}
public APIRequestGetAdSetsByLabels requestIsAveragePricePacingField (boolean value) {
this.requestField("is_average_price_pacing", value);
return this;
}
public APIRequestGetAdSetsByLabels requestLifetimeBudgetField () {
return this.requestLifetimeBudgetField(true);
}
public APIRequestGetAdSetsByLabels requestLifetimeBudgetField (boolean value) {
this.requestField("lifetime_budget", value);
return this;
}
public APIRequestGetAdSetsByLabels requestLifetimeFrequencyCapField () {
return this.requestLifetimeFrequencyCapField(true);
}
public APIRequestGetAdSetsByLabels requestLifetimeFrequencyCapField (boolean value) {
this.requestField("lifetime_frequency_cap", value);
return this;
}
public APIRequestGetAdSetsByLabels requestLifetimeImpsField () {
return this.requestLifetimeImpsField(true);
}
public APIRequestGetAdSetsByLabels requestLifetimeImpsField (boolean value) {
this.requestField("lifetime_imps", value);
return this;
}
public APIRequestGetAdSetsByLabels requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAdSetsByLabels requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAdSetsByLabels requestOptimizationGoalField () {
return this.requestOptimizationGoalField(true);
}
public APIRequestGetAdSetsByLabels requestOptimizationGoalField (boolean value) {
this.requestField("optimization_goal", value);
return this;
}
public APIRequestGetAdSetsByLabels requestPacingTypeField () {
return this.requestPacingTypeField(true);
}
public APIRequestGetAdSetsByLabels requestPacingTypeField (boolean value) {
this.requestField("pacing_type", value);
return this;
}
public APIRequestGetAdSetsByLabels requestPromotedObjectField () {
return this.requestPromotedObjectField(true);
}
public APIRequestGetAdSetsByLabels requestPromotedObjectField (boolean value) {
this.requestField("promoted_object", value);
return this;
}
public APIRequestGetAdSetsByLabels requestRecommendationsField () {
return this.requestRecommendationsField(true);
}
public APIRequestGetAdSetsByLabels requestRecommendationsField (boolean value) {
this.requestField("recommendations", value);
return this;
}
public APIRequestGetAdSetsByLabels requestRecurringBudgetSemanticsField () {
return this.requestRecurringBudgetSemanticsField(true);
}
public APIRequestGetAdSetsByLabels requestRecurringBudgetSemanticsField (boolean value) {
this.requestField("recurring_budget_semantics", value);
return this;
}
public APIRequestGetAdSetsByLabels requestRfPredictionIdField () {
return this.requestRfPredictionIdField(true);
}
public APIRequestGetAdSetsByLabels requestRfPredictionIdField (boolean value) {
this.requestField("rf_prediction_id", value);
return this;
}
public APIRequestGetAdSetsByLabels requestRtbFlagField () {
return this.requestRtbFlagField(true);
}
public APIRequestGetAdSetsByLabels requestRtbFlagField (boolean value) {
this.requestField("rtb_flag", value);
return this;
}
public APIRequestGetAdSetsByLabels requestStartTimeField () {
return this.requestStartTimeField(true);
}
public APIRequestGetAdSetsByLabels requestStartTimeField (boolean value) {
this.requestField("start_time", value);
return this;
}
public APIRequestGetAdSetsByLabels requestStatusField () {
return this.requestStatusField(true);
}
public APIRequestGetAdSetsByLabels requestStatusField (boolean value) {
this.requestField("status", value);
return this;
}
public APIRequestGetAdSetsByLabels requestTargetingField () {
return this.requestTargetingField(true);
}
public APIRequestGetAdSetsByLabels requestTargetingField (boolean value) {
this.requestField("targeting", value);
return this;
}
public APIRequestGetAdSetsByLabels requestTimeBasedAdRotationIdBlocksField () {
return this.requestTimeBasedAdRotationIdBlocksField(true);
}
public APIRequestGetAdSetsByLabels requestTimeBasedAdRotationIdBlocksField (boolean value) {
this.requestField("time_based_ad_rotation_id_blocks", value);
return this;
}
public APIRequestGetAdSetsByLabels requestTimeBasedAdRotationIntervalsField () {
return this.requestTimeBasedAdRotationIntervalsField(true);
}
public APIRequestGetAdSetsByLabels requestTimeBasedAdRotationIntervalsField (boolean value) {
this.requestField("time_based_ad_rotation_intervals", value);
return this;
}
public APIRequestGetAdSetsByLabels requestUpdatedTimeField () {
return this.requestUpdatedTimeField(true);
}
public APIRequestGetAdSetsByLabels requestUpdatedTimeField (boolean value) {
this.requestField("updated_time", value);
return this;
}
public APIRequestGetAdSetsByLabels requestUseNewAppClickField () {
return this.requestUseNewAppClickField(true);
}
public APIRequestGetAdSetsByLabels requestUseNewAppClickField (boolean value) {
this.requestField("use_new_app_click", value);
return this;
}
}
public static class APIRequestGetAdsPixels extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"code",
"creation_time",
"id",
"is_created_by_business",
"last_fired_time",
"name",
"owner_ad_account",
"owner_business",
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return AdsPixel.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestGetAdsPixels(String nodeId, APIContext context) {
super(context, nodeId, "/adspixels", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdsPixels setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdsPixels setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdsPixels requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdsPixels requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdsPixels requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdsPixels requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdsPixels requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdsPixels requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdsPixels requestCodeField () {
return this.requestCodeField(true);
}
public APIRequestGetAdsPixels requestCodeField (boolean value) {
this.requestField("code", value);
return this;
}
public APIRequestGetAdsPixels requestCreationTimeField () {
return this.requestCreationTimeField(true);
}
public APIRequestGetAdsPixels requestCreationTimeField (boolean value) {
this.requestField("creation_time", value);
return this;
}
public APIRequestGetAdsPixels requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdsPixels requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdsPixels requestIsCreatedByBusinessField () {
return this.requestIsCreatedByBusinessField(true);
}
public APIRequestGetAdsPixels requestIsCreatedByBusinessField (boolean value) {
this.requestField("is_created_by_business", value);
return this;
}
public APIRequestGetAdsPixels requestLastFiredTimeField () {
return this.requestLastFiredTimeField(true);
}
public APIRequestGetAdsPixels requestLastFiredTimeField (boolean value) {
this.requestField("last_fired_time", value);
return this;
}
public APIRequestGetAdsPixels requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAdsPixels requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAdsPixels requestOwnerAdAccountField () {
return this.requestOwnerAdAccountField(true);
}
public APIRequestGetAdsPixels requestOwnerAdAccountField (boolean value) {
this.requestField("owner_ad_account", value);
return this;
}
public APIRequestGetAdsPixels requestOwnerBusinessField () {
return this.requestOwnerBusinessField(true);
}
public APIRequestGetAdsPixels requestOwnerBusinessField (boolean value) {
this.requestField("owner_business", value);
return this;
}
}
public static class APIRequestCreateAdsPixel extends APIRequest {
AdsPixel lastResponse = null;
@Override
public AdsPixel getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"name",
};
public static final String[] FIELDS = {
};
@Override
public AdsPixel parseResponse(String response) throws APIException {
return AdsPixel.parseResponse(response, getContext(), this).head();
}
@Override
public AdsPixel execute() throws APIException {
return execute(new HashMap());
}
@Override
public AdsPixel execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public APIRequestCreateAdsPixel(String nodeId, APIContext context) {
super(context, nodeId, "/adspixels", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAdsPixel setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAdsPixel setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAdsPixel setName (String name) {
this.setParam("name", name);
return this;
}
public APIRequestCreateAdsPixel requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAdsPixel requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdsPixel requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAdsPixel requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAdsPixel requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAdsPixel requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAdvertisableApplications extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"app_id",
"business_id",
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return APINode.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
lastResponse = parseResponse(executeInternal(extraParams));
return lastResponse;
}
public 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 setAppId (String appId) {
this.setParam("app_id", appId);
return this;
}
public APIRequestGetAdvertisableApplications setBusinessId (String businessId) {
this.setParam("business_id", businessId);
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 static class APIRequestGetAdVideos extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response) throws APIException {
return APINode.parseResponse(response, getContext(), this);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap