Skip to content

Commit

Permalink
Update AdCreativeFeatureDetails Fields
Browse files Browse the repository at this point in the history
Summary:
[BizSDK] Update AdCreativeFeatureDetails Fields

Add the customizations field in AdCreativeFeatureDetails node.
Also remove some unsupported fields from the AdCreativeFeatureCustomizations node.

Reviewed By: liliarizona

Differential Revision: D62890910

fbshipit-source-id: 1fdad3ce9d8c17811e67dd1d79d5026ce6b27c89
  • Loading branch information
stcheng authored and facebook-github-bot committed Sep 17, 2024
1 parent 3f54b77 commit c1f8144
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,8 @@
*
*/
public class AdCreativeFeatureCustomizations extends APINode {
@SerializedName("background_color")
private String mBackgroundColor = null;
@SerializedName("catalog_feed_tag_name")
private String mCatalogFeedTagName = null;
@SerializedName("font_name")
private String mFontName = null;
@SerializedName("product_recommendation_type")
private String mProductRecommendationType = null;
@SerializedName("product_versioning_fallback_strategy")
private String mProductVersioningFallbackStrategy = null;
@SerializedName("showcase_card_display")
private String mShowcaseCardDisplay = null;
@SerializedName("text_style")
private String mTextStyle = null;
@SerializedName("video_crop_style")
private String mVideoCropStyle = null;
protected static Gson gson = null;

public AdCreativeFeatureCustomizations() {
Expand Down Expand Up @@ -208,51 +194,6 @@ public String toString() {
}


public String getFieldBackgroundColor() {
return mBackgroundColor;
}

public AdCreativeFeatureCustomizations setFieldBackgroundColor(String value) {
this.mBackgroundColor = value;
return this;
}

public String getFieldCatalogFeedTagName() {
return mCatalogFeedTagName;
}

public AdCreativeFeatureCustomizations setFieldCatalogFeedTagName(String value) {
this.mCatalogFeedTagName = value;
return this;
}

public String getFieldFontName() {
return mFontName;
}

public AdCreativeFeatureCustomizations setFieldFontName(String value) {
this.mFontName = value;
return this;
}

public String getFieldProductRecommendationType() {
return mProductRecommendationType;
}

public AdCreativeFeatureCustomizations setFieldProductRecommendationType(String value) {
this.mProductRecommendationType = value;
return this;
}

public String getFieldProductVersioningFallbackStrategy() {
return mProductVersioningFallbackStrategy;
}

public AdCreativeFeatureCustomizations setFieldProductVersioningFallbackStrategy(String value) {
this.mProductVersioningFallbackStrategy = value;
return this;
}

public String getFieldShowcaseCardDisplay() {
return mShowcaseCardDisplay;
}
Expand All @@ -262,24 +203,6 @@ public AdCreativeFeatureCustomizations setFieldShowcaseCardDisplay(String value)
return this;
}

public String getFieldTextStyle() {
return mTextStyle;
}

public AdCreativeFeatureCustomizations setFieldTextStyle(String value) {
this.mTextStyle = value;
return this;
}

public String getFieldVideoCropStyle() {
return mVideoCropStyle;
}

public AdCreativeFeatureCustomizations setFieldVideoCropStyle(String value) {
this.mVideoCropStyle = value;
return this;
}




Expand All @@ -297,14 +220,7 @@ public AdCreativeFeatureCustomizations setFieldVideoCropStyle(String value) {
}

public AdCreativeFeatureCustomizations copyFrom(AdCreativeFeatureCustomizations instance) {
this.mBackgroundColor = instance.mBackgroundColor;
this.mCatalogFeedTagName = instance.mCatalogFeedTagName;
this.mFontName = instance.mFontName;
this.mProductRecommendationType = instance.mProductRecommendationType;
this.mProductVersioningFallbackStrategy = instance.mProductVersioningFallbackStrategy;
this.mShowcaseCardDisplay = instance.mShowcaseCardDisplay;
this.mTextStyle = instance.mTextStyle;
this.mVideoCropStyle = instance.mVideoCropStyle;
this.context = instance.context;
this.rawValue = instance.rawValue;
return this;
Expand Down
17 changes: 17 additions & 0 deletions src/main/java/com/facebook/ads/sdk/AdCreativeFeatureDetails.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
*
*/
public class AdCreativeFeatureDetails extends APINode {
@SerializedName("customizations")
private AdCreativeFeatureCustomizations mCustomizations = null;
@SerializedName("enroll_status")
private String mEnrollStatus = null;
protected static Gson gson = null;
Expand Down Expand Up @@ -194,6 +196,20 @@ public String toString() {
}


public AdCreativeFeatureCustomizations getFieldCustomizations() {
return mCustomizations;
}

public AdCreativeFeatureDetails setFieldCustomizations(AdCreativeFeatureCustomizations value) {
this.mCustomizations = value;
return this;
}

public AdCreativeFeatureDetails setFieldCustomizations(String value) {
Type type = new TypeToken<AdCreativeFeatureCustomizations>(){}.getType();
this.mCustomizations = AdCreativeFeatureCustomizations.getGson().fromJson(value, type);
return this;
}
public String getFieldEnrollStatus() {
return mEnrollStatus;
}
Expand All @@ -220,6 +236,7 @@ public AdCreativeFeatureDetails setFieldEnrollStatus(String value) {
}

public AdCreativeFeatureDetails copyFrom(AdCreativeFeatureDetails instance) {
this.mCustomizations = instance.mCustomizations;
this.mEnrollStatus = instance.mEnrollStatus;
this.context = instance.context;
this.rawValue = instance.rawValue;
Expand Down

0 comments on commit c1f8144

Please sign in to comment.