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

namespace Google\Cloud\Spanner\V1;

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

/**
 * Options for a PartitionQueryRequest and
 * PartitionReadRequest.
 *
 * Generated from protobuf message <code>google.spanner.v1.PartitionOptions</code>
 */
class PartitionOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * **Note:** This hint is currently ignored by PartitionQuery and
     * PartitionRead requests.
     * The desired data size for each partition generated.  The default for this
     * option is currently 1 GiB.  This is only a hint. The actual size of each
     * partition may be smaller or larger than this size request.
     *
     * Generated from protobuf field <code>int64 partition_size_bytes = 1;</code>
     */
    private $partition_size_bytes = 0;
    /**
     * **Note:** This hint is currently ignored by PartitionQuery and
     * PartitionRead requests.
     * The desired maximum number of partitions to return.  For example, this may
     * be set to the number of workers available.  The default for this option
     * is currently 10,000. The maximum value is currently 200,000.  This is only
     * a hint.  The actual number of partitions returned may be smaller or larger
     * than this maximum count request.
     *
     * Generated from protobuf field <code>int64 max_partitions = 2;</code>
     */
    private $max_partitions = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $partition_size_bytes
     *           **Note:** This hint is currently ignored by PartitionQuery and
     *           PartitionRead requests.
     *           The desired data size for each partition generated.  The default for this
     *           option is currently 1 GiB.  This is only a hint. The actual size of each
     *           partition may be smaller or larger than this size request.
     *     @type int|string $max_partitions
     *           **Note:** This hint is currently ignored by PartitionQuery and
     *           PartitionRead requests.
     *           The desired maximum number of partitions to return.  For example, this may
     *           be set to the number of workers available.  The default for this option
     *           is currently 10,000. The maximum value is currently 200,000.  This is only
     *           a hint.  The actual number of partitions returned may be smaller or larger
     *           than this maximum count request.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Spanner\V1\Spanner::initOnce();
        parent::__construct($data);
    }

    /**
     * **Note:** This hint is currently ignored by PartitionQuery and
     * PartitionRead requests.
     * The desired data size for each partition generated.  The default for this
     * option is currently 1 GiB.  This is only a hint. The actual size of each
     * partition may be smaller or larger than this size request.
     *
     * Generated from protobuf field <code>int64 partition_size_bytes = 1;</code>
     * @return int|string
     */
    public function getPartitionSizeBytes()
    {
        return $this->partition_size_bytes;
    }

    /**
     * **Note:** This hint is currently ignored by PartitionQuery and
     * PartitionRead requests.
     * The desired data size for each partition generated.  The default for this
     * option is currently 1 GiB.  This is only a hint. The actual size of each
     * partition may be smaller or larger than this size request.
     *
     * Generated from protobuf field <code>int64 partition_size_bytes = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setPartitionSizeBytes($var)
    {
        GPBUtil::checkInt64($var);
        $this->partition_size_bytes = $var;

        return $this;
    }

    /**
     * **Note:** This hint is currently ignored by PartitionQuery and
     * PartitionRead requests.
     * The desired maximum number of partitions to return.  For example, this may
     * be set to the number of workers available.  The default for this option
     * is currently 10,000. The maximum value is currently 200,000.  This is only
     * a hint.  The actual number of partitions returned may be smaller or larger
     * than this maximum count request.
     *
     * Generated from protobuf field <code>int64 max_partitions = 2;</code>
     * @return int|string
     */
    public function getMaxPartitions()
    {
        return $this->max_partitions;
    }

    /**
     * **Note:** This hint is currently ignored by PartitionQuery and
     * PartitionRead requests.
     * The desired maximum number of partitions to return.  For example, this may
     * be set to the number of workers available.  The default for this option
     * is currently 10,000. The maximum value is currently 200,000.  This is only
     * a hint.  The actual number of partitions returned may be smaller or larger
     * than this maximum count request.
     *
     * Generated from protobuf field <code>int64 max_partitions = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setMaxPartitions($var)
    {
        GPBUtil::checkInt64($var);
        $this->max_partitions = $var;

        return $this;
    }

}

