Package com.google.cloud.retail.v2alpha
Class PriceInfo
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.retail.v2alpha.PriceInfo
- All Implemented Interfaces:
PriceInfoOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class PriceInfo
extends com.google.protobuf.GeneratedMessage
implements PriceInfoOrBuilder
The price information of a [Product][google.cloud.retail.v2alpha.Product].Protobuf type
google.cloud.retail.v2alpha.PriceInfo- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe price information of a [Product][google.cloud.retail.v2alpha.Product].static final classThe price range of all [variant][google.cloud.retail.v2alpha.Product.Type.VARIANT] [Product][google.cloud.retail.v2alpha.Product] having the same [Product.primary_product_id][google.cloud.retail.v2alpha.Product.primary_product_id].static interfaceNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanfloatgetCost()The costs associated with the sale of a particular product.The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html).com.google.protobuf.ByteStringThe 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html).static PriceInfostatic final com.google.protobuf.Descriptors.DescriptorfloatPrice of the product without any discount.com.google.protobuf.Parser<PriceInfo>floatgetPrice()Price of the product.com.google.protobuf.TimestampThe timestamp when the [price][google.cloud.retail.v2alpha.PriceInfo.price] starts to be effective.com.google.protobuf.TimestampOrBuilderThe timestamp when the [price][google.cloud.retail.v2alpha.PriceInfo.price] starts to be effective.com.google.protobuf.TimestampThe timestamp when the [price][google.cloud.retail.v2alpha.PriceInfo.price] stops to be effective.com.google.protobuf.TimestampOrBuilderThe timestamp when the [price][google.cloud.retail.v2alpha.PriceInfo.price] stops to be effective.Output only.Output only.intinthashCode()booleanThe timestamp when the [price][google.cloud.retail.v2alpha.PriceInfo.price] starts to be effective.booleanThe timestamp when the [price][google.cloud.retail.v2alpha.PriceInfo.price] stops to be effective.booleanOutput only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic PriceInfo.Builderstatic PriceInfo.BuildernewBuilder(PriceInfo prototype) protected PriceInfo.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static PriceInfoparseDelimitedFrom(InputStream input) static PriceInfoparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static PriceInfoparseFrom(byte[] data) static PriceInfoparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static PriceInfoparseFrom(com.google.protobuf.ByteString data) static PriceInfoparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static PriceInfoparseFrom(com.google.protobuf.CodedInputStream input) static PriceInfoparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static PriceInfoparseFrom(InputStream input) static PriceInfoparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static PriceInfoparseFrom(ByteBuffer data) static PriceInfoparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<PriceInfo>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
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, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
CURRENCY_CODE_FIELD_NUMBER
public static final int CURRENCY_CODE_FIELD_NUMBER- See Also:
-
PRICE_FIELD_NUMBER
public static final int PRICE_FIELD_NUMBER- See Also:
-
ORIGINAL_PRICE_FIELD_NUMBER
public static final int ORIGINAL_PRICE_FIELD_NUMBER- See Also:
-
COST_FIELD_NUMBER
public static final int COST_FIELD_NUMBER- See Also:
-
PRICE_EFFECTIVE_TIME_FIELD_NUMBER
public static final int PRICE_EFFECTIVE_TIME_FIELD_NUMBER- See Also:
-
PRICE_EXPIRE_TIME_FIELD_NUMBER
public static final int PRICE_EXPIRE_TIME_FIELD_NUMBER- See Also:
-
PRICE_RANGE_FIELD_NUMBER
public static final int PRICE_RANGE_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
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.v2alpha.Product.Type.VARIANT] [Product][google.cloud.retail.v2alpha.Product]s with the same [Product.primary_product_id][google.cloud.retail.v2alpha.Product.primary_product_id] must share the same [currency_code][google.cloud.retail.v2alpha.PriceInfo.currency_code]. Otherwise, a FAILED_PRECONDITION error is returned.
string currency_code = 1;- Specified by:
getCurrencyCodein interfacePriceInfoOrBuilder- Returns:
- The currencyCode.
-
getCurrencyCodeBytes
public 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.v2alpha.Product.Type.VARIANT] [Product][google.cloud.retail.v2alpha.Product]s with the same [Product.primary_product_id][google.cloud.retail.v2alpha.Product.primary_product_id] must share the same [currency_code][google.cloud.retail.v2alpha.PriceInfo.currency_code]. Otherwise, a FAILED_PRECONDITION error is returned.
string currency_code = 1;- Specified by:
getCurrencyCodeBytesin interfacePriceInfoOrBuilder- Returns:
- The bytes for currencyCode.
-
getPrice
public 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;- Specified by:
getPricein interfacePriceInfoOrBuilder- Returns:
- The price.
-
getOriginalPrice
public float getOriginalPrice()Price of the product without any discount. If zero, by default set to be the [price][google.cloud.retail.v2alpha.PriceInfo.price]. If set, [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price] should be greater than or equal to [price][google.cloud.retail.v2alpha.PriceInfo.price], otherwise an INVALID_ARGUMENT error is thrown.
float original_price = 3;- Specified by:
getOriginalPricein interfacePriceInfoOrBuilder- Returns:
- The originalPrice.
-
getCost
public float getCost()The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = [price][google.cloud.retail.v2alpha.PriceInfo.price] - [cost][google.cloud.retail.v2alpha.PriceInfo.cost] Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
float cost = 4;- Specified by:
getCostin interfacePriceInfoOrBuilder- Returns:
- The cost.
-
hasPriceEffectiveTime
public boolean hasPriceEffectiveTime()The timestamp when the [price][google.cloud.retail.v2alpha.PriceInfo.price] starts to be effective. This can be set as a future timestamp, and the [price][google.cloud.retail.v2alpha.PriceInfo.price] is only used for search after [price_effective_time][google.cloud.retail.v2alpha.PriceInfo.price_effective_time]. If so, the [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price] must be set and [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price] is used before [price_effective_time][google.cloud.retail.v2alpha.PriceInfo.price_effective_time]. Do not set if [price][google.cloud.retail.v2alpha.PriceInfo.price] is always effective because it will cause additional latency during search.
.google.protobuf.Timestamp price_effective_time = 5;- Specified by:
hasPriceEffectiveTimein interfacePriceInfoOrBuilder- Returns:
- Whether the priceEffectiveTime field is set.
-
getPriceEffectiveTime
public com.google.protobuf.Timestamp getPriceEffectiveTime()The timestamp when the [price][google.cloud.retail.v2alpha.PriceInfo.price] starts to be effective. This can be set as a future timestamp, and the [price][google.cloud.retail.v2alpha.PriceInfo.price] is only used for search after [price_effective_time][google.cloud.retail.v2alpha.PriceInfo.price_effective_time]. If so, the [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price] must be set and [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price] is used before [price_effective_time][google.cloud.retail.v2alpha.PriceInfo.price_effective_time]. Do not set if [price][google.cloud.retail.v2alpha.PriceInfo.price] is always effective because it will cause additional latency during search.
.google.protobuf.Timestamp price_effective_time = 5;- Specified by:
getPriceEffectiveTimein interfacePriceInfoOrBuilder- Returns:
- The priceEffectiveTime.
-
getPriceEffectiveTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getPriceEffectiveTimeOrBuilder()The timestamp when the [price][google.cloud.retail.v2alpha.PriceInfo.price] starts to be effective. This can be set as a future timestamp, and the [price][google.cloud.retail.v2alpha.PriceInfo.price] is only used for search after [price_effective_time][google.cloud.retail.v2alpha.PriceInfo.price_effective_time]. If so, the [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price] must be set and [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price] is used before [price_effective_time][google.cloud.retail.v2alpha.PriceInfo.price_effective_time]. Do not set if [price][google.cloud.retail.v2alpha.PriceInfo.price] is always effective because it will cause additional latency during search.
.google.protobuf.Timestamp price_effective_time = 5;- Specified by:
getPriceEffectiveTimeOrBuilderin interfacePriceInfoOrBuilder
-
hasPriceExpireTime
public boolean hasPriceExpireTime()The timestamp when the [price][google.cloud.retail.v2alpha.PriceInfo.price] stops to be effective. The [price][google.cloud.retail.v2alpha.PriceInfo.price] is used for search before [price_expire_time][google.cloud.retail.v2alpha.PriceInfo.price_expire_time]. If this field is set, the [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price] must be set and [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price] is used after [price_expire_time][google.cloud.retail.v2alpha.PriceInfo.price_expire_time]. Do not set if [price][google.cloud.retail.v2alpha.PriceInfo.price] is always effective because it will cause additional latency during search.
.google.protobuf.Timestamp price_expire_time = 6;- Specified by:
hasPriceExpireTimein interfacePriceInfoOrBuilder- Returns:
- Whether the priceExpireTime field is set.
-
getPriceExpireTime
public com.google.protobuf.Timestamp getPriceExpireTime()The timestamp when the [price][google.cloud.retail.v2alpha.PriceInfo.price] stops to be effective. The [price][google.cloud.retail.v2alpha.PriceInfo.price] is used for search before [price_expire_time][google.cloud.retail.v2alpha.PriceInfo.price_expire_time]. If this field is set, the [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price] must be set and [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price] is used after [price_expire_time][google.cloud.retail.v2alpha.PriceInfo.price_expire_time]. Do not set if [price][google.cloud.retail.v2alpha.PriceInfo.price] is always effective because it will cause additional latency during search.
.google.protobuf.Timestamp price_expire_time = 6;- Specified by:
getPriceExpireTimein interfacePriceInfoOrBuilder- Returns:
- The priceExpireTime.
-
getPriceExpireTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getPriceExpireTimeOrBuilder()The timestamp when the [price][google.cloud.retail.v2alpha.PriceInfo.price] stops to be effective. The [price][google.cloud.retail.v2alpha.PriceInfo.price] is used for search before [price_expire_time][google.cloud.retail.v2alpha.PriceInfo.price_expire_time]. If this field is set, the [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price] must be set and [original_price][google.cloud.retail.v2alpha.PriceInfo.original_price] is used after [price_expire_time][google.cloud.retail.v2alpha.PriceInfo.price_expire_time]. Do not set if [price][google.cloud.retail.v2alpha.PriceInfo.price] is always effective because it will cause additional latency during search.
.google.protobuf.Timestamp price_expire_time = 6;- Specified by:
getPriceExpireTimeOrBuilderin interfacePriceInfoOrBuilder
-
hasPriceRange
public boolean hasPriceRange()Output only. The price range of all the child [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] [Product][google.cloud.retail.v2alpha.Product]s grouped together on the [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] [Product][google.cloud.retail.v2alpha.Product]. Only populated for [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] [Product][google.cloud.retail.v2alpha.Product]s. Note: This field is OUTPUT_ONLY for [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]. Do not set this field in API requests.
.google.cloud.retail.v2alpha.PriceInfo.PriceRange price_range = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
hasPriceRangein interfacePriceInfoOrBuilder- Returns:
- Whether the priceRange field is set.
-
getPriceRange
Output only. The price range of all the child [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] [Product][google.cloud.retail.v2alpha.Product]s grouped together on the [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] [Product][google.cloud.retail.v2alpha.Product]. Only populated for [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] [Product][google.cloud.retail.v2alpha.Product]s. Note: This field is OUTPUT_ONLY for [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]. Do not set this field in API requests.
.google.cloud.retail.v2alpha.PriceInfo.PriceRange price_range = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getPriceRangein interfacePriceInfoOrBuilder- Returns:
- The priceRange.
-
getPriceRangeOrBuilder
Output only. The price range of all the child [Product.Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT] [Product][google.cloud.retail.v2alpha.Product]s grouped together on the [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] [Product][google.cloud.retail.v2alpha.Product]. Only populated for [Product.Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] [Product][google.cloud.retail.v2alpha.Product]s. Note: This field is OUTPUT_ONLY for [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct]. Do not set this field in API requests.
.google.cloud.retail.v2alpha.PriceInfo.PriceRange price_range = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getPriceRangeOrBuilderin interfacePriceInfoOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static PriceInfo parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PriceInfo parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PriceInfo parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PriceInfo parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PriceInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PriceInfo parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static PriceInfo parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static PriceInfo parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static PriceInfo parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected PriceInfo.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-