Package com.google.cloud.retail.v2alpha
Interface PriceInfoOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
PriceInfo,PriceInfo.Builder
@Generated
public interface PriceInfoOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionfloatgetCost()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).floatPrice of the product without any discount.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.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.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getCurrencyCode
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.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;- Returns:
- The currencyCode.
-
getCurrencyCodeBytes
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;- Returns:
- The bytes for currencyCode.
-
getPrice
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;- Returns:
- The price.
-
getOriginalPrice
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;- Returns:
- The originalPrice.
-
getCost
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;- Returns:
- The cost.
-
hasPriceEffectiveTime
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;- Returns:
- Whether the priceEffectiveTime field is set.
-
getPriceEffectiveTime
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;- Returns:
- The priceEffectiveTime.
-
getPriceEffectiveTimeOrBuilder
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; -
hasPriceExpireTime
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;- Returns:
- Whether the priceExpireTime field is set.
-
getPriceExpireTime
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;- Returns:
- The priceExpireTime.
-
getPriceExpireTimeOrBuilder
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; -
hasPriceRange
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];- Returns:
- Whether the priceRange field is set.
-
getPriceRange
PriceInfo.PriceRange 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];- Returns:
- The priceRange.
-
getPriceRangeOrBuilder
PriceInfo.PriceRangeOrBuilder 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];
-