# Interface CreateSubscriptionRequestOrBuilder (0.2.0)

    public interface CreateSubscriptionRequestOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### getParent()

    public abstract String getParent()

Required. The parent subscriber.
Format: projects/{project}/subscribers/{subscriber}
The {subscriber} ID is user-settable (4-36 characters, matching
/[a-z](https://docs.cloud.google.com/java/docs/reference/google-cloud-health/latest/[a-z0-9-]{2,34}[a-z0-9])/) if provided during creation, or
system-generated otherwise.

`
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
`

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

### getParentBytes()

    public abstract ByteString getParentBytes()

Required. The parent subscriber.
Format: projects/{project}/subscribers/{subscriber}
The {subscriber} ID is user-settable (4-36 characters, matching
/[a-z](https://docs.cloud.google.com/java/docs/reference/google-cloud-health/latest/[a-z0-9-]{2,34}[a-z0-9])/) if provided during creation, or
system-generated otherwise.

`
string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
`

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

### getSubscription()

    public abstract CreateSubscriptionPayload getSubscription()

Required. The subscription to create.

`
.google.devicesandservices.health.v4.CreateSubscriptionPayload subscription = 3 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-health/latest/com.google.devicesandservices.health.v4.CreateSubscriptionPayload` | The subscription. |

### getSubscriptionId()

    public abstract String getSubscriptionId()

Optional. The {subscription_id} is user-settable
(4-36 chars, matching /[a-z](https://docs.cloud.google.com/java/docs/reference/google-cloud-health/latest/[a-z0-9-]{2,34}[a-z0-9])/) or system-generated
otherwise.
If provided, the ID must be unique within the parent subscriber.

`string subscription_id = 2 [(.google.api.field_behavior) = OPTIONAL];`

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

### getSubscriptionIdBytes()

    public abstract ByteString getSubscriptionIdBytes()

Optional. The {subscription_id} is user-settable
(4-36 chars, matching /[a-z](https://docs.cloud.google.com/java/docs/reference/google-cloud-health/latest/[a-z0-9-]{2,34}[a-z0-9])/) or system-generated
otherwise.
If provided, the ID must be unique within the parent subscriber.

`string subscription_id = 2 [(.google.api.field_behavior) = OPTIONAL];`

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

### getSubscriptionOrBuilder()

    public abstract CreateSubscriptionPayloadOrBuilder getSubscriptionOrBuilder()

Required. The subscription to create.

`
.google.devicesandservices.health.v4.CreateSubscriptionPayload subscription = 3 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-health/latest/com.google.devicesandservices.health.v4.CreateSubscriptionPayloadOrBuilder` |   |

### hasSubscription()

    public abstract boolean hasSubscription()

Required. The subscription to create.

`
.google.devicesandservices.health.v4.CreateSubscriptionPayload subscription = 3 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the subscription field is set. |