1.64.1 (latest) 1.64.0 1.63.1 1.62.0 1.61.1 1.60.0 1.59.0 1.58.0 1.57.0 1.56.0 1.55.0 1.54.0 1.53.0 1.52.1 1.51.1 1.50.0 1.49.1 1.48.1 1.47.0 1.46.1 1.45.0 1.44.2 1.43.1 1.42.0 1.41.0 1.40.0 1.39.0 1.38.1 Reference documentation and code samples for the BigQuery API class Google::Cloud::Bigquery::Dataset::Access.

## Dataset Access Control

Represents the access control rules for a [Google::Cloud::Bigquery::Dataset](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Dataset "Google::Cloud::Bigquery::Dataset (class)").

## Inherits

- Object

## Example

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_owner_group "owners@example.com"
  access.add_writer_user "writer@example.com"
  access.remove_writer_user "readers@example.com"
  access.add_reader_special :all_users
end
```

## Methods

### #add_owner_domain

    def add_owner_domain(domain, condition: nil)

Add owner access to a domain.
**Parameters**

- **domain** (String) --- A [Cloud Identity
  domain](https://cloud.google.com/iam/docs/overview#cloudid_name_domain).
- **condition** ([Google::Cloud::Bigquery::Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition), nil) *(defaults to: nil)* --- An optional condition for the access rule. A condition is a CEL expression that is evaluated to determine if the access rule should be applied. See [Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition "Google::Cloud::Bigquery::Condition (class)") for more information. To specify a condition, the `access_policy_version` on the dataset must be set to `3`. `nil` represents an absence of a condition. The default is `nil`.
**Examples**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_owner_domain "example.com"
end
```

With a condition:

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
condition = Google::Cloud::Bigquery::Condition.new(
  "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")",
  title: "Table foo only"
)

dataset.access do |access|
  access.add_owner_domain "example.com", condition: condition
end
```

### #add_owner_group

    def add_owner_group(email, condition: nil)

Add owner access to a group.
**Parameters**

- **email** (String) --- The email address for the entity.
- **condition** ([Google::Cloud::Bigquery::Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition), nil) *(defaults to: nil)* --- An optional condition for the access rule. A condition is a CEL expression that is evaluated to determine if the access rule should be applied. See [Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition "Google::Cloud::Bigquery::Condition (class)") for more information. To specify a condition, the `access_policy_version` on the dataset must be set to `3`. `nil` represents an absence of a condition. The default is `nil`.
**Examples**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_owner_group "entity@example.com"
end
```

With a condition:

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
condition = Google::Cloud::Bigquery::Condition.new(
  "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")",
  title: "Table foo only"
)

dataset.access do |access|
  access.add_owner_group "entity@example.com", condition: condition
end
```

### #add_owner_iam_member

    def add_owner_iam_member(identity, condition: nil)

Add owner access to some other type of member that appears in the IAM
Policy but isn't a user, group, domain, or special group.
**Parameters**

- **identity** (String) --- The identity reference.
- **condition** ([Google::Cloud::Bigquery::Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition), nil) *(defaults to: nil)* --- An optional condition for the access rule. A condition is a CEL expression that is evaluated to determine if the access rule should be applied. See [Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition "Google::Cloud::Bigquery::Condition (class)") for more information. To specify a condition, the `access_policy_version` on the dataset must be set to `3`. `nil` represents an absence of a condition. The default is `nil`.
**Examples**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_owner_iam_member "entity@example.com"
end
```

With a condition:

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
condition = Google::Cloud::Bigquery::Condition.new(
  "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")",
  title: "Table foo only"
)

dataset.access do |access|
  access.add_owner_iam_member "entity@example.com", condition: condition
end
```

### #add_owner_special

    def add_owner_special(group)

Add owner access to a special group.
**Parameter**

- **group** (String) --- Accepted values are `owners`, `writers`, `readers`, `all_authenticated_users`, and `all_users`.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_owner_special :all_users
end
```

