Class ProductDetail.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ProductDetail.Builder>
com.google.cloud.retail.v2alpha.ProductDetail.Builder
All Implemented Interfaces:
ProductDetailOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ProductDetail

public static final class ProductDetail.Builder extends com.google.protobuf.GeneratedMessage.Builder<ProductDetail.Builder> implements ProductDetailOrBuilder
 Detailed product information associated with a user event.
 
Protobuf type google.cloud.retail.v2alpha.ProductDetail
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ProductDetail.Builder>
    • clear

      public ProductDetail.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<ProductDetail.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ProductDetail.Builder>
    • getDefaultInstanceForType

      public ProductDetail getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public ProductDetail build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ProductDetail buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ProductDetail.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ProductDetail.Builder>
    • mergeFrom

      public ProductDetail.Builder mergeFrom(ProductDetail other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ProductDetail.Builder>
    • mergeFrom

      public ProductDetail.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ProductDetail.Builder>
      Throws:
      IOException
    • hasProduct

      public boolean hasProduct()
       Required. [Product][google.cloud.retail.v2alpha.Product] information.
      
       Required field(s):
      
       * [Product.id][google.cloud.retail.v2alpha.Product.id]
      
       Optional override field(s):
      
       * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info]
      
       If any supported optional fields are provided, we will treat them as a full
       override when looking up product information from the catalog. Thus, it is
       important to ensure that the overriding fields are accurate and
       complete.
      
       All other product fields are ignored and instead populated via catalog
       lookup after event ingestion.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasProduct in interface ProductDetailOrBuilder
      Returns:
      Whether the product field is set.
    • getProduct

      public Product getProduct()
       Required. [Product][google.cloud.retail.v2alpha.Product] information.
      
       Required field(s):
      
       * [Product.id][google.cloud.retail.v2alpha.Product.id]
      
       Optional override field(s):
      
       * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info]
      
       If any supported optional fields are provided, we will treat them as a full
       override when looking up product information from the catalog. Thus, it is
       important to ensure that the overriding fields are accurate and
       complete.
      
       All other product fields are ignored and instead populated via catalog
       lookup after event ingestion.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getProduct in interface ProductDetailOrBuilder
      Returns:
      The product.
    • setProduct

      public ProductDetail.Builder setProduct(Product value)
       Required. [Product][google.cloud.retail.v2alpha.Product] information.
      
       Required field(s):
      
       * [Product.id][google.cloud.retail.v2alpha.Product.id]
      
       Optional override field(s):
      
       * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info]
      
       If any supported optional fields are provided, we will treat them as a full
       override when looking up product information from the catalog. Thus, it is
       important to ensure that the overriding fields are accurate and
       complete.
      
       All other product fields are ignored and instead populated via catalog
       lookup after event ingestion.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
    • setProduct

      public ProductDetail.Builder setProduct(Product.Builder builderForValue)
       Required. [Product][google.cloud.retail.v2alpha.Product] information.
      
       Required field(s):
      
       * [Product.id][google.cloud.retail.v2alpha.Product.id]
      
       Optional override field(s):
      
       * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info]
      
       If any supported optional fields are provided, we will treat them as a full
       override when looking up product information from the catalog. Thus, it is
       important to ensure that the overriding fields are accurate and
       complete.
      
       All other product fields are ignored and instead populated via catalog
       lookup after event ingestion.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
    • mergeProduct

      public ProductDetail.Builder mergeProduct(Product value)
       Required. [Product][google.cloud.retail.v2alpha.Product] information.
      
       Required field(s):
      
       * [Product.id][google.cloud.retail.v2alpha.Product.id]
      
       Optional override field(s):
      
       * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info]
      
       If any supported optional fields are provided, we will treat them as a full
       override when looking up product information from the catalog. Thus, it is
       important to ensure that the overriding fields are accurate and
       complete.
      
       All other product fields are ignored and instead populated via catalog
       lookup after event ingestion.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
    • clearProduct

      public ProductDetail.Builder clearProduct()
       Required. [Product][google.cloud.retail.v2alpha.Product] information.
      
       Required field(s):
      
       * [Product.id][google.cloud.retail.v2alpha.Product.id]
      
       Optional override field(s):
      
       * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info]
      
       If any supported optional fields are provided, we will treat them as a full
       override when looking up product information from the catalog. Thus, it is
       important to ensure that the overriding fields are accurate and
       complete.
      
       All other product fields are ignored and instead populated via catalog
       lookup after event ingestion.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
    • getProductBuilder

      public Product.Builder getProductBuilder()
       Required. [Product][google.cloud.retail.v2alpha.Product] information.
      
       Required field(s):
      
       * [Product.id][google.cloud.retail.v2alpha.Product.id]
      
       Optional override field(s):
      
       * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info]
      
       If any supported optional fields are provided, we will treat them as a full
       override when looking up product information from the catalog. Thus, it is
       important to ensure that the overriding fields are accurate and
       complete.
      
       All other product fields are ignored and instead populated via catalog
       lookup after event ingestion.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
    • getProductOrBuilder

      public ProductOrBuilder getProductOrBuilder()
       Required. [Product][google.cloud.retail.v2alpha.Product] information.
      
       Required field(s):
      
       * [Product.id][google.cloud.retail.v2alpha.Product.id]
      
       Optional override field(s):
      
       * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info]
      
       If any supported optional fields are provided, we will treat them as a full
       override when looking up product information from the catalog. Thus, it is
       important to ensure that the overriding fields are accurate and
       complete.
      
       All other product fields are ignored and instead populated via catalog
       lookup after event ingestion.
       
      .google.cloud.retail.v2alpha.Product product = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getProductOrBuilder in interface ProductDetailOrBuilder
    • hasQuantity

      public boolean hasQuantity()
       Quantity of the product associated with the user event.
      
       For example, this field will be 2 if two products are added to the shopping
       cart for `purchase-complete` event. Required for `add-to-cart` and
       `purchase-complete` event types.
       
      .google.protobuf.Int32Value quantity = 2;
      Specified by:
      hasQuantity in interface ProductDetailOrBuilder
      Returns:
      Whether the quantity field is set.
    • getQuantity

      public com.google.protobuf.Int32Value getQuantity()
       Quantity of the product associated with the user event.
      
       For example, this field will be 2 if two products are added to the shopping
       cart for `purchase-complete` event. Required for `add-to-cart` and
       `purchase-complete` event types.
       
      .google.protobuf.Int32Value quantity = 2;
      Specified by:
      getQuantity in interface ProductDetailOrBuilder
      Returns:
      The quantity.
    • setQuantity

      public ProductDetail.Builder setQuantity(com.google.protobuf.Int32Value value)
       Quantity of the product associated with the user event.
      
       For example, this field will be 2 if two products are added to the shopping
       cart for `purchase-complete` event. Required for `add-to-cart` and
       `purchase-complete` event types.
       
      .google.protobuf.Int32Value quantity = 2;
    • setQuantity

      public ProductDetail.Builder setQuantity(com.google.protobuf.Int32Value.Builder builderForValue)
       Quantity of the product associated with the user event.
      
       For example, this field will be 2 if two products are added to the shopping
       cart for `purchase-complete` event. Required for `add-to-cart` and
       `purchase-complete` event types.
       
      .google.protobuf.Int32Value quantity = 2;
    • mergeQuantity

      public ProductDetail.Builder mergeQuantity(com.google.protobuf.Int32Value value)
       Quantity of the product associated with the user event.
      
       For example, this field will be 2 if two products are added to the shopping
       cart for `purchase-complete` event. Required for `add-to-cart` and
       `purchase-complete` event types.
       
      .google.protobuf.Int32Value quantity = 2;
    • clearQuantity

      public ProductDetail.Builder clearQuantity()
       Quantity of the product associated with the user event.
      
       For example, this field will be 2 if two products are added to the shopping
       cart for `purchase-complete` event. Required for `add-to-cart` and
       `purchase-complete` event types.
       
      .google.protobuf.Int32Value quantity = 2;
    • getQuantityBuilder

      public com.google.protobuf.Int32Value.Builder getQuantityBuilder()
       Quantity of the product associated with the user event.
      
       For example, this field will be 2 if two products are added to the shopping
       cart for `purchase-complete` event. Required for `add-to-cart` and
       `purchase-complete` event types.
       
      .google.protobuf.Int32Value quantity = 2;
    • getQuantityOrBuilder

      public com.google.protobuf.Int32ValueOrBuilder getQuantityOrBuilder()
       Quantity of the product associated with the user event.
      
       For example, this field will be 2 if two products are added to the shopping
       cart for `purchase-complete` event. Required for `add-to-cart` and
       `purchase-complete` event types.
       
      .google.protobuf.Int32Value quantity = 2;
      Specified by:
      getQuantityOrBuilder in interface ProductDetailOrBuilder