<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/automl/v1/prediction_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
 * [PredictionService.Predict][google.cloud.automl.v1.PredictionService.Predict].
 *
 * Generated from protobuf message <code>google.cloud.automl.v1.PredictRequest</code>
 */
class PredictRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Name of the model requested to serve the prediction.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Required. Payload to perform a prediction on. The payload must match the
     * problem type that the model was trained to solve.
     *
     * Generated from protobuf field <code>.google.cloud.automl.v1.ExamplePayload payload = 2;</code>
     */
    private $payload = null;
    /**
     * Additional domain-specific parameters, any string must be up to 25000
     * characters long.
     *
     * Generated from protobuf field <code>map<string, string> params = 3;</code>
     */
    private $params;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Name of the model requested to serve the prediction.
     *     @type \Google\Cloud\AutoMl\V1\ExamplePayload $payload
     *           Required. Payload to perform a prediction on. The payload must match the
     *           problem type that the model was trained to solve.
     *     @type array|\Google\Protobuf\Internal\MapField $params
     *           Additional domain-specific parameters, any string must be up to 25000
     *           characters long.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Automl\V1\PredictionService::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Name of the model requested to serve the prediction.
     *
     * 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;
    }

    /**
     * Required. Payload to perform a prediction on. The payload must match the
     * problem type that the model was trained to solve.
     *
     * Generated from protobuf field <code>.google.cloud.automl.v1.ExamplePayload payload = 2;</code>
     * @return \Google\Cloud\AutoMl\V1\ExamplePayload
     */
    public function getPayload()
    {
        return $this->payload;
    }

    /**
     * Required. Payload to perform a prediction on. The payload must match the
     * problem type that the model was trained to solve.
     *
     * Generated from protobuf field <code>.google.cloud.automl.v1.ExamplePayload payload = 2;</code>
     * @param \Google\Cloud\AutoMl\V1\ExamplePayload $var
     * @return $this
     */
    public function setPayload($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1\ExamplePayload::class);
        $this->payload = $var;

        return $this;
    }

    /**
     * Additional domain-specific parameters, any string must be up to 25000
     * characters long.
     *
     * Generated from protobuf field <code>map<string, string> params = 3;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getParams()
    {
        return $this->params;
    }

    /**
     * Additional domain-specific parameters, any string must be up to 25000
     * characters long.
     *
     * Generated from protobuf field <code>map<string, string> params = 3;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setParams($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->params = $arr;

        return $this;
    }

}

