diff --git a/README.md b/README.md index 2fb9074040..efba454cac 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The Bing Ads Java SDK includes and depends on the microsoft.bingads Maven artifa com.microsoft.bingads microsoft.bingads - 13.0.20.2 + 13.0.21 ``` If you are not using a Maven project, you must include the correct version of each dependency. You can review the complete list of Bing Ads Java SDK dependencies at the [Maven Repository](http://mvnrepository.com/artifact/com.microsoft.bingads/microsoft.bingads/). diff --git a/pom.xml b/pom.xml index 425c28ec8c..c1592e7428 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,7 @@ 4.0.0 com.microsoft.bingads - 13.0.20.2 + 13.0.21 Bing Ads Java SDK The Bing Ads Java SDK is a library improving developer experience when working with the Bing Ads services by providing high-level access to features such as Bulk API, OAuth Authorization and SOAP API. https://github.com/BingAds/BingAds-Java-SDK diff --git a/proxies/com/microsoft/bingads/v13/bulk/DownloadEntity.java b/proxies/com/microsoft/bingads/v13/bulk/DownloadEntity.java index de64801999..174f11934a 100644 --- a/proxies/com/microsoft/bingads/v13/bulk/DownloadEntity.java +++ b/proxies/com/microsoft/bingads/v13/bulk/DownloadEntity.java @@ -187,6 +187,15 @@ * * * + * + * + * + * + * + * + * + * + * * * * } @@ -543,7 +552,25 @@ public enum DownloadEntity { @XmlEnumValue("SeasonalityAdjustments") SEASONALITY_ADJUSTMENTS("SeasonalityAdjustments"), @XmlEnumValue("DataExclusions") - DATA_EXCLUSIONS("DataExclusions"); + DATA_EXCLUSIONS("DataExclusions"), + @XmlEnumValue("BrandList") + BRAND_LIST("BrandList"), + @XmlEnumValue("BrandItem") + BRAND_ITEM("BrandItem"), + @XmlEnumValue("CampaignBrandListAssociation") + CAMPAIGN_BRAND_LIST_ASSOCIATION("CampaignBrandListAssociation"), + @XmlEnumValue("AssetGroupSearchThemes") + ASSET_GROUP_SEARCH_THEMES("AssetGroupSearchThemes"), + @XmlEnumValue("ImpressionBasedRemarketingList") + IMPRESSION_BASED_REMARKETING_LIST("ImpressionBasedRemarketingList"), + @XmlEnumValue("AdGroupImpressionBasedRemarketingListAssociations") + AD_GROUP_IMPRESSION_BASED_REMARKETING_LIST_ASSOCIATIONS("AdGroupImpressionBasedRemarketingListAssociations"), + @XmlEnumValue("AdGroupNegativeImpressionBasedRemarketingListAssociations") + AD_GROUP_NEGATIVE_IMPRESSION_BASED_REMARKETING_LIST_ASSOCIATIONS("AdGroupNegativeImpressionBasedRemarketingListAssociations"), + @XmlEnumValue("CampaignImpressionBasedRemarketingListAssociations") + CAMPAIGN_IMPRESSION_BASED_REMARKETING_LIST_ASSOCIATIONS("CampaignImpressionBasedRemarketingListAssociations"), + @XmlEnumValue("CampaignNegativeImpressionBasedRemarketingListAssociations") + CAMPAIGN_NEGATIVE_IMPRESSION_BASED_REMARKETING_LIST_ASSOCIATIONS("CampaignNegativeImpressionBasedRemarketingListAssociations"); private final String value; DownloadEntity(String v) { diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AdAdditionalField.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AdAdditionalField.java index f447e395f1..7156bea06a 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/AdAdditionalField.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AdAdditionalField.java @@ -8,7 +8,8 @@ public enum AdAdditionalField { IMPRESSION_TRACKING_URLS("ImpressionTrackingUrls"), VIDEOS("Videos"), LONG_HEADLINES("LongHeadlines"), - IMAGE_TARGET_DIMENSION("ImageTargetDimension"); + IMAGE_TARGET_DIMENSION("ImageTargetDimension"), + AD_SUB_TYPE("AdSubType"); private final String value; diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AdExtension.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AdExtension.java index 374aa51d3b..7f19d805b3 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/AdExtension.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AdExtension.java @@ -59,7 +59,8 @@ FilterLinkAdExtension.class, FlyerAdExtension.class, VideoAdExtension.class, - DisclaimerAdExtension.class + DisclaimerAdExtension.class, + LogoAdExtension.class }) public class AdExtension { diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AdExtensionAdditionalField.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AdExtensionAdditionalField.java index ba9a4a0b61..d044ca1239 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/AdExtensionAdditionalField.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AdExtensionAdditionalField.java @@ -10,7 +10,8 @@ public enum AdExtensionAdditionalField { LAYOUTS("Layouts"), ACTION_TYPES_PHASE3("ActionTypesPhase3"), ACTION_TYPES_PHASE4("ActionTypesPhase4"), - NEW_FILTER_LINK_HEADERS("NewFilterLinkHeaders"); + NEW_FILTER_LINK_HEADERS("NewFilterLinkHeaders"), + SOURCE_TYPE("SourceType"); private final String value; diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AdExtensionsTypeFilter.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AdExtensionsTypeFilter.java index 8148dbeb13..7d934dd8c8 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/AdExtensionsTypeFilter.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AdExtensionsTypeFilter.java @@ -19,7 +19,8 @@ public enum AdExtensionsTypeFilter { FILTER_LINK_AD_EXTENSION("FilterLinkAdExtension"), FLYER_AD_EXTENSION("FlyerAdExtension"), VIDEO_AD_EXTENSION("VideoAdExtension"), - DISCLAIMER_AD_EXTENSION("DisclaimerAdExtension"); + DISCLAIMER_AD_EXTENSION("DisclaimerAdExtension"), + LOGO_AD_EXTENSION("LogoAdExtension"); private final String value; diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AdGroupCriterionType.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AdGroupCriterionType.java index 644b888595..2a90007291 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/AdGroupCriterionType.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AdGroupCriterionType.java @@ -32,7 +32,8 @@ public enum AdGroupCriterionType { HOTEL_DATE_SELECTION_TYPE("HotelDateSelectionType"), HOTEL_CHECK_IN_DATE("HotelCheckInDate"), GENRE("Genre"), - CUSTOMER_LIST("CustomerList"); + CUSTOMER_LIST("CustomerList"), + IMPRESSION_BASED_REMARKETING_LIST("ImpressionBasedRemarketingList"); private final String value; diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AdSubType.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AdSubType.java new file mode 100644 index 0000000000..1ff7f7dc20 --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AdSubType.java @@ -0,0 +1,29 @@ +package com.microsoft.bingads.v13.campaignmanagement; + +/** + * Enum class for AdSubType. + */ +public enum AdSubType { + + VIDEO("Video"), + DISPLAY("Display"); + + private final String value; + + AdSubType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static AdSubType fromValue(String v) { + for (AdSubType c : AdSubType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } +} \ No newline at end of file diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AdSubTypeConverter.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AdSubTypeConverter.java new file mode 100644 index 0000000000..4846d9356c --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AdSubTypeConverter.java @@ -0,0 +1,34 @@ +package com.microsoft.bingads.v13.campaignmanagement; + +import java.util.ArrayList; +import java.util.Collection; + +/** + * Reserved for internal use. + */ +public class AdSubTypeConverter { + + public static Collection convertToList(String enums) { + String[] values = enums.split(" "); + + Collection result = new ArrayList(); + + for (String value : values) { + result.add(AdSubType.fromValue(value)); + } + + return result; + } + + public static String convertToString(Collection enums) { + String result = ""; + + for (AdSubType entity : enums) { + result += (entity.value() + " "); + } + + result = result.substring(0, result.length() - 1); + + return result; + } +} \ No newline at end of file diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter10.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter10.java index 28b1a0bfd6..cebb545630 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter10.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter10.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter10 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.AdGroupCriterionTypeConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.MediaEnabledEntityFilterConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.AdGroupCriterionTypeConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.MediaEnabledEntityFilterConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter11.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter11.java index 670d58a4d6..5a8a32836c 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter11.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter11.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter11 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.CriterionAdditionalFieldConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.MediaAdditionalFieldConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.CriterionAdditionalFieldConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.MediaAdditionalFieldConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter12.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter12.java index 851d78907c..5297d80207 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter12.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter12.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter12 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.AudienceTypeConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.AdGroupCriterionTypeConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.AudienceTypeConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.AdGroupCriterionTypeConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter13.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter13.java index 9fbae8f4bf..beedb5a4e0 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter13.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter13.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter13 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.ProfileTypeConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.CriterionAdditionalFieldConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.ProfileTypeConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.CriterionAdditionalFieldConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter14.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter14.java index 2198234305..b512ab8f96 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter14.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter14.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter14 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.BMCStoreAdditionalFieldConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.AudienceTypeConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.BMCStoreAdditionalFieldConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.AudienceTypeConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter15.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter15.java index 8e20d0b620..ebcc8b337c 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter15.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter15.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter15 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.CampaignCriterionTypeConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.ProfileTypeConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.CampaignCriterionTypeConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.ProfileTypeConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter16.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter16.java index c48141fbea..006ffaf416 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter16.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter16.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter16 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.ProductAudienceTypeConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.BMCStoreAdditionalFieldConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.ProductAudienceTypeConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.BMCStoreAdditionalFieldConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter17.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter17.java index 2ef9f7088f..bba29b88ab 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter17.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter17.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter17 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.AudienceAdditionalFieldConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.CampaignCriterionTypeConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.AudienceAdditionalFieldConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.CampaignCriterionTypeConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter18.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter18.java index 70b4ae84b2..ed3abab6fb 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter18.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter18.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter18 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.ConversionGoalTypeConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.AssetGroupAdditionalFieldConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.ConversionGoalTypeConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.AssetGroupAdditionalFieldConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter19.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter19.java index acaf192e06..c6d18e6f40 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter19.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter19.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter19 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.ConversionGoalAdditionalFieldConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.ProductAudienceTypeConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.ConversionGoalAdditionalFieldConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.ProductAudienceTypeConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter2.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter2.java index 38fce9c0f8..639fdd2056 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter2.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter2.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter2 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.HotelAdGroupTypeConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.AdSubTypeConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.HotelAdGroupTypeConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.AdSubTypeConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter20.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter20.java index fdf2cde5f6..f21cd1dbb8 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter20.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter20.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter20 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.ImportAdditionalFieldConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.AudienceAdditionalFieldConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.ImportAdditionalFieldConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.AudienceAdditionalFieldConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter21.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter21.java new file mode 100644 index 0000000000..d7e69016ff --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter21.java @@ -0,0 +1,20 @@ + +package com.microsoft.bingads.v13.campaignmanagement; + +import java.util.Collection; +import jakarta.xml.bind.annotation.adapters.XmlAdapter; + +public class Adapter21 + extends XmlAdapter> +{ + + + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.ConversionGoalTypeConverter.convertToList(value)); + } + + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.ConversionGoalTypeConverter.convertToString(value)); + } + +} diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter22.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter22.java new file mode 100644 index 0000000000..9a83a4c98b --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter22.java @@ -0,0 +1,20 @@ + +package com.microsoft.bingads.v13.campaignmanagement; + +import java.util.Collection; +import jakarta.xml.bind.annotation.adapters.XmlAdapter; + +public class Adapter22 + extends XmlAdapter> +{ + + + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.ConversionGoalAdditionalFieldConverter.convertToList(value)); + } + + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.ConversionGoalAdditionalFieldConverter.convertToString(value)); + } + +} diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter23.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter23.java new file mode 100644 index 0000000000..8cc30c8feb --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter23.java @@ -0,0 +1,20 @@ + +package com.microsoft.bingads.v13.campaignmanagement; + +import java.util.Collection; +import jakarta.xml.bind.annotation.adapters.XmlAdapter; + +public class Adapter23 + extends XmlAdapter> +{ + + + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.ImportAdditionalFieldConverter.convertToList(value)); + } + + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.ImportAdditionalFieldConverter.convertToString(value)); + } + +} diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter24.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter24.java new file mode 100644 index 0000000000..807c7487ad --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter24.java @@ -0,0 +1,20 @@ + +package com.microsoft.bingads.v13.campaignmanagement; + +import java.util.Collection; +import jakarta.xml.bind.annotation.adapters.XmlAdapter; + +public class Adapter24 + extends XmlAdapter> +{ + + + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.DeviceTypeConverter.convertToList(value)); + } + + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.DeviceTypeConverter.convertToString(value)); + } + +} diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter3.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter3.java index 17304f7266..d978cf7ea0 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter3.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter3.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter3 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.CampaignTypeConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.HotelAdGroupTypeConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.CampaignTypeConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.HotelAdGroupTypeConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter4.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter4.java index 5305c4828a..54e39d2ae7 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter4.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter4.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter4 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.CampaignAdditionalFieldConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.CampaignTypeConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.CampaignAdditionalFieldConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.CampaignTypeConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter5.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter5.java index 305956d709..20081adbfb 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter5.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter5.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter5 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.AdGroupAdditionalFieldConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.CampaignAdditionalFieldConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.AdGroupAdditionalFieldConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.CampaignAdditionalFieldConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter6.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter6.java index fa748b1d5a..4c547d9501 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter6.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter6.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter6 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.AdAdditionalFieldConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.AdGroupAdditionalFieldConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.AdAdditionalFieldConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.AdGroupAdditionalFieldConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter7.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter7.java index 4f5d90eb73..664bac69c7 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter7.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter7.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter7 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.AdExtensionsTypeFilterConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.AdAdditionalFieldConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.AdExtensionsTypeFilterConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.AdAdditionalFieldConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter8.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter8.java index 5866274296..cfe73b1e12 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter8.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter8.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter8 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.AdExtensionAdditionalFieldConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.AdExtensionsTypeFilterConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.AdExtensionAdditionalFieldConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.AdExtensionsTypeFilterConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter9.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter9.java index 2007acbe43..b6f69292d4 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter9.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Adapter9.java @@ -5,16 +5,16 @@ import jakarta.xml.bind.annotation.adapters.XmlAdapter; public class Adapter9 - extends XmlAdapter> + extends XmlAdapter> { - public Collection unmarshal(String value) { - return (com.microsoft.bingads.v13.campaignmanagement.MediaEnabledEntityFilterConverter.convertToList(value)); + public Collection unmarshal(String value) { + return (com.microsoft.bingads.v13.campaignmanagement.AdExtensionAdditionalFieldConverter.convertToList(value)); } - public String marshal(Collection value) { - return (com.microsoft.bingads.v13.campaignmanagement.MediaEnabledEntityFilterConverter.convertToString(value)); + public String marshal(Collection value) { + return (com.microsoft.bingads.v13.campaignmanagement.AdExtensionAdditionalFieldConverter.convertToString(value)); } } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AddAdGroupCriterionsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AddAdGroupCriterionsRequest.java index d1c5be0c40..c867922fb5 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/AddAdGroupCriterionsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AddAdGroupCriterionsRequest.java @@ -41,7 +41,7 @@ public class AddAdGroupCriterionsRequest { @XmlElement(name = "AdGroupCriterions", nillable = true) protected ArrayOfAdGroupCriterion adGroupCriterions; @XmlElement(name = "CriterionType", type = String.class) - @XmlJavaTypeAdapter(Adapter10 .class) + @XmlJavaTypeAdapter(Adapter12 .class) protected Collection criterionType; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AddCampaignCriterionsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AddCampaignCriterionsRequest.java index f18eee01f3..0725b1bbc6 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/AddCampaignCriterionsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AddCampaignCriterionsRequest.java @@ -41,7 +41,7 @@ public class AddCampaignCriterionsRequest { @XmlElement(name = "CampaignCriterions", nillable = true) protected ArrayOfCampaignCriterion campaignCriterions; @XmlElement(name = "CriterionType", type = String.class) - @XmlJavaTypeAdapter(Adapter15 .class) + @XmlJavaTypeAdapter(Adapter17 .class) protected Collection criterionType; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/ArrayOfAssetGroupSearchTheme.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/ArrayOfAssetGroupSearchTheme.java new file mode 100644 index 0000000000..8c6616c378 --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/ArrayOfAssetGroupSearchTheme.java @@ -0,0 +1,80 @@ + +package com.microsoft.bingads.v13.campaignmanagement; + +import java.util.ArrayList; +import java.util.List; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; +import com.fasterxml.jackson.annotation.JsonCreator; + +/** + *

Java class for ArrayOfAssetGroupSearchTheme complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ArrayOfAssetGroupSearchTheme", propOrder = { + "assetGroupSearchThemes" +}) +public class ArrayOfAssetGroupSearchTheme { + + @XmlElement(name = "AssetGroupSearchTheme", nillable = true) + protected List assetGroupSearchThemes; + public ArrayOfAssetGroupSearchTheme() + { + this.assetGroupSearchThemes = new ArrayList(); + } + @JsonCreator + public ArrayOfAssetGroupSearchTheme(List assetgroupsearchthemes) + { + this.assetGroupSearchThemes = assetgroupsearchthemes; + } + + /** + * Gets the value of the assetGroupSearchThemes property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the Jakarta XML Binding object. + * This is why there is not a {@code set} method for the assetGroupSearchThemes property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAssetGroupSearchThemes().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link AssetGroupSearchTheme } + * + * + * @return + * The value of the assetGroupSearchThemes property. + */ + public List getAssetGroupSearchThemes() { + if (assetGroupSearchThemes == null) { + assetGroupSearchThemes = new ArrayList<>(); + } + return this.assetGroupSearchThemes; + } + +} diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AssetGroup.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AssetGroup.java index 299b9f217b..da68b7b0a9 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/AssetGroup.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AssetGroup.java @@ -18,6 +18,7 @@ * * * + * * * * @@ -45,6 +46,7 @@ */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AssetGroup", propOrder = { + "assetGroupSearchThemes", "businessName", "callToAction", "descriptions", @@ -65,6 +67,8 @@ }) public class AssetGroup { + @XmlElement(name = "AssetGroupSearchThemes", nillable = true) + protected ArrayOfAssetGroupSearchTheme assetGroupSearchThemes; @XmlElement(name = "BusinessName", nillable = true) protected String businessName; @XmlElement(name = "CallToAction", nillable = true) @@ -103,6 +107,30 @@ public class AssetGroup { @XmlSchemaType(name = "string") protected AssetGroupStatus status; + /** + * Gets the value of the assetGroupSearchThemes property. + * + * @return + * possible object is + * {@link ArrayOfAssetGroupSearchTheme } + * + */ + public ArrayOfAssetGroupSearchTheme getAssetGroupSearchThemes() { + return assetGroupSearchThemes; + } + + /** + * Sets the value of the assetGroupSearchThemes property. + * + * @param value + * allowed object is + * {@link ArrayOfAssetGroupSearchTheme } + * + */ + public void setAssetGroupSearchThemes(ArrayOfAssetGroupSearchTheme value) { + this.assetGroupSearchThemes = value; + } + /** * Gets the value of the businessName property. * diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AssetGroupAdditionalField.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AssetGroupAdditionalField.java new file mode 100644 index 0000000000..cb1dd94c5b --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AssetGroupAdditionalField.java @@ -0,0 +1,28 @@ +package com.microsoft.bingads.v13.campaignmanagement; + +/** + * Enum class for AssetGroupAdditionalField. + */ +public enum AssetGroupAdditionalField { + + ASSET_GROUP_SEARCH_THEMES("AssetGroupSearchThemes"); + + private final String value; + + AssetGroupAdditionalField(String v) { + value = v; + } + + public String value() { + return value; + } + + public static AssetGroupAdditionalField fromValue(String v) { + for (AssetGroupAdditionalField c : AssetGroupAdditionalField.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } +} \ No newline at end of file diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AssetGroupAdditionalFieldConverter.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AssetGroupAdditionalFieldConverter.java new file mode 100644 index 0000000000..312a9c38ae --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AssetGroupAdditionalFieldConverter.java @@ -0,0 +1,34 @@ +package com.microsoft.bingads.v13.campaignmanagement; + +import java.util.ArrayList; +import java.util.Collection; + +/** + * Reserved for internal use. + */ +public class AssetGroupAdditionalFieldConverter { + + public static Collection convertToList(String enums) { + String[] values = enums.split(" "); + + Collection result = new ArrayList(); + + for (String value : values) { + result.add(AssetGroupAdditionalField.fromValue(value)); + } + + return result; + } + + public static String convertToString(Collection enums) { + String result = ""; + + for (AssetGroupAdditionalField entity : enums) { + result += (entity.value() + " "); + } + + result = result.substring(0, result.length() - 1); + + return result; + } +} \ No newline at end of file diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AssetGroupSearchTheme.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AssetGroupSearchTheme.java new file mode 100644 index 0000000000..912ac6c3e0 --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AssetGroupSearchTheme.java @@ -0,0 +1,90 @@ + +package com.microsoft.bingads.v13.campaignmanagement; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for AssetGroupSearchTheme complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AssetGroupSearchTheme", propOrder = { + "id", + "searchTheme" +}) +public class AssetGroupSearchTheme { + + @XmlElement(name = "Id", nillable = true) + protected Long id; + @XmlElement(name = "SearchTheme", nillable = true) + protected String searchTheme; + + /** + * Gets the value of the id property. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getId() { + return id; + } + + /** + * Sets the value of the id property. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setId(Long value) { + this.id = value; + } + + /** + * Gets the value of the searchTheme property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSearchTheme() { + return searchTheme; + } + + /** + * Sets the value of the searchTheme property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSearchTheme(String value) { + this.searchTheme = value; + } + +} diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Audience.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Audience.java index 69b7ac11db..eb4085d426 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Audience.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Audience.java @@ -63,7 +63,8 @@ ProductAudience.class, SimilarRemarketingList.class, CombinedList.class, - CustomerList.class + CustomerList.class, + ImpressionBasedRemarketingList.class }) public class Audience { @@ -91,7 +92,7 @@ public class Audience { @XmlElement(name = "SupportedCampaignTypes", nillable = true) protected ArrayOfstring supportedCampaignTypes; @XmlElement(name = "Type", type = String.class) - @XmlJavaTypeAdapter(Adapter12 .class) + @XmlJavaTypeAdapter(Adapter14 .class) protected Collection type; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceAdditionalField.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceAdditionalField.java index fc1f5999e2..0d92695db4 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceAdditionalField.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceAdditionalField.java @@ -6,7 +6,8 @@ public enum AudienceAdditionalField { NORMAL_FORM("NormalForm"), - NUMBER_RULE_ITEM("NumberRuleItem"); + NUMBER_RULE_ITEM("NumberRuleItem"), + IMPREESION_BASED_REMARKETING_LIST("ImpreesionBasedRemarketingList"); private final String value; diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceCriterion.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceCriterion.java index 3899108fef..0158376708 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceCriterion.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceCriterion.java @@ -44,7 +44,7 @@ public AudienceCriterion() { @XmlElement(name = "AudienceId", nillable = true) protected Long audienceId; @XmlElement(name = "AudienceType", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter12 .class) + @XmlJavaTypeAdapter(Adapter14 .class) protected Collection audienceType; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceInfo.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceInfo.java index 90e7829f73..8667675120 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceInfo.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceInfo.java @@ -39,7 +39,7 @@ public class AudienceInfo { @XmlElement(name = "Id", nillable = true) protected Long id; @XmlElement(name = "Type", type = String.class) - @XmlJavaTypeAdapter(Adapter12 .class) + @XmlJavaTypeAdapter(Adapter14 .class) protected Collection type; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceType.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceType.java index 3b5d9583df..32304f118e 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceType.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/AudienceType.java @@ -11,7 +11,8 @@ public enum AudienceType { PRODUCT("Product"), SIMILAR_REMARKETING_LIST("SimilarRemarketingList"), COMBINED_LIST("CombinedList"), - CUSTOMER_LIST("CustomerList"); + CUSTOMER_LIST("CustomerList"), + IMPRESSION_BASED_REMARKETING_LIST("ImpressionBasedRemarketingList"); private final String value; diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/BidStrategy.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/BidStrategy.java index 736b085dee..da532b48b5 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/BidStrategy.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/BidStrategy.java @@ -43,7 +43,7 @@ public class BidStrategy { @XmlElement(name = "AssociatedCampaignType", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter3 .class) + @XmlJavaTypeAdapter(Adapter4 .class) protected Collection associatedCampaignType; @XmlElement(name = "AssociationCount", nillable = true) protected Integer associationCount; diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Campaign.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Campaign.java index eed560033a..c026155794 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Campaign.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Campaign.java @@ -116,7 +116,7 @@ public class Campaign { @XmlElement(name = "UrlCustomParameters", nillable = true) protected CustomParameters urlCustomParameters; @XmlElement(name = "CampaignType", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter3 .class) + @XmlJavaTypeAdapter(Adapter4 .class) protected Collection campaignType; @XmlElement(name = "Settings", nillable = true) protected ArrayOfSetting settings; diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/CampaignAdditionalField.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/CampaignAdditionalField.java index fd0213f9aa..06a066be87 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/CampaignAdditionalField.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/CampaignAdditionalField.java @@ -25,7 +25,10 @@ public enum CampaignAdditionalField { CALL_TO_ACTION_SETTING("CallToActionSetting"), PAGE_FEED_IN_PERFORMANCE_MAX_SETTINGS("PageFeedInPerformanceMaxSettings"), DEAL_IDS("DealIds"), - AUTO_GENERATED_TEXT_AND_IMAGE_OPT_OUT_IN_PERFORMANCE_MAX_SETTINGS("AutoGeneratedTextAndImageOptOutInPerformanceMaxSettings"); + AUTO_GENERATED_TEXT_AND_IMAGE_OPT_OUT_IN_PERFORMANCE_MAX_SETTINGS("AutoGeneratedTextAndImageOptOutInPerformanceMaxSettings"), + COST_PER_SALE_OPT_OUT_IN_PERFORMANCE_MAX_SETTINGS("CostPerSaleOptOutInPerformanceMaxSettings"), + VANITY_PHARMA_SETTING("VanityPharmaSetting"), + MANUAL_CPI("ManualCpi"); private final String value; diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/CampaignCriterionType.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/CampaignCriterionType.java index fbec5b5a10..41b413d105 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/CampaignCriterionType.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/CampaignCriterionType.java @@ -26,7 +26,8 @@ public enum CampaignCriterionType { SIMILAR_REMARKETING_LIST("SimilarRemarketingList"), STORE("Store"), COMBINED_LIST("CombinedList"), - CUSTOMER_LIST("CustomerList"); + CUSTOMER_LIST("CustomerList"), + IMPRESSION_BASED_REMARKETING_LIST("ImpressionBasedRemarketingList"); private final String value; diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/CampaignType.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/CampaignType.java index d163338844..f9e06fbeb2 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/CampaignType.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/CampaignType.java @@ -10,7 +10,8 @@ public enum CampaignType { DYNAMIC_SEARCH_ADS("DynamicSearchAds"), AUDIENCE("Audience"), HOTEL("Hotel"), - PERFORMANCE_MAX("PerformanceMax"); + PERFORMANCE_MAX("PerformanceMax"), + APP("App"); private final String value; diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/ConversionGoal.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/ConversionGoal.java index c0ffa789df..c2c8ffecac 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/ConversionGoal.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/ConversionGoal.java @@ -106,7 +106,7 @@ public class ConversionGoal { @XmlSchemaType(name = "string") protected ConversionGoalTrackingStatus trackingStatus; @XmlElement(name = "Type", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter18 .class) + @XmlJavaTypeAdapter(Adapter21 .class) protected Collection type; @XmlElement(name = "ViewThroughConversionWindowInMinutes", nillable = true) protected Integer viewThroughConversionWindowInMinutes; diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/DataExclusion.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/DataExclusion.java index 44b5badae0..ed6ed74ee6 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/DataExclusion.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/DataExclusion.java @@ -53,13 +53,13 @@ public class DataExclusion { @XmlElement(name = "CampaignAssociations", nillable = true) protected ArrayOfCampaignAssociation campaignAssociations; @XmlElement(name = "CampaignTypeFilter", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter3 .class) + @XmlJavaTypeAdapter(Adapter4 .class) protected Collection campaignTypeFilter; @XmlElement(name = "Description", nillable = true) protected String description; - @XmlElement(name = "DeviceTypeFilter", nillable = true) - @XmlSchemaType(name = "string") - protected DeviceType deviceTypeFilter; + @XmlElement(name = "DeviceTypeFilter", type = String.class, nillable = true) + @XmlJavaTypeAdapter(Adapter24 .class) + protected Collection deviceTypeFilter; @XmlElement(name = "EndDate", type = String.class, nillable = true) @XmlJavaTypeAdapter(Adapter1 .class) @XmlSchemaType(name = "dateTime") @@ -150,10 +150,10 @@ public void setDescription(String value) { * * @return * possible object is - * {@link DeviceType } + * {@link String } * */ - public DeviceType getDeviceTypeFilter() { + public Collection getDeviceTypeFilter() { return deviceTypeFilter; } @@ -162,10 +162,10 @@ public DeviceType getDeviceTypeFilter() { * * @param value * allowed object is - * {@link DeviceType } + * {@link String } * */ - public void setDeviceTypeFilter(DeviceType value) { + public void setDeviceTypeFilter(Collection value) { this.deviceTypeFilter = value; } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/DeleteAdGroupCriterionsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/DeleteAdGroupCriterionsRequest.java index 250f488c51..0278406016 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/DeleteAdGroupCriterionsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/DeleteAdGroupCriterionsRequest.java @@ -45,7 +45,7 @@ public class DeleteAdGroupCriterionsRequest { @XmlElement(name = "AdGroupId") protected Long adGroupId; @XmlElement(name = "CriterionType", type = String.class) - @XmlJavaTypeAdapter(Adapter10 .class) + @XmlJavaTypeAdapter(Adapter12 .class) protected Collection criterionType; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/DeleteCampaignCriterionsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/DeleteCampaignCriterionsRequest.java index e6da366393..5283af1f4d 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/DeleteCampaignCriterionsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/DeleteCampaignCriterionsRequest.java @@ -45,7 +45,7 @@ public class DeleteCampaignCriterionsRequest { @XmlElement(name = "CampaignId") protected Long campaignId; @XmlElement(name = "CriterionType", type = String.class) - @XmlJavaTypeAdapter(Adapter15 .class) + @XmlJavaTypeAdapter(Adapter17 .class) protected Collection criterionType; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/DeviceType.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/DeviceType.java index ef53aabbfe..36e4939794 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/DeviceType.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/DeviceType.java @@ -1,42 +1,16 @@ - package com.microsoft.bingads.v13.campaignmanagement; -import jakarta.xml.bind.annotation.XmlEnum; -import jakarta.xml.bind.annotation.XmlEnumValue; -import jakarta.xml.bind.annotation.XmlType; - - /** - *

Java class for DeviceType. - * - *

The following schema fragment specifies the expected content contained within this class. - *

{@code
- * 
- *   
- *     
- *     
- *     
- *     
- *     
- *   
- * 
- * }
- * + * Enum class for DeviceType. */ -@XmlType(name = "DeviceType") -@XmlEnum public enum DeviceType { - @XmlEnumValue("None") NONE("None"), - @XmlEnumValue("Computers") COMPUTERS("Computers"), - @XmlEnumValue("Smartphones") SMARTPHONES("Smartphones"), - @XmlEnumValue("Tablets") TABLETS("Tablets"), - @XmlEnumValue("All") ALL("All"); + private final String value; DeviceType(String v) { @@ -48,12 +22,11 @@ public String value() { } public static DeviceType fromValue(String v) { - for (DeviceType c: DeviceType.values()) { + for (DeviceType c : DeviceType.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } - -} +} \ No newline at end of file diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/DeviceTypeConverter.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/DeviceTypeConverter.java new file mode 100644 index 0000000000..5e13a84530 --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/DeviceTypeConverter.java @@ -0,0 +1,34 @@ +package com.microsoft.bingads.v13.campaignmanagement; + +import java.util.ArrayList; +import java.util.Collection; + +/** + * Reserved for internal use. + */ +public class DeviceTypeConverter { + + public static Collection convertToList(String enums) { + String[] values = enums.split(" "); + + Collection result = new ArrayList(); + + for (String value : values) { + result.add(DeviceType.fromValue(value)); + } + + return result; + } + + public static String convertToString(Collection enums) { + String result = ""; + + for (DeviceType entity : enums) { + result += (entity.value() + " "); + } + + result = result.substring(0, result.length() - 1); + + return result; + } +} \ No newline at end of file diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdExtensionIdsByAccountIdRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdExtensionIdsByAccountIdRequest.java index 5a970fdde8..044cf50379 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdExtensionIdsByAccountIdRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdExtensionIdsByAccountIdRequest.java @@ -44,7 +44,7 @@ public class GetAdExtensionIdsByAccountIdRequest { @XmlElement(name = "AccountId") protected Long accountId; @XmlElement(name = "AdExtensionType", type = String.class) - @XmlJavaTypeAdapter(Adapter7 .class) + @XmlJavaTypeAdapter(Adapter8 .class) protected Collection adExtensionType; @XmlElement(name = "AssociationType", nillable = true) @XmlSchemaType(name = "string") diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdExtensionsAssociationsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdExtensionsAssociationsRequest.java index 199d9a94c8..7337aa5262 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdExtensionsAssociationsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdExtensionsAssociationsRequest.java @@ -48,7 +48,7 @@ public class GetAdExtensionsAssociationsRequest { @XmlElement(name = "AccountId") protected Long accountId; @XmlElement(name = "AdExtensionType", type = String.class) - @XmlJavaTypeAdapter(Adapter7 .class) + @XmlJavaTypeAdapter(Adapter8 .class) protected Collection adExtensionType; @XmlElement(name = "AssociationType") @XmlSchemaType(name = "string") @@ -56,7 +56,7 @@ public class GetAdExtensionsAssociationsRequest { @XmlElement(name = "EntityIds", nillable = true) protected ArrayOflong entityIds; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter8 .class) + @XmlJavaTypeAdapter(Adapter9 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdExtensionsByIdsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdExtensionsByIdsRequest.java index 5e94e69511..c5383201ba 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdExtensionsByIdsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdExtensionsByIdsRequest.java @@ -47,10 +47,10 @@ public class GetAdExtensionsByIdsRequest { @XmlElement(name = "AdExtensionIds", nillable = true) protected ArrayOflong adExtensionIds; @XmlElement(name = "AdExtensionType", type = String.class) - @XmlJavaTypeAdapter(Adapter7 .class) + @XmlJavaTypeAdapter(Adapter8 .class) protected Collection adExtensionType; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter8 .class) + @XmlJavaTypeAdapter(Adapter9 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdGroupCriterionsByIdsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdGroupCriterionsByIdsRequest.java index 45b83415ba..013e764ff9 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdGroupCriterionsByIdsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdGroupCriterionsByIdsRequest.java @@ -47,10 +47,10 @@ public class GetAdGroupCriterionsByIdsRequest { @XmlElement(name = "AdGroupId") protected Long adGroupId; @XmlElement(name = "CriterionType", type = String.class) - @XmlJavaTypeAdapter(Adapter10 .class) + @XmlJavaTypeAdapter(Adapter12 .class) protected Collection criterionType; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter11 .class) + @XmlJavaTypeAdapter(Adapter13 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdGroupsByCampaignIdRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdGroupsByCampaignIdRequest.java index a31cea04d7..caf527aa2b 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdGroupsByCampaignIdRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdGroupsByCampaignIdRequest.java @@ -41,7 +41,7 @@ public class GetAdGroupsByCampaignIdRequest { @XmlElement(name = "CampaignId") protected Long campaignId; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter5 .class) + @XmlJavaTypeAdapter(Adapter6 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdGroupsByIdsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdGroupsByIdsRequest.java index ff7c0c0c49..da12e5ce73 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdGroupsByIdsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdGroupsByIdsRequest.java @@ -45,7 +45,7 @@ public class GetAdGroupsByIdsRequest { @XmlElement(name = "AdGroupIds", nillable = true) protected ArrayOflong adGroupIds; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter5 .class) + @XmlJavaTypeAdapter(Adapter6 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdsByAdGroupIdRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdsByAdGroupIdRequest.java index a86384042e..a9ab2044ce 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdsByAdGroupIdRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdsByAdGroupIdRequest.java @@ -45,7 +45,7 @@ public class GetAdsByAdGroupIdRequest { @XmlElement(name = "AdTypes", nillable = true) protected ArrayOfAdType adTypes; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter6 .class) + @XmlJavaTypeAdapter(Adapter7 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdsByEditorialStatusRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdsByEditorialStatusRequest.java index ab620d2d42..974f44d7fe 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdsByEditorialStatusRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdsByEditorialStatusRequest.java @@ -51,7 +51,7 @@ public class GetAdsByEditorialStatusRequest { @XmlElement(name = "AdTypes", nillable = true) protected ArrayOfAdType adTypes; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter6 .class) + @XmlJavaTypeAdapter(Adapter7 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdsByIdsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdsByIdsRequest.java index 799ae90c9b..befb2b09e9 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdsByIdsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAdsByIdsRequest.java @@ -49,7 +49,7 @@ public class GetAdsByIdsRequest { @XmlElement(name = "AdTypes", nillable = true) protected ArrayOfAdType adTypes; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter6 .class) + @XmlJavaTypeAdapter(Adapter7 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAssetGroupsByCampaignIdRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAssetGroupsByCampaignIdRequest.java index f4a8b511d6..24bb8dfcdd 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAssetGroupsByCampaignIdRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAssetGroupsByCampaignIdRequest.java @@ -1,11 +1,13 @@ package com.microsoft.bingads.v13.campaignmanagement; +import java.util.Collection; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlRootElement; import jakarta.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** @@ -19,6 +21,7 @@ * * * + * * * * @@ -29,13 +32,17 @@ */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { - "campaignId" + "campaignId", + "returnAdditionalFields" }) @XmlRootElement(name = "GetAssetGroupsByCampaignIdRequest") public class GetAssetGroupsByCampaignIdRequest { @XmlElement(name = "CampaignId") protected Long campaignId; + @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) + @XmlJavaTypeAdapter(Adapter18 .class) + protected Collection returnAdditionalFields; /** * Gets the value of the campaignId property. @@ -61,4 +68,28 @@ public void setCampaignId(Long value) { this.campaignId = value; } + /** + * Gets the value of the returnAdditionalFields property. + * + * @return + * possible object is + * {@link String } + * + */ + public Collection getReturnAdditionalFields() { + return returnAdditionalFields; + } + + /** + * Sets the value of the returnAdditionalFields property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setReturnAdditionalFields(Collection value) { + this.returnAdditionalFields = value; + } + } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAssetGroupsByIdsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAssetGroupsByIdsRequest.java index 9bd24106a7..898750ab2c 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAssetGroupsByIdsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAssetGroupsByIdsRequest.java @@ -1,11 +1,13 @@ package com.microsoft.bingads.v13.campaignmanagement; +import java.util.Collection; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlRootElement; import jakarta.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** @@ -20,6 +22,7 @@ * * * + * * * * @@ -31,7 +34,8 @@ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "campaignId", - "assetGroupIds" + "assetGroupIds", + "returnAdditionalFields" }) @XmlRootElement(name = "GetAssetGroupsByIdsRequest") public class GetAssetGroupsByIdsRequest { @@ -40,6 +44,9 @@ public class GetAssetGroupsByIdsRequest { protected Long campaignId; @XmlElement(name = "AssetGroupIds", nillable = true) protected ArrayOflong assetGroupIds; + @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) + @XmlJavaTypeAdapter(Adapter18 .class) + protected Collection returnAdditionalFields; /** * Gets the value of the campaignId property. @@ -89,4 +96,28 @@ public void setAssetGroupIds(ArrayOflong value) { this.assetGroupIds = value; } + /** + * Gets the value of the returnAdditionalFields property. + * + * @return + * possible object is + * {@link String } + * + */ + public Collection getReturnAdditionalFields() { + return returnAdditionalFields; + } + + /** + * Sets the value of the returnAdditionalFields property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setReturnAdditionalFields(Collection value) { + this.returnAdditionalFields = value; + } + } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAudiencesByIdsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAudiencesByIdsRequest.java index f037e2f0c8..a2c8141683 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAudiencesByIdsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetAudiencesByIdsRequest.java @@ -43,10 +43,10 @@ public class GetAudiencesByIdsRequest { @XmlElement(name = "AudienceIds", nillable = true) protected ArrayOflong audienceIds; @XmlElement(name = "Type", type = String.class) - @XmlJavaTypeAdapter(Adapter12 .class) + @XmlJavaTypeAdapter(Adapter14 .class) protected Collection type; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter17 .class) + @XmlJavaTypeAdapter(Adapter20 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetBMCStoresByCustomerIdRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetBMCStoresByCustomerIdRequest.java index a7796b1c83..372805cbda 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetBMCStoresByCustomerIdRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetBMCStoresByCustomerIdRequest.java @@ -37,7 +37,7 @@ public class GetBMCStoresByCustomerIdRequest { @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter14 .class) + @XmlJavaTypeAdapter(Adapter16 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetCampaignCriterionsByIdsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetCampaignCriterionsByIdsRequest.java index 844c49b706..38c4d2aeed 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetCampaignCriterionsByIdsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetCampaignCriterionsByIdsRequest.java @@ -47,10 +47,10 @@ public class GetCampaignCriterionsByIdsRequest { @XmlElement(name = "CampaignId") protected Long campaignId; @XmlElement(name = "CriterionType", type = String.class) - @XmlJavaTypeAdapter(Adapter15 .class) + @XmlJavaTypeAdapter(Adapter17 .class) protected Collection criterionType; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter11 .class) + @XmlJavaTypeAdapter(Adapter13 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetCampaignsByAccountIdRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetCampaignsByAccountIdRequest.java index 52a4d54e97..3e858fb802 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetCampaignsByAccountIdRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetCampaignsByAccountIdRequest.java @@ -43,10 +43,10 @@ public class GetCampaignsByAccountIdRequest { @XmlElement(name = "AccountId") protected Long accountId; @XmlElement(name = "CampaignType", type = String.class) - @XmlJavaTypeAdapter(Adapter3 .class) + @XmlJavaTypeAdapter(Adapter4 .class) protected Collection campaignType; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter4 .class) + @XmlJavaTypeAdapter(Adapter5 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetCampaignsByIdsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetCampaignsByIdsRequest.java index 7c9dccf325..68cbf3942b 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetCampaignsByIdsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetCampaignsByIdsRequest.java @@ -47,10 +47,10 @@ public class GetCampaignsByIdsRequest { @XmlElement(name = "CampaignIds", nillable = true) protected ArrayOflong campaignIds; @XmlElement(name = "CampaignType", type = String.class) - @XmlJavaTypeAdapter(Adapter3 .class) + @XmlJavaTypeAdapter(Adapter4 .class) protected Collection campaignType; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter4 .class) + @XmlJavaTypeAdapter(Adapter5 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetConversionGoalsByIdsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetConversionGoalsByIdsRequest.java index c0fe49659f..747cd8fad8 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetConversionGoalsByIdsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetConversionGoalsByIdsRequest.java @@ -43,10 +43,10 @@ public class GetConversionGoalsByIdsRequest { @XmlElement(name = "ConversionGoalIds", nillable = true) protected ArrayOflong conversionGoalIds; @XmlElement(name = "ConversionGoalTypes", type = String.class) - @XmlJavaTypeAdapter(Adapter18 .class) + @XmlJavaTypeAdapter(Adapter21 .class) protected Collection conversionGoalTypes; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter19 .class) + @XmlJavaTypeAdapter(Adapter22 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetConversionGoalsByTagIdsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetConversionGoalsByTagIdsRequest.java index 69a180d7c6..fedc054c5f 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetConversionGoalsByTagIdsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetConversionGoalsByTagIdsRequest.java @@ -43,10 +43,10 @@ public class GetConversionGoalsByTagIdsRequest { @XmlElement(name = "TagIds", nillable = true) protected ArrayOflong tagIds; @XmlElement(name = "ConversionGoalTypes", type = String.class) - @XmlJavaTypeAdapter(Adapter18 .class) + @XmlJavaTypeAdapter(Adapter21 .class) protected Collection conversionGoalTypes; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter19 .class) + @XmlJavaTypeAdapter(Adapter22 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetImportJobsByIdsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetImportJobsByIdsRequest.java index 5c1497ecd7..c6497416f7 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetImportJobsByIdsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetImportJobsByIdsRequest.java @@ -45,7 +45,7 @@ public class GetImportJobsByIdsRequest { @XmlElement(name = "ImportType", nillable = true) protected String importType; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter20 .class) + @XmlJavaTypeAdapter(Adapter23 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetImportResultsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetImportResultsRequest.java index 8a9aa0d2d0..1ef9018b49 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetImportResultsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetImportResultsRequest.java @@ -49,7 +49,7 @@ public class GetImportResultsRequest { @XmlElement(name = "ImportJobIds", nillable = true) protected ArrayOflong importJobIds; @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter20 .class) + @XmlJavaTypeAdapter(Adapter23 .class) protected Collection returnAdditionalFields; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetMediaAssociationsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetMediaAssociationsRequest.java index 1d9f56e7fa..a3e85640e3 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetMediaAssociationsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetMediaAssociationsRequest.java @@ -39,7 +39,7 @@ public class GetMediaAssociationsRequest { @XmlElement(name = "MediaEnabledEntities", type = String.class) - @XmlJavaTypeAdapter(Adapter9 .class) + @XmlJavaTypeAdapter(Adapter10 .class) protected Collection mediaEnabledEntities; @XmlElement(name = "MediaIds", nillable = true) protected ArrayOflong mediaIds; diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetMediaMetaDataByAccountIdRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetMediaMetaDataByAccountIdRequest.java index aa25ae2fd6..6a6afd27d4 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetMediaMetaDataByAccountIdRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetMediaMetaDataByAccountIdRequest.java @@ -22,6 +22,7 @@ * * * + * * * * @@ -33,16 +34,20 @@ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "mediaEnabledEntities", - "pageInfo" + "pageInfo", + "returnAdditionalFields" }) @XmlRootElement(name = "GetMediaMetaDataByAccountIdRequest") public class GetMediaMetaDataByAccountIdRequest { @XmlElement(name = "MediaEnabledEntities", type = String.class) - @XmlJavaTypeAdapter(Adapter9 .class) + @XmlJavaTypeAdapter(Adapter10 .class) protected Collection mediaEnabledEntities; @XmlElement(name = "PageInfo", nillable = true) protected Paging pageInfo; + @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) + @XmlJavaTypeAdapter(Adapter11 .class) + protected Collection returnAdditionalFields; /** * Gets the value of the mediaEnabledEntities property. @@ -92,4 +97,28 @@ public void setPageInfo(Paging value) { this.pageInfo = value; } + /** + * Gets the value of the returnAdditionalFields property. + * + * @return + * possible object is + * {@link String } + * + */ + public Collection getReturnAdditionalFields() { + return returnAdditionalFields; + } + + /** + * Sets the value of the returnAdditionalFields property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setReturnAdditionalFields(Collection value) { + this.returnAdditionalFields = value; + } + } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetMediaMetaDataByIdsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetMediaMetaDataByIdsRequest.java index cafe425c40..af49c026a9 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetMediaMetaDataByIdsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetMediaMetaDataByIdsRequest.java @@ -1,11 +1,13 @@ package com.microsoft.bingads.v13.campaignmanagement; +import java.util.Collection; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlRootElement; import jakarta.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** @@ -19,6 +21,7 @@ * * * + * * * * @@ -29,13 +32,17 @@ */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { - "mediaIds" + "mediaIds", + "returnAdditionalFields" }) @XmlRootElement(name = "GetMediaMetaDataByIdsRequest") public class GetMediaMetaDataByIdsRequest { @XmlElement(name = "MediaIds", nillable = true) protected ArrayOflong mediaIds; + @XmlElement(name = "ReturnAdditionalFields", type = String.class, nillable = true) + @XmlJavaTypeAdapter(Adapter11 .class) + protected Collection returnAdditionalFields; /** * Gets the value of the mediaIds property. @@ -61,4 +68,28 @@ public void setMediaIds(ArrayOflong value) { this.mediaIds = value; } + /** + * Gets the value of the returnAdditionalFields property. + * + * @return + * possible object is + * {@link String } + * + */ + public Collection getReturnAdditionalFields() { + return returnAdditionalFields; + } + + /** + * Sets the value of the returnAdditionalFields property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setReturnAdditionalFields(Collection value) { + this.returnAdditionalFields = value; + } + } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetProfileDataFileUrlRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetProfileDataFileUrlRequest.java index 426791db1d..7d0352bdfb 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/GetProfileDataFileUrlRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/GetProfileDataFileUrlRequest.java @@ -41,7 +41,7 @@ public class GetProfileDataFileUrlRequest { @XmlElement(name = "LanguageLocale", nillable = true) protected String languageLocale; @XmlElement(name = "ProfileType", type = String.class) - @XmlJavaTypeAdapter(Adapter13 .class) + @XmlJavaTypeAdapter(Adapter15 .class) protected Collection profileType; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/HotelSetting.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/HotelSetting.java index 39862c09c4..d10ba04a67 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/HotelSetting.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/HotelSetting.java @@ -40,7 +40,7 @@ public HotelSetting() { } @XmlElement(name = "HotelAdGroupType", type = String.class) - @XmlJavaTypeAdapter(Adapter2 .class) + @XmlJavaTypeAdapter(Adapter3 .class) protected Collection hotelAdGroupType; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/ImageAdExtension.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/ImageAdExtension.java index 96384b8d24..bb98fe81f6 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/ImageAdExtension.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/ImageAdExtension.java @@ -28,6 +28,7 @@ * * * + * * * * @@ -51,6 +52,7 @@ "imageMediaIds", "images", "layouts", + "sourceType", "trackingUrlTemplate", "urlCustomParameters" }) @@ -83,6 +85,8 @@ public ImageAdExtension() { protected ArrayOfAssetLink images; @XmlElement(name = "Layouts", nillable = true) protected ArrayOfstring layouts; + @XmlElement(name = "SourceType", nillable = true) + protected String sourceType; @XmlElement(name = "TrackingUrlTemplate", nillable = true) protected String trackingUrlTemplate; @XmlElement(name = "UrlCustomParameters", nillable = true) @@ -352,6 +356,30 @@ public void setLayouts(ArrayOfstring value) { this.layouts = value; } + /** + * Gets the value of the sourceType property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSourceType() { + return sourceType; + } + + /** + * Sets the value of the sourceType property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSourceType(String value) { + this.sourceType = value; + } + /** * Gets the value of the trackingUrlTemplate property. * diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/ImpressionBasedEntityType.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/ImpressionBasedEntityType.java new file mode 100644 index 0000000000..969ddf5d1c --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/ImpressionBasedEntityType.java @@ -0,0 +1,53 @@ + +package com.microsoft.bingads.v13.campaignmanagement; + +import jakarta.xml.bind.annotation.XmlEnum; +import jakarta.xml.bind.annotation.XmlEnumValue; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for ImpressionBasedEntityType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

{@code
+ * 
+ *   
+ *     
+ *     
+ *     
+ *   
+ * 
+ * }
+ * + */ +@XmlType(name = "ImpressionBasedEntityType") +@XmlEnum +public enum ImpressionBasedEntityType { + + @XmlEnumValue("None") + NONE("None"), + @XmlEnumValue("Campaign") + CAMPAIGN("Campaign"), + @XmlEnumValue("AdGroup") + AD_GROUP("AdGroup"); + private final String value; + + ImpressionBasedEntityType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static ImpressionBasedEntityType fromValue(String v) { + for (ImpressionBasedEntityType c: ImpressionBasedEntityType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/ImpressionBasedRemarketingList.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/ImpressionBasedRemarketingList.java new file mode 100644 index 0000000000..2c6a68e8de --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/ImpressionBasedRemarketingList.java @@ -0,0 +1,126 @@ + +package com.microsoft.bingads.v13.campaignmanagement; +import java.util.Collections; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlSchemaType; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for ImpressionBasedRemarketingList complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *         
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ImpressionBasedRemarketingList", propOrder = { + "adGroupId", + "campaignId", + "entityType" +}) +public class ImpressionBasedRemarketingList + extends Audience +{ + public ImpressionBasedRemarketingList() { + this.type = Collections.singletonList(AudienceType.fromValue("ImpressionBasedRemarketingList")); + } + + @XmlElement(name = "AdGroupId", nillable = true) + protected Long adGroupId; + @XmlElement(name = "CampaignId", nillable = true) + protected Long campaignId; + @XmlElement(name = "EntityType") + @XmlSchemaType(name = "string") + protected ImpressionBasedEntityType entityType; + + /** + * Gets the value of the adGroupId property. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getAdGroupId() { + return adGroupId; + } + + /** + * Sets the value of the adGroupId property. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setAdGroupId(Long value) { + this.adGroupId = value; + } + + /** + * Gets the value of the campaignId property. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getCampaignId() { + return campaignId; + } + + /** + * Sets the value of the campaignId property. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setCampaignId(Long value) { + this.campaignId = value; + } + + /** + * Gets the value of the entityType property. + * + * @return + * possible object is + * {@link ImpressionBasedEntityType } + * + */ + public ImpressionBasedEntityType getEntityType() { + return entityType; + } + + /** + * Sets the value of the entityType property. + * + * @param value + * allowed object is + * {@link ImpressionBasedEntityType } + * + */ + public void setEntityType(ImpressionBasedEntityType value) { + this.entityType = value; + } + +} diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/LogoAdExtension.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/LogoAdExtension.java new file mode 100644 index 0000000000..e4d8d7df8f --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/LogoAdExtension.java @@ -0,0 +1,151 @@ + +package com.microsoft.bingads.v13.campaignmanagement; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for LogoAdExtension complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *         
+ *         
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LogoAdExtension", propOrder = { + "businessLogo", + "businessLogoUrl", + "businessName", + "domainName" +}) +public class LogoAdExtension + extends AdExtension +{ + public LogoAdExtension() { + this.type = "LogoAdExtension"; + } + + @XmlElement(name = "BusinessLogo", nillable = true) + protected Long businessLogo; + @XmlElement(name = "BusinessLogoUrl", nillable = true) + protected String businessLogoUrl; + @XmlElement(name = "BusinessName", nillable = true) + protected String businessName; + @XmlElement(name = "DomainName", nillable = true) + protected String domainName; + + /** + * Gets the value of the businessLogo property. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getBusinessLogo() { + return businessLogo; + } + + /** + * Sets the value of the businessLogo property. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setBusinessLogo(Long value) { + this.businessLogo = value; + } + + /** + * Gets the value of the businessLogoUrl property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBusinessLogoUrl() { + return businessLogoUrl; + } + + /** + * Sets the value of the businessLogoUrl property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBusinessLogoUrl(String value) { + this.businessLogoUrl = value; + } + + /** + * Gets the value of the businessName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBusinessName() { + return businessName; + } + + /** + * Sets the value of the businessName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBusinessName(String value) { + this.businessName = value; + } + + /** + * Gets the value of the domainName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDomainName() { + return domainName; + } + + /** + * Sets the value of the domainName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDomainName(String value) { + this.domainName = value; + } + +} diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Media.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Media.java index 637884b434..8b44ff13fc 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Media.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Media.java @@ -20,6 +20,7 @@ * * * + * * * * @@ -33,6 +34,7 @@ @XmlType(name = "Media", propOrder = { "id", "mediaType", + "text", "type" }) @XmlSeeAlso({ @@ -44,6 +46,8 @@ public class Media { protected Long id; @XmlElement(name = "MediaType", nillable = true) protected String mediaType; + @XmlElement(name = "Text", nillable = true) + protected String text; @XmlElement(name = "Type", nillable = true) protected String type; @@ -99,6 +103,30 @@ public void setMediaType(String value) { this.mediaType = value; } + /** + * Gets the value of the text property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getText() { + return text; + } + + /** + * Sets the value of the text property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setText(String value) { + this.text = value; + } + /** * Gets the value of the type property. * diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/MediaAdditionalField.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/MediaAdditionalField.java new file mode 100644 index 0000000000..ff5265366f --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/MediaAdditionalField.java @@ -0,0 +1,28 @@ +package com.microsoft.bingads.v13.campaignmanagement; + +/** + * Enum class for MediaAdditionalField. + */ +public enum MediaAdditionalField { + + TEXT("Text"); + + private final String value; + + MediaAdditionalField(String v) { + value = v; + } + + public String value() { + return value; + } + + public static MediaAdditionalField fromValue(String v) { + for (MediaAdditionalField c : MediaAdditionalField.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } +} \ No newline at end of file diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/MediaAdditionalFieldConverter.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/MediaAdditionalFieldConverter.java new file mode 100644 index 0000000000..09879664e0 --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/MediaAdditionalFieldConverter.java @@ -0,0 +1,34 @@ +package com.microsoft.bingads.v13.campaignmanagement; + +import java.util.ArrayList; +import java.util.Collection; + +/** + * Reserved for internal use. + */ +public class MediaAdditionalFieldConverter { + + public static Collection convertToList(String enums) { + String[] values = enums.split(" "); + + Collection result = new ArrayList(); + + for (String value : values) { + result.add(MediaAdditionalField.fromValue(value)); + } + + return result; + } + + public static String convertToString(Collection enums) { + String result = ""; + + for (MediaAdditionalField entity : enums) { + result += (entity.value() + " "); + } + + result = result.substring(0, result.length() - 1); + + return result; + } +} \ No newline at end of file diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/MediaAssociation.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/MediaAssociation.java index 0be5aa093d..22a52598b0 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/MediaAssociation.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/MediaAssociation.java @@ -41,7 +41,7 @@ public class MediaAssociation { @XmlElement(name = "EntityId") protected Long entityId; @XmlElement(name = "MediaEnabledEntity", type = String.class) - @XmlJavaTypeAdapter(Adapter9 .class) + @XmlJavaTypeAdapter(Adapter10 .class) protected Collection mediaEnabledEntity; @XmlElement(name = "MediaId") protected Long mediaId; diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/MediaMetaData.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/MediaMetaData.java index 82877c81fa..1deca0741b 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/MediaMetaData.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/MediaMetaData.java @@ -20,6 +20,7 @@ * * * + * * * * @@ -34,6 +35,7 @@ "id", "mediaType", "representations", + "text", "type" }) public class MediaMetaData { @@ -44,6 +46,8 @@ public class MediaMetaData { protected String mediaType; @XmlElement(name = "Representations", nillable = true) protected ArrayOfMediaRepresentation representations; + @XmlElement(name = "Text", nillable = true) + protected String text; @XmlElement(name = "Type", nillable = true) protected String type; @@ -111,6 +115,30 @@ public void setRepresentations(ArrayOfMediaRepresentation value) { this.representations = value; } + /** + * Gets the value of the text property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getText() { + return text; + } + + /** + * Sets the value of the text property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setText(String value) { + this.text = value; + } + /** * Gets the value of the type property. * diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/ObjectFactory.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/ObjectFactory.java index 58933cb519..ea1ecba105 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/ObjectFactory.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/ObjectFactory.java @@ -44,6 +44,7 @@ public class ObjectFactory { private static final QName _ExpandedTextAd_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ExpandedTextAd"); private static final QName _DynamicSearchAd_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "DynamicSearchAd"); private static final QName _ResponsiveAd_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ResponsiveAd"); + private static final QName _AdSubType_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "AdSubType"); private static final QName _CallToAction_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "CallToAction"); private static final QName _LanguageName_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "LanguageName"); private static final QName _ArrayOfAssetLink_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ArrayOfAssetLink"); @@ -71,6 +72,9 @@ public class ObjectFactory { private static final QName _ResponsiveSearchAdsSetting_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ResponsiveSearchAdsSetting"); private static final QName _PerformanceMaxSetting_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "PerformanceMaxSetting"); private static final QName _CallToActionSetting_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "CallToActionSetting"); + private static final QName _VanityPharmaSetting_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "VanityPharmaSetting"); + private static final QName _VanityPharmaDisplayUrlMode_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "VanityPharmaDisplayUrlMode"); + private static final QName _VanityPharmaWebsiteDescription_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "VanityPharmaWebsiteDescription"); private static final QName _ResponsiveSearchAd_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ResponsiveSearchAd"); private static final QName _ArrayOfCampaign_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ArrayOfCampaign"); private static final QName _Campaign_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "Campaign"); @@ -195,6 +199,7 @@ public class ObjectFactory { private static final QName _FlyerAdExtension_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "FlyerAdExtension"); private static final QName _VideoAdExtension_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "VideoAdExtension"); private static final QName _DisclaimerAdExtension_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "DisclaimerAdExtension"); + private static final QName _LogoAdExtension_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "LogoAdExtension"); private static final QName _ArrayOfAdExtensionIdentity_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ArrayOfAdExtensionIdentity"); private static final QName _AdExtensionIdentity_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "AdExtensionIdentity"); private static final QName _ArrayOfBatchErrorCollection_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ArrayOfBatchErrorCollection"); @@ -219,6 +224,7 @@ public class ObjectFactory { private static final QName _Image_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "Image"); private static final QName _MediaEnabledEntityFilter_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "MediaEnabledEntityFilter"); private static final QName _Paging_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "Paging"); + private static final QName _MediaAdditionalField_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "MediaAdditionalField"); private static final QName _ArrayOfMediaMetaData_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ArrayOfMediaMetaData"); private static final QName _MediaMetaData_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "MediaMetaData"); private static final QName _ArrayOfMediaRepresentation_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ArrayOfMediaRepresentation"); @@ -334,8 +340,11 @@ public class ObjectFactory { private static final QName _AudienceInfo_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "AudienceInfo"); private static final QName _ArrayOfAssetGroup_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ArrayOfAssetGroup"); private static final QName _AssetGroup_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "AssetGroup"); + private static final QName _ArrayOfAssetGroupSearchTheme_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ArrayOfAssetGroupSearchTheme"); + private static final QName _AssetGroupSearchTheme_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "AssetGroupSearchTheme"); private static final QName _AssetGroupEditorialStatus_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "AssetGroupEditorialStatus"); private static final QName _AssetGroupStatus_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "AssetGroupStatus"); + private static final QName _AssetGroupAdditionalField_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "AssetGroupAdditionalField"); private static final QName _ArrayOfAssetGroupEditorialReasonCollection_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ArrayOfAssetGroupEditorialReasonCollection"); private static final QName _AssetGroupEditorialReasonCollection_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "AssetGroupEditorialReasonCollection"); private static final QName _ArrayOfAssetGroupEditorialReason_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ArrayOfAssetGroupEditorialReason"); @@ -374,6 +383,8 @@ public class ObjectFactory { private static final QName _CombinationRule_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "CombinationRule"); private static final QName _LogicalOperator_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "LogicalOperator"); private static final QName _CustomerList_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "CustomerList"); + private static final QName _ImpressionBasedRemarketingList_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ImpressionBasedRemarketingList"); + private static final QName _ImpressionBasedEntityType_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "ImpressionBasedEntityType"); private static final QName _AudienceAdditionalField_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "AudienceAdditionalField"); private static final QName _CustomerListUserData_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "CustomerListUserData"); private static final QName _CustomerListActionType_QNAME = new QName("https://bingads.microsoft.com/CampaignManagement/v13", "CustomerListActionType"); @@ -955,6 +966,16 @@ public CallToActionSetting createCallToActionSetting() { return new CallToActionSetting(); } + /** + * Create an instance of {@link VanityPharmaSetting } + * + * @return + * the new instance of {@link VanityPharmaSetting } + */ + public VanityPharmaSetting createVanityPharmaSetting() { + return new VanityPharmaSetting(); + } + /** * Create an instance of {@link ResponsiveSearchAd } * @@ -2535,6 +2556,16 @@ public DisclaimerAdExtension createDisclaimerAdExtension() { return new DisclaimerAdExtension(); } + /** + * Create an instance of {@link LogoAdExtension } + * + * @return + * the new instance of {@link LogoAdExtension } + */ + public LogoAdExtension createLogoAdExtension() { + return new LogoAdExtension(); + } + /** * Create an instance of {@link AddAdExtensionsResponse } * @@ -4785,6 +4816,26 @@ public AssetGroup createAssetGroup() { return new AssetGroup(); } + /** + * Create an instance of {@link ArrayOfAssetGroupSearchTheme } + * + * @return + * the new instance of {@link ArrayOfAssetGroupSearchTheme } + */ + public ArrayOfAssetGroupSearchTheme createArrayOfAssetGroupSearchTheme() { + return new ArrayOfAssetGroupSearchTheme(); + } + + /** + * Create an instance of {@link AssetGroupSearchTheme } + * + * @return + * the new instance of {@link AssetGroupSearchTheme } + */ + public AssetGroupSearchTheme createAssetGroupSearchTheme() { + return new AssetGroupSearchTheme(); + } + /** * Create an instance of {@link AddAssetGroupsResponse } * @@ -5315,6 +5366,16 @@ public CustomerList createCustomerList() { return new CustomerList(); } + /** + * Create an instance of {@link ImpressionBasedRemarketingList } + * + * @return + * the new instance of {@link ImpressionBasedRemarketingList } + */ + public ImpressionBasedRemarketingList createImpressionBasedRemarketingList() { + return new ImpressionBasedRemarketingList(); + } + /** * Create an instance of {@link AddAudiencesResponse } * @@ -7223,6 +7284,20 @@ public JAXBElement createResponsiveAd(ResponsiveAd value) { return new JAXBElement<>(_ResponsiveAd_QNAME, ResponsiveAd.class, null, value); } + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link AdSubType }{@code >}{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link AdSubType }{@code >}{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "AdSubType") + @XmlJavaTypeAdapter(Adapter2 .class) + public JAXBElement> createAdSubType(Collection value) { + return new JAXBElement<>(_AdSubType_QNAME, ((Class) Collection.class), null, value); + } + /** * Create an instance of {@link JAXBElement }{@code <}{@link CallToAction }{@code >} * @@ -7531,7 +7606,7 @@ public JAXBElement createHotelSetting(HotelSetting value) { * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link HotelAdGroupType }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "HotelAdGroupType") - @XmlJavaTypeAdapter(Adapter2 .class) + @XmlJavaTypeAdapter(Adapter3 .class) public JAXBElement> createHotelAdGroupType(Collection value) { return new JAXBElement<>(_HotelAdGroupType_QNAME, ((Class) Collection.class), null, value); } @@ -7575,6 +7650,45 @@ public JAXBElement createCallToActionSetting(CallToActionSe return new JAXBElement<>(_CallToActionSetting_QNAME, CallToActionSetting.class, null, value); } + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VanityPharmaSetting }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link VanityPharmaSetting }{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "VanityPharmaSetting") + public JAXBElement createVanityPharmaSetting(VanityPharmaSetting value) { + return new JAXBElement<>(_VanityPharmaSetting_QNAME, VanityPharmaSetting.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VanityPharmaDisplayUrlMode }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link VanityPharmaDisplayUrlMode }{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "VanityPharmaDisplayUrlMode") + public JAXBElement createVanityPharmaDisplayUrlMode(VanityPharmaDisplayUrlMode value) { + return new JAXBElement<>(_VanityPharmaDisplayUrlMode_QNAME, VanityPharmaDisplayUrlMode.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link VanityPharmaWebsiteDescription }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link VanityPharmaWebsiteDescription }{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "VanityPharmaWebsiteDescription") + public JAXBElement createVanityPharmaWebsiteDescription(VanityPharmaWebsiteDescription value) { + return new JAXBElement<>(_VanityPharmaWebsiteDescription_QNAME, VanityPharmaWebsiteDescription.class, null, value); + } + /** * Create an instance of {@link JAXBElement }{@code <}{@link ResponsiveSearchAd }{@code >} * @@ -7883,7 +7997,7 @@ public JAXBElement createCampaignStatus(CampaignStatus value) { * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link CampaignType }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "CampaignType") - @XmlJavaTypeAdapter(Adapter3 .class) + @XmlJavaTypeAdapter(Adapter4 .class) public JAXBElement> createCampaignType(Collection value) { return new JAXBElement<>(_CampaignType_QNAME, ((Class) Collection.class), null, value); } @@ -8092,7 +8206,7 @@ public JAXBElement createOperationError(OperationError value) { * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link CampaignAdditionalField }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "CampaignAdditionalField") - @XmlJavaTypeAdapter(Adapter4 .class) + @XmlJavaTypeAdapter(Adapter5 .class) public JAXBElement> createCampaignAdditionalField(Collection value) { return new JAXBElement<>(_CampaignAdditionalField_QNAME, ((Class) Collection.class), null, value); } @@ -8340,7 +8454,7 @@ public JAXBElement createAdGroupStatus(AdGroupStatus value) { * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link AdGroupAdditionalField }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "AdGroupAdditionalField") - @XmlJavaTypeAdapter(Adapter5 .class) + @XmlJavaTypeAdapter(Adapter6 .class) public JAXBElement> createAdGroupAdditionalField(Collection value) { return new JAXBElement<>(_AdGroupAdditionalField_QNAME, ((Class) Collection.class), null, value); } @@ -8445,7 +8559,7 @@ public JAXBElement createArrayOfAdType(ArrayOfAdType value) { * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link AdAdditionalField }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "AdAdditionalField") - @XmlJavaTypeAdapter(Adapter6 .class) + @XmlJavaTypeAdapter(Adapter7 .class) public JAXBElement> createAdAdditionalField(Collection value) { return new JAXBElement<>(_AdAdditionalField_QNAME, ((Class) Collection.class), null, value); } @@ -9191,6 +9305,19 @@ public JAXBElement createDisclaimerAdExtension(Disclaimer return new JAXBElement<>(_DisclaimerAdExtension_QNAME, DisclaimerAdExtension.class, null, value); } + /** + * Create an instance of {@link JAXBElement }{@code <}{@link LogoAdExtension }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link LogoAdExtension }{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "LogoAdExtension") + public JAXBElement createLogoAdExtension(LogoAdExtension value) { + return new JAXBElement<>(_LogoAdExtension_QNAME, LogoAdExtension.class, null, value); + } + /** * Create an instance of {@link JAXBElement }{@code <}{@link ArrayOfAdExtensionIdentity }{@code >} * @@ -9265,7 +9392,7 @@ public JAXBElement createEditorialErrorCollection(Edit * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link AdExtensionsTypeFilter }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "AdExtensionsTypeFilter") - @XmlJavaTypeAdapter(Adapter7 .class) + @XmlJavaTypeAdapter(Adapter8 .class) public JAXBElement> createAdExtensionsTypeFilter(Collection value) { return new JAXBElement<>(_AdExtensionsTypeFilter_QNAME, ((Class) Collection.class), null, value); } @@ -9279,7 +9406,7 @@ public JAXBElement> createAdExtensionsTypeFil * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link AdExtensionAdditionalField }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "AdExtensionAdditionalField") - @XmlJavaTypeAdapter(Adapter8 .class) + @XmlJavaTypeAdapter(Adapter9 .class) public JAXBElement> createAdExtensionAdditionalField(Collection value) { return new JAXBElement<>(_AdExtensionAdditionalField_QNAME, ((Class) Collection.class), null, value); } @@ -9488,7 +9615,7 @@ public JAXBElement createImage(Image value) { * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link MediaEnabledEntityFilter }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "MediaEnabledEntityFilter") - @XmlJavaTypeAdapter(Adapter9 .class) + @XmlJavaTypeAdapter(Adapter10 .class) public JAXBElement> createMediaEnabledEntityFilter(Collection value) { return new JAXBElement<>(_MediaEnabledEntityFilter_QNAME, ((Class) Collection.class), null, value); } @@ -9506,6 +9633,20 @@ public JAXBElement createPaging(Paging value) { return new JAXBElement<>(_Paging_QNAME, Paging.class, null, value); } + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link MediaAdditionalField }{@code >}{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link MediaAdditionalField }{@code >}{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "MediaAdditionalField") + @XmlJavaTypeAdapter(Adapter11 .class) + public JAXBElement> createMediaAdditionalField(Collection value) { + return new JAXBElement<>(_MediaAdditionalField_QNAME, ((Class) Collection.class), null, value); + } + /** * Create an instance of {@link JAXBElement }{@code <}{@link ArrayOfMediaMetaData }{@code >} * @@ -9619,7 +9760,7 @@ public JAXBElement createMediaAssociation(MediaAssociation val * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link AdGroupCriterionType }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "AdGroupCriterionType") - @XmlJavaTypeAdapter(Adapter10 .class) + @XmlJavaTypeAdapter(Adapter12 .class) public JAXBElement> createAdGroupCriterionType(Collection value) { return new JAXBElement<>(_AdGroupCriterionType_QNAME, ((Class) Collection.class), null, value); } @@ -9633,7 +9774,7 @@ public JAXBElement> createAdGroupCriterionType( * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link CriterionAdditionalField }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "CriterionAdditionalField") - @XmlJavaTypeAdapter(Adapter11 .class) + @XmlJavaTypeAdapter(Adapter13 .class) public JAXBElement> createCriterionAdditionalField(Collection value) { return new JAXBElement<>(_CriterionAdditionalField_QNAME, ((Class) Collection.class), null, value); } @@ -10102,7 +10243,7 @@ public JAXBElement createAudienceCriterion(AudienceCriterion * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link AudienceType }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "AudienceType") - @XmlJavaTypeAdapter(Adapter12 .class) + @XmlJavaTypeAdapter(Adapter14 .class) public JAXBElement> createAudienceType(Collection value) { return new JAXBElement<>(_AudienceType_QNAME, ((Class) Collection.class), null, value); } @@ -10129,7 +10270,7 @@ public JAXBElement createProfileCriterion(ProfileCriterion val * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link ProfileType }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "ProfileType") - @XmlJavaTypeAdapter(Adapter13 .class) + @XmlJavaTypeAdapter(Adapter15 .class) public JAXBElement> createProfileType(Collection value) { return new JAXBElement<>(_ProfileType_QNAME, ((Class) Collection.class), null, value); } @@ -10364,7 +10505,7 @@ public JAXBElement createArrayOfAssetGroupListing * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link BMCStoreAdditionalField }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "BMCStoreAdditionalField") - @XmlJavaTypeAdapter(Adapter14 .class) + @XmlJavaTypeAdapter(Adapter16 .class) public JAXBElement> createBMCStoreAdditionalField(Collection value) { return new JAXBElement<>(_BMCStoreAdditionalField_QNAME, ((Class) Collection.class), null, value); } @@ -10768,7 +10909,7 @@ public JAXBElement createBiddableCampaignCriterion(Bi * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link CampaignCriterionType }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "CampaignCriterionType") - @XmlJavaTypeAdapter(Adapter15 .class) + @XmlJavaTypeAdapter(Adapter17 .class) public JAXBElement> createCampaignCriterionType(Collection value) { return new JAXBElement<>(_CampaignCriterionType_QNAME, ((Class) Collection.class), null, value); } @@ -11007,6 +11148,32 @@ public JAXBElement createAssetGroup(AssetGroup value) { return new JAXBElement<>(_AssetGroup_QNAME, AssetGroup.class, null, value); } + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ArrayOfAssetGroupSearchTheme }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link ArrayOfAssetGroupSearchTheme }{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "ArrayOfAssetGroupSearchTheme") + public JAXBElement createArrayOfAssetGroupSearchTheme(ArrayOfAssetGroupSearchTheme value) { + return new JAXBElement<>(_ArrayOfAssetGroupSearchTheme_QNAME, ArrayOfAssetGroupSearchTheme.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AssetGroupSearchTheme }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link AssetGroupSearchTheme }{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "AssetGroupSearchTheme") + public JAXBElement createAssetGroupSearchTheme(AssetGroupSearchTheme value) { + return new JAXBElement<>(_AssetGroupSearchTheme_QNAME, AssetGroupSearchTheme.class, null, value); + } + /** * Create an instance of {@link JAXBElement }{@code <}{@link AssetGroupEditorialStatus }{@code >} * @@ -11033,6 +11200,20 @@ public JAXBElement createAssetGroupStatus(AssetGroupStatus val return new JAXBElement<>(_AssetGroupStatus_QNAME, AssetGroupStatus.class, null, value); } + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link AssetGroupAdditionalField }{@code >}{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link AssetGroupAdditionalField }{@code >}{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "AssetGroupAdditionalField") + @XmlJavaTypeAdapter(Adapter18 .class) + public JAXBElement> createAssetGroupAdditionalField(Collection value) { + return new JAXBElement<>(_AssetGroupAdditionalField_QNAME, ((Class) Collection.class), null, value); + } + /** * Create an instance of {@link JAXBElement }{@code <}{@link ArrayOfAssetGroupEditorialReasonCollection }{@code >} * @@ -11445,7 +11626,7 @@ public JAXBElement createProductAudience(ProductAudience value) * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link ProductAudienceType }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "ProductAudienceType") - @XmlJavaTypeAdapter(Adapter16 .class) + @XmlJavaTypeAdapter(Adapter19 .class) public JAXBElement> createProductAudienceType(Collection value) { return new JAXBElement<>(_ProductAudienceType_QNAME, ((Class) Collection.class), null, value); } @@ -11528,6 +11709,32 @@ public JAXBElement createCustomerList(CustomerList value) { return new JAXBElement<>(_CustomerList_QNAME, CustomerList.class, null, value); } + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ImpressionBasedRemarketingList }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link ImpressionBasedRemarketingList }{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "ImpressionBasedRemarketingList") + public JAXBElement createImpressionBasedRemarketingList(ImpressionBasedRemarketingList value) { + return new JAXBElement<>(_ImpressionBasedRemarketingList_QNAME, ImpressionBasedRemarketingList.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ImpressionBasedEntityType }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link ImpressionBasedEntityType }{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "ImpressionBasedEntityType") + public JAXBElement createImpressionBasedEntityType(ImpressionBasedEntityType value) { + return new JAXBElement<>(_ImpressionBasedEntityType_QNAME, ImpressionBasedEntityType.class, null, value); + } + /** * Create an instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link AudienceAdditionalField }{@code >}{@code >} * @@ -11537,7 +11744,7 @@ public JAXBElement createCustomerList(CustomerList value) { * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link AudienceAdditionalField }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "AudienceAdditionalField") - @XmlJavaTypeAdapter(Adapter17 .class) + @XmlJavaTypeAdapter(Adapter20 .class) public JAXBElement> createAudienceAdditionalField(Collection value) { return new JAXBElement<>(_AudienceAdditionalField_QNAME, ((Class) Collection.class), null, value); } @@ -11629,7 +11836,7 @@ public JAXBElement createUetTagTrackingStatus(UetTagTracki * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link ConversionGoalType }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "ConversionGoalType") - @XmlJavaTypeAdapter(Adapter18 .class) + @XmlJavaTypeAdapter(Adapter21 .class) public JAXBElement> createConversionGoalType(Collection value) { return new JAXBElement<>(_ConversionGoalType_QNAME, ((Class) Collection.class), null, value); } @@ -11643,7 +11850,7 @@ public JAXBElement> createConversionGoalType(Coll * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link ConversionGoalAdditionalField }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "ConversionGoalAdditionalField") - @XmlJavaTypeAdapter(Adapter19 .class) + @XmlJavaTypeAdapter(Adapter22 .class) public JAXBElement> createConversionGoalAdditionalField(Collection value) { return new JAXBElement<>(_ConversionGoalAdditionalField_QNAME, ((Class) Collection.class), null, value); } @@ -12216,7 +12423,7 @@ public JAXBElement createFileImportJob(FileImportJob value) { * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link ImportAdditionalField }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "ImportAdditionalField") - @XmlJavaTypeAdapter(Adapter20 .class) + @XmlJavaTypeAdapter(Adapter23 .class) public JAXBElement> createImportAdditionalField(Collection value) { return new JAXBElement<>(_ImportAdditionalField_QNAME, ((Class) Collection.class), null, value); } @@ -12391,16 +12598,17 @@ public JAXBElement createCampaignAssociation(CampaignAssoci } /** - * Create an instance of {@link JAXBElement }{@code <}{@link DeviceType }{@code >} + * Create an instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link DeviceType }{@code >}{@code >} * * @param value * Java instance representing xml element's value. * @return - * the new instance of {@link JAXBElement }{@code <}{@link DeviceType }{@code >} + * the new instance of {@link JAXBElement }{@code <}{@link Collection }{@code <}{@link DeviceType }{@code >}{@code >} */ @XmlElementDecl(namespace = "https://bingads.microsoft.com/CampaignManagement/v13", name = "DeviceType") - public JAXBElement createDeviceType(DeviceType value) { - return new JAXBElement<>(_DeviceType_QNAME, DeviceType.class, null, value); + @XmlJavaTypeAdapter(Adapter24 .class) + public JAXBElement> createDeviceType(Collection value) { + return new JAXBElement<>(_DeviceType_QNAME, ((Class) Collection.class), null, value); } /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/PerformanceMaxSetting.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/PerformanceMaxSetting.java index e9f7986675..9d88575331 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/PerformanceMaxSetting.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/PerformanceMaxSetting.java @@ -19,6 +19,7 @@ * * * + * * * * @@ -33,6 +34,7 @@ @XmlType(name = "PerformanceMaxSetting", propOrder = { "autoGeneratedImageOptOut", "autoGeneratedTextOptOut", + "costPerSaleOptOut", "finalUrlExpansionOptOut", "pageFeedIds" }) @@ -47,6 +49,8 @@ public PerformanceMaxSetting() { protected Boolean autoGeneratedImageOptOut; @XmlElement(name = "AutoGeneratedTextOptOut", nillable = true) protected Boolean autoGeneratedTextOptOut; + @XmlElement(name = "CostPerSaleOptOut", nillable = true) + protected Boolean costPerSaleOptOut; @XmlElement(name = "FinalUrlExpansionOptOut") protected Boolean finalUrlExpansionOptOut; @XmlElement(name = "PageFeedIds", nillable = true) @@ -100,6 +104,30 @@ public void setAutoGeneratedTextOptOut(Boolean value) { this.autoGeneratedTextOptOut = value; } + /** + * Gets the value of the costPerSaleOptOut property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean getCostPerSaleOptOut() { + return costPerSaleOptOut; + } + + /** + * Sets the value of the costPerSaleOptOut property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setCostPerSaleOptOut(Boolean value) { + this.costPerSaleOptOut = value; + } + /** * Gets the value of the finalUrlExpansionOptOut property. * diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/ProductAudience.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/ProductAudience.java index 2a556f7be7..813a2f94b8 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/ProductAudience.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/ProductAudience.java @@ -43,7 +43,7 @@ public ProductAudience() { } @XmlElement(name = "ProductAudienceType", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter16 .class) + @XmlJavaTypeAdapter(Adapter19 .class) protected Collection productAudienceType; @XmlElement(name = "TagId", nillable = true) protected Long tagId; diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/ProfileCriterion.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/ProfileCriterion.java index 82aa98879a..f682bf07d9 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/ProfileCriterion.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/ProfileCriterion.java @@ -44,7 +44,7 @@ public ProfileCriterion() { @XmlElement(name = "ProfileId") protected Long profileId; @XmlElement(name = "ProfileType", type = String.class) - @XmlJavaTypeAdapter(Adapter13 .class) + @XmlJavaTypeAdapter(Adapter15 .class) protected Collection profileType; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/ResponsiveAd.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/ResponsiveAd.java index bb1aab0adc..b8d502c3f2 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/ResponsiveAd.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/ResponsiveAd.java @@ -1,11 +1,13 @@ package com.microsoft.bingads.v13.campaignmanagement; +import java.util.Collection; import jakarta.xml.bind.annotation.XmlAccessType; import jakarta.xml.bind.annotation.XmlAccessorType; import jakarta.xml.bind.annotation.XmlElement; import jakarta.xml.bind.annotation.XmlSchemaType; import jakarta.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** @@ -18,6 +20,7 @@ * * * + * * * * @@ -42,6 +45,7 @@ */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ResponsiveAd", propOrder = { + "adSubType", "businessName", "callToAction", "callToActionLanguage", @@ -64,6 +68,9 @@ public ResponsiveAd() { this.type = AdType.fromValue("ResponsiveAd"); } + @XmlElement(name = "AdSubType", type = String.class, nillable = true) + @XmlJavaTypeAdapter(Adapter2 .class) + protected Collection adSubType; @XmlElement(name = "BusinessName", nillable = true) protected String businessName; @XmlElement(name = "CallToAction", nillable = true) @@ -95,6 +102,30 @@ public ResponsiveAd() { @XmlElement(name = "Videos", nillable = true) protected ArrayOfAssetLink videos; + /** + * Gets the value of the adSubType property. + * + * @return + * possible object is + * {@link String } + * + */ + public Collection getAdSubType() { + return adSubType; + } + + /** + * Sets the value of the adSubType property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAdSubType(Collection value) { + this.adSubType = value; + } + /** * Gets the value of the businessName property. * diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/SeasonalityAdjustment.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/SeasonalityAdjustment.java index e07b6f8d30..bb7f0c9138 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/SeasonalityAdjustment.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/SeasonalityAdjustment.java @@ -57,13 +57,13 @@ public class SeasonalityAdjustment { @XmlElement(name = "CampaignAssociations", nillable = true) protected ArrayOfCampaignAssociation campaignAssociations; @XmlElement(name = "CampaignTypeFilter", type = String.class, nillable = true) - @XmlJavaTypeAdapter(Adapter3 .class) + @XmlJavaTypeAdapter(Adapter4 .class) protected Collection campaignTypeFilter; @XmlElement(name = "Description", nillable = true) protected String description; - @XmlElement(name = "DeviceTypeFilter", nillable = true) - @XmlSchemaType(name = "string") - protected DeviceType deviceTypeFilter; + @XmlElement(name = "DeviceTypeFilter", type = String.class, nillable = true) + @XmlJavaTypeAdapter(Adapter24 .class) + protected Collection deviceTypeFilter; @XmlElement(name = "EndDate", type = String.class, nillable = true) @XmlJavaTypeAdapter(Adapter1 .class) @XmlSchemaType(name = "dateTime") @@ -178,10 +178,10 @@ public void setDescription(String value) { * * @return * possible object is - * {@link DeviceType } + * {@link String } * */ - public DeviceType getDeviceTypeFilter() { + public Collection getDeviceTypeFilter() { return deviceTypeFilter; } @@ -190,10 +190,10 @@ public DeviceType getDeviceTypeFilter() { * * @param value * allowed object is - * {@link DeviceType } + * {@link String } * */ - public void setDeviceTypeFilter(DeviceType value) { + public void setDeviceTypeFilter(Collection value) { this.deviceTypeFilter = value; } diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/Setting.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/Setting.java index 6205b143d3..481d0d94bb 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/Setting.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/Setting.java @@ -42,7 +42,8 @@ HotelSetting.class, ResponsiveSearchAdsSetting.class, PerformanceMaxSetting.class, - CallToActionSetting.class + CallToActionSetting.class, + VanityPharmaSetting.class }) public class Setting { diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/UpdateAdGroupCriterionsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/UpdateAdGroupCriterionsRequest.java index ffc9be4153..bf1bcd92a3 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/UpdateAdGroupCriterionsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/UpdateAdGroupCriterionsRequest.java @@ -41,7 +41,7 @@ public class UpdateAdGroupCriterionsRequest { @XmlElement(name = "AdGroupCriterions", nillable = true) protected ArrayOfAdGroupCriterion adGroupCriterions; @XmlElement(name = "CriterionType", type = String.class) - @XmlJavaTypeAdapter(Adapter10 .class) + @XmlJavaTypeAdapter(Adapter12 .class) protected Collection criterionType; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/UpdateCampaignCriterionsRequest.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/UpdateCampaignCriterionsRequest.java index 44f51d637b..f9ceb991a8 100644 --- a/proxies/com/microsoft/bingads/v13/campaignmanagement/UpdateCampaignCriterionsRequest.java +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/UpdateCampaignCriterionsRequest.java @@ -41,7 +41,7 @@ public class UpdateCampaignCriterionsRequest { @XmlElement(name = "CampaignCriterions", nillable = true) protected ArrayOfCampaignCriterion campaignCriterions; @XmlElement(name = "CriterionType", type = String.class) - @XmlJavaTypeAdapter(Adapter15 .class) + @XmlJavaTypeAdapter(Adapter17 .class) protected Collection criterionType; /** diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/VanityPharmaDisplayUrlMode.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/VanityPharmaDisplayUrlMode.java new file mode 100644 index 0000000000..7262736a60 --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/VanityPharmaDisplayUrlMode.java @@ -0,0 +1,50 @@ + +package com.microsoft.bingads.v13.campaignmanagement; + +import jakarta.xml.bind.annotation.XmlEnum; +import jakarta.xml.bind.annotation.XmlEnumValue; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for VanityPharmaDisplayUrlMode. + * + *

The following schema fragment specifies the expected content contained within this class. + *

{@code
+ * 
+ *   
+ *     
+ *     
+ *   
+ * 
+ * }
+ * + */ +@XmlType(name = "VanityPharmaDisplayUrlMode") +@XmlEnum +public enum VanityPharmaDisplayUrlMode { + + @XmlEnumValue("ManufacturerWebsiteUrl") + MANUFACTURER_WEBSITE_URL("ManufacturerWebsiteUrl"), + @XmlEnumValue("WebsiteDescription") + WEBSITE_DESCRIPTION("WebsiteDescription"); + private final String value; + + VanityPharmaDisplayUrlMode(String v) { + value = v; + } + + public String value() { + return value; + } + + public static VanityPharmaDisplayUrlMode fromValue(String v) { + for (VanityPharmaDisplayUrlMode c: VanityPharmaDisplayUrlMode.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/VanityPharmaSetting.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/VanityPharmaSetting.java new file mode 100644 index 0000000000..73ad534c6f --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/VanityPharmaSetting.java @@ -0,0 +1,98 @@ + +package com.microsoft.bingads.v13.campaignmanagement; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlSchemaType; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for VanityPharmaSetting complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VanityPharmaSetting", propOrder = { + "displayUrlMode", + "websiteDescription" +}) +public class VanityPharmaSetting + extends Setting +{ + public VanityPharmaSetting() { + this.type = "VanityPharmaSetting"; + } + + @XmlElement(name = "DisplayUrlMode", nillable = true) + @XmlSchemaType(name = "string") + protected VanityPharmaDisplayUrlMode displayUrlMode; + @XmlElement(name = "WebsiteDescription", nillable = true) + @XmlSchemaType(name = "string") + protected VanityPharmaWebsiteDescription websiteDescription; + + /** + * Gets the value of the displayUrlMode property. + * + * @return + * possible object is + * {@link VanityPharmaDisplayUrlMode } + * + */ + public VanityPharmaDisplayUrlMode getDisplayUrlMode() { + return displayUrlMode; + } + + /** + * Sets the value of the displayUrlMode property. + * + * @param value + * allowed object is + * {@link VanityPharmaDisplayUrlMode } + * + */ + public void setDisplayUrlMode(VanityPharmaDisplayUrlMode value) { + this.displayUrlMode = value; + } + + /** + * Gets the value of the websiteDescription property. + * + * @return + * possible object is + * {@link VanityPharmaWebsiteDescription } + * + */ + public VanityPharmaWebsiteDescription getWebsiteDescription() { + return websiteDescription; + } + + /** + * Sets the value of the websiteDescription property. + * + * @param value + * allowed object is + * {@link VanityPharmaWebsiteDescription } + * + */ + public void setWebsiteDescription(VanityPharmaWebsiteDescription value) { + this.websiteDescription = value; + } + +} diff --git a/proxies/com/microsoft/bingads/v13/campaignmanagement/VanityPharmaWebsiteDescription.java b/proxies/com/microsoft/bingads/v13/campaignmanagement/VanityPharmaWebsiteDescription.java new file mode 100644 index 0000000000..78dacf80c4 --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/campaignmanagement/VanityPharmaWebsiteDescription.java @@ -0,0 +1,83 @@ + +package com.microsoft.bingads.v13.campaignmanagement; + +import jakarta.xml.bind.annotation.XmlEnum; +import jakarta.xml.bind.annotation.XmlEnumValue; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for VanityPharmaWebsiteDescription. + * + *

The following schema fragment specifies the expected content contained within this class. + *

{@code
+ * 
+ *   
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *   
+ * 
+ * }
+ * + */ +@XmlType(name = "VanityPharmaWebsiteDescription") +@XmlEnum +public enum VanityPharmaWebsiteDescription { + + @XmlEnumValue("Unspecified") + UNSPECIFIED("Unspecified"), + @XmlEnumValue("PrescriptionTreatmentWebsite_En") + PRESCRIPTION_TREATMENT_WEBSITE_EN("PrescriptionTreatmentWebsite_En"), + @XmlEnumValue("PrescriptionTreatmentWebsite_Es") + PRESCRIPTION_TREATMENT_WEBSITE_ES("PrescriptionTreatmentWebsite_Es"), + @XmlEnumValue("PrescriptionDeviceWebsite_En") + PRESCRIPTION_DEVICE_WEBSITE_EN("PrescriptionDeviceWebsite_En"), + @XmlEnumValue("PrescriptionDeviceWebsite_Es") + PRESCRIPTION_DEVICE_WEBSITE_ES("PrescriptionDeviceWebsite_Es"), + @XmlEnumValue("MedicalDeviceWebsite_En") + MEDICAL_DEVICE_WEBSITE_EN("MedicalDeviceWebsite_En"), + @XmlEnumValue("MedicalDeviceWebsite_Es") + MEDICAL_DEVICE_WEBSITE_ES("MedicalDeviceWebsite_Es"), + @XmlEnumValue("PreventativeTreatmentWebsite_En") + PREVENTATIVE_TREATMENT_WEBSITE_EN("PreventativeTreatmentWebsite_En"), + @XmlEnumValue("PreventativeTreatmentWebsite_Es") + PREVENTATIVE_TREATMENT_WEBSITE_ES("PreventativeTreatmentWebsite_Es"), + @XmlEnumValue("PrescriptionContraceptionWebsite_En") + PRESCRIPTION_CONTRACEPTION_WEBSITE_EN("PrescriptionContraceptionWebsite_En"), + @XmlEnumValue("PrescriptionContraceptionWebsite_Es") + PRESCRIPTION_CONTRACEPTION_WEBSITE_ES("PrescriptionContraceptionWebsite_Es"), + @XmlEnumValue("PrescriptionVaccineWebsite_En") + PRESCRIPTION_VACCINE_WEBSITE_EN("PrescriptionVaccineWebsite_En"), + @XmlEnumValue("PrescriptionVaccineWebsite_Es") + PRESCRIPTION_VACCINE_WEBSITE_ES("PrescriptionVaccineWebsite_Es"); + private final String value; + + VanityPharmaWebsiteDescription(String v) { + value = v; + } + + public String value() { + return value; + } + + public static VanityPharmaWebsiteDescription fromValue(String v) { + for (VanityPharmaWebsiteDescription c: VanityPharmaWebsiteDescription.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/proxies/com/microsoft/bingads/v13/customerbilling/BillingDocument.java b/proxies/com/microsoft/bingads/v13/customerbilling/BillingDocument.java index f005023886..de2fbfc4f4 100644 --- a/proxies/com/microsoft/bingads/v13/customerbilling/BillingDocument.java +++ b/proxies/com/microsoft/bingads/v13/customerbilling/BillingDocument.java @@ -21,6 +21,7 @@ * * * + * *
* *
@@ -33,7 +34,8 @@ @XmlType(name = "BillingDocument", namespace = "https://bingads.microsoft.com/Customer/v13/Entities", propOrder = { "data", "id", - "type" + "type", + "number" }) public class BillingDocument { @@ -44,6 +46,8 @@ public class BillingDocument { @XmlElement(name = "Type") @XmlSchemaType(name = "string") protected DataType type; + @XmlElement(name = "Number", nillable = true) + protected String number; /** * Gets the value of the data property. @@ -115,4 +119,28 @@ public void setType(DataType value) { this.type = value; } + /** + * Gets the value of the number property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getNumber() { + return number; + } + + /** + * Sets the value of the number property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNumber(String value) { + this.number = value; + } + } diff --git a/proxies/com/microsoft/bingads/v13/customerbilling/BillingDocumentInfo.java b/proxies/com/microsoft/bingads/v13/customerbilling/BillingDocumentInfo.java index c08a98c87e..027ccd786f 100644 --- a/proxies/com/microsoft/bingads/v13/customerbilling/BillingDocumentInfo.java +++ b/proxies/com/microsoft/bingads/v13/customerbilling/BillingDocumentInfo.java @@ -29,6 +29,7 @@ * * * + * * * * @@ -47,7 +48,8 @@ "documentDate", "documentId", "customerId", - "campaignId" + "campaignId", + "documentNumber" }) public class BillingDocumentInfo { @@ -71,6 +73,8 @@ public class BillingDocumentInfo { protected Integer customerId; @XmlElement(name = "CampaignId", nillable = true) protected Long campaignId; + @XmlElement(name = "DocumentNumber", nillable = true) + protected String documentNumber; /** * Gets the value of the accountId property. @@ -288,4 +292,28 @@ public void setCampaignId(Long value) { this.campaignId = value; } + /** + * Gets the value of the documentNumber property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDocumentNumber() { + return documentNumber; + } + + /** + * Sets the value of the documentNumber property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDocumentNumber(String value) { + this.documentNumber = value; + } + } diff --git a/proxies/com/microsoft/bingads/v13/customerbilling/GetBillingDocumentsInfoRequest.java b/proxies/com/microsoft/bingads/v13/customerbilling/GetBillingDocumentsInfoRequest.java index 4d65ca2777..89ebb97bd3 100644 --- a/proxies/com/microsoft/bingads/v13/customerbilling/GetBillingDocumentsInfoRequest.java +++ b/proxies/com/microsoft/bingads/v13/customerbilling/GetBillingDocumentsInfoRequest.java @@ -24,6 +24,7 @@ * * * + * * * * @@ -36,7 +37,8 @@ @XmlType(name = "", propOrder = { "accountIds", "startDate", - "endDate" + "endDate", + "returnInvoiceNumber" }) @XmlRootElement(name = "GetBillingDocumentsInfoRequest") public class GetBillingDocumentsInfoRequest { @@ -51,6 +53,8 @@ public class GetBillingDocumentsInfoRequest { @XmlJavaTypeAdapter(Adapter1 .class) @XmlSchemaType(name = "dateTime") protected Calendar endDate; + @XmlElement(name = "ReturnInvoiceNumber", nillable = true) + protected Boolean returnInvoiceNumber; /** * Gets the value of the accountIds property. @@ -124,4 +128,28 @@ public void setEndDate(Calendar value) { this.endDate = value; } + /** + * Gets the value of the returnInvoiceNumber property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean getReturnInvoiceNumber() { + return returnInvoiceNumber; + } + + /** + * Sets the value of the returnInvoiceNumber property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setReturnInvoiceNumber(Boolean value) { + this.returnInvoiceNumber = value; + } + } diff --git a/proxies/com/microsoft/bingads/v13/customermanagement/LCID.java b/proxies/com/microsoft/bingads/v13/customermanagement/LCID.java index 6ad079d0c1..7e2911f8a5 100644 --- a/proxies/com/microsoft/bingads/v13/customermanagement/LCID.java +++ b/proxies/com/microsoft/bingads/v13/customermanagement/LCID.java @@ -67,6 +67,8 @@ * * * + * + * * * * } @@ -183,7 +185,11 @@ public enum LCID { @XmlEnumValue("EnglishMalaysia") ENGLISH_MALAYSIA("EnglishMalaysia"), @XmlEnumValue("EnglishSingapore") - ENGLISH_SINGAPORE("EnglishSingapore"); + ENGLISH_SINGAPORE("EnglishSingapore"), + @XmlEnumValue("TurkishTurkey") + TURKISH_TURKEY("TurkishTurkey"), + @XmlEnumValue("FilipinoPhilippines") + FILIPINO_PHILIPPINES("FilipinoPhilippines"); private final String value; LCID(String v) { diff --git a/proxies/com/microsoft/bingads/v13/customermanagement/LanguageType.java b/proxies/com/microsoft/bingads/v13/customermanagement/LanguageType.java index 0ad7433042..1af4a81a8c 100644 --- a/proxies/com/microsoft/bingads/v13/customermanagement/LanguageType.java +++ b/proxies/com/microsoft/bingads/v13/customermanagement/LanguageType.java @@ -31,6 +31,9 @@ * * * + * + * + * * * * } @@ -75,7 +78,13 @@ public enum LanguageType { @XmlEnumValue("TraditionalChinese") TRADITIONAL_CHINESE("TraditionalChinese"), @XmlEnumValue("SimplifiedChinese") - SIMPLIFIED_CHINESE("SimplifiedChinese"); + SIMPLIFIED_CHINESE("SimplifiedChinese"), + @XmlEnumValue("Thai") + THAI("Thai"), + @XmlEnumValue("Turkish") + TURKISH("Turkish"), + @XmlEnumValue("Filipino") + FILIPINO("Filipino"); private final String value; LanguageType(String v) { diff --git a/proxies/com/microsoft/bingads/v13/reporting/ArrayOfAssetPerformanceReportColumn.java b/proxies/com/microsoft/bingads/v13/reporting/ArrayOfAssetPerformanceReportColumn.java new file mode 100644 index 0000000000..1851b11fda --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/reporting/ArrayOfAssetPerformanceReportColumn.java @@ -0,0 +1,82 @@ + +package com.microsoft.bingads.v13.reporting; + +import java.util.ArrayList; +import java.util.List; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlSchemaType; +import jakarta.xml.bind.annotation.XmlType;import com.fasterxml.jackson.annotation.JsonCreator; + + +/** + *

Java class for ArrayOfAssetPerformanceReportColumn complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ArrayOfAssetPerformanceReportColumn", propOrder = { + "assetPerformanceReportColumns" +}) +public class ArrayOfAssetPerformanceReportColumn { + + @XmlElement(name = "AssetPerformanceReportColumn") + @XmlSchemaType(name = "string") + protected List assetPerformanceReportColumns; + public ArrayOfAssetPerformanceReportColumn() + { + this.assetPerformanceReportColumns = new ArrayList(); + } + @JsonCreator + public ArrayOfAssetPerformanceReportColumn(List assetperformancereportcolumns) + { + this.assetPerformanceReportColumns = assetperformancereportcolumns; + } + + /** + * Gets the value of the assetPerformanceReportColumns property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the Jakarta XML Binding object. + * This is why there is not a {@code set} method for the assetPerformanceReportColumns property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAssetPerformanceReportColumns().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link AssetPerformanceReportColumn } + * + * + * @return + * The value of the assetPerformanceReportColumns property. + */ + public List getAssetPerformanceReportColumns() { + if (assetPerformanceReportColumns == null) { + assetPerformanceReportColumns = new ArrayList<>(); + } + return this.assetPerformanceReportColumns; + } + +} diff --git a/proxies/com/microsoft/bingads/v13/reporting/ArrayOfSearchInsightPerformanceReportColumn.java b/proxies/com/microsoft/bingads/v13/reporting/ArrayOfSearchInsightPerformanceReportColumn.java new file mode 100644 index 0000000000..0f2ac6186a --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/reporting/ArrayOfSearchInsightPerformanceReportColumn.java @@ -0,0 +1,82 @@ + +package com.microsoft.bingads.v13.reporting; + +import java.util.ArrayList; +import java.util.List; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlSchemaType; +import jakarta.xml.bind.annotation.XmlType;import com.fasterxml.jackson.annotation.JsonCreator; + + +/** + *

Java class for ArrayOfSearchInsightPerformanceReportColumn complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ArrayOfSearchInsightPerformanceReportColumn", propOrder = { + "searchInsightPerformanceReportColumns" +}) +public class ArrayOfSearchInsightPerformanceReportColumn { + + @XmlElement(name = "SearchInsightPerformanceReportColumn") + @XmlSchemaType(name = "string") + protected List searchInsightPerformanceReportColumns; + public ArrayOfSearchInsightPerformanceReportColumn() + { + this.searchInsightPerformanceReportColumns = new ArrayList(); + } + @JsonCreator + public ArrayOfSearchInsightPerformanceReportColumn(List searchinsightperformancereportcolumns) + { + this.searchInsightPerformanceReportColumns = searchinsightperformancereportcolumns; + } + + /** + * Gets the value of the searchInsightPerformanceReportColumns property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the Jakarta XML Binding object. + * This is why there is not a {@code set} method for the searchInsightPerformanceReportColumns property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSearchInsightPerformanceReportColumns().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link SearchInsightPerformanceReportColumn } + * + * + * @return + * The value of the searchInsightPerformanceReportColumns property. + */ + public List getSearchInsightPerformanceReportColumns() { + if (searchInsightPerformanceReportColumns == null) { + searchInsightPerformanceReportColumns = new ArrayList<>(); + } + return this.searchInsightPerformanceReportColumns; + } + +} diff --git a/proxies/com/microsoft/bingads/v13/reporting/AssetPerformanceReportColumn.java b/proxies/com/microsoft/bingads/v13/reporting/AssetPerformanceReportColumn.java new file mode 100644 index 0000000000..ea1a2dda20 --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/reporting/AssetPerformanceReportColumn.java @@ -0,0 +1,89 @@ + +package com.microsoft.bingads.v13.reporting; + +import jakarta.xml.bind.annotation.XmlEnum; +import jakarta.xml.bind.annotation.XmlEnumValue; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for AssetPerformanceReportColumn. + * + *

The following schema fragment specifies the expected content contained within this class. + *

{@code
+ * 
+ *   
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *   
+ * 
+ * }
+ * + */ +@XmlType(name = "AssetPerformanceReportColumn") +@XmlEnum +public enum AssetPerformanceReportColumn { + + @XmlEnumValue("TimePeriod") + TIME_PERIOD("TimePeriod"), + @XmlEnumValue("AccountId") + ACCOUNT_ID("AccountId"), + @XmlEnumValue("AccountName") + ACCOUNT_NAME("AccountName"), + @XmlEnumValue("CampaignId") + CAMPAIGN_ID("CampaignId"), + @XmlEnumValue("CampaignName") + CAMPAIGN_NAME("CampaignName"), + @XmlEnumValue("AdGroupId") + AD_GROUP_ID("AdGroupId"), + @XmlEnumValue("AdGroupName") + AD_GROUP_NAME("AdGroupName"), + @XmlEnumValue("AssetId") + ASSET_ID("AssetId"), + @XmlEnumValue("AssetContent") + ASSET_CONTENT("AssetContent"), + @XmlEnumValue("AssetType") + ASSET_TYPE("AssetType"), + @XmlEnumValue("AssetSource") + ASSET_SOURCE("AssetSource"), + @XmlEnumValue("Impressions") + IMPRESSIONS("Impressions"), + @XmlEnumValue("Clicks") + CLICKS("Clicks"), + @XmlEnumValue("Ctr") + CTR("Ctr"), + @XmlEnumValue("Spend") + SPEND("Spend"); + private final String value; + + AssetPerformanceReportColumn(String v) { + value = v; + } + + public String value() { + return value; + } + + public static AssetPerformanceReportColumn fromValue(String v) { + for (AssetPerformanceReportColumn c: AssetPerformanceReportColumn.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/proxies/com/microsoft/bingads/v13/reporting/AssetPerformanceReportRequest.java b/proxies/com/microsoft/bingads/v13/reporting/AssetPerformanceReportRequest.java new file mode 100644 index 0000000000..f942b67aba --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/reporting/AssetPerformanceReportRequest.java @@ -0,0 +1,153 @@ + +package com.microsoft.bingads.v13.reporting; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlSchemaType; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for AssetPerformanceReportRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *         
+ *         
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AssetPerformanceReportRequest", propOrder = { + "aggregation", + "columns", + "scope", + "time" +}) +public class AssetPerformanceReportRequest + extends ReportRequest +{ + public AssetPerformanceReportRequest() { + this.type = "AssetPerformanceReportRequest"; + } + + @XmlElement(name = "Aggregation", required = true) + @XmlSchemaType(name = "string") + protected ReportAggregation aggregation; + @XmlElement(name = "Columns", required = true, nillable = true) + protected ArrayOfAssetPerformanceReportColumn columns; + @XmlElement(name = "Scope", required = true, nillable = true) + protected AccountThroughAdGroupReportScope scope; + @XmlElement(name = "Time", required = true, nillable = true) + protected ReportTime time; + + /** + * Gets the value of the aggregation property. + * + * @return + * possible object is + * {@link ReportAggregation } + * + */ + public ReportAggregation getAggregation() { + return aggregation; + } + + /** + * Sets the value of the aggregation property. + * + * @param value + * allowed object is + * {@link ReportAggregation } + * + */ + public void setAggregation(ReportAggregation value) { + this.aggregation = value; + } + + /** + * Gets the value of the columns property. + * + * @return + * possible object is + * {@link ArrayOfAssetPerformanceReportColumn } + * + */ + public ArrayOfAssetPerformanceReportColumn getColumns() { + return columns; + } + + /** + * Sets the value of the columns property. + * + * @param value + * allowed object is + * {@link ArrayOfAssetPerformanceReportColumn } + * + */ + public void setColumns(ArrayOfAssetPerformanceReportColumn value) { + this.columns = value; + } + + /** + * Gets the value of the scope property. + * + * @return + * possible object is + * {@link AccountThroughAdGroupReportScope } + * + */ + public AccountThroughAdGroupReportScope getScope() { + return scope; + } + + /** + * Sets the value of the scope property. + * + * @param value + * allowed object is + * {@link AccountThroughAdGroupReportScope } + * + */ + public void setScope(AccountThroughAdGroupReportScope value) { + this.scope = value; + } + + /** + * Gets the value of the time property. + * + * @return + * possible object is + * {@link ReportTime } + * + */ + public ReportTime getTime() { + return time; + } + + /** + * Sets the value of the time property. + * + * @param value + * allowed object is + * {@link ReportTime } + * + */ + public void setTime(ReportTime value) { + this.time = value; + } + +} diff --git a/proxies/com/microsoft/bingads/v13/reporting/ObjectFactory.java b/proxies/com/microsoft/bingads/v13/reporting/ObjectFactory.java index 43df25fdc3..2bbda5bcc1 100644 --- a/proxies/com/microsoft/bingads/v13/reporting/ObjectFactory.java +++ b/proxies/com/microsoft/bingads/v13/reporting/ObjectFactory.java @@ -207,6 +207,13 @@ public class ObjectFactory { private static final QName _AccountThroughAssetGroupReportScope_QNAME = new QName("https://bingads.microsoft.com/Reporting/v13", "AccountThroughAssetGroupReportScope"); private static final QName _ArrayOfAssetGroupReportScope_QNAME = new QName("https://bingads.microsoft.com/Reporting/v13", "ArrayOfAssetGroupReportScope"); private static final QName _AssetGroupReportScope_QNAME = new QName("https://bingads.microsoft.com/Reporting/v13", "AssetGroupReportScope"); + private static final QName _SearchInsightPerformanceReportRequest_QNAME = new QName("https://bingads.microsoft.com/Reporting/v13", "SearchInsightPerformanceReportRequest"); + private static final QName _ArrayOfSearchInsightPerformanceReportColumn_QNAME = new QName("https://bingads.microsoft.com/Reporting/v13", "ArrayOfSearchInsightPerformanceReportColumn"); + private static final QName _SearchInsightPerformanceReportColumn_QNAME = new QName("https://bingads.microsoft.com/Reporting/v13", "SearchInsightPerformanceReportColumn"); + private static final QName _SearchInsightPerformanceReportFilter_QNAME = new QName("https://bingads.microsoft.com/Reporting/v13", "SearchInsightPerformanceReportFilter"); + private static final QName _AssetPerformanceReportRequest_QNAME = new QName("https://bingads.microsoft.com/Reporting/v13", "AssetPerformanceReportRequest"); + private static final QName _ArrayOfAssetPerformanceReportColumn_QNAME = new QName("https://bingads.microsoft.com/Reporting/v13", "ArrayOfAssetPerformanceReportColumn"); + private static final QName _AssetPerformanceReportColumn_QNAME = new QName("https://bingads.microsoft.com/Reporting/v13", "AssetPerformanceReportColumn"); private static final QName _ApplicationToken_QNAME = new QName("https://bingads.microsoft.com/Reporting/v13", "ApplicationToken"); private static final QName _AuthenticationToken_QNAME = new QName("https://bingads.microsoft.com/Reporting/v13", "AuthenticationToken"); private static final QName _CustomerAccountId_QNAME = new QName("https://bingads.microsoft.com/Reporting/v13", "CustomerAccountId"); @@ -1608,6 +1615,56 @@ public AssetGroupReportScope createAssetGroupReportScope() { return new AssetGroupReportScope(); } + /** + * Create an instance of {@link SearchInsightPerformanceReportRequest } + * + * @return + * the new instance of {@link SearchInsightPerformanceReportRequest } + */ + public SearchInsightPerformanceReportRequest createSearchInsightPerformanceReportRequest() { + return new SearchInsightPerformanceReportRequest(); + } + + /** + * Create an instance of {@link ArrayOfSearchInsightPerformanceReportColumn } + * + * @return + * the new instance of {@link ArrayOfSearchInsightPerformanceReportColumn } + */ + public ArrayOfSearchInsightPerformanceReportColumn createArrayOfSearchInsightPerformanceReportColumn() { + return new ArrayOfSearchInsightPerformanceReportColumn(); + } + + /** + * Create an instance of {@link SearchInsightPerformanceReportFilter } + * + * @return + * the new instance of {@link SearchInsightPerformanceReportFilter } + */ + public SearchInsightPerformanceReportFilter createSearchInsightPerformanceReportFilter() { + return new SearchInsightPerformanceReportFilter(); + } + + /** + * Create an instance of {@link AssetPerformanceReportRequest } + * + * @return + * the new instance of {@link AssetPerformanceReportRequest } + */ + public AssetPerformanceReportRequest createAssetPerformanceReportRequest() { + return new AssetPerformanceReportRequest(); + } + + /** + * Create an instance of {@link ArrayOfAssetPerformanceReportColumn } + * + * @return + * the new instance of {@link ArrayOfAssetPerformanceReportColumn } + */ + public ArrayOfAssetPerformanceReportColumn createArrayOfAssetPerformanceReportColumn() { + return new ArrayOfAssetPerformanceReportColumn(); + } + /** * Create an instance of {@link SubmitGenerateReportResponse } * @@ -4142,6 +4199,97 @@ public JAXBElement createAssetGroupReportScope(AssetGroup return new JAXBElement<>(_AssetGroupReportScope_QNAME, AssetGroupReportScope.class, null, value); } + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SearchInsightPerformanceReportRequest }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link SearchInsightPerformanceReportRequest }{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/Reporting/v13", name = "SearchInsightPerformanceReportRequest") + public JAXBElement createSearchInsightPerformanceReportRequest(SearchInsightPerformanceReportRequest value) { + return new JAXBElement<>(_SearchInsightPerformanceReportRequest_QNAME, SearchInsightPerformanceReportRequest.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ArrayOfSearchInsightPerformanceReportColumn }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link ArrayOfSearchInsightPerformanceReportColumn }{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/Reporting/v13", name = "ArrayOfSearchInsightPerformanceReportColumn") + public JAXBElement createArrayOfSearchInsightPerformanceReportColumn(ArrayOfSearchInsightPerformanceReportColumn value) { + return new JAXBElement<>(_ArrayOfSearchInsightPerformanceReportColumn_QNAME, ArrayOfSearchInsightPerformanceReportColumn.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SearchInsightPerformanceReportColumn }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link SearchInsightPerformanceReportColumn }{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/Reporting/v13", name = "SearchInsightPerformanceReportColumn") + public JAXBElement createSearchInsightPerformanceReportColumn(SearchInsightPerformanceReportColumn value) { + return new JAXBElement<>(_SearchInsightPerformanceReportColumn_QNAME, SearchInsightPerformanceReportColumn.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link SearchInsightPerformanceReportFilter }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link SearchInsightPerformanceReportFilter }{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/Reporting/v13", name = "SearchInsightPerformanceReportFilter") + public JAXBElement createSearchInsightPerformanceReportFilter(SearchInsightPerformanceReportFilter value) { + return new JAXBElement<>(_SearchInsightPerformanceReportFilter_QNAME, SearchInsightPerformanceReportFilter.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AssetPerformanceReportRequest }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link AssetPerformanceReportRequest }{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/Reporting/v13", name = "AssetPerformanceReportRequest") + public JAXBElement createAssetPerformanceReportRequest(AssetPerformanceReportRequest value) { + return new JAXBElement<>(_AssetPerformanceReportRequest_QNAME, AssetPerformanceReportRequest.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ArrayOfAssetPerformanceReportColumn }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link ArrayOfAssetPerformanceReportColumn }{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/Reporting/v13", name = "ArrayOfAssetPerformanceReportColumn") + public JAXBElement createArrayOfAssetPerformanceReportColumn(ArrayOfAssetPerformanceReportColumn value) { + return new JAXBElement<>(_ArrayOfAssetPerformanceReportColumn_QNAME, ArrayOfAssetPerformanceReportColumn.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link AssetPerformanceReportColumn }{@code >} + * + * @param value + * Java instance representing xml element's value. + * @return + * the new instance of {@link JAXBElement }{@code <}{@link AssetPerformanceReportColumn }{@code >} + */ + @XmlElementDecl(namespace = "https://bingads.microsoft.com/Reporting/v13", name = "AssetPerformanceReportColumn") + public JAXBElement createAssetPerformanceReportColumn(AssetPerformanceReportColumn value) { + return new JAXBElement<>(_AssetPerformanceReportColumn_QNAME, AssetPerformanceReportColumn.class, null, value); + } + /** * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} * diff --git a/proxies/com/microsoft/bingads/v13/reporting/ReportRequest.java b/proxies/com/microsoft/bingads/v13/reporting/ReportRequest.java index fe69284259..59169b11ab 100644 --- a/proxies/com/microsoft/bingads/v13/reporting/ReportRequest.java +++ b/proxies/com/microsoft/bingads/v13/reporting/ReportRequest.java @@ -81,7 +81,9 @@ DSACategoryPerformanceReportRequest.class, HotelDimensionPerformanceReportRequest.class, HotelGroupPerformanceReportRequest.class, - AssetGroupPerformanceReportRequest.class + AssetGroupPerformanceReportRequest.class, + SearchInsightPerformanceReportRequest.class, + AssetPerformanceReportRequest.class }) public class ReportRequest { diff --git a/proxies/com/microsoft/bingads/v13/reporting/SearchInsightPerformanceReportColumn.java b/proxies/com/microsoft/bingads/v13/reporting/SearchInsightPerformanceReportColumn.java new file mode 100644 index 0000000000..344dc45c5e --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/reporting/SearchInsightPerformanceReportColumn.java @@ -0,0 +1,128 @@ + +package com.microsoft.bingads.v13.reporting; + +import jakarta.xml.bind.annotation.XmlEnum; +import jakarta.xml.bind.annotation.XmlEnumValue; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for SearchInsightPerformanceReportColumn. + * + *

The following schema fragment specifies the expected content contained within this class. + *

{@code
+ * 
+ *   
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *     
+ *   
+ * 
+ * }
+ * + */ +@XmlType(name = "SearchInsightPerformanceReportColumn") +@XmlEnum +public enum SearchInsightPerformanceReportColumn { + + @XmlEnumValue("AccountName") + ACCOUNT_NAME("AccountName"), + @XmlEnumValue("AccountNumber") + ACCOUNT_NUMBER("AccountNumber"), + @XmlEnumValue("AccountId") + ACCOUNT_ID("AccountId"), + @XmlEnumValue("TimePeriod") + TIME_PERIOD("TimePeriod"), + @XmlEnumValue("CampaignName") + CAMPAIGN_NAME("CampaignName"), + @XmlEnumValue("CampaignId") + CAMPAIGN_ID("CampaignId"), + @XmlEnumValue("AdGroupName") + AD_GROUP_NAME("AdGroupName"), + @XmlEnumValue("AdGroupId") + AD_GROUP_ID("AdGroupId"), + @XmlEnumValue("CampaignStatus") + CAMPAIGN_STATUS("CampaignStatus"), + @XmlEnumValue("Impressions") + IMPRESSIONS("Impressions"), + @XmlEnumValue("Clicks") + CLICKS("Clicks"), + @XmlEnumValue("Ctr") + CTR("Ctr"), + @XmlEnumValue("Spend") + SPEND("Spend"), + @XmlEnumValue("SearchQuery") + SEARCH_QUERY("SearchQuery"), + @XmlEnumValue("Conversions") + CONVERSIONS("Conversions"), + @XmlEnumValue("ConversionRate") + CONVERSION_RATE("ConversionRate"), + @XmlEnumValue("Revenue") + REVENUE("Revenue"), + @XmlEnumValue("ReturnOnAdSpend") + RETURN_ON_AD_SPEND("ReturnOnAdSpend"), + @XmlEnumValue("RevenuePerConversion") + REVENUE_PER_CONVERSION("RevenuePerConversion"), + @XmlEnumValue("AccountStatus") + ACCOUNT_STATUS("AccountStatus"), + @XmlEnumValue("AdGroupStatus") + AD_GROUP_STATUS("AdGroupStatus"), + @XmlEnumValue("CustomerId") + CUSTOMER_ID("CustomerId"), + @XmlEnumValue("CustomerName") + CUSTOMER_NAME("CustomerName"), + @XmlEnumValue("AssetGroupId") + ASSET_GROUP_ID("AssetGroupId"), + @XmlEnumValue("AssetGroupName") + ASSET_GROUP_NAME("AssetGroupName"), + @XmlEnumValue("AssetGroupStatus") + ASSET_GROUP_STATUS("AssetGroupStatus"), + @XmlEnumValue("SearchCategory") + SEARCH_CATEGORY("SearchCategory"), + @XmlEnumValue("SearchVolume") + SEARCH_VOLUME("SearchVolume"); + private final String value; + + SearchInsightPerformanceReportColumn(String v) { + value = v; + } + + public String value() { + return value; + } + + public static SearchInsightPerformanceReportColumn fromValue(String v) { + for (SearchInsightPerformanceReportColumn c: SearchInsightPerformanceReportColumn.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/proxies/com/microsoft/bingads/v13/reporting/SearchInsightPerformanceReportFilter.java b/proxies/com/microsoft/bingads/v13/reporting/SearchInsightPerformanceReportFilter.java new file mode 100644 index 0000000000..04fedc8c6e --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/reporting/SearchInsightPerformanceReportFilter.java @@ -0,0 +1,208 @@ + +package com.microsoft.bingads.v13.reporting; + +import java.util.Collection; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + + +/** + *

Java class for SearchInsightPerformanceReportFilter complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *         
+ *         
+ *         
+ *         
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SearchInsightPerformanceReportFilter", propOrder = { + "accountStatus", + "adGroupStatus", + "assetGroupStatus", + "campaignStatus", + "searchCategory", + "searchQueries" +}) +public class SearchInsightPerformanceReportFilter { + + @XmlElement(name = "AccountStatus", type = String.class, nillable = true) + @XmlJavaTypeAdapter(Adapter2 .class) + protected Collection accountStatus; + @XmlElement(name = "AdGroupStatus", type = String.class, nillable = true) + @XmlJavaTypeAdapter(Adapter7 .class) + protected Collection adGroupStatus; + @XmlElement(name = "AssetGroupStatus", type = String.class, nillable = true) + @XmlJavaTypeAdapter(Adapter15 .class) + protected Collection assetGroupStatus; + @XmlElement(name = "CampaignStatus", type = String.class, nillable = true) + @XmlJavaTypeAdapter(Adapter6 .class) + protected Collection campaignStatus; + @XmlElement(name = "SearchCategory", nillable = true) + protected ArrayOfstring searchCategory; + @XmlElement(name = "SearchQueries", nillable = true) + protected ArrayOfstring searchQueries; + + /** + * Gets the value of the accountStatus property. + * + * @return + * possible object is + * {@link String } + * + */ + public Collection getAccountStatus() { + return accountStatus; + } + + /** + * Sets the value of the accountStatus property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAccountStatus(Collection value) { + this.accountStatus = value; + } + + /** + * Gets the value of the adGroupStatus property. + * + * @return + * possible object is + * {@link String } + * + */ + public Collection getAdGroupStatus() { + return adGroupStatus; + } + + /** + * Sets the value of the adGroupStatus property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAdGroupStatus(Collection value) { + this.adGroupStatus = value; + } + + /** + * Gets the value of the assetGroupStatus property. + * + * @return + * possible object is + * {@link String } + * + */ + public Collection getAssetGroupStatus() { + return assetGroupStatus; + } + + /** + * Sets the value of the assetGroupStatus property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAssetGroupStatus(Collection value) { + this.assetGroupStatus = value; + } + + /** + * Gets the value of the campaignStatus property. + * + * @return + * possible object is + * {@link String } + * + */ + public Collection getCampaignStatus() { + return campaignStatus; + } + + /** + * Sets the value of the campaignStatus property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCampaignStatus(Collection value) { + this.campaignStatus = value; + } + + /** + * Gets the value of the searchCategory property. + * + * @return + * possible object is + * {@link ArrayOfstring } + * + */ + public ArrayOfstring getSearchCategory() { + return searchCategory; + } + + /** + * Sets the value of the searchCategory property. + * + * @param value + * allowed object is + * {@link ArrayOfstring } + * + */ + public void setSearchCategory(ArrayOfstring value) { + this.searchCategory = value; + } + + /** + * Gets the value of the searchQueries property. + * + * @return + * possible object is + * {@link ArrayOfstring } + * + */ + public ArrayOfstring getSearchQueries() { + return searchQueries; + } + + /** + * Sets the value of the searchQueries property. + * + * @param value + * allowed object is + * {@link ArrayOfstring } + * + */ + public void setSearchQueries(ArrayOfstring value) { + this.searchQueries = value; + } + +} diff --git a/proxies/com/microsoft/bingads/v13/reporting/SearchInsightPerformanceReportRequest.java b/proxies/com/microsoft/bingads/v13/reporting/SearchInsightPerformanceReportRequest.java new file mode 100644 index 0000000000..5f2e029519 --- /dev/null +++ b/proxies/com/microsoft/bingads/v13/reporting/SearchInsightPerformanceReportRequest.java @@ -0,0 +1,181 @@ + +package com.microsoft.bingads.v13.reporting; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlSchemaType; +import jakarta.xml.bind.annotation.XmlType; + + +/** + *

Java class for SearchInsightPerformanceReportRequest complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

{@code
+ * 
+ *   
+ *     
+ *       
+ *         
+ *         
+ *         
+ *         
+ *         
+ *       
+ *     
+ *   
+ * 
+ * }
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SearchInsightPerformanceReportRequest", propOrder = { + "aggregation", + "columns", + "filter", + "scope", + "time" +}) +public class SearchInsightPerformanceReportRequest + extends ReportRequest +{ + public SearchInsightPerformanceReportRequest() { + this.type = "SearchInsightPerformanceReportRequest"; + } + + @XmlElement(name = "Aggregation", required = true) + @XmlSchemaType(name = "string") + protected ReportAggregation aggregation; + @XmlElement(name = "Columns", required = true, nillable = true) + protected ArrayOfSearchInsightPerformanceReportColumn columns; + @XmlElement(name = "Filter", nillable = true) + protected SearchInsightPerformanceReportFilter filter; + @XmlElement(name = "Scope", required = true, nillable = true) + protected AccountThroughCampaignReportScope scope; + @XmlElement(name = "Time", required = true, nillable = true) + protected ReportTime time; + + /** + * Gets the value of the aggregation property. + * + * @return + * possible object is + * {@link ReportAggregation } + * + */ + public ReportAggregation getAggregation() { + return aggregation; + } + + /** + * Sets the value of the aggregation property. + * + * @param value + * allowed object is + * {@link ReportAggregation } + * + */ + public void setAggregation(ReportAggregation value) { + this.aggregation = value; + } + + /** + * Gets the value of the columns property. + * + * @return + * possible object is + * {@link ArrayOfSearchInsightPerformanceReportColumn } + * + */ + public ArrayOfSearchInsightPerformanceReportColumn getColumns() { + return columns; + } + + /** + * Sets the value of the columns property. + * + * @param value + * allowed object is + * {@link ArrayOfSearchInsightPerformanceReportColumn } + * + */ + public void setColumns(ArrayOfSearchInsightPerformanceReportColumn value) { + this.columns = value; + } + + /** + * Gets the value of the filter property. + * + * @return + * possible object is + * {@link SearchInsightPerformanceReportFilter } + * + */ + public SearchInsightPerformanceReportFilter getFilter() { + return filter; + } + + /** + * Sets the value of the filter property. + * + * @param value + * allowed object is + * {@link SearchInsightPerformanceReportFilter } + * + */ + public void setFilter(SearchInsightPerformanceReportFilter value) { + this.filter = value; + } + + /** + * Gets the value of the scope property. + * + * @return + * possible object is + * {@link AccountThroughCampaignReportScope } + * + */ + public AccountThroughCampaignReportScope getScope() { + return scope; + } + + /** + * Sets the value of the scope property. + * + * @param value + * allowed object is + * {@link AccountThroughCampaignReportScope } + * + */ + public void setScope(AccountThroughCampaignReportScope value) { + this.scope = value; + } + + /** + * Gets the value of the time property. + * + * @return + * possible object is + * {@link ReportTime } + * + */ + public ReportTime getTime() { + return time; + } + + /** + * Sets the value of the time property. + * + * @param value + * allowed object is + * {@link ReportTime } + * + */ + public void setTime(ReportTime value) { + this.time = value; + } + +} diff --git a/src/main/java/com/microsoft/bingads/ApiEnvironment.java b/src/main/java/com/microsoft/bingads/ApiEnvironment.java index 428d46d126..6fe1b17068 100644 --- a/src/main/java/com/microsoft/bingads/ApiEnvironment.java +++ b/src/main/java/com/microsoft/bingads/ApiEnvironment.java @@ -31,6 +31,6 @@ public static ApiEnvironment fromValue(String v) { return c; } } - throw new IllegalArgumentException(v); + return null; } } diff --git a/src/main/java/com/microsoft/bingads/OAuthDesktopMobileAuthCodeGrant.java b/src/main/java/com/microsoft/bingads/OAuthDesktopMobileAuthCodeGrant.java index 886d77c760..136614276a 100644 --- a/src/main/java/com/microsoft/bingads/OAuthDesktopMobileAuthCodeGrant.java +++ b/src/main/java/com/microsoft/bingads/OAuthDesktopMobileAuthCodeGrant.java @@ -26,7 +26,7 @@ public class OAuthDesktopMobileAuthCodeGrant extends OAuthWithAuthorizationCode * @see https://tools.ietf.org/html/rfc6749#section-4.1 */ public OAuthDesktopMobileAuthCodeGrant(String clientId, String refreshToken) { - this(clientId, refreshToken, ApiEnvironment.PRODUCTION); + this(clientId, refreshToken, defaultEnv); } @@ -63,7 +63,7 @@ public OAuthDesktopMobileAuthCodeGrant(String clientId, String refreshToken, Api * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-15#section-3.1 */ public OAuthDesktopMobileAuthCodeGrant(String clientId) { - this(clientId, ApiEnvironment.PRODUCTION); + this(clientId, defaultEnv); } /** @@ -96,7 +96,7 @@ public OAuthDesktopMobileAuthCodeGrant(String clientId, ApiEnvironment env) { * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-15#section-3.1 */ public OAuthDesktopMobileAuthCodeGrant(String clientId, OAuthTokens oauthTokens) { - this(clientId, oauthTokens, ApiEnvironment.PRODUCTION); + this(clientId, oauthTokens, defaultEnv); } /** diff --git a/src/main/java/com/microsoft/bingads/OAuthDesktopMobileImplicitGrant.java b/src/main/java/com/microsoft/bingads/OAuthDesktopMobileImplicitGrant.java index 218b9f66fa..90d9d89bc0 100644 --- a/src/main/java/com/microsoft/bingads/OAuthDesktopMobileImplicitGrant.java +++ b/src/main/java/com/microsoft/bingads/OAuthDesktopMobileImplicitGrant.java @@ -19,7 +19,7 @@ public class OAuthDesktopMobileImplicitGrant extends OAuthImplicitGrant { * @see https://tools.ietf.org/html/rfc6749#section-4.1 */ public OAuthDesktopMobileImplicitGrant(String clientId) { - this(clientId, ApiEnvironment.PRODUCTION); + this(clientId, defaultEnv); } /** @@ -50,7 +50,7 @@ public OAuthDesktopMobileImplicitGrant(String clientId, ApiEnvironment env) { * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-15#section-3.1 */ public OAuthDesktopMobileImplicitGrant(String clientId, OAuthTokens oauthTokens) { - this(clientId, oauthTokens, ApiEnvironment.PRODUCTION); + this(clientId, oauthTokens, defaultEnv); } /** diff --git a/src/main/java/com/microsoft/bingads/OAuthWebAuthCodeGrant.java b/src/main/java/com/microsoft/bingads/OAuthWebAuthCodeGrant.java index ec71745ab4..dc4618735d 100644 --- a/src/main/java/com/microsoft/bingads/OAuthWebAuthCodeGrant.java +++ b/src/main/java/com/microsoft/bingads/OAuthWebAuthCodeGrant.java @@ -11,7 +11,7 @@ public class OAuthWebAuthCodeGrant extends OAuthWithAuthorizationCode { public OAuthWebAuthCodeGrant(String clientId, String clientSecret, URL redirectionUrl, String refreshToken) { - this(clientId, clientSecret, redirectionUrl, refreshToken, ApiEnvironment.PRODUCTION); + this(clientId, clientSecret, redirectionUrl, refreshToken, defaultEnv); } public OAuthWebAuthCodeGrant(String clientId, String clientSecret, URL redirectionUrl, String refreshToken, ApiEnvironment env) { @@ -36,7 +36,7 @@ public OAuthWebAuthCodeGrant(String clientId, String clientSecret, URL redirecti * @see https://tools.ietf.org/html/rfc6749#section-3.1.2 */ public OAuthWebAuthCodeGrant(String clientId, String clientSecret, URL redirectionUrl) { - this(clientId, clientSecret, redirectionUrl, ApiEnvironment.PRODUCTION); + this(clientId, clientSecret, redirectionUrl, defaultEnv); } @@ -92,7 +92,7 @@ public OAuthWebAuthCodeGrant(String clientId, String clientSecret, URL redirecti * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-15#section-2.1.1 */ public OAuthWebAuthCodeGrant(String clientId, String clientSecret, URL redirectionUrl, OAuthTokens oauthTokens) { - this(clientId, clientSecret, redirectionUrl, oauthTokens, ApiEnvironment.PRODUCTION); + this(clientId, clientSecret, redirectionUrl, oauthTokens, defaultEnv); } /** @@ -135,7 +135,7 @@ public OAuthWebAuthCodeGrant(String clientId, String clientSecret, URL redirecti * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-15#section-2.1.1 */ public OAuthWebAuthCodeGrant(String clientId, String clientSecret, URL redirectionUri, OAuthService oAuthService, OAuthScope oAuthScope) { - this(clientId, clientSecret, redirectionUri, oAuthService, ApiEnvironment.PRODUCTION, oAuthScope); + this(clientId, clientSecret, redirectionUri, oAuthService, defaultEnv, oAuthScope); } /** diff --git a/src/main/java/com/microsoft/bingads/internal/OAuthAuthorization.java b/src/main/java/com/microsoft/bingads/internal/OAuthAuthorization.java index 3c1410bb4d..b1471c2fc4 100644 --- a/src/main/java/com/microsoft/bingads/internal/OAuthAuthorization.java +++ b/src/main/java/com/microsoft/bingads/internal/OAuthAuthorization.java @@ -9,6 +9,7 @@ import com.microsoft.bingads.OAuthDesktopMobileImplicitGrant; import com.microsoft.bingads.OAuthTokens; import com.microsoft.bingads.OAuthWebAuthCodeGrant; +import com.microsoft.bingads.internal.ServiceUtils; /** * The abstract base class for all OAuth authentication classes. @@ -25,6 +26,8 @@ */ abstract class OAuthAuthorization extends Authentication { + protected static ApiEnvironment defaultEnv = ServiceUtils.getEnvironmentFromConfig() == ApiEnvironment.SANDBOX ? ApiEnvironment.SANDBOX : ApiEnvironment.PRODUCTION; + /** * Returns OAuth Authorization Endpoint that the user has to navigate to * from the browser in order to get to the user consent page. @@ -75,7 +78,7 @@ public OAuthTokens getOAuthTokens() { } public OAuthAuthorization(ApiEnvironment env) { - this.environment = env; + this.environment = env; } /** @@ -106,7 +109,7 @@ public ApiEnvironment getEnvironment() { } public void setEnvironment(ApiEnvironment environment) { - this.environment = environment; + this.environment = environment; } diff --git a/src/main/java/com/microsoft/bingads/internal/ServiceFactoryImpl.java b/src/main/java/com/microsoft/bingads/internal/ServiceFactoryImpl.java index 7049a4c0d9..e5b089dea2 100644 --- a/src/main/java/com/microsoft/bingads/internal/ServiceFactoryImpl.java +++ b/src/main/java/com/microsoft/bingads/internal/ServiceFactoryImpl.java @@ -27,7 +27,7 @@ public class ServiceFactoryImpl implements ServiceFactory { - public static final String VERSION = "13.0.20.2"; + public static final String VERSION = "13.0.21"; private static final int DEFAULT_WS_CREATE_TIMEOUT_IN_SECOND = 60; diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/arrayOfTypes/AddMixInForArrayOfTypes.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/arrayOfTypes/AddMixInForArrayOfTypes.java index ae6885c867..6b3f149081 100644 --- a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/arrayOfTypes/AddMixInForArrayOfTypes.java +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/arrayOfTypes/AddMixInForArrayOfTypes.java @@ -72,6 +72,7 @@ public static void AddMixInForArrayOfTypes() { .addMixIn(ArrayOfGenderType.class, ArrayOfTypesMixIn.class) .addMixIn(ArrayOfAudienceInfo.class, ArrayOfTypesMixIn.class) .addMixIn(ArrayOfAssetGroup.class, ArrayOfTypesMixIn.class) + .addMixIn(ArrayOfAssetGroupSearchTheme.class, ArrayOfTypesMixIn.class) .addMixIn(ArrayOfAssetGroupEditorialReasonCollection.class, ArrayOfTypesMixIn.class) .addMixIn(ArrayOfAssetGroupEditorialReason.class, ArrayOfTypesMixIn.class) .addMixIn(ArrayOfAudienceGroupAssetGroupAssociation.class, ArrayOfTypesMixIn.class) diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/arrayOfTypes/ArrayOfTypesMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/arrayOfTypes/ArrayOfTypesMixIn.java index 6b35a57e9f..3bd6ce4e9c 100644 --- a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/arrayOfTypes/ArrayOfTypesMixIn.java +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/arrayOfTypes/ArrayOfTypesMixIn.java @@ -259,6 +259,10 @@ interface ArrayOfTypesMixIn{ List getAssetGroups(); + @JsonValue + List getAssetGroupSearchThemes(); + + @JsonValue List getAssetGroupEditorialReasonCollections(); diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AdSubTypeDeserializer.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AdSubTypeDeserializer.java new file mode 100644 index 0000000000..fab832e55b --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AdSubTypeDeserializer.java @@ -0,0 +1,27 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.campaignmanagement.enums; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.microsoft.bingads.v13.campaignmanagement.AdSubType; +import com.microsoft.bingads.internal.restful.adaptor.AdaptorUtil; + +public class AdSubTypeDeserializer extends JsonDeserializer> { + @Override + public Collection deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + String s = p.getValueAsString(); + String[] strs = s.split(","); + Collection res = new ArrayList(); + for (String str : strs) + { + res.add(Enum.valueOf(AdSubType.class, AdaptorUtil.convertStringToEnumValue(str.trim()))); + } + return res; + } +} diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AdSubTypeMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AdSubTypeMixIn.java new file mode 100644 index 0000000000..57707776e8 --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AdSubTypeMixIn.java @@ -0,0 +1,24 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.campaignmanagement.enums; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.microsoft.bingads.v13.campaignmanagement.*; +import com.microsoft.bingads.internal.restful.adaptor.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public interface AdSubTypeMixIn{ + + @JsonValue + String value(); + + @JsonCreator + AdSubType fromValue(String v); + + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AddMixInForComplexTypesWithEnumList.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AddMixInForComplexTypesWithEnumList.java index 5ab9c83466..aa32c3d5d1 100644 --- a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AddMixInForComplexTypesWithEnumList.java +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AddMixInForComplexTypesWithEnumList.java @@ -22,6 +22,7 @@ public static void AddMixInForComplexTypesWithEnumList() { .addMixIn(GetAdExtensionsAssociationsRequest.class, GetAdExtensionsAssociationsRequestEnumsMixIn.class) .addMixIn(GetAdExtensionIdsByAccountIdRequest.class, GetAdExtensionIdsByAccountIdRequestEnumsMixIn.class) .addMixIn(GetMediaMetaDataByAccountIdRequest.class, GetMediaMetaDataByAccountIdRequestEnumsMixIn.class) + .addMixIn(GetMediaMetaDataByIdsRequest.class, GetMediaMetaDataByIdsRequestEnumsMixIn.class) .addMixIn(GetMediaAssociationsRequest.class, GetMediaAssociationsRequestEnumsMixIn.class) .addMixIn(GetAdGroupCriterionsByIdsRequest.class, GetAdGroupCriterionsByIdsRequestEnumsMixIn.class) .addMixIn(AddAdGroupCriterionsRequest.class, AddAdGroupCriterionsRequestEnumsMixIn.class) @@ -32,12 +33,15 @@ public static void AddMixInForComplexTypesWithEnumList() { .addMixIn(UpdateCampaignCriterionsRequest.class, UpdateCampaignCriterionsRequestEnumsMixIn.class) .addMixIn(DeleteCampaignCriterionsRequest.class, DeleteCampaignCriterionsRequestEnumsMixIn.class) .addMixIn(GetCampaignCriterionsByIdsRequest.class, GetCampaignCriterionsByIdsRequestEnumsMixIn.class) + .addMixIn(GetAssetGroupsByIdsRequest.class, GetAssetGroupsByIdsRequestEnumsMixIn.class) + .addMixIn(GetAssetGroupsByCampaignIdRequest.class, GetAssetGroupsByCampaignIdRequestEnumsMixIn.class) .addMixIn(GetAudiencesByIdsRequest.class, GetAudiencesByIdsRequestEnumsMixIn.class) .addMixIn(GetConversionGoalsByIdsRequest.class, GetConversionGoalsByIdsRequestEnumsMixIn.class) .addMixIn(GetConversionGoalsByTagIdsRequest.class, GetConversionGoalsByTagIdsRequestEnumsMixIn.class) .addMixIn(GetProfileDataFileUrlRequest.class, GetProfileDataFileUrlRequestEnumsMixIn.class) .addMixIn(GetImportResultsRequest.class, GetImportResultsRequestEnumsMixIn.class) .addMixIn(GetImportJobsByIdsRequest.class, GetImportJobsByIdsRequestEnumsMixIn.class) + .addMixIn(ResponsiveAd.class, ResponsiveAdEnumsMixIn.class) .addMixIn(HotelSetting.class, HotelSettingEnumsMixIn.class) .addMixIn(Campaign.class, CampaignEnumsMixIn.class) .addMixIn(MediaAssociation.class, MediaAssociationEnumsMixIn.class) diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AddMixInForEnumTypes.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AddMixInForEnumTypes.java index 010faf305a..26563b9f8e 100644 --- a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AddMixInForEnumTypes.java +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AddMixInForEnumTypes.java @@ -14,6 +14,7 @@ public static void AddMixInForEnumTypes() { .addMixIn(AdEditorialStatus.class, AdEditorialStatusMixIn.class) .addMixIn(AdStatus.class, AdStatusMixIn.class) .addMixIn(AdType.class, AdTypeMixIn.class) + .addMixIn(AdSubType.class, AdSubTypeMixIn.class) .addMixIn(CallToAction.class, CallToActionMixIn.class) .addMixIn(LanguageName.class, LanguageNameMixIn.class) .addMixIn(AssetLinkEditorialStatus.class, AssetLinkEditorialStatusMixIn.class) @@ -21,6 +22,8 @@ public static void AddMixInForEnumTypes() { .addMixIn(CriterionTypeGroup.class, CriterionTypeGroupMixIn.class) .addMixIn(BidOption.class, BidOptionMixIn.class) .addMixIn(HotelAdGroupType.class, HotelAdGroupTypeMixIn.class) + .addMixIn(VanityPharmaDisplayUrlMode.class, VanityPharmaDisplayUrlModeMixIn.class) + .addMixIn(VanityPharmaWebsiteDescription.class, VanityPharmaWebsiteDescriptionMixIn.class) .addMixIn(BudgetLimitType.class, BudgetLimitTypeMixIn.class) .addMixIn(CampaignStatus.class, CampaignStatusMixIn.class) .addMixIn(CampaignType.class, CampaignTypeMixIn.class) @@ -56,6 +59,7 @@ public static void AddMixInForEnumTypes() { .addMixIn(AssociationType.class, AssociationTypeMixIn.class) .addMixIn(AdExtensionEditorialStatus.class, AdExtensionEditorialStatusMixIn.class) .addMixIn(MediaEnabledEntityFilter.class, MediaEnabledEntityFilterMixIn.class) + .addMixIn(MediaAdditionalField.class, MediaAdditionalFieldMixIn.class) .addMixIn(AdGroupCriterionType.class, AdGroupCriterionTypeMixIn.class) .addMixIn(CriterionAdditionalField.class, CriterionAdditionalFieldMixIn.class) .addMixIn(ProductPartitionType.class, ProductPartitionTypeMixIn.class) @@ -81,11 +85,13 @@ public static void AddMixInForEnumTypes() { .addMixIn(AudienceGroupDimensionType.class, AudienceGroupDimensionTypeMixIn.class) .addMixIn(AssetGroupEditorialStatus.class, AssetGroupEditorialStatusMixIn.class) .addMixIn(AssetGroupStatus.class, AssetGroupStatusMixIn.class) + .addMixIn(AssetGroupAdditionalField.class, AssetGroupAdditionalFieldMixIn.class) .addMixIn(NormalForm.class, NormalFormMixIn.class) .addMixIn(StringOperator.class, StringOperatorMixIn.class) .addMixIn(NumberOperator.class, NumberOperatorMixIn.class) .addMixIn(ProductAudienceType.class, ProductAudienceTypeMixIn.class) .addMixIn(LogicalOperator.class, LogicalOperatorMixIn.class) + .addMixIn(ImpressionBasedEntityType.class, ImpressionBasedEntityTypeMixIn.class) .addMixIn(AudienceAdditionalField.class, AudienceAdditionalFieldMixIn.class) .addMixIn(CustomerListActionType.class, CustomerListActionTypeMixIn.class) .addMixIn(CustomerListItemSubType.class, CustomerListItemSubTypeMixIn.class) diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AssetGroupAdditionalFieldDeserializer.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AssetGroupAdditionalFieldDeserializer.java new file mode 100644 index 0000000000..b39fc1e4ee --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AssetGroupAdditionalFieldDeserializer.java @@ -0,0 +1,27 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.campaignmanagement.enums; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.microsoft.bingads.v13.campaignmanagement.AssetGroupAdditionalField; +import com.microsoft.bingads.internal.restful.adaptor.AdaptorUtil; + +public class AssetGroupAdditionalFieldDeserializer extends JsonDeserializer> { + @Override + public Collection deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + String s = p.getValueAsString(); + String[] strs = s.split(","); + Collection res = new ArrayList(); + for (String str : strs) + { + res.add(Enum.valueOf(AssetGroupAdditionalField.class, AdaptorUtil.convertStringToEnumValue(str.trim()))); + } + return res; + } +} diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AssetGroupAdditionalFieldMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AssetGroupAdditionalFieldMixIn.java new file mode 100644 index 0000000000..c70ce4c654 --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/AssetGroupAdditionalFieldMixIn.java @@ -0,0 +1,24 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.campaignmanagement.enums; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.microsoft.bingads.v13.campaignmanagement.*; +import com.microsoft.bingads.internal.restful.adaptor.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public interface AssetGroupAdditionalFieldMixIn{ + + @JsonValue + String value(); + + @JsonCreator + AssetGroupAdditionalField fromValue(String v); + + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/DataExclusionEnumsMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/DataExclusionEnumsMixIn.java index 1e3e45c9d7..2566a1928f 100644 --- a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/DataExclusionEnumsMixIn.java +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/DataExclusionEnumsMixIn.java @@ -18,4 +18,9 @@ public interface DataExclusionEnumsMixIn{ @JsonDeserialize(using = CampaignTypeDeserializer.class) Collection getCampaignTypeFilter(); + + @JsonSerialize(using = EnumListSerializer.class) + @JsonDeserialize(using = DeviceTypeDeserializer.class) + Collection getDeviceTypeFilter(); + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/DeviceTypeDeserializer.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/DeviceTypeDeserializer.java new file mode 100644 index 0000000000..78e16b65ed --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/DeviceTypeDeserializer.java @@ -0,0 +1,27 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.campaignmanagement.enums; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.microsoft.bingads.v13.campaignmanagement.DeviceType; +import com.microsoft.bingads.internal.restful.adaptor.AdaptorUtil; + +public class DeviceTypeDeserializer extends JsonDeserializer> { + @Override + public Collection deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + String s = p.getValueAsString(); + String[] strs = s.split(","); + Collection res = new ArrayList(); + for (String str : strs) + { + res.add(Enum.valueOf(DeviceType.class, AdaptorUtil.convertStringToEnumValue(str.trim()))); + } + return res; + } +} diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/GetAssetGroupsByCampaignIdRequestEnumsMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/GetAssetGroupsByCampaignIdRequestEnumsMixIn.java new file mode 100644 index 0000000000..f19cf5d12d --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/GetAssetGroupsByCampaignIdRequestEnumsMixIn.java @@ -0,0 +1,21 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.campaignmanagement.enums; + +import java.util.Collection; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.microsoft.bingads.v13.campaignmanagement.*; +import com.microsoft.bingads.internal.restful.adaptor.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public interface GetAssetGroupsByCampaignIdRequestEnumsMixIn{ + + @JsonSerialize(using = EnumListSerializer.class) + @JsonDeserialize(using = AssetGroupAdditionalFieldDeserializer.class) + Collection getReturnAdditionalFields(); + + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/GetAssetGroupsByIdsRequestEnumsMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/GetAssetGroupsByIdsRequestEnumsMixIn.java new file mode 100644 index 0000000000..5cf7c02b9a --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/GetAssetGroupsByIdsRequestEnumsMixIn.java @@ -0,0 +1,21 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.campaignmanagement.enums; + +import java.util.Collection; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.microsoft.bingads.v13.campaignmanagement.*; +import com.microsoft.bingads.internal.restful.adaptor.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public interface GetAssetGroupsByIdsRequestEnumsMixIn{ + + @JsonSerialize(using = EnumListSerializer.class) + @JsonDeserialize(using = AssetGroupAdditionalFieldDeserializer.class) + Collection getReturnAdditionalFields(); + + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/GetMediaMetaDataByAccountIdRequestEnumsMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/GetMediaMetaDataByAccountIdRequestEnumsMixIn.java index 2ab22fb82b..edee3edf46 100644 --- a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/GetMediaMetaDataByAccountIdRequestEnumsMixIn.java +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/GetMediaMetaDataByAccountIdRequestEnumsMixIn.java @@ -18,4 +18,9 @@ public interface GetMediaMetaDataByAccountIdRequestEnumsMixIn{ @JsonDeserialize(using = MediaEnabledEntityFilterDeserializer.class) Collection getMediaEnabledEntities(); + + @JsonSerialize(using = EnumListSerializer.class) + @JsonDeserialize(using = MediaAdditionalFieldDeserializer.class) + Collection getReturnAdditionalFields(); + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/GetMediaMetaDataByIdsRequestEnumsMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/GetMediaMetaDataByIdsRequestEnumsMixIn.java new file mode 100644 index 0000000000..dfe29b1cf0 --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/GetMediaMetaDataByIdsRequestEnumsMixIn.java @@ -0,0 +1,21 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.campaignmanagement.enums; + +import java.util.Collection; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.microsoft.bingads.v13.campaignmanagement.*; +import com.microsoft.bingads.internal.restful.adaptor.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public interface GetMediaMetaDataByIdsRequestEnumsMixIn{ + + @JsonSerialize(using = EnumListSerializer.class) + @JsonDeserialize(using = MediaAdditionalFieldDeserializer.class) + Collection getReturnAdditionalFields(); + + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/ImpressionBasedEntityTypeMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/ImpressionBasedEntityTypeMixIn.java new file mode 100644 index 0000000000..3cc3dc04a2 --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/ImpressionBasedEntityTypeMixIn.java @@ -0,0 +1,24 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.campaignmanagement.enums; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.microsoft.bingads.v13.campaignmanagement.*; +import com.microsoft.bingads.internal.restful.adaptor.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public interface ImpressionBasedEntityTypeMixIn{ + + @JsonValue + String value(); + + @JsonCreator + ImpressionBasedEntityType fromValue(String v); + + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/MediaAdditionalFieldDeserializer.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/MediaAdditionalFieldDeserializer.java new file mode 100644 index 0000000000..a615734a13 --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/MediaAdditionalFieldDeserializer.java @@ -0,0 +1,27 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.campaignmanagement.enums; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.microsoft.bingads.v13.campaignmanagement.MediaAdditionalField; +import com.microsoft.bingads.internal.restful.adaptor.AdaptorUtil; + +public class MediaAdditionalFieldDeserializer extends JsonDeserializer> { + @Override + public Collection deserialize(JsonParser p, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + String s = p.getValueAsString(); + String[] strs = s.split(","); + Collection res = new ArrayList(); + for (String str : strs) + { + res.add(Enum.valueOf(MediaAdditionalField.class, AdaptorUtil.convertStringToEnumValue(str.trim()))); + } + return res; + } +} diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/MediaAdditionalFieldMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/MediaAdditionalFieldMixIn.java new file mode 100644 index 0000000000..838c89bc51 --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/MediaAdditionalFieldMixIn.java @@ -0,0 +1,24 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.campaignmanagement.enums; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.microsoft.bingads.v13.campaignmanagement.*; +import com.microsoft.bingads.internal.restful.adaptor.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public interface MediaAdditionalFieldMixIn{ + + @JsonValue + String value(); + + @JsonCreator + MediaAdditionalField fromValue(String v); + + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/ResponsiveAdEnumsMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/ResponsiveAdEnumsMixIn.java new file mode 100644 index 0000000000..699854b49d --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/ResponsiveAdEnumsMixIn.java @@ -0,0 +1,21 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.campaignmanagement.enums; + +import java.util.Collection; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.microsoft.bingads.v13.campaignmanagement.*; +import com.microsoft.bingads.internal.restful.adaptor.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public interface ResponsiveAdEnumsMixIn{ + + @JsonSerialize(using = EnumListSerializer.class) + @JsonDeserialize(using = AdSubTypeDeserializer.class) + Collection getAdSubType(); + + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/SeasonalityAdjustmentEnumsMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/SeasonalityAdjustmentEnumsMixIn.java index 4df9391e16..f6789eb4ee 100644 --- a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/SeasonalityAdjustmentEnumsMixIn.java +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/SeasonalityAdjustmentEnumsMixIn.java @@ -18,4 +18,9 @@ public interface SeasonalityAdjustmentEnumsMixIn{ @JsonDeserialize(using = CampaignTypeDeserializer.class) Collection getCampaignTypeFilter(); + + @JsonSerialize(using = EnumListSerializer.class) + @JsonDeserialize(using = DeviceTypeDeserializer.class) + Collection getDeviceTypeFilter(); + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/VanityPharmaDisplayUrlModeMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/VanityPharmaDisplayUrlModeMixIn.java new file mode 100644 index 0000000000..dfe78c15a6 --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/VanityPharmaDisplayUrlModeMixIn.java @@ -0,0 +1,24 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.campaignmanagement.enums; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.microsoft.bingads.v13.campaignmanagement.*; +import com.microsoft.bingads.internal.restful.adaptor.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public interface VanityPharmaDisplayUrlModeMixIn{ + + @JsonValue + String value(); + + @JsonCreator + VanityPharmaDisplayUrlMode fromValue(String v); + + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/VanityPharmaWebsiteDescriptionMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/VanityPharmaWebsiteDescriptionMixIn.java new file mode 100644 index 0000000000..925dd86546 --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/enums/VanityPharmaWebsiteDescriptionMixIn.java @@ -0,0 +1,24 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.campaignmanagement.enums; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.microsoft.bingads.v13.campaignmanagement.*; +import com.microsoft.bingads.internal.restful.adaptor.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public interface VanityPharmaWebsiteDescriptionMixIn{ + + @JsonValue + String value(); + + @JsonCreator + VanityPharmaWebsiteDescription fromValue(String v); + + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/polymorphicTypes/AdExtensionPolymorphicTypesMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/polymorphicTypes/AdExtensionPolymorphicTypesMixIn.java index cec61f57f5..1ca9ba2772 100644 --- a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/polymorphicTypes/AdExtensionPolymorphicTypesMixIn.java +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/polymorphicTypes/AdExtensionPolymorphicTypesMixIn.java @@ -49,6 +49,8 @@ @JsonSubTypes.Type(value = VideoAdExtension.class, name = "VideoAdExtension"), @JsonSubTypes.Type(value = DisclaimerAdExtension.class, name = "DisclaimerAdExtension"), + + @JsonSubTypes.Type(value = LogoAdExtension.class, name = "LogoAdExtension"), }) @JsonInclude(JsonInclude.Include.NON_NULL) diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/polymorphicTypes/AudiencePolymorphicTypesMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/polymorphicTypes/AudiencePolymorphicTypesMixIn.java index 4fd2d6fa56..deffbe27c0 100644 --- a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/polymorphicTypes/AudiencePolymorphicTypesMixIn.java +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/polymorphicTypes/AudiencePolymorphicTypesMixIn.java @@ -33,6 +33,8 @@ @JsonSubTypes.Type(value = CombinedList.class, name = "CombinedList"), @JsonSubTypes.Type(value = CustomerList.class, name = "CustomerList"), + + @JsonSubTypes.Type(value = ImpressionBasedRemarketingList.class, name = "ImpressionBasedRemarketingList"), }) @JsonInclude(JsonInclude.Include.NON_NULL) diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/polymorphicTypes/SettingPolymorphicTypesMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/polymorphicTypes/SettingPolymorphicTypesMixIn.java index fb4d2a04f1..31996f4594 100644 --- a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/polymorphicTypes/SettingPolymorphicTypesMixIn.java +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/campaignmanagement/polymorphicTypes/SettingPolymorphicTypesMixIn.java @@ -41,6 +41,8 @@ @JsonSubTypes.Type(value = PerformanceMaxSetting.class, name = "PerformanceMaxSetting"), @JsonSubTypes.Type(value = CallToActionSetting.class, name = "CallToActionSetting"), + + @JsonSubTypes.Type(value = VanityPharmaSetting.class, name = "VanityPharmaSetting"), }) @JsonInclude(JsonInclude.Include.NON_NULL) diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/arrayOfTypes/AddMixInForArrayOfTypes.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/arrayOfTypes/AddMixInForArrayOfTypes.java index d240cb7fe9..cf95607278 100644 --- a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/arrayOfTypes/AddMixInForArrayOfTypes.java +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/arrayOfTypes/AddMixInForArrayOfTypes.java @@ -51,6 +51,8 @@ public static void AddMixInForArrayOfTypes() { .addMixIn(ArrayOfHotelGroupPerformanceReportColumn.class, ArrayOfTypesMixIn.class) .addMixIn(ArrayOfAssetGroupPerformanceReportColumn.class, ArrayOfTypesMixIn.class) .addMixIn(ArrayOfAssetGroupReportScope.class, ArrayOfTypesMixIn.class) + .addMixIn(ArrayOfSearchInsightPerformanceReportColumn.class, ArrayOfTypesMixIn.class) + .addMixIn(ArrayOfAssetPerformanceReportColumn.class, ArrayOfTypesMixIn.class) .addMixIn(ArrayOfBatchError.class, ArrayOfTypesMixIn.class) .addMixIn(ArrayOfOperationError.class, ArrayOfTypesMixIn.class) .addMixIn(ArrayOflong.class, ArrayOfTypesMixIn.class) diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/arrayOfTypes/ArrayOfTypesMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/arrayOfTypes/ArrayOfTypesMixIn.java index 334b58fb55..1a86a07134 100644 --- a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/arrayOfTypes/ArrayOfTypesMixIn.java +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/arrayOfTypes/ArrayOfTypesMixIn.java @@ -174,6 +174,14 @@ interface ArrayOfTypesMixIn{ List getAssetGroupReportScopes(); + @JsonValue + List getSearchInsightPerformanceReportColumns(); + + + @JsonValue + List getAssetPerformanceReportColumns(); + + @JsonValue List getBatchErrors(); diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/AddMixInForComplexTypesWithEnumList.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/AddMixInForComplexTypesWithEnumList.java index 9b069aca64..35c8b60650 100644 --- a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/AddMixInForComplexTypesWithEnumList.java +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/AddMixInForComplexTypesWithEnumList.java @@ -45,6 +45,7 @@ public static void AddMixInForComplexTypesWithEnumList() { .addMixIn(HotelDimensionPerformanceReportFilter.class, HotelDimensionPerformanceReportFilterEnumsMixIn.class) .addMixIn(HotelGroupPerformanceReportFilter.class, HotelGroupPerformanceReportFilterEnumsMixIn.class) .addMixIn(AssetGroupPerformanceReportFilter.class, AssetGroupPerformanceReportFilterEnumsMixIn.class) + .addMixIn(SearchInsightPerformanceReportFilter.class, SearchInsightPerformanceReportFilterEnumsMixIn.class) ; } } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/AddMixInForEnumTypes.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/AddMixInForEnumTypes.java index 8bf0219126..6b15da90f4 100644 --- a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/AddMixInForEnumTypes.java +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/AddMixInForEnumTypes.java @@ -69,6 +69,8 @@ public static void AddMixInForEnumTypes() { .addMixIn(HotelDimensionPerformanceReportColumn.class, HotelDimensionPerformanceReportColumnMixIn.class) .addMixIn(HotelGroupPerformanceReportColumn.class, HotelGroupPerformanceReportColumnMixIn.class) .addMixIn(AssetGroupPerformanceReportColumn.class, AssetGroupPerformanceReportColumnMixIn.class) + .addMixIn(SearchInsightPerformanceReportColumn.class, SearchInsightPerformanceReportColumnMixIn.class) + .addMixIn(AssetPerformanceReportColumn.class, AssetPerformanceReportColumnMixIn.class) .addMixIn(ReportRequestStatusType.class, ReportRequestStatusTypeMixIn.class) ; } diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/AssetPerformanceReportColumnMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/AssetPerformanceReportColumnMixIn.java new file mode 100644 index 0000000000..b9a380cc7f --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/AssetPerformanceReportColumnMixIn.java @@ -0,0 +1,24 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.reporting.enums; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.microsoft.bingads.v13.reporting.*; +import com.microsoft.bingads.internal.restful.adaptor.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public interface AssetPerformanceReportColumnMixIn{ + + @JsonValue + String value(); + + @JsonCreator + AssetPerformanceReportColumn fromValue(String v); + + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/SearchInsightPerformanceReportColumnMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/SearchInsightPerformanceReportColumnMixIn.java new file mode 100644 index 0000000000..4ac1f59b5c --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/SearchInsightPerformanceReportColumnMixIn.java @@ -0,0 +1,24 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.reporting.enums; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.microsoft.bingads.v13.reporting.*; +import com.microsoft.bingads.internal.restful.adaptor.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public interface SearchInsightPerformanceReportColumnMixIn{ + + @JsonValue + String value(); + + @JsonCreator + SearchInsightPerformanceReportColumn fromValue(String v); + + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/SearchInsightPerformanceReportFilterEnumsMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/SearchInsightPerformanceReportFilterEnumsMixIn.java new file mode 100644 index 0000000000..2474ea8c5b --- /dev/null +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/enums/SearchInsightPerformanceReportFilterEnumsMixIn.java @@ -0,0 +1,36 @@ +package com.microsoft.bingads.internal.restful.adaptor.generated.reporting.enums; + +import java.util.Collection; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.microsoft.bingads.v13.reporting.*; +import com.microsoft.bingads.internal.restful.adaptor.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +public interface SearchInsightPerformanceReportFilterEnumsMixIn{ + + @JsonSerialize(using = EnumListSerializer.class) + @JsonDeserialize(using = AccountStatusReportFilterDeserializer.class) + Collection getAccountStatus(); + + + @JsonSerialize(using = EnumListSerializer.class) + @JsonDeserialize(using = AdGroupStatusReportFilterDeserializer.class) + Collection getAdGroupStatus(); + + + @JsonSerialize(using = EnumListSerializer.class) + @JsonDeserialize(using = AssetGroupStatusReportFilterDeserializer.class) + Collection getAssetGroupStatus(); + + + @JsonSerialize(using = EnumListSerializer.class) + @JsonDeserialize(using = CampaignStatusReportFilterDeserializer.class) + Collection getCampaignStatus(); + + } \ No newline at end of file diff --git a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/polymorphicTypes/ReportRequestPolymorphicTypesMixIn.java b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/polymorphicTypes/ReportRequestPolymorphicTypesMixIn.java index 2aa2487aaa..1cb8975a13 100644 --- a/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/polymorphicTypes/ReportRequestPolymorphicTypesMixIn.java +++ b/src/main/java/com/microsoft/bingads/internal/restful/adaptor/generated/reporting/polymorphicTypes/ReportRequestPolymorphicTypesMixIn.java @@ -90,6 +90,10 @@ @JsonSubTypes.Type(value = HotelGroupPerformanceReportRequest.class, name = "HotelGroupPerformanceReportRequest"), @JsonSubTypes.Type(value = AssetGroupPerformanceReportRequest.class, name = "AssetGroupPerformanceReportRequest"), + + @JsonSubTypes.Type(value = SearchInsightPerformanceReportRequest.class, name = "SearchInsightPerformanceReportRequest"), + + @JsonSubTypes.Type(value = AssetPerformanceReportRequest.class, name = "AssetPerformanceReportRequest"), }) @JsonInclude(JsonInclude.Include.NON_NULL) diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAccountNegativeKeywordList.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAccountNegativeKeywordList.java index ef1a4f26d0..c95b056534 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAccountNegativeKeywordList.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAccountNegativeKeywordList.java @@ -79,7 +79,7 @@ public void accept(String v, BulkAccountNegativeKeywordList c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAccountNegativeKeywordListAssociation.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAccountNegativeKeywordListAssociation.java index b7810b4659..7bc3f561e8 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAccountNegativeKeywordListAssociation.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAccountNegativeKeywordListAssociation.java @@ -59,7 +59,7 @@ public void accept(String v, BulkAccountNegativeKeywordListAssociation c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkActionAdExtension.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkActionAdExtension.java index 6bf2e3a483..966d761149 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkActionAdExtension.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkActionAdExtension.java @@ -71,7 +71,7 @@ public void accept(String v, BulkActionAdExtension c) { c.getActionAdExtension().setActionType(StringExtensions.parseOptional(v, new Function() { @Override public ActionAdExtensionActionType apply(String value) { - return ActionAdExtensionActionType.fromValue(value); + return StringExtensions.fromValueOptional(value, ActionAdExtensionActionType.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAd.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAd.java index 065196c631..6b5c4f7475 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAd.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAd.java @@ -61,7 +61,7 @@ public void accept(String v, BulkAd c) { c.getAd().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public AdStatus apply(String value) { - return AdStatus.fromValue(value); + return StringExtensions.fromValueOptional(value, AdStatus.class); } })); } @@ -151,7 +151,7 @@ public void accept(String v, BulkAd c) { c.getAd().setEditorialStatus(StringExtensions.parseOptional(v, new Function() { @Override public AdEditorialStatus apply(String value) { - return AdEditorialStatus.fromValue(value); + return StringExtensions.fromValueOptional(value, AdEditorialStatus.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdCustomizerAttribute.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdCustomizerAttribute.java index 7f015c85d0..fca43ca9e7 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdCustomizerAttribute.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdCustomizerAttribute.java @@ -108,7 +108,7 @@ public void accept(String v, BulkAdCustomizerAttribute t) { t.setDataType(StringExtensions.parseOptional(v, new Function() { @Override public AttributeType apply(String value) { - return AttributeType.fromValue(value); + return StringExtensions.fromValueOptional(value, AttributeType.class); } })); } @@ -128,7 +128,7 @@ public void accept(String v, BulkAdCustomizerAttribute t) { t.setEditorialStatus(StringExtensions.parseOptional(v, new Function() { @Override public EditorialStatus apply(String value) { - return EditorialStatus.fromValue(value); + return StringExtensions.fromValueOptional(value, EditorialStatus.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdCustomizerAttributeEntityBase.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdCustomizerAttributeEntityBase.java index 1ecd6e9443..43aa423ff7 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdCustomizerAttributeEntityBase.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdCustomizerAttributeEntityBase.java @@ -117,7 +117,7 @@ public void accept(String v, BulkAdCustomizerAttributeEntityBase c) { c.setEditorialStatus(StringExtensions.parseOptional(v, new Function() { @Override public EditorialStatus apply(String value) { - return EditorialStatus.fromValue(value); + return StringExtensions.fromValueOptional(value, EditorialStatus.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdExtension.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdExtension.java index e3c40c339b..796845efcd 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdExtension.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdExtension.java @@ -88,7 +88,7 @@ public void accept(String v, BulkAdExtension c) { c.getAdExtension().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public AdExtensionStatus apply(String value) { - return AdExtensionStatus.fromValue(value); + return StringExtensions.fromValueOptional(value, AdExtensionStatus.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdExtensionAssociation.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdExtensionAssociation.java index fa0fd98c83..a7101de0f9 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdExtensionAssociation.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdExtensionAssociation.java @@ -50,7 +50,7 @@ public void accept(String v, BulkAdExtensionAssociation c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } @@ -110,7 +110,7 @@ public void accept(String v, BulkAdExtensionAssociation c) { c.setEditorialStatus(StringExtensions.parseOptional(v, new Function() { @Override public AdExtensionEditorialStatus apply(String value) { - return AdExtensionEditorialStatus.fromValue(value); + return StringExtensions.fromValueOptional(value, AdExtensionEditorialStatus.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroup.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroup.java index 5a1e7a0454..39b0e0cd1f 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroup.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroup.java @@ -98,7 +98,7 @@ public void accept(String v, BulkAdGroup c) { c.getAdGroup().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public AdGroupStatus apply(String value) { - return AdGroupStatus.fromValue(value); + return StringExtensions.fromValueOptional(value, AdGroupStatus.class); } })); } @@ -206,7 +206,7 @@ public void accept(String v, BulkAdGroup c) { c.getAdGroup().setNetwork(StringExtensions.parseOptional(v, new Function() { @Override public Network apply(String value) { - return Network.fromValue(value); + return StringExtensions.fromValueOptional(value, Network.class); } })); } @@ -376,7 +376,7 @@ public void accept(String v, BulkAdGroup c) { c.getAdGroup().setPrivacyStatus(StringExtensions.parseOptional(v, new Function() { @Override public AdGroupPrivacyStatus apply(String value) { - return AdGroupPrivacyStatus.fromValue(value); + return StringExtensions.fromValueOptional(value, AdGroupPrivacyStatus.class); } })); } @@ -670,7 +670,7 @@ private static void csvToCoOpSetting(RowValues values, BulkAdGroup c) { BidOption bo = StringExtensions.parseOptional(values.tryGet(StringTable.BidOption), new Function() { @Override public BidOption apply(String value) { - return BidOption.fromValue(value); + return StringExtensions.fromValueOptional(value, BidOption.class); } }); Double boostValue = StringExtensions.parseOptional(values.tryGet(StringTable.BidBoostValue), new Function() { diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupAgeCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupAgeCriterion.java index 1d492b8b7f..195d47ef69 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupAgeCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupAgeCriterion.java @@ -59,7 +59,7 @@ public void accept(String v, BulkAdGroupAgeCriterion c) { ((AgeCriterion)c.getBiddableAdGroupCriterion().getCriterion()).setAgeRange(StringExtensions.parseOptional(v, new Function() { @Override public AgeRange apply(String s) { - return AgeRange.fromValue(s); + return StringExtensions.fromValueOptional(s, AgeRange.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupBiddableCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupBiddableCriterion.java index 0d68bf3322..197d505cf1 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupBiddableCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupBiddableCriterion.java @@ -61,7 +61,7 @@ public void accept(String v, BulkAdGroupBiddableCriterion c) { c.getBiddableAdGroupCriterion().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public AdGroupCriterionStatus apply(String s) { - return AdGroupCriterionStatus.fromValue(s); + return StringExtensions.fromValueOptional(s, AdGroupCriterionStatus.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupCriterion.java index 124bddaf6d..dc989927ae 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupCriterion.java @@ -165,7 +165,7 @@ public void accept(String v, BulkAdGroupCriterion c) { c.getAdGroupCriterion().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public AdGroupCriterionStatus apply(String s) { - return AdGroupCriterionStatus.fromValue(s); + return StringExtensions.fromValueOptional(s, AdGroupCriterionStatus.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupDayTimeCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupDayTimeCriterion.java index 1d309b8ba2..2e608e91df 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupDayTimeCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupDayTimeCriterion.java @@ -60,7 +60,7 @@ public void accept(String v, BulkAdGroupDayTimeCriterion c) { ((DayTimeCriterion)c.getBiddableAdGroupCriterion().getCriterion()).setDay(StringExtensions.parseOptional(v, new Function() { @Override public Day apply(String s) { - return Day.fromValue(s); + return StringExtensions.fromValueOptional(s, Day.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupDynamicSearchAdTarget.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupDynamicSearchAdTarget.java index dccbdd1575..14694544b3 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupDynamicSearchAdTarget.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupDynamicSearchAdTarget.java @@ -68,7 +68,7 @@ public void accept(String v, BulkAdGroupDynamicSearchAdTarget c) { c.getBiddableAdGroupCriterion().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public AdGroupCriterionStatus apply(String s) { - return AdGroupCriterionStatus.fromValue(s); + return StringExtensions.fromValueOptional(s, AdGroupCriterionStatus.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupGenderCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupGenderCriterion.java index 291d8bc128..1957efd41c 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupGenderCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupGenderCriterion.java @@ -60,7 +60,7 @@ public void accept(String v, BulkAdGroupGenderCriterion c) { ((GenderCriterion)c.getBiddableAdGroupCriterion().getCriterion()).setGenderType(StringExtensions.parseOptional(v, new Function() { @Override public GenderType apply(String s) { - return GenderType.fromValue(s); + return StringExtensions.fromValueOptional(s, GenderType.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupHotelCheckInDayCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupHotelCheckInDayCriterion.java index 71acb4977a..c0cd88725e 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupHotelCheckInDayCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupHotelCheckInDayCriterion.java @@ -60,7 +60,7 @@ public void accept(String v, BulkAdGroupHotelCheckInDayCriterion c) { .setCheckInDay(StringExtensions.parseOptional(v, new Function() { @Override public Day apply(String t) { - return Day.fromValue(t); + return StringExtensions.fromValueOptional(t, Day.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupHotelDateSelectionTypeCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupHotelDateSelectionTypeCriterion.java index 711bd32ccb..8a7139d8ed 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupHotelDateSelectionTypeCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupHotelDateSelectionTypeCriterion.java @@ -59,7 +59,7 @@ public void accept(String v, BulkAdGroupHotelDateSelectionTypeCriterion c) { .setHotelDateSelectionType(StringExtensions.parseOptional(v, new Function() { @Override public HotelDateSelectionType apply(String t) { - return HotelDateSelectionType.fromValue(t); + return StringExtensions.fromValueOptional(t, HotelDateSelectionType.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupHotelListingGroup.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupHotelListingGroup.java index 35fc83826c..3cd6040994 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupHotelListingGroup.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupHotelListingGroup.java @@ -67,7 +67,7 @@ public void accept(String v, BulkAdGroupHotelListingGroup c) { StringExtensions.parseOptional(v, new Function() { @Override public HotelListingType apply(String s) { - return HotelListingType.fromValue(s); + return StringExtensions.fromValueOptional(s, HotelListingType.class); } }) ); diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupImpressionBasedRemarketingListAssociation.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupImpressionBasedRemarketingListAssociation.java new file mode 100644 index 0000000000..8fc2155685 --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupImpressionBasedRemarketingListAssociation.java @@ -0,0 +1,22 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; + +/** + * Represents an Ad Group Impression Based Remarketing List Association that can be read or written in a bulk file. + *

+ *

+ * For more information, see Ad Group Impression Based Remarketing List Association at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkAdGroupImpressionBasedRemarketingListAssociation extends BulkAdGroupAudienceAssociation { +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupLocationIntentCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupLocationIntentCriterion.java index 9fd75bdd41..8d9b118d57 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupLocationIntentCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupLocationIntentCriterion.java @@ -63,7 +63,7 @@ public void accept(String v, BulkAdGroupLocationIntentCriterion c) { c.getBiddableAdGroupCriterion().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public AdGroupCriterionStatus apply(String s) { - return AdGroupCriterionStatus.fromValue(s); + return StringExtensions.fromValueOptional(s, AdGroupCriterionStatus.class); } })); } @@ -158,7 +158,7 @@ public void accept(String v, BulkAdGroupLocationIntentCriterion c) { ((LocationIntentCriterion)c.getBiddableAdGroupCriterion().getCriterion()).setIntentOption(StringExtensions.parseOptional(v, new Function() { @Override public IntentOption apply(String s) { - return IntentOption.fromValue(s); + return StringExtensions.fromValueOptional(s, IntentOption.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeAgeCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeAgeCriterion.java index 93b187f3ae..0771f0384b 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeAgeCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeAgeCriterion.java @@ -60,7 +60,7 @@ public void accept(String v, BulkAdGroupNegativeAgeCriterion c) { .setAgeRange(StringExtensions.parseOptional(v, new Function() { @Override public AgeRange apply(String s) { - return AgeRange.fromValue(s); + return StringExtensions.fromValueOptional(s, AgeRange.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeCriterion.java index b70f4bb1ab..d62d3e4267 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeCriterion.java @@ -57,7 +57,7 @@ public void accept(String v, BulkAdGroupNegativeCriterion c) { c.getNegativeAdGroupCriterion().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public AdGroupCriterionStatus apply(String s) { - return AdGroupCriterionStatus.fromValue(s); + return StringExtensions.fromValueOptional(s, AdGroupCriterionStatus.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeDynamicSearchAdTarget.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeDynamicSearchAdTarget.java index 5e7470e59d..8dd1095c4e 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeDynamicSearchAdTarget.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeDynamicSearchAdTarget.java @@ -66,7 +66,7 @@ public void accept(String v, BulkAdGroupNegativeDynamicSearchAdTarget c) { c.getNegativeAdGroupCriterion().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public AdGroupCriterionStatus apply(String s) { - return AdGroupCriterionStatus.fromValue(s); + return StringExtensions.fromValueOptional(s, AdGroupCriterionStatus.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeGenderCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeGenderCriterion.java index 1a72ff9123..3ec1d14106 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeGenderCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeGenderCriterion.java @@ -58,7 +58,7 @@ public void accept(String v, BulkAdGroupNegativeGenderCriterion c) { StringExtensions.parseOptional(v, new Function() { @Override public GenderType apply(String s) { - return GenderType.fromValue(s); + return StringExtensions.fromValueOptional(s, GenderType.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeImpressionBasedRemarketingListAssociation.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeImpressionBasedRemarketingListAssociation.java new file mode 100644 index 0000000000..a7060ba9cf --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupNegativeImpressionBasedRemarketingListAssociation.java @@ -0,0 +1,22 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; + +/** + * Represents a Ad Group Negative Impression Based Remarketing List Association that can be read or written in a bulk file. + *

+ *

+ * For more information, see Ad Group Negative Impression Based Remarketing List Association at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkAdGroupNegativeImpressionBasedRemarketingListAssociation extends BulkAdGroupNegativeAudienceAssociation { +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupProductPartition.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupProductPartition.java index 269356cb9f..4903699585 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupProductPartition.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupProductPartition.java @@ -67,7 +67,7 @@ public void accept(String v, BulkAdGroupProductPartition c) { StringExtensions.parseOptional(v, new Function() { @Override public ProductPartitionType apply(String s) { - return ProductPartitionType.fromValue(s); + return StringExtensions.fromValueOptional(s, ProductPartitionType.class); } }) ); diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupRadiusCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupRadiusCriterion.java index 68f1e77e09..c1004b3d08 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupRadiusCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAdGroupRadiusCriterion.java @@ -141,7 +141,7 @@ public void accept(String v, BulkAdGroupRadiusCriterion c) { ((RadiusCriterion)c.getBiddableAdGroupCriterion().getCriterion()).setRadiusUnit(StringExtensions.parseOptional(v, new Function() { @Override public DistanceUnit apply(String s) { - return DistanceUnit.fromValue(s); + return StringExtensions.fromValueOptional(s, DistanceUnit.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAppInstallGoal.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAppInstallGoal.java new file mode 100644 index 0000000000..4198c84b98 --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAppInstallGoal.java @@ -0,0 +1,109 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; +import com.microsoft.bingads.v13.campaignmanagement.AppInstallGoal; +import com.microsoft.bingads.v13.internal.bulk.BulkMapping; +import com.microsoft.bingads.v13.internal.bulk.MappingHelpers; +import com.microsoft.bingads.v13.internal.bulk.RowValues; +import com.microsoft.bingads.v13.internal.bulk.SimpleBulkMapping; +import com.microsoft.bingads.v13.internal.bulk.StringTable; + +/** + * Represents a appinstall goal that can be read or written in a bulk file. + * + * This class exposes the {@link BulkAppInstallGoal#setAppInstallGoal} and {@link BulkAppInstallGoal#getAppInstallGoal} + * methods that can be used to read and write fields of the AppInstall Goal record in a bulk file. + * + *

+ * For more information, see AppInstall Goal at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkAppInstallGoal extends BulkConversionGoal { + + + private static final List> MAPPINGS; + + static { + List> m = new ArrayList>(); + + m.add(new SimpleBulkMapping(StringTable.AppPlatform, + new Function() { + @Override + public String apply(BulkAppInstallGoal c) { + return c.getAppInstallGoal().getAppPlatform(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkAppInstallGoal c) { + c.getAppInstallGoal().setAppPlatform(v); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.AppStoreId, + new Function() { + @Override + public String apply(BulkAppInstallGoal c) { + return c.getAppInstallGoal().getAppStoreId(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkAppInstallGoal c) { + c.getAppInstallGoal().setAppStoreId(v); + } + } + )); + + MAPPINGS = Collections.unmodifiableList(m); + } + + @Override + public void processMappingsFromRowValues(RowValues values) { + super.processMappingsFromRowValues(values); + + MappingHelpers.convertToEntity(values, MAPPINGS, this); + } + + @Override + public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { + super.processMappingsToRowValues(values, excludeReadonlyData); + MappingHelpers.convertToValues(this, values, MAPPINGS); + } + + /** + * Get the appinstall goal. + */ + public AppInstallGoal getAppInstallGoal() { + return this.getConversionGoal(); + } + + /** + * Set the appinstall goal. + */ + public void setAppInstallGoal(AppInstallGoal AppInstallGoal) { + this.setConversionGoal(AppInstallGoal); + } + + @Override + public AppInstallGoal createConversionGoal() { + return new AppInstallGoal(); + } + +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAssetGroup.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAssetGroup.java index d9577a051a..842f80d18e 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAssetGroup.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAssetGroup.java @@ -86,7 +86,7 @@ public void accept(String v, BulkAssetGroup c) { c.getAssetGroup().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public AssetGroupStatus apply(String value) { - return AssetGroupStatus.fromValue(value); + return StringExtensions.fromValueOptional(value, AssetGroupStatus.class); } })); } @@ -209,7 +209,7 @@ public void accept(String v, BulkAssetGroup c) { c.getAssetGroup().setCallToAction(StringExtensions.parseOptional(v, new Function() { @Override public CallToAction apply(String value) { - return CallToAction.fromValue(value); + return StringExtensions.fromValueOptional(value, CallToAction.class); } })); } @@ -244,7 +244,7 @@ public void accept(String v, BulkAssetGroup c) { c.getAssetGroup().setEditorialStatus(StringExtensions.parseOptional(v, new Function() { @Override public AssetGroupEditorialStatus apply(String value) { - return AssetGroupEditorialStatus.fromValue(value); + return StringExtensions.fromValueOptional(value, AssetGroupEditorialStatus.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAssetGroupListingGroup.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAssetGroupListingGroup.java index f8c5fb87b0..25dd88c329 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAssetGroupListingGroup.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAssetGroupListingGroup.java @@ -67,7 +67,7 @@ public void accept(String v, BulkAssetGroupListingGroup c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } @@ -182,7 +182,7 @@ public void accept(String v, BulkAssetGroupListingGroup c) { c.getAssetGroupListingGroup().setAssetGroupListingType(StringExtensions.parseOptional(v, new Function() { @Override public AssetGroupListingType apply(String value) { - return AssetGroupListingType.fromValue(value); + return StringExtensions.fromValueOptional(value, AssetGroupListingType.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAssetGroupSearchTheme.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAssetGroupSearchTheme.java new file mode 100644 index 0000000000..378477f5fd --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAssetGroupSearchTheme.java @@ -0,0 +1,129 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; +import com.microsoft.bingads.v13.campaignmanagement.AssetGroupSearchTheme; +import com.microsoft.bingads.v13.internal.bulk.BulkMapping; +import com.microsoft.bingads.v13.internal.bulk.MappingHelpers; +import com.microsoft.bingads.v13.internal.bulk.RowValues; +import com.microsoft.bingads.v13.internal.bulk.SimpleBulkMapping; +import com.microsoft.bingads.v13.internal.bulk.StringExtensions; +import com.microsoft.bingads.v13.internal.bulk.StringTable; +import com.microsoft.bingads.v13.internal.bulk.entities.SingleRecordBulkEntity; + +/** + * Represents an Asset Group Search Theme. + *

+ *

+ * This class exposes the {@link #setAssetGroupSearchTheme} and {@link #getAssetGroupSearchTheme} that can be used to read and write + * fields of the Audience Group Asset Group Association record in a bulk file. + *

+ *

+ *

+ * For more information, see Asset Group Search Theme at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkAssetGroupSearchTheme extends SingleRecordBulkEntity { + + private AssetGroupSearchTheme AssetGroupSearchTheme; + + private Long assetGroupId; + + private static final List> MAPPINGS; + + static { + List> m = new ArrayList>(); + + m.add(new SimpleBulkMapping(StringTable.Id, + new Function() { + @Override + public Long apply(BulkAssetGroupSearchTheme c) { + return c.getAssetGroupSearchTheme().getId(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkAssetGroupSearchTheme c) { + c.getAssetGroupSearchTheme().setId(StringExtensions.nullOrLong(v)); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.ParentId, + new Function() { + @Override + public Long apply(BulkAssetGroupSearchTheme c) { + return c.getAssetGroupId(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkAssetGroupSearchTheme c) { + c.setAssetGroupId(StringExtensions.nullOrLong(v)); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.SearchTheme, + new Function() { + @Override + public String apply(BulkAssetGroupSearchTheme c) { + return c.getAssetGroupSearchTheme().getSearchTheme(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkAssetGroupSearchTheme c) { + c.getAssetGroupSearchTheme().setSearchTheme(v); + } + } + )); + + MAPPINGS = Collections.unmodifiableList(m); + } + + @Override + public void processMappingsFromRowValues(RowValues values) { + AssetGroupSearchTheme AssetGroupSearchTheme = new AssetGroupSearchTheme(); + this.setAssetGroupSearchTheme(AssetGroupSearchTheme); + + MappingHelpers.convertToEntity(values, MAPPINGS, this); + } + + @Override + public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { + validatePropertyNotNull(getAssetGroupSearchTheme(), "AssetGroupSearchTheme"); + + MappingHelpers.convertToValues(this, values, MAPPINGS); + } + + public AssetGroupSearchTheme getAssetGroupSearchTheme() { + return AssetGroupSearchTheme; + } + + public void setAssetGroupSearchTheme(AssetGroupSearchTheme AssetGroupSearchTheme) { + this.AssetGroupSearchTheme = AssetGroupSearchTheme; + } + + public Long getAssetGroupId() { + return assetGroupId; + } + + public void setAssetGroupId(Long assetGroupId) { + this.assetGroupId = assetGroupId; + } +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAudience.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAudience.java index 914811e08d..55a3290edd 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAudience.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAudience.java @@ -60,7 +60,7 @@ public void accept(String v, BulkAudience c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } @@ -190,7 +190,7 @@ public void accept(String v, BulkAudience c) { c.getAudience().setScope(StringExtensions.parseOptional(v, new Function() { @Override public EntityScope apply(String value) { - return EntityScope.fromValue(value); + return StringExtensions.fromValueOptional(value, EntityScope.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAudienceGroup.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAudienceGroup.java index b070d3a16d..967848b61b 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAudienceGroup.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAudienceGroup.java @@ -80,7 +80,7 @@ public void accept(String v, BulkAudienceGroup c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAudienceGroupAssetGroupAssociation.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAudienceGroupAssetGroupAssociation.java index c2a6f88efb..4a00e74513 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAudienceGroupAssetGroupAssociation.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkAudienceGroupAssetGroupAssociation.java @@ -65,7 +65,7 @@ public void accept(String v, BulkAudienceGroupAssetGroupAssociation c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkBidStrategy.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkBidStrategy.java index 4af0aa4a70..bfaa5a975d 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkBidStrategy.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkBidStrategy.java @@ -98,7 +98,7 @@ public void accept(String v, BulkBidStrategy c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } @@ -144,7 +144,7 @@ public void accept(String v, BulkBidStrategy c) { c.getBidStrategy().setAssociatedCampaignType(StringExtensions.parseOptional(v, new Function>() { @Override public Collection apply(String value) { - return Collections.singletonList(CampaignType.fromValue(v)); + return Collections.singletonList(StringExtensions.fromValueOptional(v, CampaignType.class)); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkBrandItem.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkBrandItem.java new file mode 100644 index 0000000000..0b4efdcedf --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkBrandItem.java @@ -0,0 +1,293 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collections; +import java.util.GregorianCalendar; +import java.util.List; +import java.util.TimeZone; + +import com.microsoft.bingads.internal.UncheckedParseException; +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; +import com.microsoft.bingads.v13.campaignmanagement.BrandItem; +import com.microsoft.bingads.v13.internal.bulk.BulkMapping; +import com.microsoft.bingads.v13.internal.bulk.MappingHelpers; +import com.microsoft.bingads.v13.internal.bulk.RowValues; +import com.microsoft.bingads.v13.internal.bulk.SimpleBulkMapping; +import com.microsoft.bingads.v13.internal.bulk.StringExtensions; +import com.microsoft.bingads.v13.internal.bulk.StringTable; +import com.microsoft.bingads.v13.internal.bulk.entities.SingleRecordBulkEntity; + +/** + * Represents a Brand Item. + *

+ *

+ * This class exposes the {@link #setBrandItem} and {@link #getBrandItem} that can be used to read and write + * fields of the Brand Item record in a bulk file. + *

+ *

+ *

+ * For more information, see Brand Item at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkBrandItem extends SingleRecordBulkEntity { + + private Long id; + + private Long brandListId; + + private String name; + + private String brandName; + + private String brandUrl; + + private String editorialStatus; + + private Calendar editorialStatusDate; + + private BrandItem brandItem; + + private static final List> MAPPINGS; + + static { + List> m = new ArrayList>(); + + m.add(new SimpleBulkMapping(StringTable.Id, + new Function() { + @Override + public Long apply(BulkBrandItem c) { + return c.getId(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkBrandItem c) { + c.setId(StringExtensions.nullOrLong(v)); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.ParentId, + new Function() { + @Override + public Long apply(BulkBrandItem c) { + return c.getBrandListId(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkBrandItem c) { + c.setBrandListId(StringExtensions.nullOrLong(v)); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.Name, + new Function() { + @Override + public String apply(BulkBrandItem c) { + return c.getName(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkBrandItem c) { + c.setName(v); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.BrandId, + new Function() { + @Override + public Long apply(BulkBrandItem c) { + return c.getBrandItem().getBrandId(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkBrandItem c) { + c.getBrandItem().setBrandId(StringExtensions.nullOrLong(v)); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.BrandName, + new Function() { + @Override + public String apply(BulkBrandItem c) { + return c.getBrandName(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkBrandItem c) { + c.setBrandName(v); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.BrandUrl, + new Function() { + @Override + public String apply(BulkBrandItem c) { + return c.getBrandUrl(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkBrandItem c) { + c.setBrandUrl(v); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.EditorialStatus, + new Function() { + @Override + public String apply(BulkBrandItem c) { + return c.getEditorialStatus(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkBrandItem c) { + c.setEditorialStatus(v); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.StatusDateTime, + new Function() { + @Override + public String apply(BulkBrandItem t) { + if (t.getEditorialStatusDate() == null) { + return null; + } + + SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); + format.setTimeZone(TimeZone.getTimeZone("UTC")); + + return format.format(t.getEditorialStatusDate().getTime()); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkBrandItem c) { + c.setEditorialStatusDate(StringExtensions.parseOptional(v, new Function() { + @Override + public Calendar apply(String t) { + Calendar c = new GregorianCalendar(); + try { + SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); + format.setTimeZone(TimeZone.getTimeZone("UTC")); + + c.setTime(format.parse(t)); + } catch (ParseException ex) { + throw new UncheckedParseException(ex); + } + + return c; + } + })); + } + } + )); + + + MAPPINGS = Collections.unmodifiableList(m); + } + + @Override + public void processMappingsFromRowValues(RowValues values) { + BrandItem BrandItem = new BrandItem(); + this.setBrandItem(BrandItem); + + MappingHelpers.convertToEntity(values, MAPPINGS, this); + } + + @Override + public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { + validatePropertyNotNull(getBrandItem(), "BrandItem"); + + MappingHelpers.convertToValues(this, values, MAPPINGS); + } + + public BrandItem getBrandItem() { + return brandItem; + } + + public void setBrandItem(BrandItem brandItem) { + this.brandItem = brandItem; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getBrandListId() { + return brandListId; + } + + public void setBrandListId(Long brandListId) { + this.brandListId = brandListId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getBrandName() { + return brandName; + } + + public void setBrandName(String brandName) { + this.brandName = brandName; + } + + public String getBrandUrl() { + return brandUrl; + } + + public void setBrandUrl(String brandUrl) { + this.brandUrl = brandUrl; + } + + public String getEditorialStatus() { + return editorialStatus; + } + + public void setEditorialStatus(String editorialStatus) { + this.editorialStatus = editorialStatus; + } + + public Calendar getEditorialStatusDate() { + return editorialStatusDate; + } + + public void setEditorialStatusDate(Calendar editorialStatusDate) { + this.editorialStatusDate = editorialStatusDate; + } +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkBrandList.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkBrandList.java new file mode 100644 index 0000000000..ccb5ec245f --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkBrandList.java @@ -0,0 +1,133 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; +import com.microsoft.bingads.v13.campaignmanagement.BrandList; +import com.microsoft.bingads.v13.internal.bulk.BulkMapping; +import com.microsoft.bingads.v13.internal.bulk.MappingHelpers; +import com.microsoft.bingads.v13.internal.bulk.RowValues; +import com.microsoft.bingads.v13.internal.bulk.SimpleBulkMapping; +import com.microsoft.bingads.v13.internal.bulk.StringExtensions; +import com.microsoft.bingads.v13.internal.bulk.StringTable; +import com.microsoft.bingads.v13.internal.bulk.entities.SingleRecordBulkEntity; + +/** + * Represents a Brand List. + *

+ *

+ * This class exposes the {@link #setBrandList} and {@link #getBrandList} that can be used to read and write + * fields of the Brand List record in a bulk file. + *

+ *

+ *

+ * For more information, see Brand List at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkBrandList extends SingleRecordBulkEntity { + + private Long accountId; + + private BrandList brandList; + + private static final List> MAPPINGS; + + static { + List> m = new ArrayList>(); + + m.add(new SimpleBulkMapping(StringTable.Id, + new Function() { + @Override + public Long apply(BulkBrandList c) { + return c.getBrandList().getId(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkBrandList c) { + c.getBrandList().setId(StringExtensions.nullOrLong(v)); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.ParentId, + new Function() { + @Override + public Long apply(BulkBrandList c) { + return c.getAccountId(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkBrandList c) { + c.setAccountId(StringExtensions.nullOrLong(v)); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.Name, + new Function() { + @Override + public String apply(BulkBrandList c) { + return c.getBrandList().getName(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkBrandList c) { + c.getBrandList().setName(v); + } + } + )); + + + + + MAPPINGS = Collections.unmodifiableList(m); + } + + @Override + public void processMappingsFromRowValues(RowValues values) { + BrandList BrandList = new BrandList(); + this.setBrandList(BrandList); + + MappingHelpers.convertToEntity(values, MAPPINGS, this); + } + + @Override + public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { + validatePropertyNotNull(getBrandList(), "BrandList"); + + MappingHelpers.convertToValues(this, values, MAPPINGS); + } + + public BrandList getBrandList() { + return brandList; + } + + public void setBrandList(BrandList brandList) { + this.brandList = brandList; + } + + public Long getAccountId() { + return accountId; + } + + public void setAccountId(Long accountId) { + this.accountId = accountId; + } + +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkBudget.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkBudget.java index 83d3d261dd..dc268b45a0 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkBudget.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkBudget.java @@ -95,7 +95,7 @@ public void accept(String v, BulkBudget c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } @@ -130,7 +130,7 @@ public void accept(String v, BulkBudget c) { c.getBudget().setBudgetType(StringExtensions.parseOptional(v, new Function() { @Override public BudgetLimitType apply(String value) { - return BudgetLimitType.fromValue(value); + return StringExtensions.fromValueOptional(value, BudgetLimitType.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaign.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaign.java index d5f024c368..c170e1c4e4 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaign.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaign.java @@ -187,7 +187,7 @@ public void accept(RowValues values, BulkCampaign c) { BudgetLimitType budgetType = StringExtensions.parseOptional(budgetTypeRowValue, new Function() { @Override public BudgetLimitType apply(String value) { - return BudgetLimitType.fromValue(value); + return StringExtensions.fromValueOptional(value, BudgetLimitType.class); } }); @@ -236,7 +236,7 @@ public void accept(String v, BulkCampaign c) { CampaignType campaignType = StringExtensions.parseOptional(v, new Function() { @Override public CampaignType apply(String value) { - return CampaignType.fromValue(value); + return StringExtensions.fromValueOptional(value, CampaignType.class); } }); @@ -276,7 +276,7 @@ public void accept(String v, BulkCampaign c) { c.getCampaign().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public CampaignStatus apply(String value) { - return CampaignStatus.fromValue(value); + return StringExtensions.fromValueOptional(value, CampaignStatus.class); } })); } @@ -364,7 +364,7 @@ public void accept(String v, BulkCampaign c) { c.getCampaign().setBudgetType(StringExtensions.parseOptional(v, new Function() { @Override public BudgetLimitType apply(String value) { - return BudgetLimitType.fromValue(value); + return StringExtensions.fromValueOptional(value, BudgetLimitType.class); } })); } @@ -950,7 +950,7 @@ public void accept(String v, BulkCampaign c) { new Function() { @Override public DynamicSearchAdsSource apply(String value) { - return DynamicSearchAdsSource.fromValue(value); + return StringExtensions.fromValueOptional(value, DynamicSearchAdsSource.class); } } ) @@ -1189,6 +1189,32 @@ public void accept(String v, BulkCampaign c) { } )); + m.add(new SimpleBulkMapping(StringTable.CostPerSaleOptOut, + new Function() { + @Override + public Boolean apply(BulkCampaign t) { + Setting setting = t.getCampaignSetting(PerformanceMaxSetting.class, false); + + if (setting == null) { + return null; + } + PerformanceMaxSetting performMaxSetting = (PerformanceMaxSetting)setting; + return performMaxSetting.getCostPerSaleOptOut(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkCampaign c) { + Setting setting = c.getCampaignSetting(PerformanceMaxSetting.class, false); + + if (setting == null) { + return; + } + ((PerformanceMaxSetting)setting).setCostPerSaleOptOut(v == null ? null : Boolean.parseBoolean(v)); + } + } + )); + m.add(new SimpleBulkMapping(StringTable.ShouldServeOnMSAN, new Function() { @Override diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignAgeCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignAgeCriterion.java index 066c3569f0..11a8ddf9bd 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignAgeCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignAgeCriterion.java @@ -59,7 +59,7 @@ public void accept(String v, BulkCampaignAgeCriterion c) { ((AgeCriterion)c.getBiddableCampaignCriterion().getCriterion()).setAgeRange(StringExtensions.parseOptional(v, new Function() { @Override public AgeRange apply(String s) { - return AgeRange.fromValue(s); + return StringExtensions.fromValueOptional(s, AgeRange.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignBiddableCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignBiddableCriterion.java index 29f7691801..8f1d5259a1 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignBiddableCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignBiddableCriterion.java @@ -59,7 +59,7 @@ public void accept(String v, BulkCampaignBiddableCriterion c) { c.getBiddableCampaignCriterion().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public CampaignCriterionStatus apply(String s) { - return CampaignCriterionStatus.fromValue(s); + return StringExtensions.fromValueOptional(s, CampaignCriterionStatus.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignBrandListAssociation.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignBrandListAssociation.java new file mode 100644 index 0000000000..b74ea3975b --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignBrandListAssociation.java @@ -0,0 +1,160 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; +import com.microsoft.bingads.v13.internal.bulk.BulkMapping; +import com.microsoft.bingads.v13.internal.bulk.MappingHelpers; +import com.microsoft.bingads.v13.internal.bulk.RowValues; +import com.microsoft.bingads.v13.internal.bulk.SimpleBulkMapping; +import com.microsoft.bingads.v13.internal.bulk.StringExtensions; +import com.microsoft.bingads.v13.internal.bulk.StringTable; +import com.microsoft.bingads.v13.internal.bulk.entities.SingleRecordBulkEntity; + +/** + * Represents a Campaign Brand List Association. + *

+ *

+ * This class exposes the {@link #setCampaignBrandListAssociation} and {@link #getCampaignBrandListAssociation} that can be used to read and write + * fields of the Campaign Brand List Association record in a bulk file. + *

+ *

+ *

+ * For more information, see Campaign Brand List Association at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkCampaignBrandListAssociation extends SingleRecordBulkEntity { + + private Long id; + + private Long campaignId; + + private String name; + + private Boolean isExcluded; + + private static final List> MAPPINGS; + + static { + List> m = new ArrayList>(); + + m.add(new SimpleBulkMapping(StringTable.Id, + new Function() { + @Override + public Long apply(BulkCampaignBrandListAssociation c) { + return c.getId(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkCampaignBrandListAssociation c) { + c.setId(StringExtensions.nullOrLong(v)); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.ParentId, + new Function() { + @Override + public Long apply(BulkCampaignBrandListAssociation c) { + return c.getCampaignId(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkCampaignBrandListAssociation c) { + c.setCampaignId(StringExtensions.nullOrLong(v)); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.Name, + new Function() { + @Override + public String apply(BulkCampaignBrandListAssociation c) { + return c.getName(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkCampaignBrandListAssociation c) { + c.setName(v); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.IsExcluded, + new Function() { + @Override + public Boolean apply(BulkCampaignBrandListAssociation t) { + return t.getIsExcluded(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkCampaignBrandListAssociation c) { + c.setIsExcluded(v == null ? null : Boolean.parseBoolean(v)); + } + } + )); + + + MAPPINGS = Collections.unmodifiableList(m); + } + + @Override + public void processMappingsFromRowValues(RowValues values) { + MappingHelpers.convertToEntity(values, MAPPINGS, this); + } + + @Override + public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { + MappingHelpers.convertToValues(this, values, MAPPINGS); + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCampaignId() { + return campaignId; + } + + public void setCampaignId(Long campaignId) { + this.campaignId = campaignId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Boolean getIsExcluded() { + return isExcluded; + } + + public void setIsExcluded(Boolean isExcluded) { + this.isExcluded = isExcluded; + } + +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignDayTimeCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignDayTimeCriterion.java index f1492e72b1..15d55a307f 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignDayTimeCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignDayTimeCriterion.java @@ -60,7 +60,7 @@ public void accept(String v, BulkCampaignDayTimeCriterion c) { ((DayTimeCriterion)c.getBiddableCampaignCriterion().getCriterion()).setDay(StringExtensions.parseOptional(v, new Function() { @Override public Day apply(String s) { - return Day.fromValue(s); + return StringExtensions.fromValueOptional(s, Day.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignGenderCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignGenderCriterion.java index d2ab46bc27..cfb4bd7131 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignGenderCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignGenderCriterion.java @@ -60,7 +60,7 @@ public void accept(String v, BulkCampaignGenderCriterion c) { ((GenderCriterion)c.getBiddableCampaignCriterion().getCriterion()).setGenderType(StringExtensions.parseOptional(v, new Function() { @Override public GenderType apply(String s) { - return GenderType.fromValue(s); + return StringExtensions.fromValueOptional(s, GenderType.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignImpressionBasedRemarketingListAssociation.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignImpressionBasedRemarketingListAssociation.java new file mode 100644 index 0000000000..89b1b9b78c --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignImpressionBasedRemarketingListAssociation.java @@ -0,0 +1,22 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; + +/** + * Represents a Campaign Impression Based Remarketing List Association that can be read or written in a bulk file. + *

+ *

+ * For more information, see Campaign ImpressionBased Remarketing List Association at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkCampaignImpressionBasedRemarketingListAssociation extends BulkCampaignAudienceAssociation { +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignLocationIntentCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignLocationIntentCriterion.java index 526b34278b..af02da5c26 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignLocationIntentCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignLocationIntentCriterion.java @@ -61,7 +61,7 @@ public void accept(String v, BulkCampaignLocationIntentCriterion c) { c.getBiddableCampaignCriterion().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public CampaignCriterionStatus apply(String s) { - return CampaignCriterionStatus.fromValue(s); + return StringExtensions.fromValueOptional(s, CampaignCriterionStatus.class); } })); } @@ -136,7 +136,7 @@ public void accept(String v, BulkCampaignLocationIntentCriterion c) { ((LocationIntentCriterion)c.getBiddableCampaignCriterion().getCriterion()).setIntentOption(StringExtensions.parseOptional(v, new Function() { @Override public IntentOption apply(String s) { - return IntentOption.fromValue(s); + return StringExtensions.fromValueOptional(s, IntentOption.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeCriterion.java index af51bb6f1c..deaf7e2c86 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeCriterion.java @@ -55,7 +55,7 @@ public void accept(String v, BulkCampaignNegativeCriterion c) { c.getNegativeCampaignCriterion().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public CampaignCriterionStatus apply(String s) { - return CampaignCriterionStatus.fromValue(s); + return StringExtensions.fromValueOptional(s, CampaignCriterionStatus.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeDynamicSearchAdTarget.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeDynamicSearchAdTarget.java index 83d88685fd..0303791760 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeDynamicSearchAdTarget.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeDynamicSearchAdTarget.java @@ -62,7 +62,7 @@ public void accept(String v, BulkCampaignNegativeDynamicSearchAdTarget c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeImpressionBasedRemarketingListAssociation.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeImpressionBasedRemarketingListAssociation.java new file mode 100644 index 0000000000..452ed6c0e3 --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeImpressionBasedRemarketingListAssociation.java @@ -0,0 +1,22 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; + +/** + * Represents a Campaign Negative Impression Based Remarketing List Association that can be read or written in a bulk file. + *

+ *

+ * For more information, see Campaign Negative Impression Based Remarketing List Association at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkCampaignNegativeImpressionBasedRemarketingListAssociation extends BulkCampaignNegativeAudienceAssociation { +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeKeywordList.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeKeywordList.java index d9ab834ce0..b61edb675e 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeKeywordList.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeKeywordList.java @@ -59,7 +59,7 @@ public void accept(String v, BulkCampaignNegativeKeywordList c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeStoreCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeStoreCriterion.java index 1d9b94a285..56def1e188 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeStoreCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignNegativeStoreCriterion.java @@ -59,7 +59,7 @@ public void accept(String v, BulkCampaignNegativeStoreCriterion c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignProductScope.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignProductScope.java index 2b6875c57e..69c58cf9fe 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignProductScope.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignProductScope.java @@ -65,7 +65,7 @@ public void accept(String v, BulkCampaignProductScope c) { c.getBiddableCampaignCriterion().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public CampaignCriterionStatus apply(String s) { - return CampaignCriterionStatus.fromValue(s); + return StringExtensions.fromValueOptional(s, CampaignCriterionStatus.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignRadiusCriterion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignRadiusCriterion.java index c8f00d8775..0012829ada 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignRadiusCriterion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkCampaignRadiusCriterion.java @@ -142,7 +142,7 @@ public void accept(String v, BulkCampaignRadiusCriterion c) { ((RadiusCriterion)c.getBiddableCampaignCriterion().getCriterion()).setRadiusUnit(StringExtensions.parseOptional(v, new Function() { @Override public DistanceUnit apply(String s) { - return DistanceUnit.fromValue(s); + return StringExtensions.fromValueOptional(s, DistanceUnit.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkConversionGoal.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkConversionGoal.java new file mode 100644 index 0000000000..7987d8ced1 --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkConversionGoal.java @@ -0,0 +1,392 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoal; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalCategory; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalCountType; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalRevenue; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalRevenueType; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalStatus; +import com.microsoft.bingads.v13.campaignmanagement.EntityScope; +import com.microsoft.bingads.v13.campaignmanagement.AttributionModelType; +import com.microsoft.bingads.v13.internal.bulk.BulkMapping; +import com.microsoft.bingads.v13.internal.bulk.MappingHelpers; +import com.microsoft.bingads.v13.internal.bulk.RowValues; +import com.microsoft.bingads.v13.internal.bulk.SimpleBulkMapping; +import com.microsoft.bingads.v13.internal.bulk.StringExtensions; +import com.microsoft.bingads.v13.internal.bulk.StringTable; +import com.microsoft.bingads.v13.internal.bulk.entities.SingleRecordBulkEntity; + +/** + * Represents a basic ConversionGoal that can be read or written in a bulk file. + * + * This class exposes the {@link BulkConversionGoal#setConversionGoal} and {@link BulkConversionGoal#getConversionGoal} + * methods that can be used to read and write fields of the ConversionGoal record in a bulk file. + * + *

+ * For more information, see ConversionGoal at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public abstract class BulkConversionGoal extends SingleRecordBulkEntity { + + private T ConversionGoal; + + private static final List> MAPPINGS; + + static { + List> m = new ArrayList>(); + + m.add(new SimpleBulkMapping(StringTable.Status, + new Function() { + @Override + public String apply(BulkConversionGoal c) { + return c.getConversionGoal().getStatus() != null ? c.getConversionGoal().getStatus().value() : null; + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkConversionGoal c) { + c.getConversionGoal().setStatus(StringExtensions.parseOptional(v, new Function() { + @Override + public ConversionGoalStatus apply(String value) { + return StringExtensions.fromValueOptional(value, ConversionGoalStatus.class); + } + })); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.Id, + new Function() { + @Override + public Long apply(BulkConversionGoal c) { + return c.getConversionGoal().getId(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkConversionGoal c) { + c.getConversionGoal().setId(StringExtensions.parseOptional(v, new Function() { + @Override + public Long apply(String value) { + return Long.parseLong(value); + } + })); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.Name, + new Function() { + @Override + public String apply(BulkConversionGoal c) { + return c.getConversionGoal().getName(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkConversionGoal c) { + c.getConversionGoal().setName(v); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.AttributionModelType, + new Function() { + @Override + public String apply(BulkConversionGoal c) { + return c.getConversionGoal().getAttributionModelType() != null ? c.getConversionGoal().getAttributionModelType().value() : null; + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkConversionGoal c) { + c.getConversionGoal().setAttributionModelType(StringExtensions.parseOptional(v, new Function() { + @Override + public AttributionModelType apply(String value) { + return StringExtensions.fromValueOptional(value, AttributionModelType.class); + } + })); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.ConversionWindowInMinutes, + new Function() { + @Override + public Integer apply(BulkConversionGoal c) { + return c.getConversionGoal().getConversionWindowInMinutes(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkConversionGoal c) { + c.getConversionGoal().setConversionWindowInMinutes(StringExtensions.parseOptional(v, new Function() { + @Override + public Integer apply(String value) { + return Integer.parseInt(value); + } + })); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.CountType, + new Function() { + @Override + public String apply(BulkConversionGoal c) { + return c.getConversionGoal().getCountType() != null ? c.getConversionGoal().getCountType().value() : null; + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkConversionGoal c) { + c.getConversionGoal().setCountType(StringExtensions.parseOptional(v, new Function() { + @Override + public ConversionGoalCountType apply(String value) { + return StringExtensions.fromValueOptional(value, ConversionGoalCountType.class); + } + })); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.ExcludeFromBidding, + new Function() { + @Override + public Boolean apply(BulkConversionGoal t) { + return t.getConversionGoal().getExcludeFromBidding(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkConversionGoal c) { + c.getConversionGoal().setExcludeFromBidding(v == null ? null : Boolean.parseBoolean(v)); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.GoalCategory, + new Function() { + @Override + public String apply(BulkConversionGoal c) { + return c.getConversionGoal().getGoalCategory() != null ? c.getConversionGoal().getGoalCategory().value() : null; + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkConversionGoal c) { + c.getConversionGoal().setGoalCategory(StringExtensions.parseOptional(v, new Function() { + @Override + public ConversionGoalCategory apply(String value) { + return StringExtensions.fromValueOptional(value, ConversionGoalCategory.class); + } + })); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.IsEnhancedConversionsEnabled, + new Function() { + @Override + public Boolean apply(BulkConversionGoal t) { + return t.getConversionGoal().getIsEnhancedConversionsEnabled(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkConversionGoal c) { + c.getConversionGoal().setIsEnhancedConversionsEnabled(v == null ? null : Boolean.parseBoolean(v)); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.CurrencyCode, + new Function() { + @Override + public String apply(BulkConversionGoal c) { + if (c.getConversionGoal().getRevenue() == null) + { + return null; + } + return c.getConversionGoal().getRevenue().getCurrencyCode(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkConversionGoal c) { + if (c.getConversionGoal().getRevenue() == null) + { + c.addRevenue(); + } + c.getConversionGoal().getRevenue().setCurrencyCode(v); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.RevenueValue, + new Function() { + @Override + public String apply(BulkConversionGoal t) { + if (t.getConversionGoal().getRevenue() == null) + { + return null; + } + return t.getConversionGoal().getRevenue().getValue() != null ? t.getConversionGoal().getRevenue().getValue().toString() : null; + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkConversionGoal c) { + if (c.getConversionGoal().getRevenue() == null) + { + c.addRevenue(); + } + c.getConversionGoal().getRevenue().setValue(StringExtensions.nullOrBigDecimal(v)); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.RevenueType, + new Function() { + @Override + public String apply(BulkConversionGoal c) { + if (c.getConversionGoal().getRevenue() == null) + { + return null; + } + return c.getConversionGoal().getRevenue().getType() != null ? c.getConversionGoal().getRevenue().getType().value() : null; + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkConversionGoal c) { + if (c.getConversionGoal().getRevenue() == null) + { + c.addRevenue(); + } + c.getConversionGoal().getRevenue().setType(StringExtensions.parseOptional(v, new Function() { + @Override + public ConversionGoalRevenueType apply(String value) { + return StringExtensions.fromValueOptional(value, ConversionGoalRevenueType.class); + } + })); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.Scope, + new Function() { + @Override + public String apply(BulkConversionGoal c) { + return c.getConversionGoal().getScope() != null ? c.getConversionGoal().getScope().value() : null; + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkConversionGoal c) { + c.getConversionGoal().setScope(StringExtensions.parseOptional(v, new Function() { + @Override + public EntityScope apply(String value) { + return StringExtensions.fromValueOptional(value, EntityScope.class); + } + })); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.TagId, + new Function() { + @Override + public Long apply(BulkConversionGoal c) { + return c.getConversionGoal().getTagId(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkConversionGoal c) { + c.getConversionGoal().setTagId(StringExtensions.parseOptional(v, new Function() { + @Override + public Long apply(String value) { + return Long.parseLong(value); + } + })); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.ViewThroughConversionWindowInMinutes, + new Function() { + @Override + public Integer apply(BulkConversionGoal c) { + return c.getConversionGoal().getViewThroughConversionWindowInMinutes(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkConversionGoal c) { + c.getConversionGoal().setViewThroughConversionWindowInMinutes(StringExtensions.parseOptional(v, new Function() { + @Override + public Integer apply(String value) { + return Integer.parseInt(value); + } + })); + } + } + )); + + + + MAPPINGS = Collections.unmodifiableList(m); + } + + public void addRevenue() + { + ConversionGoal.setRevenue(new ConversionGoalRevenue()); + } + + @Override + public void processMappingsFromRowValues(RowValues values) { + this.setConversionGoal(createConversionGoal()); + + MappingHelpers.convertToEntity(values, MAPPINGS, this); + } + + @Override + public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { + validatePropertyNotNull(getConversionGoal(), "ConversionGoal"); + + MappingHelpers.convertToValues(this, values, MAPPINGS); + } + + public abstract T createConversionGoal(); + + /** + * Get the ConversionGoal. + */ + public T getConversionGoal() { + return ConversionGoal; + } + + /** + * Set the ConversionGoal. + */ + public void setConversionGoal(T ConversionGoal) { + this.ConversionGoal = ConversionGoal; + } +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkDataExclusion.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkDataExclusion.java index 3e7b463314..56b214486b 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkDataExclusion.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkDataExclusion.java @@ -195,19 +195,14 @@ public void accept(String v, BulkDataExclusion c) { m.add(new SimpleBulkMapping(StringTable.DeviceType, new Function() { @Override - public String apply(BulkDataExclusion t) { - return t.getDataExclusion().getDeviceTypeFilter() != null ? t.getDataExclusion().getDeviceTypeFilter().value() : null; + public String apply(BulkDataExclusion c) { + return StringExtensions.toDeviceTypeListBulkString(",", c.getDataExclusion().getDeviceTypeFilter()); } }, new BiConsumer() { @Override - public void accept(String v, BulkDataExclusion c) { - c.getDataExclusion().setDeviceTypeFilter(StringExtensions.parseOptional(v, new Function() { - @Override - public DeviceType apply(String value) { - return DeviceType.fromValue(value); - } - })); + public void accept(String v, BulkDataExclusion c) { + c.getDataExclusion().setDeviceTypeFilter(StringExtensions.parseDeviceTypeList(v, ",")); } } )); diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkDurationGoal.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkDurationGoal.java new file mode 100644 index 0000000000..34044029e5 --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkDurationGoal.java @@ -0,0 +1,100 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; +import com.microsoft.bingads.v13.campaignmanagement.DurationGoal; +import com.microsoft.bingads.v13.internal.bulk.BulkMapping; +import com.microsoft.bingads.v13.internal.bulk.MappingHelpers; +import com.microsoft.bingads.v13.internal.bulk.RowValues; +import com.microsoft.bingads.v13.internal.bulk.SimpleBulkMapping; +import com.microsoft.bingads.v13.internal.bulk.StringExtensions; +import com.microsoft.bingads.v13.internal.bulk.StringTable; + +/** + * Represents a duration goal that can be read or written in a bulk file. + * + * This class exposes the {@link BulkDurationGoal#setDurationGoal} and {@link BulkDurationGoal#getDurationGoal} + * methods that can be used to read and write fields of the Duration Goal record in a bulk file. + * + *

+ * For more information, see Duration Goal at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkDurationGoal extends BulkConversionGoal { + + + private static final List> MAPPINGS; + + static { + List> m = new ArrayList>(); + + m.add(new SimpleBulkMapping(StringTable.MinimumDurationInSecond, + new Function() { + @Override + public Integer apply(BulkDurationGoal c) { + return c.getConversionGoal().getMinimumDurationInSeconds(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkDurationGoal c) { + c.getConversionGoal().setMinimumDurationInSeconds(StringExtensions.parseOptional(v, new Function() { + @Override + public Integer apply(String value) { + return Integer.parseInt(value); + } + })); + } + } + )); + + MAPPINGS = Collections.unmodifiableList(m); + } + + @Override + public void processMappingsFromRowValues(RowValues values) { + super.processMappingsFromRowValues(values); + + MappingHelpers.convertToEntity(values, MAPPINGS, this); + } + + @Override + public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { + super.processMappingsToRowValues(values, excludeReadonlyData); + MappingHelpers.convertToValues(this, values, MAPPINGS); + } + + /** + * Get the duration goal. + */ + public DurationGoal getDurationGoal() { + return this.getConversionGoal(); + } + + /** + * Set the duration goal. + */ + public void setDurationGoal(DurationGoal DurationGoal) { + this.setConversionGoal(DurationGoal); + } + + @Override + public DurationGoal createConversionGoal() { + return new DurationGoal(); + } + +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkEventGoal.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkEventGoal.java new file mode 100644 index 0000000000..fbaaa9da6e --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkEventGoal.java @@ -0,0 +1,223 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; +import com.microsoft.bingads.v13.campaignmanagement.EventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ExpressionOperator; +import com.microsoft.bingads.v13.campaignmanagement.ValueOperator; +import com.microsoft.bingads.v13.internal.bulk.BulkMapping; +import com.microsoft.bingads.v13.internal.bulk.MappingHelpers; +import com.microsoft.bingads.v13.internal.bulk.RowValues; +import com.microsoft.bingads.v13.internal.bulk.SimpleBulkMapping; +import com.microsoft.bingads.v13.internal.bulk.StringExtensions; +import com.microsoft.bingads.v13.internal.bulk.StringTable; + +/** + * Represents a event goal that can be read or written in a bulk file. + * + * This class exposes the {@link BulkEventGoal#setEventGoal} and {@link BulkEventGoal#getEventGoal} + * methods that can be used to read and write fields of the Event Goal record in a bulk file. + * + *

+ * For more information, see Event Goal at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkEventGoal extends BulkConversionGoal { + + + private static final List> MAPPINGS; + + static { + List> m = new ArrayList>(); + + + m.add(new SimpleBulkMapping(StringTable.CategoryExpression, + new Function() { + @Override + public String apply(BulkEventGoal c) { + return c.getEventGoal().getCategoryExpression(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkEventGoal c) { + c.getEventGoal().setCategoryExpression(v); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.CategoryOperator, + new Function() { + @Override + public String apply(BulkEventGoal c) { + return c.getEventGoal().getCategoryOperator() != null ? c.getEventGoal().getCategoryOperator().value() : null; + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkEventGoal c) { + c.getEventGoal().setCategoryOperator(StringExtensions.parseOptional(v, new Function() { + @Override + public ExpressionOperator apply(String value) { + return StringExtensions.fromValueOptional(value, ExpressionOperator.class); + } + })); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.ActionExpression, + new Function() { + @Override + public String apply(BulkEventGoal c) { + return c.getEventGoal().getActionExpression(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkEventGoal c) { + c.getEventGoal().setActionExpression(v); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.ActionOperator, + new Function() { + @Override + public String apply(BulkEventGoal c) { + return c.getEventGoal().getActionOperator() != null ? c.getEventGoal().getActionOperator().value() : null; + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkEventGoal c) { + c.getEventGoal().setActionOperator(StringExtensions.parseOptional(v, new Function() { + @Override + public ExpressionOperator apply(String value) { + return StringExtensions.fromValueOptional(value, ExpressionOperator.class); + } + })); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.LabelExpression, + new Function() { + @Override + public String apply(BulkEventGoal c) { + return c.getEventGoal().getLabelExpression(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkEventGoal c) { + c.getEventGoal().setLabelExpression(v); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.LabelOperator, + new Function() { + @Override + public String apply(BulkEventGoal c) { + return c.getEventGoal().getLabelOperator() != null ? c.getEventGoal().getLabelOperator().value() : null; + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkEventGoal c) { + c.getEventGoal().setLabelOperator(StringExtensions.parseOptional(v, new Function() { + @Override + public ExpressionOperator apply(String value) { + return StringExtensions.fromValueOptional(value, ExpressionOperator.class); + } + })); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.EventValue, + new Function() { + @Override + public String apply(BulkEventGoal t) { + return t.getEventGoal().getValue() != null ? t.getEventGoal().getValue().toString() : null; + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkEventGoal c) { + c.getEventGoal().setValue(StringExtensions.nullOrBigDecimal(v)); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.EventValueOperator, + new Function() { + @Override + public String apply(BulkEventGoal c) { + return c.getEventGoal().getValueOperator() != null ? c.getEventGoal().getValueOperator().value() : null; + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkEventGoal c) { + c.getEventGoal().setValueOperator(StringExtensions.parseOptional(v, new Function() { + @Override + public ValueOperator apply(String value) { + return StringExtensions.fromValueOptional(value, ValueOperator.class); + } + })); + } + } + )); + + MAPPINGS = Collections.unmodifiableList(m); + } + + @Override + public void processMappingsFromRowValues(RowValues values) { + super.processMappingsFromRowValues(values); + + MappingHelpers.convertToEntity(values, MAPPINGS, this); + } + + @Override + public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { + super.processMappingsToRowValues(values, excludeReadonlyData); + MappingHelpers.convertToValues(this, values, MAPPINGS); + } + + /** + * Get the event goal. + */ + public EventGoal getEventGoal() { + return this.getConversionGoal(); + } + + /** + * Set the event goal. + */ + public void setEventGoal(EventGoal EventGoal) { + this.setConversionGoal(EventGoal); + } + + @Override + public EventGoal createConversionGoal() { + return new EventGoal(); + } + +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkFeed.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkFeed.java index 22d51b3f68..b321fc97c8 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkFeed.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkFeed.java @@ -102,7 +102,7 @@ public void accept(String v, BulkFeed c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkFeedItem.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkFeedItem.java index 37bd26a060..2f67423e8d 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkFeedItem.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkFeedItem.java @@ -171,7 +171,7 @@ public void accept(String v, BulkFeedItem c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } @@ -251,7 +251,7 @@ public void accept(String v, BulkFeedItem c) { c.setMatchType(StringExtensions.parseOptional(v, new Function() { @Override public MatchType apply(String value) { - return MatchType.fromValue(value); + return StringExtensions.fromValueOptional(value, MatchType.class); } })); } @@ -271,7 +271,7 @@ public void accept(String v, BulkFeedItem c) { c.setIntentOption(StringExtensions.parseOptional(v, new Function() { @Override public IntentOption apply(String value) { - return IntentOption.fromValue(value); + return StringExtensions.fromValueOptional(value, IntentOption.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkFilterLinkAdExtension.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkFilterLinkAdExtension.java index c6e7c0f587..f7fa0eb01e 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkFilterLinkAdExtension.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkFilterLinkAdExtension.java @@ -73,7 +73,7 @@ public void accept(String v, BulkFilterLinkAdExtension c) { c.getAdExtension().setAdExtensionHeaderType(StringExtensions.parseOptional(v, new Function() { @Override public AdExtensionHeaderType apply(String value) { - return AdExtensionHeaderType.fromValue(value); + return StringExtensions.fromValueOptional(value, AdExtensionHeaderType.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkImage.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkImage.java index 3428f3313e..05749f81ba 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkImage.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkImage.java @@ -104,7 +104,7 @@ public void accept(String v, BulkImage c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkImpressionBasedRemarketingList.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkImpressionBasedRemarketingList.java new file mode 100644 index 0000000000..2f0779606c --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkImpressionBasedRemarketingList.java @@ -0,0 +1,141 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; +import com.microsoft.bingads.v13.campaignmanagement.ImpressionBasedEntityType; +import com.microsoft.bingads.v13.campaignmanagement.ImpressionBasedRemarketingList; +import com.microsoft.bingads.v13.internal.bulk.BulkMapping; +import com.microsoft.bingads.v13.internal.bulk.MappingHelpers; +import com.microsoft.bingads.v13.internal.bulk.RowValues; +import com.microsoft.bingads.v13.internal.bulk.SimpleBulkMapping; +import com.microsoft.bingads.v13.internal.bulk.StringExtensions; +import com.microsoft.bingads.v13.internal.bulk.StringTable; + +/** + * Represents a Impression Based Remarketing List that can be read or written in a bulk file. + * + * This class exposes the {@link BulkImpressionBasedRemarketingList#setRemarketingList} and {@link BulkImpressionBasedRemarketingList#getRemarketingList} + * methods that can be used to read and write fields of the ImpressionBased Remarketing List record in a bulk file. + * + *

+ * For more information, see Impression Based Remarketing List at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkImpressionBasedRemarketingList extends BulkAudience { + + private static final List> MAPPINGS; + + static { + List> m = new ArrayList>(); + + m.add(new SimpleBulkMapping(StringTable.ImpressionCampaignId, + new Function() { + @Override + public Long apply(BulkImpressionBasedRemarketingList c) { + return c.getImpressionBasedRemarketingList().getCampaignId(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkImpressionBasedRemarketingList c) { + c.getImpressionBasedRemarketingList().setCampaignId(StringExtensions.parseOptional(v, new Function() { + @Override + public Long apply(String value) { + return Long.parseLong(value); + } + })); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.ImpressionAdGroupId, + new Function() { + @Override + public Long apply(BulkImpressionBasedRemarketingList c) { + return c.getImpressionBasedRemarketingList().getAdGroupId(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkImpressionBasedRemarketingList c) { + c.getImpressionBasedRemarketingList().setAdGroupId(StringExtensions.parseOptional(v, new Function() { + @Override + public Long apply(String value) { + return Long.parseLong(value); + } + })); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.EntityType, + new Function() { + @Override + public String apply(BulkImpressionBasedRemarketingList c) { + return c.getImpressionBasedRemarketingList().getEntityType() != null ? c.getImpressionBasedRemarketingList().getEntityType().value() : null; + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkImpressionBasedRemarketingList c) { + c.getImpressionBasedRemarketingList().setEntityType(StringExtensions.parseOptional(v, new Function() { + @Override + public ImpressionBasedEntityType apply(String value) { + return StringExtensions.fromValueOptional(value, ImpressionBasedEntityType.class); + } + })); + } + } + )); + + MAPPINGS = Collections.unmodifiableList(m); + } + + @Override + public void processMappingsFromRowValues(RowValues values) { + super.processMappingsFromRowValues(values); + + MappingHelpers.convertToEntity(values, MAPPINGS, this); + } + + @Override + public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { + super.processMappingsToRowValues(values, excludeReadonlyData); + + MappingHelpers.convertToValues(this, values, MAPPINGS); + } + + /** + * Gets the impression based remarketing list. + */ + public ImpressionBasedRemarketingList getImpressionBasedRemarketingList() { + return this.getAudience(); + } + + /** + * Sets the impression based remarketing list. + */ + public void setImpressionBasedRemarketingList(ImpressionBasedRemarketingList remarketingList) { + this.setAudience(remarketingList); + } + + @Override + public ImpressionBasedRemarketingList createAudience() { + return new ImpressionBasedRemarketingList(); + } + +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkInStoreTransactionGoal.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkInStoreTransactionGoal.java new file mode 100644 index 0000000000..8eff68c267 --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkInStoreTransactionGoal.java @@ -0,0 +1,81 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; +import com.microsoft.bingads.v13.campaignmanagement.InStoreTransactionGoal; +import com.microsoft.bingads.v13.campaignmanagement.ExpressionOperator; +import com.microsoft.bingads.v13.internal.bulk.BulkMapping; +import com.microsoft.bingads.v13.internal.bulk.MappingHelpers; +import com.microsoft.bingads.v13.internal.bulk.RowValues; +import com.microsoft.bingads.v13.internal.bulk.SimpleBulkMapping; +import com.microsoft.bingads.v13.internal.bulk.StringExtensions; +import com.microsoft.bingads.v13.internal.bulk.StringTable; + +/** + * Represents a instoretransaction goal that can be read or written in a bulk file. + * + * This class exposes the {@link BulkInStoreTransactionGoal#setInStoreTransactionGoal} and {@link BulkInStoreTransactionGoal#getInStoreTransactionGoal} + * methods that can be used to read and write fields of the InStoreTransaction Goal record in a bulk file. + * + *

+ * For more information, see InStoreTransaction Goal at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkInStoreTransactionGoal extends BulkConversionGoal { + + + private static final List> MAPPINGS; + + static { + List> m = new ArrayList>(); + + MAPPINGS = Collections.unmodifiableList(m); + } + + @Override + public void processMappingsFromRowValues(RowValues values) { + super.processMappingsFromRowValues(values); + + MappingHelpers.convertToEntity(values, MAPPINGS, this); + } + + @Override + public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { + super.processMappingsToRowValues(values, excludeReadonlyData); + MappingHelpers.convertToValues(this, values, MAPPINGS); + } + + /** + * Get the instoretransaction goal. + */ + public InStoreTransactionGoal getInStoreTransactionGoal() { + return this.getConversionGoal(); + } + + /** + * Set the instoretransaction goal. + */ + public void setInStoreTransactionGoal(InStoreTransactionGoal InStoreTransactionGoal) { + this.setConversionGoal(InStoreTransactionGoal); + } + + @Override + public InStoreTransactionGoal createConversionGoal() { + return new InStoreTransactionGoal(); + } + +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkInStoreVisitGoal.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkInStoreVisitGoal.java new file mode 100644 index 0000000000..12ddf65644 --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkInStoreVisitGoal.java @@ -0,0 +1,61 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoal; +import com.microsoft.bingads.v13.internal.bulk.BulkMapping; +import com.microsoft.bingads.v13.internal.bulk.MappingHelpers; +import com.microsoft.bingads.v13.internal.bulk.RowValues; + +/** + * Represents a instorevisit goal that can be read or written in a bulk file. + * + * This class exposes the {@link BulkInStoreVisitGoal#setInStoreVisitGoal} and {@link BulkInStoreVisitGoal#getInStoreVisitGoal} + * methods that can be used to read and write fields of the InStoreVisit Goal record in a bulk file. + * + *

+ * For more information, see InStoreVisit Goal at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkInStoreVisitGoal extends BulkConversionGoal { + + + private static final List> MAPPINGS; + + static { + List> m = new ArrayList>(); + + MAPPINGS = Collections.unmodifiableList(m); + } + + @Override + public void processMappingsFromRowValues(RowValues values) { + super.processMappingsFromRowValues(values); + + MappingHelpers.convertToEntity(values, MAPPINGS, this); + } + + @Override + public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { + super.processMappingsToRowValues(values, excludeReadonlyData); + MappingHelpers.convertToValues(this, values, MAPPINGS); + } + + @Override + public ConversionGoal createConversionGoal() { + return new ConversionGoal(); + } + +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkKeyword.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkKeyword.java index 53afec34a7..669c62c297 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkKeyword.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkKeyword.java @@ -115,7 +115,7 @@ public void accept(String v, BulkKeyword c) { c.getKeyword().setStatus(StringExtensions.parseOptional(v, new Function() { @Override public KeywordStatus apply(String value) { - return KeywordStatus.fromValue(value); + return StringExtensions.fromValueOptional(value, KeywordStatus.class); } })); } @@ -196,7 +196,7 @@ public void accept(String v, BulkKeyword c) { c.getKeyword().setEditorialStatus(StringExtensions.parseOptional(v, new Function() { @Override public KeywordEditorialStatus apply(String value) { - return KeywordEditorialStatus.fromValue(value); + return StringExtensions.fromValueOptional(value, KeywordEditorialStatus.class); } })); } @@ -216,7 +216,7 @@ public void accept(String v, BulkKeyword c) { c.getKeyword().setMatchType(StringExtensions.parseOptional(v, new Function() { @Override public MatchType apply(String value) { - return MatchType.fromValue(value); + return StringExtensions.fromValueOptional(value, MatchType.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkLabel.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkLabel.java index 5b322a7645..bf883a8c7d 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkLabel.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkLabel.java @@ -71,7 +71,7 @@ public void accept(String v, BulkLabel c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkLabelAssociation.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkLabelAssociation.java index bc579e7526..fa9e885a0f 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkLabelAssociation.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkLabelAssociation.java @@ -86,7 +86,7 @@ public void accept(String v, BulkLabelAssociation c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkLocationAdExtension.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkLocationAdExtension.java index b5947ed752..fd0632e2f0 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkLocationAdExtension.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkLocationAdExtension.java @@ -99,7 +99,7 @@ public void accept(String v, BulkLocationAdExtension c) { c.getLocationAdExtension().setGeoCodeStatus(StringExtensions.parseOptional(v, new Function() { @Override public BusinessGeoCodeStatus apply(String value) { - return BusinessGeoCodeStatus.fromValue(value); + return StringExtensions.fromValueOptional(value, BusinessGeoCodeStatus.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkNegativeKeyword.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkNegativeKeyword.java index bb08363829..fbe0e554c4 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkNegativeKeyword.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkNegativeKeyword.java @@ -71,7 +71,7 @@ public void accept(String v, BulkNegativeKeyword c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } @@ -126,7 +126,7 @@ public void accept(String v, BulkNegativeKeyword c) { c.getNegativeKeyword().setMatchType(StringExtensions.parseOptional(v, new Function() { @Override public MatchType apply(String t) { - return MatchType.fromValue(t); + return StringExtensions.fromValueOptional(t, MatchType.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkNegativeKeywordList.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkNegativeKeywordList.java index 197e578b41..e68df619f9 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkNegativeKeywordList.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkNegativeKeywordList.java @@ -79,7 +79,7 @@ public void accept(String v, BulkNegativeKeywordList c) { c.setStatus(StringExtensions.parseOptional(v, new Function() { @Override public Status apply(String value) { - return Status.fromValue(value); + return StringExtensions.fromValueOptional(value, Status.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkOfflineConversionGoal.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkOfflineConversionGoal.java new file mode 100644 index 0000000000..5033fdc72d --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkOfflineConversionGoal.java @@ -0,0 +1,75 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; +import com.microsoft.bingads.v13.campaignmanagement.OfflineConversionGoal; +import com.microsoft.bingads.v13.internal.bulk.BulkMapping; +import com.microsoft.bingads.v13.internal.bulk.MappingHelpers; +import com.microsoft.bingads.v13.internal.bulk.RowValues; + +/** + * Represents a offlineconversion goal that can be read or written in a bulk file. + * + * This class exposes the {@link BulkOfflineConversionGoal#setOfflineConversionGoal} and {@link BulkOfflineConversionGoal#getOfflineConversionGoal} + * methods that can be used to read and write fields of the OfflineConversion Goal record in a bulk file. + * + *

+ * For more information, see OfflineConversion Goal at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkOfflineConversionGoal extends BulkConversionGoal { + + + private static final List> MAPPINGS; + + static { + List> m = new ArrayList>(); + + MAPPINGS = Collections.unmodifiableList(m); + } + + @Override + public void processMappingsFromRowValues(RowValues values) { + super.processMappingsFromRowValues(values); + + MappingHelpers.convertToEntity(values, MAPPINGS, this); + } + + @Override + public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { + super.processMappingsToRowValues(values, excludeReadonlyData); + MappingHelpers.convertToValues(this, values, MAPPINGS); + } + + /** + * Get the offlineconversion goal. + */ + public OfflineConversionGoal getOfflineConversionGoal() { + return this.getConversionGoal(); + } + + /** + * Set the offlineconversion goal. + */ + public void setOfflineConversionGoal(OfflineConversionGoal OfflineConversionGoal) { + this.setConversionGoal(OfflineConversionGoal); + } + + @Override + public OfflineConversionGoal createConversionGoal() { + return new OfflineConversionGoal(); + } + +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkPagesViewedPerVisitGoal.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkPagesViewedPerVisitGoal.java new file mode 100644 index 0000000000..27519a2b5e --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkPagesViewedPerVisitGoal.java @@ -0,0 +1,100 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; +import com.microsoft.bingads.v13.campaignmanagement.PagesViewedPerVisitGoal; +import com.microsoft.bingads.v13.internal.bulk.BulkMapping; +import com.microsoft.bingads.v13.internal.bulk.MappingHelpers; +import com.microsoft.bingads.v13.internal.bulk.RowValues; +import com.microsoft.bingads.v13.internal.bulk.SimpleBulkMapping; +import com.microsoft.bingads.v13.internal.bulk.StringExtensions; +import com.microsoft.bingads.v13.internal.bulk.StringTable; + +/** + * Represents a pagesviewedpervisit goal that can be read or written in a bulk file. + * + * This class exposes the {@link BulkPagesViewedPerVisitGoal#setPagesViewedPerVisitGoal} and {@link BulkPagesViewedPerVisitGoal#getPagesViewedPerVisitGoal} + * methods that can be used to read and write fields of the PagesViewedPerVisit Goal record in a bulk file. + * + *

+ * For more information, see PagesViewedPerVisit Goal at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkPagesViewedPerVisitGoal extends BulkConversionGoal { + + + private static final List> MAPPINGS; + + static { + List> m = new ArrayList>(); + + m.add(new SimpleBulkMapping(StringTable.MinimumPagesViewed, + new Function() { + @Override + public Integer apply(BulkPagesViewedPerVisitGoal c) { + return c.getConversionGoal().getMinimumPagesViewed(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkPagesViewedPerVisitGoal c) { + c.getConversionGoal().setMinimumPagesViewed(StringExtensions.parseOptional(v, new Function() { + @Override + public Integer apply(String value) { + return Integer.parseInt(value); + } + })); + } + } + )); + + MAPPINGS = Collections.unmodifiableList(m); + } + + @Override + public void processMappingsFromRowValues(RowValues values) { + super.processMappingsFromRowValues(values); + + MappingHelpers.convertToEntity(values, MAPPINGS, this); + } + + @Override + public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { + super.processMappingsToRowValues(values, excludeReadonlyData); + MappingHelpers.convertToValues(this, values, MAPPINGS); + } + + /** + * Get the pagesviewedpervisit goal. + */ + public PagesViewedPerVisitGoal getPagesViewedPerVisitGoal() { + return this.getConversionGoal(); + } + + /** + * Set the pagesviewedpervisit goal. + */ + public void setPagesViewedPerVisitGoal(PagesViewedPerVisitGoal PagesViewedPerVisitGoal) { + this.setConversionGoal(PagesViewedPerVisitGoal); + } + + @Override + public PagesViewedPerVisitGoal createConversionGoal() { + return new PagesViewedPerVisitGoal(); + } + +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkPriceAdExtension.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkPriceAdExtension.java index 02565f3b94..6190e89e9a 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkPriceAdExtension.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkPriceAdExtension.java @@ -86,7 +86,7 @@ public void accept(String v, BulkPriceAdExtension c) { c.getPriceAdExtension().setPriceExtensionType(StringExtensions.parseOptional(v, new Function() { @Override public PriceExtensionType apply(String s) { - return PriceExtensionType.fromValue(s); + return StringExtensions.fromValueOptional(s, PriceExtensionType.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkProductAudience.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkProductAudience.java index 1e9fc6f2a2..20fa8b2a88 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkProductAudience.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkProductAudience.java @@ -82,7 +82,7 @@ public void accept(String v, BulkProductAudience c) { ProductAudienceType productAudienceType = StringExtensions.parseOptional(v, new Function() { @Override public ProductAudienceType apply(String value) { - return ProductAudienceType.fromValue(value); + return StringExtensions.fromValueOptional(value, ProductAudienceType.class); } }); if (productAudienceType != null) { diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkProductGoal.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkProductGoal.java new file mode 100644 index 0000000000..3ea7fc864e --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkProductGoal.java @@ -0,0 +1,61 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoal; +import com.microsoft.bingads.v13.internal.bulk.BulkMapping; +import com.microsoft.bingads.v13.internal.bulk.MappingHelpers; +import com.microsoft.bingads.v13.internal.bulk.RowValues; + +/** + * Represents a product goal that can be read or written in a bulk file. + * + * This class exposes the {@link BulkProductGoal#setProductGoal} and {@link BulkProductGoal#getProductGoal} + * methods that can be used to read and write fields of the Product Goal record in a bulk file. + * + *

+ * For more information, see Product Goal at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkProductGoal extends BulkConversionGoal { + + + private static final List> MAPPINGS; + + static { + List> m = new ArrayList>(); + + MAPPINGS = Collections.unmodifiableList(m); + } + + @Override + public void processMappingsFromRowValues(RowValues values) { + super.processMappingsFromRowValues(values); + + MappingHelpers.convertToEntity(values, MAPPINGS, this); + } + + @Override + public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { + super.processMappingsToRowValues(values, excludeReadonlyData); + MappingHelpers.convertToValues(this, values, MAPPINGS); + } + + @Override + public ConversionGoal createConversionGoal() { + return new ConversionGoal(); + } + +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkPromotionAdExtension.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkPromotionAdExtension.java index 1b3db61417..246c6c00e2 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkPromotionAdExtension.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkPromotionAdExtension.java @@ -232,7 +232,7 @@ public void accept(String v, BulkPromotionAdExtension c) { c.getPromotionAdExtension().setDiscountModifier(StringExtensions.parseOptional(v, new Function() { @Override public PromotionDiscountModifier apply(String value) { - return PromotionDiscountModifier.fromValue(value); + return StringExtensions.fromValueOptional(value, PromotionDiscountModifier.class); } })); } @@ -253,7 +253,7 @@ public void accept(String v, BulkPromotionAdExtension c) { c.getPromotionAdExtension().setPromotionOccasion(StringExtensions.parseOptional(v, new Function() { @Override public PromotionOccasion apply(String value) { - return PromotionOccasion.fromValue(value); + return StringExtensions.fromValueOptional(value, PromotionOccasion.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkResponsiveAd.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkResponsiveAd.java index 69c0d1b544..cb5e2f06f4 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkResponsiveAd.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkResponsiveAd.java @@ -76,7 +76,7 @@ public void accept(String v, BulkResponsiveAd c) { c.getAd().setCallToAction(StringExtensions.parseOptional(v, new Function() { @Override public CallToAction apply(String value) { - return CallToAction.fromValue(value); + return StringExtensions.fromValueOptional(value, CallToAction.class); } })); } @@ -96,7 +96,7 @@ public void accept(String v, BulkResponsiveAd c) { c.getAd().setCallToActionLanguage(StringExtensions.parseOptional(v, new Function() { @Override public LanguageName apply(String value) { - return LanguageName.fromValue(value); + return StringExtensions.fromValueOptional(value, LanguageName.class); } })); } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkSeasonalityAdjustment.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkSeasonalityAdjustment.java index e461bc39db..b7f2f12009 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkSeasonalityAdjustment.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkSeasonalityAdjustment.java @@ -195,19 +195,14 @@ public void accept(String v, BulkSeasonalityAdjustment c) { m.add(new SimpleBulkMapping(StringTable.DeviceType, new Function() { @Override - public String apply(BulkSeasonalityAdjustment t) { - return t.getSeasonalityAdjustment().getDeviceTypeFilter() != null ? t.getSeasonalityAdjustment().getDeviceTypeFilter().value() : null; + public String apply(BulkSeasonalityAdjustment c) { + return StringExtensions.toDeviceTypeListBulkString(",", c.getSeasonalityAdjustment().getDeviceTypeFilter()); } }, new BiConsumer() { @Override - public void accept(String v, BulkSeasonalityAdjustment c) { - c.getSeasonalityAdjustment().setDeviceTypeFilter(StringExtensions.parseOptional(v, new Function() { - @Override - public DeviceType apply(String value) { - return DeviceType.fromValue(value); - } - })); + public void accept(String v, BulkSeasonalityAdjustment c) { + c.getSeasonalityAdjustment().setDeviceTypeFilter(StringExtensions.parseDeviceTypeList(v, ",")); } } )); diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkUrlGoal.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkUrlGoal.java new file mode 100644 index 0000000000..948ef40e7e --- /dev/null +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/BulkUrlGoal.java @@ -0,0 +1,116 @@ +package com.microsoft.bingads.v13.bulk.entities; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.bulk.BulkFileReader; +import com.microsoft.bingads.v13.bulk.BulkFileWriter; +import com.microsoft.bingads.v13.bulk.BulkOperation; +import com.microsoft.bingads.v13.bulk.BulkServiceManager; +import com.microsoft.bingads.v13.campaignmanagement.UrlGoal; +import com.microsoft.bingads.v13.campaignmanagement.ExpressionOperator; +import com.microsoft.bingads.v13.internal.bulk.BulkMapping; +import com.microsoft.bingads.v13.internal.bulk.MappingHelpers; +import com.microsoft.bingads.v13.internal.bulk.RowValues; +import com.microsoft.bingads.v13.internal.bulk.SimpleBulkMapping; +import com.microsoft.bingads.v13.internal.bulk.StringExtensions; +import com.microsoft.bingads.v13.internal.bulk.StringTable; + +/** + * Represents a url goal that can be read or written in a bulk file. + * + * This class exposes the {@link BulkUrlGoal#setUrlGoal} and {@link BulkUrlGoal#getUrlGoal} + * methods that can be used to read and write fields of the Url Goal record in a bulk file. + * + *

+ * For more information, see Url Goal at + * https://go.microsoft.com/fwlink/?linkid=846127. + *

+ * + * @see BulkServiceManager + * @see BulkOperation + * @see BulkFileReader + * @see BulkFileWriter + */ +public class BulkUrlGoal extends BulkConversionGoal { + + + private static final List> MAPPINGS; + + static { + List> m = new ArrayList>(); + + m.add(new SimpleBulkMapping(StringTable.UrlExpression, + new Function() { + @Override + public String apply(BulkUrlGoal c) { + return c.getUrlGoal().getUrlExpression(); + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkUrlGoal c) { + c.getUrlGoal().setUrlExpression(v); + } + } + )); + + m.add(new SimpleBulkMapping(StringTable.UrlOperator, + new Function() { + @Override + public String apply(BulkUrlGoal c) { + return c.getUrlGoal().getUrlOperator() != null ? c.getUrlGoal().getUrlOperator().value() : null; + } + }, + new BiConsumer() { + @Override + public void accept(String v, BulkUrlGoal c) { + c.getUrlGoal().setUrlOperator(StringExtensions.parseOptional(v, new Function() { + @Override + public ExpressionOperator apply(String value) { + return StringExtensions.fromValueOptional(value, ExpressionOperator.class); + } + })); + } + } + )); + + MAPPINGS = Collections.unmodifiableList(m); + } + + @Override + public void processMappingsFromRowValues(RowValues values) { + super.processMappingsFromRowValues(values); + + MappingHelpers.convertToEntity(values, MAPPINGS, this); + } + + @Override + public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { + super.processMappingsToRowValues(values, excludeReadonlyData); + MappingHelpers.convertToValues(this, values, MAPPINGS); + } + + /** + * Get the url goal. + */ + public UrlGoal getUrlGoal() { + return this.getConversionGoal(); + } + + /** + * Set the url goal. + */ + public void setUrlGoal(UrlGoal UrlGoal) { + this.setConversionGoal(UrlGoal); + } + + @Override + public UrlGoal createConversionGoal() { + return new UrlGoal(); + } + +} diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/PriceTableRowHelper.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/PriceTableRowHelper.java index f1e92284fc..a07b5c4a4b 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/PriceTableRowHelper.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/PriceTableRowHelper.java @@ -80,8 +80,8 @@ public static void addPriceTableRowsFromRowValues(RowValues values, priceTableRow.setFinalUrls(finalUrls); priceTableRow.setPrice(StringExtensions.nullOrDouble(price)); - priceTableRow.setPriceQualifier(PriceQualifier.fromValue(priceQualifier)); - priceTableRow.setPriceUnit(PriceUnit.fromValue(priceUnit)); + priceTableRow.setPriceQualifier(StringExtensions.fromValueOptional(priceQualifier, PriceQualifier.class)); + priceTableRow.setPriceUnit(StringExtensions.fromValueOptional(priceUnit, PriceUnit.class)); priceTableRows.add(priceTableRow); } } diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/StaticBulkObjectFactory.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/StaticBulkObjectFactory.java index 3bdf3746f9..22d24bb9c5 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/StaticBulkObjectFactory.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/StaticBulkObjectFactory.java @@ -386,6 +386,36 @@ public SingleRecordBulkEntity create() { return new BulkCampaignNegativeCustomerListAssociation(); } })); + m.put(StringTable.ImpressionBasedRemarketingList, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkImpressionBasedRemarketingList(); + } + })); + m.put(StringTable.AdGroupImpressionBasedRemarketingListAssociation, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkAdGroupImpressionBasedRemarketingListAssociation(); + } + })); + m.put(StringTable.AdGroupNegativeImpressionBasedRemarketingListAssociation, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkAdGroupNegativeImpressionBasedRemarketingListAssociation(); + } + })); + m.put(StringTable.CampaignImpressionBasedRemarketingListAssociation, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkCampaignImpressionBasedRemarketingListAssociation(); + } + })); + m.put(StringTable.CampaignNegativeImpressionBasedRemarketingListAssociation, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkCampaignNegativeImpressionBasedRemarketingListAssociation(); + } + })); m.put(StringTable.CalloutAdExtension, new EntityInfo(new Creator() { @Override public SingleRecordBulkEntity create() { @@ -1175,6 +1205,84 @@ public SingleRecordBulkEntity create() { return new BulkAccountSharedNegativeKeyword(); } })); + m.put(StringTable.EventGoal, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkEventGoal(); + } + })); + m.put(StringTable.UrlGoal, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkUrlGoal(); + } + })); + m.put(StringTable.OfflineConversionGoal, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkOfflineConversionGoal(); + } + })); + m.put(StringTable.AppInstallGoal, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkAppInstallGoal(); + } + })); + m.put(StringTable.PagesViewedPerVisitGoal, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkPagesViewedPerVisitGoal(); + } + })); + m.put(StringTable.DurationGoal, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkDurationGoal(); + } + })); + m.put(StringTable.InStoreTransactionGoal, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkInStoreTransactionGoal(); + } + })); + m.put(StringTable.ProductGoal, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkProductGoal(); + } + })); + m.put(StringTable.InStoreVisitGoal, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkInStoreVisitGoal(); + } + })); + m.put(StringTable.AssetGroupSearchTheme, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkAssetGroupSearchTheme(); + } + })); + m.put(StringTable.BrandList, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkBrandList(); + } + })); + m.put(StringTable.BrandItem, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkBrandItem(); + } + })); + m.put(StringTable.CampaignBrandList, new EntityInfo(new Creator() { + @Override + public SingleRecordBulkEntity create() { + return new BulkCampaignBrandListAssociation(); + } + })); INDIVIDUAL_ENTITY_MAP = Collections.unmodifiableMap(m); diff --git a/src/main/java/com/microsoft/bingads/v13/bulk/entities/WebpageConditionHelper.java b/src/main/java/com/microsoft/bingads/v13/bulk/entities/WebpageConditionHelper.java index b8c2e53fb2..cef6206e46 100644 --- a/src/main/java/com/microsoft/bingads/v13/bulk/entities/WebpageConditionHelper.java +++ b/src/main/java/com/microsoft/bingads/v13/bulk/entities/WebpageConditionHelper.java @@ -7,6 +7,7 @@ import com.microsoft.bingads.v13.campaignmanagement.WebpageConditionOperand; import com.microsoft.bingads.v13.campaignmanagement.WebpageConditionOperator; import com.microsoft.bingads.v13.internal.bulk.RowValues; +import com.microsoft.bingads.v13.internal.bulk.StringExtensions; import com.microsoft.bingads.v13.internal.bulk.StringTable; class WebpageConditionHelper { @@ -44,11 +45,11 @@ public static void addConditionsFromRowValues(RowValues values, if (webpageCondition != null && !webpageCondition.isEmpty() && webpageValue != null && !webpageValue.isEmpty()) { WebpageCondition condition = new WebpageCondition(); condition.setArgument(webpageValue); - condition.setOperand(WebpageConditionOperand.fromValue(webpageCondition)); + condition.setOperand(StringExtensions.fromValueOptional(webpageCondition, WebpageConditionOperand.class)); if (webpageOperator != null && !webpageOperator.isEmpty()) { - condition.setOperator(WebpageConditionOperator.fromValue(webpageOperator)); + condition.setOperator(StringExtensions.fromValueOptional(webpageCondition, WebpageConditionOperator.class)); } conditions.add(condition); diff --git a/src/main/java/com/microsoft/bingads/v13/internal/bulk/CsvHeaders.java b/src/main/java/com/microsoft/bingads/v13/internal/bulk/CsvHeaders.java index 2db18ab072..40321f3bd9 100644 --- a/src/main/java/com/microsoft/bingads/v13/internal/bulk/CsvHeaders.java +++ b/src/main/java/com/microsoft/bingads/v13/internal/bulk/CsvHeaders.java @@ -352,6 +352,9 @@ public class CsvHeaders { StringTable.SupportedCampaignTypes, StringTable.ProductAudienceType, StringTable.CombinationRule, + StringTable.EntityType, + StringTable.ImpressionCampaignId, + StringTable.ImpressionAdGroupId, // Structured Snippet Ad Extension StringTable.StructuredSnippetHeader, @@ -480,6 +483,8 @@ public class CsvHeaders { StringTable.AudienceGroupAssetGroupAssociation, StringTable.AutoGeneratedTextOptOut, StringTable.AutoGeneratedImageOptOut, + StringTable.CostPerSaleOptOut, + StringTable.SearchTheme, // MultiChannel Campaign StringTable.DestinationChannel, @@ -493,6 +498,37 @@ public class CsvHeaders { // DNV Serving on MSAN StringTable.ShouldServeOnMSAN, + + // Goal + StringTable.AttributionModelType, + StringTable.ConversionWindowInMinutes, + StringTable.CountType, + StringTable.ExcludeFromBidding, + StringTable.GoalCategory, + StringTable.IsEnhancedConversionsEnabled, + StringTable.RevenueType, + StringTable.RevenueValue, + StringTable.TrackingStatus, + StringTable.ViewThroughConversionWindowInMinutes, + StringTable.MinimumDurationInSecond, + StringTable.ActionExpression, + StringTable.ActionOperator, + StringTable.CategoryExpression, + StringTable.CategoryOperator, + StringTable.LabelExpression, + StringTable.LabelOperator, + StringTable.EventValue, + StringTable.EventValueOperator, + StringTable.IsExternallyAttributed, + StringTable.MinimumPagesViewed, + StringTable.UrlExpression, + StringTable.UrlOperator, + + // Brand List + StringTable.BrandId, + StringTable.BrandUrl, + StringTable.BrandName, + StringTable.StatusDateTime, }; private static final Map columnIndexMap = initializeMap(); diff --git a/src/main/java/com/microsoft/bingads/v13/internal/bulk/StringExtensions.java b/src/main/java/com/microsoft/bingads/v13/internal/bulk/StringExtensions.java index afe87f5508..f45492592e 100644 --- a/src/main/java/com/microsoft/bingads/v13/internal/bulk/StringExtensions.java +++ b/src/main/java/com/microsoft/bingads/v13/internal/bulk/StringExtensions.java @@ -24,6 +24,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.internal.restful.adaptor.AdaptorUtil; import com.microsoft.bingads.v13.bulk.entities.BulkFeed.FeedCustomAttribute; import com.microsoft.bingads.v13.bulk.entities.LocationTargetType; import com.microsoft.bingads.v13.bulk.entities.Status; @@ -63,6 +64,7 @@ import com.microsoft.bingads.v13.campaignmanagement.Date; import com.microsoft.bingads.v13.campaignmanagement.Day; import com.microsoft.bingads.v13.campaignmanagement.DayTime; +import com.microsoft.bingads.v13.campaignmanagement.DeviceType; import com.microsoft.bingads.v13.campaignmanagement.EnhancedCpcBiddingScheme; import com.microsoft.bingads.v13.campaignmanagement.FixedBid; import com.microsoft.bingads.v13.campaignmanagement.FrequencyCapSettings; @@ -442,13 +444,14 @@ public static AdRotation parseAdRotation(String v) { return null; } - try { - AdRotation rotation = new AdRotation(); - rotation.setType(AdRotationType.fromValue(v)); - return rotation; - } catch (IllegalArgumentException e) { - return null; + AdRotation rotation = new AdRotation(); + AdRotationType type = fromValueOptional(v, AdRotationType.class); + if (type == null) + { + return null; } + rotation.setType(type); + return rotation; } public static boolean isTurnedOn(String v) { @@ -772,7 +775,7 @@ public static LocationTargetType parseLocationTargetType(String s) { } else if (s.equals("Postal Code")) { return LocationTargetType.POSTAL_CODE; } else { - return LocationTargetType.fromValue(s); + return fromValueOptional(s, LocationTargetType.class); } } @@ -1139,7 +1142,7 @@ public static List parseAgeRangeList(String v) for(String e : enums) { if (!StringExtensions.isNullOrEmpty(e) && ! ";".equals(e)) - enumList.add(AgeRange.fromValue(e)); + enumList.add(fromValueOptional(e, AgeRange.class)); } return enumList; @@ -1173,7 +1176,7 @@ public static List parseGenderTypeList(String v) for(String e : enums) { if (!StringExtensions.isNullOrEmpty(e) && ! ";".equals(e)) - enumList.add(GenderType.fromValue(e)); + enumList.add(fromValueOptional(e, GenderType.class)); } return enumList; @@ -1207,12 +1210,14 @@ public static Collection parseCampaignTypeList(String v, String se for(String e : enums) { if (!StringExtensions.isNullOrEmpty(e) && ! separator.equals(e)) - enumList.add(CampaignType.fromValue(e.trim())); + enumList.add(fromValueOptional(e.trim(), CampaignType.class)); } return enumList; } + + public static String toCampaignAssociationsBulkString(String separator, ArrayOfCampaignAssociation associations) { if (associations == null) @@ -1238,6 +1243,40 @@ public static String toCampaignAssociationsBulkString(String separator, ArrayOfC return result.toString(); } + public static String toDeviceTypeListBulkString(String separator, Collection types) + { + if (types == null || types.size() == 0) { + return null; + } + + StringBuilder result = new StringBuilder(""); + + int length = types.size(); + for (DeviceType type : types) { + result.append(type.value() + separator); + } + + result.setLength(result.length() - separator.length()); + return result.toString(); + } + + public static Collection parseDeviceTypeList(String v, String separator) + { + if (StringExtensions.isNullOrEmpty(v)) + return null; + + Collection enumList = new ArrayList(); + + String[] enums = v.split(separator); + + for(String e : enums) { + if (!StringExtensions.isNullOrEmpty(e) && ! separator.equals(e)) + enumList.add(fromValueOptional(e.trim(), DeviceType.class)); + } + + return enumList; + } + public static ArrayOfCampaignAssociation parseCampaignAssociations(String v, String separator) { if (StringExtensions.isNullOrEmpty(v)) @@ -1972,7 +2011,7 @@ public static HotelSetting parseHotelSetting(String value) { if (value != null) { String[] values = value.trim().replace('|', ',').split(","); if (values != null && values.length > 0) { - List hotelAdGroupTypes = Arrays.stream(values).filter(v -> v.isEmpty() == false).map(v -> HotelAdGroupType.fromValue(v.trim())) + List hotelAdGroupTypes = Arrays.stream(values).filter(v -> v.isEmpty() == false).map(v -> fromValueOptional(v.trim(), HotelAdGroupType.class)) .collect(Collectors.toList()); if (hotelAdGroupTypes.isEmpty() == false) { HotelSetting setting = new HotelSetting(); @@ -2019,7 +2058,7 @@ public static List parseTargetSettingDetails(String details .filter(s -> s != null ) .map(s -> { TargetSettingDetail targetSettingDetail = new TargetSettingDetail(); - targetSettingDetail.setCriterionTypeGroup(CriterionTypeGroup.fromValue(s)); + targetSettingDetail.setCriterionTypeGroup(fromValueOptional(s, CriterionTypeGroup.class)); targetSettingDetail.setTargetAndBid(true); return targetSettingDetail; }) @@ -2056,7 +2095,7 @@ public static ArrayOfstring parseArrayOfString(String value) { public static Collection parseProductAudienceType(String value) { if (isNullOrEmpty(value) ) return null; String[] parts = value.split(";"); - return Arrays.stream(parts).map(s -> s.trim()).map(p -> ProductAudienceType.fromValue(p)).collect(Collectors.toList()); + return Arrays.stream(parts).map(s -> s.trim()).map(p -> fromValueOptional(p, ProductAudienceType.class)).collect(Collectors.toList()); } @JsonIgnoreProperties(ignoreUnknown = true) @@ -2211,7 +2250,7 @@ public static ArrayOfAssetLink parseImageAssetLinks(String value) for (ImageAssetLinkContract contract : imageAssetLinkContracts) { AssetLink assetLink = new AssetLink(); if (contract.editorialStatus != null) { - assetLink.setEditorialStatus(AssetLinkEditorialStatus.fromValue(contract.editorialStatus)); + assetLink.setEditorialStatus(fromValueOptional(contract.editorialStatus, AssetLinkEditorialStatus.class)); } assetLink.setAssetPerformanceLabel(contract.assetPerformanceLabel); assetLink.setPinnedField(contract.pinnedField); @@ -2289,7 +2328,7 @@ public static ArrayOfAssetLink parseTextAssetLinks(String value) for (TextAssetLinkContract contract : textAssetLinkContracts) { AssetLink assetLink = new AssetLink(); if (contract.editorialStatus != null) { - assetLink.setEditorialStatus(AssetLinkEditorialStatus.fromValue(contract.editorialStatus)); + assetLink.setEditorialStatus(fromValueOptional(contract.editorialStatus, AssetLinkEditorialStatus.class)); } assetLink.setAssetPerformanceLabel(contract.assetPerformanceLabel); assetLink.setPinnedField(contract.pinnedField); @@ -2363,7 +2402,7 @@ public static ArrayOfAssetLink parseVideoAssetLinks(String value) for (VideoAssetLinkContract contract : videoAssetLinkContracts) { AssetLink assetLink = new AssetLink(); if (contract.editorialStatus != null) { - assetLink.setEditorialStatus(AssetLinkEditorialStatus.fromValue(contract.editorialStatus)); + assetLink.setEditorialStatus(fromValueOptional(contract.editorialStatus, AssetLinkEditorialStatus.class)); } assetLink.setAssetPerformanceLabel(contract.assetPerformanceLabel); assetLink.setPinnedField(contract.pinnedField); @@ -2420,6 +2459,22 @@ public static List parseFeedCustomAttributes(String strCust } return null; } + + public static > T fromValueOptional(String v, Class enumClass) { + for (T c: enumClass.getEnumConstants()) { + String value = AdaptorUtil.toCamelcase(c.name()); + // EditorialStatus.java is written manually, it should be changed to follow the same pattern as other enums. + if (value == "APPROVEDLIMITED") + { + value = "APPROVED_LIMITED"; + } + if (value.equalsIgnoreCase(v)) { + return c; + } + } + + return null; + } public static void writeBiddingScheme(BiddingScheme biddingScheme, Long entityId, RowValues values) { try { diff --git a/src/main/java/com/microsoft/bingads/v13/internal/bulk/StringTable.java b/src/main/java/com/microsoft/bingads/v13/internal/bulk/StringTable.java index d6eeb91da7..f1f90b98e5 100644 --- a/src/main/java/com/microsoft/bingads/v13/internal/bulk/StringTable.java +++ b/src/main/java/com/microsoft/bingads/v13/internal/bulk/StringTable.java @@ -549,6 +549,14 @@ public class StringTable { public static final String AdGroupNegativeCustomerListAssociation = "Ad Group Negative Customer List Association"; public static final String CampaignCustomerListAssociation = "Campaign Customer List Association"; public static final String CampaignNegativeCustomerListAssociation = "Campaign Negative Customer List Association"; + public static final String ImpressionBasedRemarketingList = "Impression Based Remarketing List"; + public static final String AdGroupImpressionBasedRemarketingListAssociation = "Ad Group Impression Based Remarketing List Association"; + public static final String AdGroupNegativeImpressionBasedRemarketingListAssociation = "Ad Group Negative Impression Based Remarketing List Association"; + public static final String CampaignImpressionBasedRemarketingListAssociation = "Campaign Impression Based Remarketing List Association"; + public static final String CampaignNegativeImpressionBasedRemarketingListAssociation = "Campaign Negative Impression Based Remarketing List Association"; + public static final String EntityType = "Entity Type"; + public static final String ImpressionCampaignId = "Impression Campaign Id"; + public static final String ImpressionAdGroupId = "Impression Ad Group Id"; // Structured Snippet Ad Extension @@ -752,6 +760,9 @@ public class StringTable { public static final String ParentListingGroupId = "Parent Listing Group Id"; public static final String AutoGeneratedTextOptOut = "Auto Generated Text Assets Opt Out"; public static final String AutoGeneratedImageOptOut = "Auto Generated Image Assets Opt Out"; + public static final String CostPerSaleOptOut = "Cost Per Sale Opt Out"; + public static final String AssetGroupSearchTheme = "Asset Group Search Theme"; + public static final String SearchTheme = "Search Theme"; // MultiChannel Campaign public static final String DestinationChannel = "Destination Channel"; @@ -766,6 +777,52 @@ public class StringTable { // DNV Serving on MSAN public static final String ShouldServeOnMSAN = "Should Serve On MSAN"; + // Conversion Goal + public static final String AttributionModelType = "Attribution Model Type"; + public static final String ConversionWindowInMinutes = "Conversion Window In Minutes"; + public static final String CountType = "Count Type"; + public static final String ExcludeFromBidding = "Exclude From Bidding"; + public static final String GoalCategory = "Goal Category"; + public static final String IsEnhancedConversionsEnabled = "Is Enhanced Conversions Enabled"; + public static final String RevenueType = "Revenue Type"; + public static final String RevenueValue = "Revenue Value"; + public static final String TrackingStatus = "Tracking Status"; + public static final String ViewThroughConversionWindowInMinutes = "View Through Conversion Window In Minutes"; + public static final String MinimumDurationInSecond = "Minimum Duration In Second"; + public static final String ActionExpression = "Action Expression"; + public static final String ActionOperator = "Action Operator"; + public static final String CategoryExpression = "Category Expression"; + public static final String CategoryOperator = "Category Operator"; + public static final String LabelExpression = "Label Expression"; + public static final String LabelOperator = "Label Operator"; + public static final String EventValue = "Event Value"; + public static final String EventValueOperator = "Event Value Operator"; + public static final String IsExternallyAttributed = "Is Externally Attributed"; + public static final String MinimumPagesViewed = "Minimum Pages Viewed"; + public static final String UrlExpression = "URL Expression"; + public static final String UrlOperator = "URL Operator"; + public static final String ConversionGoal = "Conversion Goal"; + public static final String EventGoal = "Event Goal"; + public static final String AppInstallGoal = "AppInstall Goal"; + public static final String MultiStageGoal = "MultiStage Goal"; + public static final String DurationGoal = "Duration Goal"; + public static final String OfflineConversionGoal = "OfflineConversion Goal"; + public static final String UrlGoal = "URL Goal"; + public static final String InStoreTransactionGoal = "InStoreTransaction Goal"; + public static final String PagesViewedPerVisitGoal = "PagesViewedPerVisit Goal"; + public static final String SmartGoal = "Smart Goal"; + public static final String InStoreVisitGoal = "InStoreVisit Goal"; + public static final String ProductGoal = "Product Goal"; + + // Brand List + public static final String BrandList = "Brand List"; + public static final String BrandItem = "Brand Item"; + public static final String CampaignBrandList = "Campaign Brand List Association"; + public static final String BrandId = "Brand Id"; + public static final String BrandUrl = "Brand Url"; + public static final String BrandName = "Brand Name"; + public static final String StatusDateTime = "Editorial Status Date"; + static { Map m = new HashMap(); diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/BulkAssetGroupSearchThemeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/BulkAssetGroupSearchThemeTest.java new file mode 100644 index 0000000000..49d7d66cf3 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/BulkAssetGroupSearchThemeTest.java @@ -0,0 +1,71 @@ +package com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme; + +import java.util.Map; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.internal.functionalinterfaces.Supplier; +import com.microsoft.bingads.v13.api.test.entities.BulkEntityTest; +import com.microsoft.bingads.v13.api.test.entities.EqualityComparerWithDescription; +import com.microsoft.bingads.v13.bulk.entities.BulkAssetGroupSearchTheme; +import com.microsoft.bingads.v13.campaignmanagement.AssetGroupSearchTheme; + +public abstract class BulkAssetGroupSearchThemeTest extends BulkEntityTest { + + @Override + protected void onEntityCreation(BulkAssetGroupSearchTheme entity) { + AssetGroupSearchTheme AssetGroupSearchTheme = new AssetGroupSearchTheme(); + AssetGroupSearchTheme.setId(100L); + entity.setAssetGroupSearchTheme(AssetGroupSearchTheme); + } + + @Override + protected void testWriteProperty(String header, + String expectedRowValue, TProperty propertyValue, + BiConsumer setFunc) { + this.testWriteProperty(header, expectedRowValue, propertyValue, setFunc, new Supplier() { + @Override + public BulkAssetGroupSearchTheme get() { + return new BulkAssetGroupSearchTheme(); + } + }); + } + + @Override + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkAssetGroupSearchTheme get() { + return new BulkAssetGroupSearchTheme(); + } + }); + } + + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkAssetGroupSearchTheme get() { + return new BulkAssetGroupSearchTheme(); + } + }, comparer); + } + + @Override + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkAssetGroupSearchTheme get() { + return new BulkAssetGroupSearchTheme(); + } + }); + } + + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkAssetGroupSearchTheme get() { + return new BulkAssetGroupSearchTheme(); + } + }, comparer); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/BulkAssetGroupSearchThemeTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/BulkAssetGroupSearchThemeTests.java new file mode 100644 index 0000000000..30985eb9a1 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/BulkAssetGroupSearchThemeTests.java @@ -0,0 +1,14 @@ +package com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +import com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.read.BulkAssetGroupSearchThemeReadTests; +import com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.write.BulkAssetGroupSearchThemeWriteTests; + +@RunWith(Suite.class) +@SuiteClasses({BulkAssetGroupSearchThemeReadTests.class, BulkAssetGroupSearchThemeWriteTests.class}) +public class BulkAssetGroupSearchThemeTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/read/BulkAssetGroupSearchThemeReadFromRowValuesIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/read/BulkAssetGroupSearchThemeReadFromRowValuesIdTest.java new file mode 100644 index 0000000000..d0608f0f09 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/read/BulkAssetGroupSearchThemeReadFromRowValuesIdTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.BulkAssetGroupSearchThemeTest; +import com.microsoft.bingads.v13.bulk.entities.BulkAssetGroupSearchTheme; + +@RunWith(Parameterized.class) +public class BulkAssetGroupSearchThemeReadFromRowValuesIdTest extends BulkAssetGroupSearchThemeTest { + + @Parameter(value = 1) + public Long expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Id", this.datum, this.expectedResult, new Function() { + @Override + public Long apply(BulkAssetGroupSearchTheme c) { + return c.getAssetGroupSearchTheme().getId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/read/BulkAssetGroupSearchThemeReadFromRowValuesParentIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/read/BulkAssetGroupSearchThemeReadFromRowValuesParentIdTest.java new file mode 100644 index 0000000000..64600a4808 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/read/BulkAssetGroupSearchThemeReadFromRowValuesParentIdTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.BulkAssetGroupSearchThemeTest; +import com.microsoft.bingads.v13.bulk.entities.BulkAssetGroupSearchTheme; + +@RunWith(Parameterized.class) +public class BulkAssetGroupSearchThemeReadFromRowValuesParentIdTest extends BulkAssetGroupSearchThemeTest { + + @Parameter(value = 1) + public Long expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Parent Id", this.datum, this.expectedResult, new Function() { + @Override + public Long apply(BulkAssetGroupSearchTheme c) { + return c.getAssetGroupId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/read/BulkAssetGroupSearchThemeReadFromRowValuesSearchThemeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/read/BulkAssetGroupSearchThemeReadFromRowValuesSearchThemeTest.java new file mode 100644 index 0000000000..3da8a19af6 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/read/BulkAssetGroupSearchThemeReadFromRowValuesSearchThemeTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.BulkAssetGroupSearchThemeTest; +import com.microsoft.bingads.v13.bulk.entities.BulkAssetGroupSearchTheme; + +@RunWith(Parameterized.class) +public class BulkAssetGroupSearchThemeReadFromRowValuesSearchThemeTest extends BulkAssetGroupSearchThemeTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"SearchTheme", "SearchTheme"}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Search Theme", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkAssetGroupSearchTheme c) { + return c.getAssetGroupSearchTheme().getSearchTheme(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/read/BulkAssetGroupSearchThemeReadTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/read/BulkAssetGroupSearchThemeReadTests.java new file mode 100644 index 0000000000..f7ea11099f --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/read/BulkAssetGroupSearchThemeReadTests.java @@ -0,0 +1,15 @@ +package com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.read; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkAssetGroupSearchThemeReadFromRowValuesIdTest.class, + BulkAssetGroupSearchThemeReadFromRowValuesParentIdTest.class, + BulkAssetGroupSearchThemeReadFromRowValuesSearchThemeTest.class, +}) +public class BulkAssetGroupSearchThemeReadTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/write/BulkAssetGroupSearchThemeWriteTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/write/BulkAssetGroupSearchThemeWriteTests.java new file mode 100644 index 0000000000..8c4861bb2e --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/write/BulkAssetGroupSearchThemeWriteTests.java @@ -0,0 +1,16 @@ +package com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.write; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkAssetGroupSearchThemeWriteToRowValuesIdTest.class, + BulkAssetGroupSearchThemeWriteToRowValuesParentIdTest.class, + BulkAssetGroupSearchThemeWriteToRowValuesSearchThemeTest.class, + +}) +public class BulkAssetGroupSearchThemeWriteTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/write/BulkAssetGroupSearchThemeWriteToRowValuesIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/write/BulkAssetGroupSearchThemeWriteToRowValuesIdTest.java new file mode 100644 index 0000000000..65e6d44344 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/write/BulkAssetGroupSearchThemeWriteToRowValuesIdTest.java @@ -0,0 +1,40 @@ +package com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.BulkAssetGroupSearchThemeTest; +import com.microsoft.bingads.v13.bulk.entities.BulkAssetGroupSearchTheme; + +@RunWith(Parameterized.class) +public class BulkAssetGroupSearchThemeWriteToRowValuesIdTest extends BulkAssetGroupSearchThemeTest { + + @Parameter(value = 1) + public Long propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkAssetGroupSearchTheme c, Long v) { + c.getAssetGroupSearchTheme().setId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/write/BulkAssetGroupSearchThemeWriteToRowValuesParentIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/write/BulkAssetGroupSearchThemeWriteToRowValuesParentIdTest.java new file mode 100644 index 0000000000..eea394e131 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/write/BulkAssetGroupSearchThemeWriteToRowValuesParentIdTest.java @@ -0,0 +1,40 @@ +package com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.BulkAssetGroupSearchThemeTest; +import com.microsoft.bingads.v13.bulk.entities.BulkAssetGroupSearchTheme; + +@RunWith(Parameterized.class) +public class BulkAssetGroupSearchThemeWriteToRowValuesParentIdTest extends BulkAssetGroupSearchThemeTest { + + @Parameter(value = 1) + public Long propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Parent Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkAssetGroupSearchTheme c, Long v) { + c.setAssetGroupId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/write/BulkAssetGroupSearchThemeWriteToRowValuesSearchThemeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/write/BulkAssetGroupSearchThemeWriteToRowValuesSearchThemeTest.java new file mode 100644 index 0000000000..b580ebeed1 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/asset_group_search_theme/write/BulkAssetGroupSearchThemeWriteToRowValuesSearchThemeTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.asset_group_search_theme.BulkAssetGroupSearchThemeTest; +import com.microsoft.bingads.v13.bulk.entities.BulkAssetGroupSearchTheme; + +@RunWith(Parameterized.class) +public class BulkAssetGroupSearchThemeWriteToRowValuesSearchThemeTest extends BulkAssetGroupSearchThemeTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Search Theme", "Search Theme"}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Search Theme", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkAssetGroupSearchTheme c, String v) { + c.getAssetGroupSearchTheme().setSearchTheme(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/BulkBrandItemTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/BulkBrandItemTest.java new file mode 100644 index 0000000000..07cd94c8d0 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/BulkBrandItemTest.java @@ -0,0 +1,71 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item; + +import java.util.Map; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.internal.functionalinterfaces.Supplier; +import com.microsoft.bingads.v13.api.test.entities.BulkEntityTest; +import com.microsoft.bingads.v13.api.test.entities.EqualityComparerWithDescription; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; +import com.microsoft.bingads.v13.campaignmanagement.BrandItem; + +public abstract class BulkBrandItemTest extends BulkEntityTest { + + @Override + protected void onEntityCreation(BulkBrandItem entity) { + BrandItem BrandItem = new BrandItem(); + BrandItem.setBrandId(100L); + entity.setBrandItem(BrandItem); + } + + @Override + protected void testWriteProperty(String header, + String expectedRowValue, TProperty propertyValue, + BiConsumer setFunc) { + this.testWriteProperty(header, expectedRowValue, propertyValue, setFunc, new Supplier() { + @Override + public BulkBrandItem get() { + return new BulkBrandItem(); + } + }); + } + + @Override + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkBrandItem get() { + return new BulkBrandItem(); + } + }); + } + + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkBrandItem get() { + return new BulkBrandItem(); + } + }, comparer); + } + + @Override + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkBrandItem get() { + return new BulkBrandItem(); + } + }); + } + + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkBrandItem get() { + return new BulkBrandItem(); + } + }, comparer); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/BulkBrandItemTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/BulkBrandItemTests.java new file mode 100644 index 0000000000..7c2140f2da --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/BulkBrandItemTests.java @@ -0,0 +1,14 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +import com.microsoft.bingads.v13.api.test.entities.brand_item.read.BulkBrandItemReadTests; +import com.microsoft.bingads.v13.api.test.entities.brand_item.write.BulkBrandItemWriteTests; + +@RunWith(Suite.class) +@SuiteClasses({BulkBrandItemReadTests.class, BulkBrandItemWriteTests.class}) +public class BulkBrandItemTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesBrandIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesBrandIdTest.java new file mode 100644 index 0000000000..3a358cb97d --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesBrandIdTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemReadFromRowValuesBrandIdTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public Long expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Brand Id", this.datum, this.expectedResult, new Function() { + @Override + public Long apply(BulkBrandItem c) { + return c.getBrandItem().getBrandId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesBrandNameTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesBrandNameTest.java new file mode 100644 index 0000000000..7fe02d9f85 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesBrandNameTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemReadFromRowValuesBrandNameTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Brand Name", "Brand Name"}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Brand Name", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkBrandItem c) { + return c.getBrandName(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesBrandUrlTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesBrandUrlTest.java new file mode 100644 index 0000000000..5e966d2f5f --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesBrandUrlTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemReadFromRowValuesBrandUrlTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"https://www.bing.com", "https://www.bing.com"}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Brand Url", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkBrandItem c) { + return c.getBrandUrl(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesEditorialStatusTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesEditorialStatusTest.java new file mode 100644 index 0000000000..02e219df2f --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesEditorialStatusTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemReadFromRowValuesEditorialStatusTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Pending", "Pending"}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Editorial Status", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkBrandItem c) { + return c.getEditorialStatus(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesIdTest.java new file mode 100644 index 0000000000..22bcffd568 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesIdTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemReadFromRowValuesIdTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public Long expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Id", this.datum, this.expectedResult, new Function() { + @Override + public Long apply(BulkBrandItem c) { + return c.getId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesNameTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesNameTest.java new file mode 100644 index 0000000000..bd3d613da6 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesNameTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemReadFromRowValuesNameTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Brand Item Name", "Brand Item Name"}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Name", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkBrandItem c) { + return c.getName(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesParentIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesParentIdTest.java new file mode 100644 index 0000000000..4deb39903a --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesParentIdTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemReadFromRowValuesParentIdTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public Long expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Parent Id", this.datum, this.expectedResult, new Function() { + @Override + public Long apply(BulkBrandItem c) { + return c.getBrandListId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesStatusDateTimeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesStatusDateTimeTest.java new file mode 100644 index 0000000000..3aa41360fd --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadFromRowValuesStatusDateTimeTest.java @@ -0,0 +1,51 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.read; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Collection; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemReadFromRowValuesStatusDateTimeTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public Calendar expectedResult; + + @Parameters + public static Collection data() throws ParseException { + String timeString = "02/01/2014 12:24:30"; + + GregorianCalendar expetedSyncTime = new GregorianCalendar(); + SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); + format.setTimeZone(TimeZone.getTimeZone("UTC")); + expetedSyncTime.setTime(format.parse(timeString)); + + return Arrays.asList(new Object[][]{ + {timeString, expetedSyncTime}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Editorial Status Date", this.datum, this.expectedResult, new Function() { + @Override + public Calendar apply(BulkBrandItem c) { + return c.getEditorialStatusDate(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadTests.java new file mode 100644 index 0000000000..a0e15bf50a --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/read/BulkBrandItemReadTests.java @@ -0,0 +1,20 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.read; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkBrandItemReadFromRowValuesIdTest.class, + BulkBrandItemReadFromRowValuesParentIdTest.class, + BulkBrandItemReadFromRowValuesNameTest.class, + BulkBrandItemReadFromRowValuesBrandIdTest.class, + BulkBrandItemReadFromRowValuesBrandNameTest.class, + BulkBrandItemReadFromRowValuesBrandUrlTest.class, + BulkBrandItemReadFromRowValuesEditorialStatusTest.class, + BulkBrandItemReadFromRowValuesStatusDateTimeTest.class, +}) +public class BulkBrandItemReadTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteTests.java new file mode 100644 index 0000000000..3dce43e6b3 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteTests.java @@ -0,0 +1,20 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.write; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkBrandItemWriteToRowValuesIdTest.class, + BulkBrandItemWriteToRowValuesParentIdTest.class, + BulkBrandItemWriteToRowValuesNameTest.class, + BulkBrandItemWriteToRowValuesBrandNameTest.class, + BulkBrandItemWriteToRowValuesBrandIdTest.class, + BulkBrandItemWriteToRowValuesBrandUrlTest.class, + BulkBrandItemWriteToRowValuesEditorialStatusTest.class, + BulkBrandItemWriteToRowValuesStatusDateTimeTest.class, +}) +public class BulkBrandItemWriteTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesBrandIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesBrandIdTest.java new file mode 100644 index 0000000000..8485856277 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesBrandIdTest.java @@ -0,0 +1,40 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemWriteToRowValuesBrandIdTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public Long propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Brand Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkBrandItem c, Long v) { + c.getBrandItem().setBrandId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesBrandNameTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesBrandNameTest.java new file mode 100644 index 0000000000..60d1209d69 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesBrandNameTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemWriteToRowValuesBrandNameTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Brand Name", "Brand Name"}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Brand Name", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkBrandItem c, String v) { + c.setBrandName(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesBrandUrlTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesBrandUrlTest.java new file mode 100644 index 0000000000..9503766440 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesBrandUrlTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemWriteToRowValuesBrandUrlTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"https://www.bing.com", "https://www.bing.com"}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Brand Url", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkBrandItem c, String v) { + c.setBrandUrl(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesEditorialStatusTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesEditorialStatusTest.java new file mode 100644 index 0000000000..acf926248b --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesEditorialStatusTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemWriteToRowValuesEditorialStatusTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Brand List Name", "Brand List Name"}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Editorial Status", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkBrandItem c, String v) { + c.setEditorialStatus(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesIdTest.java new file mode 100644 index 0000000000..7a45bee1d8 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesIdTest.java @@ -0,0 +1,40 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemWriteToRowValuesIdTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public Long propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkBrandItem c, Long v) { + c.setId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesNameTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesNameTest.java new file mode 100644 index 0000000000..fad291e64a --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesNameTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemWriteToRowValuesNameTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Brand Item Name", "Brand Item Name"}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Name", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkBrandItem c, String v) { + c.setName(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesParentIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesParentIdTest.java new file mode 100644 index 0000000000..04739a7b05 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesParentIdTest.java @@ -0,0 +1,40 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemWriteToRowValuesParentIdTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public Long propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Parent Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkBrandItem c, Long v) { + c.setBrandListId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesStatusDateTimeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesStatusDateTimeTest.java new file mode 100644 index 0000000000..9df34e8095 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_item/write/BulkBrandItemWriteToRowValuesStatusDateTimeTest.java @@ -0,0 +1,52 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_item.write; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Calendar; +import java.util.Collection; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.brand_item.BulkBrandItemTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandItem; + +@RunWith(Parameterized.class) +public class BulkBrandItemWriteToRowValuesStatusDateTimeTest extends BulkBrandItemTest { + + @Parameter(value = 1) + public Calendar propertyValue; + + @Parameters + public static Collection data() throws ParseException { + + String timeString = "07/06/2017 22:34:30"; + + GregorianCalendar expectedSyncTime = new GregorianCalendar(); + SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); + format.setTimeZone(TimeZone.getTimeZone("UTC")); + expectedSyncTime.setTime(format.parse(timeString)); + + return Arrays.asList(new Object[][]{ + {timeString, expectedSyncTime}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Editorial Status Date", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkBrandItem c, Calendar v) { + c.setEditorialStatusDate(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/BulkBrandListTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/BulkBrandListTest.java new file mode 100644 index 0000000000..4508214707 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/BulkBrandListTest.java @@ -0,0 +1,71 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_list; + +import java.util.Map; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.internal.functionalinterfaces.Supplier; +import com.microsoft.bingads.v13.api.test.entities.BulkEntityTest; +import com.microsoft.bingads.v13.api.test.entities.EqualityComparerWithDescription; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandList; +import com.microsoft.bingads.v13.campaignmanagement.BrandList; + +public abstract class BulkBrandListTest extends BulkEntityTest { + + @Override + protected void onEntityCreation(BulkBrandList entity) { + BrandList BrandList = new BrandList(); + BrandList.setId(100L); + entity.setBrandList(BrandList); + } + + @Override + protected void testWriteProperty(String header, + String expectedRowValue, TProperty propertyValue, + BiConsumer setFunc) { + this.testWriteProperty(header, expectedRowValue, propertyValue, setFunc, new Supplier() { + @Override + public BulkBrandList get() { + return new BulkBrandList(); + } + }); + } + + @Override + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkBrandList get() { + return new BulkBrandList(); + } + }); + } + + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkBrandList get() { + return new BulkBrandList(); + } + }, comparer); + } + + @Override + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkBrandList get() { + return new BulkBrandList(); + } + }); + } + + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkBrandList get() { + return new BulkBrandList(); + } + }, comparer); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/BulkBrandListTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/BulkBrandListTests.java new file mode 100644 index 0000000000..d268508df3 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/BulkBrandListTests.java @@ -0,0 +1,14 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_list; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +import com.microsoft.bingads.v13.api.test.entities.brand_list.read.BulkBrandListReadTests; +import com.microsoft.bingads.v13.api.test.entities.brand_list.write.BulkBrandListWriteTests; + +@RunWith(Suite.class) +@SuiteClasses({BulkBrandListReadTests.class, BulkBrandListWriteTests.class}) +public class BulkBrandListTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/read/BulkBrandListReadFromRowValuesIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/read/BulkBrandListReadFromRowValuesIdTest.java new file mode 100644 index 0000000000..360583ff12 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/read/BulkBrandListReadFromRowValuesIdTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_list.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.brand_list.BulkBrandListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandList; + +@RunWith(Parameterized.class) +public class BulkBrandListReadFromRowValuesIdTest extends BulkBrandListTest { + + @Parameter(value = 1) + public Long expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Id", this.datum, this.expectedResult, new Function() { + @Override + public Long apply(BulkBrandList c) { + return c.getBrandList().getId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/read/BulkBrandListReadFromRowValuesNameTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/read/BulkBrandListReadFromRowValuesNameTest.java new file mode 100644 index 0000000000..058775a08e --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/read/BulkBrandListReadFromRowValuesNameTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_list.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.brand_list.BulkBrandListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandList; + +@RunWith(Parameterized.class) +public class BulkBrandListReadFromRowValuesNameTest extends BulkBrandListTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Brand List Name", "Brand List Name"}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Name", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkBrandList c) { + return c.getBrandList().getName(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/read/BulkBrandListReadFromRowValuesParentIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/read/BulkBrandListReadFromRowValuesParentIdTest.java new file mode 100644 index 0000000000..32a54c0bb9 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/read/BulkBrandListReadFromRowValuesParentIdTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_list.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.brand_list.BulkBrandListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandList; + +@RunWith(Parameterized.class) +public class BulkBrandListReadFromRowValuesParentIdTest extends BulkBrandListTest { + + @Parameter(value = 1) + public Long expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Parent Id", this.datum, this.expectedResult, new Function() { + @Override + public Long apply(BulkBrandList c) { + return c.getAccountId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/read/BulkBrandListReadTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/read/BulkBrandListReadTests.java new file mode 100644 index 0000000000..0163aac735 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/read/BulkBrandListReadTests.java @@ -0,0 +1,15 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_list.read; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkBrandListReadFromRowValuesIdTest.class, + BulkBrandListReadFromRowValuesParentIdTest.class, + BulkBrandListReadFromRowValuesNameTest.class, +}) +public class BulkBrandListReadTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/write/BulkBrandListWriteTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/write/BulkBrandListWriteTests.java new file mode 100644 index 0000000000..57f90d245c --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/write/BulkBrandListWriteTests.java @@ -0,0 +1,16 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_list.write; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkBrandListWriteToRowValuesIdTest.class, + BulkBrandListWriteToRowValuesParentIdTest.class, + BulkBrandListWriteToRowValuesNameTest.class, + +}) +public class BulkBrandListWriteTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/write/BulkBrandListWriteToRowValuesIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/write/BulkBrandListWriteToRowValuesIdTest.java new file mode 100644 index 0000000000..e44228c643 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/write/BulkBrandListWriteToRowValuesIdTest.java @@ -0,0 +1,40 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_list.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.brand_list.BulkBrandListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandList; + +@RunWith(Parameterized.class) +public class BulkBrandListWriteToRowValuesIdTest extends BulkBrandListTest { + + @Parameter(value = 1) + public Long propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkBrandList c, Long v) { + c.getBrandList().setId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/write/BulkBrandListWriteToRowValuesNameTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/write/BulkBrandListWriteToRowValuesNameTest.java new file mode 100644 index 0000000000..2d0c697fef --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/write/BulkBrandListWriteToRowValuesNameTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_list.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.brand_list.BulkBrandListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandList; + +@RunWith(Parameterized.class) +public class BulkBrandListWriteToRowValuesNameTest extends BulkBrandListTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Brand List Name", "Brand List Name"}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Name", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkBrandList c, String v) { + c.getBrandList().setName(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/write/BulkBrandListWriteToRowValuesParentIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/write/BulkBrandListWriteToRowValuesParentIdTest.java new file mode 100644 index 0000000000..3ce2e1e859 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/brand_list/write/BulkBrandListWriteToRowValuesParentIdTest.java @@ -0,0 +1,40 @@ +package com.microsoft.bingads.v13.api.test.entities.brand_list.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.brand_list.BulkBrandListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkBrandList; + +@RunWith(Parameterized.class) +public class BulkBrandListWriteToRowValuesParentIdTest extends BulkBrandListTest { + + @Parameter(value = 1) + public Long propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Parent Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkBrandList c, Long v) { + c.setAccountId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign/BulkCampaignWriteTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign/BulkCampaignWriteTests.java index 18ed7e2355..58c7c08180 100644 --- a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign/BulkCampaignWriteTests.java +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign/BulkCampaignWriteTests.java @@ -48,6 +48,7 @@ BulkCampaignWriteToRowValuesImageOptOutPerformanceMaxSettingTest.class, BulkCampaignWriteToRowValuesPageFeedIdsPerformanceMaxSettingTest.class, BulkCampaignWriteToRowValuesTextOptOutPerformanceMaxSettingTest.class, + BulkCampaignWriteToRowValuesCostPerSaleOptOutTest.class, }) public class BulkCampaignWriteTests { diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign/read/BulkCampaignReadFromRowValuesPerformanceMaxSettingsTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign/read/BulkCampaignReadFromRowValuesPerformanceMaxSettingsTest.java index 79a65ada37..783a2afb1a 100644 --- a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign/read/BulkCampaignReadFromRowValuesPerformanceMaxSettingsTest.java +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign/read/BulkCampaignReadFromRowValuesPerformanceMaxSettingsTest.java @@ -36,7 +36,12 @@ public class BulkCampaignReadFromRowValuesPerformanceMaxSettingsTest extends Bul public String pageFeedIds; @Parameterized.Parameter(value = 5) + public String costPerSaleOptOut; + + @Parameterized.Parameter(value = 6) public List expectedResult; + + @Parameterized.Parameters public static Collection data() { @@ -46,6 +51,7 @@ public static Collection data() { setting1.setFinalUrlExpansionOptOut(true); setting1.setAutoGeneratedTextOptOut(true); setting1.setAutoGeneratedImageOptOut(false); + setting1.setCostPerSaleOptOut(false); setting1.setPageFeedIds(pids); setting1.setType("PerformanceMaxSetting"); @@ -55,13 +61,14 @@ public static Collection data() { setting2.setFinalUrlExpansionOptOut(false); setting2.setAutoGeneratedTextOptOut(false); setting2.setAutoGeneratedImageOptOut(false); + setting2.setCostPerSaleOptOut(true); setting2.setPageFeedIds(pids2); setting2.setType("PerformanceMaxSetting"); return Arrays.asList( new Object[][]{ - {"PerformanceMax", "true", "true", "false", "1;2;3;4", Collections.singletonList(setting1)}, - {"PerformanceMax", "false", "false", "false", "101;102;103;104", Collections.singletonList(setting2)}, + {"PerformanceMax", "true", "true", "false", "1;2;3;4", "false", Collections.singletonList(setting1)}, + {"PerformanceMax", "false", "false", "false", "101;102;103;104", "true", Collections.singletonList(setting2)}, } ); } @@ -75,6 +82,7 @@ public void testRead() { values.put("Auto Generated Text Assets Opt Out", autoGeneratedTextOptOut); values.put("Auto Generated Image Assets Opt Out", autoGeneratedImageOptOut); values.put("Page Feed Ids", pageFeedIds); + values.put("Cost Per Sale Opt Out", costPerSaleOptOut); testReadProperty( values, diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign/write/BulkCampaignWriteToRowValuesCostPerSaleOptOutTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign/write/BulkCampaignWriteToRowValuesCostPerSaleOptOutTest.java new file mode 100644 index 0000000000..ff4285e2c1 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign/write/BulkCampaignWriteToRowValuesCostPerSaleOptOutTest.java @@ -0,0 +1,51 @@ +package com.microsoft.bingads.v13.api.test.entities.campaign.write; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; + +import org.junit.Test; +import org.junit.runners.Parameterized; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.campaign.BulkCampaignTest; +import com.microsoft.bingads.v13.bulk.entities.BulkCampaign; +import com.microsoft.bingads.v13.campaignmanagement.ArrayOfSetting; +import com.microsoft.bingads.v13.campaignmanagement.CampaignType; +import com.microsoft.bingads.v13.campaignmanagement.PerformanceMaxSetting; + +public class BulkCampaignWriteToRowValuesCostPerSaleOptOutTest extends BulkCampaignTest { + @Parameterized.Parameter(value = 1) + public Boolean propertyValue; + + @Parameterized.Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"false", false}, + {"true", true}, + }); + } + + @Test + public void testWrite() { + testWriteProperty( + "Cost Per Sale Opt Out", + datum, + propertyValue, + new BiConsumer() { + @Override + public void accept(BulkCampaign c, Boolean v) { + c.getCampaign().setCampaignType(Collections.singletonList(CampaignType.PERFORMANCE_MAX)); + + c.getCampaign().setSettings(new ArrayOfSetting()); + + PerformanceMaxSetting setting = new PerformanceMaxSetting(); + + setting.setCostPerSaleOptOut(v); + + c.getCampaign().getSettings().getSettings().add(setting); + } + } + ); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/BulkCampaignBrandListAssociationTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/BulkCampaignBrandListAssociationTest.java new file mode 100644 index 0000000000..607496ffe3 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/BulkCampaignBrandListAssociationTest.java @@ -0,0 +1,68 @@ +package com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association; + +import java.util.Map; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.internal.functionalinterfaces.Supplier; +import com.microsoft.bingads.v13.api.test.entities.BulkEntityTest; +import com.microsoft.bingads.v13.api.test.entities.EqualityComparerWithDescription; +import com.microsoft.bingads.v13.bulk.entities.BulkCampaignBrandListAssociation; + +public abstract class BulkCampaignBrandListAssociationTest extends BulkEntityTest { + + @Override + protected void onEntityCreation(BulkCampaignBrandListAssociation entity) { + + } + + @Override + protected void testWriteProperty(String header, + String expectedRowValue, TProperty propertyValue, + BiConsumer setFunc) { + this.testWriteProperty(header, expectedRowValue, propertyValue, setFunc, new Supplier() { + @Override + public BulkCampaignBrandListAssociation get() { + return new BulkCampaignBrandListAssociation(); + } + }); + } + + @Override + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkCampaignBrandListAssociation get() { + return new BulkCampaignBrandListAssociation(); + } + }); + } + + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkCampaignBrandListAssociation get() { + return new BulkCampaignBrandListAssociation(); + } + }, comparer); + } + + @Override + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkCampaignBrandListAssociation get() { + return new BulkCampaignBrandListAssociation(); + } + }); + } + + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkCampaignBrandListAssociation get() { + return new BulkCampaignBrandListAssociation(); + } + }, comparer); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/BulkCampaignBrandListAssociationTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/BulkCampaignBrandListAssociationTests.java new file mode 100644 index 0000000000..d458286dfb --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/BulkCampaignBrandListAssociationTests.java @@ -0,0 +1,14 @@ +package com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +import com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.read.BulkCampaignBrandListAssociationReadTests; +import com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.write.BulkCampaignBrandListAssociationWriteTests; + +@RunWith(Suite.class) +@SuiteClasses({BulkCampaignBrandListAssociationReadTests.class, BulkCampaignBrandListAssociationWriteTests.class}) +public class BulkCampaignBrandListAssociationTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/read/BulkCampaignBrandListAssociationReadFromRowValuesIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/read/BulkCampaignBrandListAssociationReadFromRowValuesIdTest.java new file mode 100644 index 0000000000..0534a63802 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/read/BulkCampaignBrandListAssociationReadFromRowValuesIdTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.BulkCampaignBrandListAssociationTest; +import com.microsoft.bingads.v13.bulk.entities.BulkCampaignBrandListAssociation; + +@RunWith(Parameterized.class) +public class BulkCampaignBrandListAssociationReadFromRowValuesIdTest extends BulkCampaignBrandListAssociationTest { + + @Parameter(value = 1) + public Long expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Id", this.datum, this.expectedResult, new Function() { + @Override + public Long apply(BulkCampaignBrandListAssociation c) { + return c.getId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/read/BulkCampaignBrandListAssociationReadFromRowValuesIsExcludedTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/read/BulkCampaignBrandListAssociationReadFromRowValuesIsExcludedTest.java new file mode 100644 index 0000000000..e4df0ae267 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/read/BulkCampaignBrandListAssociationReadFromRowValuesIsExcludedTest.java @@ -0,0 +1,50 @@ +package com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.BulkCampaignBrandListAssociationTest; +import com.microsoft.bingads.v13.bulk.entities.BulkCampaignBrandListAssociation; + +@RunWith(Parameterized.class) +public class BulkCampaignBrandListAssociationReadFromRowValuesIsExcludedTest extends BulkCampaignBrandListAssociationTest { + + @Parameter(value = 1) + public boolean expectedResult; + + /* + * Test data generator. + * This method is called the the JUnit parameterized test runner and + * returns a Collection of Arrays. For each Array in the Collection, + * each array element corresponds to a parameter in the constructor. + */ + @Parameters + public static Collection data() { + // In this example, the parameter generator returns a List of + // arrays. Each array has two elements: { datum, expected }. + // These data are hard-coded into the class, but they could be + // generated or loaded in any way you like. + return Arrays.asList(new Object[][]{ + {"False", false}, + {"True", true}, + {"", false} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Is Excluded", this.datum, this.expectedResult, new Function() { + @Override + public Boolean apply(BulkCampaignBrandListAssociation c) { + return c.getIsExcluded(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/read/BulkCampaignBrandListAssociationReadFromRowValuesNameTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/read/BulkCampaignBrandListAssociationReadFromRowValuesNameTest.java new file mode 100644 index 0000000000..e64f27e3dd --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/read/BulkCampaignBrandListAssociationReadFromRowValuesNameTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.BulkCampaignBrandListAssociationTest; +import com.microsoft.bingads.v13.bulk.entities.BulkCampaignBrandListAssociation; + +@RunWith(Parameterized.class) +public class BulkCampaignBrandListAssociationReadFromRowValuesNameTest extends BulkCampaignBrandListAssociationTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Camapign Brand List Association Name", "Camapign Brand List Association Name"}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Name", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkCampaignBrandListAssociation c) { + return c.getName(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/read/BulkCampaignBrandListAssociationReadFromRowValuesParentIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/read/BulkCampaignBrandListAssociationReadFromRowValuesParentIdTest.java new file mode 100644 index 0000000000..eacc12679f --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/read/BulkCampaignBrandListAssociationReadFromRowValuesParentIdTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.BulkCampaignBrandListAssociationTest; +import com.microsoft.bingads.v13.bulk.entities.BulkCampaignBrandListAssociation; + +@RunWith(Parameterized.class) +public class BulkCampaignBrandListAssociationReadFromRowValuesParentIdTest extends BulkCampaignBrandListAssociationTest { + + @Parameter(value = 1) + public Long expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Parent Id", this.datum, this.expectedResult, new Function() { + @Override + public Long apply(BulkCampaignBrandListAssociation c) { + return c.getCampaignId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/read/BulkCampaignBrandListAssociationReadTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/read/BulkCampaignBrandListAssociationReadTests.java new file mode 100644 index 0000000000..ea033524da --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/read/BulkCampaignBrandListAssociationReadTests.java @@ -0,0 +1,16 @@ +package com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.read; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkCampaignBrandListAssociationReadFromRowValuesIdTest.class, + BulkCampaignBrandListAssociationReadFromRowValuesParentIdTest.class, + BulkCampaignBrandListAssociationReadFromRowValuesNameTest.class, + BulkCampaignBrandListAssociationReadFromRowValuesIsExcludedTest.class, +}) +public class BulkCampaignBrandListAssociationReadTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/write/BulkCampaignBrandListAssociationWriteTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/write/BulkCampaignBrandListAssociationWriteTests.java new file mode 100644 index 0000000000..645be10e5d --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/write/BulkCampaignBrandListAssociationWriteTests.java @@ -0,0 +1,16 @@ +package com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.write; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkCampaignBrandListAssociationWriteToRowValuesIdTest.class, + BulkCampaignBrandListAssociationWriteToRowValuesParentIdTest.class, + BulkCampaignBrandListAssociationWriteToRowValuesNameTest.class, + BulkCampaignBrandListAssociationWriteToRowValuesIsExcludedTest.class, +}) +public class BulkCampaignBrandListAssociationWriteTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/write/BulkCampaignBrandListAssociationWriteToRowValuesIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/write/BulkCampaignBrandListAssociationWriteToRowValuesIdTest.java new file mode 100644 index 0000000000..3351bfa004 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/write/BulkCampaignBrandListAssociationWriteToRowValuesIdTest.java @@ -0,0 +1,40 @@ +package com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.BulkCampaignBrandListAssociationTest; +import com.microsoft.bingads.v13.bulk.entities.BulkCampaignBrandListAssociation; + +@RunWith(Parameterized.class) +public class BulkCampaignBrandListAssociationWriteToRowValuesIdTest extends BulkCampaignBrandListAssociationTest { + + @Parameter(value = 1) + public Long propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkCampaignBrandListAssociation c, Long v) { + c.setId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/write/BulkCampaignBrandListAssociationWriteToRowValuesIsExcludedTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/write/BulkCampaignBrandListAssociationWriteToRowValuesIsExcludedTest.java new file mode 100644 index 0000000000..df3eaa2e19 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/write/BulkCampaignBrandListAssociationWriteToRowValuesIsExcludedTest.java @@ -0,0 +1,43 @@ +package com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.BulkCampaignBrandListAssociationTest; +import com.microsoft.bingads.v13.bulk.entities.BulkCampaignBrandListAssociation; + +@RunWith(Parameterized.class) +public class BulkCampaignBrandListAssociationWriteToRowValuesIsExcludedTest extends BulkCampaignBrandListAssociationTest { + + @Parameter(value = 1) + public Boolean propertyValue; + + @Parameters + public static Collection data() { + // In this example, the parameter generator returns a List of + // arrays. Each array has two elements: { datum, expected }. + // These data are hard-coded into the class, but they could be + // generated or loaded in any way you like. + return Arrays.asList(new Object[][]{ + {"false", false}, + {"true", true}, + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Is Excluded", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkCampaignBrandListAssociation c, Boolean v) { + c.setIsExcluded(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/write/BulkCampaignBrandListAssociationWriteToRowValuesNameTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/write/BulkCampaignBrandListAssociationWriteToRowValuesNameTest.java new file mode 100644 index 0000000000..741bc9349d --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/write/BulkCampaignBrandListAssociationWriteToRowValuesNameTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.BulkCampaignBrandListAssociationTest; +import com.microsoft.bingads.v13.bulk.entities.BulkCampaignBrandListAssociation; + +@RunWith(Parameterized.class) +public class BulkCampaignBrandListAssociationWriteToRowValuesNameTest extends BulkCampaignBrandListAssociationTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Camapign Brand List Association Name", "Camapign Brand List Association Name"}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Name", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkCampaignBrandListAssociation c, String v) { + c.setName(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/write/BulkCampaignBrandListAssociationWriteToRowValuesParentIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/write/BulkCampaignBrandListAssociationWriteToRowValuesParentIdTest.java new file mode 100644 index 0000000000..19e3d4f50f --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/campaign_brand_list_association/write/BulkCampaignBrandListAssociationWriteToRowValuesParentIdTest.java @@ -0,0 +1,40 @@ +package com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.campaign_brand_list_association.BulkCampaignBrandListAssociationTest; +import com.microsoft.bingads.v13.bulk.entities.BulkCampaignBrandListAssociation; + +@RunWith(Parameterized.class) +public class BulkCampaignBrandListAssociationWriteToRowValuesParentIdTest extends BulkCampaignBrandListAssociationTest { + + @Parameter(value = 1) + public Long propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Parent Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkCampaignBrandListAssociation c, Long v) { + c.setCampaignId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/data_exclusion/read/BulkDataExclusionReadFromRowValuesDeviceTypeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/data_exclusion/read/BulkDataExclusionReadFromRowValuesDeviceTypeTest.java index 092e51060d..1ce5a1b531 100644 --- a/src/test/java/com/microsoft/bingads/v13/api/test/entities/data_exclusion/read/BulkDataExclusionReadFromRowValuesDeviceTypeTest.java +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/data_exclusion/read/BulkDataExclusionReadFromRowValuesDeviceTypeTest.java @@ -8,6 +8,8 @@ import org.junit.runners.Parameterized.Parameters; import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.internal.functionalinterfaces.Supplier; +import com.microsoft.bingads.v13.api.test.entities.ObjectComparer; import com.microsoft.bingads.v13.api.test.entities.data_exclusion.BulkDataExclusionTest; import com.microsoft.bingads.v13.bulk.entities.BulkDataExclusion; import com.microsoft.bingads.v13.campaignmanagement.DeviceType; @@ -15,13 +17,12 @@ public class BulkDataExclusionReadFromRowValuesDeviceTypeTest extends BulkDataExclusionTest { @Parameter(value = 1) - public DeviceType expectedResult; + public Collection expectedResult; @Parameters public static Collection data() { return Arrays.asList(new Object[][]{ - {"Computers", DeviceType.COMPUTERS}, - {"Tablets", DeviceType.TABLETS}, + {"Computers,Tablets", Arrays.asList(new DeviceType[] { DeviceType.COMPUTERS, DeviceType.TABLETS })}, {"", null}, {null, null} }); @@ -29,11 +30,17 @@ public static Collection data() { @Test public void testRead() { - this.testReadProperty("Device Type", this.datum, this.expectedResult, new Function() { + this.>testReadProperty("Device Type", this.datum, this.expectedResult, new Function>() { @Override - public DeviceType apply(BulkDataExclusion c) { + public Collection apply(BulkDataExclusion c) { return c.getDataExclusion().getDeviceTypeFilter(); } - }); + + }, new Supplier() { + @Override + public BulkDataExclusion get() { + return new BulkDataExclusion(); + } + }, new ObjectComparer>()); } } diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/data_exclusion/write/BulkDataExclusionWriteToRowValuesDeviceTypeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/data_exclusion/write/BulkDataExclusionWriteToRowValuesDeviceTypeTest.java index 45242393ae..073d828965 100644 --- a/src/test/java/com/microsoft/bingads/v13/api/test/entities/data_exclusion/write/BulkDataExclusionWriteToRowValuesDeviceTypeTest.java +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/data_exclusion/write/BulkDataExclusionWriteToRowValuesDeviceTypeTest.java @@ -18,23 +18,22 @@ public class BulkDataExclusionWriteToRowValuesDeviceTypeTest extends BulkDataExclusionTest { @Parameter(value = 1) - public DeviceType propertyValue; + public Collection propertyValue; @Parameters public static Collection data() { return Arrays.asList(new Object[][]{ - {"Computers", DeviceType.COMPUTERS}, - {"Tablets", DeviceType.TABLETS}, + {"Computers,Tablets", Arrays.asList(new DeviceType[] { DeviceType.COMPUTERS, DeviceType.TABLETS })}, {null, null} }); } @Test public void testWrite() { - this.testWriteProperty("Device Type", this.datum, this.propertyValue, new BiConsumer() { + this.> testWriteProperty("Device Type", this.datum, this.propertyValue, new BiConsumer>() { @Override - public void accept(BulkDataExclusion c, DeviceType v) { - c.getDataExclusion().setDeviceTypeFilter(v);; + public void accept(BulkDataExclusion c, Collection v) { + c.getDataExclusion().setDeviceTypeFilter(v); } }); } diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/BulkAppInstallGoalTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/BulkAppInstallGoalTest.java new file mode 100644 index 0000000000..2633c38c6c --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/BulkAppInstallGoalTest.java @@ -0,0 +1,69 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.appInstall; + +import java.util.Map; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.internal.functionalinterfaces.Supplier; +import com.microsoft.bingads.v13.api.test.entities.BulkEntityTest; +import com.microsoft.bingads.v13.api.test.entities.EqualityComparerWithDescription; +import com.microsoft.bingads.v13.bulk.entities.BulkAppInstallGoal; +import com.microsoft.bingads.v13.campaignmanagement.AppInstallGoal; + +public abstract class BulkAppInstallGoalTest extends BulkEntityTest { + + @Override + protected void onEntityCreation(BulkAppInstallGoal entity) { + entity.setAppInstallGoal(new AppInstallGoal()); + } + + @Override + protected void testWriteProperty(String header, + String expectedRowValue, TProperty propertyValue, + BiConsumer setFunc) { + this.testWriteProperty(header, expectedRowValue, propertyValue, setFunc, new Supplier() { + @Override + public BulkAppInstallGoal get() { + return new BulkAppInstallGoal(); + } + }); + } + + @Override + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkAppInstallGoal get() { + return new BulkAppInstallGoal(); + } + }); + } + + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkAppInstallGoal get() { + return new BulkAppInstallGoal(); + } + }, comparer); + } + + @Override + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkAppInstallGoal get() { + return new BulkAppInstallGoal(); + } + }); + } + + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkAppInstallGoal get() { + return new BulkAppInstallGoal(); + } + }, comparer); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/BulkAppInstallGoalTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/BulkAppInstallGoalTests.java new file mode 100644 index 0000000000..ddc6073901 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/BulkAppInstallGoalTests.java @@ -0,0 +1,14 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.appInstall; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +import com.microsoft.bingads.v13.api.test.entities.goal.appInstall.read.BulkAppInstallGoalReadTests; +import com.microsoft.bingads.v13.api.test.entities.goal.appInstall.write.BulkAppInstallGoalWriteTests; + +@RunWith(Suite.class) +@SuiteClasses({BulkAppInstallGoalReadTests.class, BulkAppInstallGoalWriteTests.class}) +public class BulkAppInstallGoalTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/read/BulkAppInstallGoalReadFromRowValuesAppPlatformTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/read/BulkAppInstallGoalReadFromRowValuesAppPlatformTest.java new file mode 100644 index 0000000000..14cdaba5c7 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/read/BulkAppInstallGoalReadFromRowValuesAppPlatformTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.appInstall.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.appInstall.BulkAppInstallGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkAppInstallGoal; + +@RunWith(Parameterized.class) +public class BulkAppInstallGoalReadFromRowValuesAppPlatformTest extends BulkAppInstallGoalTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"App Platform", "App Platform"}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("App Platform", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkAppInstallGoal c) { + return c.getAppInstallGoal().getAppPlatform(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/read/BulkAppInstallGoalReadFromRowValuesAppStoreIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/read/BulkAppInstallGoalReadFromRowValuesAppStoreIdTest.java new file mode 100644 index 0000000000..5ffcffb431 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/read/BulkAppInstallGoalReadFromRowValuesAppStoreIdTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.appInstall.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.appInstall.BulkAppInstallGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkAppInstallGoal; + +@RunWith(Parameterized.class) +public class BulkAppInstallGoalReadFromRowValuesAppStoreIdTest extends BulkAppInstallGoalTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"App Id", "App Id"}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("App Id", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkAppInstallGoal c) { + return c.getAppInstallGoal().getAppStoreId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/read/BulkAppInstallGoalReadTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/read/BulkAppInstallGoalReadTests.java new file mode 100644 index 0000000000..32f74c2a88 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/read/BulkAppInstallGoalReadTests.java @@ -0,0 +1,14 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.appInstall.read; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkAppInstallGoalReadFromRowValuesAppPlatformTest.class, + BulkAppInstallGoalReadFromRowValuesAppStoreIdTest.class +}) +public class BulkAppInstallGoalReadTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/write/BulkAppInstallGoalWriteTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/write/BulkAppInstallGoalWriteTests.java new file mode 100644 index 0000000000..91b2cc526a --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/write/BulkAppInstallGoalWriteTests.java @@ -0,0 +1,14 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.appInstall.write; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkAppInstallGoalWriteToRowValuesAppPlatformTest.class, + BulkAppInstallGoalWriteToRowValuesAppStoreIdTest.class +}) +public class BulkAppInstallGoalWriteTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/write/BulkAppInstallGoalWriteToRowValuesAppPlatformTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/write/BulkAppInstallGoalWriteToRowValuesAppPlatformTest.java new file mode 100644 index 0000000000..5b1896f77d --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/write/BulkAppInstallGoalWriteToRowValuesAppPlatformTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.appInstall.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.appInstall.BulkAppInstallGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkAppInstallGoal; + +@RunWith(Parameterized.class) +public class BulkAppInstallGoalWriteToRowValuesAppPlatformTest extends BulkAppInstallGoalTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"App Platform", "App Platform"}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("App Platform", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkAppInstallGoal c, String v) { + c.getAppInstallGoal().setAppPlatform(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/write/BulkAppInstallGoalWriteToRowValuesAppStoreIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/write/BulkAppInstallGoalWriteToRowValuesAppStoreIdTest.java new file mode 100644 index 0000000000..666ced1a8a --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/appInstall/write/BulkAppInstallGoalWriteToRowValuesAppStoreIdTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.appInstall.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.appInstall.BulkAppInstallGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkAppInstallGoal; + +@RunWith(Parameterized.class) +public class BulkAppInstallGoalWriteToRowValuesAppStoreIdTest extends BulkAppInstallGoalTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"App Id", "App Id"}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("App Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkAppInstallGoal c, String v) { + c.getAppInstallGoal().setAppStoreId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/BulkDurationGoalTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/BulkDurationGoalTest.java new file mode 100644 index 0000000000..f96744e90b --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/BulkDurationGoalTest.java @@ -0,0 +1,69 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.duration; + +import java.util.Map; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.internal.functionalinterfaces.Supplier; +import com.microsoft.bingads.v13.api.test.entities.BulkEntityTest; +import com.microsoft.bingads.v13.api.test.entities.EqualityComparerWithDescription; +import com.microsoft.bingads.v13.bulk.entities.BulkDurationGoal; +import com.microsoft.bingads.v13.campaignmanagement.DurationGoal; + +public abstract class BulkDurationGoalTest extends BulkEntityTest { + + @Override + protected void onEntityCreation(BulkDurationGoal entity) { + entity.setDurationGoal(new DurationGoal()); + } + + @Override + protected void testWriteProperty(String header, + String expectedRowValue, TProperty propertyValue, + BiConsumer setFunc) { + this.testWriteProperty(header, expectedRowValue, propertyValue, setFunc, new Supplier() { + @Override + public BulkDurationGoal get() { + return new BulkDurationGoal(); + } + }); + } + + @Override + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkDurationGoal get() { + return new BulkDurationGoal(); + } + }); + } + + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkDurationGoal get() { + return new BulkDurationGoal(); + } + }, comparer); + } + + @Override + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkDurationGoal get() { + return new BulkDurationGoal(); + } + }); + } + + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkDurationGoal get() { + return new BulkDurationGoal(); + } + }, comparer); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/BulkDurationGoalTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/BulkDurationGoalTests.java new file mode 100644 index 0000000000..b3a04c6d4e --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/BulkDurationGoalTests.java @@ -0,0 +1,14 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.duration; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +import com.microsoft.bingads.v13.api.test.entities.goal.duration.read.BulkDurationGoalReadTests; +import com.microsoft.bingads.v13.api.test.entities.goal.duration.write.BulkDurationGoalWriteTests; + +@RunWith(Suite.class) +@SuiteClasses({BulkDurationGoalReadTests.class, BulkDurationGoalWriteTests.class}) +public class BulkDurationGoalTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/read/BulkDurationGoalReadFromRowValuesMinimumDurationInSecondTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/read/BulkDurationGoalReadFromRowValuesMinimumDurationInSecondTest.java new file mode 100644 index 0000000000..22c6e0c89e --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/read/BulkDurationGoalReadFromRowValuesMinimumDurationInSecondTest.java @@ -0,0 +1,36 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.duration.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.duration.BulkDurationGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkDurationGoal; + +public class BulkDurationGoalReadFromRowValuesMinimumDurationInSecondTest extends BulkDurationGoalTest { + + @Parameter(value = 1) + public Integer expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Minimum Duration In Second", this.datum, this.expectedResult, new Function() { + @Override + public Integer apply(BulkDurationGoal c) { + return c.getDurationGoal().getMinimumDurationInSeconds(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/read/BulkDurationGoalReadTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/read/BulkDurationGoalReadTests.java new file mode 100644 index 0000000000..5fa87e4e39 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/read/BulkDurationGoalReadTests.java @@ -0,0 +1,13 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.duration.read; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkDurationGoalReadFromRowValuesMinimumDurationInSecondTest.class +}) +public class BulkDurationGoalReadTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/write/BulkDurationGoalWriteTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/write/BulkDurationGoalWriteTests.java new file mode 100644 index 0000000000..3a72f97a39 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/write/BulkDurationGoalWriteTests.java @@ -0,0 +1,13 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.duration.write; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkDurationGoalWriteToRowValuesMinimumDurationInSecondTest.class +}) +public class BulkDurationGoalWriteTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/write/BulkDurationGoalWriteToRowValuesMinimumDurationInSecondTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/write/BulkDurationGoalWriteToRowValuesMinimumDurationInSecondTest.java new file mode 100644 index 0000000000..58e7290a2b --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/duration/write/BulkDurationGoalWriteToRowValuesMinimumDurationInSecondTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.duration.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.duration.BulkDurationGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkDurationGoal; + +@RunWith(Parameterized.class) +public class BulkDurationGoalWriteToRowValuesMinimumDurationInSecondTest extends BulkDurationGoalTest { + + @Parameter(value = 1) + public Integer propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Minimum Duration In Second", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkDurationGoal c, Integer v) { + c.getDurationGoal().setMinimumDurationInSeconds(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/BulkEventGoalTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/BulkEventGoalTest.java new file mode 100644 index 0000000000..9085ac40af --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/BulkEventGoalTest.java @@ -0,0 +1,69 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event; + +import java.util.Map; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.internal.functionalinterfaces.Supplier; +import com.microsoft.bingads.v13.api.test.entities.BulkEntityTest; +import com.microsoft.bingads.v13.api.test.entities.EqualityComparerWithDescription; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.EventGoal; + +public abstract class BulkEventGoalTest extends BulkEntityTest { + + @Override + protected void onEntityCreation(BulkEventGoal entity) { + entity.setEventGoal(new EventGoal()); + } + + @Override + protected void testWriteProperty(String header, + String expectedRowValue, TProperty propertyValue, + BiConsumer setFunc) { + this.testWriteProperty(header, expectedRowValue, propertyValue, setFunc, new Supplier() { + @Override + public BulkEventGoal get() { + return new BulkEventGoal(); + } + }); + } + + @Override + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkEventGoal get() { + return new BulkEventGoal(); + } + }); + } + + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkEventGoal get() { + return new BulkEventGoal(); + } + }, comparer); + } + + @Override + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkEventGoal get() { + return new BulkEventGoal(); + } + }); + } + + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkEventGoal get() { + return new BulkEventGoal(); + } + }, comparer); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/BulkEventGoalTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/BulkEventGoalTests.java new file mode 100644 index 0000000000..c23283737e --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/BulkEventGoalTests.java @@ -0,0 +1,14 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +import com.microsoft.bingads.v13.api.test.entities.goal.event.read.BulkEventGoalReadTests; +import com.microsoft.bingads.v13.api.test.entities.goal.event.write.BulkEventGoalWriteTests; + +@RunWith(Suite.class) +@SuiteClasses({BulkEventGoalReadTests.class, BulkEventGoalWriteTests.class}) +public class BulkEventGoalTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesActionExpressionTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesActionExpressionTest.java new file mode 100644 index 0000000000..1887bbd2b8 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesActionExpressionTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalReadFromRowValuesActionExpressionTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Action Expression", "Action Expression"}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Action Expression", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkEventGoal c) { + return c.getEventGoal().getActionExpression(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesActionOperatorTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesActionOperatorTest.java new file mode 100644 index 0000000000..0e6ccf797c --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesActionOperatorTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ExpressionOperator; + +public class BulkEventGoalReadFromRowValuesActionOperatorTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ExpressionOperator expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Equals", ExpressionOperator.EQUALS}, + {"Contains", ExpressionOperator.CONTAINS}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Action Operator", this.datum, this.expectedResult, new Function() { + @Override + public ExpressionOperator apply(BulkEventGoal c) { + return c.getEventGoal().getActionOperator(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesAttributionModelTypeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesAttributionModelTypeTest.java new file mode 100644 index 0000000000..6704299dff --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesAttributionModelTypeTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.AttributionModelType; + +public class BulkEventGoalReadFromRowValuesAttributionModelTypeTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public AttributionModelType expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"LastClick", AttributionModelType.LAST_CLICK}, + {"LastTouch", AttributionModelType.LAST_TOUCH}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Attribution Model Type", this.datum, this.expectedResult, new Function() { + @Override + public AttributionModelType apply(BulkEventGoal c) { + return c.getEventGoal().getAttributionModelType(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesCategoryExpressionTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesCategoryExpressionTest.java new file mode 100644 index 0000000000..aec5264126 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesCategoryExpressionTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalReadFromRowValuesCategoryExpressionTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Category Expression", "Category Expression"}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Category Expression", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkEventGoal c) { + return c.getEventGoal().getCategoryExpression(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesCategoryOperatorTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesCategoryOperatorTest.java new file mode 100644 index 0000000000..241285b2a1 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesCategoryOperatorTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ExpressionOperator; + +public class BulkEventGoalReadFromRowValuesCategoryOperatorTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ExpressionOperator expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Equals", ExpressionOperator.EQUALS}, + {"Contains", ExpressionOperator.CONTAINS}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Category Operator", this.datum, this.expectedResult, new Function() { + @Override + public ExpressionOperator apply(BulkEventGoal c) { + return c.getEventGoal().getCategoryOperator(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesConversionWindowInMinutesTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesConversionWindowInMinutesTest.java new file mode 100644 index 0000000000..ac80352e6a --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesConversionWindowInMinutesTest.java @@ -0,0 +1,36 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +public class BulkEventGoalReadFromRowValuesConversionWindowInMinutesTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public Integer expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Conversion Window In Minutes", this.datum, this.expectedResult, new Function() { + @Override + public Integer apply(BulkEventGoal c) { + return c.getEventGoal().getConversionWindowInMinutes(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesCountTypeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesCountTypeTest.java new file mode 100644 index 0000000000..d196558403 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesCountTypeTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalCountType; + +public class BulkEventGoalReadFromRowValuesCountTypeTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ConversionGoalCountType expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"All", ConversionGoalCountType.ALL}, + {"Unique", ConversionGoalCountType.UNIQUE}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Count Type", this.datum, this.expectedResult, new Function() { + @Override + public ConversionGoalCountType apply(BulkEventGoal c) { + return c.getEventGoal().getCountType(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesCurrencyCodeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesCurrencyCodeTest.java new file mode 100644 index 0000000000..290c7a05f3 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesCurrencyCodeTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalReadFromRowValuesCurrencyCodeTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Currency Code", "Currency Code"}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Currency Code", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkEventGoal c) { + return c.getEventGoal().getRevenue() != null ? c.getEventGoal().getRevenue().getCurrencyCode() : null; + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesEventValueOperatorTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesEventValueOperatorTest.java new file mode 100644 index 0000000000..28bcb75b1c --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesEventValueOperatorTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ValueOperator; + +public class BulkEventGoalReadFromRowValuesEventValueOperatorTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ValueOperator expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Equals", ValueOperator.EQUALS}, + {"LessThan", ValueOperator.LESS_THAN}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Event Value Operator", this.datum, this.expectedResult, new Function() { + @Override + public ValueOperator apply(BulkEventGoal c) { + return c.getEventGoal().getValueOperator(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesEventValueTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesEventValueTest.java new file mode 100644 index 0000000000..b8858573be --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesEventValueTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalReadFromRowValuesEventValueTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public BigDecimal expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"12.34", BigDecimal.valueOf(12.34)}, + {"123.0", BigDecimal.valueOf(123.0)}, + {"", null}, + {null, null}}); + } + + @Test + public void testRead() { + this.testReadProperty("Event Value", this.datum, this.expectedResult, new Function() { + @Override + public BigDecimal apply(BulkEventGoal c) { + return c.getEventGoal().getValue(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesExcludeFromBiddingTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesExcludeFromBiddingTest.java new file mode 100644 index 0000000000..2525430f15 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesExcludeFromBiddingTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalReadFromRowValuesExcludeFromBiddingTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public boolean expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"False", false}, + {"True", true}, + }); + } + + @Test + public void testRead() { + this.testReadProperty("Exclude From Bidding", this.datum, this.expectedResult, new Function() { + @Override + public Boolean apply(BulkEventGoal c) { + return c.getConversionGoal().getExcludeFromBidding(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesGoalCategoryTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesGoalCategoryTest.java new file mode 100644 index 0000000000..b99b9d14d4 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesGoalCategoryTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalCategory; + +public class BulkEventGoalReadFromRowValuesGoalCategoryTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ConversionGoalCategory expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Purchase", ConversionGoalCategory.PURCHASE}, + {"None", ConversionGoalCategory.NONE}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Goal Category", this.datum, this.expectedResult, new Function() { + @Override + public ConversionGoalCategory apply(BulkEventGoal c) { + return c.getEventGoal().getGoalCategory(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesIdTest.java new file mode 100644 index 0000000000..19ac4e2fc2 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesIdTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalReadFromRowValuesIdTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public Long expectedResult; + + @Parameters + public static Collection data() { + + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", Long.MAX_VALUE}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Id", this.datum, this.expectedResult, new Function() { + @Override + public Long apply(BulkEventGoal c) { + return c.getEventGoal().getId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesIsEnhancedConversionsEnabledTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesIsEnhancedConversionsEnabledTest.java new file mode 100644 index 0000000000..4efb238297 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesIsEnhancedConversionsEnabledTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalReadFromRowValuesIsEnhancedConversionsEnabledTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public boolean expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"False", false}, + {"True", true}, + }); + } + + @Test + public void testRead() { + this.testReadProperty("Is Enhanced Conversions Enabled", this.datum, this.expectedResult, new Function() { + @Override + public Boolean apply(BulkEventGoal c) { + return c.getConversionGoal().getIsEnhancedConversionsEnabled(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesLabelExpressionTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesLabelExpressionTest.java new file mode 100644 index 0000000000..d55f658649 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesLabelExpressionTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalReadFromRowValuesLabelExpressionTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Label Expression", "Label Expression"}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Label Expression", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkEventGoal c) { + return c.getEventGoal().getLabelExpression(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesLabelOperatorTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesLabelOperatorTest.java new file mode 100644 index 0000000000..7db32449c2 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesLabelOperatorTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ExpressionOperator; + +public class BulkEventGoalReadFromRowValuesLabelOperatorTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ExpressionOperator expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Equals", ExpressionOperator.EQUALS}, + {"Contains", ExpressionOperator.CONTAINS}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Label Operator", this.datum, this.expectedResult, new Function() { + @Override + public ExpressionOperator apply(BulkEventGoal c) { + return c.getEventGoal().getLabelOperator(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesRevenueTypeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesRevenueTypeTest.java new file mode 100644 index 0000000000..a96e853cd6 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesRevenueTypeTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalRevenueType; + +public class BulkEventGoalReadFromRowValuesRevenueTypeTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ConversionGoalRevenueType expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"FixedValue", ConversionGoalRevenueType.FIXED_VALUE}, + {"NoValue", ConversionGoalRevenueType.NO_VALUE}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Revenue Type", this.datum, this.expectedResult, new Function() { + @Override + public ConversionGoalRevenueType apply(BulkEventGoal c) { + return c.getEventGoal().getRevenue() != null ? c.getEventGoal().getRevenue().getType() : null; + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesRevenueValueTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesRevenueValueTest.java new file mode 100644 index 0000000000..35cb5f0b8d --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesRevenueValueTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalReadFromRowValuesRevenueValueTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public BigDecimal expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"12.34", BigDecimal.valueOf(12.34)}, + {"123.0", BigDecimal.valueOf(123.0)}, + {"", null}, + {null, null}}); + } + + @Test + public void testRead() { + this.testReadProperty("Revenue Value", this.datum, this.expectedResult, new Function() { + @Override + public BigDecimal apply(BulkEventGoal c) { + return c.getEventGoal().getRevenue() != null ? c.getEventGoal().getRevenue().getValue() : null; + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesScopeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesScopeTest.java new file mode 100644 index 0000000000..2ddb5c3c37 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesScopeTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.EntityScope; + +public class BulkEventGoalReadFromRowValuesScopeTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public EntityScope expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Account", EntityScope.ACCOUNT}, + {"Customer", EntityScope.CUSTOMER}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Scope", this.datum, this.expectedResult, new Function() { + @Override + public EntityScope apply(BulkEventGoal c) { + return c.getEventGoal().getScope(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesStatusTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesStatusTest.java new file mode 100644 index 0000000000..96f7e510a8 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesStatusTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalStatus; + +public class BulkEventGoalReadFromRowValuesStatusTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ConversionGoalStatus expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Active", ConversionGoalStatus.ACTIVE}, + {"Paused", ConversionGoalStatus.PAUSED}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Status", this.datum, this.expectedResult, new Function() { + @Override + public ConversionGoalStatus apply(BulkEventGoal c) { + return c.getEventGoal().getStatus(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesTagIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesTagIdTest.java new file mode 100644 index 0000000000..725d3d7cd5 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesTagIdTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalReadFromRowValuesTagIdTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public Long expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("UET Tag Id", this.datum, this.expectedResult, new Function() { + @Override + public Long apply(BulkEventGoal c) { + return c.getEventGoal().getTagId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesViewThroughConversionWindowInMinutesTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesViewThroughConversionWindowInMinutesTest.java new file mode 100644 index 0000000000..9ff9144351 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadFromRowValuesViewThroughConversionWindowInMinutesTest.java @@ -0,0 +1,36 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +public class BulkEventGoalReadFromRowValuesViewThroughConversionWindowInMinutesTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public Integer expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("View Through Conversion Window In Minutes", this.datum, this.expectedResult, new Function() { + @Override + public Integer apply(BulkEventGoal c) { + return c.getEventGoal().getViewThroughConversionWindowInMinutes(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadTests.java new file mode 100644 index 0000000000..0b10964281 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/read/BulkEventGoalReadTests.java @@ -0,0 +1,34 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.read; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkEventGoalReadFromRowValuesTagIdTest.class, + BulkEventGoalReadFromRowValuesActionExpressionTest.class, + BulkEventGoalReadFromRowValuesActionOperatorTest.class, + BulkEventGoalReadFromRowValuesAttributionModelTypeTest.class, + BulkEventGoalReadFromRowValuesCategoryExpressionTest.class, + BulkEventGoalReadFromRowValuesCategoryOperatorTest.class, + BulkEventGoalReadFromRowValuesConversionWindowInMinutesTest.class, + BulkEventGoalReadFromRowValuesCurrencyCodeTest.class, + BulkEventGoalReadFromRowValuesEventValueOperatorTest.class, + BulkEventGoalReadFromRowValuesEventValueTest.class, + BulkEventGoalReadFromRowValuesExcludeFromBiddingTest.class, + BulkEventGoalReadFromRowValuesGoalCategoryTest.class, + BulkEventGoalReadFromRowValuesIdTest.class, + BulkEventGoalReadFromRowValuesIsEnhancedConversionsEnabledTest.class, + BulkEventGoalReadFromRowValuesLabelExpressionTest.class, + BulkEventGoalReadFromRowValuesLabelOperatorTest.class, + BulkEventGoalReadFromRowValuesRevenueTypeTest.class, + BulkEventGoalReadFromRowValuesRevenueValueTest.class, + BulkEventGoalReadFromRowValuesScopeTest.class, + BulkEventGoalReadFromRowValuesStatusTest.class, + BulkEventGoalReadFromRowValuesViewThroughConversionWindowInMinutesTest.class, + BulkEventGoalReadFromRowValuesCountTypeTest.class +}) +public class BulkEventGoalReadTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteTests.java new file mode 100644 index 0000000000..d12314fde6 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteTests.java @@ -0,0 +1,34 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkEventGoalWriteToRowValuesActionExpressionTest.class, + BulkEventGoalWriteToRowValuesActionOperatorTest.class, + BulkEventGoalWriteToRowValuesAttributionModelTypeTest.class, + BulkEventGoalWriteToRowValuesCategoryExpressionTest.class, + BulkEventGoalWriteToRowValuesCategoryOperatorTest.class, + BulkEventGoalWriteToRowValuesConversionWindowInMinutesTest.class, + BulkEventGoalWriteToRowValuesCountTypeTest.class, + BulkEventGoalWriteToRowValuesCurrencyCodeTest.class, + BulkEventGoalWriteToRowValuesEventValueOperatorTest.class, + BulkEventGoalWriteToRowValuesEventValueTest.class, + BulkEventGoalWriteToRowValuesExcludeFromBiddingTest.class, + BulkEventGoalWriteToRowValuesGoalCategoryTest.class, + BulkEventGoalWriteToRowValuesIdTest.class, + BulkEventGoalWriteToRowValuesIsEnhancedConversionsEnabledTest.class, + BulkEventGoalWriteToRowValuesLabelExpressionTest.class, + BulkEventGoalWriteToRowValuesLabelOperatorTest.class, + BulkEventGoalWriteToRowValuesRevenueTypeTest.class, + BulkEventGoalWriteToRowValuesRevenueValueTest.class, + BulkEventGoalWriteToRowValuesScopeTest.class, + BulkEventGoalWriteToRowValuesStatusTest.class, + BulkEventGoalWriteToRowValuesTagIdTest.class, + BulkEventGoalWriteToRowValuesViewThroughConversionWindowInMinutesTest.class +}) +public class BulkEventGoalWriteTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesActionExpressionTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesActionExpressionTest.java new file mode 100644 index 0000000000..2b71fc546e --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesActionExpressionTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesActionExpressionTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Action Expression", "Action Expression"}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Action Expression", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, String v) { + c.getEventGoal().setActionExpression(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesActionOperatorTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesActionOperatorTest.java new file mode 100644 index 0000000000..508c9f7126 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesActionOperatorTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ExpressionOperator; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesActionOperatorTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ExpressionOperator propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Equals", ExpressionOperator.EQUALS}, + {"Contains", ExpressionOperator.CONTAINS}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Action Operator", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, ExpressionOperator v) { + c.getEventGoal().setActionOperator(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesAttributionModelTypeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesAttributionModelTypeTest.java new file mode 100644 index 0000000000..4d273f647f --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesAttributionModelTypeTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.AttributionModelType; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesAttributionModelTypeTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public AttributionModelType propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"LastClick", AttributionModelType.LAST_CLICK}, + {"LastTouch", AttributionModelType.LAST_TOUCH}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Attribution Model Type", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, AttributionModelType v) { + c.getEventGoal().setAttributionModelType(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesCategoryExpressionTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesCategoryExpressionTest.java new file mode 100644 index 0000000000..ca326aeffe --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesCategoryExpressionTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesCategoryExpressionTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Category Expression", "Category Expression"}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Category Expression", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, String v) { + c.getEventGoal().setCategoryExpression(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesCategoryOperatorTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesCategoryOperatorTest.java new file mode 100644 index 0000000000..5383a26810 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesCategoryOperatorTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ExpressionOperator; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesCategoryOperatorTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ExpressionOperator propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Equals", ExpressionOperator.EQUALS}, + {"Contains", ExpressionOperator.CONTAINS}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Category Operator", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, ExpressionOperator v) { + c.getEventGoal().setCategoryOperator(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesConversionWindowInMinutesTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesConversionWindowInMinutesTest.java new file mode 100644 index 0000000000..a925fcc27f --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesConversionWindowInMinutesTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesConversionWindowInMinutesTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public Integer propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Conversion Window In Minutes", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, Integer v) { + c.getEventGoal().setConversionWindowInMinutes(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesCountTypeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesCountTypeTest.java new file mode 100644 index 0000000000..ec0acc973b --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesCountTypeTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalCountType; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesCountTypeTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ConversionGoalCountType propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"All", ConversionGoalCountType.ALL}, + {"Unique", ConversionGoalCountType.UNIQUE}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Count Type", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, ConversionGoalCountType v) { + c.getEventGoal().setCountType(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesCurrencyCodeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesCurrencyCodeTest.java new file mode 100644 index 0000000000..a0559ea982 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesCurrencyCodeTest.java @@ -0,0 +1,46 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalRevenue; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesCurrencyCodeTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + // In this example, the parameter generator returns a List of + // arrays. Each array has two elements: { datum, expected }. + // These data are hard-coded into the class, but they could be + // generated or loaded in any way you like. + return Arrays.asList(new Object[][]{ + {"Currency Code", "Currency Code"}, + {"",""}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Currency Code", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, String v) { + c.getEventGoal().setRevenue(new ConversionGoalRevenue()); + c.getEventGoal().getRevenue().setCurrencyCode(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesEventValueOperatorTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesEventValueOperatorTest.java new file mode 100644 index 0000000000..bf1f423548 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesEventValueOperatorTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ValueOperator; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesEventValueOperatorTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ValueOperator propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Equals", ValueOperator.EQUALS}, + {"LessThan", ValueOperator.LESS_THAN}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Event Value Operator", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, ValueOperator v) { + c.getEventGoal().setValueOperator(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesEventValueTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesEventValueTest.java new file mode 100644 index 0000000000..aa32788ca0 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesEventValueTest.java @@ -0,0 +1,40 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesEventValueTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public BigDecimal propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"12.34", BigDecimal.valueOf(12.34)}, + {"123.0", BigDecimal.valueOf(123.0)}, + {null, null}}); + } + + @Test + public void testRead() { + this.testWriteProperty("Event Value", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, BigDecimal v) { + c.getEventGoal().setValue(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesExcludeFromBiddingTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesExcludeFromBiddingTest.java new file mode 100644 index 0000000000..f5d01d8df5 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesExcludeFromBiddingTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesExcludeFromBiddingTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public Boolean propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"false", false}, + {"true", true}, + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Exclude From Bidding", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, Boolean v) { + c.getConversionGoal().setExcludeFromBidding(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesGoalCategoryTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesGoalCategoryTest.java new file mode 100644 index 0000000000..02f1e24978 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesGoalCategoryTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalCategory; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesGoalCategoryTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ConversionGoalCategory propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Purchase", ConversionGoalCategory.PURCHASE}, + {"None", ConversionGoalCategory.NONE}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Goal Category", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, ConversionGoalCategory v) { + c.getEventGoal().setGoalCategory(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesIdTest.java new file mode 100644 index 0000000000..a25a9a2edc --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesIdTest.java @@ -0,0 +1,40 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesIdTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public Long propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, Long v) { + c.getEventGoal().setId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesIsEnhancedConversionsEnabledTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesIsEnhancedConversionsEnabledTest.java new file mode 100644 index 0000000000..cc67cb5bbf --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesIsEnhancedConversionsEnabledTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesIsEnhancedConversionsEnabledTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public Boolean propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"false", false}, + {"true", true}, + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Is Enhanced Conversions Enabled", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, Boolean v) { + c.getConversionGoal().setIsEnhancedConversionsEnabled(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesLabelExpressionTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesLabelExpressionTest.java new file mode 100644 index 0000000000..91d0827ba9 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesLabelExpressionTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesLabelExpressionTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Label Expression", "Label Expression"}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Label Expression", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, String v) { + c.getEventGoal().setLabelExpression(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesLabelOperatorTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesLabelOperatorTest.java new file mode 100644 index 0000000000..d27d1a9bc0 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesLabelOperatorTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ExpressionOperator; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesLabelOperatorTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ExpressionOperator propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Equals", ExpressionOperator.EQUALS}, + {"Contains", ExpressionOperator.CONTAINS}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Label Operator", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, ExpressionOperator v) { + c.getEventGoal().setLabelOperator(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesRevenueTypeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesRevenueTypeTest.java new file mode 100644 index 0000000000..a65eadf881 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesRevenueTypeTest.java @@ -0,0 +1,43 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalRevenue; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalRevenueType; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesRevenueTypeTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ConversionGoalRevenueType propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"FixedValue", ConversionGoalRevenueType.FIXED_VALUE}, + {"NoValue", ConversionGoalRevenueType.NO_VALUE}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Revenue Type", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, ConversionGoalRevenueType v) { + c.getEventGoal().setRevenue(new ConversionGoalRevenue()); + c.getEventGoal().getRevenue().setType(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesRevenueValueTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesRevenueValueTest.java new file mode 100644 index 0000000000..894323d388 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesRevenueValueTest.java @@ -0,0 +1,42 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalRevenue; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesRevenueValueTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public BigDecimal propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"12.34", BigDecimal.valueOf(12.34)}, + {"123.0", BigDecimal.valueOf(123.0)}, + {null, null}}); + } + + @Test + public void testRead() { + this.testWriteProperty("Revenue Value", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, BigDecimal v) { + c.getEventGoal().setRevenue(new ConversionGoalRevenue()); + c.getEventGoal().getRevenue().setValue(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesScopeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesScopeTest.java new file mode 100644 index 0000000000..ce0c2d9c9d --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesScopeTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.EntityScope; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesScopeTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public EntityScope propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Account", EntityScope.ACCOUNT}, + {"Customer", EntityScope.CUSTOMER}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Scope", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, EntityScope v) { + c.getEventGoal().setScope(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesStatusTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesStatusTest.java new file mode 100644 index 0000000000..8176023eb6 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesStatusTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; +import com.microsoft.bingads.v13.campaignmanagement.ConversionGoalStatus; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesStatusTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public ConversionGoalStatus propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Active", ConversionGoalStatus.ACTIVE}, + {"Paused", ConversionGoalStatus.PAUSED}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Status", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, ConversionGoalStatus v) { + c.getEventGoal().setStatus(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesTagIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesTagIdTest.java new file mode 100644 index 0000000000..9992a62d1a --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesTagIdTest.java @@ -0,0 +1,40 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesTagIdTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public Long propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("UET Tag Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, Long v) { + c.getEventGoal().setTagId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesViewThroughConversionWindowInMinutesTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesViewThroughConversionWindowInMinutesTest.java new file mode 100644 index 0000000000..160e2bc6c5 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/event/write/BulkEventGoalWriteToRowValuesViewThroughConversionWindowInMinutesTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.event.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.event.BulkEventGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkEventGoal; + +@RunWith(Parameterized.class) +public class BulkEventGoalWriteToRowValuesViewThroughConversionWindowInMinutesTest extends BulkEventGoalTest { + + @Parameter(value = 1) + public Integer propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("View Through Conversion Window In Minutes", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkEventGoal c, Integer v) { + c.getEventGoal().setViewThroughConversionWindowInMinutes(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/BulkPagesViewedPerVisitGoalTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/BulkPagesViewedPerVisitGoalTest.java new file mode 100644 index 0000000000..bbe8e5f847 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/BulkPagesViewedPerVisitGoalTest.java @@ -0,0 +1,69 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.pages_viewed_per_visit; + +import java.util.Map; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.internal.functionalinterfaces.Supplier; +import com.microsoft.bingads.v13.api.test.entities.BulkEntityTest; +import com.microsoft.bingads.v13.api.test.entities.EqualityComparerWithDescription; +import com.microsoft.bingads.v13.bulk.entities.BulkPagesViewedPerVisitGoal; +import com.microsoft.bingads.v13.campaignmanagement.PagesViewedPerVisitGoal; + +public abstract class BulkPagesViewedPerVisitGoalTest extends BulkEntityTest { + + @Override + protected void onEntityCreation(BulkPagesViewedPerVisitGoal entity) { + entity.setPagesViewedPerVisitGoal(new PagesViewedPerVisitGoal()); + } + + @Override + protected void testWriteProperty(String header, + String expectedRowValue, TProperty propertyValue, + BiConsumer setFunc) { + this.testWriteProperty(header, expectedRowValue, propertyValue, setFunc, new Supplier() { + @Override + public BulkPagesViewedPerVisitGoal get() { + return new BulkPagesViewedPerVisitGoal(); + } + }); + } + + @Override + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkPagesViewedPerVisitGoal get() { + return new BulkPagesViewedPerVisitGoal(); + } + }); + } + + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkPagesViewedPerVisitGoal get() { + return new BulkPagesViewedPerVisitGoal(); + } + }, comparer); + } + + @Override + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkPagesViewedPerVisitGoal get() { + return new BulkPagesViewedPerVisitGoal(); + } + }); + } + + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkPagesViewedPerVisitGoal get() { + return new BulkPagesViewedPerVisitGoal(); + } + }, comparer); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/BulkPagesViewedPerVisitGoalTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/BulkPagesViewedPerVisitGoalTests.java new file mode 100644 index 0000000000..233b60607c --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/BulkPagesViewedPerVisitGoalTests.java @@ -0,0 +1,14 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.pages_viewed_per_visit; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +import com.microsoft.bingads.v13.api.test.entities.goal.pages_viewed_per_visit.read.BulkPagesViewedPerVisitGoalReadTests; +import com.microsoft.bingads.v13.api.test.entities.goal.pages_viewed_per_visit.write.BulkPagesViewedPerVisitGoalWriteTests; + +@RunWith(Suite.class) +@SuiteClasses({BulkPagesViewedPerVisitGoalReadTests.class, BulkPagesViewedPerVisitGoalWriteTests.class}) +public class BulkPagesViewedPerVisitGoalTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/read/BulkPagesViewedPerVisitGoalReadFromRowValuesMinimumDurationInSecondTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/read/BulkPagesViewedPerVisitGoalReadFromRowValuesMinimumDurationInSecondTest.java new file mode 100644 index 0000000000..e4bf4f020d --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/read/BulkPagesViewedPerVisitGoalReadFromRowValuesMinimumDurationInSecondTest.java @@ -0,0 +1,36 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.pages_viewed_per_visit.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.pages_viewed_per_visit.BulkPagesViewedPerVisitGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkPagesViewedPerVisitGoal; + +public class BulkPagesViewedPerVisitGoalReadFromRowValuesMinimumDurationInSecondTest extends BulkPagesViewedPerVisitGoalTest { + + @Parameter(value = 1) + public Integer expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Minimum Pages Viewed", this.datum, this.expectedResult, new Function() { + @Override + public Integer apply(BulkPagesViewedPerVisitGoal c) { + return c.getPagesViewedPerVisitGoal().getMinimumPagesViewed(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/read/BulkPagesViewedPerVisitGoalReadTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/read/BulkPagesViewedPerVisitGoalReadTests.java new file mode 100644 index 0000000000..31a56a403e --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/read/BulkPagesViewedPerVisitGoalReadTests.java @@ -0,0 +1,13 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.pages_viewed_per_visit.read; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkPagesViewedPerVisitGoalReadFromRowValuesMinimumDurationInSecondTest.class +}) +public class BulkPagesViewedPerVisitGoalReadTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/write/BulkPagesViewedPerVisitGoalWriteTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/write/BulkPagesViewedPerVisitGoalWriteTests.java new file mode 100644 index 0000000000..140253bb30 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/write/BulkPagesViewedPerVisitGoalWriteTests.java @@ -0,0 +1,13 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.pages_viewed_per_visit.write; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkPagesViewedPerVisitGoalWriteToRowValuesMinimumDurationInSecondTest.class +}) +public class BulkPagesViewedPerVisitGoalWriteTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/write/BulkPagesViewedPerVisitGoalWriteToRowValuesMinimumDurationInSecondTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/write/BulkPagesViewedPerVisitGoalWriteToRowValuesMinimumDurationInSecondTest.java new file mode 100644 index 0000000000..c6ff8a9354 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/pages_viewed_per_visit/write/BulkPagesViewedPerVisitGoalWriteToRowValuesMinimumDurationInSecondTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.pages_viewed_per_visit.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.pages_viewed_per_visit.BulkPagesViewedPerVisitGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkPagesViewedPerVisitGoal; + +@RunWith(Parameterized.class) +public class BulkPagesViewedPerVisitGoalWriteToRowValuesMinimumDurationInSecondTest extends BulkPagesViewedPerVisitGoalTest { + + @Parameter(value = 1) + public Integer propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"123", 123}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Minimum Pages Viewed", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkPagesViewedPerVisitGoal c, Integer v) { + c.getPagesViewedPerVisitGoal().setMinimumPagesViewed(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/BulkUrlGoalTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/BulkUrlGoalTest.java new file mode 100644 index 0000000000..6539fb713b --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/BulkUrlGoalTest.java @@ -0,0 +1,69 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.url; + +import java.util.Map; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.internal.functionalinterfaces.Supplier; +import com.microsoft.bingads.v13.api.test.entities.BulkEntityTest; +import com.microsoft.bingads.v13.api.test.entities.EqualityComparerWithDescription; +import com.microsoft.bingads.v13.bulk.entities.BulkUrlGoal; +import com.microsoft.bingads.v13.campaignmanagement.UrlGoal; + +public abstract class BulkUrlGoalTest extends BulkEntityTest { + + @Override + protected void onEntityCreation(BulkUrlGoal entity) { + entity.setUrlGoal(new UrlGoal()); + } + + @Override + protected void testWriteProperty(String header, + String expectedRowValue, TProperty propertyValue, + BiConsumer setFunc) { + this.testWriteProperty(header, expectedRowValue, propertyValue, setFunc, new Supplier() { + @Override + public BulkUrlGoal get() { + return new BulkUrlGoal(); + } + }); + } + + @Override + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkUrlGoal get() { + return new BulkUrlGoal(); + } + }); + } + + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkUrlGoal get() { + return new BulkUrlGoal(); + } + }, comparer); + } + + @Override + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkUrlGoal get() { + return new BulkUrlGoal(); + } + }); + } + + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkUrlGoal get() { + return new BulkUrlGoal(); + } + }, comparer); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/BulkUrlGoalTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/BulkUrlGoalTests.java new file mode 100644 index 0000000000..63f8f89681 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/BulkUrlGoalTests.java @@ -0,0 +1,14 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.url; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +import com.microsoft.bingads.v13.api.test.entities.goal.url.read.BulkUrlGoalReadTests; +import com.microsoft.bingads.v13.api.test.entities.goal.url.write.BulkUrlGoalWriteTests; + +@RunWith(Suite.class) +@SuiteClasses({BulkUrlGoalReadTests.class, BulkUrlGoalWriteTests.class}) +public class BulkUrlGoalTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/read/BulkUrlGoalReadFromRowValuesUrlExpressionTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/read/BulkUrlGoalReadFromRowValuesUrlExpressionTest.java new file mode 100644 index 0000000000..780435ce7c --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/read/BulkUrlGoalReadFromRowValuesUrlExpressionTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.url.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.url.BulkUrlGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkUrlGoal; + +@RunWith(Parameterized.class) +public class BulkUrlGoalReadFromRowValuesUrlExpressionTest extends BulkUrlGoalTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Url Expression", "Url Expression"}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("URL Expression", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkUrlGoal c) { + return c.getUrlGoal().getUrlExpression(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/read/BulkUrlGoalReadFromRowValuesUrlOperatorTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/read/BulkUrlGoalReadFromRowValuesUrlOperatorTest.java new file mode 100644 index 0000000000..a7279a5fe7 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/read/BulkUrlGoalReadFromRowValuesUrlOperatorTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.url.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.goal.url.BulkUrlGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkUrlGoal; +import com.microsoft.bingads.v13.campaignmanagement.ExpressionOperator; + +public class BulkUrlGoalReadFromRowValuesUrlOperatorTest extends BulkUrlGoalTest { + + @Parameter(value = 1) + public ExpressionOperator expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Equals", ExpressionOperator.EQUALS}, + {"Contains", ExpressionOperator.CONTAINS}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("URL Operator", this.datum, this.expectedResult, new Function() { + @Override + public ExpressionOperator apply(BulkUrlGoal c) { + return c.getUrlGoal().getUrlOperator(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/read/BulkUrlGoalReadTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/read/BulkUrlGoalReadTests.java new file mode 100644 index 0000000000..cfea9347bd --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/read/BulkUrlGoalReadTests.java @@ -0,0 +1,14 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.url.read; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkUrlGoalReadFromRowValuesUrlExpressionTest.class, + BulkUrlGoalReadFromRowValuesUrlOperatorTest.class +}) +public class BulkUrlGoalReadTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/write/BulkUrlGoalWriteTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/write/BulkUrlGoalWriteTests.java new file mode 100644 index 0000000000..e5510b860e --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/write/BulkUrlGoalWriteTests.java @@ -0,0 +1,14 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.url.write; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkUrlGoalWriteToRowValuesUrlExpressionTest.class, + BulkUrlGoalWriteToRowValuesUrlOperatorTest.class +}) +public class BulkUrlGoalWriteTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/write/BulkUrlGoalWriteToRowValuesUrlExpressionTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/write/BulkUrlGoalWriteToRowValuesUrlExpressionTest.java new file mode 100644 index 0000000000..3745125d9e --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/write/BulkUrlGoalWriteToRowValuesUrlExpressionTest.java @@ -0,0 +1,39 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.url.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.url.BulkUrlGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkUrlGoal; + +@RunWith(Parameterized.class) +public class BulkUrlGoalWriteToRowValuesUrlExpressionTest extends BulkUrlGoalTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Url Expression", "Url Expression"}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("URL Expression", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkUrlGoal c, String v) { + c.getUrlGoal().setUrlExpression(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/write/BulkUrlGoalWriteToRowValuesUrlOperatorTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/write/BulkUrlGoalWriteToRowValuesUrlOperatorTest.java new file mode 100644 index 0000000000..2d603bc92a --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/goal/url/write/BulkUrlGoalWriteToRowValuesUrlOperatorTest.java @@ -0,0 +1,41 @@ +package com.microsoft.bingads.v13.api.test.entities.goal.url.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.goal.url.BulkUrlGoalTest; +import com.microsoft.bingads.v13.bulk.entities.BulkUrlGoal; +import com.microsoft.bingads.v13.campaignmanagement.ExpressionOperator; + +@RunWith(Parameterized.class) +public class BulkUrlGoalWriteToRowValuesUrlOperatorTest extends BulkUrlGoalTest { + + @Parameter(value = 1) + public ExpressionOperator propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Equals", ExpressionOperator.EQUALS}, + {"Contains", ExpressionOperator.CONTAINS}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("URL Operator", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkUrlGoal c, ExpressionOperator v) { + c.getUrlGoal().setUrlOperator(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/BulkImpressionBasedRemarketingListTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/BulkImpressionBasedRemarketingListTest.java new file mode 100644 index 0000000000..9ae529ea6c --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/BulkImpressionBasedRemarketingListTest.java @@ -0,0 +1,60 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list; + +import java.util.Map; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.internal.functionalinterfaces.Supplier; +import com.microsoft.bingads.v13.api.test.entities.BulkEntityTest; +import com.microsoft.bingads.v13.api.test.entities.EqualityComparerWithDescription; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; +import com.microsoft.bingads.v13.campaignmanagement.ImpressionBasedRemarketingList; + +public abstract class BulkImpressionBasedRemarketingListTest extends BulkEntityTest { + + @Override + protected void onEntityCreation(BulkImpressionBasedRemarketingList entity) { + entity.setImpressionBasedRemarketingList(new ImpressionBasedRemarketingList()); + } + + @Override + protected void testWriteProperty(String header, + String expectedRowValue, TProperty propertyValue, + BiConsumer setFunc) { + this.testWriteProperty(header, expectedRowValue, propertyValue, setFunc, new Supplier() { + @Override + public BulkImpressionBasedRemarketingList get() { + return new BulkImpressionBasedRemarketingList(); + } + }); + } + + @Override + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkImpressionBasedRemarketingList get() { + return new BulkImpressionBasedRemarketingList(); + } + }); + } + + protected void testReadProperty(String header, String input, TProperty expectedResult, Function actualValueFunc, EqualityComparerWithDescription comparer) { + this.testReadProperty(header, input, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkImpressionBasedRemarketingList get() { + return new BulkImpressionBasedRemarketingList(); + } + }, comparer); + } + + @Override + protected void testReadProperty(Map rowValues, TProperty expectedResult, Function actualValueFunc) { + this.testReadProperty(rowValues, expectedResult, actualValueFunc, new Supplier() { + @Override + public BulkImpressionBasedRemarketingList get() { + return new BulkImpressionBasedRemarketingList(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/BulkImpressionBasedRemarketingListTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/BulkImpressionBasedRemarketingListTests.java new file mode 100644 index 0000000000..3bf9ed2c86 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/BulkImpressionBasedRemarketingListTests.java @@ -0,0 +1,14 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.read.BulkImpressionBasedRemarketingListReadTests; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.write.BulkImpressionBasedRemarketingListWriteTests; + +@RunWith(Suite.class) +@SuiteClasses({BulkImpressionBasedRemarketingListReadTests.class, BulkImpressionBasedRemarketingListWriteTests.class}) +public class BulkImpressionBasedRemarketingListTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesDescriptionTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesDescriptionTest.java new file mode 100644 index 0000000000..39de14048a --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesDescriptionTest.java @@ -0,0 +1,37 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; + +public class BulkImpressionBasedRemarketingListReadFromRowValuesDescriptionTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Test Description 1", "Test Description 1"}, + {"", ""}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Description", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkImpressionBasedRemarketingList c) { + return c.getImpressionBasedRemarketingList().getDescription(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesEntityTypeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesEntityTypeTest.java new file mode 100644 index 0000000000..779feb3e7d --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesEntityTypeTest.java @@ -0,0 +1,45 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; +import com.microsoft.bingads.v13.campaignmanagement.ImpressionBasedEntityType; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListReadFromRowValuesEntityTypeTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter + public String datum; + + @Parameter(value = 1) + public ImpressionBasedEntityType expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Campaign", ImpressionBasedEntityType.CAMPAIGN}, + {"AdGroup", ImpressionBasedEntityType.AD_GROUP}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Entity Type", this.datum, this.expectedResult, new Function() { + @Override + public ImpressionBasedEntityType apply(BulkImpressionBasedRemarketingList c) { + return c.getImpressionBasedRemarketingList().getEntityType(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesIdTest.java new file mode 100644 index 0000000000..2eb7d2a695 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesIdTest.java @@ -0,0 +1,51 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListReadFromRowValuesIdTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter(value = 1) + public Long expectedResult; + + /* + * Test data generator. + * This method is called the the JUnit parameterized test runner and + * returns a Collection of Arrays. For each Array in the Collection, + * each array element corresponds to a parameter in the constructor. + */ + @Parameters + public static Collection data() { + // In this example, the parameter generator returns a List of + // arrays. Each array has two elements: { datum, expected }. + // These data are hard-coded into the class, but they could be + // generated or loaded in any way you like. + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Id", this.datum, this.expectedResult, new Function() { + @Override + public Long apply(BulkImpressionBasedRemarketingList c) { + return c.getImpressionBasedRemarketingList().getId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesImpressionAdGroupIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesImpressionAdGroupIdTest.java new file mode 100644 index 0000000000..d702ba1393 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesImpressionAdGroupIdTest.java @@ -0,0 +1,51 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListReadFromRowValuesImpressionAdGroupIdTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter(value = 1) + public Long expectedResult; + + /* + * Test data generator. + * This method is called the the JUnit parameterized test runner and + * returns a Collection of Arrays. For each Array in the Collection, + * each array element corresponds to a parameter in the constructor. + */ + @Parameters + public static Collection data() { + // In this example, the parameter generator returns a List of + // arrays. Each array has two elements: { datum, expected }. + // These data are hard-coded into the class, but they could be + // generated or loaded in any way you like. + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Impression Ad Group Id", this.datum, this.expectedResult, new Function() { + @Override + public Long apply(BulkImpressionBasedRemarketingList c) { + return c.getImpressionBasedRemarketingList().getAdGroupId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesImpressionCampaignIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesImpressionCampaignIdTest.java new file mode 100644 index 0000000000..ef7a44dade --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesImpressionCampaignIdTest.java @@ -0,0 +1,51 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListReadFromRowValuesImpressionCampaignIdTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter(value = 1) + public Long expectedResult; + + /* + * Test data generator. + * This method is called the the JUnit parameterized test runner and + * returns a Collection of Arrays. For each Array in the Collection, + * each array element corresponds to a parameter in the constructor. + */ + @Parameters + public static Collection data() { + // In this example, the parameter generator returns a List of + // arrays. Each array has two elements: { datum, expected }. + // These data are hard-coded into the class, but they could be + // generated or loaded in any way you like. + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Impression Campaign Id", this.datum, this.expectedResult, new Function() { + @Override + public Long apply(BulkImpressionBasedRemarketingList c) { + return c.getImpressionBasedRemarketingList().getCampaignId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesMembershipDurationTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesMembershipDurationTest.java new file mode 100644 index 0000000000..35fe7a73c9 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesMembershipDurationTest.java @@ -0,0 +1,50 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListReadFromRowValuesMembershipDurationTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter(value = 1) + public Integer expectedResult; + + /* + * Test data generator. + * This method is called the the JUnit parameterized test runner and + * returns a Collection of Arrays. For each Array in the Collection, + * each array element corresponds to a parameter in the constructor. + */ + @Parameters + public static Collection data() { + // In this example, the parameter generator returns a List of + // arrays. Each array has two elements: { datum, expected }. + // These data are hard-coded into the class, but they could be + // generated or loaded in any way you like. + return Arrays.asList(new Object[][]{ + {"123", 123}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Membership Duration", this.datum, this.expectedResult, new Function() { + @Override + public Integer apply(BulkImpressionBasedRemarketingList c) { + return c.getImpressionBasedRemarketingList().getMembershipDuration(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesNameTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesNameTest.java new file mode 100644 index 0000000000..f08ba3ad71 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesNameTest.java @@ -0,0 +1,37 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; + +public class BulkImpressionBasedRemarketingListReadFromRowValuesNameTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter(value = 1) + public String expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Test Audience 1", "Test Audience 1"}, + {"", ""}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Audience", this.datum, this.expectedResult, new Function() { + @Override + public String apply(BulkImpressionBasedRemarketingList c) { + return c.getImpressionBasedRemarketingList().getName(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesParentIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesParentIdTest.java new file mode 100644 index 0000000000..467c2f48f8 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesParentIdTest.java @@ -0,0 +1,43 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListReadFromRowValuesParentIdTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter(value = 1) + public Long expectedResult; + + @Parameters + public static Collection data() { + // In this example, the parameter generator returns a List of + // arrays. Each array has two elements: { datum, expected }. + // These data are hard-coded into the class, but they could be + // generated or loaded in any way you like. + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Parent Id", this.datum, this.expectedResult, new Function() { + @Override + public Long apply(BulkImpressionBasedRemarketingList c) { + return c.getImpressionBasedRemarketingList().getParentId(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesScopeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesScopeTest.java new file mode 100644 index 0000000000..b4006b7f3d --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesScopeTest.java @@ -0,0 +1,45 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; +import com.microsoft.bingads.v13.campaignmanagement.EntityScope; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListReadFromRowValuesScopeTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter + public String datum; + + @Parameter(value = 1) + public EntityScope expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Account", EntityScope.ACCOUNT}, + {"Customer", EntityScope.CUSTOMER}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Scope", this.datum, this.expectedResult, new Function() { + @Override + public EntityScope apply(BulkImpressionBasedRemarketingList c) { + return c.getImpressionBasedRemarketingList().getScope(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesStatusTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesStatusTest.java new file mode 100644 index 0000000000..3245f59f41 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadFromRowValuesStatusTest.java @@ -0,0 +1,45 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.read; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; +import com.microsoft.bingads.v13.bulk.entities.Status; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListReadFromRowValuesStatusTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter + public String datum; + + @Parameter(value = 1) + public Status expectedResult; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Active", Status.ACTIVE}, + {"Deleted", Status.DELETED}, + {"", null}, + {null, null} + }); + } + + @Test + public void testRead() { + this.testReadProperty("Status", this.datum, this.expectedResult, new Function() { + @Override + public Status apply(BulkImpressionBasedRemarketingList c) { + return c.getStatus(); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadTests.java new file mode 100644 index 0000000000..1ce1ccc6db --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/read/BulkImpressionBasedRemarketingListReadTests.java @@ -0,0 +1,22 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.read; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ + BulkImpressionBasedRemarketingListReadFromRowValuesIdTest.class, + BulkImpressionBasedRemarketingListReadFromRowValuesParentIdTest.class, + BulkImpressionBasedRemarketingListReadFromRowValuesNameTest.class, + BulkImpressionBasedRemarketingListReadFromRowValuesStatusTest.class, + BulkImpressionBasedRemarketingListReadFromRowValuesDescriptionTest.class, + BulkImpressionBasedRemarketingListReadFromRowValuesImpressionCampaignIdTest.class, + BulkImpressionBasedRemarketingListReadFromRowValuesImpressionAdGroupIdTest.class, + BulkImpressionBasedRemarketingListReadFromRowValuesEntityTypeTest.class, + BulkImpressionBasedRemarketingListReadFromRowValuesMembershipDurationTest.class, + BulkImpressionBasedRemarketingListReadFromRowValuesScopeTest.class +}) +public class BulkImpressionBasedRemarketingListReadTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteTests.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteTests.java new file mode 100644 index 0000000000..d94a061b0f --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteTests.java @@ -0,0 +1,23 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.write; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + + +@RunWith(Suite.class) +@SuiteClasses({ + BulkImpressionBasedRemarketingListWriteToRowValuesIdTest.class, + BulkImpressionBasedRemarketingListWriteToRowValuesParentIdTest.class, + BulkImpressionBasedRemarketingListWriteToRowValuesDescriptionTest.class, + BulkImpressionBasedRemarketingListWriteToRowValuesMembershipDurationTest.class, + BulkImpressionBasedRemarketingListWriteToRowValuesImpressionAdGroupIdTest.class, + BulkImpressionBasedRemarketingListWriteToRowValuesImpressionCampaignIdTest.class, + BulkImpressionBasedRemarketingListWriteToRowValuesEntityTypeTest.class, + BulkImpressionBasedRemarketingListWriteToRowValuesNameTest.class, + BulkImpressionBasedRemarketingListWriteToRowValuesStatusTest.class, + BulkImpressionBasedRemarketingListWriteToRowValuesScopeTest.class, +}) +public class BulkImpressionBasedRemarketingListWriteTests { + +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesDescriptionTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesDescriptionTest.java new file mode 100644 index 0000000000..adfbe537b9 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesDescriptionTest.java @@ -0,0 +1,37 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; + +public class BulkImpressionBasedRemarketingListWriteToRowValuesDescriptionTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Test Description 1", "Test Description 1"}, + {"", ""}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Description", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkImpressionBasedRemarketingList c, String v) { + c.getImpressionBasedRemarketingList().setDescription(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesEntityTypeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesEntityTypeTest.java new file mode 100644 index 0000000000..8c337524ec --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesEntityTypeTest.java @@ -0,0 +1,45 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; +import com.microsoft.bingads.v13.campaignmanagement.ImpressionBasedEntityType; +import com.microsoft.bingads.v13.campaignmanagement.ImpressionBasedEntityType; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListWriteToRowValuesEntityTypeTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter + public String datum; + + @Parameter(value = 1) + public ImpressionBasedEntityType propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Campaign", ImpressionBasedEntityType.CAMPAIGN}, + {"AdGroup", ImpressionBasedEntityType.AD_GROUP}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Entity Type", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkImpressionBasedRemarketingList c, ImpressionBasedEntityType v) { + c.getImpressionBasedRemarketingList().setEntityType(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesIdTest.java new file mode 100644 index 0000000000..f8c1545fbb --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesIdTest.java @@ -0,0 +1,50 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListWriteToRowValuesIdTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter(value = 1) + public Long propertyValue; + + /* + * Test data generator. + * This method is called the the JUnit parameterized test runner and + * returns a Collection of Arrays. For each Array in the Collection, + * each array element corresponds to a parameter in the constructor. + */ + @Parameters + public static Collection data() { + // In this example, the parameter generator returns a List of + // arrays. Each array has two elements: { datum, expected }. + // These data are hard-coded into the class, but they could be + // generated or loaded in any way you like. + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkImpressionBasedRemarketingList c, Long v) { + c.getImpressionBasedRemarketingList().setId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesImpressionAdGroupIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesImpressionAdGroupIdTest.java new file mode 100644 index 0000000000..b741581bbc --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesImpressionAdGroupIdTest.java @@ -0,0 +1,50 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListWriteToRowValuesImpressionAdGroupIdTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter(value = 1) + public Long propertyValue; + + /* + * Test data generator. + * This method is called the the JUnit parameterized test runner and + * returns a Collection of Arrays. For each Array in the Collection, + * each array element corresponds to a parameter in the constructor. + */ + @Parameters + public static Collection data() { + // In this example, the parameter generator returns a List of + // arrays. Each array has two elements: { datum, expected }. + // These data are hard-coded into the class, but they could be + // generated or loaded in any way you like. + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Impression Ad Group Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkImpressionBasedRemarketingList c, Long v) { + c.getImpressionBasedRemarketingList().setAdGroupId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesImpressionCampaignIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesImpressionCampaignIdTest.java new file mode 100644 index 0000000000..92a0bf0c52 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesImpressionCampaignIdTest.java @@ -0,0 +1,50 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListWriteToRowValuesImpressionCampaignIdTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter(value = 1) + public Long propertyValue; + + /* + * Test data generator. + * This method is called the the JUnit parameterized test runner and + * returns a Collection of Arrays. For each Array in the Collection, + * each array element corresponds to a parameter in the constructor. + */ + @Parameters + public static Collection data() { + // In this example, the parameter generator returns a List of + // arrays. Each array has two elements: { datum, expected }. + // These data are hard-coded into the class, but they could be + // generated or loaded in any way you like. + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Impression Campaign Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkImpressionBasedRemarketingList c, Long v) { + c.getImpressionBasedRemarketingList().setCampaignId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesMembershipDurationTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesMembershipDurationTest.java new file mode 100644 index 0000000000..aee16c4896 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesMembershipDurationTest.java @@ -0,0 +1,49 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListWriteToRowValuesMembershipDurationTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter(value = 1) + public Integer propertyValue; + + /* + * Test data generator. + * This method is called the the JUnit parameterized test runner and + * returns a Collection of Arrays. For each Array in the Collection, + * each array element corresponds to a parameter in the constructor. + */ + @Parameters + public static Collection data() { + // In this example, the parameter generator returns a List of + // arrays. Each array has two elements: { datum, expected }. + // These data are hard-coded into the class, but they could be + // generated or loaded in any way you like. + return Arrays.asList(new Object[][]{ + {"12", 12}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Membership Duration", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkImpressionBasedRemarketingList c, Integer v) { + c.getImpressionBasedRemarketingList().setMembershipDuration(v);; + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesNameTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesNameTest.java new file mode 100644 index 0000000000..5212d4c4fa --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesNameTest.java @@ -0,0 +1,37 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; + +public class BulkImpressionBasedRemarketingListWriteToRowValuesNameTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter(value = 1) + public String propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Test Audience 1", "Test Audience 1"}, + {"", ""}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Audience", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkImpressionBasedRemarketingList c, String v) { + c.getImpressionBasedRemarketingList().setName(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesParentIdTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesParentIdTest.java new file mode 100644 index 0000000000..84122b5602 --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesParentIdTest.java @@ -0,0 +1,43 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListWriteToRowValuesParentIdTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter(value = 1) + public Long propertyValue; + + @Parameters + public static Collection data() { + // In this example, the parameter generator returns a List of + // arrays. Each array has two elements: { datum, expected }. + // These data are hard-coded into the class, but they could be + // generated or loaded in any way you like. + return Arrays.asList(new Object[][]{ + {"123", 123L}, + {"9223372036854775807", 9223372036854775807L} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Parent Id", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkImpressionBasedRemarketingList c, Long v) { + c.getImpressionBasedRemarketingList().setParentId(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesScopeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesScopeTest.java new file mode 100644 index 0000000000..fd6c847b8e --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesScopeTest.java @@ -0,0 +1,44 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; +import com.microsoft.bingads.v13.campaignmanagement.EntityScope; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListWriteToRowValuesScopeTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter + public String datum; + + @Parameter(value = 1) + public EntityScope propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Customer", EntityScope.CUSTOMER}, + {"Account", EntityScope.ACCOUNT}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Scope", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkImpressionBasedRemarketingList c, EntityScope v) { + c.getImpressionBasedRemarketingList().setScope(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesStatusTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesStatusTest.java new file mode 100644 index 0000000000..6c0df7c55e --- /dev/null +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/impression_based_remarketing_list/write/BulkImpressionBasedRemarketingListWriteToRowValuesStatusTest.java @@ -0,0 +1,44 @@ +package com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.write; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameter; +import org.junit.runners.Parameterized.Parameters; + +import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer; +import com.microsoft.bingads.v13.api.test.entities.impression_based_remarketing_list.BulkImpressionBasedRemarketingListTest; +import com.microsoft.bingads.v13.bulk.entities.BulkImpressionBasedRemarketingList; +import com.microsoft.bingads.v13.bulk.entities.Status; + +@RunWith(Parameterized.class) +public class BulkImpressionBasedRemarketingListWriteToRowValuesStatusTest extends BulkImpressionBasedRemarketingListTest { + + @Parameter + public String datum; + + @Parameter(value = 1) + public Status propertyValue; + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[][]{ + {"Active", Status.ACTIVE}, + {"Deleted", Status.DELETED}, + {null, null} + }); + } + + @Test + public void testWrite() { + this.testWriteProperty("Status", this.datum, this.propertyValue, new BiConsumer() { + @Override + public void accept(BulkImpressionBasedRemarketingList c, Status v) { + c.setStatus(v); + } + }); + } +} diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/seasonality_adjustment/read/BulkSeasonalityAdjustmentReadFromRowValuesDeviceTypeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/seasonality_adjustment/read/BulkSeasonalityAdjustmentReadFromRowValuesDeviceTypeTest.java index 1dffe0603f..8dfadd0e2a 100644 --- a/src/test/java/com/microsoft/bingads/v13/api/test/entities/seasonality_adjustment/read/BulkSeasonalityAdjustmentReadFromRowValuesDeviceTypeTest.java +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/seasonality_adjustment/read/BulkSeasonalityAdjustmentReadFromRowValuesDeviceTypeTest.java @@ -8,6 +8,8 @@ import org.junit.runners.Parameterized.Parameters; import com.microsoft.bingads.internal.functionalinterfaces.Function; +import com.microsoft.bingads.internal.functionalinterfaces.Supplier; +import com.microsoft.bingads.v13.api.test.entities.ObjectComparer; import com.microsoft.bingads.v13.api.test.entities.seasonality_adjustment.BulkSeasonalityAdjustmentTest; import com.microsoft.bingads.v13.bulk.entities.BulkSeasonalityAdjustment; import com.microsoft.bingads.v13.campaignmanagement.DeviceType; @@ -15,13 +17,12 @@ public class BulkSeasonalityAdjustmentReadFromRowValuesDeviceTypeTest extends BulkSeasonalityAdjustmentTest { @Parameter(value = 1) - public DeviceType expectedResult; + public Collection expectedResult; @Parameters public static Collection data() { return Arrays.asList(new Object[][]{ - {"Computers", DeviceType.COMPUTERS}, - {"Tablets", DeviceType.TABLETS}, + {"Computers,Tablets", Arrays.asList(new DeviceType[] { DeviceType.COMPUTERS, DeviceType.TABLETS })}, {"", null}, {null, null} }); @@ -29,11 +30,17 @@ public static Collection data() { @Test public void testRead() { - this.testReadProperty("Device Type", this.datum, this.expectedResult, new Function() { + this.>testReadProperty("Device Type", this.datum, this.expectedResult, new Function>() { @Override - public DeviceType apply(BulkSeasonalityAdjustment c) { + public Collection apply(BulkSeasonalityAdjustment c) { return c.getSeasonalityAdjustment().getDeviceTypeFilter(); } - }); + + }, new Supplier() { + @Override + public BulkSeasonalityAdjustment get() { + return new BulkSeasonalityAdjustment(); + } + }, new ObjectComparer>()); } } diff --git a/src/test/java/com/microsoft/bingads/v13/api/test/entities/seasonality_adjustment/write/BulkSeasonalityAdjustmentWriteToRowValuesDeviceTypeTest.java b/src/test/java/com/microsoft/bingads/v13/api/test/entities/seasonality_adjustment/write/BulkSeasonalityAdjustmentWriteToRowValuesDeviceTypeTest.java index f5916e46d2..757e9edb87 100644 --- a/src/test/java/com/microsoft/bingads/v13/api/test/entities/seasonality_adjustment/write/BulkSeasonalityAdjustmentWriteToRowValuesDeviceTypeTest.java +++ b/src/test/java/com/microsoft/bingads/v13/api/test/entities/seasonality_adjustment/write/BulkSeasonalityAdjustmentWriteToRowValuesDeviceTypeTest.java @@ -18,23 +18,22 @@ public class BulkSeasonalityAdjustmentWriteToRowValuesDeviceTypeTest extends BulkSeasonalityAdjustmentTest { @Parameter(value = 1) - public DeviceType propertyValue; + public Collection propertyValue; @Parameters public static Collection data() { return Arrays.asList(new Object[][]{ - {"Computers", DeviceType.COMPUTERS}, - {"Tablets", DeviceType.TABLETS}, + {"Computers,Tablets", Arrays.asList(new DeviceType[] { DeviceType.COMPUTERS, DeviceType.TABLETS })}, {null, null} }); } @Test public void testWrite() { - this.testWriteProperty("Device Type", this.datum, this.propertyValue, new BiConsumer() { + this.> testWriteProperty("Device Type", this.datum, this.propertyValue, new BiConsumer>() { @Override - public void accept(BulkSeasonalityAdjustment c, DeviceType v) { - c.getSeasonalityAdjustment().setDeviceTypeFilter(v);; + public void accept(BulkSeasonalityAdjustment c, Collection v) { + c.getSeasonalityAdjustment().setDeviceTypeFilter(v); } }); }