# BigQuery Data Policy Service V1 API - Class Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest (v1.4.0)

1.4.0 (latest) 1.3.0 1.2.1 1.1.0 1.0.1 0.10.0 0.9.0 0.8.1 0.7.2 0.6.0 0.5.0 0.4.0 0.3.1 0.2.0 0.1.0 Reference documentation and code samples for the BigQuery Data Policy Service V1 API class Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.

Request message for the CreateDataPolicy method.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #data_policy

    def data_policy() -> ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy

**Returns**

- ([::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/latest/Google-Cloud-Bigquery-DataPolicies-V1-DataPolicy)) --- Required. The data policy to create. The `name` field does not need to be provided for the data policy creation.

### #data_policy=

    def data_policy=(value) -> ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy

**Parameter**

- **value** ([::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/latest/Google-Cloud-Bigquery-DataPolicies-V1-DataPolicy)) --- Required. The data policy to create. The `name` field does not need to be provided for the data policy creation.
**Returns**

- ([::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/latest/Google-Cloud-Bigquery-DataPolicies-V1-DataPolicy)) --- Required. The data policy to create. The `name` field does not need to be provided for the data policy creation.

### #parent

    def parent() -> ::String

**Returns**

- (::String) --- Required. Resource name of the project that the data policy will belong to. The format is `projects/{project_number}/locations/{location_id}`.

### #parent=

    def parent=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. Resource name of the project that the data policy will belong to. The format is `projects/{project_number}/locations/{location_id}`.
**Returns**

- (::String) --- Required. Resource name of the project that the data policy will belong to. The format is `projects/{project_number}/locations/{location_id}`.