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

namespace Google\Cloud\Metastore\V1beta\LocationMetadata;

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

/**
 * A specification of a supported version of the Hive Metastore software.
 *
 * Generated from protobuf message <code>google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion</code>
 */
class HiveMetastoreVersion extends \Google\Protobuf\Internal\Message
{
    /**
     * The semantic version of the Hive Metastore software.
     *
     * Generated from protobuf field <code>string version = 1;</code>
     */
    private $version = '';
    /**
     * Whether `version` will be chosen by the server if a metastore service is
     * created with a `HiveMetastoreConfig` that omits the `version`.
     *
     * Generated from protobuf field <code>bool is_default = 2;</code>
     */
    private $is_default = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $version
     *           The semantic version of the Hive Metastore software.
     *     @type bool $is_default
     *           Whether `version` will be chosen by the server if a metastore service is
     *           created with a `HiveMetastoreConfig` that omits the `version`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
        parent::__construct($data);
    }

    /**
     * The semantic version of the Hive Metastore software.
     *
     * Generated from protobuf field <code>string version = 1;</code>
     * @return string
     */
    public function getVersion()
    {
        return $this->version;
    }

    /**
     * The semantic version of the Hive Metastore software.
     *
     * Generated from protobuf field <code>string version = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->version = $var;

        return $this;
    }

    /**
     * Whether `version` will be chosen by the server if a metastore service is
     * created with a `HiveMetastoreConfig` that omits the `version`.
     *
     * Generated from protobuf field <code>bool is_default = 2;</code>
     * @return bool
     */
    public function getIsDefault()
    {
        return $this->is_default;
    }

    /**
     * Whether `version` will be chosen by the server if a metastore service is
     * created with a `HiveMetastoreConfig` that omits the `version`.
     *
     * Generated from protobuf field <code>bool is_default = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsDefault($var)
    {
        GPBUtil::checkBool($var);
        $this->is_default = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(HiveMetastoreVersion::class, \Google\Cloud\Metastore\V1beta\LocationMetadata_HiveMetastoreVersion::class);

