<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/audit/bigquery_audit_metadata.proto

namespace Google\Cloud\Audit\BigQueryAuditMetadata;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * An access control list.
 *
 * Generated from protobuf message <code>google.cloud.audit.BigQueryAuditMetadata.BigQueryAcl</code>
 */
class BigQueryAcl extends \Google\Protobuf\Internal\Message
{
    /**
     * IAM policy for the resource.
     *
     * Generated from protobuf field <code>.google.iam.v1.Policy policy = 1;</code>
     */
    protected $policy = null;
    /**
     * List of authorized views for a dataset.
     * Format: `projects/<project_id>/datasets/<dataset_id>/tables/<view_id>`.
     *
     * Generated from protobuf field <code>repeated string authorized_views = 2;</code>
     */
    private $authorized_views;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Iam\V1\Policy $policy
     *           IAM policy for the resource.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $authorized_views
     *           List of authorized views for a dataset.
     *           Format: `projects/<project_id>/datasets/<dataset_id>/tables/<view_id>`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Audit\BigqueryAuditMetadata::initOnce();
        parent::__construct($data);
    }

    /**
     * IAM policy for the resource.
     *
     * Generated from protobuf field <code>.google.iam.v1.Policy policy = 1;</code>
     * @return \Google\Cloud\Iam\V1\Policy|null
     */
    public function getPolicy()
    {
        return $this->policy;
    }

    public function hasPolicy()
    {
        return isset($this->policy);
    }

    public function clearPolicy()
    {
        unset($this->policy);
    }

    /**
     * IAM policy for the resource.
     *
     * Generated from protobuf field <code>.google.iam.v1.Policy policy = 1;</code>
     * @param \Google\Cloud\Iam\V1\Policy $var
     * @return $this
     */
    public function setPolicy($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Iam\V1\Policy::class);
        $this->policy = $var;

        return $this;
    }

    /**
     * List of authorized views for a dataset.
     * Format: `projects/<project_id>/datasets/<dataset_id>/tables/<view_id>`.
     *
     * Generated from protobuf field <code>repeated string authorized_views = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAuthorizedViews()
    {
        return $this->authorized_views;
    }

    /**
     * List of authorized views for a dataset.
     * Format: `projects/<project_id>/datasets/<dataset_id>/tables/<view_id>`.
     *
     * Generated from protobuf field <code>repeated string authorized_views = 2;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAuthorizedViews($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->authorized_views = $arr;

        return $this;
    }

}


