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

namespace Google\Cloud\DataCatalog\V1;

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

/**
 * Entry specification for a Dataplex table.
 *
 * Generated from protobuf message <code>google.cloud.datacatalog.v1.DataplexTableSpec</code>
 */
class DataplexTableSpec extends \Google\Protobuf\Internal\Message
{
    /**
     * List of external tables registered by Dataplex in other systems based on
     * the same underlying data.
     * External tables allow to query this data in those systems.
     *
     * Generated from protobuf field <code>repeated .google.cloud.datacatalog.v1.DataplexExternalTable external_tables = 1;</code>
     */
    private $external_tables;
    /**
     * Common Dataplex fields.
     *
     * Generated from protobuf field <code>.google.cloud.datacatalog.v1.DataplexSpec dataplex_spec = 2;</code>
     */
    protected $dataplex_spec = null;
    /**
     * Indicates if the table schema is managed by the user or not.
     *
     * Generated from protobuf field <code>bool user_managed = 3;</code>
     */
    protected $user_managed = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\DataCatalog\V1\DataplexExternalTable>|\Google\Protobuf\Internal\RepeatedField $external_tables
     *           List of external tables registered by Dataplex in other systems based on
     *           the same underlying data.
     *           External tables allow to query this data in those systems.
     *     @type \Google\Cloud\DataCatalog\V1\DataplexSpec $dataplex_spec
     *           Common Dataplex fields.
     *     @type bool $user_managed
     *           Indicates if the table schema is managed by the user or not.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datacatalog\V1\DataplexSpec::initOnce();
        parent::__construct($data);
    }

    /**
     * List of external tables registered by Dataplex in other systems based on
     * the same underlying data.
     * External tables allow to query this data in those systems.
     *
     * Generated from protobuf field <code>repeated .google.cloud.datacatalog.v1.DataplexExternalTable external_tables = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getExternalTables()
    {
        return $this->external_tables;
    }

    /**
     * List of external tables registered by Dataplex in other systems based on
     * the same underlying data.
     * External tables allow to query this data in those systems.
     *
     * Generated from protobuf field <code>repeated .google.cloud.datacatalog.v1.DataplexExternalTable external_tables = 1;</code>
     * @param array<\Google\Cloud\DataCatalog\V1\DataplexExternalTable>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setExternalTables($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\DataplexExternalTable::class);
        $this->external_tables = $arr;

        return $this;
    }

    /**
     * Common Dataplex fields.
     *
     * Generated from protobuf field <code>.google.cloud.datacatalog.v1.DataplexSpec dataplex_spec = 2;</code>
     * @return \Google\Cloud\DataCatalog\V1\DataplexSpec|null
     */
    public function getDataplexSpec()
    {
        return $this->dataplex_spec;
    }

    public function hasDataplexSpec()
    {
        return isset($this->dataplex_spec);
    }

    public function clearDataplexSpec()
    {
        unset($this->dataplex_spec);
    }

    /**
     * Common Dataplex fields.
     *
     * Generated from protobuf field <code>.google.cloud.datacatalog.v1.DataplexSpec dataplex_spec = 2;</code>
     * @param \Google\Cloud\DataCatalog\V1\DataplexSpec $var
     * @return $this
     */
    public function setDataplexSpec($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataCatalog\V1\DataplexSpec::class);
        $this->dataplex_spec = $var;

        return $this;
    }

    /**
     * Indicates if the table schema is managed by the user or not.
     *
     * Generated from protobuf field <code>bool user_managed = 3;</code>
     * @return bool
     */
    public function getUserManaged()
    {
        return $this->user_managed;
    }

    /**
     * Indicates if the table schema is managed by the user or not.
     *
     * Generated from protobuf field <code>bool user_managed = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setUserManaged($var)
    {
        GPBUtil::checkBool($var);
        $this->user_managed = $var;

        return $this;
    }

}

