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

namespace Google\Cloud\Language\V1beta2;

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

/**
 * Model options available for classification requests.
 *
 * Generated from protobuf message <code>google.cloud.language.v1beta2.ClassificationModelOptions</code>
 */
class ClassificationModelOptions extends \Google\Protobuf\Internal\Message
{
    protected $model_type;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model $v1_model
     *           Setting this field will use the V1 model and V1 content categories
     *           version. The V1 model is a legacy model; support for this will be
     *           discontinued in the future.
     *     @type \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model $v2_model
     *           Setting this field will use the V2 model with the appropriate content
     *           categories version. The V2 model is a better performing model.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Language\V1Beta2\LanguageService::initOnce();
        parent::__construct($data);
    }

    /**
     * Setting this field will use the V1 model and V1 content categories
     * version. The V1 model is a legacy model; support for this will be
     * discontinued in the future.
     *
     * Generated from protobuf field <code>.google.cloud.language.v1beta2.ClassificationModelOptions.V1Model v1_model = 1;</code>
     * @return \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model|null
     */
    public function getV1Model()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Setting this field will use the V1 model and V1 content categories
     * version. The V1 model is a legacy model; support for this will be
     * discontinued in the future.
     *
     * Generated from protobuf field <code>.google.cloud.language.v1beta2.ClassificationModelOptions.V1Model v1_model = 1;</code>
     * @param \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model $var
     * @return $this
     */
    public function setV1Model($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V1Model::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Setting this field will use the V2 model with the appropriate content
     * categories version. The V2 model is a better performing model.
     *
     * Generated from protobuf field <code>.google.cloud.language.v1beta2.ClassificationModelOptions.V2Model v2_model = 2;</code>
     * @return \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model|null
     */
    public function getV2Model()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Setting this field will use the V2 model with the appropriate content
     * categories version. The V2 model is a better performing model.
     *
     * Generated from protobuf field <code>.google.cloud.language.v1beta2.ClassificationModelOptions.V2Model v2_model = 2;</code>
     * @param \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model $var
     * @return $this
     */
    public function setV2Model($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Language\V1beta2\ClassificationModelOptions\V2Model::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

