# SubscriptionEntitlement.Builder

# SubscriptionEntitlement.Builder

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/com/google/android/engage/common/datamodel/SubscriptionEntitlement.Builder "View this page in Java")  


```
class SubscriptionEntitlement.Builder
```

<br />

*** ** * ** ***

Builder class for [SubscriptionEntitlement](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntitlement).

## Summary

|                                                              ### Public constructors                                                               |
|----------------------------------------------------------------------------------------------------------------------------------------------------|
| [Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntitlement.Builder#Builder())`()` |

|                                                                      ### Public functions                                                                       |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SubscriptionEntitlement](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntitlement)`!`                 | [build](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntitlement.Builder#build())`()`                                                                                                                                                                                                                                                                                                                   |
| [SubscriptionEntitlement.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntitlement.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setDisplayName](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntitlement.Builder#setDisplayName(java.lang.String))`(displayName: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!)` Sets the display name of the entitlement.             |
| [SubscriptionEntitlement.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntitlement.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setEntitlementId](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntitlement.Builder#setEntitlementId(java.lang.String))`(entitlementId: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!)` Sets id of the entitlement.                     |
| [SubscriptionEntitlement.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntitlement.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setExpirationTimeMillis](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntitlement.Builder#setExpirationTimeMillis(long))`(expirationTimeMillis: `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` Sets the expirationTime of the entitlement. |

## Public constructors

### Builder

```
Builder()
```  

## Public functions

### build

```
fun build(): SubscriptionEntitlement!
```  

### setDisplayName

```
@CanIgnoreReturnValue
fun setDisplayName(displayName: String!): SubscriptionEntitlement.Builder!
```

Sets the display name of the entitlement.

Optional.  

### setEntitlementId

```
@CanIgnoreReturnValue
fun setEntitlementId(entitlementId: String!): SubscriptionEntitlement.Builder!
```

Sets id of the entitlement.

Required.  

### setExpirationTimeMillis

```
@CanIgnoreReturnValue
fun setExpirationTimeMillis(expirationTimeMillis: Long): SubscriptionEntitlement.Builder!
```

Sets the expirationTime of the entitlement.

Optional.