### #add_owner_user

    def add_owner_user(email, condition: nil)

Add owner access to a user.
**Parameters**

- **email** (String) --- The email address for the entity.
- **condition** ([Google::Cloud::Bigquery::Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition), nil) *(defaults to: nil)* --- An optional condition for the access rule. A condition is a CEL expression that is evaluated to determine if the access rule should be applied. See [Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition "Google::Cloud::Bigquery::Condition (class)") for more information. To specify a condition, the `access_policy_version` on the dataset must be set to `3`. `nil` represents an absence of a condition. The default is `nil`.
**Examples**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_owner_user "entity@example.com"
end
```

With a condition:

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
condition = Google::Cloud::Bigquery::Condition.new(
  "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")",
  title: "Table foo only"
)

dataset.access do |access|
  access.add_owner_user "entity@example.com", condition: condition
end
```

### #add_reader_dataset

    def add_reader_dataset(dataset)

Add reader access to a dataset.
**Parameter**

- **dataset** (Google::Cloud::Bigquery::DatasetAccessEntry, Hash\<String,String\>) --- A DatasetAccessEntry or a Hash object. Required
**Examples**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
other_dataset = bigquery.dataset "my_other_dataset", skip_lookup: true

params = {
  dataset_id: other_dataset.dataset_id,
  project_id: other_dataset.project_id,
  target_types: ["VIEWS"]
}

dataset.access do |access|
  access.add_reader_dataset params
end
```

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
other_dataset = bigquery.dataset "my_other_dataset", skip_lookup: true

dataset.access do |access|
  access.add_reader_dataset other_dataset.access_entry(target_types: ["VIEWS"])
end
```

### #add_reader_domain

    def add_reader_domain(domain, condition: nil)

Add reader access to a domain.
**Parameters**

