Package com.google.ads.googleads.codegen
Class GoogleAdsAllVersionsCodeGenerator
java.lang.Object
com.google.ads.googleads.codegen.GoogleAdsAllVersionsCodeGenerator
- All Implemented Interfaces:
Generator
Generates code for and writes the GoogleAdsAllVersions interface, which provides methods for
accessing the GoogleAdsVersion service for each available version of the API as well as a
getLatestVersion method.
Example generated code snippets:
public interface GoogleAdsAllVersions {
GoogleAdsVersion getVersion1();
com.google.ads.googleads.v2.services.GoogleAdsVersion getVersion2();
com.google.ads.googleads.v2.services.GoogleAdsVersion getLatestVersion();
}
-
Constructor Summary
ConstructorsConstructorDescriptionGoogleAdsAllVersionsCodeGenerator(Set<Integer> versions, int latestVersion, File targetDirectory) Creates an instance of the generator. -
Method Summary
Modifier and TypeMethodDescriptioncom.squareup.javapoet.JavaFilegenerate()Generates the code for the GoogleAdsAllVersions interface and writes the file.
-
Constructor Details
-
GoogleAdsAllVersionsCodeGenerator
public GoogleAdsAllVersionsCodeGenerator(Set<Integer> versions, int latestVersion, File targetDirectory) Creates an instance of the generator.- Parameters:
versions- available versions of the Google Ads library.latestVersion- the latest available version of the Google Ads library.
-
-
Method Details