Class Version
java.lang.Object
com.google.ads.googleads.lib.catalog.Version
- All Implemented Interfaces:
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
Modifier and TypeMethodDescriptionintAllows 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.booleancom.google.ads.googleads.lib.stubs.exceptions.BaseGoogleAdsException.FactoryReturns a TypeFactory instance which can be used to create version specific objects without binding to the specific versioned class name.Class<?>Returns a class which enumerates the service clients for this version.Returns the version name, e.g.intGets the (major) version number of this version.inthashCode()
-
Method Details
-
getVersionNumber
public int getVersionNumber()Gets the (major) version number of this version. -
getVersionName
Returns the version name, e.g. "v1".- Returns:
- the version name
-
compareTo
Allows sorting of versions, higher version numbers have lower sorting rank, as in v1 < v0.- Specified by:
compareToin interfaceComparable<Version>
-
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
-
hashCode
public int hashCode()
-