Class Promotion.Builder

  • All Implemented Interfaces:
    PromotionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Promotion

    public static final class Promotion.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Promotion.Builder>
    implements PromotionOrBuilder
     Promotion information.
     
    Protobuf type google.cloud.retail.v2alpha.Promotion
    • 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<Promotion.Builder>
      • clear

        public Promotion.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<Promotion.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<Promotion.Builder>
      • getDefaultInstanceForType

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

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

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

        public Promotion.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<Promotion.Builder>
      • setField

        public Promotion.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<Promotion.Builder>
      • clearField

        public Promotion.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<Promotion.Builder>
      • clearOneof

        public Promotion.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<Promotion.Builder>
      • setRepeatedField

        public Promotion.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<Promotion.Builder>
      • addRepeatedField

        public Promotion.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<Promotion.Builder>
      • mergeFrom

        public Promotion.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<Promotion.Builder>
      • isInitialized

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

        public Promotion.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<Promotion.Builder>
        Throws:
        IOException
      • getPromotionId

        public String getPromotionId()
         ID of the promotion. For example, "free gift".
        
         The value must be a UTF-8 encoded string with a length limit of 128
         characters, and match the pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example,
         id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is
         returned.
        
         Google Merchant Center property
         [promotion](https://support.google.com/merchants/answer/7050148).
         
        string promotion_id = 1;
        Specified by:
        getPromotionId in interface PromotionOrBuilder
        Returns:
        The promotionId.
      • getPromotionIdBytes

        public com.google.protobuf.ByteString getPromotionIdBytes()
         ID of the promotion. For example, "free gift".
        
         The value must be a UTF-8 encoded string with a length limit of 128
         characters, and match the pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example,
         id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is
         returned.
        
         Google Merchant Center property
         [promotion](https://support.google.com/merchants/answer/7050148).
         
        string promotion_id = 1;
        Specified by:
        getPromotionIdBytes in interface PromotionOrBuilder
        Returns:
        The bytes for promotionId.
      • setPromotionId

        public Promotion.Builder setPromotionId​(String value)
         ID of the promotion. For example, "free gift".
        
         The value must be a UTF-8 encoded string with a length limit of 128
         characters, and match the pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example,
         id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is
         returned.
        
         Google Merchant Center property
         [promotion](https://support.google.com/merchants/answer/7050148).
         
        string promotion_id = 1;
        Parameters:
        value - The promotionId to set.
        Returns:
        This builder for chaining.
      • clearPromotionId

        public Promotion.Builder clearPromotionId()
         ID of the promotion. For example, "free gift".
        
         The value must be a UTF-8 encoded string with a length limit of 128
         characters, and match the pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example,
         id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is
         returned.
        
         Google Merchant Center property
         [promotion](https://support.google.com/merchants/answer/7050148).
         
        string promotion_id = 1;
        Returns:
        This builder for chaining.
      • setPromotionIdBytes

        public Promotion.Builder setPromotionIdBytes​(com.google.protobuf.ByteString value)
         ID of the promotion. For example, "free gift".
        
         The value must be a UTF-8 encoded string with a length limit of 128
         characters, and match the pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example,
         id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is
         returned.
        
         Google Merchant Center property
         [promotion](https://support.google.com/merchants/answer/7050148).
         
        string promotion_id = 1;
        Parameters:
        value - The bytes for promotionId to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Promotion.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<Promotion.Builder>
      • mergeUnknownFields

        public final Promotion.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<Promotion.Builder>