Annotation Type VersionDescriptor


  • @Retention(RUNTIME)
    @Target({TYPE,METHOD})
    public @interface VersionDescriptor
    Specifies that a class is a factory of service clients for a version of the Google Ads API. All methods in the class should be annotated with @ServiceClientDescriptor.
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.Class<? extends BaseGoogleAdsException.Factory> googleAdsExceptionFactory
      Specifies the factory to use for creating GoogleAdsException instances for this version.
      java.lang.String versionName
      Specifies the name of the version, as in v[0-9]+
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String catalogName
      Specifies a virtual namespace for the files generated by the annotation processor.
    • Element Detail

      • versionName

        java.lang.String versionName
        Specifies the name of the version, as in v[0-9]+
      • googleAdsExceptionFactory

        java.lang.Class<? extends BaseGoogleAdsException.Factory> googleAdsExceptionFactory
        Specifies the factory to use for creating GoogleAdsException instances for this version.
      • catalogName

        java.lang.String catalogName
        Specifies a virtual namespace for the files generated by the annotation processor. The catalogName will be appended to each of the generated files (e.g. GeneratedCatalog_v1_v2 for a catalogName equal to "v1_v2") unless the catalogName is an empty string, in which case, nothing will be appended to the generated files.

        This is necessary to write tests against the files generated by the annotation processor that include versionName parameters that are independent of the existing release of the library.

        Should be formatted as a list of the versions included in that given catalog, ordered from least to greatest and joined by an underscore. For example, a catalog that includes only v1 should equal "v1". A catalog that includes v1 and v2 should equal v1_v2. A catalog that includes v1, v2, and v3 should equal v1_v2_v3. CatalogNames need not be formatted in this way and can be any arbitrary string. However, formatting in this manner is the convention adopted by this library.

        Default:
        ""