Google Cloud Discovery Engine V1 Client - Class NumberConstraint (1.11.0)

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

Constraint expression of a number field. Example: price < 100.

Generated from protobuf message google.cloud.discoveryengine.v1.SearchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.NumberConstraint

Namespace

Google \ Cloud \ DiscoveryEngine \ V1 \ SearchResponse \ NaturalLanguageQueryUnderstandingInfo \ StructuredExtractedFilter

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ field_name string

Name of the numerical field as defined in the schema.

↳ comparison int

The comparison operation performed between the field value and the value specified in the constraint.

↳ value float

The value specified in the numerical constraint.

↳ query_segment string

Identifies the keywords within the search query that match a filter.

getFieldName

Name of the numerical field as defined in the schema.

Returns
Type Description
string

setFieldName

Name of the numerical field as defined in the schema.

Parameter
Name Description
var string
Returns
Type Description
$this

getComparison

The comparison operation performed between the field value and the value specified in the constraint.

Returns
Type Description
int Enum of type Comparison.

setComparison

The comparison operation performed between the field value and the value specified in the constraint.

Parameter
Name Description
var int

Enum of type Comparison.

Returns
Type Description
$this

getValue

The value specified in the numerical constraint.

Returns
Type Description
float

setValue

The value specified in the numerical constraint.

Parameter
Name Description
var float
Returns
Type Description
$this

getQuerySegment

Identifies the keywords within the search query that match a filter.

Returns
Type Description
string

setQuerySegment

Identifies the keywords within the search query that match a filter.

Parameter
Name Description
var string
Returns
Type Description
$this