Class DocumentInfo.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<DocumentInfo.Builder>
com.google.cloud.discoveryengine.v1beta.DocumentInfo.Builder
All Implemented Interfaces:
DocumentInfoOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
DocumentInfo

public static final class DocumentInfo.Builder extends com.google.protobuf.GeneratedMessage.Builder<DocumentInfo.Builder> implements DocumentInfoOrBuilder
 Detailed document information associated with a user event.
 
Protobuf type google.cloud.discoveryengine.v1beta.DocumentInfo
  • Method Summary

    Modifier and Type
    Method
    Description
    The promotion IDs associated with this Document.
    The promotion IDs associated with this Document.
    addPromotionIdsBytes(com.google.protobuf.ByteString value)
    The promotion IDs associated with this Document.
     
     
     
     
    The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID.
    Output only.
    The [Document][google.cloud.discoveryengine.v1beta.Document] resource full name, of the form: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
    The promotion IDs associated with this Document.
    Quantity of the Document associated with the user event.
    The [Document][google.cloud.discoveryengine.v1beta.Document] URI - only allowed for website data stores.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
     
    The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID.
    com.google.protobuf.ByteString
    The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID.
    boolean
    Output only.
    The [Document][google.cloud.discoveryengine.v1beta.Document] resource full name, of the form: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
    com.google.protobuf.ByteString
    The [Document][google.cloud.discoveryengine.v1beta.Document] resource full name, of the form: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
    getPromotionIds(int index)
    The promotion IDs associated with this Document.
    com.google.protobuf.ByteString
    The promotion IDs associated with this Document.
    int
    The promotion IDs associated with this Document.
    com.google.protobuf.ProtocolStringList
    The promotion IDs associated with this Document.
    int
    Quantity of the Document associated with the user event.
    The [Document][google.cloud.discoveryengine.v1beta.Document] URI - only allowed for website data stores.
    com.google.protobuf.ByteString
    The [Document][google.cloud.discoveryengine.v1beta.Document] URI - only allowed for website data stores.
    boolean
    The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID.
    boolean
    The [Document][google.cloud.discoveryengine.v1beta.Document] resource full name, of the form: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
    boolean
    Quantity of the Document associated with the user event.
    boolean
    The [Document][google.cloud.discoveryengine.v1beta.Document] URI - only allowed for website data stores.
    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)
     
    setId(String value)
    The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID.
    setIdBytes(com.google.protobuf.ByteString value)
    The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID.
    setJoined(boolean value)
    Output only.
    setName(String value)
    The [Document][google.cloud.discoveryengine.v1beta.Document] resource full name, of the form: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
    setNameBytes(com.google.protobuf.ByteString value)
    The [Document][google.cloud.discoveryengine.v1beta.Document] resource full name, of the form: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
    setPromotionIds(int index, String value)
    The promotion IDs associated with this Document.
    setQuantity(int value)
    Quantity of the Document associated with the user event.
    setUri(String value)
    The [Document][google.cloud.discoveryengine.v1beta.Document] URI - only allowed for website data stores.
    setUriBytes(com.google.protobuf.ByteString value)
    The [Document][google.cloud.discoveryengine.v1beta.Document] URI - only allowed for website data stores.

    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<DocumentInfo.Builder>
    • clear

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

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

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

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

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

      public DocumentInfo.Builder mergeFrom(DocumentInfo other)
    • isInitialized

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

      public DocumentInfo.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<DocumentInfo.Builder>
      Throws:
      IOException
    • getDocumentDescriptorCase

      public DocumentInfo.DocumentDescriptorCase getDocumentDescriptorCase()
      Specified by:
      getDocumentDescriptorCase in interface DocumentInfoOrBuilder
    • clearDocumentDescriptor

      public DocumentInfo.Builder clearDocumentDescriptor()
    • hasId

      public boolean hasId()
       The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID.
       
      string id = 1;
      Specified by:
      hasId in interface DocumentInfoOrBuilder
      Returns:
      Whether the id field is set.
    • getId

      public String getId()
       The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID.
       
      string id = 1;
      Specified by:
      getId in interface DocumentInfoOrBuilder
      Returns:
      The id.
    • getIdBytes

      public com.google.protobuf.ByteString getIdBytes()
       The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID.
       
      string id = 1;
      Specified by:
      getIdBytes in interface DocumentInfoOrBuilder
      Returns:
      The bytes for id.
    • setId

      public DocumentInfo.Builder setId(String value)
       The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID.
       
      string id = 1;
      Parameters:
      value - The id to set.
      Returns:
      This builder for chaining.
    • clearId

      public DocumentInfo.Builder clearId()
       The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID.
       
      string id = 1;
      Returns:
      This builder for chaining.
    • setIdBytes

      public DocumentInfo.Builder setIdBytes(com.google.protobuf.ByteString value)
       The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID.
       
      string id = 1;
      Parameters:
      value - The bytes for id to set.
      Returns:
      This builder for chaining.
    • hasName

      public boolean hasName()
       The [Document][google.cloud.discoveryengine.v1beta.Document] resource
       full name, of the form:
       `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
       
      string name = 2 [(.google.api.resource_reference) = { ... }
      Specified by:
      hasName in interface DocumentInfoOrBuilder
      Returns:
      Whether the name field is set.
    • getName

      public String getName()
       The [Document][google.cloud.discoveryengine.v1beta.Document] resource
       full name, of the form:
       `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
       
      string name = 2 [(.google.api.resource_reference) = { ... }
      Specified by:
      getName in interface DocumentInfoOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The [Document][google.cloud.discoveryengine.v1beta.Document] resource
       full name, of the form:
       `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
       
      string name = 2 [(.google.api.resource_reference) = { ... }
      Specified by:
      getNameBytes in interface DocumentInfoOrBuilder
      Returns:
      The bytes for name.
    • setName

      public DocumentInfo.Builder setName(String value)
       The [Document][google.cloud.discoveryengine.v1beta.Document] resource
       full name, of the form:
       `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
       
      string name = 2 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public DocumentInfo.Builder clearName()
       The [Document][google.cloud.discoveryengine.v1beta.Document] resource
       full name, of the form:
       `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
       
      string name = 2 [(.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setNameBytes

      public DocumentInfo.Builder setNameBytes(com.google.protobuf.ByteString value)
       The [Document][google.cloud.discoveryengine.v1beta.Document] resource
       full name, of the form:
       `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
       
      string name = 2 [(.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasUri

      public boolean hasUri()
       The [Document][google.cloud.discoveryengine.v1beta.Document] URI - only
       allowed for website data stores.
       
      string uri = 6;
      Specified by:
      hasUri in interface DocumentInfoOrBuilder
      Returns:
      Whether the uri field is set.
    • getUri

      public String getUri()
       The [Document][google.cloud.discoveryengine.v1beta.Document] URI - only
       allowed for website data stores.
       
      string uri = 6;
      Specified by:
      getUri in interface DocumentInfoOrBuilder
      Returns:
      The uri.
    • getUriBytes

      public com.google.protobuf.ByteString getUriBytes()
       The [Document][google.cloud.discoveryengine.v1beta.Document] URI - only
       allowed for website data stores.
       
      string uri = 6;
      Specified by:
      getUriBytes in interface DocumentInfoOrBuilder
      Returns:
      The bytes for uri.
    • setUri

      public DocumentInfo.Builder setUri(String value)
       The [Document][google.cloud.discoveryengine.v1beta.Document] URI - only
       allowed for website data stores.
       
      string uri = 6;
      Parameters:
      value - The uri to set.
      Returns:
      This builder for chaining.
    • clearUri

      public DocumentInfo.Builder clearUri()
       The [Document][google.cloud.discoveryengine.v1beta.Document] URI - only
       allowed for website data stores.
       
      string uri = 6;
      Returns:
      This builder for chaining.
    • setUriBytes

      public DocumentInfo.Builder setUriBytes(com.google.protobuf.ByteString value)
       The [Document][google.cloud.discoveryengine.v1beta.Document] URI - only
       allowed for website data stores.
       
      string uri = 6;
      Parameters:
      value - The bytes for uri to set.
      Returns:
      This builder for chaining.
    • hasQuantity

      public boolean hasQuantity()
       Quantity of the Document associated with the user event. Defaults to 1.
      
       For example, this field is 2 if two quantities of the same Document
       are involved in a `add-to-cart` event.
      
       Required for events of the following event types:
      
       * `add-to-cart`
       * `purchase`
       
      optional int32 quantity = 3;
      Specified by:
      hasQuantity in interface DocumentInfoOrBuilder
      Returns:
      Whether the quantity field is set.
    • getQuantity

      public int getQuantity()
       Quantity of the Document associated with the user event. Defaults to 1.
      
       For example, this field is 2 if two quantities of the same Document
       are involved in a `add-to-cart` event.
      
       Required for events of the following event types:
      
       * `add-to-cart`
       * `purchase`
       
      optional int32 quantity = 3;
      Specified by:
      getQuantity in interface DocumentInfoOrBuilder
      Returns:
      The quantity.
    • setQuantity

      public DocumentInfo.Builder setQuantity(int value)
       Quantity of the Document associated with the user event. Defaults to 1.
      
       For example, this field is 2 if two quantities of the same Document
       are involved in a `add-to-cart` event.
      
       Required for events of the following event types:
      
       * `add-to-cart`
       * `purchase`
       
      optional int32 quantity = 3;
      Parameters:
      value - The quantity to set.
      Returns:
      This builder for chaining.
    • clearQuantity

      public DocumentInfo.Builder clearQuantity()
       Quantity of the Document associated with the user event. Defaults to 1.
      
       For example, this field is 2 if two quantities of the same Document
       are involved in a `add-to-cart` event.
      
       Required for events of the following event types:
      
       * `add-to-cart`
       * `purchase`
       
      optional int32 quantity = 3;
      Returns:
      This builder for chaining.
    • getPromotionIdsList

      public com.google.protobuf.ProtocolStringList getPromotionIdsList()
       The promotion IDs associated with this Document.
       Currently, this field is restricted to at most one ID.
       
      repeated string promotion_ids = 4;
      Specified by:
      getPromotionIdsList in interface DocumentInfoOrBuilder
      Returns:
      A list containing the promotionIds.
    • getPromotionIdsCount

      public int getPromotionIdsCount()
       The promotion IDs associated with this Document.
       Currently, this field is restricted to at most one ID.
       
      repeated string promotion_ids = 4;
      Specified by:
      getPromotionIdsCount in interface DocumentInfoOrBuilder
      Returns:
      The count of promotionIds.
    • getPromotionIds

      public String getPromotionIds(int index)
       The promotion IDs associated with this Document.
       Currently, this field is restricted to at most one ID.
       
      repeated string promotion_ids = 4;
      Specified by:
      getPromotionIds in interface DocumentInfoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The promotionIds at the given index.
    • getPromotionIdsBytes

      public com.google.protobuf.ByteString getPromotionIdsBytes(int index)
       The promotion IDs associated with this Document.
       Currently, this field is restricted to at most one ID.
       
      repeated string promotion_ids = 4;
      Specified by:
      getPromotionIdsBytes in interface DocumentInfoOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the promotionIds at the given index.
    • setPromotionIds

      public DocumentInfo.Builder setPromotionIds(int index, String value)
       The promotion IDs associated with this Document.
       Currently, this field is restricted to at most one ID.
       
      repeated string promotion_ids = 4;
      Parameters:
      index - The index to set the value at.
      value - The promotionIds to set.
      Returns:
      This builder for chaining.
    • addPromotionIds

      public DocumentInfo.Builder addPromotionIds(String value)
       The promotion IDs associated with this Document.
       Currently, this field is restricted to at most one ID.
       
      repeated string promotion_ids = 4;
      Parameters:
      value - The promotionIds to add.
      Returns:
      This builder for chaining.
    • addAllPromotionIds

      public DocumentInfo.Builder addAllPromotionIds(Iterable<String> values)
       The promotion IDs associated with this Document.
       Currently, this field is restricted to at most one ID.
       
      repeated string promotion_ids = 4;
      Parameters:
      values - The promotionIds to add.
      Returns:
      This builder for chaining.
    • clearPromotionIds

      public DocumentInfo.Builder clearPromotionIds()
       The promotion IDs associated with this Document.
       Currently, this field is restricted to at most one ID.
       
      repeated string promotion_ids = 4;
      Returns:
      This builder for chaining.
    • addPromotionIdsBytes

      public DocumentInfo.Builder addPromotionIdsBytes(com.google.protobuf.ByteString value)
       The promotion IDs associated with this Document.
       Currently, this field is restricted to at most one ID.
       
      repeated string promotion_ids = 4;
      Parameters:
      value - The bytes of the promotionIds to add.
      Returns:
      This builder for chaining.
    • getJoined

      public boolean getJoined()
       Output only. Whether the referenced Document can be found in the data
       store.
       
      bool joined = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getJoined in interface DocumentInfoOrBuilder
      Returns:
      The joined.
    • setJoined

      public DocumentInfo.Builder setJoined(boolean value)
       Output only. Whether the referenced Document can be found in the data
       store.
       
      bool joined = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The joined to set.
      Returns:
      This builder for chaining.
    • clearJoined

      public DocumentInfo.Builder clearJoined()
       Output only. Whether the referenced Document can be found in the data
       store.
       
      bool joined = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.