- **domain** (String) --- A [Cloud Identity
  domain](https://cloud.google.com/iam/docs/overview#cloudid_name_domain).
- **condition** ([Google::Cloud::Bigquery::Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition), nil) *(defaults to: nil)* --- An optional condition for the access rule. A condition is a CEL expression that is evaluated to determine if the access rule should be applied. See [Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition "Google::Cloud::Bigquery::Condition (class)") for more information. To specify a condition, the `access_policy_version` on the dataset must be set to `3`. `nil` represents an absence of a condition. The default is `nil`.
**Examples**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_reader_domain "example.com"
end
```

With a condition:

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
condition = Google::Cloud::Bigquery::Condition.new(
  "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")",
  title: "Table foo only"
)

dataset.access do |access|
  access.add_reader_domain "example.com", condition: condition
end
```

### #add_reader_group

    def add_reader_group(email, condition: nil)

Add reader access to a group.
**Parameters**

- **email** (String) --- The email address for the entity.
- **condition** ([Google::Cloud::Bigquery::Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition), nil) *(defaults to: nil)* --- An optional condition for the access rule. A condition is a CEL expression that is evaluated to determine if the access rule should be applied. See [Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition "Google::Cloud::Bigquery::Condition (class)") for more information. To specify a condition, the `access_policy_version` on the dataset must be set to `3`. `nil` represents an absence of a condition. The default is `nil`.
**Examples**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_reader_group "entity@example.com"
end
```

With a condition:

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
condition = Google::Cloud::Bigquery::Condition.new(
  "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")",
  title: "Table foo only"
)

dataset.access do |access|
  access.add_reader_group "entity@example.com", condition: condition
end
```

### #add_reader_iam_member

    def add_reader_iam_member(identity, condition: nil)

Add reader access to some other type of member that appears in the IAM
Policy but isn't a user, group, domain, or special group.
**Parameters**

- **identity** (String) --- The identity reference.
- **condition** ([Google::Cloud::Bigquery::Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition), nil) *(defaults to: nil)* --- An optional condition for the access rule. A condition is a CEL expression that is evaluated to determine if the access rule should be applied. See [Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition "Google::Cloud::Bigquery::Condition (class)") for more information. To specify a condition, the `access_policy_version` on the dataset must be set to `3`. `nil` represents an absence of a condition. The default is `nil`.
**Examples**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_reader_iam_member "entity@example.com"
end
```

With a condition:

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
condition = Google::Cloud::Bigquery::Condition.new(
  "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")",
  title: "Table foo only"
)

dataset.access do |access|
  access.add_reader_iam_member "entity@example.com", condition: condition
end
```

### #add_reader_routine

    def add_reader_routine(routine)

Add access to a routine from a different dataset. Queries executed
against that routine will have read access to views/tables/routines
in this dataset. Only UDF is supported for now. The role field is
not required when this field is set. If that routine is updated by
any user, access to the routine needs to be granted again via an
update operation.
**Parameter**

- **routine** ([Google::Cloud::Bigquery::Routine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Routine)) --- A routine object.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
other_dataset = bigquery.dataset "my_other_dataset", skip_lookup: true

routine = other_dataset.routine "my_routine"

dataset.access do |access|
  access.add_reader_routine routine
end
```

### #add_reader_special

    def add_reader_special(group)

Add reader access to a special group.
**Parameter**

- **group** (String) --- Accepted values are `owners`, `writers`, `readers`, `all_authenticated_users`, and `all_users`.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_reader_special :all_users
end
```

### #add_reader_user

    def add_reader_user(email, condition: nil)

Add reader access to a user.
**Parameters**

- **email** (String) --- The email address for the entity.
- **condition** ([Google::Cloud::Bigquery::Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition), nil) *(defaults to: nil)* --- An optional condition for the access rule. A condition is a CEL expression that is evaluated to determine if the access rule should be applied. See [Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition "Google::Cloud::Bigquery::Condition (class)") for more information. To specify a condition, the `access_policy_version` on the dataset must be set to `3`. `nil` represents an absence of a condition. The default is `nil`.
**Examples**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_reader_user "entity@example.com"
end
```

With a condition:

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
condition = Google::Cloud::Bigquery::Condition.new(
  "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")",
  title: "Table foo only"
)

dataset.access do |access|
  access.add_reader_user "entity@example.com", condition: condition
end
```

### #add_reader_view

    def add_reader_view(view)

Add reader access to a view.
**Parameter**

- **view** ([Google::Cloud::Bigquery::Table](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Table), String) --- A table object, or a string identifier as specified by the [Standard SQL Query
  Reference](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#from-clause) (`project-name.dataset_id.table_id`) or the [Legacy SQL Query
  Reference](https://cloud.google.com/bigquery/query-reference#from) (`project-name:dataset_id.table_id`).
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
other_dataset = bigquery.dataset "my_other_dataset", skip_lookup: true

view = other_dataset.table "my_view", skip_lookup: true

dataset.access do |access|
  access.add_reader_view view
end
```

### #add_writer_domain

    def add_writer_domain(domain, condition: nil)

Add writer access to a domain.
**Parameters**

- **domain** (String) --- A [Cloud Identity
  domain](https://cloud.google.com/iam/docs/overview#cloudid_name_domain).
- **condition** ([Google::Cloud::Bigquery::Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition), nil) *(defaults to: nil)* --- An optional condition for the access rule. A condition is a CEL expression that is evaluated to determine if the access rule should be applied. See [Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition "Google::Cloud::Bigquery::Condition (class)") for more information. To specify a condition, the `access_policy_version` on the dataset must be set to `3`. `nil` represents an absence of a condition. The default is `nil`.
**Examples**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_writer_domain "example.com"
end
```

With a condition:

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
condition = Google::Cloud::Bigquery::Condition.new(
  "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")",
  title: "Table foo only"
)

dataset.access do |access|
  access.add_writer_domain "example.com", condition: condition
end
```

### #add_writer_group

    def add_writer_group(email, condition: nil)

Add writer access to a group.
**Parameters**

- **email** (String) --- The email address for the entity.
- **condition** ([Google::Cloud::Bigquery::Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition), nil) *(defaults to: nil)* --- An optional condition for the access rule. A condition is a CEL expression that is evaluated to determine if the access rule should be applied. See [Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition "Google::Cloud::Bigquery::Condition (class)") for more information. To specify a condition, the `access_policy_version` on the dataset must be set to `3`. `nil` represents an absence of a condition. The default is `nil`.
**Examples**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_writer_group "entity@example.com"
end
```

With a condition:

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
condition = Google::Cloud::Bigquery::Condition.new(
  "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")",
  title: "Table foo only"
)

