Class SubscriberConfig.Builder (0.2.0)

public static final class SubscriberConfig.Builder extends GeneratedMessage.Builder<SubscriberConfig.Builder> implements SubscriberConfigOrBuilder

Configuration for a subscriber. A notification is sent to a subscription ONLY if the subscriber has a config for the data type.

Protobuf type google.devicesandservices.health.v4.SubscriberConfig

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllDataTypes(Iterable<String> values)

public SubscriberConfig.Builder addAllDataTypes(Iterable<String> values)

Required. See Google Health API data types for the list of supported data types. Values should be in kebab-case.

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

Parameter
Name Description
values Iterable<String>

The dataTypes to add.

Returns
Type Description
SubscriberConfig.Builder

This builder for chaining.

addDataTypes(String value)

public SubscriberConfig.Builder addDataTypes(String value)

Required. See Google Health API data types for the list of supported data types. Values should be in kebab-case.

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

Parameter
Name Description
value String

The dataTypes to add.

Returns
Type Description
SubscriberConfig.Builder

This builder for chaining.

addDataTypesBytes(ByteString value)

public SubscriberConfig.Builder addDataTypesBytes(ByteString value)

Required. See Google Health API data types for the list of supported data types. Values should be in kebab-case.

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

Parameter
Name Description
value ByteString

The bytes of the dataTypes to add.

Returns
Type Description
SubscriberConfig.Builder

This builder for chaining.

build()

public SubscriberConfig build()
Returns
Type Description
SubscriberConfig

buildPartial()

public SubscriberConfig buildPartial()
Returns
Type Description
SubscriberConfig

clear()

public SubscriberConfig.Builder clear()
Returns
Type Description
SubscriberConfig.Builder
Overrides

clearDataTypes()

public SubscriberConfig.Builder clearDataTypes()

Required. See Google Health API data types for the list of supported data types. Values should be in kebab-case.

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

Returns
Type Description
SubscriberConfig.Builder

This builder for chaining.

clearSubscriptionCreatePolicy()

public SubscriberConfig.Builder clearSubscriptionCreatePolicy()

Required. Policy for subscription creation.

.google.devicesandservices.health.v4.SubscriberConfig.SubscriptionCreatePolicy subscription_create_policy = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SubscriberConfig.Builder

This builder for chaining.

getDataTypes(int index)

public String getDataTypes(int index)

Required. See Google Health API data types for the list of supported data types. Values should be in kebab-case.

repeated string data_types = 1 [(.google.api.field_behavior) = REQUIRED, (.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)

Required. See Google Health API data types for the list of supported data types. Values should be in kebab-case.

repeated string data_types = 1 [(.google.api.field_behavior) = REQUIRED, (.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()

Required. See Google Health API data types for the list of supported data types. Values should be in kebab-case.

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

Returns
Type Description
int

The count of dataTypes.

getDataTypesList()

public ProtocolStringList getDataTypesList()

Required. See Google Health API data types for the list of supported data types. Values should be in kebab-case.

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

Returns
Type Description
ProtocolStringList

A list containing the dataTypes.

getDefaultInstanceForType()

public SubscriberConfig getDefaultInstanceForType()
Returns
Type Description
SubscriberConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getSubscriptionCreatePolicy()

public SubscriberConfig.SubscriptionCreatePolicy getSubscriptionCreatePolicy()

Required. Policy for subscription creation.

.google.devicesandservices.health.v4.SubscriberConfig.SubscriptionCreatePolicy subscription_create_policy = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SubscriberConfig.SubscriptionCreatePolicy

The subscriptionCreatePolicy.

getSubscriptionCreatePolicyValue()

public int getSubscriptionCreatePolicyValue()

Required. Policy for subscription creation.

.google.devicesandservices.health.v4.SubscriberConfig.SubscriptionCreatePolicy subscription_create_policy = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for subscriptionCreatePolicy.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SubscriberConfig other)

public SubscriberConfig.Builder mergeFrom(SubscriberConfig other)
Parameter
Name Description
other SubscriberConfig
Returns
Type Description
SubscriberConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SubscriberConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SubscriberConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

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

setDataTypes(int index, String value)

public SubscriberConfig.Builder setDataTypes(int index, String value)

Required. See Google Health API data types for the list of supported data types. Values should be in kebab-case.

repeated string data_types = 1 [(.google.api.field_behavior) = REQUIRED, (.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
SubscriberConfig.Builder

This builder for chaining.

setSubscriptionCreatePolicy(SubscriberConfig.SubscriptionCreatePolicy value)

public SubscriberConfig.Builder setSubscriptionCreatePolicy(SubscriberConfig.SubscriptionCreatePolicy value)

Required. Policy for subscription creation.

.google.devicesandservices.health.v4.SubscriberConfig.SubscriptionCreatePolicy subscription_create_policy = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value SubscriberConfig.SubscriptionCreatePolicy

The subscriptionCreatePolicy to set.

Returns
Type Description
SubscriberConfig.Builder

This builder for chaining.

setSubscriptionCreatePolicyValue(int value)

public SubscriberConfig.Builder setSubscriptionCreatePolicyValue(int value)

Required. Policy for subscription creation.

.google.devicesandservices.health.v4.SubscriberConfig.SubscriptionCreatePolicy subscription_create_policy = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for subscriptionCreatePolicy to set.

Returns
Type Description
SubscriberConfig.Builder

This builder for chaining.