# Google.Play.AppUpdate.AppUpdateRequest

A [CustomYieldInstruction](https://docs.unity3d.com/ScriptReference/CustomYieldInstruction.html) used to monitor an ongoing in-app update.

## Summary

### Inheritance

Inherits from: CustomYieldInstruction

| ### Events ||
|---|---|
| `https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateRequest#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateRequest_1a49f76fffbebe0d59be801acdc07e0163 = delegate { }` | `Action< https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateRequest#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateRequest >` Event indicating that the request has completed. |

| ### Properties ||
|---|---|
| `https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateRequest#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateRequest_1a2af4b706265de176b7e4b97dc5e24c77` | `ulong` Returns the total number of bytes already downloaded for the update. |
| `https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateRequest#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateRequest_1a6da9752dd14e55004dcd3556471f4d83` | `float` Returns a value between 0 and 1 indicating the overall download progress of a flexible update flow. |
| `https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateRequest#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateRequest_1a48d3affb41acea36c81a25be097c244e` | `https://developer.android.com/reference/unity/namespace/Google/Play/AppUpdate#namespaceGoogle_1_1Play_1_1AppUpdate_1a2efd4be14a91cfac4e689974efaad205` Returns the error that prevented this request from completing successfully. |
| `https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateRequest#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateRequest_1a4f50b4aef39b8c0629b84a3dd607dfcf` | `bool` Returns true if this request has finished, false otherwise. |
| `https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateRequest#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateRequest_1a34779e2a2f205994356801d4ed4c8201` | `https://developer.android.com/reference/unity/namespace/Google/Play/AppUpdate#namespaceGoogle_1_1Play_1_1AppUpdate_1a2b21b28507548425a6bd61d49d04a08a` Returns the status of this request, for example AppUpdateStatus.Pending. |
| `https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateRequest#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateRequest_1a535db5cdcd437633df86a52a9a726a96` | `ulong` Returns the total number of bytes to download for the update. |
| `https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateRequest#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateRequest_1a1fc586754b3ea0ad5f1a27388e26d3ef` | `override bool` Implements the [CustomYieldInstruction.keepWaiting](https://docs.unity3d.com/ScriptReference/CustomYieldInstruction-keepWaiting.html) property so that this request can be yielded on in a coroutine. |

| ### Protected functions ||
|---|---|
| `https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateRequest#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateRequest_1a5dd79b39652d46c674d140639d8d9e9b()` | `void` Invokes the [Completed](https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateRequest#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateRequest_1a49f76fffbebe0d59be801acdc07e0163) event. |

## Events

### Completed

```c#
Action< AppUpdateRequest > Completed = delegate { }
```
Event indicating that the request has completed.

If an event handler is registered after the operation has completed, and thus after this event has been invoked, then the handler will be called synchronously.

## Properties

### BytesDownloaded

```c#
ulong BytesDownloaded
```
Returns the total number of bytes already downloaded for the update.

### DownloadProgress

```c#
float DownloadProgress
```
Returns a value between 0 and 1 indicating the overall download progress of a flexible update flow.

Note: If this value is 1, it doesn't mean that the update has completed, only that the Downloading stage has finished.

Note: always returns 0 for an immediate update flow.

### Error

```c#
AppUpdateErrorCode Error
```
Returns the error that prevented this request from completing successfully.

This will be AppUpdateErrorCode.NoError in the case of a pending request or a successful update.

### IsDone

```c#
bool IsDone
```
Returns true if this request has finished, false otherwise.

### Status

```c#
AppUpdateStatus Status
```
Returns the status of this request, for example AppUpdateStatus.Pending.

This will be AppUpdateStatus.Failed if an error occurred.

### TotalBytesToDownload

```c#
ulong TotalBytesToDownload
```
Returns the total number of bytes to download for the update.

### keepWaiting

```c#
override bool keepWaiting
```
Implements the [CustomYieldInstruction.keepWaiting](https://docs.unity3d.com/ScriptReference/CustomYieldInstruction-keepWaiting.html) property so that this request can be yielded on in a coroutine.

## Protected functions

### InvokeCompletedEvent

```c#
void InvokeCompletedEvent()
```
Invokes the [Completed](https://developer.android.com/reference/unity/class/Google/Play/AppUpdate/AppUpdateRequest#classGoogle_1_1Play_1_1AppUpdate_1_1AppUpdateRequest_1a49f76fffbebe0d59be801acdc07e0163) event.