Skip to content

Commit

Permalink
Auto-generated java SDK code update
Browse files Browse the repository at this point in the history
Summary: ignore-conflict-markers

Reviewed By: stcheng

Differential Revision: D54970924

fbshipit-source-id: a19b385f567921fc2ed1638428aea8edc5bbd20b
  • Loading branch information
generatedunixname89002005295453 authored and facebook-github-bot committed Mar 19, 2024
1 parent 149a1e3 commit 17998bd
Show file tree
Hide file tree
Showing 39 changed files with 908 additions and 274 deletions.
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostAdSetCreateCpa.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public static void main (String args[]) throws APIException {
.setName("A CPA Ad Set")
.setCampaignId("<adCampaignLinkClicksID>")
.setDailyBudget(5000L)
.setStartTime("2023-04-24T09:25:05-0700")
.setEndTime("2023-05-01T09:25:05-0700")
.setStartTime("2024-03-20T14:31:58-0700")
.setEndTime("2024-03-27T14:31:58-0700")
.setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS)
.setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_REACH)
.setBidAmount(1000L)
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public static void main (String args[]) throws APIException {
.setName("A CPA Ad Set optimized for App Events")
.setCampaignId("<adCampaignAppInstallsID>")
.setDailyBudget(300L)
.setStartTime("2023-04-24T09:25:55-0700")
.setEndTime("2023-05-01T09:25:55-0700")
.setStartTime("2024-03-20T14:32:42-0700")
.setEndTime("2024-03-27T14:32:42-0700")
.setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS)
.setOptimizationGoal(AdSet.EnumOptimizationGoal.VALUE_OFFSITE_CONVERSIONS)
.setBidAmount(100L)
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostCreateAdSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public static void main (String args[]) throws APIException {
new AdAccount(id, context).createAdSet()
.setName("My First AdSet")
.setLifetimeBudget(20000L)
.setStartTime("2023-04-24T09:24:18-0700")
.setEndTime("2023-05-01T09:24:18-0700")
.setStartTime("2024-03-20T14:31:13-0700")
.setEndTime("2024-03-27T14:31:13-0700")
.setCampaignId("<adCampaignLinkClicksID>")
.setBidAmount(500L)
.setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS)
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostDailyBudget20.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public static void main (String args[]) throws APIException {
new AdAccount(id, context).createAdSet()
.setName("My First Adset")
.setDailyBudget(2000L)
.setStartTime("2023-04-17T09:25:24-0700")
.setEndTime("2023-04-24T09:25:24-0700")
.setStartTime("2024-03-13T14:32:15-0700")
.setEndTime("2024-03-20T14:32:15-0700")
.setCampaignId("<adCampaignLinkClicksID>")
.setBidAmount(100L)
.setBillingEvent(AdSet.EnumBillingEvent.VALUE_LINK_CLICKS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public static void main (String args[]) throws APIException {
new AdAccount(id, context).createAdSet()
.setName("My First Adset")
.setLifetimeBudget(20000L)
.setStartTime("2023-04-17T09:25:36-0700")
.setEndTime("2023-04-27T09:25:36-0700")
.setStartTime("2024-03-13T14:32:24-0700")
.setEndTime("2024-03-23T14:32:24-0700")
.setCampaignId("<adCampaignLinkClicksID>")
.setBidAmount(100L)
.setBillingEvent(AdSet.EnumBillingEvent.VALUE_LINK_CLICKS)
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostOptimizePostEngagement.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public static void main (String args[]) throws APIException {
new AdAccount(id, context).createAdSet()
.setName("My First Adset")
.setLifetimeBudget(20000L)
.setStartTime("2023-04-17T09:25:45-0700")
.setEndTime("2023-04-27T09:25:45-0700")
.setStartTime("2024-03-13T14:32:33-0700")
.setEndTime("2024-03-23T14:32:33-0700")
.setCampaignId("<adCampaignLinkClicksID>")
.setBidAmount(500L)
.setBillingEvent(AdSet.EnumBillingEvent.VALUE_IMPRESSIONS)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.facebook.business.sdk</groupId>
<artifactId>facebook-java-business-sdk</artifactId>
<packaging>jar</packaging>
<version>19.0.1</version>
<version>19.0.2</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Facebook Business Solutions SDK for Java</description>
<url>https://developers.facebook.com/docs/marketing-api/sdks</url>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/facebook/ads/sdk/APIConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ public class APIConfig {
public static final String DEFAULT_API_VERSION = "v19.0";
public static final String DEFAULT_API_BASE = "https://graph.facebook.com";
public static final String DEFAULT_VIDEO_API_BASE = "https://graph-video.facebook.com";
public static final String USER_AGENT = "fbbizsdk-java-v19.0.1";
public static final String USER_AGENT = "fbbizsdk-java-v19.0.2";
};
4 changes: 2 additions & 2 deletions src/main/java/com/facebook/ads/sdk/Ad.java
Original file line number Diff line number Diff line change
Expand Up @@ -4243,8 +4243,8 @@ public static enum EnumDatePreset {
VALUE_LAST_WEEK_SUN_SAT("last_week_sun_sat"),
@SerializedName("last_year")
VALUE_LAST_YEAR("last_year"),
@SerializedName("lifetime")
VALUE_LIFETIME("lifetime"),
@SerializedName("maximum")
VALUE_MAXIMUM("maximum"),
@SerializedName("this_month")
VALUE_THIS_MONTH("this_month"),
@SerializedName("this_quarter")
Expand Down
127 changes: 8 additions & 119 deletions src/main/java/com/facebook/ads/sdk/AdAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -802,10 +802,6 @@ public APIRequestDeleteUsersOfAnyAudience deleteUsersOfAnyAudience() {
return new APIRequestDeleteUsersOfAnyAudience(this.getPrefixedId().toString(), context);
}

public APIRequestGetValueAdjustmentRulePersonaGroups getValueAdjustmentRulePersonaGroups() {
return new APIRequestGetValueAdjustmentRulePersonaGroups(this.getPrefixedId().toString(), context);
}

public APIRequestGetValueAdjustmentRules getValueAdjustmentRules() {
return new APIRequestGetValueAdjustmentRules(this.getPrefixedId().toString(), context);
}
Expand Down Expand Up @@ -11602,7 +11598,6 @@ public AdVideo getLastResponse() {
"fun_fact_toastee_id",
"guide",
"guide_enabled",
"has_nickname",
"holiday_card",
"initial_heading",
"initial_pitch",
Expand Down Expand Up @@ -11928,15 +11923,6 @@ public APIRequestCreateAdVideo setGuideEnabled (String guideEnabled) {
return this;
}

public APIRequestCreateAdVideo setHasNickname (Boolean hasNickname) {
this.setParam("has_nickname", hasNickname);
return this;
}
public APIRequestCreateAdVideo setHasNickname (String hasNickname) {
this.setParam("has_nickname", hasNickname);
return this;
}

public APIRequestCreateAdVideo setHolidayCard (String holidayCard) {
this.setParam("holiday_card", holidayCard);
return this;
Expand Down Expand Up @@ -22734,6 +22720,7 @@ public APINodeList<Page> getLastResponse() {
"bio",
"birthday",
"booking_agent",
"breaking_news_usage",
"built",
"business",
"can_checkin",
Expand Down Expand Up @@ -23065,6 +23052,13 @@ public APIRequestGetPromotePages requestBookingAgentField (boolean value) {
this.requestField("booking_agent", value);
return this;
}
public APIRequestGetPromotePages requestBreakingNewsUsageField () {
return this.requestBreakingNewsUsageField(true);
}
public APIRequestGetPromotePages requestBreakingNewsUsageField (boolean value) {
this.requestField("breaking_news_usage", value);
return this;
}
public APIRequestGetPromotePages requestBuiltField () {
return this.requestBuiltField(true);
}
Expand Down Expand Up @@ -28399,111 +28393,6 @@ public APIRequestDeleteUsersOfAnyAudience requestField (String field, boolean va

}

public static class APIRequestGetValueAdjustmentRulePersonaGroups extends APIRequest<APINode> {

APINodeList<APINode> lastResponse = null;
@Override
public APINodeList<APINode> getLastResponse() {
return lastResponse;
}
public static final String[] PARAMS = {
};

public static final String[] FIELDS = {
};

@Override
public APINodeList<APINode> parseResponse(String response, String header) throws APIException {
return APINode.parseResponse(response, getContext(), this, header);
}

@Override
public APINodeList<APINode> execute() throws APIException {
return execute(new HashMap<String, Object>());
}

@Override
public APINodeList<APINode> execute(Map<String, Object> extraParams) throws APIException {
ResponseWrapper rw = executeInternal(extraParams);
lastResponse = parseResponse(rw.getBody(),rw.getHeader());
return lastResponse;
}

public ListenableFuture<APINodeList<APINode>> executeAsync() throws APIException {
return executeAsync(new HashMap<String, Object>());
};

public ListenableFuture<APINodeList<APINode>> executeAsync(Map<String, Object> extraParams) throws APIException {
return Futures.transform(
executeAsyncInternal(extraParams),
new Function<ResponseWrapper, APINodeList<APINode>>() {
public APINodeList<APINode> apply(ResponseWrapper result) {
try {
return APIRequestGetValueAdjustmentRulePersonaGroups.this.parseResponse(result.getBody(), result.getHeader());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
},
MoreExecutors.directExecutor()
);
};

public APIRequestGetValueAdjustmentRulePersonaGroups(String nodeId, APIContext context) {
super(context, nodeId, "/value_adjustment_rule_persona_groups", "GET", Arrays.asList(PARAMS));
}

@Override
public APIRequestGetValueAdjustmentRulePersonaGroups setParam(String param, Object value) {
setParamInternal(param, value);
return this;
}

@Override
public APIRequestGetValueAdjustmentRulePersonaGroups setParams(Map<String, Object> params) {
setParamsInternal(params);
return this;
}


public APIRequestGetValueAdjustmentRulePersonaGroups requestAllFields () {
return this.requestAllFields(true);
}

public APIRequestGetValueAdjustmentRulePersonaGroups requestAllFields (boolean value) {
for (String field : FIELDS) {
this.requestField(field, value);
}
return this;
}

@Override
public APIRequestGetValueAdjustmentRulePersonaGroups requestFields (List<String> fields) {
return this.requestFields(fields, true);
}

@Override
public APIRequestGetValueAdjustmentRulePersonaGroups requestFields (List<String> fields, boolean value) {
for (String field : fields) {
this.requestField(field, value);
}
return this;
}

@Override
public APIRequestGetValueAdjustmentRulePersonaGroups requestField (String field) {
this.requestField(field, true);
return this;
}

@Override
public APIRequestGetValueAdjustmentRulePersonaGroups requestField (String field, boolean value) {
this.requestFieldInternal(field, value);
return this;
}

}

public static class APIRequestGetValueAdjustmentRules extends APIRequest<APINode> {

APINodeList<APINode> lastResponse = null;
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/com/facebook/ads/sdk/AdAccountAdVolume.java
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ public static enum EnumRecommendationType {
VALUE_ASC_BUDGET_OPTIMIZATION("ASC_BUDGET_OPTIMIZATION"),
@SerializedName("ASC_BUDGET_OPTIMIZATION_PFR")
VALUE_ASC_BUDGET_OPTIMIZATION_PFR("ASC_BUDGET_OPTIMIZATION_PFR"),
@SerializedName("ASC_CREATION_PACKAGE")
VALUE_ASC_CREATION_PACKAGE("ASC_CREATION_PACKAGE"),
@SerializedName("ASPECT_RATIO")
VALUE_ASPECT_RATIO("ASPECT_RATIO"),
@SerializedName("ATLEAST_6_PLACEMENTS")
Expand Down Expand Up @@ -425,6 +427,8 @@ public static enum EnumRecommendationType {
VALUE_CONNECT_FACEBOOK_PAGE_TO_INSTAGRAM("CONNECT_FACEBOOK_PAGE_TO_INSTAGRAM"),
@SerializedName("CONNECT_FACEBOOK_PAGE_TO_WHATSAPP")
VALUE_CONNECT_FACEBOOK_PAGE_TO_WHATSAPP("CONNECT_FACEBOOK_PAGE_TO_WHATSAPP"),
@SerializedName("CONVERSION_LEAD_ADS")
VALUE_CONVERSION_LEAD_ADS("CONVERSION_LEAD_ADS"),
@SerializedName("COST_GOAL")
VALUE_COST_GOAL("COST_GOAL"),
@SerializedName("COST_GOAL_BUDGET_LIMITED")
Expand All @@ -437,6 +441,8 @@ public static enum EnumRecommendationType {
VALUE_CREATION_PACKAGE_UPGRADE_TO_ASC("CREATION_PACKAGE_UPGRADE_TO_ASC"),
@SerializedName("CREATION_PACKAGE_UPGRADE_TO_TLA")
VALUE_CREATION_PACKAGE_UPGRADE_TO_TLA("CREATION_PACKAGE_UPGRADE_TO_TLA"),
@SerializedName("CREATION_PACKAGE_UPGRADE_TO_TMC")
VALUE_CREATION_PACKAGE_UPGRADE_TO_TMC("CREATION_PACKAGE_UPGRADE_TO_TMC"),
@SerializedName("CREATIVE_BADGE")
VALUE_CREATIVE_BADGE("CREATIVE_BADGE"),
@SerializedName("CREATIVE_DIVERSITY")
Expand All @@ -455,6 +461,8 @@ public static enum EnumRecommendationType {
VALUE_CTA("CTA"),
@SerializedName("CTX_BUDGET_OPTIMIZATION")
VALUE_CTX_BUDGET_OPTIMIZATION("CTX_BUDGET_OPTIMIZATION"),
@SerializedName("CTX_GUIDANCE")
VALUE_CTX_GUIDANCE("CTX_GUIDANCE"),
@SerializedName("DA_ADVANTAGE_PLUS_CREATIVE_INFO_LABELS")
VALUE_DA_ADVANTAGE_PLUS_CREATIVE_INFO_LABELS("DA_ADVANTAGE_PLUS_CREATIVE_INFO_LABELS"),
@SerializedName("DEAD_LINK")
Expand All @@ -479,6 +487,8 @@ public static enum EnumRecommendationType {
VALUE_HISTORICAL_BENCHMARK("HISTORICAL_BENCHMARK"),
@SerializedName("IG_MULTI_ADS")
VALUE_IG_MULTI_ADS("IG_MULTI_ADS"),
@SerializedName("LEAD_ADS_GUIDANCE")
VALUE_LEAD_ADS_GUIDANCE("LEAD_ADS_GUIDANCE"),
@SerializedName("LEARNING_LIMITED")
VALUE_LEARNING_LIMITED("LEARNING_LIMITED"),
@SerializedName("LEARNING_PAUSE_FRICTION")
Expand Down Expand Up @@ -545,6 +555,8 @@ public static enum EnumRecommendationType {
VALUE_SYD_TEST_MODE("SYD_TEST_MODE"),
@SerializedName("TAILORED_LEAD_AD_CAMPAIGN")
VALUE_TAILORED_LEAD_AD_CAMPAIGN("TAILORED_LEAD_AD_CAMPAIGN"),
@SerializedName("TAILORED_MESSAGES_CAMPAIGN")
VALUE_TAILORED_MESSAGES_CAMPAIGN("TAILORED_MESSAGES_CAMPAIGN"),
@SerializedName("TOP_ADSETS_WITH_ADS_UNDER_CAP")
VALUE_TOP_ADSETS_WITH_ADS_UNDER_CAP("TOP_ADSETS_WITH_ADS_UNDER_CAP"),
@SerializedName("TOP_CAMPAIGNS_WITH_ADS_UNDER_CAP")
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/com/facebook/ads/sdk/AdAssetFeedAdditionalData.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public class AdAssetFeedAdditionalData extends APINode {
private Boolean mMultiShareEndCard = null;
@SerializedName("page_welcome_message")
private String mPageWelcomeMessage = null;
@SerializedName("partner_app_welcome_message_flow_id")
private String mPartnerAppWelcomeMessageFlowId = null;
protected static Gson gson = null;

public AdAssetFeedAdditionalData() {
Expand Down Expand Up @@ -247,6 +249,15 @@ public AdAssetFeedAdditionalData setFieldPageWelcomeMessage(String value) {
return this;
}

public String getFieldPartnerAppWelcomeMessageFlowId() {
return mPartnerAppWelcomeMessageFlowId;
}

public AdAssetFeedAdditionalData setFieldPartnerAppWelcomeMessageFlowId(String value) {
this.mPartnerAppWelcomeMessageFlowId = value;
return this;
}




Expand All @@ -269,6 +280,7 @@ public AdAssetFeedAdditionalData copyFrom(AdAssetFeedAdditionalData instance) {
this.mIsClickToMessage = instance.mIsClickToMessage;
this.mMultiShareEndCard = instance.mMultiShareEndCard;
this.mPageWelcomeMessage = instance.mPageWelcomeMessage;
this.mPartnerAppWelcomeMessageFlowId = instance.mPartnerAppWelcomeMessageFlowId;
this.context = instance.context;
this.rawValue = instance.rawValue;
return this;
Expand Down
Loading

0 comments on commit 17998bd

Please sign in to comment.