Class Price (0.3.0)

public final class Price extends GeneratedMessageV3 implements PriceOrBuilder

The price represented as a number and currency.

Protobuf type google.shopping.type.Price

Implements

PriceOrBuilder

Static Fields

AMOUNT_MICROS_FIELD_NUMBER

public static final int AMOUNT_MICROS_FIELD_NUMBER
Field Value
TypeDescription
int

CURRENCY_CODE_FIELD_NUMBER

public static final int CURRENCY_CODE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Price getDefaultInstance()
Returns
TypeDescription
Price

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Price.Builder newBuilder()
Returns
TypeDescription
Price.Builder

newBuilder(Price prototype)

public static Price.Builder newBuilder(Price prototype)
Parameter
NameDescription
prototypePrice
Returns
TypeDescription
Price.Builder

parseDelimitedFrom(InputStream input)

public static Price parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Price
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Price parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Price
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Price parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Price
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Price parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Price
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Price parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Price
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Price parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Price
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Price parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Price
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Price parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Price
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Price parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Price
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Price parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Price
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Price parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Price
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Price parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Price
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Price> parser()
Returns
TypeDescription
Parser<Price>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAmountMicros()

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
TypeDescription
long

The amountMicros.

getCurrencyCode()

public String getCurrencyCode()

The currency of the price using three-letter acronyms according to ISO 4217.

optional string currency_code = 2;

Returns
TypeDescription
String

The currencyCode.

getCurrencyCodeBytes()

public ByteString getCurrencyCodeBytes()

The currency of the price using three-letter acronyms according to ISO 4217.

optional string currency_code = 2;

Returns
TypeDescription
ByteString

The bytes for currencyCode.

getDefaultInstanceForType()

public Price getDefaultInstanceForType()
Returns
TypeDescription
Price

getParserForType()

public Parser<Price> getParserForType()
Returns
TypeDescription
Parser<Price>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasAmountMicros()

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
TypeDescription
boolean

Whether the amountMicros field is set.

hasCurrencyCode()

public boolean hasCurrencyCode()

The currency of the price using three-letter acronyms according to ISO 4217.

optional string currency_code = 2;

Returns
TypeDescription
boolean

Whether the currencyCode field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Price.Builder newBuilderForType()
Returns
TypeDescription
Price.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Price.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Price.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Price.Builder toBuilder()
Returns
TypeDescription
Price.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException