Google Cloud Discovery Engine V1 Client - Class DocumentInfo (1.5.1)

Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class DocumentInfo.

Detailed document information associated with a user event.

Generated from protobuf message google.cloud.discoveryengine.v1.DocumentInfo

Namespace

Google \ Cloud \ DiscoveryEngine \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ idstring

The Document resource ID.

↳ namestring

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

↳ uristring

The Document URI - only allowed for website data stores.

↳ quantityint

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

↳ promotion_idsarray

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

↳ joinedbool

Output only. Whether the referenced Document can be found in the data store.

↳ conversion_valuefloat

Optional. The conversion value associated with this Document. Must be set if UserEvent.event_type is "conversion". For example, a value of 1000 signifies that 1000 seconds were spent viewing a Document for the watch conversion type.

getId

The Document resource ID.

Returns
TypeDescription
string

hasId

setId

The Document resource ID.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getName

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

Returns
TypeDescription
string

hasName

setName

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

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getUri

The Document URI - only allowed for website data stores.

Returns
TypeDescription
string

hasUri

setUri

The Document URI - only allowed for website data stores.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

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
Returns
TypeDescription
int

hasQuantity

clearQuantity

setQuantity

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
Parameter
NameDescription
varint
Returns
TypeDescription
$this

getPromotionIds

The promotion IDs associated with this Document.

Currently, this field is restricted to at most one ID.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setPromotionIds

The promotion IDs associated with this Document.

Currently, this field is restricted to at most one ID.

Parameter
NameDescription
varstring[]
Returns
TypeDescription
$this

getJoined

Output only. Whether the referenced Document can be found in the data store.

Returns
TypeDescription
bool

setJoined

Output only. Whether the referenced Document can be found in the data store.

Parameter
NameDescription
varbool
Returns
TypeDescription
$this

getConversionValue

Optional. The conversion value associated with this Document.

Must be set if UserEvent.event_type is "conversion". For example, a value of 1000 signifies that 1000 seconds were spent viewing a Document for the watch conversion type.

Returns
TypeDescription
float

hasConversionValue

clearConversionValue

setConversionValue

Optional. The conversion value associated with this Document.

Must be set if UserEvent.event_type is "conversion". For example, a value of 1000 signifies that 1000 seconds were spent viewing a Document for the watch conversion type.

Parameter
NameDescription
varfloat
Returns
TypeDescription
$this

getDocumentDescriptor

Returns
TypeDescription
string