Class ProductCatalogItem

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.recommendationengine.v1beta1.ProductCatalogItem
All Implemented Interfaces:
ProductCatalogItemOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class ProductCatalogItem extends com.google.protobuf.GeneratedMessage implements ProductCatalogItemOrBuilder
 ProductCatalogItem captures item metadata specific to retail products.
 
Protobuf type google.cloud.recommendationengine.v1beta1.ProductCatalogItem
See Also:
  • Field Details

    • EXACT_PRICE_FIELD_NUMBER

      public static final int EXACT_PRICE_FIELD_NUMBER
      See Also:
    • PRICE_RANGE_FIELD_NUMBER

      public static final int PRICE_RANGE_FIELD_NUMBER
      See Also:
    • COSTS_FIELD_NUMBER

      public static final int COSTS_FIELD_NUMBER
      See Also:
    • CURRENCY_CODE_FIELD_NUMBER

      public static final int CURRENCY_CODE_FIELD_NUMBER
      See Also:
    • STOCK_STATE_FIELD_NUMBER

      public static final int STOCK_STATE_FIELD_NUMBER
      See Also:
    • AVAILABLE_QUANTITY_FIELD_NUMBER

      public static final int AVAILABLE_QUANTITY_FIELD_NUMBER
      See Also:
    • CANONICAL_PRODUCT_URI_FIELD_NUMBER

      public static final int CANONICAL_PRODUCT_URI_FIELD_NUMBER
      See Also:
    • IMAGES_FIELD_NUMBER

      public static final int IMAGES_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getPriceCase

      public ProductCatalogItem.PriceCase getPriceCase()
      Specified by:
      getPriceCase in interface ProductCatalogItemOrBuilder
    • hasExactPrice

      public boolean hasExactPrice()
       Optional. The exact product price.
       
      .google.cloud.recommendationengine.v1beta1.ProductCatalogItem.ExactPrice exact_price = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasExactPrice in interface ProductCatalogItemOrBuilder
      Returns:
      Whether the exactPrice field is set.
    • getExactPrice

      public ProductCatalogItem.ExactPrice getExactPrice()
       Optional. The exact product price.
       
      .google.cloud.recommendationengine.v1beta1.ProductCatalogItem.ExactPrice exact_price = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getExactPrice in interface ProductCatalogItemOrBuilder
      Returns:
      The exactPrice.
    • getExactPriceOrBuilder

      public ProductCatalogItem.ExactPriceOrBuilder getExactPriceOrBuilder()
       Optional. The exact product price.
       
      .google.cloud.recommendationengine.v1beta1.ProductCatalogItem.ExactPrice exact_price = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getExactPriceOrBuilder in interface ProductCatalogItemOrBuilder
    • hasPriceRange

      public boolean hasPriceRange()
       Optional. The product price range.
       
      .google.cloud.recommendationengine.v1beta1.ProductCatalogItem.PriceRange price_range = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasPriceRange in interface ProductCatalogItemOrBuilder
      Returns:
      Whether the priceRange field is set.
    • getPriceRange

      public ProductCatalogItem.PriceRange getPriceRange()
       Optional. The product price range.
       
      .google.cloud.recommendationengine.v1beta1.ProductCatalogItem.PriceRange price_range = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPriceRange in interface ProductCatalogItemOrBuilder
      Returns:
      The priceRange.
    • getPriceRangeOrBuilder

      public ProductCatalogItem.PriceRangeOrBuilder getPriceRangeOrBuilder()
       Optional. The product price range.
       
      .google.cloud.recommendationengine.v1beta1.ProductCatalogItem.PriceRange price_range = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPriceRangeOrBuilder in interface ProductCatalogItemOrBuilder
    • getCostsCount

      public int getCostsCount()
      Description copied from interface: ProductCatalogItemOrBuilder
       Optional. A map to pass the costs associated with the product.
      
       For example:
       {"manufacturing": 45.5} The profit of selling this item is computed like
       so:
      
       * If 'exactPrice' is provided, profit = displayPrice - sum(costs)
       * If 'priceRange' is provided, profit = minPrice - sum(costs)
       
      map<string, float> costs = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCostsCount in interface ProductCatalogItemOrBuilder
    • containsCosts

      public boolean containsCosts(String key)
       Optional. A map to pass the costs associated with the product.
      
       For example:
       {"manufacturing": 45.5} The profit of selling this item is computed like
       so:
      
       * If 'exactPrice' is provided, profit = displayPrice - sum(costs)
       * If 'priceRange' is provided, profit = minPrice - sum(costs)
       
      map<string, float> costs = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsCosts in interface ProductCatalogItemOrBuilder
    • getCosts

      @Deprecated public Map<String,Float> getCosts()
      Deprecated.
      Use getCostsMap() instead.
      Specified by:
      getCosts in interface ProductCatalogItemOrBuilder
    • getCostsMap

      public Map<String,Float> getCostsMap()
       Optional. A map to pass the costs associated with the product.
      
       For example:
       {"manufacturing": 45.5} The profit of selling this item is computed like
       so:
      
       * If 'exactPrice' is provided, profit = displayPrice - sum(costs)
       * If 'priceRange' is provided, profit = minPrice - sum(costs)
       
      map<string, float> costs = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCostsMap in interface ProductCatalogItemOrBuilder
    • getCostsOrDefault

      public float getCostsOrDefault(String key, float defaultValue)
       Optional. A map to pass the costs associated with the product.
      
       For example:
       {"manufacturing": 45.5} The profit of selling this item is computed like
       so:
      
       * If 'exactPrice' is provided, profit = displayPrice - sum(costs)
       * If 'priceRange' is provided, profit = minPrice - sum(costs)
       
      map<string, float> costs = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCostsOrDefault in interface ProductCatalogItemOrBuilder
    • getCostsOrThrow

      public float getCostsOrThrow(String key)
       Optional. A map to pass the costs associated with the product.
      
       For example:
       {"manufacturing": 45.5} The profit of selling this item is computed like
       so:
      
       * If 'exactPrice' is provided, profit = displayPrice - sum(costs)
       * If 'priceRange' is provided, profit = minPrice - sum(costs)
       
      map<string, float> costs = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCostsOrThrow in interface ProductCatalogItemOrBuilder
    • getCurrencyCode

      public String getCurrencyCode()
       Optional. Only required if the price is set. Currency code for price/costs. Use
       three-character ISO-4217 code.
       
      string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCurrencyCode in interface ProductCatalogItemOrBuilder
      Returns:
      The currencyCode.
    • getCurrencyCodeBytes

      public com.google.protobuf.ByteString getCurrencyCodeBytes()
       Optional. Only required if the price is set. Currency code for price/costs. Use
       three-character ISO-4217 code.
       
      string currency_code = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCurrencyCodeBytes in interface ProductCatalogItemOrBuilder
      Returns:
      The bytes for currencyCode.
    • getStockStateValue

      public int getStockStateValue()
       Optional. Online stock state of the catalog item. Default is `IN_STOCK`.
       
      .google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState stock_state = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getStockStateValue in interface ProductCatalogItemOrBuilder
      Returns:
      The enum numeric value on the wire for stockState.
    • getStockState

      public ProductCatalogItem.StockState getStockState()
       Optional. Online stock state of the catalog item. Default is `IN_STOCK`.
       
      .google.cloud.recommendationengine.v1beta1.ProductCatalogItem.StockState stock_state = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getStockState in interface ProductCatalogItemOrBuilder
      Returns:
      The stockState.
    • getAvailableQuantity

      public long getAvailableQuantity()
       Optional. The available quantity of the item.
       
      int64 available_quantity = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAvailableQuantity in interface ProductCatalogItemOrBuilder
      Returns:
      The availableQuantity.
    • getCanonicalProductUri

      public String getCanonicalProductUri()
       Optional. Canonical URL directly linking to the item detail page with a
       length limit of 5 KiB..
       
      string canonical_product_uri = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCanonicalProductUri in interface ProductCatalogItemOrBuilder
      Returns:
      The canonicalProductUri.
    • getCanonicalProductUriBytes

      public com.google.protobuf.ByteString getCanonicalProductUriBytes()
       Optional. Canonical URL directly linking to the item detail page with a
       length limit of 5 KiB..
       
      string canonical_product_uri = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCanonicalProductUriBytes in interface ProductCatalogItemOrBuilder
      Returns:
      The bytes for canonicalProductUri.
    • getImagesList

      public List<Image> getImagesList()
       Optional. Product images for the catalog item.
       
      repeated .google.cloud.recommendationengine.v1beta1.Image images = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getImagesList in interface ProductCatalogItemOrBuilder
    • getImagesOrBuilderList

      public List<? extends ImageOrBuilder> getImagesOrBuilderList()
       Optional. Product images for the catalog item.
       
      repeated .google.cloud.recommendationengine.v1beta1.Image images = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getImagesOrBuilderList in interface ProductCatalogItemOrBuilder
    • getImagesCount

      public int getImagesCount()
       Optional. Product images for the catalog item.
       
      repeated .google.cloud.recommendationengine.v1beta1.Image images = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getImagesCount in interface ProductCatalogItemOrBuilder
    • getImages

      public Image getImages(int index)
       Optional. Product images for the catalog item.
       
      repeated .google.cloud.recommendationengine.v1beta1.Image images = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getImages in interface ProductCatalogItemOrBuilder
    • getImagesOrBuilder

      public ImageOrBuilder getImagesOrBuilder(int index)
       Optional. Product images for the catalog item.
       
      repeated .google.cloud.recommendationengine.v1beta1.Image images = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getImagesOrBuilder in interface ProductCatalogItemOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static ProductCatalogItem parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ProductCatalogItem parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ProductCatalogItem parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ProductCatalogItem parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ProductCatalogItem parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ProductCatalogItem parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ProductCatalogItem parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ProductCatalogItem parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ProductCatalogItem parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ProductCatalogItem parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ProductCatalogItem parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ProductCatalogItem parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public ProductCatalogItem.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static ProductCatalogItem.Builder newBuilder()
    • newBuilder

      public static ProductCatalogItem.Builder newBuilder(ProductCatalogItem prototype)
    • toBuilder

      public ProductCatalogItem.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected ProductCatalogItem.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static ProductCatalogItem getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<ProductCatalogItem> parser()
    • getParserForType

      public com.google.protobuf.Parser<ProductCatalogItem> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public ProductCatalogItem getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder