public static final class FoodMeasurementUnit.Builder extends GeneratedMessage.Builder<FoodMeasurementUnit.Builder> implements FoodMeasurementUnitOrBuilderRepresents a food measurement unit.
Protobuf type google.devicesandservices.health.v4.FoodMeasurementUnit
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > FoodMeasurementUnit.BuilderImplements
FoodMeasurementUnitOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public FoodMeasurementUnit build()| Returns | |
|---|---|
| Type | Description |
FoodMeasurementUnit |
|
buildPartial()
public FoodMeasurementUnit buildPartial()| Returns | |
|---|---|
| Type | Description |
FoodMeasurementUnit |
|
clear()
public FoodMeasurementUnit.Builder clear()| Returns | |
|---|---|
| Type | Description |
FoodMeasurementUnit.Builder |
|
clearDisplayName()
public FoodMeasurementUnit.Builder clearDisplayName()Required. The display name of the food measurement unit (e.g., "gram", "piece").
string display_name = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
FoodMeasurementUnit.Builder |
This builder for chaining. |
clearPluralDisplayName()
public FoodMeasurementUnit.Builder clearPluralDisplayName()Optional. The plural display name of the food measurement unit (e.g., "grams", "pieces").
string plural_display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
FoodMeasurementUnit.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public FoodMeasurementUnit getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
FoodMeasurementUnit |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getDisplayName()
public String getDisplayName()Required. The display name of the food measurement unit (e.g., "gram", "piece").
string display_name = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
String |
The displayName. |
getDisplayNameBytes()
public ByteString getDisplayNameBytes()Required. The display name of the food measurement unit (e.g., "gram", "piece").
string display_name = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for displayName. |
getPluralDisplayName()
public String getPluralDisplayName()Optional. The plural display name of the food measurement unit (e.g., "grams", "pieces").
string plural_display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The pluralDisplayName. |
getPluralDisplayNameBytes()
public ByteString getPluralDisplayNameBytes()Optional. The plural display name of the food measurement unit (e.g., "grams", "pieces").
string plural_display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for pluralDisplayName. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(FoodMeasurementUnit other)
public FoodMeasurementUnit.Builder mergeFrom(FoodMeasurementUnit other)| Parameter | |
|---|---|
| Name | Description |
other |
FoodMeasurementUnit |
| Returns | |
|---|---|
| Type | Description |
FoodMeasurementUnit.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public FoodMeasurementUnit.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
FoodMeasurementUnit.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public FoodMeasurementUnit.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
FoodMeasurementUnit.Builder |
|
setDisplayName(String value)
public FoodMeasurementUnit.Builder setDisplayName(String value)Required. The display name of the food measurement unit (e.g., "gram", "piece").
string display_name = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe displayName to set. |
| Returns | |
|---|---|
| Type | Description |
FoodMeasurementUnit.Builder |
This builder for chaining. |
setDisplayNameBytes(ByteString value)
public FoodMeasurementUnit.Builder setDisplayNameBytes(ByteString value)Required. The display name of the food measurement unit (e.g., "gram", "piece").
string display_name = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for displayName to set. |
| Returns | |
|---|---|
| Type | Description |
FoodMeasurementUnit.Builder |
This builder for chaining. |
setPluralDisplayName(String value)
public FoodMeasurementUnit.Builder setPluralDisplayName(String value)Optional. The plural display name of the food measurement unit (e.g., "grams", "pieces").
string plural_display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe pluralDisplayName to set. |
| Returns | |
|---|---|
| Type | Description |
FoodMeasurementUnit.Builder |
This builder for chaining. |
setPluralDisplayNameBytes(ByteString value)
public FoodMeasurementUnit.Builder setPluralDisplayNameBytes(ByteString value)Optional. The plural display name of the food measurement unit (e.g., "grams", "pieces").
string plural_display_name = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for pluralDisplayName to set. |
| Returns | |
|---|---|
| Type | Description |
FoodMeasurementUnit.Builder |
This builder for chaining. |