Class Version
- java.lang.Object
-
- com.google.ads.googleads.lib.catalog.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 intcompareTo(Version o)Allows sorting of versions, higher version numbers have lower sorting rank, as in v1 < v0.booleancontainsMessage(com.google.protobuf.Message input)Returns true if this Version is the same as that of the provided message.booleanequals(java.lang.Object o)com.google.ads.googleads.lib.stubs.exceptions.BaseGoogleAdsException.FactorygetExceptionFactory()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.StringgetVersionName()Returns the version name, e.g.intgetVersionNumber()Gets the (major) version number of this version.inthashCode()
-
-
-
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:
compareToin interfacejava.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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-