Class DocumentInfo.Builder (0.32.0)

public static final class DocumentInfo.Builder extends GeneratedMessageV3.Builder<DocumentInfo.Builder> implements DocumentInfoOrBuilder

Detailed document information associated with a user event.

Protobuf type google.cloud.discoveryengine.v1.DocumentInfo

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllPromotionIds(Iterable<String> values)

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;

Parameter
NameDescription
valuesIterable<String>

The promotionIds to add.

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.

addPromotionIds(String value)

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;

Parameter
NameDescription
valueString

The promotionIds to add.

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.

addPromotionIdsBytes(ByteString value)

public DocumentInfo.Builder addPromotionIdsBytes(ByteString value)

The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID.

repeated string promotion_ids = 4;

Parameter
NameDescription
valueByteString

The bytes of the promotionIds to add.

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DocumentInfo.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DocumentInfo.Builder
Overrides

build()

public DocumentInfo build()
Returns
TypeDescription
DocumentInfo

buildPartial()

public DocumentInfo buildPartial()
Returns
TypeDescription
DocumentInfo

clear()

public DocumentInfo.Builder clear()
Returns
TypeDescription
DocumentInfo.Builder
Overrides

clearDocumentDescriptor()

public DocumentInfo.Builder clearDocumentDescriptor()
Returns
TypeDescription
DocumentInfo.Builder

clearField(Descriptors.FieldDescriptor field)

public DocumentInfo.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
DocumentInfo.Builder
Overrides

clearId()

public DocumentInfo.Builder clearId()

The Document resource ID.

string id = 1;

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.

clearName()

public DocumentInfo.Builder clearName()

The Document resource full name, of the form: projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}

string name = 2 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public DocumentInfo.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
DocumentInfo.Builder
Overrides

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
TypeDescription
DocumentInfo.Builder

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 will be 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
TypeDescription
DocumentInfo.Builder

This builder for chaining.

clearUri()

public DocumentInfo.Builder clearUri()

The Document URI - only allowed for website data stores.

string uri = 6;

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.

clone()

public DocumentInfo.Builder clone()
Returns
TypeDescription
DocumentInfo.Builder
Overrides

getDefaultInstanceForType()

public DocumentInfo getDefaultInstanceForType()
Returns
TypeDescription
DocumentInfo

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDocumentDescriptorCase()

public DocumentInfo.DocumentDescriptorCase getDocumentDescriptorCase()
Returns
TypeDescription
DocumentInfo.DocumentDescriptorCase

getId()

public String getId()

The Document resource ID.

string id = 1;

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

The Document resource ID.

string id = 1;

Returns
TypeDescription
ByteString

The bytes for id.

getName()

public String getName()

The Document resource full name, of the form: projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}

string name = 2 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The Document resource full name, of the form: projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}

string name = 2 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for name.

getPromotionIds(int index)

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;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The promotionIds at the given index.

getPromotionIdsBytes(int index)

public 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;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the promotionIds at the given index.

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;

Returns
TypeDescription
int

The count of promotionIds.

getPromotionIdsList()

public ProtocolStringList getPromotionIdsList()

The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID.

repeated string promotion_ids = 4;

Returns
TypeDescription
ProtocolStringList

A list containing the promotionIds.

getQuantity()

public int getQuantity()

Quantity of the Document associated with the user event. Defaults to 1.

For example, this field will be 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
TypeDescription
int

The quantity.

getUri()

public String getUri()

The Document URI - only allowed for website data stores.

string uri = 6;

Returns
TypeDescription
String

The uri.

getUriBytes()

public ByteString getUriBytes()

The Document URI - only allowed for website data stores.

string uri = 6;

Returns
TypeDescription
ByteString

The bytes for uri.

hasId()

public boolean hasId()

The Document resource ID.

string id = 1;

Returns
TypeDescription
boolean

Whether the id field is set.

hasName()

public boolean hasName()

The Document resource full name, of the form: projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}

string name = 2 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
boolean

Whether the name field is set.

hasQuantity()

public boolean hasQuantity()

Quantity of the Document associated with the user event. Defaults to 1.

For example, this field will be 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
TypeDescription
boolean

Whether the quantity field is set.

hasUri()

public boolean hasUri()

The Document URI - only allowed for website data stores.

string uri = 6;

Returns
TypeDescription
boolean

Whether the uri field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(DocumentInfo other)

public DocumentInfo.Builder mergeFrom(DocumentInfo other)
Parameter
NameDescription
otherDocumentInfo
Returns
TypeDescription
DocumentInfo.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DocumentInfo.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DocumentInfo.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public DocumentInfo.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
DocumentInfo.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DocumentInfo.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DocumentInfo.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public DocumentInfo.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
DocumentInfo.Builder
Overrides

setId(String value)

public DocumentInfo.Builder setId(String value)

The Document resource ID.

string id = 1;

Parameter
NameDescription
valueString

The id to set.

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.

setIdBytes(ByteString value)

public DocumentInfo.Builder setIdBytes(ByteString value)

The Document resource ID.

string id = 1;

Parameter
NameDescription
valueByteString

The bytes for id to set.

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.

setName(String value)

public DocumentInfo.Builder setName(String value)

The Document resource full name, of the form: projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}

string name = 2 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.

setNameBytes(ByteString value)

public DocumentInfo.Builder setNameBytes(ByteString value)

The Document resource full name, of the form: projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}

string name = 2 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.

setPromotionIds(int index, String value)

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
NameDescription
indexint

The index to set the value at.

valueString

The promotionIds to set.

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.

setQuantity(int value)

public DocumentInfo.Builder setQuantity(int value)

Quantity of the Document associated with the user event. Defaults to 1.

For example, this field will be 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;

Parameter
NameDescription
valueint

The quantity to set.

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public DocumentInfo.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
DocumentInfo.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final DocumentInfo.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DocumentInfo.Builder
Overrides

setUri(String value)

public DocumentInfo.Builder setUri(String value)

The Document URI - only allowed for website data stores.

string uri = 6;

Parameter
NameDescription
valueString

The uri to set.

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.

setUriBytes(ByteString value)

public DocumentInfo.Builder setUriBytes(ByteString value)

The Document URI - only allowed for website data stores.

string uri = 6;

Parameter
NameDescription
valueByteString

The bytes for uri to set.

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.