[[["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 BigQuery Data Policies V1 Client - Class DataPolicy (1.0.5)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.5 (latest)](/php/docs/reference/cloud-bigquery-datapolicies/latest/V1.DataPolicy)\n- [1.0.4](/php/docs/reference/cloud-bigquery-datapolicies/1.0.4/V1.DataPolicy)\n- [0.5.5](/php/docs/reference/cloud-bigquery-datapolicies/0.5.5/V1.DataPolicy)\n- [0.4.1](/php/docs/reference/cloud-bigquery-datapolicies/0.4.1/V1.DataPolicy)\n- [0.3.3](/php/docs/reference/cloud-bigquery-datapolicies/0.3.3/V1.DataPolicy)\n- [0.2.4](/php/docs/reference/cloud-bigquery-datapolicies/0.2.4/V1.DataPolicy)\n- [0.1.1](/php/docs/reference/cloud-bigquery-datapolicies/0.1.1/V1.DataPolicy) \nReference documentation and code samples for the Google Cloud BigQuery Data Policies V1 Client class DataPolicy.\n\nRepresents the label-policy binding.\n\nGenerated from protobuf message `google.cloud.bigquery.datapolicies.v1.DataPolicy`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ BigQuery \\\\ DataPolicies \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getPolicyTag\n\nPolicy tag resource name, in the format of\n`projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`.\n\n### hasPolicyTag\n\n### setPolicyTag\n\nPolicy tag resource name, in the format of\n`projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`.\n\n### getDataMaskingPolicy\n\nThe data masking policy that specifies the data masking rule to use.\n\n### hasDataMaskingPolicy\n\n### setDataMaskingPolicy\n\nThe data masking policy that specifies the data masking rule to use.\n\n### getName\n\nOutput only. Resource name of this data policy, in the format of\n`projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`.\n\n### setName\n\nOutput only. Resource name of this data policy, in the format of\n`projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`.\n\n### getDataPolicyType\n\nType of data policy.\n\n### setDataPolicyType\n\nType of data policy.\n\n### getDataPolicyId\n\nUser-assigned (human readable) ID of the data policy that needs to be\nunique within a project. Used as {data_policy_id} in part of the resource\nname.\n\n### setDataPolicyId\n\nUser-assigned (human readable) ID of the data policy that needs to be\nunique within a project. Used as {data_policy_id} in part of the resource\nname.\n\n### getMatchingLabel\n\n### getPolicy"]]