Class Version

  • All Implemented Interfaces:
    java.lang.Comparable<Version>

    public final class Version
    extends java.lang.Object
    implements java.lang.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 Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(Version o)
      Allows sorting of versions, higher version numbers have lower sorting rank, as in v1 < v0.
      boolean containsMessage​(com.google.protobuf.Message input)
      Returns true if this Version is the same as that of the provided message.
      boolean equals​(java.lang.Object o)  
      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.
      java.lang.Class<?> getServiceClientFactoryClass()
      Returns a class which enumerates the service clients for this version.
      java.lang.String getVersionName()
      Returns the version name, e.g.
      int getVersionNumber()
      Gets the (major) version number of this version.
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getVersionNumber

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

        public java.lang.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 java.lang.Comparable<Version>
      • getServiceClientFactoryClass

        public java.lang.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​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object