public final class Price extends GeneratedMessageV3 implements PriceOrBuilder
The price represented as a number and currency.
Protobuf type google.shopping.type.Price
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 CURRENCY_CODE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
public static Price getDefaultInstance()
Returns |
---|
Type | Description |
Price | |
public static final Descriptors.Descriptor getDescriptor()
public static Price.Builder newBuilder()
public static Price.Builder newBuilder(Price prototype)
Parameter |
---|
Name | Description |
prototype | Price
|
public static Price parseDelimitedFrom(InputStream input)
Returns |
---|
Type | Description |
Price | |
public static Price parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
---|
Type | Description |
Price | |
public static Price parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
Returns |
---|
Type | Description |
Price | |
public static Price parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Returns |
---|
Type | Description |
Price | |
public static Price parseFrom(ByteString data)
Returns |
---|
Type | Description |
Price | |
public static Price parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Returns |
---|
Type | Description |
Price | |
public static Price parseFrom(CodedInputStream input)
Returns |
---|
Type | Description |
Price | |
public static Price parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
---|
Type | Description |
Price | |
public static Price parseFrom(InputStream input)
Returns |
---|
Type | Description |
Price | |
public static Price parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
---|
Type | Description |
Price | |
public static Price parseFrom(ByteBuffer data)
Returns |
---|
Type | Description |
Price | |
public static Price parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Returns |
---|
Type | Description |
Price | |
public static Parser<Price> parser()
Methods
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
public long getAmountMicros()
The price represented as a number in micros (1 million micros is an
equivalent to one's currency standard unit, for example, 1 USD = 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 String getCurrencyCode()
The currency of the price using three-letter acronyms according to ISO
4217.
optional string currency_code = 2;
Returns |
---|
Type | Description |
String | The currencyCode.
|
public ByteString getCurrencyCodeBytes()
The currency of the price using three-letter acronyms according to ISO
4217.
optional string currency_code = 2;
Returns |
---|
Type | Description |
ByteString | The bytes for currencyCode.
|
public Price getDefaultInstanceForType()
Returns |
---|
Type | Description |
Price | |
public Parser<Price> getParserForType()
Overrides
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
public boolean hasAmountMicros()
The price represented as a number in micros (1 million micros is an
equivalent to one's currency standard unit, for example, 1 USD = 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.
|
public boolean hasCurrencyCode()
The currency of the price using three-letter acronyms according to ISO
4217.
optional string currency_code = 2;
Returns |
---|
Type | Description |
boolean | Whether the currencyCode field is set.
|
Returns |
---|
Type | Description |
int | |
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public Price.Builder newBuilderForType()
protected Price.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
public Price.Builder toBuilder()
public void writeTo(CodedOutputStream output)
Overrides