<?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;

/**
 * Unlink linked dataset from its source dataset event
 *
 * Generated from protobuf message <code>google.cloud.audit.BigQueryAuditMetadata.UnlinkDataset</code>
 */
class UnlinkDataset extends \Google\Protobuf\Internal\Message
{
    /**
     * The linked dataset URI which is unlinked from its source.
     * Format: `projects/<project_id>/datasets/<dataset_id>`.
     *
     * Generated from protobuf field <code>string linked_dataset = 1;</code>
     */
    protected $linked_dataset = '';
    /**
     * The source dataset URI from which the linked dataset is unlinked.
     * Format: `projects/<project_id>/datasets/<dataset_id>`.
     *
     * Generated from protobuf field <code>string source_dataset = 2;</code>
     */
    protected $source_dataset = '';
    /**
     * Reason for unlinking linked dataset
     *
     * Generated from protobuf field <code>.google.cloud.audit.BigQueryAuditMetadata.UnlinkDataset.Reason reason = 3;</code>
     */
    protected $reason = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $linked_dataset
     *           The linked dataset URI which is unlinked from its source.
     *           Format: `projects/<project_id>/datasets/<dataset_id>`.
     *     @type string $source_dataset
     *           The source dataset URI from which the linked dataset is unlinked.
     *           Format: `projects/<project_id>/datasets/<dataset_id>`.
     *     @type int $reason
     *           Reason for unlinking linked dataset
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Audit\BigqueryAuditMetadata::initOnce();
        parent::__construct($data);
    }

    /**
     * The linked dataset URI which is unlinked from its source.
     * Format: `projects/<project_id>/datasets/<dataset_id>`.
     *
     * Generated from protobuf field <code>string linked_dataset = 1;</code>
     * @return string
     */
    public function getLinkedDataset()
    {
        return $this->linked_dataset;
    }

    /**
     * The linked dataset URI which is unlinked from its source.
     * Format: `projects/<project_id>/datasets/<dataset_id>`.
     *
     * Generated from protobuf field <code>string linked_dataset = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setLinkedDataset($var)
    {
        GPBUtil::checkString($var, True);
        $this->linked_dataset = $var;

        return $this;
    }

    /**
     * The source dataset URI from which the linked dataset is unlinked.
     * Format: `projects/<project_id>/datasets/<dataset_id>`.
     *
     * Generated from protobuf field <code>string source_dataset = 2;</code>
     * @return string
     */
    public function getSourceDataset()
    {
        return $this->source_dataset;
    }

    /**
     * The source dataset URI from which the linked dataset is unlinked.
     * Format: `projects/<project_id>/datasets/<dataset_id>`.
     *
     * Generated from protobuf field <code>string source_dataset = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceDataset($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_dataset = $var;

        return $this;
    }

    /**
     * Reason for unlinking linked dataset
     *
     * Generated from protobuf field <code>.google.cloud.audit.BigQueryAuditMetadata.UnlinkDataset.Reason reason = 3;</code>
     * @return int
     */
    public function getReason()
    {
        return $this->reason;
    }

    /**
     * Reason for unlinking linked dataset
     *
     * Generated from protobuf field <code>.google.cloud.audit.BigQueryAuditMetadata.UnlinkDataset.Reason reason = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setReason($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Audit\BigQueryAuditMetadata\UnlinkDataset\Reason::class);
        $this->reason = $var;

        return $this;
    }

}


