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

namespace Google\Cloud\AutoMl\V1beta1;

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

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

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

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

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

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

        return $this;
    }

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

    public function hasImageClassificationModelDeploymentMetadata()
    {
        return $this->hasOneof(4);
    }

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

        return $this;
    }

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

    /**
     * Required. Resource name of the model to deploy.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</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");
    }

}

