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

namespace Google\Cloud\AIPlatform\V1\Model;

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

/**
 * User input field to specify the base model source. Currently it only
 * supports specifing the Model Garden models and Genie models.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.Model.BaseModelSource</code>
 */
class BaseModelSource extends \Google\Protobuf\Internal\Message
{
    protected $source;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\ModelGardenSource $model_garden_source
     *           Source information of Model Garden models.
     *     @type \Google\Cloud\AIPlatform\V1\GenieSource $genie_source
     *           Information about the base model of Genie models.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Model::initOnce();
        parent::__construct($data);
    }

    /**
     * Source information of Model Garden models.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ModelGardenSource model_garden_source = 1;</code>
     * @return \Google\Cloud\AIPlatform\V1\ModelGardenSource|null
     */
    public function getModelGardenSource()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Source information of Model Garden models.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ModelGardenSource model_garden_source = 1;</code>
     * @param \Google\Cloud\AIPlatform\V1\ModelGardenSource $var
     * @return $this
     */
    public function setModelGardenSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ModelGardenSource::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Information about the base model of Genie models.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.GenieSource genie_source = 2;</code>
     * @return \Google\Cloud\AIPlatform\V1\GenieSource|null
     */
    public function getGenieSource()
    {
        return $this->readOneof(2);
    }

    public function hasGenieSource()
    {
        return $this->hasOneof(2);
    }

    /**
     * Information about the base model of Genie models.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.GenieSource genie_source = 2;</code>
     * @param \Google\Cloud\AIPlatform\V1\GenieSource $var
     * @return $this
     */
    public function setGenieSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenieSource::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}


