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

namespace Google\Cloud\Optimization\V1\Shipment;

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

/**
 * When performing a visit, a predefined amount may be added to the vehicle
 * load if it's a pickup, or subtracted if it's a delivery. This message
 * defines such amount. See
 * [load_demands][google.cloud.optimization.v1.Shipment.load_demands].
 *
 * Generated from protobuf message <code>google.cloud.optimization.v1.Shipment.Load</code>
 */
class Load extends \Google\Protobuf\Internal\Message
{
    /**
     * The amount by which the load of the vehicle performing the corresponding
     * visit will vary. Since it is an integer, users are advised to choose an
     * appropriate unit to avoid loss of precision. Must be ≥ 0.
     *
     * Generated from protobuf field <code>int64 amount = 2;</code>
     */
    private $amount = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $amount
     *           The amount by which the load of the vehicle performing the corresponding
     *           visit will vary. Since it is an integer, users are advised to choose an
     *           appropriate unit to avoid loss of precision. Must be ≥ 0.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce();
        parent::__construct($data);
    }

    /**
     * The amount by which the load of the vehicle performing the corresponding
     * visit will vary. Since it is an integer, users are advised to choose an
     * appropriate unit to avoid loss of precision. Must be ≥ 0.
     *
     * Generated from protobuf field <code>int64 amount = 2;</code>
     * @return int|string
     */
    public function getAmount()
    {
        return $this->amount;
    }

    /**
     * The amount by which the load of the vehicle performing the corresponding
     * visit will vary. Since it is an integer, users are advised to choose an
     * appropriate unit to avoid loss of precision. Must be ≥ 0.
     *
     * Generated from protobuf field <code>int64 amount = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setAmount($var)
    {
        GPBUtil::checkInt64($var);
        $this->amount = $var;

        return $this;
    }

}


