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.Page Maven / Gradle / Ivy
/**
* Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to
* use, copy, modify, and distribute this software in source code or binary
* form for use in connection with the web services and APIs provided by
* Facebook.
*
* As with any software that integrates with the Facebook platform, your use
* of this software is subject to the Facebook Developer Principles and
* Policies [http://developers.facebook.com/policy/]. This copyright notice
* shall be included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*/
package com.facebook.ads.sdk;
import java.io.File;
import java.lang.reflect.Modifier;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.common.base.Function;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;
import com.google.gson.JsonObject;
import com.google.gson.JsonArray;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import com.facebook.ads.sdk.APIException.MalformedResponseException;
/**
* This class is auto-generated.
*
* For any issues or feature requests related to this class, please let us know
* on github and we'll fix in our codegen framework. We'll not be able to accept
* pull request for this class.
*
*/
public class Page extends APINode {
@SerializedName("about")
private String mAbout = null;
@SerializedName("access_token")
private String mAccessToken = null;
@SerializedName("ad_campaign")
private AdSet mAdCampaign = null;
@SerializedName("affiliation")
private String mAffiliation = null;
@SerializedName("app_id")
private String mAppId = null;
@SerializedName("artists_we_like")
private String mArtistsWeLike = null;
@SerializedName("attire")
private String mAttire = null;
@SerializedName("awards")
private String mAwards = null;
@SerializedName("band_interests")
private String mBandInterests = null;
@SerializedName("band_members")
private String mBandMembers = null;
@SerializedName("best_page")
private Page mBestPage = null;
@SerializedName("bio")
private String mBio = null;
@SerializedName("birthday")
private String mBirthday = null;
@SerializedName("booking_agent")
private String mBookingAgent = null;
@SerializedName("built")
private String mBuilt = null;
@SerializedName("business")
private Object mBusiness = null;
@SerializedName("can_checkin")
private Boolean mCanCheckin = null;
@SerializedName("can_post")
private Boolean mCanPost = null;
@SerializedName("category")
private String mCategory = null;
@SerializedName("category_list")
private List mCategoryList = null;
@SerializedName("checkins")
private Long mCheckins = null;
@SerializedName("company_overview")
private String mCompanyOverview = null;
@SerializedName("connected_instagram_account")
private IGUser mConnectedInstagramAccount = null;
@SerializedName("connected_page_backed_instagram_account")
private IGUser mConnectedPageBackedInstagramAccount = null;
@SerializedName("contact_address")
private MailingAddress mContactAddress = null;
@SerializedName("copyright_whitelisted_ig_partners")
private List mCopyrightWhitelistedIgPartners = null;
@SerializedName("country_page_likes")
private Long mCountryPageLikes = null;
@SerializedName("cover")
private CoverPhoto mCover = null;
@SerializedName("culinary_team")
private String mCulinaryTeam = null;
@SerializedName("current_location")
private String mCurrentLocation = null;
@SerializedName("delivery_and_pickup_option_info")
private List mDeliveryAndPickupOptionInfo = null;
@SerializedName("description")
private String mDescription = null;
@SerializedName("description_html")
private String mDescriptionHtml = null;
@SerializedName("differently_open_offerings")
private Map mDifferentlyOpenOfferings = null;
@SerializedName("directed_by")
private String mDirectedBy = null;
@SerializedName("display_subtext")
private String mDisplaySubtext = null;
@SerializedName("displayed_message_response_time")
private String mDisplayedMessageResponseTime = null;
@SerializedName("emails")
private List mEmails = null;
@SerializedName("engagement")
private Engagement mEngagement = null;
@SerializedName("fan_count")
private Long mFanCount = null;
@SerializedName("featured_video")
private AdVideo mFeaturedVideo = null;
@SerializedName("features")
private String mFeatures = null;
@SerializedName("followers_count")
private Long mFollowersCount = null;
@SerializedName("food_styles")
private List mFoodStyles = null;
@SerializedName("founded")
private String mFounded = null;
@SerializedName("general_info")
private String mGeneralInfo = null;
@SerializedName("general_manager")
private String mGeneralManager = null;
@SerializedName("genre")
private String mGenre = null;
@SerializedName("global_brand_page_name")
private String mGlobalBrandPageName = null;
@SerializedName("global_brand_root_id")
private String mGlobalBrandRootId = null;
@SerializedName("has_added_app")
private Boolean mHasAddedApp = null;
@SerializedName("has_transitioned_to_new_page_experience")
private Boolean mHasTransitionedToNewPageExperience = null;
@SerializedName("has_whatsapp_business_number")
private Boolean mHasWhatsappBusinessNumber = null;
@SerializedName("has_whatsapp_number")
private Boolean mHasWhatsappNumber = null;
@SerializedName("hometown")
private String mHometown = null;
@SerializedName("hours")
private Map mHours = null;
@SerializedName("id")
private String mId = null;
@SerializedName("impressum")
private String mImpressum = null;
@SerializedName("influences")
private String mInfluences = null;
@SerializedName("instagram_business_account")
private IGUser mInstagramBusinessAccount = null;
@SerializedName("instant_articles_review_status")
private String mInstantArticlesReviewStatus = null;
@SerializedName("is_always_open")
private Boolean mIsAlwaysOpen = null;
@SerializedName("is_chain")
private Boolean mIsChain = null;
@SerializedName("is_community_page")
private Boolean mIsCommunityPage = null;
@SerializedName("is_eligible_for_branded_content")
private Boolean mIsEligibleForBrandedContent = null;
@SerializedName("is_messenger_bot_get_started_enabled")
private Boolean mIsMessengerBotGetStartedEnabled = null;
@SerializedName("is_messenger_platform_bot")
private Boolean mIsMessengerPlatformBot = null;
@SerializedName("is_owned")
private Boolean mIsOwned = null;
@SerializedName("is_permanently_closed")
private Boolean mIsPermanentlyClosed = null;
@SerializedName("is_published")
private Boolean mIsPublished = null;
@SerializedName("is_unclaimed")
private Boolean mIsUnclaimed = null;
@SerializedName("is_verified")
private Boolean mIsVerified = null;
@SerializedName("is_webhooks_subscribed")
private Boolean mIsWebhooksSubscribed = null;
@SerializedName("keywords")
private Object mKeywords = null;
@SerializedName("leadgen_tos_acceptance_time")
private String mLeadgenTosAcceptanceTime = null;
@SerializedName("leadgen_tos_accepted")
private Boolean mLeadgenTosAccepted = null;
@SerializedName("leadgen_tos_accepting_user")
private User mLeadgenTosAcceptingUser = null;
@SerializedName("link")
private String mLink = null;
@SerializedName("location")
private Location mLocation = null;
@SerializedName("members")
private String mMembers = null;
@SerializedName("merchant_id")
private String mMerchantId = null;
@SerializedName("merchant_review_status")
private String mMerchantReviewStatus = null;
@SerializedName("messenger_ads_default_icebreakers")
private List mMessengerAdsDefaultIcebreakers = null;
@SerializedName("messenger_ads_default_page_welcome_message")
private MessengerDestinationPageWelcomeMessage mMessengerAdsDefaultPageWelcomeMessage = null;
@SerializedName("messenger_ads_default_quick_replies")
private List mMessengerAdsDefaultQuickReplies = null;
@SerializedName("messenger_ads_quick_replies_type")
private String mMessengerAdsQuickRepliesType = null;
@SerializedName("mission")
private String mMission = null;
@SerializedName("mpg")
private String mMpg = null;
@SerializedName("name")
private String mName = null;
@SerializedName("name_with_location_descriptor")
private String mNameWithLocationDescriptor = null;
@SerializedName("network")
private String mNetwork = null;
@SerializedName("new_like_count")
private Long mNewLikeCount = null;
@SerializedName("offer_eligible")
private Boolean mOfferEligible = null;
@SerializedName("overall_star_rating")
private Double mOverallStarRating = null;
@SerializedName("page_token")
private String mPageToken = null;
@SerializedName("parent_page")
private Page mParentPage = null;
@SerializedName("parking")
private PageParking mParking = null;
@SerializedName("payment_options")
private PagePaymentOptions mPaymentOptions = null;
@SerializedName("personal_info")
private String mPersonalInfo = null;
@SerializedName("personal_interests")
private String mPersonalInterests = null;
@SerializedName("pharma_safety_info")
private String mPharmaSafetyInfo = null;
@SerializedName("phone")
private String mPhone = null;
@SerializedName("pickup_options")
private List mPickupOptions = null;
@SerializedName("place_type")
private String mPlaceType = null;
@SerializedName("plot_outline")
private String mPlotOutline = null;
@SerializedName("preferred_audience")
private Targeting mPreferredAudience = null;
@SerializedName("press_contact")
private String mPressContact = null;
@SerializedName("price_range")
private String mPriceRange = null;
@SerializedName("privacy_info_url")
private String mPrivacyInfoUrl = null;
@SerializedName("produced_by")
private String mProducedBy = null;
@SerializedName("products")
private String mProducts = null;
@SerializedName("promotion_eligible")
private Boolean mPromotionEligible = null;
@SerializedName("promotion_ineligible_reason")
private String mPromotionIneligibleReason = null;
@SerializedName("public_transit")
private String mPublicTransit = null;
@SerializedName("rating_count")
private Long mRatingCount = null;
@SerializedName("recipient")
private String mRecipient = null;
@SerializedName("record_label")
private String mRecordLabel = null;
@SerializedName("release_date")
private String mReleaseDate = null;
@SerializedName("restaurant_services")
private PageRestaurantServices mRestaurantServices = null;
@SerializedName("restaurant_specialties")
private PageRestaurantSpecialties mRestaurantSpecialties = null;
@SerializedName("schedule")
private String mSchedule = null;
@SerializedName("screenplay_by")
private String mScreenplayBy = null;
@SerializedName("season")
private String mSeason = null;
@SerializedName("single_line_address")
private String mSingleLineAddress = null;
@SerializedName("starring")
private String mStarring = null;
@SerializedName("start_info")
private PageStartInfo mStartInfo = null;
@SerializedName("store_code")
private String mStoreCode = null;
@SerializedName("store_location_descriptor")
private String mStoreLocationDescriptor = null;
@SerializedName("store_number")
private Long mStoreNumber = null;
@SerializedName("studio")
private String mStudio = null;
@SerializedName("supports_donate_button_in_live_video")
private Boolean mSupportsDonateButtonInLiveVideo = null;
@SerializedName("supports_instant_articles")
private Boolean mSupportsInstantArticles = null;
@SerializedName("talking_about_count")
private Long mTalkingAboutCount = null;
@SerializedName("temporary_status")
private String mTemporaryStatus = null;
@SerializedName("unread_message_count")
private Long mUnreadMessageCount = null;
@SerializedName("unread_notif_count")
private Long mUnreadNotifCount = null;
@SerializedName("unseen_message_count")
private Long mUnseenMessageCount = null;
@SerializedName("username")
private String mUsername = null;
@SerializedName("verification_status")
private String mVerificationStatus = null;
@SerializedName("voip_info")
private VoipInfo mVoipInfo = null;
@SerializedName("website")
private String mWebsite = null;
@SerializedName("were_here_count")
private Long mWereHereCount = null;
@SerializedName("whatsapp_number")
private String mWhatsappNumber = null;
@SerializedName("written_by")
private String mWrittenBy = null;
protected static Gson gson = null;
Page() {
}
public Page(Long id, APIContext context) {
this(id.toString(), context);
}
public Page(String id, APIContext context) {
this.mId = id;
this.context = context;
}
public Page fetch() throws APIException{
Page newInstance = fetchById(this.getPrefixedId().toString(), this.context);
this.copyFrom(newInstance);
return this;
}
public static Page fetchById(Long id, APIContext context) throws APIException {
return fetchById(id.toString(), context);
}
public static ListenableFuture fetchByIdAsync(Long id, APIContext context) throws APIException {
return fetchByIdAsync(id.toString(), context);
}
public static Page fetchById(String id, APIContext context) throws APIException {
return
new APIRequestGet(id, context)
.requestAllFields()
.execute();
}
public static ListenableFuture fetchByIdAsync(String id, APIContext context) throws APIException {
return
new APIRequestGet(id, context)
.requestAllFields()
.executeAsync();
}
public static APINodeList fetchByIds(List ids, List fields, APIContext context) throws APIException {
return (APINodeList)(
new APIRequest(context, "", "/", "GET", Page.getParser())
.setParam("ids", APIRequest.joinStringList(ids))
.requestFields(fields)
.execute()
);
}
public static ListenableFuture> fetchByIdsAsync(List ids, List fields, APIContext context) throws APIException {
return
new APIRequest(context, "", "/", "GET", Page.getParser())
.setParam("ids", APIRequest.joinStringList(ids))
.requestFields(fields)
.executeAsyncBase();
}
private String getPrefixedId() {
return getId();
}
public String getId() {
return getFieldId().toString();
}
public static Page loadJSON(String json, APIContext context, String header) {
Page page = getGson().fromJson(json, Page.class);
if (context.isDebug()) {
JsonParser parser = new JsonParser();
JsonElement o1 = parser.parse(json);
JsonElement o2 = parser.parse(page.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);
}
}
page.context = context;
page.rawValue = json;
page.header = header;
return page;
}
public static APINodeList parseResponse(String json, APIContext context, APIRequest request, String header) throws MalformedResponseException {
APINodeList pages = new APINodeList(request, json, header);
JsonArray arr;
JsonObject obj;
JsonParser parser = new JsonParser();
Exception exception = null;
try{
JsonElement result = parser.parse(json);
if (result.isJsonArray()) {
// First, check if it's a pure JSON Array
arr = result.getAsJsonArray();
for (int i = 0; i < arr.size(); i++) {
pages.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header));
};
return pages;
} else if (result.isJsonObject()) {
obj = result.getAsJsonObject();
if (obj.has("data")) {
if (obj.has("paging")) {
JsonObject paging = obj.get("paging").getAsJsonObject();
if (paging.has("cursors")) {
JsonObject cursors = paging.get("cursors").getAsJsonObject();
String before = cursors.has("before") ? cursors.get("before").getAsString() : null;
String after = cursors.has("after") ? cursors.get("after").getAsString() : null;
pages.setCursors(before, after);
}
String previous = paging.has("previous") ? paging.get("previous").getAsString() : null;
String next = paging.has("next") ? paging.get("next").getAsString() : null;
pages.setPaging(previous, next);
if (context.hasAppSecret()) {
pages.setAppSecret(context.getAppSecretProof());
}
}
if (obj.get("data").isJsonArray()) {
// Second, check if it's a JSON array with "data"
arr = obj.get("data").getAsJsonArray();
for (int i = 0; i < arr.size(); i++) {
pages.add(loadJSON(arr.get(i).getAsJsonObject().toString(), context, header));
};
} else if (obj.get("data").isJsonObject()) {
// Third, check if it's a JSON object with "data"
obj = obj.get("data").getAsJsonObject();
boolean isRedownload = false;
for (String s : new String[]{"campaigns", "adsets", "ads"}) {
if (obj.has(s)) {
isRedownload = true;
obj = obj.getAsJsonObject(s);
for (Map.Entry entry : obj.entrySet()) {
pages.add(loadJSON(entry.getValue().toString(), context, header));
}
break;
}
}
if (!isRedownload) {
pages.add(loadJSON(obj.toString(), context, header));
}
}
return pages;
} 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()) {
pages.add(loadJSON(entry.getValue().toString(), context, header));
}
return pages;
} 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)
) {
pages.add(loadJSON(value.toString(), context, header));
} else {
isIdIndexedArray = false;
break;
}
}
if (isIdIndexedArray) {
return pages;
}
// Sixth, check if it's pure JsonObject
pages.clear();
pages.add(loadJSON(json, context, header));
return pages;
}
}
} 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 APIRequestCreateAcknowledgeOrder createAcknowledgeOrder() {
return new APIRequestCreateAcknowledgeOrder(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdminNotes getAdminNotes() {
return new APIRequestGetAdminNotes(this.getPrefixedId().toString(), context);
}
public APIRequestGetAdsPosts getAdsPosts() {
return new APIRequestGetAdsPosts(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteAgencies deleteAgencies() {
return new APIRequestDeleteAgencies(this.getPrefixedId().toString(), context);
}
public APIRequestGetAgencies getAgencies() {
return new APIRequestGetAgencies(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAgency createAgency() {
return new APIRequestCreateAgency(this.getPrefixedId().toString(), context);
}
public APIRequestGetAlbums getAlbums() {
return new APIRequestGetAlbums(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteAssignedUsers deleteAssignedUsers() {
return new APIRequestDeleteAssignedUsers(this.getPrefixedId().toString(), context);
}
public APIRequestGetAssignedUsers getAssignedUsers() {
return new APIRequestGetAssignedUsers(this.getPrefixedId().toString(), context);
}
public APIRequestCreateAssignedUser createAssignedUser() {
return new APIRequestCreateAssignedUser(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteBlocked deleteBlocked() {
return new APIRequestDeleteBlocked(this.getPrefixedId().toString(), context);
}
public APIRequestGetBlocked getBlocked() {
return new APIRequestGetBlocked(this.getPrefixedId().toString(), context);
}
public APIRequestCreateBlocked createBlocked() {
return new APIRequestCreateBlocked(this.getPrefixedId().toString(), context);
}
public APIRequestCreateBusinessDatum createBusinessDatum() {
return new APIRequestCreateBusinessDatum(this.getPrefixedId().toString(), context);
}
public APIRequestGetBusinessProjects getBusinessProjects() {
return new APIRequestGetBusinessProjects(this.getPrefixedId().toString(), context);
}
public APIRequestGetCallToActions getCallToActions() {
return new APIRequestGetCallToActions(this.getPrefixedId().toString(), context);
}
public APIRequestGetCanvasElements getCanvasElements() {
return new APIRequestGetCanvasElements(this.getPrefixedId().toString(), context);
}
public APIRequestCreateCanvasElement createCanvasElement() {
return new APIRequestCreateCanvasElement(this.getPrefixedId().toString(), context);
}
public APIRequestGetCanvases getCanvases() {
return new APIRequestGetCanvases(this.getPrefixedId().toString(), context);
}
public APIRequestCreateCanvase createCanvase() {
return new APIRequestCreateCanvase(this.getPrefixedId().toString(), context);
}
public APIRequestGetChatPlugin getChatPlugin() {
return new APIRequestGetChatPlugin(this.getPrefixedId().toString(), context);
}
public APIRequestCreateChatPlugin createChatPlugin() {
return new APIRequestCreateChatPlugin(this.getPrefixedId().toString(), context);
}
public APIRequestGetClaimedUrls getClaimedUrls() {
return new APIRequestGetClaimedUrls(this.getPrefixedId().toString(), context);
}
public APIRequestGetCommerceEligibility getCommerceEligibility() {
return new APIRequestGetCommerceEligibility(this.getPrefixedId().toString(), context);
}
public APIRequestGetCommerceMerchantSettings getCommerceMerchantSettings() {
return new APIRequestGetCommerceMerchantSettings(this.getPrefixedId().toString(), context);
}
public APIRequestGetCommerceOrders getCommerceOrders() {
return new APIRequestGetCommerceOrders(this.getPrefixedId().toString(), context);
}
public APIRequestGetCommercePayouts getCommercePayouts() {
return new APIRequestGetCommercePayouts(this.getPrefixedId().toString(), context);
}
public APIRequestGetCommerceTransactions getCommerceTransactions() {
return new APIRequestGetCommerceTransactions(this.getPrefixedId().toString(), context);
}
public APIRequestGetConversations getConversations() {
return new APIRequestGetConversations(this.getPrefixedId().toString(), context);
}
public APIRequestCreateCopyrightManualClaim createCopyrightManualClaim() {
return new APIRequestCreateCopyrightManualClaim(this.getPrefixedId().toString(), context);
}
public APIRequestGetCopyrightWhitelistedPartners getCopyrightWhitelistedPartners() {
return new APIRequestGetCopyrightWhitelistedPartners(this.getPrefixedId().toString(), context);
}
public APIRequestGetCrosspostWhitelistedPages getCrosspostWhitelistedPages() {
return new APIRequestGetCrosspostWhitelistedPages(this.getPrefixedId().toString(), context);
}
public APIRequestGetCustomLabels getCustomLabels() {
return new APIRequestGetCustomLabels(this.getPrefixedId().toString(), context);
}
public APIRequestCreateCustomLabel createCustomLabel() {
return new APIRequestCreateCustomLabel(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteCustomUserSettings deleteCustomUserSettings() {
return new APIRequestDeleteCustomUserSettings(this.getPrefixedId().toString(), context);
}
public APIRequestGetCustomUserSettings getCustomUserSettings() {
return new APIRequestGetCustomUserSettings(this.getPrefixedId().toString(), context);
}
public APIRequestCreateCustomUserSetting createCustomUserSetting() {
return new APIRequestCreateCustomUserSetting(this.getPrefixedId().toString(), context);
}
public APIRequestGetEvents getEvents() {
return new APIRequestGetEvents(this.getPrefixedId().toString(), context);
}
public APIRequestCreateExtendThreadControl createExtendThreadControl() {
return new APIRequestCreateExtendThreadControl(this.getPrefixedId().toString(), context);
}
public APIRequestGetFeed getFeed() {
return new APIRequestGetFeed(this.getPrefixedId().toString(), context);
}
public APIRequestCreateFeed createFeed() {
return new APIRequestCreateFeed(this.getPrefixedId().toString(), context);
}
public APIRequestGetGlobalBrandChildren getGlobalBrandChildren() {
return new APIRequestGetGlobalBrandChildren(this.getPrefixedId().toString(), context);
}
public APIRequestGetGroups getGroups() {
return new APIRequestGetGroups(this.getPrefixedId().toString(), context);
}
public APIRequestGetImageCopyrights getImageCopyrights() {
return new APIRequestGetImageCopyrights(this.getPrefixedId().toString(), context);
}
public APIRequestCreateImageCopyright createImageCopyright() {
return new APIRequestCreateImageCopyright(this.getPrefixedId().toString(), context);
}
public APIRequestGetIndexedVideos getIndexedVideos() {
return new APIRequestGetIndexedVideos(this.getPrefixedId().toString(), context);
}
public APIRequestGetInsights getInsights() {
return new APIRequestGetInsights(this.getPrefixedId().toString(), context);
}
public APIRequestGetInsightsExports getInsightsExports() {
return new APIRequestGetInsightsExports(this.getPrefixedId().toString(), context);
}
public APIRequestGetInstagramAccounts getInstagramAccounts() {
return new APIRequestGetInstagramAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestGetInstantArticles getInstantArticles() {
return new APIRequestGetInstantArticles(this.getPrefixedId().toString(), context);
}
public APIRequestCreateInstantArticle createInstantArticle() {
return new APIRequestCreateInstantArticle(this.getPrefixedId().toString(), context);
}
public APIRequestGetInstantArticlesInsights getInstantArticlesInsights() {
return new APIRequestGetInstantArticlesInsights(this.getPrefixedId().toString(), context);
}
public APIRequestCreateInstantArticlesPublish createInstantArticlesPublish() {
return new APIRequestCreateInstantArticlesPublish(this.getPrefixedId().toString(), context);
}
public APIRequestGetLeadGenForms getLeadGenForms() {
return new APIRequestGetLeadGenForms(this.getPrefixedId().toString(), context);
}
public APIRequestCreateLeadGenForm createLeadGenForm() {
return new APIRequestCreateLeadGenForm(this.getPrefixedId().toString(), context);
}
public APIRequestGetLikes getLikes() {
return new APIRequestGetLikes(this.getPrefixedId().toString(), context);
}
public APIRequestGetLiveEncoders getLiveEncoders() {
return new APIRequestGetLiveEncoders(this.getPrefixedId().toString(), context);
}
public APIRequestCreateLiveEncoder createLiveEncoder() {
return new APIRequestCreateLiveEncoder(this.getPrefixedId().toString(), context);
}
public APIRequestGetLiveVideos getLiveVideos() {
return new APIRequestGetLiveVideos(this.getPrefixedId().toString(), context);
}
public APIRequestCreateLiveVideo createLiveVideo() {
return new APIRequestCreateLiveVideo(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteLocations deleteLocations() {
return new APIRequestDeleteLocations(this.getPrefixedId().toString(), context);
}
public APIRequestGetLocations getLocations() {
return new APIRequestGetLocations(this.getPrefixedId().toString(), context);
}
public APIRequestCreateLocation createLocation() {
return new APIRequestCreateLocation(this.getPrefixedId().toString(), context);
}
public APIRequestGetMediaFingerprints getMediaFingerprints() {
return new APIRequestGetMediaFingerprints(this.getPrefixedId().toString(), context);
}
public APIRequestCreateMediaFingerprint createMediaFingerprint() {
return new APIRequestCreateMediaFingerprint(this.getPrefixedId().toString(), context);
}
public APIRequestCreateMessageAttachment createMessageAttachment() {
return new APIRequestCreateMessageAttachment(this.getPrefixedId().toString(), context);
}
public APIRequestCreateMessage createMessage() {
return new APIRequestCreateMessage(this.getPrefixedId().toString(), context);
}
public APIRequestGetMessagingFeatureReview getMessagingFeatureReview() {
return new APIRequestGetMessagingFeatureReview(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteMessengerProfile deleteMessengerProfile() {
return new APIRequestDeleteMessengerProfile(this.getPrefixedId().toString(), context);
}
public APIRequestGetMessengerProfile getMessengerProfile() {
return new APIRequestGetMessengerProfile(this.getPrefixedId().toString(), context);
}
public APIRequestCreateMessengerProfile createMessengerProfile() {
return new APIRequestCreateMessengerProfile(this.getPrefixedId().toString(), context);
}
public APIRequestGetNativeOffers getNativeOffers() {
return new APIRequestGetNativeOffers(this.getPrefixedId().toString(), context);
}
public APIRequestCreateNativeOffer createNativeOffer() {
return new APIRequestCreateNativeOffer(this.getPrefixedId().toString(), context);
}
public APIRequestCreateNlpConfig createNlpConfig() {
return new APIRequestCreateNlpConfig(this.getPrefixedId().toString(), context);
}
public APIRequestGetPageBackedInstagramAccounts getPageBackedInstagramAccounts() {
return new APIRequestGetPageBackedInstagramAccounts(this.getPrefixedId().toString(), context);
}
public APIRequestCreatePageBackedInstagramAccount createPageBackedInstagramAccount() {
return new APIRequestCreatePageBackedInstagramAccount(this.getPrefixedId().toString(), context);
}
public APIRequestCreatePageWhatsappNumberVerification createPageWhatsappNumberVerification() {
return new APIRequestCreatePageWhatsappNumberVerification(this.getPrefixedId().toString(), context);
}
public APIRequestCreatePassThreadControl createPassThreadControl() {
return new APIRequestCreatePassThreadControl(this.getPrefixedId().toString(), context);
}
public APIRequestCreatePassThreadMetadatum createPassThreadMetadatum() {
return new APIRequestCreatePassThreadMetadatum(this.getPrefixedId().toString(), context);
}
public APIRequestGetPersonas getPersonas() {
return new APIRequestGetPersonas(this.getPrefixedId().toString(), context);
}
public APIRequestCreatePersona createPersona() {
return new APIRequestCreatePersona(this.getPrefixedId().toString(), context);
}
public APIRequestGetPhotos getPhotos() {
return new APIRequestGetPhotos(this.getPrefixedId().toString(), context);
}
public APIRequestCreatePhoto createPhoto() {
return new APIRequestCreatePhoto(this.getPrefixedId().toString(), context);
}
public APIRequestGetPicture getPicture() {
return new APIRequestGetPicture(this.getPrefixedId().toString(), context);
}
public APIRequestCreatePicture createPicture() {
return new APIRequestCreatePicture(this.getPrefixedId().toString(), context);
}
public APIRequestGetPosts getPosts() {
return new APIRequestGetPosts(this.getPrefixedId().toString(), context);
}
public APIRequestGetProductCatalogs getProductCatalogs() {
return new APIRequestGetProductCatalogs(this.getPrefixedId().toString(), context);
}
public APIRequestGetPublishedPosts getPublishedPosts() {
return new APIRequestGetPublishedPosts(this.getPrefixedId().toString(), context);
}
public APIRequestGetRatings getRatings() {
return new APIRequestGetRatings(this.getPrefixedId().toString(), context);
}
public APIRequestCreateReleaseThreadControl createReleaseThreadControl() {
return new APIRequestCreateReleaseThreadControl(this.getPrefixedId().toString(), context);
}
public APIRequestCreateRequestThreadControl createRequestThreadControl() {
return new APIRequestCreateRequestThreadControl(this.getPrefixedId().toString(), context);
}
public APIRequestGetRoles getRoles() {
return new APIRequestGetRoles(this.getPrefixedId().toString(), context);
}
public APIRequestGetRtbDynamicPosts getRtbDynamicPosts() {
return new APIRequestGetRtbDynamicPosts(this.getPrefixedId().toString(), context);
}
public APIRequestGetScheduledPosts getScheduledPosts() {
return new APIRequestGetScheduledPosts(this.getPrefixedId().toString(), context);
}
public APIRequestGetSecondaryReceivers getSecondaryReceivers() {
return new APIRequestGetSecondaryReceivers(this.getPrefixedId().toString(), context);
}
public APIRequestGetSettings getSettings() {
return new APIRequestGetSettings(this.getPrefixedId().toString(), context);
}
public APIRequestCreateSetting createSetting() {
return new APIRequestCreateSetting(this.getPrefixedId().toString(), context);
}
public APIRequestGetShopSetupStatus getShopSetupStatus() {
return new APIRequestGetShopSetupStatus(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteSubscribedApps deleteSubscribedApps() {
return new APIRequestDeleteSubscribedApps(this.getPrefixedId().toString(), context);
}
public APIRequestGetSubscribedApps getSubscribedApps() {
return new APIRequestGetSubscribedApps(this.getPrefixedId().toString(), context);
}
public APIRequestCreateSubscribedApp createSubscribedApp() {
return new APIRequestCreateSubscribedApp(this.getPrefixedId().toString(), context);
}
public APIRequestDeleteTabs deleteTabs() {
return new APIRequestDeleteTabs(this.getPrefixedId().toString(), context);
}
public APIRequestGetTabs getTabs() {
return new APIRequestGetTabs(this.getPrefixedId().toString(), context);
}
public APIRequestCreateTab createTab() {
return new APIRequestCreateTab(this.getPrefixedId().toString(), context);
}
public APIRequestGetTagged getTagged() {
return new APIRequestGetTagged(this.getPrefixedId().toString(), context);
}
public APIRequestCreateTakeThreadControl createTakeThreadControl() {
return new APIRequestCreateTakeThreadControl(this.getPrefixedId().toString(), context);
}
public APIRequestGetThreadOwner getThreadOwner() {
return new APIRequestGetThreadOwner(this.getPrefixedId().toString(), context);
}
public APIRequestGetThreads getThreads() {
return new APIRequestGetThreads(this.getPrefixedId().toString(), context);
}
public APIRequestCreateUnlinkAccount createUnlinkAccount() {
return new APIRequestCreateUnlinkAccount(this.getPrefixedId().toString(), context);
}
public APIRequestGetVideoCopyrightRules getVideoCopyrightRules() {
return new APIRequestGetVideoCopyrightRules(this.getPrefixedId().toString(), context);
}
public APIRequestCreateVideoCopyrightRule createVideoCopyrightRule() {
return new APIRequestCreateVideoCopyrightRule(this.getPrefixedId().toString(), context);
}
public APIRequestCreateVideoCopyright createVideoCopyright() {
return new APIRequestCreateVideoCopyright(this.getPrefixedId().toString(), context);
}
public APIRequestGetVideoLists getVideoLists() {
return new APIRequestGetVideoLists(this.getPrefixedId().toString(), context);
}
public APIRequestGetVideos getVideos() {
return new APIRequestGetVideos(this.getPrefixedId().toString(), context);
}
public APIRequestCreateVideo createVideo() {
return new APIRequestCreateVideo(this.getPrefixedId().toString(), context);
}
public APIRequestGetVisitorPosts getVisitorPosts() {
return new APIRequestGetVisitorPosts(this.getPrefixedId().toString(), context);
}
public APIRequestCreateWorkPageMessage createWorkPageMessage() {
return new APIRequestCreateWorkPageMessage(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 getFieldAbout() {
return mAbout;
}
public String getFieldAccessToken() {
return mAccessToken;
}
public AdSet getFieldAdCampaign() {
if (mAdCampaign != null) {
mAdCampaign.context = getContext();
}
return mAdCampaign;
}
public String getFieldAffiliation() {
return mAffiliation;
}
public String getFieldAppId() {
return mAppId;
}
public String getFieldArtistsWeLike() {
return mArtistsWeLike;
}
public String getFieldAttire() {
return mAttire;
}
public String getFieldAwards() {
return mAwards;
}
public String getFieldBandInterests() {
return mBandInterests;
}
public String getFieldBandMembers() {
return mBandMembers;
}
public Page getFieldBestPage() {
if (mBestPage != null) {
mBestPage.context = getContext();
}
return mBestPage;
}
public String getFieldBio() {
return mBio;
}
public String getFieldBirthday() {
return mBirthday;
}
public String getFieldBookingAgent() {
return mBookingAgent;
}
public String getFieldBuilt() {
return mBuilt;
}
public Object getFieldBusiness() {
return mBusiness;
}
public Boolean getFieldCanCheckin() {
return mCanCheckin;
}
public Boolean getFieldCanPost() {
return mCanPost;
}
public String getFieldCategory() {
return mCategory;
}
public List getFieldCategoryList() {
return mCategoryList;
}
public Long getFieldCheckins() {
return mCheckins;
}
public String getFieldCompanyOverview() {
return mCompanyOverview;
}
public IGUser getFieldConnectedInstagramAccount() {
if (mConnectedInstagramAccount != null) {
mConnectedInstagramAccount.context = getContext();
}
return mConnectedInstagramAccount;
}
public IGUser getFieldConnectedPageBackedInstagramAccount() {
if (mConnectedPageBackedInstagramAccount != null) {
mConnectedPageBackedInstagramAccount.context = getContext();
}
return mConnectedPageBackedInstagramAccount;
}
public MailingAddress getFieldContactAddress() {
if (mContactAddress != null) {
mContactAddress.context = getContext();
}
return mContactAddress;
}
public List getFieldCopyrightWhitelistedIgPartners() {
return mCopyrightWhitelistedIgPartners;
}
public Long getFieldCountryPageLikes() {
return mCountryPageLikes;
}
public CoverPhoto getFieldCover() {
return mCover;
}
public String getFieldCulinaryTeam() {
return mCulinaryTeam;
}
public String getFieldCurrentLocation() {
return mCurrentLocation;
}
public List getFieldDeliveryAndPickupOptionInfo() {
return mDeliveryAndPickupOptionInfo;
}
public String getFieldDescription() {
return mDescription;
}
public String getFieldDescriptionHtml() {
return mDescriptionHtml;
}
public Map getFieldDifferentlyOpenOfferings() {
return mDifferentlyOpenOfferings;
}
public String getFieldDirectedBy() {
return mDirectedBy;
}
public String getFieldDisplaySubtext() {
return mDisplaySubtext;
}
public String getFieldDisplayedMessageResponseTime() {
return mDisplayedMessageResponseTime;
}
public List getFieldEmails() {
return mEmails;
}
public Engagement getFieldEngagement() {
return mEngagement;
}
public Long getFieldFanCount() {
return mFanCount;
}
public AdVideo getFieldFeaturedVideo() {
if (mFeaturedVideo != null) {
mFeaturedVideo.context = getContext();
}
return mFeaturedVideo;
}
public String getFieldFeatures() {
return mFeatures;
}
public Long getFieldFollowersCount() {
return mFollowersCount;
}
public List getFieldFoodStyles() {
return mFoodStyles;
}
public String getFieldFounded() {
return mFounded;
}
public String getFieldGeneralInfo() {
return mGeneralInfo;
}
public String getFieldGeneralManager() {
return mGeneralManager;
}
public String getFieldGenre() {
return mGenre;
}
public String getFieldGlobalBrandPageName() {
return mGlobalBrandPageName;
}
public String getFieldGlobalBrandRootId() {
return mGlobalBrandRootId;
}
public Boolean getFieldHasAddedApp() {
return mHasAddedApp;
}
public Boolean getFieldHasTransitionedToNewPageExperience() {
return mHasTransitionedToNewPageExperience;
}
public Boolean getFieldHasWhatsappBusinessNumber() {
return mHasWhatsappBusinessNumber;
}
public Boolean getFieldHasWhatsappNumber() {
return mHasWhatsappNumber;
}
public String getFieldHometown() {
return mHometown;
}
public Map getFieldHours() {
return mHours;
}
public String getFieldId() {
return mId;
}
public String getFieldImpressum() {
return mImpressum;
}
public String getFieldInfluences() {
return mInfluences;
}
public IGUser getFieldInstagramBusinessAccount() {
if (mInstagramBusinessAccount != null) {
mInstagramBusinessAccount.context = getContext();
}
return mInstagramBusinessAccount;
}
public String getFieldInstantArticlesReviewStatus() {
return mInstantArticlesReviewStatus;
}
public Boolean getFieldIsAlwaysOpen() {
return mIsAlwaysOpen;
}
public Boolean getFieldIsChain() {
return mIsChain;
}
public Boolean getFieldIsCommunityPage() {
return mIsCommunityPage;
}
public Boolean getFieldIsEligibleForBrandedContent() {
return mIsEligibleForBrandedContent;
}
public Boolean getFieldIsMessengerBotGetStartedEnabled() {
return mIsMessengerBotGetStartedEnabled;
}
public Boolean getFieldIsMessengerPlatformBot() {
return mIsMessengerPlatformBot;
}
public Boolean getFieldIsOwned() {
return mIsOwned;
}
public Boolean getFieldIsPermanentlyClosed() {
return mIsPermanentlyClosed;
}
public Boolean getFieldIsPublished() {
return mIsPublished;
}
public Boolean getFieldIsUnclaimed() {
return mIsUnclaimed;
}
public Boolean getFieldIsVerified() {
return mIsVerified;
}
public Boolean getFieldIsWebhooksSubscribed() {
return mIsWebhooksSubscribed;
}
public Object getFieldKeywords() {
return mKeywords;
}
public String getFieldLeadgenTosAcceptanceTime() {
return mLeadgenTosAcceptanceTime;
}
public Boolean getFieldLeadgenTosAccepted() {
return mLeadgenTosAccepted;
}
public User getFieldLeadgenTosAcceptingUser() {
if (mLeadgenTosAcceptingUser != null) {
mLeadgenTosAcceptingUser.context = getContext();
}
return mLeadgenTosAcceptingUser;
}
public String getFieldLink() {
return mLink;
}
public Location getFieldLocation() {
return mLocation;
}
public String getFieldMembers() {
return mMembers;
}
public String getFieldMerchantId() {
return mMerchantId;
}
public String getFieldMerchantReviewStatus() {
return mMerchantReviewStatus;
}
public List getFieldMessengerAdsDefaultIcebreakers() {
return mMessengerAdsDefaultIcebreakers;
}
public MessengerDestinationPageWelcomeMessage getFieldMessengerAdsDefaultPageWelcomeMessage() {
return mMessengerAdsDefaultPageWelcomeMessage;
}
public List getFieldMessengerAdsDefaultQuickReplies() {
return mMessengerAdsDefaultQuickReplies;
}
public String getFieldMessengerAdsQuickRepliesType() {
return mMessengerAdsQuickRepliesType;
}
public String getFieldMission() {
return mMission;
}
public String getFieldMpg() {
return mMpg;
}
public String getFieldName() {
return mName;
}
public String getFieldNameWithLocationDescriptor() {
return mNameWithLocationDescriptor;
}
public String getFieldNetwork() {
return mNetwork;
}
public Long getFieldNewLikeCount() {
return mNewLikeCount;
}
public Boolean getFieldOfferEligible() {
return mOfferEligible;
}
public Double getFieldOverallStarRating() {
return mOverallStarRating;
}
public String getFieldPageToken() {
return mPageToken;
}
public Page getFieldParentPage() {
if (mParentPage != null) {
mParentPage.context = getContext();
}
return mParentPage;
}
public PageParking getFieldParking() {
return mParking;
}
public PagePaymentOptions getFieldPaymentOptions() {
return mPaymentOptions;
}
public String getFieldPersonalInfo() {
return mPersonalInfo;
}
public String getFieldPersonalInterests() {
return mPersonalInterests;
}
public String getFieldPharmaSafetyInfo() {
return mPharmaSafetyInfo;
}
public String getFieldPhone() {
return mPhone;
}
public List getFieldPickupOptions() {
return mPickupOptions;
}
public String getFieldPlaceType() {
return mPlaceType;
}
public String getFieldPlotOutline() {
return mPlotOutline;
}
public Targeting getFieldPreferredAudience() {
return mPreferredAudience;
}
public String getFieldPressContact() {
return mPressContact;
}
public String getFieldPriceRange() {
return mPriceRange;
}
public String getFieldPrivacyInfoUrl() {
return mPrivacyInfoUrl;
}
public String getFieldProducedBy() {
return mProducedBy;
}
public String getFieldProducts() {
return mProducts;
}
public Boolean getFieldPromotionEligible() {
return mPromotionEligible;
}
public String getFieldPromotionIneligibleReason() {
return mPromotionIneligibleReason;
}
public String getFieldPublicTransit() {
return mPublicTransit;
}
public Long getFieldRatingCount() {
return mRatingCount;
}
public String getFieldRecipient() {
return mRecipient;
}
public String getFieldRecordLabel() {
return mRecordLabel;
}
public String getFieldReleaseDate() {
return mReleaseDate;
}
public PageRestaurantServices getFieldRestaurantServices() {
return mRestaurantServices;
}
public PageRestaurantSpecialties getFieldRestaurantSpecialties() {
return mRestaurantSpecialties;
}
public String getFieldSchedule() {
return mSchedule;
}
public String getFieldScreenplayBy() {
return mScreenplayBy;
}
public String getFieldSeason() {
return mSeason;
}
public String getFieldSingleLineAddress() {
return mSingleLineAddress;
}
public String getFieldStarring() {
return mStarring;
}
public PageStartInfo getFieldStartInfo() {
return mStartInfo;
}
public String getFieldStoreCode() {
return mStoreCode;
}
public String getFieldStoreLocationDescriptor() {
return mStoreLocationDescriptor;
}
public Long getFieldStoreNumber() {
return mStoreNumber;
}
public String getFieldStudio() {
return mStudio;
}
public Boolean getFieldSupportsDonateButtonInLiveVideo() {
return mSupportsDonateButtonInLiveVideo;
}
public Boolean getFieldSupportsInstantArticles() {
return mSupportsInstantArticles;
}
public Long getFieldTalkingAboutCount() {
return mTalkingAboutCount;
}
public String getFieldTemporaryStatus() {
return mTemporaryStatus;
}
public Long getFieldUnreadMessageCount() {
return mUnreadMessageCount;
}
public Long getFieldUnreadNotifCount() {
return mUnreadNotifCount;
}
public Long getFieldUnseenMessageCount() {
return mUnseenMessageCount;
}
public String getFieldUsername() {
return mUsername;
}
public String getFieldVerificationStatus() {
return mVerificationStatus;
}
public VoipInfo getFieldVoipInfo() {
return mVoipInfo;
}
public String getFieldWebsite() {
return mWebsite;
}
public Long getFieldWereHereCount() {
return mWereHereCount;
}
public String getFieldWhatsappNumber() {
return mWhatsappNumber;
}
public String getFieldWrittenBy() {
return mWrittenBy;
}
public static class APIRequestCreateAcknowledgeOrder extends APIRequest {
Page lastResponse = null;
@Override
public Page getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"idempotency_key",
"orders",
};
public static final String[] FIELDS = {
};
@Override
public Page parseResponse(String response, String header) throws APIException {
return Page.parseResponse(response, getContext(), this, header).head();
}
@Override
public Page execute() throws APIException {
return execute(new HashMap());
}
@Override
public Page execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public Page apply(ResponseWrapper result) {
try {
return APIRequestCreateAcknowledgeOrder.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateAcknowledgeOrder(String nodeId, APIContext context) {
super(context, nodeId, "/acknowledge_orders", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAcknowledgeOrder setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAcknowledgeOrder setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAcknowledgeOrder setIdempotencyKey (String idempotencyKey) {
this.setParam("idempotency_key", idempotencyKey);
return this;
}
public APIRequestCreateAcknowledgeOrder setOrders (List> orders) {
this.setParam("orders", orders);
return this;
}
public APIRequestCreateAcknowledgeOrder setOrders (String orders) {
this.setParam("orders", orders);
return this;
}
public APIRequestCreateAcknowledgeOrder requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAcknowledgeOrder requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAcknowledgeOrder requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAcknowledgeOrder requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAcknowledgeOrder requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAcknowledgeOrder requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAdminNotes extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"body",
"from",
"id",
"note_label",
"user",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return PageAdminNote.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetAdminNotes.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetAdminNotes(String nodeId, APIContext context) {
super(context, nodeId, "/admin_notes", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdminNotes setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdminNotes setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdminNotes requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdminNotes requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdminNotes requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdminNotes requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdminNotes requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdminNotes requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdminNotes requestBodyField () {
return this.requestBodyField(true);
}
public APIRequestGetAdminNotes requestBodyField (boolean value) {
this.requestField("body", value);
return this;
}
public APIRequestGetAdminNotes requestFromField () {
return this.requestFromField(true);
}
public APIRequestGetAdminNotes requestFromField (boolean value) {
this.requestField("from", value);
return this;
}
public APIRequestGetAdminNotes requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdminNotes requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdminNotes requestNoteLabelField () {
return this.requestNoteLabelField(true);
}
public APIRequestGetAdminNotes requestNoteLabelField (boolean value) {
this.requestField("note_label", value);
return this;
}
public APIRequestGetAdminNotes requestUserField () {
return this.requestUserField(true);
}
public APIRequestGetAdminNotes requestUserField (boolean value) {
this.requestField("user", value);
return this;
}
}
public static class APIRequestGetAdsPosts extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"exclude_dynamic_ads",
"include_inline_create",
"since",
"until",
};
public static final String[] FIELDS = {
"actions",
"admin_creator",
"allowed_advertising_objectives",
"application",
"backdated_time",
"call_to_action",
"can_reply_privately",
"child_attachments",
"comments_mirroring_domain",
"coordinates",
"created_time",
"event",
"expanded_height",
"expanded_width",
"feed_targeting",
"from",
"full_picture",
"height",
"icon",
"id",
"instagram_eligibility",
"is_app_share",
"is_eligible_for_promotion",
"is_expired",
"is_hidden",
"is_inline_created",
"is_instagram_eligible",
"is_popular",
"is_published",
"is_spherical",
"message",
"message_tags",
"multi_share_end_card",
"multi_share_optimized",
"parent_id",
"permalink_url",
"picture",
"place",
"privacy",
"promotable_id",
"promotion_status",
"properties",
"scheduled_publish_time",
"shares",
"status_type",
"story",
"story_tags",
"subscribed",
"target",
"targeting",
"timeline_visibility",
"updated_time",
"via",
"video_buying_eligibility",
"width",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return PagePost.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetAdsPosts.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetAdsPosts(String nodeId, APIContext context) {
super(context, nodeId, "/ads_posts", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAdsPosts setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAdsPosts setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAdsPosts setExcludeDynamicAds (Boolean excludeDynamicAds) {
this.setParam("exclude_dynamic_ads", excludeDynamicAds);
return this;
}
public APIRequestGetAdsPosts setExcludeDynamicAds (String excludeDynamicAds) {
this.setParam("exclude_dynamic_ads", excludeDynamicAds);
return this;
}
public APIRequestGetAdsPosts setIncludeInlineCreate (Boolean includeInlineCreate) {
this.setParam("include_inline_create", includeInlineCreate);
return this;
}
public APIRequestGetAdsPosts setIncludeInlineCreate (String includeInlineCreate) {
this.setParam("include_inline_create", includeInlineCreate);
return this;
}
public APIRequestGetAdsPosts setSince (String since) {
this.setParam("since", since);
return this;
}
public APIRequestGetAdsPosts setUntil (String until) {
this.setParam("until", until);
return this;
}
public APIRequestGetAdsPosts requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAdsPosts requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdsPosts requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAdsPosts requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAdsPosts requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAdsPosts requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAdsPosts requestActionsField () {
return this.requestActionsField(true);
}
public APIRequestGetAdsPosts requestActionsField (boolean value) {
this.requestField("actions", value);
return this;
}
public APIRequestGetAdsPosts requestAdminCreatorField () {
return this.requestAdminCreatorField(true);
}
public APIRequestGetAdsPosts requestAdminCreatorField (boolean value) {
this.requestField("admin_creator", value);
return this;
}
public APIRequestGetAdsPosts requestAllowedAdvertisingObjectivesField () {
return this.requestAllowedAdvertisingObjectivesField(true);
}
public APIRequestGetAdsPosts requestAllowedAdvertisingObjectivesField (boolean value) {
this.requestField("allowed_advertising_objectives", value);
return this;
}
public APIRequestGetAdsPosts requestApplicationField () {
return this.requestApplicationField(true);
}
public APIRequestGetAdsPosts requestApplicationField (boolean value) {
this.requestField("application", value);
return this;
}
public APIRequestGetAdsPosts requestBackdatedTimeField () {
return this.requestBackdatedTimeField(true);
}
public APIRequestGetAdsPosts requestBackdatedTimeField (boolean value) {
this.requestField("backdated_time", value);
return this;
}
public APIRequestGetAdsPosts requestCallToActionField () {
return this.requestCallToActionField(true);
}
public APIRequestGetAdsPosts requestCallToActionField (boolean value) {
this.requestField("call_to_action", value);
return this;
}
public APIRequestGetAdsPosts requestCanReplyPrivatelyField () {
return this.requestCanReplyPrivatelyField(true);
}
public APIRequestGetAdsPosts requestCanReplyPrivatelyField (boolean value) {
this.requestField("can_reply_privately", value);
return this;
}
public APIRequestGetAdsPosts requestChildAttachmentsField () {
return this.requestChildAttachmentsField(true);
}
public APIRequestGetAdsPosts requestChildAttachmentsField (boolean value) {
this.requestField("child_attachments", value);
return this;
}
public APIRequestGetAdsPosts requestCommentsMirroringDomainField () {
return this.requestCommentsMirroringDomainField(true);
}
public APIRequestGetAdsPosts requestCommentsMirroringDomainField (boolean value) {
this.requestField("comments_mirroring_domain", value);
return this;
}
public APIRequestGetAdsPosts requestCoordinatesField () {
return this.requestCoordinatesField(true);
}
public APIRequestGetAdsPosts requestCoordinatesField (boolean value) {
this.requestField("coordinates", value);
return this;
}
public APIRequestGetAdsPosts requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetAdsPosts requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetAdsPosts requestEventField () {
return this.requestEventField(true);
}
public APIRequestGetAdsPosts requestEventField (boolean value) {
this.requestField("event", value);
return this;
}
public APIRequestGetAdsPosts requestExpandedHeightField () {
return this.requestExpandedHeightField(true);
}
public APIRequestGetAdsPosts requestExpandedHeightField (boolean value) {
this.requestField("expanded_height", value);
return this;
}
public APIRequestGetAdsPosts requestExpandedWidthField () {
return this.requestExpandedWidthField(true);
}
public APIRequestGetAdsPosts requestExpandedWidthField (boolean value) {
this.requestField("expanded_width", value);
return this;
}
public APIRequestGetAdsPosts requestFeedTargetingField () {
return this.requestFeedTargetingField(true);
}
public APIRequestGetAdsPosts requestFeedTargetingField (boolean value) {
this.requestField("feed_targeting", value);
return this;
}
public APIRequestGetAdsPosts requestFromField () {
return this.requestFromField(true);
}
public APIRequestGetAdsPosts requestFromField (boolean value) {
this.requestField("from", value);
return this;
}
public APIRequestGetAdsPosts requestFullPictureField () {
return this.requestFullPictureField(true);
}
public APIRequestGetAdsPosts requestFullPictureField (boolean value) {
this.requestField("full_picture", value);
return this;
}
public APIRequestGetAdsPosts requestHeightField () {
return this.requestHeightField(true);
}
public APIRequestGetAdsPosts requestHeightField (boolean value) {
this.requestField("height", value);
return this;
}
public APIRequestGetAdsPosts requestIconField () {
return this.requestIconField(true);
}
public APIRequestGetAdsPosts requestIconField (boolean value) {
this.requestField("icon", value);
return this;
}
public APIRequestGetAdsPosts requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAdsPosts requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAdsPosts requestInstagramEligibilityField () {
return this.requestInstagramEligibilityField(true);
}
public APIRequestGetAdsPosts requestInstagramEligibilityField (boolean value) {
this.requestField("instagram_eligibility", value);
return this;
}
public APIRequestGetAdsPosts requestIsAppShareField () {
return this.requestIsAppShareField(true);
}
public APIRequestGetAdsPosts requestIsAppShareField (boolean value) {
this.requestField("is_app_share", value);
return this;
}
public APIRequestGetAdsPosts requestIsEligibleForPromotionField () {
return this.requestIsEligibleForPromotionField(true);
}
public APIRequestGetAdsPosts requestIsEligibleForPromotionField (boolean value) {
this.requestField("is_eligible_for_promotion", value);
return this;
}
public APIRequestGetAdsPosts requestIsExpiredField () {
return this.requestIsExpiredField(true);
}
public APIRequestGetAdsPosts requestIsExpiredField (boolean value) {
this.requestField("is_expired", value);
return this;
}
public APIRequestGetAdsPosts requestIsHiddenField () {
return this.requestIsHiddenField(true);
}
public APIRequestGetAdsPosts requestIsHiddenField (boolean value) {
this.requestField("is_hidden", value);
return this;
}
public APIRequestGetAdsPosts requestIsInlineCreatedField () {
return this.requestIsInlineCreatedField(true);
}
public APIRequestGetAdsPosts requestIsInlineCreatedField (boolean value) {
this.requestField("is_inline_created", value);
return this;
}
public APIRequestGetAdsPosts requestIsInstagramEligibleField () {
return this.requestIsInstagramEligibleField(true);
}
public APIRequestGetAdsPosts requestIsInstagramEligibleField (boolean value) {
this.requestField("is_instagram_eligible", value);
return this;
}
public APIRequestGetAdsPosts requestIsPopularField () {
return this.requestIsPopularField(true);
}
public APIRequestGetAdsPosts requestIsPopularField (boolean value) {
this.requestField("is_popular", value);
return this;
}
public APIRequestGetAdsPosts requestIsPublishedField () {
return this.requestIsPublishedField(true);
}
public APIRequestGetAdsPosts requestIsPublishedField (boolean value) {
this.requestField("is_published", value);
return this;
}
public APIRequestGetAdsPosts requestIsSphericalField () {
return this.requestIsSphericalField(true);
}
public APIRequestGetAdsPosts requestIsSphericalField (boolean value) {
this.requestField("is_spherical", value);
return this;
}
public APIRequestGetAdsPosts requestMessageField () {
return this.requestMessageField(true);
}
public APIRequestGetAdsPosts requestMessageField (boolean value) {
this.requestField("message", value);
return this;
}
public APIRequestGetAdsPosts requestMessageTagsField () {
return this.requestMessageTagsField(true);
}
public APIRequestGetAdsPosts requestMessageTagsField (boolean value) {
this.requestField("message_tags", value);
return this;
}
public APIRequestGetAdsPosts requestMultiShareEndCardField () {
return this.requestMultiShareEndCardField(true);
}
public APIRequestGetAdsPosts requestMultiShareEndCardField (boolean value) {
this.requestField("multi_share_end_card", value);
return this;
}
public APIRequestGetAdsPosts requestMultiShareOptimizedField () {
return this.requestMultiShareOptimizedField(true);
}
public APIRequestGetAdsPosts requestMultiShareOptimizedField (boolean value) {
this.requestField("multi_share_optimized", value);
return this;
}
public APIRequestGetAdsPosts requestParentIdField () {
return this.requestParentIdField(true);
}
public APIRequestGetAdsPosts requestParentIdField (boolean value) {
this.requestField("parent_id", value);
return this;
}
public APIRequestGetAdsPosts requestPermalinkUrlField () {
return this.requestPermalinkUrlField(true);
}
public APIRequestGetAdsPosts requestPermalinkUrlField (boolean value) {
this.requestField("permalink_url", value);
return this;
}
public APIRequestGetAdsPosts requestPictureField () {
return this.requestPictureField(true);
}
public APIRequestGetAdsPosts requestPictureField (boolean value) {
this.requestField("picture", value);
return this;
}
public APIRequestGetAdsPosts requestPlaceField () {
return this.requestPlaceField(true);
}
public APIRequestGetAdsPosts requestPlaceField (boolean value) {
this.requestField("place", value);
return this;
}
public APIRequestGetAdsPosts requestPrivacyField () {
return this.requestPrivacyField(true);
}
public APIRequestGetAdsPosts requestPrivacyField (boolean value) {
this.requestField("privacy", value);
return this;
}
public APIRequestGetAdsPosts requestPromotableIdField () {
return this.requestPromotableIdField(true);
}
public APIRequestGetAdsPosts requestPromotableIdField (boolean value) {
this.requestField("promotable_id", value);
return this;
}
public APIRequestGetAdsPosts requestPromotionStatusField () {
return this.requestPromotionStatusField(true);
}
public APIRequestGetAdsPosts requestPromotionStatusField (boolean value) {
this.requestField("promotion_status", value);
return this;
}
public APIRequestGetAdsPosts requestPropertiesField () {
return this.requestPropertiesField(true);
}
public APIRequestGetAdsPosts requestPropertiesField (boolean value) {
this.requestField("properties", value);
return this;
}
public APIRequestGetAdsPosts requestScheduledPublishTimeField () {
return this.requestScheduledPublishTimeField(true);
}
public APIRequestGetAdsPosts requestScheduledPublishTimeField (boolean value) {
this.requestField("scheduled_publish_time", value);
return this;
}
public APIRequestGetAdsPosts requestSharesField () {
return this.requestSharesField(true);
}
public APIRequestGetAdsPosts requestSharesField (boolean value) {
this.requestField("shares", value);
return this;
}
public APIRequestGetAdsPosts requestStatusTypeField () {
return this.requestStatusTypeField(true);
}
public APIRequestGetAdsPosts requestStatusTypeField (boolean value) {
this.requestField("status_type", value);
return this;
}
public APIRequestGetAdsPosts requestStoryField () {
return this.requestStoryField(true);
}
public APIRequestGetAdsPosts requestStoryField (boolean value) {
this.requestField("story", value);
return this;
}
public APIRequestGetAdsPosts requestStoryTagsField () {
return this.requestStoryTagsField(true);
}
public APIRequestGetAdsPosts requestStoryTagsField (boolean value) {
this.requestField("story_tags", value);
return this;
}
public APIRequestGetAdsPosts requestSubscribedField () {
return this.requestSubscribedField(true);
}
public APIRequestGetAdsPosts requestSubscribedField (boolean value) {
this.requestField("subscribed", value);
return this;
}
public APIRequestGetAdsPosts requestTargetField () {
return this.requestTargetField(true);
}
public APIRequestGetAdsPosts requestTargetField (boolean value) {
this.requestField("target", value);
return this;
}
public APIRequestGetAdsPosts requestTargetingField () {
return this.requestTargetingField(true);
}
public APIRequestGetAdsPosts requestTargetingField (boolean value) {
this.requestField("targeting", value);
return this;
}
public APIRequestGetAdsPosts requestTimelineVisibilityField () {
return this.requestTimelineVisibilityField(true);
}
public APIRequestGetAdsPosts requestTimelineVisibilityField (boolean value) {
this.requestField("timeline_visibility", value);
return this;
}
public APIRequestGetAdsPosts requestUpdatedTimeField () {
return this.requestUpdatedTimeField(true);
}
public APIRequestGetAdsPosts requestUpdatedTimeField (boolean value) {
this.requestField("updated_time", value);
return this;
}
public APIRequestGetAdsPosts requestViaField () {
return this.requestViaField(true);
}
public APIRequestGetAdsPosts requestViaField (boolean value) {
this.requestField("via", value);
return this;
}
public APIRequestGetAdsPosts requestVideoBuyingEligibilityField () {
return this.requestVideoBuyingEligibilityField(true);
}
public APIRequestGetAdsPosts requestVideoBuyingEligibilityField (boolean value) {
this.requestField("video_buying_eligibility", value);
return this;
}
public APIRequestGetAdsPosts requestWidthField () {
return this.requestWidthField(true);
}
public APIRequestGetAdsPosts requestWidthField (boolean value) {
this.requestField("width", value);
return this;
}
}
public static class APIRequestDeleteAgencies extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"business",
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestDeleteAgencies.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestDeleteAgencies(String nodeId, APIContext context) {
super(context, nodeId, "/agencies", "DELETE", Arrays.asList(PARAMS));
}
@Override
public APIRequestDeleteAgencies setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestDeleteAgencies setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestDeleteAgencies setBusiness (String business) {
this.setParam("business", business);
return this;
}
public APIRequestDeleteAgencies requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestDeleteAgencies requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAgencies requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestDeleteAgencies requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAgencies requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestDeleteAgencies requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAgencies extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"block_offline_analytics",
"collaborative_ads_managed_partner_business_info",
"collaborative_ads_managed_partner_eligibility",
"created_by",
"created_time",
"extended_updated_time",
"id",
"is_hidden",
"link",
"name",
"primary_page",
"profile_picture_uri",
"timezone_id",
"two_factor_type",
"updated_by",
"updated_time",
"verification_status",
"vertical",
"vertical_id",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return Business.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetAgencies.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetAgencies(String nodeId, APIContext context) {
super(context, nodeId, "/agencies", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAgencies setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAgencies setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAgencies requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAgencies requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAgencies requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAgencies requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAgencies requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAgencies requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAgencies requestBlockOfflineAnalyticsField () {
return this.requestBlockOfflineAnalyticsField(true);
}
public APIRequestGetAgencies requestBlockOfflineAnalyticsField (boolean value) {
this.requestField("block_offline_analytics", value);
return this;
}
public APIRequestGetAgencies requestCollaborativeAdsManagedPartnerBusinessInfoField () {
return this.requestCollaborativeAdsManagedPartnerBusinessInfoField(true);
}
public APIRequestGetAgencies requestCollaborativeAdsManagedPartnerBusinessInfoField (boolean value) {
this.requestField("collaborative_ads_managed_partner_business_info", value);
return this;
}
public APIRequestGetAgencies requestCollaborativeAdsManagedPartnerEligibilityField () {
return this.requestCollaborativeAdsManagedPartnerEligibilityField(true);
}
public APIRequestGetAgencies requestCollaborativeAdsManagedPartnerEligibilityField (boolean value) {
this.requestField("collaborative_ads_managed_partner_eligibility", value);
return this;
}
public APIRequestGetAgencies requestCreatedByField () {
return this.requestCreatedByField(true);
}
public APIRequestGetAgencies requestCreatedByField (boolean value) {
this.requestField("created_by", value);
return this;
}
public APIRequestGetAgencies requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetAgencies requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetAgencies requestExtendedUpdatedTimeField () {
return this.requestExtendedUpdatedTimeField(true);
}
public APIRequestGetAgencies requestExtendedUpdatedTimeField (boolean value) {
this.requestField("extended_updated_time", value);
return this;
}
public APIRequestGetAgencies requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAgencies requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAgencies requestIsHiddenField () {
return this.requestIsHiddenField(true);
}
public APIRequestGetAgencies requestIsHiddenField (boolean value) {
this.requestField("is_hidden", value);
return this;
}
public APIRequestGetAgencies requestLinkField () {
return this.requestLinkField(true);
}
public APIRequestGetAgencies requestLinkField (boolean value) {
this.requestField("link", value);
return this;
}
public APIRequestGetAgencies requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAgencies requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAgencies requestPrimaryPageField () {
return this.requestPrimaryPageField(true);
}
public APIRequestGetAgencies requestPrimaryPageField (boolean value) {
this.requestField("primary_page", value);
return this;
}
public APIRequestGetAgencies requestProfilePictureUriField () {
return this.requestProfilePictureUriField(true);
}
public APIRequestGetAgencies requestProfilePictureUriField (boolean value) {
this.requestField("profile_picture_uri", value);
return this;
}
public APIRequestGetAgencies requestTimezoneIdField () {
return this.requestTimezoneIdField(true);
}
public APIRequestGetAgencies requestTimezoneIdField (boolean value) {
this.requestField("timezone_id", value);
return this;
}
public APIRequestGetAgencies requestTwoFactorTypeField () {
return this.requestTwoFactorTypeField(true);
}
public APIRequestGetAgencies requestTwoFactorTypeField (boolean value) {
this.requestField("two_factor_type", value);
return this;
}
public APIRequestGetAgencies requestUpdatedByField () {
return this.requestUpdatedByField(true);
}
public APIRequestGetAgencies requestUpdatedByField (boolean value) {
this.requestField("updated_by", value);
return this;
}
public APIRequestGetAgencies requestUpdatedTimeField () {
return this.requestUpdatedTimeField(true);
}
public APIRequestGetAgencies requestUpdatedTimeField (boolean value) {
this.requestField("updated_time", value);
return this;
}
public APIRequestGetAgencies requestVerificationStatusField () {
return this.requestVerificationStatusField(true);
}
public APIRequestGetAgencies requestVerificationStatusField (boolean value) {
this.requestField("verification_status", value);
return this;
}
public APIRequestGetAgencies requestVerticalField () {
return this.requestVerticalField(true);
}
public APIRequestGetAgencies requestVerticalField (boolean value) {
this.requestField("vertical", value);
return this;
}
public APIRequestGetAgencies requestVerticalIdField () {
return this.requestVerticalIdField(true);
}
public APIRequestGetAgencies requestVerticalIdField (boolean value) {
this.requestField("vertical_id", value);
return this;
}
}
public static class APIRequestCreateAgency extends APIRequest {
Page lastResponse = null;
@Override
public Page getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"business",
"permitted_tasks",
};
public static final String[] FIELDS = {
};
@Override
public Page parseResponse(String response, String header) throws APIException {
return Page.parseResponse(response, getContext(), this, header).head();
}
@Override
public Page execute() throws APIException {
return execute(new HashMap());
}
@Override
public Page execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public Page apply(ResponseWrapper result) {
try {
return APIRequestCreateAgency.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateAgency(String nodeId, APIContext context) {
super(context, nodeId, "/agencies", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAgency setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAgency setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAgency setBusiness (String business) {
this.setParam("business", business);
return this;
}
public APIRequestCreateAgency setPermittedTasks (List permittedTasks) {
this.setParam("permitted_tasks", permittedTasks);
return this;
}
public APIRequestCreateAgency setPermittedTasks (String permittedTasks) {
this.setParam("permitted_tasks", permittedTasks);
return this;
}
public APIRequestCreateAgency requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAgency requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAgency requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAgency requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAgency requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAgency requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAlbums extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};
public static final String[] FIELDS = {
"backdated_time",
"backdated_time_granularity",
"can_backdate",
"can_upload",
"count",
"cover_photo",
"created_time",
"description",
"edit_link",
"event",
"from",
"id",
"is_user_facing",
"link",
"location",
"modified_major",
"name",
"photo_count",
"place",
"privacy",
"type",
"updated_time",
"video_count",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return Album.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetAlbums.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetAlbums(String nodeId, APIContext context) {
super(context, nodeId, "/albums", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAlbums setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAlbums setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAlbums requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAlbums requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAlbums requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAlbums requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAlbums requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAlbums requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAlbums requestBackdatedTimeField () {
return this.requestBackdatedTimeField(true);
}
public APIRequestGetAlbums requestBackdatedTimeField (boolean value) {
this.requestField("backdated_time", value);
return this;
}
public APIRequestGetAlbums requestBackdatedTimeGranularityField () {
return this.requestBackdatedTimeGranularityField(true);
}
public APIRequestGetAlbums requestBackdatedTimeGranularityField (boolean value) {
this.requestField("backdated_time_granularity", value);
return this;
}
public APIRequestGetAlbums requestCanBackdateField () {
return this.requestCanBackdateField(true);
}
public APIRequestGetAlbums requestCanBackdateField (boolean value) {
this.requestField("can_backdate", value);
return this;
}
public APIRequestGetAlbums requestCanUploadField () {
return this.requestCanUploadField(true);
}
public APIRequestGetAlbums requestCanUploadField (boolean value) {
this.requestField("can_upload", value);
return this;
}
public APIRequestGetAlbums requestCountField () {
return this.requestCountField(true);
}
public APIRequestGetAlbums requestCountField (boolean value) {
this.requestField("count", value);
return this;
}
public APIRequestGetAlbums requestCoverPhotoField () {
return this.requestCoverPhotoField(true);
}
public APIRequestGetAlbums requestCoverPhotoField (boolean value) {
this.requestField("cover_photo", value);
return this;
}
public APIRequestGetAlbums requestCreatedTimeField () {
return this.requestCreatedTimeField(true);
}
public APIRequestGetAlbums requestCreatedTimeField (boolean value) {
this.requestField("created_time", value);
return this;
}
public APIRequestGetAlbums requestDescriptionField () {
return this.requestDescriptionField(true);
}
public APIRequestGetAlbums requestDescriptionField (boolean value) {
this.requestField("description", value);
return this;
}
public APIRequestGetAlbums requestEditLinkField () {
return this.requestEditLinkField(true);
}
public APIRequestGetAlbums requestEditLinkField (boolean value) {
this.requestField("edit_link", value);
return this;
}
public APIRequestGetAlbums requestEventField () {
return this.requestEventField(true);
}
public APIRequestGetAlbums requestEventField (boolean value) {
this.requestField("event", value);
return this;
}
public APIRequestGetAlbums requestFromField () {
return this.requestFromField(true);
}
public APIRequestGetAlbums requestFromField (boolean value) {
this.requestField("from", value);
return this;
}
public APIRequestGetAlbums requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAlbums requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAlbums requestIsUserFacingField () {
return this.requestIsUserFacingField(true);
}
public APIRequestGetAlbums requestIsUserFacingField (boolean value) {
this.requestField("is_user_facing", value);
return this;
}
public APIRequestGetAlbums requestLinkField () {
return this.requestLinkField(true);
}
public APIRequestGetAlbums requestLinkField (boolean value) {
this.requestField("link", value);
return this;
}
public APIRequestGetAlbums requestLocationField () {
return this.requestLocationField(true);
}
public APIRequestGetAlbums requestLocationField (boolean value) {
this.requestField("location", value);
return this;
}
public APIRequestGetAlbums requestModifiedMajorField () {
return this.requestModifiedMajorField(true);
}
public APIRequestGetAlbums requestModifiedMajorField (boolean value) {
this.requestField("modified_major", value);
return this;
}
public APIRequestGetAlbums requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAlbums requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAlbums requestPhotoCountField () {
return this.requestPhotoCountField(true);
}
public APIRequestGetAlbums requestPhotoCountField (boolean value) {
this.requestField("photo_count", value);
return this;
}
public APIRequestGetAlbums requestPlaceField () {
return this.requestPlaceField(true);
}
public APIRequestGetAlbums requestPlaceField (boolean value) {
this.requestField("place", value);
return this;
}
public APIRequestGetAlbums requestPrivacyField () {
return this.requestPrivacyField(true);
}
public APIRequestGetAlbums requestPrivacyField (boolean value) {
this.requestField("privacy", value);
return this;
}
public APIRequestGetAlbums requestTypeField () {
return this.requestTypeField(true);
}
public APIRequestGetAlbums requestTypeField (boolean value) {
this.requestField("type", value);
return this;
}
public APIRequestGetAlbums requestUpdatedTimeField () {
return this.requestUpdatedTimeField(true);
}
public APIRequestGetAlbums requestUpdatedTimeField (boolean value) {
this.requestField("updated_time", value);
return this;
}
public APIRequestGetAlbums requestVideoCountField () {
return this.requestVideoCountField(true);
}
public APIRequestGetAlbums requestVideoCountField (boolean value) {
this.requestField("video_count", value);
return this;
}
}
public static class APIRequestDeleteAssignedUsers extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"user",
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestDeleteAssignedUsers.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestDeleteAssignedUsers(String nodeId, APIContext context) {
super(context, nodeId, "/assigned_users", "DELETE", Arrays.asList(PARAMS));
}
@Override
public APIRequestDeleteAssignedUsers setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestDeleteAssignedUsers setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestDeleteAssignedUsers setUser (Long user) {
this.setParam("user", user);
return this;
}
public APIRequestDeleteAssignedUsers setUser (String user) {
this.setParam("user", user);
return this;
}
public APIRequestDeleteAssignedUsers requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestDeleteAssignedUsers requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAssignedUsers requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestDeleteAssignedUsers requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteAssignedUsers requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestDeleteAssignedUsers requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetAssignedUsers extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"business",
};
public static final String[] FIELDS = {
"business",
"id",
"name",
"user_type",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return AssignedUser.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetAssignedUsers.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetAssignedUsers(String nodeId, APIContext context) {
super(context, nodeId, "/assigned_users", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetAssignedUsers setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetAssignedUsers setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetAssignedUsers setBusiness (String business) {
this.setParam("business", business);
return this;
}
public APIRequestGetAssignedUsers requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetAssignedUsers requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAssignedUsers requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetAssignedUsers requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetAssignedUsers requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetAssignedUsers requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetAssignedUsers requestBusinessField () {
return this.requestBusinessField(true);
}
public APIRequestGetAssignedUsers requestBusinessField (boolean value) {
this.requestField("business", value);
return this;
}
public APIRequestGetAssignedUsers requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetAssignedUsers requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetAssignedUsers requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetAssignedUsers requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetAssignedUsers requestUserTypeField () {
return this.requestUserTypeField(true);
}
public APIRequestGetAssignedUsers requestUserTypeField (boolean value) {
this.requestField("user_type", value);
return this;
}
}
public static class APIRequestCreateAssignedUser extends APIRequest {
Page lastResponse = null;
@Override
public Page getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"tasks",
"user",
};
public static final String[] FIELDS = {
};
@Override
public Page parseResponse(String response, String header) throws APIException {
return Page.parseResponse(response, getContext(), this, header).head();
}
@Override
public Page execute() throws APIException {
return execute(new HashMap());
}
@Override
public Page execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public Page apply(ResponseWrapper result) {
try {
return APIRequestCreateAssignedUser.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateAssignedUser(String nodeId, APIContext context) {
super(context, nodeId, "/assigned_users", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateAssignedUser setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateAssignedUser setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateAssignedUser setTasks (List tasks) {
this.setParam("tasks", tasks);
return this;
}
public APIRequestCreateAssignedUser setTasks (String tasks) {
this.setParam("tasks", tasks);
return this;
}
public APIRequestCreateAssignedUser setUser (Long user) {
this.setParam("user", user);
return this;
}
public APIRequestCreateAssignedUser setUser (String user) {
this.setParam("user", user);
return this;
}
public APIRequestCreateAssignedUser requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateAssignedUser requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAssignedUser requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateAssignedUser requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateAssignedUser requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateAssignedUser requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestDeleteBlocked extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"asid",
"psid",
"uid",
"user",
};
public static final String[] FIELDS = {
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestDeleteBlocked.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestDeleteBlocked(String nodeId, APIContext context) {
super(context, nodeId, "/blocked", "DELETE", Arrays.asList(PARAMS));
}
@Override
public APIRequestDeleteBlocked setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestDeleteBlocked setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestDeleteBlocked setAsid (String asid) {
this.setParam("asid", asid);
return this;
}
public APIRequestDeleteBlocked setPsid (Long psid) {
this.setParam("psid", psid);
return this;
}
public APIRequestDeleteBlocked setPsid (String psid) {
this.setParam("psid", psid);
return this;
}
public APIRequestDeleteBlocked setUid (Long uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestDeleteBlocked setUid (String uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestDeleteBlocked setUser (Long user) {
this.setParam("user", user);
return this;
}
public APIRequestDeleteBlocked setUser (String user) {
this.setParam("user", user);
return this;
}
public APIRequestDeleteBlocked requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestDeleteBlocked requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteBlocked requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestDeleteBlocked requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestDeleteBlocked requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestDeleteBlocked requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetBlocked extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"uid",
"user",
};
public static final String[] FIELDS = {
"can_post",
"id",
"link",
"name",
"pic",
"pic_crop",
"pic_large",
"pic_small",
"pic_square",
"profile_type",
"username",
};
@Override
public APINodeList parseResponse(String response, String header) throws APIException {
return Profile.parseResponse(response, getContext(), this, header);
}
@Override
public APINodeList execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINodeList execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}
public ListenableFuture> executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture> executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function>() {
public APINodeList apply(ResponseWrapper result) {
try {
return APIRequestGetBlocked.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestGetBlocked(String nodeId, APIContext context) {
super(context, nodeId, "/blocked", "GET", Arrays.asList(PARAMS));
}
@Override
public APIRequestGetBlocked setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestGetBlocked setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestGetBlocked setUid (Long uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestGetBlocked setUid (String uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestGetBlocked setUser (Long user) {
this.setParam("user", user);
return this;
}
public APIRequestGetBlocked setUser (String user) {
this.setParam("user", user);
return this;
}
public APIRequestGetBlocked requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestGetBlocked requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetBlocked requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestGetBlocked requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestGetBlocked requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestGetBlocked requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
public APIRequestGetBlocked requestCanPostField () {
return this.requestCanPostField(true);
}
public APIRequestGetBlocked requestCanPostField (boolean value) {
this.requestField("can_post", value);
return this;
}
public APIRequestGetBlocked requestIdField () {
return this.requestIdField(true);
}
public APIRequestGetBlocked requestIdField (boolean value) {
this.requestField("id", value);
return this;
}
public APIRequestGetBlocked requestLinkField () {
return this.requestLinkField(true);
}
public APIRequestGetBlocked requestLinkField (boolean value) {
this.requestField("link", value);
return this;
}
public APIRequestGetBlocked requestNameField () {
return this.requestNameField(true);
}
public APIRequestGetBlocked requestNameField (boolean value) {
this.requestField("name", value);
return this;
}
public APIRequestGetBlocked requestPicField () {
return this.requestPicField(true);
}
public APIRequestGetBlocked requestPicField (boolean value) {
this.requestField("pic", value);
return this;
}
public APIRequestGetBlocked requestPicCropField () {
return this.requestPicCropField(true);
}
public APIRequestGetBlocked requestPicCropField (boolean value) {
this.requestField("pic_crop", value);
return this;
}
public APIRequestGetBlocked requestPicLargeField () {
return this.requestPicLargeField(true);
}
public APIRequestGetBlocked requestPicLargeField (boolean value) {
this.requestField("pic_large", value);
return this;
}
public APIRequestGetBlocked requestPicSmallField () {
return this.requestPicSmallField(true);
}
public APIRequestGetBlocked requestPicSmallField (boolean value) {
this.requestField("pic_small", value);
return this;
}
public APIRequestGetBlocked requestPicSquareField () {
return this.requestPicSquareField(true);
}
public APIRequestGetBlocked requestPicSquareField (boolean value) {
this.requestField("pic_square", value);
return this;
}
public APIRequestGetBlocked requestProfileTypeField () {
return this.requestProfileTypeField(true);
}
public APIRequestGetBlocked requestProfileTypeField (boolean value) {
this.requestField("profile_type", value);
return this;
}
public APIRequestGetBlocked requestUsernameField () {
return this.requestUsernameField(true);
}
public APIRequestGetBlocked requestUsernameField (boolean value) {
this.requestField("username", value);
return this;
}
}
public static class APIRequestCreateBlocked extends APIRequest {
APINode lastResponse = null;
@Override
public APINode getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"asid",
"psid",
"uid",
"user",
};
public static final String[] FIELDS = {
};
@Override
public APINode parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header).head();
}
@Override
public APINode execute() throws APIException {
return execute(new HashMap());
}
@Override
public APINode execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public APINode apply(ResponseWrapper result) {
try {
return APIRequestCreateBlocked.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateBlocked(String nodeId, APIContext context) {
super(context, nodeId, "/blocked", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateBlocked setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateBlocked setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateBlocked setAsid (JsonArray asid) {
this.setParam("asid", asid);
return this;
}
public APIRequestCreateBlocked setAsid (String asid) {
this.setParam("asid", asid);
return this;
}
public APIRequestCreateBlocked setPsid (List psid) {
this.setParam("psid", psid);
return this;
}
public APIRequestCreateBlocked setPsid (String psid) {
this.setParam("psid", psid);
return this;
}
public APIRequestCreateBlocked setUid (JsonArray uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestCreateBlocked setUid (String uid) {
this.setParam("uid", uid);
return this;
}
public APIRequestCreateBlocked setUser (JsonArray user) {
this.setParam("user", user);
return this;
}
public APIRequestCreateBlocked setUser (String user) {
this.setParam("user", user);
return this;
}
public APIRequestCreateBlocked requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateBlocked requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateBlocked requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateBlocked requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateBlocked requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateBlocked requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestCreateBusinessDatum extends APIRequest {
Page lastResponse = null;
@Override
public Page getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"data",
"partner_agent",
};
public static final String[] FIELDS = {
};
@Override
public Page parseResponse(String response, String header) throws APIException {
return Page.parseResponse(response, getContext(), this, header).head();
}
@Override
public Page execute() throws APIException {
return execute(new HashMap());
}
@Override
public Page execute(Map extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(), rw.getHeader());
return lastResponse;
}
public ListenableFuture executeAsync() throws APIException {
return executeAsync(new HashMap());
};
public ListenableFuture executeAsync(Map extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function() {
public Page apply(ResponseWrapper result) {
try {
return APIRequestCreateBusinessDatum.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
);
};
public APIRequestCreateBusinessDatum(String nodeId, APIContext context) {
super(context, nodeId, "/business_data", "POST", Arrays.asList(PARAMS));
}
@Override
public APIRequestCreateBusinessDatum setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}
@Override
public APIRequestCreateBusinessDatum setParams(Map params) {
setParamsInternal(params);
return this;
}
public APIRequestCreateBusinessDatum setData (List data) {
this.setParam("data", data);
return this;
}
public APIRequestCreateBusinessDatum setData (String data) {
this.setParam("data", data);
return this;
}
public APIRequestCreateBusinessDatum setPartnerAgent (String partnerAgent) {
this.setParam("partner_agent", partnerAgent);
return this;
}
public APIRequestCreateBusinessDatum requestAllFields () {
return this.requestAllFields(true);
}
public APIRequestCreateBusinessDatum requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateBusinessDatum requestFields (List fields) {
return this.requestFields(fields, true);
}
@Override
public APIRequestCreateBusinessDatum requestFields (List fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}
@Override
public APIRequestCreateBusinessDatum requestField (String field) {
this.requestField(field, true);
return this;
}
@Override
public APIRequestCreateBusinessDatum requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}
}
public static class APIRequestGetBusinessProjects extends APIRequest {
APINodeList lastResponse = null;
@Override
public APINodeList getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
"business",
};
public static final String[] FIELDS = {
};
@Override
public APINodeList