# Interface CreateSubscriptionPayloadOrBuilder (0.2.0)

    public interface CreateSubscriptionPayloadOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getDataTypes(int index)

    public abstract String getDataTypes(int index)

Optional. Data types subscribed to.

`
repeated string data_types = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The dataTypes at the given index. |

### getDataTypesBytes(int index)

    public abstract ByteString getDataTypesBytes(int index)

Optional. Data types subscribed to.

`
repeated string data_types = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the dataTypes at the given index. |

### getDataTypesCount()

    public abstract int getDataTypesCount()

Optional. Data types subscribed to.

`
repeated string data_types = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of dataTypes. |

### getDataTypesList()

    public abstract List<String> getDataTypesList()

Optional. Data types subscribed to.

`
repeated string data_types = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the dataTypes. |

### getUser()

    public abstract String getUser()

Required. Immutable. The resource name of the user for whom this
subscription is active. Format: `users/{user}` where `{user}` is the public
`healthUserId` as returned by the `GetIdentity` action in the profile PAPI
(see
`google.devicesandservices.health.v4main.HealthProfileService.GetIdentity`).

`
string user = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The user. |

### getUserBytes()

    public abstract ByteString getUserBytes()

Required. Immutable. The resource name of the user for whom this
subscription is active. Format: `users/{user}` where `{user}` is the public
`healthUserId` as returned by the `GetIdentity` action in the profile PAPI
(see
`google.devicesandservices.health.v4main.HealthProfileService.GetIdentity`).

`
string user = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for user. |