Search in sources :

Example 21 with Network

use of com.google.api.ads.admanager.axis.v202202.Network in project googleads-java-lib by googleads.

the class MakeTestNetwork method runExample.

/**
 * Runs the example.
 *
 * @param adManagerServices the services factory.
 * @param session the session.
 * @throws ApiException if the API request failed with one or more service errors.
 * @throws RemoteException if the API request failed due to other errors.
 */
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException {
    // Get the NetworkService.
    NetworkServiceInterface networkService = adManagerServices.get(session, NetworkServiceInterface.class);
    // Make the test network.
    Network network = networkService.makeTestNetwork();
    System.out.printf("Test network with network code '%s' and display name '%s' created.%n" + "You may now sign in at https://admanager.google.com/%s%n", network.getNetworkCode(), network.getDisplayName(), network.getNetworkCode());
}
Also used : NetworkServiceInterface(com.google.api.ads.admanager.axis.v202108.NetworkServiceInterface) Network(com.google.api.ads.admanager.axis.v202108.Network)

Aggregations

NetworkServiceInterface (com.google.api.ads.admanager.axis.v202202.NetworkServiceInterface)12 Network (com.google.api.ads.admanager.axis.v202202.Network)6 Random (java.util.Random)6 AdUnitTargeting (com.google.api.ads.admanager.axis.v202202.AdUnitTargeting)5 InventoryTargeting (com.google.api.ads.admanager.axis.v202202.InventoryTargeting)5 Network (com.google.api.ads.admanager.axis.v202108.Network)4 NetworkServiceInterface (com.google.api.ads.admanager.axis.v202108.NetworkServiceInterface)4 Network (com.google.api.ads.admanager.axis.v202111.Network)4 NetworkServiceInterface (com.google.api.ads.admanager.axis.v202111.NetworkServiceInterface)4 Size (com.google.api.ads.admanager.axis.v202202.Size)4 Targeting (com.google.api.ads.admanager.axis.v202202.Targeting)4 CreativePlaceholder (com.google.api.ads.admanager.axis.v202202.CreativePlaceholder)3 Goal (com.google.api.ads.admanager.axis.v202202.Goal)3 Money (com.google.api.ads.admanager.axis.v202202.Money)3 CustomCriteria (com.google.api.ads.admanager.axis.v202202.CustomCriteria)2 CustomCriteriaSet (com.google.api.ads.admanager.axis.v202202.CustomCriteriaSet)2 GeoTargeting (com.google.api.ads.admanager.axis.v202202.GeoTargeting)2 LineItem (com.google.api.ads.admanager.axis.v202202.LineItem)2 LineItemServiceInterface (com.google.api.ads.admanager.axis.v202202.LineItemServiceInterface)2 Location (com.google.api.ads.admanager.axis.v202202.Location)2