# RemoteMsgField

# RemoteMsgField

Artifact:[androidx.test.espresso:espresso-core](https://developer.android.com/jetpack/androidx/releases/test-espresso)  
[View Source](https://cs.android.com/search?q=file:androidx/test/espresso/remote/annotation/RemoteMsgField.java+class:androidx.test.espresso.remote.annotation.RemoteMsgField)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/test/espresso/remote/annotation/RemoteMsgField "View this page in Java")

<br />

```
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = [ElementType.FIELD])
annotation RemoteMsgField
```

<br />

*** ** * ** ***

Class fields annotated with the[RemoteMsgField](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/annotation/RemoteMsgField)annotation are automatically serialised to their proto representation when used in combination with a[androidx.test.espresso.remote.GenericRemoteMessage](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/GenericRemoteMessage).

The order field is mandatory and represents the declared field order in the class this annotation is used in. The order must match the declared constructor param types of the constructor annotated with {[RemoteMsgConstructor](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/annotation/RemoteMsgConstructor)}.  

|                                                         See also                                                          |
|---------------------------------------------------------------------------------------------------------------------------|---|
| [GenericRemoteMessage](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/GenericRemoteMessage) |   |

## Summary

|                                  ### Public functions                                  |
|----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `abstract `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [order](https://developer.android.com/reference/kotlin/androidx/test/espresso/remote/annotation/RemoteMsgField#order())`()` Returns the order of this field. |

## Public functions

### order

```
abstract fun order(): Int
```

Returns the order of this field. Order values need to start with 0.