dataset.access do |access|
  access.add_writer_group "entity@example.com", condition: condition
end
```

### #add_writer_iam_member

    def add_writer_iam_member(identity, condition: nil)

Add writer access to some other type of member that appears in the IAM
Policy but isn't a user, group, domain, or special group.
**Parameters**

- **identity** (String) --- The identity reference.
- **condition** ([Google::Cloud::Bigquery::Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition), nil) *(defaults to: nil)* --- An optional condition for the access rule. A condition is a CEL expression that is evaluated to determine if the access rule should be applied. See [Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition "Google::Cloud::Bigquery::Condition (class)") for more information. To specify a condition, the `access_policy_version` on the dataset must be set to `3`. `nil` represents an absence of a condition. The default is `nil`.
**Examples**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_writer_iam_member "entity@example.com"
end
```

With a condition:

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
condition = Google::Cloud::Bigquery::Condition.new(
  "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")",
  title: "Table foo only"
)

dataset.access do |access|
  access.add_writer_iam_member "entity@example.com", condition: condition
end
```

### #add_writer_special

    def add_writer_special(group)

Add writer access to a special group.
**Parameter**

- **group** (String) --- Accepted values are `owners`, `writers`, `readers`, `all_authenticated_users`, and `all_users`.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_writer_special :all_users
end
```

### #add_writer_user

    def add_writer_user(email, condition: nil)

Add writer access to a user.
**Parameters**

- **email** (String) --- The email address for the entity.
- **condition** ([Google::Cloud::Bigquery::Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition), nil) *(defaults to: nil)* --- An optional condition for the access rule. A condition is a CEL expression that is evaluated to determine if the access rule should be applied. See [Condition](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Condition "Google::Cloud::Bigquery::Condition (class)") for more information. To specify a condition, the `access_policy_version` on the dataset must be set to `3`. `nil` represents an absence of a condition. The default is `nil`.
**Examples**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.add_writer_user "entity@example.com"
end
```

With a condition:

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
condition = Google::Cloud::Bigquery::Condition.new(
  "resource.name.startsWith(\"projects/my-project/datasets/my_dataset/tables/foo\")",
  title: "Table foo only"
)

dataset.access do |access|
  access.add_writer_user "entity@example.com", condition: condition
end
```

### #owner_domain?

    def owner_domain?(domain) -> Boolean

Checks owner access for a domain.
**Parameter**

