[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eDataPolicy\u003c/code\u003e class in the BigQuery Data Policy v1beta1 API represents a label-policy binding, managing data access and masking rules.\u003c/p\u003e\n"],["\u003cp\u003eIt is the core class for managing data policies within Google's BigQuery service, and it implements multiple interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDataPolicy\u003c/code\u003e can be instantiated with a default constructor or by copying the values of another \u003ccode\u003eDataPolicy\u003c/code\u003e object, enabling flexible initialization.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of a \u003ccode\u003eDataPolicy\u003c/code\u003e include \u003ccode\u003eDataMaskingPolicy\u003c/code\u003e, \u003ccode\u003eDataPolicyId\u003c/code\u003e, \u003ccode\u003eDataPolicyType\u003c/code\u003e, and \u003ccode\u003eName\u003c/code\u003e, which define how data is masked, its unique identifier, policy type, and the resource name respectively.\u003c/p\u003e\n"],["\u003cp\u003eIt offers properties such as \u003ccode\u003ePolicyTag\u003c/code\u003e and \u003ccode\u003eDataPolicyName\u003c/code\u003e to configure label based data masking and to create a strongly typed resource name property.\u003c/p\u003e\n"]]],[],null,["# BigQuery Data Policy v1beta1 API - Class DataPolicy (1.0.0-beta04)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta04 (latest)](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1Beta1/latest/Google.Cloud.BigQuery.DataPolicies.V1Beta1.DataPolicy)\n- [1.0.0-beta03](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1Beta1/1.0.0-beta03/Google.Cloud.BigQuery.DataPolicies.V1Beta1.DataPolicy) \n\n public sealed class DataPolicy : IMessage\u003cDataPolicy\u003e, IEquatable\u003cDataPolicy\u003e, IDeepCloneable\u003cDataPolicy\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the BigQuery Data Policy v1beta1 API class DataPolicy.\n\nRepresents the label-policy binding. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e DataPolicy \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[DataPolicy](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1Beta1/latest/Google.Cloud.BigQuery.DataPolicies.V1Beta1.DataPolicy), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[DataPolicy](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1Beta1/latest/Google.Cloud.BigQuery.DataPolicies.V1Beta1.DataPolicy), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[DataPolicy](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1Beta1/latest/Google.Cloud.BigQuery.DataPolicies.V1Beta1.DataPolicy), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.BigQuery.DataPolicies.V1Beta1](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1Beta1/latest/Google.Cloud.BigQuery.DataPolicies.V1Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.BigQuery.DataPolicies.V1Beta1.dll\n\nConstructors\n------------\n\n### DataPolicy()\n\n public DataPolicy()\n\n### DataPolicy(DataPolicy)\n\n public DataPolicy(DataPolicy other)\n\nProperties\n----------\n\n### DataMaskingPolicy\n\n public DataMaskingPolicy DataMaskingPolicy { get; set; }\n\nThe data masking policy that specifies the data masking rule to use.\n\n### DataPolicyId\n\n public string DataPolicyId { get; set; }\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### DataPolicyName\n\n public DataPolicyName DataPolicyName { get; set; }\n\n[DataPolicyName](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1Beta1/latest/Google.Cloud.BigQuery.DataPolicies.V1Beta1.DataPolicyName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.BigQuery.DataPolicies.V1Beta1/latest/Google.Cloud.BigQuery.DataPolicies.V1Beta1.DataPolicy#Google_Cloud_BigQuery_DataPolicies_V1Beta1_DataPolicy_Name) resource name property.\n\n### DataPolicyType\n\n public DataPolicy.Types.DataPolicyType DataPolicyType { get; set; }\n\nType of data policy.\n\n### HasPolicyTag\n\n public bool HasPolicyTag { get; }\n\nGets whether the \"policy_tag\" field is set\n\n### MatchingLabelCase\n\n public DataPolicy.MatchingLabelOneofCase MatchingLabelCase { get; }\n\n### Name\n\n public string Name { get; set; }\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### PolicyCase\n\n public DataPolicy.PolicyOneofCase PolicyCase { get; }\n\n### PolicyTag\n\n public string PolicyTag { get; set; }\n\nPolicy tag resource name, in the format of\n`projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`."]]