Reference documentation and code samples for the Google Cloud Functions V2 Client class EventFilter.
Filters events based on exact matches on the CloudEvents attributes.
Generated from protobuf messagegoogle.cloud.functions.v2.EventFilter
Namespace
Google \ Cloud \ Functions \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ attribute
string
Required. The name of a CloudEvents attribute.
↳ value
string
Required. The value for the attribute.
↳ operator
string
Optional. The operator used for matching the events with the value of the filter. If not specified, only events that have an exact key-value pair specified in the filter are matched. The only allowed value ismatch-path-pattern.
getAttribute
Required. The name of a CloudEvents attribute.
Returns
Type
Description
string
setAttribute
Required. The name of a CloudEvents attribute.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getValue
Required. The value for the attribute.
Returns
Type
Description
string
setValue
Required. The value for the attribute.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getOperator
Optional. The operator used for matching the events with the value of the
filter. If not specified, only events that have an exact key-value pair
specified in the filter are matched. The only allowed value ismatch-path-pattern.
Returns
Type
Description
string
setOperator
Optional. The operator used for matching the events with the value of the
filter. If not specified, only events that have an exact key-value pair
specified in the filter are matched. The only allowed value ismatch-path-pattern.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Functions V2 Client - Class EventFilter (2.0.6)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.6 (latest)](/php/docs/reference/cloud-functions/latest/V2.EventFilter)\n- [2.0.5](/php/docs/reference/cloud-functions/2.0.5/V2.EventFilter)\n- [1.7.0](/php/docs/reference/cloud-functions/1.7.0/V2.EventFilter)\n- [1.6.5](/php/docs/reference/cloud-functions/1.6.5/V2.EventFilter)\n- [1.5.0](/php/docs/reference/cloud-functions/1.5.0/V2.EventFilter)\n- [1.4.2](/php/docs/reference/cloud-functions/1.4.2/V2.EventFilter)\n- [1.3.1](/php/docs/reference/cloud-functions/1.3.1/V2.EventFilter)\n- [1.2.0](/php/docs/reference/cloud-functions/1.2.0/V2.EventFilter)\n- [1.1.2](/php/docs/reference/cloud-functions/1.1.2/V2.EventFilter)\n- [1.0.3](/php/docs/reference/cloud-functions/1.0.3/V2.EventFilter) \nReference documentation and code samples for the Google Cloud Functions V2 Client class EventFilter.\n\nFilters events based on exact matches on the CloudEvents attributes.\n\nGenerated from protobuf message `google.cloud.functions.v2.EventFilter`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Functions \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getAttribute\n\nRequired. The name of a CloudEvents attribute.\n\n### setAttribute\n\nRequired. The name of a CloudEvents attribute.\n\n### getValue\n\nRequired. The value for the attribute.\n\n### setValue\n\nRequired. The value for the attribute.\n\n### getOperator\n\nOptional. The operator used for matching the events with the value of the\nfilter. If not specified, only events that have an exact key-value pair\nspecified in the filter are matched. The only allowed value is\n`match-path-pattern`.\n\n### setOperator\n\nOptional. The operator used for matching the events with the value of the\nfilter. If not specified, only events that have an exact key-value pair\nspecified in the filter are matched. The only allowed value is\n`match-path-pattern`."]]