# DataUpdateRequest

public class **DataUpdateRequest** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
implements [Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) A request to update data added by the app from the Google Fit store in the time interval
specified.

An app will provide time range using startTimeMillis and endTimeMillis for which app wants
to update the fitness data. Existing fitness data for the provided time range will be
cleared. In addition, app will provide `https://developers.google.com/android/reference/com/google/android/gms/fitness/data/DataSet`
which will have new fitness data for the provided time range. This new data will be inserted
into fitness store.

An app can only update data that it has added and cannot update data added by other
apps.

### Nested Class Summary

|---|---|---|---|
| class | [DataUpdateRequest.Builder](https://developers.google.com/android/reference/com/google/android/gms/fitness/request/DataUpdateRequest.Builder) || Builder used to create new DataUpdateRequests. |

### Inherited Constant Summary

From interface android.os.Parcelable

|---|---|---|
| int | CONTENTS_FILE_DESCRIPTOR |   |
| int | PARCELABLE_WRITE_RETURN_VALUE |   |

### Field Summary

|---|---|---|
| public static final [Creator](https://developer.android.com/reference/android/os/Parcelable.Creator.html)\<[DataUpdateRequest](https://developers.google.com/android/reference/com/google/android/gms/fitness/request/DataUpdateRequest)\> | [CREATOR](https://developers.google.com/android/reference/com/google/android/gms/fitness/request/DataUpdateRequest#CREATOR) |   |

### Public Method Summary

|---|---|
| boolean | [equals](https://developers.google.com/android/reference/com/google/android/gms/fitness/request/DataUpdateRequest#equals(java.lang.Object))([Object](https://developer.android.com/reference/java/lang/Object.html) o) |
| [DataSet](https://developers.google.com/android/reference/com/google/android/gms/fitness/data/DataSet) | [getDataSet](https://developers.google.com/android/reference/com/google/android/gms/fitness/request/DataUpdateRequest#getDataSet())() Returns the data set that you're inserting. |
| long | [getEndTime](https://developers.google.com/android/reference/com/google/android/gms/fitness/request/DataUpdateRequest#getEndTime(java.util.concurrent.TimeUnit))([TimeUnit](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html) timeUnit) Returns the end time of the query, in the given unit since epoch. |
| long | [getStartTime](https://developers.google.com/android/reference/com/google/android/gms/fitness/request/DataUpdateRequest#getStartTime(java.util.concurrent.TimeUnit))([TimeUnit](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html) timeUnit) Returns the start time of the query, in the given unit since epoch. |
| int | [hashCode](https://developers.google.com/android/reference/com/google/android/gms/fitness/request/DataUpdateRequest#hashCode())() |
| [String](https://developer.android.com/reference/java/lang/String.html) | [toString](https://developers.google.com/android/reference/com/google/android/gms/fitness/request/DataUpdateRequest#toString())() |
| void | [writeToParcel](https://developers.google.com/android/reference/com/google/android/gms/fitness/request/DataUpdateRequest#writeToParcel(android.os.Parcel,%20int))([Parcel](https://developer.android.com/reference/android/os/Parcel.html) dest, int flags) |

### Inherited Method Summary

From class java.lang.Object

|---|---|
| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

From interface android.os.Parcelable

|---|---|
| abstract int | describeContents() |
| abstract void | writeToParcel([Parcel](https://developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |

## Fields

#### public static final [Creator](https://developer.android.com/reference/android/os/Parcelable.Creator.html)\<[DataUpdateRequest](https://developers.google.com/android/reference/com/google/android/gms/fitness/request/DataUpdateRequest)\>
**CREATOR**

## Public Methods

#### public boolean **equals** ([Object](https://developer.android.com/reference/java/lang/Object.html) o)

#### public [DataSet](https://developers.google.com/android/reference/com/google/android/gms/fitness/data/DataSet)
**getDataSet** ()

Returns the data set that you're inserting.

#### public long **getEndTime** ([TimeUnit](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html) timeUnit)

Returns the end time of the query, in the given unit since epoch. A valid end time
is always set.

#### public long **getStartTime** ([TimeUnit](https://developer.android.com/reference/java/util/concurrent/TimeUnit.html) timeUnit)

Returns the start time of the query, in the given unit since epoch. A valid start
time is always set.

#### public int **hashCode** ()

#### public [String](https://developer.android.com/reference/java/lang/String.html) **toString** ()

#### public void **writeToParcel** ([Parcel](https://developer.android.com/reference/android/os/Parcel.html) dest, int flags)