Interface ProductWeightOrBuilder (0.2.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
TypeDescription
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
TypeDescription
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
TypeDescription
double

The value.