# EventEntity

public final class **EventEntity** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
implements [Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) [Event](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event) Data object representing the data for a event. This is immutable, and therefore safe to
cache or store. Note, however, that the data it represents may grow stale.

### 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)\<[EventEntity](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity)\> | [CREATOR](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#CREATOR) |   |

### Public Constructor Summary

|---|---|
|   | [EventEntity](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#EventEntity(com.google.android.gms.games.event.Event))([Event](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event) event) |

### Public Method Summary

|---|---|
| boolean | [equals](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#equals(java.lang.Object))([Object](https://developer.android.com/reference/java/lang/Object.html) obj) |
| [Event](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event) | [freeze](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#freeze())() |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getDescription](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#getDescription())() Retrieves the description for this event. |
| void | [getDescription](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#getDescription(android.database.CharArrayBuffer))([CharArrayBuffer](https://developer.android.com/reference/android/database/CharArrayBuffer.html) dataOut) Loads the event description into the given `https://developer.android.com/reference/android/database/CharArrayBuffer.html`. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getEventId](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#getEventId())() Retrieves the ID of this event. |
| void | [getFormattedValue](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#getFormattedValue(android.database.CharArrayBuffer))([CharArrayBuffer](https://developer.android.com/reference/android/database/CharArrayBuffer.html) dataOut) Retrieves the sum of increments have been made to this event (formatted for the user's locale). |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getFormattedValue](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#getFormattedValue())() Retrieves the sum of increments have been made to this event (formatted for the user's locale). |
| [Uri](https://developer.android.com/reference/android/net/Uri.html) | [getIconImageUri](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#getIconImageUri())() Retrieves a URI that can be used to load the event's image icon. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getIconImageUrl](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#getIconImageUrl())() |
| void | [getName](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#getName(android.database.CharArrayBuffer))([CharArrayBuffer](https://developer.android.com/reference/android/database/CharArrayBuffer.html) dataOut) Loads the event name into the given `https://developer.android.com/reference/android/database/CharArrayBuffer.html`. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getName](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#getName())() Retrieves the name of this event. |
| [Player](https://developers.google.com/android/reference/com/google/android/gms/games/Player) | [getPlayer](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#getPlayer())() Retrieves the player information associated with this event. |
| long | [getValue](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#getValue())() Retrieves the number of increments this user has made to this event. |
| int | [hashCode](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#hashCode())() |
| boolean | [isDataValid](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#isDataValid())() |
| boolean | [isVisible](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#isVisible())() Retrieves whether the event should be displayed to the user in any event related UIs. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [toString](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#toString())() |
| void | [writeToParcel](https://developers.google.com/android/reference/com/google/android/gms/games/event/EventEntity#writeToParcel(android.os.Parcel,%20int))([Parcel](https://developer.android.com/reference/android/os/Parcel.html) out, 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) |

From interface [com.google.android.gms.games.event.Event](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event)

|---|---|
| abstract [String](https://developer.android.com/reference/java/lang/String.html) | [getDescription](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event#getDescription())() Retrieves the description for this event. |
| abstract void | [getDescription](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event#getDescription(android.database.CharArrayBuffer))([CharArrayBuffer](https://developer.android.com/reference/android/database/CharArrayBuffer.html) dataOut) Loads the event description into the given `https://developer.android.com/reference/android/database/CharArrayBuffer.html`. |
| abstract [String](https://developer.android.com/reference/java/lang/String.html) | [getEventId](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event#getEventId())() Retrieves the ID of this event. |
| abstract [String](https://developer.android.com/reference/java/lang/String.html) | [getFormattedValue](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event#getFormattedValue())() Retrieves the sum of increments have been made to this event (formatted for the user's locale). |
| abstract void | [getFormattedValue](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event#getFormattedValue(android.database.CharArrayBuffer))([CharArrayBuffer](https://developer.android.com/reference/android/database/CharArrayBuffer.html) dataOut) Retrieves the sum of increments have been made to this event (formatted for the user's locale). |
| abstract [Uri](https://developer.android.com/reference/android/net/Uri.html) | [getIconImageUri](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event#getIconImageUri())() Retrieves a URI that can be used to load the event's image icon. |
| abstract [String](https://developer.android.com/reference/java/lang/String.html) | [getName](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event#getName())() Retrieves the name of this event. |
| abstract void | [getName](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event#getName(android.database.CharArrayBuffer))([CharArrayBuffer](https://developer.android.com/reference/android/database/CharArrayBuffer.html) dataOut) Loads the event name into the given `https://developer.android.com/reference/android/database/CharArrayBuffer.html`. |
| abstract [Player](https://developers.google.com/android/reference/com/google/android/gms/games/Player) | [getPlayer](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event#getPlayer())() Retrieves the player information associated with this event. |
| abstract long | [getValue](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event#getValue())() Retrieves the number of increments this user has made to this event. |
| abstract boolean | [isVisible](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event#isVisible())() Retrieves whether the event should be displayed to the user in any event related UIs. |

From interface com.google.android.gms.common.data.Freezable

|---|---|
| abstract [Event](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event) | freeze() |
| abstract boolean | isDataValid() |

## Fields

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

## Public Constructors

#### public **EventEntity** ([Event](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event) event)

## Public Methods

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

#### public [Event](https://developers.google.com/android/reference/com/google/android/gms/games/event/Event)
**freeze** ()

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

Retrieves the description for this event.

##### Returns

- The event description.

#### public void **getDescription** ([CharArrayBuffer](https://developer.android.com/reference/android/database/CharArrayBuffer.html) dataOut)

Loads the event description into the given `https://developer.android.com/reference/android/database/CharArrayBuffer.html`.

##### Parameters

| dataOut | The buffer to load the data into. |
|---|---|

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

Retrieves the ID of this event.

##### Returns

- The event ID.

#### public void **getFormattedValue** ([CharArrayBuffer](https://developer.android.com/reference/android/database/CharArrayBuffer.html) dataOut)

Retrieves the sum of increments have been made to this event (formatted for the
user's locale).

##### Parameters

| dataOut | The buffer to load the data into. |
|---|---|

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

Retrieves the sum of increments have been made to this event (formatted for the
user's locale).

##### Returns

- The formatted number of increments this user has made to this event.

#### public [Uri](https://developer.android.com/reference/android/net/Uri.html) **getIconImageUri** ()

Retrieves a URI that can be used to load the event's image icon. Returns null if the
event has no image.

To retrieve the Image from the `https://developer.android.com/reference/android/net/Uri.html`, use
`https://developers.google.com/android/reference/com/google/android/gms/common/images/ImageManager`.

##### Returns

- The image URI for the achievement's unlocked image icon, or null if the achievement has no unlocked image.

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

#### public void **getName** ([CharArrayBuffer](https://developer.android.com/reference/android/database/CharArrayBuffer.html) dataOut)

Loads the event name into the given `https://developer.android.com/reference/android/database/CharArrayBuffer.html`.

##### Parameters

| dataOut | The buffer to load the data into. |
|---|---|

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

Retrieves the name of this event.

##### Returns

- The event name.

#### public [Player](https://developers.google.com/android/reference/com/google/android/gms/games/Player)
**getPlayer** ()

Retrieves the player information associated with this event.

Note that this object is a volatile representation, so it is not safe to cache the
output of this directly. Instead, cache the result of `https://developers.google.com/android/reference/com/google/android/gms/common/data/Freezable#freeze()`.

##### Returns

- The player associated with this event.

#### public long **getValue** ()

Retrieves the number of increments this user has made to this event.

##### Returns

- The number of increments this user has made to this event.

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

#### public boolean **isDataValid** ()

#### public boolean **isVisible** ()

Retrieves whether the event should be displayed to the user in any event related
UIs.

##### Returns

- Whether to display the event to the user.

#### 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) out, int flags)