Class 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.GeneratedMessageV3.Builder<ProductDetail.Builder>
    implements ProductDetailOrBuilder
     Detailed product information associated with a user event.
     
    Protobuf type google.cloud.retail.v2alpha.ProductDetail
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public ProductDetail.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<ProductDetail.Builder>
      • setField

        public ProductDetail.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                              Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<ProductDetail.Builder>
      • clearField

        public ProductDetail.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<ProductDetail.Builder>
      • clearOneof

        public ProductDetail.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ProductDetail.Builder>
      • setRepeatedField

        public ProductDetail.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                      int index,
                                                      Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ProductDetail.Builder>
      • addRepeatedField

        public ProductDetail.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                      Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ProductDetail.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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
      • setUnknownFields

        public final ProductDetail.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ProductDetail.Builder>
      • mergeUnknownFields

        public final ProductDetail.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ProductDetail.Builder>