<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/api/client.proto

namespace Google\Api;

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

/**
 * `BatchingDescriptorProto` specifies the fields of the request message to be
 * used for batching, and, optionally, the fields of the response message to be
 * used for demultiplexing.
 *
 * Generated from protobuf message <code>google.api.BatchingDescriptorProto</code>
 */
class BatchingDescriptorProto extends \Google\Protobuf\Internal\Message
{
    /**
     * The repeated field in the request message to be aggregated by batching.
     *
     * Generated from protobuf field <code>string batched_field = 1;</code>
     */
    protected $batched_field = '';
    /**
     * A list of the fields in the request message. Two requests will be batched
     * together only if the values of every field specified in
     * `request_discriminator_fields` is equal between the two requests.
     *
     * Generated from protobuf field <code>repeated string discriminator_fields = 2;</code>
     */
    private $discriminator_fields;
    /**
     * Optional. When present, indicates the field in the response message to be
     * used to demultiplex the response into multiple response messages, in
     * correspondence with the multiple request messages originally batched
     * together.
     *
     * Generated from protobuf field <code>string subresponse_field = 3;</code>
     */
    protected $subresponse_field = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $batched_field
     *           The repeated field in the request message to be aggregated by batching.
     *     @type string[] $discriminator_fields
     *           A list of the fields in the request message. Two requests will be batched
     *           together only if the values of every field specified in
     *           `request_discriminator_fields` is equal between the two requests.
     *     @type string $subresponse_field
     *           Optional. When present, indicates the field in the response message to be
     *           used to demultiplex the response into multiple response messages, in
     *           correspondence with the multiple request messages originally batched
     *           together.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Api\Client::initOnce();
        parent::__construct($data);
    }

    /**
     * The repeated field in the request message to be aggregated by batching.
     *
     * Generated from protobuf field <code>string batched_field = 1;</code>
     * @return string
     */
    public function getBatchedField()
    {
        return $this->batched_field;
    }

    /**
     * The repeated field in the request message to be aggregated by batching.
     *
     * Generated from protobuf field <code>string batched_field = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setBatchedField($var)
    {
        GPBUtil::checkString($var, True);
        $this->batched_field = $var;

        return $this;
    }

    /**
     * A list of the fields in the request message. Two requests will be batched
     * together only if the values of every field specified in
     * `request_discriminator_fields` is equal between the two requests.
     *
     * Generated from protobuf field <code>repeated string discriminator_fields = 2;</code>
     * @return RepeatedField<string>
     */
    public function getDiscriminatorFields()
    {
        return $this->discriminator_fields;
    }

    /**
     * A list of the fields in the request message. Two requests will be batched
     * together only if the values of every field specified in
     * `request_discriminator_fields` is equal between the two requests.
     *
     * Generated from protobuf field <code>repeated string discriminator_fields = 2;</code>
     * @param string[] $var
     * @return $this
     */
    public function setDiscriminatorFields($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->discriminator_fields = $arr;

        return $this;
    }

    /**
     * Optional. When present, indicates the field in the response message to be
     * used to demultiplex the response into multiple response messages, in
     * correspondence with the multiple request messages originally batched
     * together.
     *
     * Generated from protobuf field <code>string subresponse_field = 3;</code>
     * @return string
     */
    public function getSubresponseField()
    {
        return $this->subresponse_field;
    }

    /**
     * Optional. When present, indicates the field in the response message to be
     * used to demultiplex the response into multiple response messages, in
     * correspondence with the multiple request messages originally batched
     * together.
     *
     * Generated from protobuf field <code>string subresponse_field = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setSubresponseField($var)
    {
        GPBUtil::checkString($var, True);
        $this->subresponse_field = $var;

        return $this;
    }

}

