public static interface NutritionLog.ServingOrBuilder 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. |
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. |