# VersionBuilders.VersionInfo

Artifact: [androidx.wear.protolayout:protolayout-expression](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/expression/VersionBuilders.java+class:androidx.wear.protolayout.expression.VersionBuilders.VersionInfo) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***


```
@RequiresSchemaVersion(major = 1, minor = 0)
class VersionBuilders.VersionInfo : Comparable<VersionBuilders.VersionInfo!>
```

<br />

*** ** * ** ***

Version information. This is used to encode the schema version of a payload (e.g. inside of a layout).

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/VersionBuilders.VersionInfo.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/VersionBuilders.VersionInfo` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/VersionBuilders.VersionInfo#compareTo(androidx.wear.protolayout.expression.VersionBuilders.VersionInfo)(other: https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/VersionBuilders.VersionInfo)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/VersionBuilders.VersionInfo#equals(java.lang.Object)(obj: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/VersionBuilders.VersionInfo#getMajor()()` Gets major version. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/VersionBuilders.VersionInfo#getMinor()()` Gets minor version. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/VersionBuilders.VersionInfo#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/VersionBuilders.VersionInfo#toString()()` |

## Public functions

### compareTo

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.1.0)

```
fun compareTo(other: VersionBuilders.VersionInfo): Int
```

### equals

```
fun equals(obj: Any?): Boolean
```

### getMajor

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
fun getMajor(): Int
```

Gets major version. Incremented on breaking changes (i.e. compatibility is not guaranteed across major versions).

### getMinor

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
fun getMinor(): Int
```

Gets minor version. Incremented on non-breaking changes (e.g. schema additions). Anything consuming a payload can safely consume anything with a lower minor version.

### hashCode

```
fun hashCode(): Int
```

### toString

```
fun toString(): String
```