- **domain** (String) --- A [Cloud Identity
  domain](https://cloud.google.com/iam/docs/overview#cloudid_name_domain).
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

access = dataset.access
access.owner_domain? "example.com" #=> false
```

### #owner_group?

    def owner_group?(email) -> Boolean

Checks owner access for a group.
**Parameter**

- **email** (String) --- The email address for the entity.
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

access = dataset.access
access.owner_group? "entity@example.com" #=> false
```

### #owner_iam_member?

    def owner_iam_member?(identity) -> Boolean

Checks owner access for some other type of member that appears in the IAM
Policy but isn't a user, group, domain, or special group.
**Parameter**

- **identity** (String) --- The identity reference.
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

access = dataset.access
access.owner_iam_member? "entity@example.com" #=> false
```

### #owner_special?

    def owner_special?(group) -> Boolean

Checks owner access for a special group.
**Parameter**

- **group** (String) --- Accepted values are `owners`, `writers`, `readers`, `all_authenticated_users`, and `all_users`.
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

access = dataset.access
access.owner_special? :all_users #=> false
```

### #owner_user?

    def owner_user?(email) -> Boolean

Checks owner access for a user.
**Parameter**

- **email** (String) --- The email address for the entity.
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

access = dataset.access
access.owner_user? "entity@example.com" #=> false
```

### #reader_dataset?

    def reader_dataset?(dataset) -> Boolean

Checks reader access for a dataset.
**Parameter**

- **dataset** (Google::Cloud::Bigquery::DatasetAccessEntry, Hash\<String,String\>) --- A DatasetAccessEntry or a Hash object. Required
**Returns**

- (Boolean)
**Examples**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
other_dataset = bigquery.dataset "my_other_dataset", skip_lookup: true

params = {
  dataset_id: other_dataset.dataset_id,
  project_id: other_dataset.project_id,
  target_types: ["VIEWS"]
}

dataset.access.reader_dataset? params
```

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
other_dataset = bigquery.dataset "my_other_dataset", skip_lookup: true

dataset.access.reader_dataset? other_dataset.access_entry(target_types: ["VIEWS"])
```

### #reader_domain?

    def reader_domain?(domain) -> Boolean

Checks reader access for a domain.
**Parameter**

- **domain** (String) --- A [Cloud Identity
  domain](https://cloud.google.com/iam/docs/overview#cloudid_name_domain).
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

access = dataset.access
access.reader_domain? "example.com" #=> false
```

### #reader_group?

    def reader_group?(email) -> Boolean

Checks reader access for a group.
**Parameter**

- **email** (String) --- The email address for the entity.
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

access = dataset.access
access.reader_group? "entity@example.com" #=> false
```

### #reader_iam_member?

    def reader_iam_member?(identity) -> Boolean

Checks reader access for some other type of member that appears in the IAM
Policy but isn't a user, group, domain, or special group.
**Parameter**

- **identity** (String) --- The identity reference.
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

access = dataset.access
access.reader_iam_member? "entity@example.com" #=> false
```

### #reader_routine?

    def reader_routine?(routine) -> Boolean

Checks access for a routine from a different dataset. Queries executed
against that routine will have read access to views/tables/routines
in this dataset. Only UDF is supported for now. The role field is
not required when this field is set. If that routine is updated by
any user, access to the routine needs to be granted again via an
update operation.
**Parameter**

- **routine** ([Google::Cloud::Bigquery::Routine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Routine)) --- A routine object.
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
other_dataset = bigquery.dataset "my_other_dataset", skip_lookup: true

routine = other_dataset.routine "my_routine", skip_lookup: true

access = dataset.access
access.reader_routine? routine #=> false
```

### #reader_special?

    def reader_special?(group) -> Boolean

Checks reader access for a special group.
**Parameter**

- **group** (String) --- Accepted values are `owners`, `writers`, `readers`, `all_authenticated_users`, and `all_users`.
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

access = dataset.access
access.reader_special? :all_users #=> false
```

### #reader_user?

    def reader_user?(email) -> Boolean

Checks reader access for a user.
**Parameter**

- **email** (String) --- The email address for the entity.
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

access = dataset.access
access.reader_user? "entity@example.com" #=> false
```

### #reader_view?

    def reader_view?(view) -> Boolean

Checks reader access for a view.
**Parameter**

- **view** ([Google::Cloud::Bigquery::Table](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Table), String) --- A table object, or a string identifier as specified by the [Standard SQL Query
  Reference](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#from-clause) (`project-name.dataset_id.table_id`) or the [Legacy SQL Query
  Reference](https://cloud.google.com/bigquery/query-reference#from) (`project-name:dataset_id.table_id`).
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
other_dataset = bigquery.dataset "my_other_dataset", skip_lookup: true

view = other_dataset.table "my_view", skip_lookup: true

access = dataset.access
access.reader_view? view #=> false
```

### #remove_owner_domain

    def remove_owner_domain(domain)

Remove owner access from a domain.
**Parameter**

- **domain** (String) --- A [Cloud Identity
  domain](https://cloud.google.com/iam/docs/overview#cloudid_name_domain).
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.remove_owner_domain "example.com"
end
```

### #remove_owner_group

    def remove_owner_group(email)

Remove owner access from a group.
**Parameter**

- **email** (String) --- The email address for the entity.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.remove_owner_group "entity@example.com"
end
```

### #remove_owner_iam_member

    def remove_owner_iam_member(identity)

Remove owner access from some other type of member that appears in the IAM
Policy but isn't a user, group, domain, or special group.
**Parameter**

- **identity** (String) --- The identity reference.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.remove_owner_iam_member "entity@example.com"
end
```

### #remove_owner_special

    def remove_owner_special(group)

Remove owner access from a special group.
**Parameter**

- **group** (String) --- Accepted values are `owners`, `writers`, `readers`, `all_authenticated_users`, and `all_users`.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.remove_owner_special :all_users
end
```

### #remove_owner_user

    def remove_owner_user(email)

Remove owner access from a user.
**Parameter**

- **email** (String) --- The email address for the entity.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.remove_owner_user "entity@example.com"
end
```

### #remove_reader_dataset

    def remove_reader_dataset(dataset)

Removes reader access of a dataset.
**Parameter**

- **dataset** (Google::Cloud::Bigquery::DatasetAccessEntry, Hash\<String,String\>) --- A DatasetAccessEntry or a Hash object. Required
**Examples**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
other_dataset = bigquery.dataset "my_other_dataset", skip_lookup: true

params = {
  dataset_id: other_dataset.dataset_id,
  project_id: other_dataset.project_id,
  target_types: ["VIEWS"]
}

dataset.access do |access|
  access.remove_reader_dataset params
end
```

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
other_dataset = bigquery.dataset "my_other_dataset", skip_lookup: true

dataset.access do |access|
  access.remove_reader_dataset other_dataset.access_entry(target_types: ["VIEWS"])
end
```

### #remove_reader_domain

    def remove_reader_domain(domain)

Remove reader access from a domain.
**Parameter**

- **domain** (String) --- A [Cloud Identity
  domain](https://cloud.google.com/iam/docs/overview#cloudid_name_domain).
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.remove_reader_domain "example.com"
end
```

### #remove_reader_group

    def remove_reader_group(email)

Remove reader access from a group.
**Parameter**

- **email** (String) --- The email address for the entity.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.remove_reader_group "entity@example.com"
end
```

### #remove_reader_iam_member

    def remove_reader_iam_member(identity)

Remove reader access from some other type of member that appears in the IAM
Policy but isn't a user, group, domain, or special group.
**Parameter**

- **identity** (String) --- The identity reference.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.remove_reader_iam_member "entity@example.com"
end
```

### #remove_reader_routine

    def remove_reader_routine(routine)

Remove reader access from a routine from a different dataset.
**Parameter**

- **routine** ([Google::Cloud::Bigquery::Routine](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Routine)) --- A routine object.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
other_dataset = bigquery.dataset "my_other_dataset", skip_lookup: true

routine = other_dataset.routine "my_routine", skip_lookup: true

dataset.access do |access|
  access.remove_reader_routine routine
end
```

### #remove_reader_special

    def remove_reader_special(group)

Remove reader access from a special group.
**Parameter**

- **group** (String) --- Accepted values are `owners`, `writers`, `readers`, `all_authenticated_users`, and `all_users`.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.remove_reader_special :all_users
end
```

### #remove_reader_user

    def remove_reader_user(email)

Remove reader access from a user.
**Parameter**

- **email** (String) --- The email address for the entity.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.remove_reader_user "entity@example.com"
end
```

### #remove_reader_view

    def remove_reader_view(view)

Remove reader access from a view.
**Parameter**

- **view** ([Google::Cloud::Bigquery::Table](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery/latest/Google-Cloud-Bigquery-Table), String) --- A table object, or a string identifier as specified by the [Standard SQL Query
  Reference](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#from-clause) (`project-name.dataset_id.table_id`) or the [Legacy SQL Query
  Reference](https://cloud.google.com/bigquery/query-reference#from) (`project-name:dataset_id.table_id`).
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"
other_dataset = bigquery.dataset "my_other_dataset", skip_lookup: true

view = other_dataset.table "my_view", skip_lookup: true

dataset.access do |access|
  access.remove_reader_view view
end
```

### #remove_writer_domain

    def remove_writer_domain(domain)

Remove writer access from a domain.
**Parameter**

- **domain** (String) --- A [Cloud Identity
  domain](https://cloud.google.com/iam/docs/overview#cloudid_name_domain).
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.remove_writer_domain "example.com"
end
```

### #remove_writer_group

    def remove_writer_group(email)

Remove writer access from a group.
**Parameter**

- **email** (String) --- The email address for the entity.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.remove_writer_group "entity@example.com"
end
```

### #remove_writer_iam_member

    def remove_writer_iam_member(identity)

Remove writer access from some other type of member that appears in the IAM
Policy but isn't a user, group, domain, or special group.
**Parameter**

- **identity** (String) --- The identity reference.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.remove_writer_iam_member "entity@example.com"
end
```

### #remove_writer_special

    def remove_writer_special(group)

Remove writer access from a special group.
**Parameter**

- **group** (String) --- Accepted values are `owners`, `writers`, `readers`, `all_authenticated_users`, and `all_users`.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.remove_writer_special :all_users
end
```

### #remove_writer_user

    def remove_writer_user(email)

Remove writer access from a user.
**Parameter**

- **email** (String) --- The email address for the entity.
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

dataset.access do |access|
  access.remove_writer_user "entity@example.com"
end
```

### #rules

    def rules()

Returns the value of attribute rules.

### #writer_domain?

    def writer_domain?(domain) -> Boolean

Checks writer access for a domain.
**Parameter**

- **domain** (String) --- A [Cloud Identity
  domain](https://cloud.google.com/iam/docs/overview#cloudid_name_domain).
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

access = dataset.access
access.writer_domain? "example.com" #=> false
```

### #writer_group?

    def writer_group?(email) -> Boolean

Checks writer access for a group.
**Parameter**

- **email** (String) --- The email address for the entity.
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

access = dataset.access
access.writer_group? "entity@example.com" #=> false
```

### #writer_iam_member?

    def writer_iam_member?(identity) -> Boolean

Checks writer access for some other type of member that appears in the IAM
Policy but isn't a user, group, domain, or special group.
**Parameter**

- **identity** (String) --- The identity reference.
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

access = dataset.access
access.writer_iam_member? "entity@example.com" #=> false
```

### #writer_special?

    def writer_special?(group) -> Boolean

Checks writer access for a special group.
**Parameter**

- **group** (String) --- Accepted values are `owners`, `writers`, `readers`, `all_authenticated_users`, and `all_users`.
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

access = dataset.access
access.writer_special? :all_users #=> false
```

### #writer_user?

    def writer_user?(email) -> Boolean

Checks writer access for a user.
**Parameter**

- **email** (String) --- The email address for the entity.
**Returns**

- (Boolean)
**Example**

```ruby
require "google/cloud/bigquery"

bigquery = Google::Cloud::Bigquery.new
dataset = bigquery.dataset "my_dataset"

access = dataset.access
access.writer_user? "entity@example.com" #=> false
```