public final class Weight extends GeneratedMessageV3 implements WeightOrBuilder
The weight represented as the value in string and the unit.
Protobuf type google.shopping.type.Weight
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
public static final int AMOUNT_MICROS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int UNIT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
public static Weight getDefaultInstance()
Returns |
Type |
Description |
Weight |
|
public static final Descriptors.Descriptor getDescriptor()
public static Weight.Builder newBuilder()
public static Weight.Builder newBuilder(Weight prototype)
Parameter |
Name |
Description |
prototype |
Weight
|
public static Weight parseDelimitedFrom(InputStream input)
Returns |
Type |
Description |
Weight |
|
public static Weight parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Weight |
|
public static Weight parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
Returns |
Type |
Description |
Weight |
|
public static Weight parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Weight |
|
public static Weight parseFrom(ByteString data)
Returns |
Type |
Description |
Weight |
|
public static Weight parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Weight |
|
public static Weight parseFrom(CodedInputStream input)
Returns |
Type |
Description |
Weight |
|
public static Weight parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Weight |
|
public static Weight parseFrom(InputStream input)
Returns |
Type |
Description |
Weight |
|
public static Weight parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Weight |
|
public static Weight parseFrom(ByteBuffer data)
Returns |
Type |
Description |
Weight |
|
public static Weight parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
Weight |
|
public static Parser<Weight> parser()
Methods
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
public long getAmountMicros()
Required. The weight represented as a number in micros (1 million micros is
an equivalent to one's currency standard unit, for example, 1 kg = 1000000
micros).
This field can also be set as infinity by setting to -1.
This field only support -1 and positive value.
optional int64 amount_micros = 1;
Returns |
Type |
Description |
long |
The amountMicros.
|
public Weight getDefaultInstanceForType()
Returns |
Type |
Description |
Weight |
|
public Parser<Weight> getParserForType()
Overrides
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
public Weight.WeightUnit getUnit()
Required. The weight unit.
Acceptable values are: kg and lb
.google.shopping.type.Weight.WeightUnit unit = 2;
public int getUnitValue()
Required. The weight unit.
Acceptable values are: kg and lb
.google.shopping.type.Weight.WeightUnit unit = 2;
Returns |
Type |
Description |
int |
The enum numeric value on the wire for unit.
|
public boolean hasAmountMicros()
Required. The weight represented as a number in micros (1 million micros is
an equivalent to one's currency standard unit, for example, 1 kg = 1000000
micros).
This field can also be set as infinity by setting to -1.
This field only support -1 and positive value.
optional int64 amount_micros = 1;
Returns |
Type |
Description |
boolean |
Whether the amountMicros field is set.
|
Returns |
Type |
Description |
int |
|
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public Weight.Builder newBuilderForType()
protected Weight.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
public Weight.Builder toBuilder()
public void writeTo(CodedOutputStream output)
Overrides