Class Version

java.lang.Object
com.google.ads.googleads.lib.catalog.Version
All Implemented Interfaces:
Comparable<Version>

public final class Version extends Object implements Comparable<Version>
Represents the metadata of a version of the Google Ads API. Provides a TypeFactory instance which can be used to create API object instances in a version independent context.
  • Method Details

    • getVersionNumber

      public int getVersionNumber()
      Gets the (major) version number of this version.
    • getVersionName

      public String getVersionName()
      Returns the version name, e.g. "v1".
      Returns:
      the version name
    • compareTo

      public int compareTo(Version o)
      Allows sorting of versions, higher version numbers have lower sorting rank, as in v1 < v0.
      Specified by:
      compareTo in interface Comparable<Version>
    • getServiceClientFactoryClass

      public Class<?> getServiceClientFactoryClass()
      Returns a class which enumerates the service clients for this version.
    • getExceptionFactory

      public com.google.ads.googleads.lib.stubs.exceptions.BaseGoogleAdsException.Factory getExceptionFactory()
      Returns a TypeFactory instance which can be used to create version specific objects without binding to the specific versioned class name.
    • containsMessage

      public boolean containsMessage(com.google.protobuf.Message input)
      Returns true if this Version is the same as that of the provided message.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object