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

namespace Google\Cloud\BigQuery\Storage\V1;

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

/**
 * Request message for `SplitReadStream`.
 *
 * Generated from protobuf message <code>google.cloud.bigquery.storage.v1.SplitReadStreamRequest</code>
 */
class SplitReadStreamRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Name of the stream to split.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $name = '';
    /**
     * A value in the range (0.0, 1.0) that specifies the fractional point at
     * which the original stream should be split. The actual split point is
     * evaluated on pre-filtered rows, so if a filter is provided, then there is
     * no guarantee that the division of the rows between the new child streams
     * will be proportional to this fractional value. Additionally, because the
     * server-side unit for assigning data is collections of rows, this fraction
     * will always map to a data storage boundary on the server side.
     *
     * Generated from protobuf field <code>double fraction = 2;</code>
     */
    private $fraction = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. Name of the stream to split.
     *     @type float $fraction
     *           A value in the range (0.0, 1.0) that specifies the fractional point at
     *           which the original stream should be split. The actual split point is
     *           evaluated on pre-filtered rows, so if a filter is provided, then there is
     *           no guarantee that the division of the rows between the new child streams
     *           will be proportional to this fractional value. Additionally, because the
     *           server-side unit for assigning data is collections of rows, this fraction
     *           will always map to a data storage boundary on the server side.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Name of the stream to split.
     *
     * 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. Name of the stream to split.
     *
     * 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;
    }

    /**
     * A value in the range (0.0, 1.0) that specifies the fractional point at
     * which the original stream should be split. The actual split point is
     * evaluated on pre-filtered rows, so if a filter is provided, then there is
     * no guarantee that the division of the rows between the new child streams
     * will be proportional to this fractional value. Additionally, because the
     * server-side unit for assigning data is collections of rows, this fraction
     * will always map to a data storage boundary on the server side.
     *
     * Generated from protobuf field <code>double fraction = 2;</code>
     * @return float
     */
    public function getFraction()
    {
        return $this->fraction;
    }

    /**
     * A value in the range (0.0, 1.0) that specifies the fractional point at
     * which the original stream should be split. The actual split point is
     * evaluated on pre-filtered rows, so if a filter is provided, then there is
     * no guarantee that the division of the rows between the new child streams
     * will be proportional to this fractional value. Additionally, because the
     * server-side unit for assigning data is collections of rows, this fraction
     * will always map to a data storage boundary on the server side.
     *
     * Generated from protobuf field <code>double fraction = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setFraction($var)
    {
        GPBUtil::checkDouble($var);
        $this->fraction = $var;

        return $this;
    }

}

