public final class PriceInfo extends com.google.protobuf.GeneratedMessageV3 implements PriceInfoOrBuilder
The price information of a [Product][google.cloud.retail.v2beta.Product].Protobuf type
google.cloud.retail.v2beta.PriceInfo| Modifier and Type | Class and Description |
|---|---|
static class |
PriceInfo.Builder
The price information of a [Product][google.cloud.retail.v2beta.Product].
|
static class |
PriceInfo.PriceRange
The price range of all
[variant][google.cloud.retail.v2beta.Product.Type.VARIANT]
[Product][google.cloud.retail.v2beta.Product] having the same
[Product.primary_product_id][google.cloud.retail.v2beta.Product.primary_product_id].
|
static interface |
PriceInfo.PriceRangeOrBuilder |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
COST_FIELD_NUMBER |
static int |
CURRENCY_CODE_FIELD_NUMBER |
static int |
ORIGINAL_PRICE_FIELD_NUMBER |
static int |
PRICE_EFFECTIVE_TIME_FIELD_NUMBER |
static int |
PRICE_EXPIRE_TIME_FIELD_NUMBER |
static int |
PRICE_FIELD_NUMBER |
static int |
PRICE_RANGE_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
float |
getCost()
The costs associated with the sale of a particular product.
|
String |
getCurrencyCode()
The 3-letter currency code defined in [ISO
4217](https://www.iso.org/iso-4217-currency-codes.html).
|
com.google.protobuf.ByteString |
getCurrencyCodeBytes()
The 3-letter currency code defined in [ISO
4217](https://www.iso.org/iso-4217-currency-codes.html).
|
static PriceInfo |
getDefaultInstance() |
PriceInfo |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
float |
getOriginalPrice()
Price of the product without any discount.
|
com.google.protobuf.Parser<PriceInfo> |
getParserForType() |
float |
getPrice()
Price of the product.
|
com.google.protobuf.Timestamp |
getPriceEffectiveTime()
The timestamp when the [price][google.cloud.retail.v2beta.PriceInfo.price]
starts to be effective.
|
com.google.protobuf.TimestampOrBuilder |
getPriceEffectiveTimeOrBuilder()
The timestamp when the [price][google.cloud.retail.v2beta.PriceInfo.price]
starts to be effective.
|
com.google.protobuf.Timestamp |
getPriceExpireTime()
The timestamp when the [price][google.cloud.retail.v2beta.PriceInfo.price]
stops to be effective.
|
com.google.protobuf.TimestampOrBuilder |
getPriceExpireTimeOrBuilder()
The timestamp when the [price][google.cloud.retail.v2beta.PriceInfo.price]
stops to be effective.
|
PriceInfo.PriceRange |
getPriceRange()
Output only.
|
PriceInfo.PriceRangeOrBuilder |
getPriceRangeOrBuilder()
Output only.
|
int |
getSerializedSize() |
int |
hashCode() |
boolean |
hasPriceEffectiveTime()
The timestamp when the [price][google.cloud.retail.v2beta.PriceInfo.price]
starts to be effective.
|
boolean |
hasPriceExpireTime()
The timestamp when the [price][google.cloud.retail.v2beta.PriceInfo.price]
stops to be effective.
|
boolean |
hasPriceRange()
Output only.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static PriceInfo.Builder |
newBuilder() |
static PriceInfo.Builder |
newBuilder(PriceInfo prototype) |
PriceInfo.Builder |
newBuilderForType() |
protected PriceInfo.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static PriceInfo |
parseDelimitedFrom(InputStream input) |
static PriceInfo |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PriceInfo |
parseFrom(byte[] data) |
static PriceInfo |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PriceInfo |
parseFrom(ByteBuffer data) |
static PriceInfo |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PriceInfo |
parseFrom(com.google.protobuf.ByteString data) |
static PriceInfo |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PriceInfo |
parseFrom(com.google.protobuf.CodedInputStream input) |
static PriceInfo |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PriceInfo |
parseFrom(InputStream input) |
static PriceInfo |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<PriceInfo> |
parser() |
PriceInfo.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int CURRENCY_CODE_FIELD_NUMBER
public static final int PRICE_FIELD_NUMBER
public static final int ORIGINAL_PRICE_FIELD_NUMBER
public static final int COST_FIELD_NUMBER
public static final int PRICE_EFFECTIVE_TIME_FIELD_NUMBER
public static final int PRICE_EXPIRE_TIME_FIELD_NUMBER
public static final int PRICE_RANGE_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String getCurrencyCode()
The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] [Product][google.cloud.retail.v2beta.Product]s with the same [Product.primary_product_id][google.cloud.retail.v2beta.Product.primary_product_id] must share the same [currency_code][google.cloud.retail.v2beta.PriceInfo.currency_code]. Otherwise, a FAILED_PRECONDITION error is returned.
string currency_code = 1;getCurrencyCode in interface PriceInfoOrBuilderpublic com.google.protobuf.ByteString getCurrencyCodeBytes()
The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] [Product][google.cloud.retail.v2beta.Product]s with the same [Product.primary_product_id][google.cloud.retail.v2beta.Product.primary_product_id] must share the same [currency_code][google.cloud.retail.v2beta.PriceInfo.currency_code]. Otherwise, a FAILED_PRECONDITION error is returned.
string currency_code = 1;getCurrencyCodeBytes in interface PriceInfoOrBuilderpublic float getPrice()
Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
float price = 2;getPrice in interface PriceInfoOrBuilderpublic float getOriginalPrice()
Price of the product without any discount. If zero, by default set to be the [price][google.cloud.retail.v2beta.PriceInfo.price]. If set, [original_price][google.cloud.retail.v2beta.PriceInfo.original_price] should be greater than or equal to [price][google.cloud.retail.v2beta.PriceInfo.price], otherwise an INVALID_ARGUMENT error is thrown.
float original_price = 3;getOriginalPrice in interface PriceInfoOrBuilderpublic float getCost()
The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = [price][google.cloud.retail.v2beta.PriceInfo.price] - [cost][google.cloud.retail.v2beta.PriceInfo.cost] Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
float cost = 4;getCost in interface PriceInfoOrBuilderpublic boolean hasPriceEffectiveTime()
The timestamp when the [price][google.cloud.retail.v2beta.PriceInfo.price] starts to be effective. This can be set as a future timestamp, and the [price][google.cloud.retail.v2beta.PriceInfo.price] is only used for search after [price_effective_time][google.cloud.retail.v2beta.PriceInfo.price_effective_time]. If so, the [original_price][google.cloud.retail.v2beta.PriceInfo.original_price] must be set and [original_price][google.cloud.retail.v2beta.PriceInfo.original_price] is used before [price_effective_time][google.cloud.retail.v2beta.PriceInfo.price_effective_time]. Do not set if [price][google.cloud.retail.v2beta.PriceInfo.price] is always effective because it will cause additional latency during search.
.google.protobuf.Timestamp price_effective_time = 5;hasPriceEffectiveTime in interface PriceInfoOrBuilderpublic com.google.protobuf.Timestamp getPriceEffectiveTime()
The timestamp when the [price][google.cloud.retail.v2beta.PriceInfo.price] starts to be effective. This can be set as a future timestamp, and the [price][google.cloud.retail.v2beta.PriceInfo.price] is only used for search after [price_effective_time][google.cloud.retail.v2beta.PriceInfo.price_effective_time]. If so, the [original_price][google.cloud.retail.v2beta.PriceInfo.original_price] must be set and [original_price][google.cloud.retail.v2beta.PriceInfo.original_price] is used before [price_effective_time][google.cloud.retail.v2beta.PriceInfo.price_effective_time]. Do not set if [price][google.cloud.retail.v2beta.PriceInfo.price] is always effective because it will cause additional latency during search.
.google.protobuf.Timestamp price_effective_time = 5;getPriceEffectiveTime in interface PriceInfoOrBuilderpublic com.google.protobuf.TimestampOrBuilder getPriceEffectiveTimeOrBuilder()
The timestamp when the [price][google.cloud.retail.v2beta.PriceInfo.price] starts to be effective. This can be set as a future timestamp, and the [price][google.cloud.retail.v2beta.PriceInfo.price] is only used for search after [price_effective_time][google.cloud.retail.v2beta.PriceInfo.price_effective_time]. If so, the [original_price][google.cloud.retail.v2beta.PriceInfo.original_price] must be set and [original_price][google.cloud.retail.v2beta.PriceInfo.original_price] is used before [price_effective_time][google.cloud.retail.v2beta.PriceInfo.price_effective_time]. Do not set if [price][google.cloud.retail.v2beta.PriceInfo.price] is always effective because it will cause additional latency during search.
.google.protobuf.Timestamp price_effective_time = 5;getPriceEffectiveTimeOrBuilder in interface PriceInfoOrBuilderpublic boolean hasPriceExpireTime()
The timestamp when the [price][google.cloud.retail.v2beta.PriceInfo.price] stops to be effective. The [price][google.cloud.retail.v2beta.PriceInfo.price] is used for search before [price_expire_time][google.cloud.retail.v2beta.PriceInfo.price_expire_time]. If this field is set, the [original_price][google.cloud.retail.v2beta.PriceInfo.original_price] must be set and [original_price][google.cloud.retail.v2beta.PriceInfo.original_price] is used after [price_expire_time][google.cloud.retail.v2beta.PriceInfo.price_expire_time]. Do not set if [price][google.cloud.retail.v2beta.PriceInfo.price] is always effective because it will cause additional latency during search.
.google.protobuf.Timestamp price_expire_time = 6;hasPriceExpireTime in interface PriceInfoOrBuilderpublic com.google.protobuf.Timestamp getPriceExpireTime()
The timestamp when the [price][google.cloud.retail.v2beta.PriceInfo.price] stops to be effective. The [price][google.cloud.retail.v2beta.PriceInfo.price] is used for search before [price_expire_time][google.cloud.retail.v2beta.PriceInfo.price_expire_time]. If this field is set, the [original_price][google.cloud.retail.v2beta.PriceInfo.original_price] must be set and [original_price][google.cloud.retail.v2beta.PriceInfo.original_price] is used after [price_expire_time][google.cloud.retail.v2beta.PriceInfo.price_expire_time]. Do not set if [price][google.cloud.retail.v2beta.PriceInfo.price] is always effective because it will cause additional latency during search.
.google.protobuf.Timestamp price_expire_time = 6;getPriceExpireTime in interface PriceInfoOrBuilderpublic com.google.protobuf.TimestampOrBuilder getPriceExpireTimeOrBuilder()
The timestamp when the [price][google.cloud.retail.v2beta.PriceInfo.price] stops to be effective. The [price][google.cloud.retail.v2beta.PriceInfo.price] is used for search before [price_expire_time][google.cloud.retail.v2beta.PriceInfo.price_expire_time]. If this field is set, the [original_price][google.cloud.retail.v2beta.PriceInfo.original_price] must be set and [original_price][google.cloud.retail.v2beta.PriceInfo.original_price] is used after [price_expire_time][google.cloud.retail.v2beta.PriceInfo.price_expire_time]. Do not set if [price][google.cloud.retail.v2beta.PriceInfo.price] is always effective because it will cause additional latency during search.
.google.protobuf.Timestamp price_expire_time = 6;getPriceExpireTimeOrBuilder in interface PriceInfoOrBuilderpublic boolean hasPriceRange()
Output only. The price range of all the child [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] [Product][google.cloud.retail.v2beta.Product]s grouped together on the [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] [Product][google.cloud.retail.v2beta.Product]. Only populated for [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] [Product][google.cloud.retail.v2beta.Product]s. Note: This field is OUTPUT_ONLY for [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]. Do not set this field in API requests.
.google.cloud.retail.v2beta.PriceInfo.PriceRange price_range = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasPriceRange in interface PriceInfoOrBuilderpublic PriceInfo.PriceRange getPriceRange()
Output only. The price range of all the child [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] [Product][google.cloud.retail.v2beta.Product]s grouped together on the [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] [Product][google.cloud.retail.v2beta.Product]. Only populated for [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] [Product][google.cloud.retail.v2beta.Product]s. Note: This field is OUTPUT_ONLY for [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]. Do not set this field in API requests.
.google.cloud.retail.v2beta.PriceInfo.PriceRange price_range = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
getPriceRange in interface PriceInfoOrBuilderpublic PriceInfo.PriceRangeOrBuilder getPriceRangeOrBuilder()
Output only. The price range of all the child [Product.Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] [Product][google.cloud.retail.v2beta.Product]s grouped together on the [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] [Product][google.cloud.retail.v2beta.Product]. Only populated for [Product.Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] [Product][google.cloud.retail.v2beta.Product]s. Note: This field is OUTPUT_ONLY for [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]. Do not set this field in API requests.
.google.cloud.retail.v2beta.PriceInfo.PriceRange price_range = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
getPriceRangeOrBuilder in interface PriceInfoOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static PriceInfo parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PriceInfo parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PriceInfo parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PriceInfo parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PriceInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PriceInfo parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PriceInfo parseFrom(InputStream input) throws IOException
IOExceptionpublic static PriceInfo parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static PriceInfo parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static PriceInfo parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static PriceInfo parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static PriceInfo parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic PriceInfo.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static PriceInfo.Builder newBuilder()
public static PriceInfo.Builder newBuilder(PriceInfo prototype)
public PriceInfo.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected PriceInfo.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static PriceInfo getDefaultInstance()
public static com.google.protobuf.Parser<PriceInfo> parser()
public com.google.protobuf.Parser<PriceInfo> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public PriceInfo getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024 Google LLC. All rights reserved.