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

namespace Google\Cloud\Metastore\V1alpha;

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

/**
 * Request message for
 * [DataprocMetastore.RemoveIamPolicy][google.cloud.metastore.v1alpha.DataprocMetastore.RemoveIamPolicy].
 *
 * Generated from protobuf message <code>google.cloud.metastore.v1alpha.RemoveIamPolicyRequest</code>
 */
class RemoveIamPolicyRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The relative resource name of the dataplane resource to remove
     * IAM policy, in the following form:
     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
     * or
     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
     *
     * Generated from protobuf field <code>string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $resource = '';
    /**
     * Optional. Removes IAM policy attached to database or table asynchronously
     * when it is set. The default is false.
     *
     * Generated from protobuf field <code>bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $asynchronous = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $resource
     *           Required. The relative resource name of the dataplane resource to remove
     *           IAM policy, in the following form:
     *           `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
     *           or
     *           `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
     *     @type bool $asynchronous
     *           Optional. Removes IAM policy attached to database or table asynchronously
     *           when it is set. The default is false.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The relative resource name of the dataplane resource to remove
     * IAM policy, in the following form:
     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
     * or
     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
     *
     * Generated from protobuf field <code>string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getResource()
    {
        return $this->resource;
    }

    /**
     * Required. The relative resource name of the dataplane resource to remove
     * IAM policy, in the following form:
     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
     * or
     * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
     *
     * Generated from protobuf field <code>string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setResource($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource = $var;

        return $this;
    }

    /**
     * Optional. Removes IAM policy attached to database or table asynchronously
     * when it is set. The default is false.
     *
     * Generated from protobuf field <code>bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getAsynchronous()
    {
        return $this->asynchronous;
    }

    /**
     * Optional. Removes IAM policy attached to database or table asynchronously
     * when it is set. The default is false.
     *
     * Generated from protobuf field <code>bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setAsynchronous($var)
    {
        GPBUtil::checkBool($var);
        $this->asynchronous = $var;

        return $this;
    }

}

