Interface ProductWeightOrBuilder (0.23.0)

public interface ProductWeightOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getUnit()

public abstract String getUnit()

Required. The weight unit. Acceptable values are:

  • "g"
  • "kg"
  • "oz"
  • "lb"

string unit = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The unit.

getUnitBytes()

public abstract ByteString getUnitBytes()

Required. The weight unit. Acceptable values are:

  • "g"
  • "kg"
  • "oz"
  • "lb"

string unit = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for unit.

getValue()

public abstract double getValue()

Required. The weight represented as a number. The weight can have a maximum precision of four decimal places.

double value = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
double

The value.