public static final class CreateSubscriptionPayload.Builder extends GeneratedMessage.Builder<CreateSubscriptionPayload.Builder> implements CreateSubscriptionPayloadOrBuilderPayload for creating a subscription.
Protobuf type google.devicesandservices.health.v4.CreateSubscriptionPayload
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > CreateSubscriptionPayload.BuilderImplements
CreateSubscriptionPayloadOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllDataTypes(Iterable<String> values)
public CreateSubscriptionPayload.Builder addAllDataTypes(Iterable<String> values)Optional. Data types subscribed to.
repeated string data_types = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The dataTypes to add. |
| Returns | |
|---|---|
| Type | Description |
CreateSubscriptionPayload.Builder |
This builder for chaining. |
addDataTypes(String value)
public CreateSubscriptionPayload.Builder addDataTypes(String value)Optional. Data types subscribed to.
repeated string data_types = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe dataTypes to add. |
| Returns | |
|---|---|
| Type | Description |
CreateSubscriptionPayload.Builder |
This builder for chaining. |
addDataTypesBytes(ByteString value)
public CreateSubscriptionPayload.Builder addDataTypesBytes(ByteString value)Optional. Data types subscribed to.
repeated string data_types = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes of the dataTypes to add. |
| Returns | |
|---|---|
| Type | Description |
CreateSubscriptionPayload.Builder |
This builder for chaining. |
build()
public CreateSubscriptionPayload build()| Returns | |
|---|---|
| Type | Description |
CreateSubscriptionPayload |
|
buildPartial()
public CreateSubscriptionPayload buildPartial()| Returns | |
|---|---|
| Type | Description |
CreateSubscriptionPayload |
|
clear()
public CreateSubscriptionPayload.Builder clear()| Returns | |
|---|---|
| Type | Description |
CreateSubscriptionPayload.Builder |
|
clearDataTypes()
public CreateSubscriptionPayload.Builder clearDataTypes()Optional. Data types subscribed to.
repeated string data_types = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
CreateSubscriptionPayload.Builder |
This builder for chaining. |
clearUser()
public CreateSubscriptionPayload.Builder clearUser() 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 |
CreateSubscriptionPayload.Builder |
This builder for chaining. |
getDataTypes(int index)
public 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 |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The dataTypes at the given index. |
getDataTypesBytes(int index)
public 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 |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the dataTypes at the given index. |
getDataTypesCount()
public int getDataTypesCount()Optional. Data types subscribed to.
repeated string data_types = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
int |
The count of dataTypes. |
getDataTypesList()
public ProtocolStringList getDataTypesList()Optional. Data types subscribed to.
repeated string data_types = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the dataTypes. |
getDefaultInstanceForType()
public CreateSubscriptionPayload getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
CreateSubscriptionPayload |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getUser()
public 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 |
String |
The user. |
getUserBytes()
public 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 |
ByteString |
The bytes for user. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(CreateSubscriptionPayload other)
public CreateSubscriptionPayload.Builder mergeFrom(CreateSubscriptionPayload other)| Parameter | |
|---|---|
| Name | Description |
other |
CreateSubscriptionPayload |
| Returns | |
|---|---|
| Type | Description |
CreateSubscriptionPayload.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public CreateSubscriptionPayload.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
CreateSubscriptionPayload.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public CreateSubscriptionPayload.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
CreateSubscriptionPayload.Builder |
|
setDataTypes(int index, String value)
public CreateSubscriptionPayload.Builder setDataTypes(int index, String value)Optional. Data types subscribed to.
repeated string data_types = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Parameters | |
|---|---|
| Name | Description |
index |
intThe index to set the value at. |
value |
StringThe dataTypes to set. |
| Returns | |
|---|---|
| Type | Description |
CreateSubscriptionPayload.Builder |
This builder for chaining. |
setUser(String value)
public CreateSubscriptionPayload.Builder setUser(String value) 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) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe user to set. |
| Returns | |
|---|---|
| Type | Description |
CreateSubscriptionPayload.Builder |
This builder for chaining. |
setUserBytes(ByteString value)
public CreateSubscriptionPayload.Builder setUserBytes(ByteString value) 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) = { ... }
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for user to set. |
| Returns | |
|---|---|
| Type | Description |
CreateSubscriptionPayload.Builder |
This builder for chaining. |