public static interface Food.FoodServingOrBuilder extends MessageOrBuilderImplements
MessageOrBuilderMethods
getAmount()
public abstract double getAmount()Optional. Amount of food consumed, fractional values are supported.
optional double amount = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
double |
The amount. |
getFoodMeasurementUnit()
public abstract String getFoodMeasurementUnit()Required. Food measurement unit
string food_measurement_unit = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
String |
The foodMeasurementUnit. |
getFoodMeasurementUnitBytes()
public abstract ByteString getFoodMeasurementUnitBytes()Required. Food measurement unit
string food_measurement_unit = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for foodMeasurementUnit. |
getFoodMeasurementUnitDisplayName()
public abstract String getFoodMeasurementUnitDisplayName()Output only. Legacy measurement unit for serving size in singular form (e.g. "piece", "gram").
string food_measurement_unit_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
String |
The foodMeasurementUnitDisplayName. |
getFoodMeasurementUnitDisplayNameBytes()
public abstract ByteString getFoodMeasurementUnitDisplayNameBytes()Output only. Legacy measurement unit for serving size in singular form (e.g. "piece", "gram").
string food_measurement_unit_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for foodMeasurementUnitDisplayName. |
getFoodMeasurementUnitDisplayNamePlural()
public abstract String getFoodMeasurementUnitDisplayNamePlural()Output only. Legacy measurement unit for serving size in plural form (e.g. "pieces", "grams").
string food_measurement_unit_display_name_plural = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
String |
The foodMeasurementUnitDisplayNamePlural. |
getFoodMeasurementUnitDisplayNamePluralBytes()
public abstract ByteString getFoodMeasurementUnitDisplayNamePluralBytes()Output only. Legacy measurement unit for serving size in plural form (e.g. "pieces", "grams").
string food_measurement_unit_display_name_plural = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for foodMeasurementUnitDisplayNamePlural. |
getMultiplier()
public abstract double getMultiplier()Optional. Value representing the multiplier used to compute the energy when using this serving instead of the default serving.
double multiplier = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
double |
The multiplier. |
hasAmount()
public abstract boolean hasAmount()Optional. Amount of food consumed, fractional values are supported.
optional double amount = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the amount field is set. |