Reference documentation and code samples for the Data Loss Prevention V2 Client class PathElement.
A (kind, ID/name) pair used to construct a key path.
If either name or ID is set, the element is complete.
If neither is set, the element is incomplete.
Generated from protobuf messagegoogle.privacy.dlp.v2.Key.PathElement
Namespace
Google \ Cloud \ Dlp \ V2 \ Key
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ kind
string
The kind of the entity. A kind matching regex__.*__is reserved/read-only. A kind must not contain more than 1500 bytes when UTF-8 encoded. Cannot be"".
↳ id
int|string
The auto-allocated ID of the entity. Never equal to zero. Values less than zero are discouraged and may not be supported in the future.
↳ name
string
The name of the entity. A name matching regex__.*__is reserved/read-only. A name must not be more than 1500 bytes when UTF-8 encoded. Cannot be"".
getKind
The kind of the entity.
A kind matching regex__.*__is reserved/read-only.
A kind must not contain more than 1500 bytes when UTF-8 encoded.
Cannot be"".
Returns
Type
Description
string
setKind
The kind of the entity.
A kind matching regex__.*__is reserved/read-only.
A kind must not contain more than 1500 bytes when UTF-8 encoded.
Cannot be"".
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getId
The auto-allocated ID of the entity.
Never equal to zero. Values less than zero are discouraged and may not
be supported in the future.
Returns
Type
Description
int|string
hasId
setId
The auto-allocated ID of the entity.
Never equal to zero. Values less than zero are discouraged and may not
be supported in the future.
Parameter
Name
Description
var
int|string
Returns
Type
Description
$this
getName
The name of the entity.
A name matching regex__.*__is reserved/read-only.
A name must not be more than 1500 bytes when UTF-8 encoded.
Cannot be"".
Returns
Type
Description
string
hasName
setName
The name of the entity.
A name matching regex__.*__is reserved/read-only.
A name must not be more than 1500 bytes when UTF-8 encoded.
Cannot be"".
[[["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,["# Data Loss Prevention V2 Client - Class PathElement (2.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.6.1 (latest)](/php/docs/reference/cloud-dlp/latest/V2.Key.PathElement)\n- [2.6.0](/php/docs/reference/cloud-dlp/2.6.0/V2.Key.PathElement)\n- [2.4.1](/php/docs/reference/cloud-dlp/2.4.1/V2.Key.PathElement)\n- [2.3.0](/php/docs/reference/cloud-dlp/2.3.0/V2.Key.PathElement)\n- [2.2.3](/php/docs/reference/cloud-dlp/2.2.3/V2.Key.PathElement)\n- [2.1.0](/php/docs/reference/cloud-dlp/2.1.0/V2.Key.PathElement)\n- [2.0.0](/php/docs/reference/cloud-dlp/2.0.0/V2.Key.PathElement)\n- [1.19.0](/php/docs/reference/cloud-dlp/1.19.0/V2.Key.PathElement)\n- [1.18.0](/php/docs/reference/cloud-dlp/1.18.0/V2.Key.PathElement)\n- [1.17.0](/php/docs/reference/cloud-dlp/1.17.0/V2.Key.PathElement)\n- [1.16.0](/php/docs/reference/cloud-dlp/1.16.0/V2.Key.PathElement)\n- [1.15.1](/php/docs/reference/cloud-dlp/1.15.1/V2.Key.PathElement)\n- [1.14.0](/php/docs/reference/cloud-dlp/1.14.0/V2.Key.PathElement)\n- [1.13.2](/php/docs/reference/cloud-dlp/1.13.2/V2.Key.PathElement)\n- [1.12.0](/php/docs/reference/cloud-dlp/1.12.0/V2.Key.PathElement)\n- [1.11.0](/php/docs/reference/cloud-dlp/1.11.0/V2.Key.PathElement)\n- [1.10.2](/php/docs/reference/cloud-dlp/1.10.2/V2.Key.PathElement)\n- [1.9.0](/php/docs/reference/cloud-dlp/1.9.0/V2.Key.PathElement)\n- [1.8.6](/php/docs/reference/cloud-dlp/1.8.6/V2.Key.PathElement) \nReference documentation and code samples for the Data Loss Prevention V2 Client class PathElement.\n\nA (kind, ID/name) pair used to construct a key path.\n\nIf either name or ID is set, the element is complete.\nIf neither is set, the element is incomplete.\n\nGenerated from protobuf message `google.privacy.dlp.v2.Key.PathElement`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dlp \\\\ V2 \\\\ Key\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getKind\n\nThe kind of the entity.\n\nA kind matching regex `__.*__` is reserved/read-only.\nA kind must not contain more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.\n\n### setKind\n\nThe kind of the entity.\n\nA kind matching regex `__.*__` is reserved/read-only.\nA kind must not contain more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.\n\n### getId\n\nThe auto-allocated ID of the entity.\n\nNever equal to zero. Values less than zero are discouraged and may not\nbe supported in the future.\n\n### hasId\n\n### setId\n\nThe auto-allocated ID of the entity.\n\nNever equal to zero. Values less than zero are discouraged and may not\nbe supported in the future.\n\n### getName\n\nThe name of the entity.\n\nA name matching regex `__.*__` is reserved/read-only.\nA name must not be more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.\n\n### hasName\n\n### setName\n\nThe name of the entity.\n\nA name matching regex `__.*__` is reserved/read-only.\nA name must not be more than 1500 bytes when UTF-8 encoded.\nCannot be `\"\"`.\n\n### getIdType"]]