All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.bingads.v13.bulk.entities.BulkAppInstallAd Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 13.0.22.1
Show newest version
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.AdType;
import com.microsoft.bingads.v13.campaignmanagement.AppInstallAd;
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 an app install ad.
 *
 * This class exposes the {@link #setAppInstallAd} and {@link #getAppInstallAd} methods
 * that can be used to read and write fields of the App Install Ad record in a bulk file.
 *
 * 

* For more information, see App Install Ad at * https://go.microsoft.com/fwlink/?linkid=846127 *

* * @see BulkServiceManager * @see BulkOperation * @see BulkFileReader * @see BulkFileWriter */ public class BulkAppInstallAd extends BulkAd { private static final List> MAPPINGS; static { List> m = new ArrayList>(); m.add(new SimpleBulkMapping(StringTable.AppPlatform, new Function() { @Override public String apply(BulkAppInstallAd c) { return c.getAppInstallAd().getAppPlatform(); } }, new BiConsumer() { @Override public void accept(String v, BulkAppInstallAd c) { c.getAppInstallAd().setAppPlatform(v); } } )); m.add(new SimpleBulkMapping(StringTable.AppStoreId, new Function() { @Override public String apply(BulkAppInstallAd c) { return c.getAppInstallAd().getAppStoreId(); } }, new BiConsumer() { @Override public void accept(String v, BulkAppInstallAd c) { c.getAppInstallAd().setAppStoreId(v); } } )); m.add(new SimpleBulkMapping(StringTable.Title, new Function() { @Override public String apply(BulkAppInstallAd c) { return c.getAd().getTitle(); } }, new BiConsumer() { @Override public void accept(String v, BulkAppInstallAd c) { c.getAd().setTitle(v); } } )); m.add(new SimpleBulkMapping(StringTable.Text, new Function() { @Override public String apply(BulkAppInstallAd c) { return c.getAd().getText(); } }, new BiConsumer() { @Override public void accept(String v, BulkAppInstallAd c) { c.getAd().setText(v); } } )); MAPPINGS = Collections.unmodifiableList(m); } @Override public void processMappingsToRowValues(RowValues values, boolean excludeReadonlyData) { validatePropertyNotNull(getAppInstallAd(), "AppInstallAd"); super.processMappingsToRowValues(values, excludeReadonlyData); MappingHelpers.convertToValues(this, values, MAPPINGS); } @Override public void processMappingsFromRowValues(RowValues values) { this.setAd(new AppInstallAd()); this.getAd().setType(AdType.APP_INSTALL); super.processMappingsFromRowValues(values); MappingHelpers.convertToEntity(values, MAPPINGS, this); } /** * Gets the app install ad. */ public AppInstallAd getAppInstallAd() { return this.ad; } /** * Sets the app install ad. */ public void setAppInstallAd(AppInstallAd ad) { this.setAd(ad); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy