Class DocumentInfo.Builder (0.7.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.v1beta.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()

Required. The Document resource ID.

string id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.

clearName()

public DocumentInfo.Builder clearName()

Required. The Document resource full name, of the form: projects/<project_id>/locations/<location>/dataStores/<data_store_id>/branches/<branch_id>/documents/<document_id>

string name = 2 [(.google.api.field_behavior) = REQUIRED, (.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.

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()

Required. The Document resource ID.

string id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

Required. The Document resource ID.

string id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for id.

getName()

public String getName()

Required. The Document resource full name, of the form: projects/<project_id>/locations/<location>/dataStores/<data_store_id>/branches/<branch_id>/documents/<document_id>

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

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The Document resource full name, of the form: projects/<project_id>/locations/<location>/dataStores/<data_store_id>/branches/<branch_id>/documents/<document_id>

string name = 2 [(.google.api.field_behavior) = REQUIRED, (.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.

hasId()

public boolean hasId()

Required. The Document resource ID.

string id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the id field is set.

hasName()

public boolean hasName()

Required. The Document resource full name, of the form: projects/<project_id>/locations/<location>/dataStores/<data_store_id>/branches/<branch_id>/documents/<document_id>

string name = 2 [(.google.api.field_behavior) = REQUIRED, (.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.

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)

Required. The Document resource ID.

string id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The id to set.

Returns
TypeDescription
DocumentInfo.Builder

This builder for chaining.

setIdBytes(ByteString value)

public DocumentInfo.Builder setIdBytes(ByteString value)

Required. The Document resource ID.

string id = 1 [(.google.api.field_behavior) = REQUIRED];

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)

Required. The Document resource full name, of the form: projects/<project_id>/locations/<location>/dataStores/<data_store_id>/branches/<branch_id>/documents/<document_id>

string name = 2 [(.google.api.field_behavior) = REQUIRED, (.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)

Required. The Document resource full name, of the form: projects/<project_id>/locations/<location>/dataStores/<data_store_id>/branches/<branch_id>/documents/<document_id>

string name = 2 [(.google.api.field_behavior) = REQUIRED, (.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