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

namespace Google\Cloud\BigQuery\AnalyticsHub\V1\Subscription;

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

/**
 * Reference to a linked resource tracked by this Subscription.
 *
 * Generated from protobuf message <code>google.cloud.bigquery.analyticshub.v1.Subscription.LinkedResource</code>
 */
class LinkedResource extends \Google\Protobuf\Internal\Message
{
    protected $reference;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $linked_dataset
     *           Output only. Name of the linked dataset, e.g.
     *           projects/subscriberproject/datasets/linked_dataset
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Bigquery\Analyticshub\V1\Analyticshub::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Name of the linked dataset, e.g.
     * projects/subscriberproject/datasets/linked_dataset
     *
     * Generated from protobuf field <code>string linked_dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getLinkedDataset()
    {
        return $this->readOneof(1);
    }

    public function hasLinkedDataset()
    {
        return $this->hasOneof(1);
    }

    /**
     * Output only. Name of the linked dataset, e.g.
     * projects/subscriberproject/datasets/linked_dataset
     *
     * Generated from protobuf field <code>string linked_dataset = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setLinkedDataset($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getReference()
    {
        return $this->whichOneof("reference");
    }

}


