Class Promotion.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Promotion.Builder>
com.google.cloud.retail.v2alpha.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.GeneratedMessage.Builder<Promotion.Builder> implements PromotionOrBuilder
 Promotion information.
 
Protobuf type google.cloud.retail.v2alpha.Promotion
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    ID of the promotion.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    ID of the promotion.
    com.google.protobuf.ByteString
    ID of the promotion.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    ID of the promotion.
    setPromotionIdBytes(com.google.protobuf.ByteString value)
    ID of the promotion.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • 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<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.GeneratedMessage.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.GeneratedMessage.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
    • 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>
    • mergeFrom

      public Promotion.Builder mergeFrom(Promotion other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.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.
      
       Corresponds to Google Merchant Center property
       [promotion_id](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.
      
       Corresponds to Google Merchant Center property
       [promotion_id](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.
      
       Corresponds to Google Merchant Center property
       [promotion_id](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.
      
       Corresponds to Google Merchant Center property
       [promotion_id](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.
      
       Corresponds to Google Merchant Center property
       [promotion_id](https://support.google.com/merchants/answer/7050148).
       
      string promotion_id = 1;
      Parameters:
      value - The bytes for promotionId to set.
      Returns:
      This builder for chaining.