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

namespace Google\Cloud\AutoMl\V1;

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

/**
 * Request message for
 * [AutoMl.DeployModel][google.cloud.automl.v1.AutoMl.DeployModel].
 *
 * Generated from protobuf message <code>google.cloud.automl.v1.DeployModelRequest</code>
 */
class DeployModelRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Resource name of the model to deploy.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    protected $model_deployment_metadata;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AutoMl\V1\ImageObjectDetectionModelDeploymentMetadata $image_object_detection_model_deployment_metadata
     *           Model deployment metadata specific to Image Object Detection.
     *     @type \Google\Cloud\AutoMl\V1\ImageClassificationModelDeploymentMetadata $image_classification_model_deployment_metadata
     *           Model deployment metadata specific to Image Classification.
     *     @type string $name
     *           Resource name of the model to deploy.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Automl\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Model deployment metadata specific to Image Object Detection.
     *
     * Generated from protobuf field <code>.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;</code>
     * @return \Google\Cloud\AutoMl\V1\ImageObjectDetectionModelDeploymentMetadata
     */
    public function getImageObjectDetectionModelDeploymentMetadata()
    {
        return $this->readOneof(2);
    }

    /**
     * Model deployment metadata specific to Image Object Detection.
     *
     * Generated from protobuf field <code>.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;</code>
     * @param \Google\Cloud\AutoMl\V1\ImageObjectDetectionModelDeploymentMetadata $var
     * @return $this
     */
    public function setImageObjectDetectionModelDeploymentMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1\ImageObjectDetectionModelDeploymentMetadata::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Model deployment metadata specific to Image Classification.
     *
     * Generated from protobuf field <code>.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;</code>
     * @return \Google\Cloud\AutoMl\V1\ImageClassificationModelDeploymentMetadata
     */
    public function getImageClassificationModelDeploymentMetadata()
    {
        return $this->readOneof(4);
    }

    /**
     * Model deployment metadata specific to Image Classification.
     *
     * Generated from protobuf field <code>.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;</code>
     * @param \Google\Cloud\AutoMl\V1\ImageClassificationModelDeploymentMetadata $var
     * @return $this
     */
    public function setImageClassificationModelDeploymentMetadata($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1\ImageClassificationModelDeploymentMetadata::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Resource name of the model to deploy.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Resource name of the model to deploy.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

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

}

