Class CreateSubscriptionPayload.Builder (0.2.0)

public static final class CreateSubscriptionPayload.Builder extends GeneratedMessage.Builder<CreateSubscriptionPayload.Builder> implements CreateSubscriptionPayloadOrBuilder

Payload for creating a subscription.

Protobuf type google.devicesandservices.health.v4.CreateSubscriptionPayload

Static 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 String

The 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 ByteString

The 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
Overrides

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 int

The 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 int

The 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
Overrides

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
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

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
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CreateSubscriptionPayload.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CreateSubscriptionPayload.Builder
Overrides

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 int

The index to set the value at.

value String

The 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 String

The 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 ByteString

The bytes for user to set.

Returns
Type Description
CreateSubscriptionPayload.Builder

This builder for chaining.