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

namespace Google\Maps\FleetEngine\V1;

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

/**
 * `UpdateVehicle request message.
 *
 * Generated from protobuf message <code>maps.fleetengine.v1.UpdateVehicleRequest</code>
 */
class UpdateVehicleRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The standard Fleet Engine request header.
     *
     * Generated from protobuf field <code>.maps.fleetengine.v1.RequestHeader header = 1;</code>
     */
    protected $header = null;
    /**
     * Required. Must be in the format
     * `providers/{provider}/vehicles/{vehicle}`.
     * The {provider} must be the Project ID (for example, `sample-cloud-project`)
     * of the Google Cloud Project of which the service account making
     * this call is a member.
     *
     * Generated from protobuf field <code>string name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $name = '';
    /**
     * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
     * the following fields may not be updated as they are managed by the
     * server.
     * * `available_capacity`
     * * `current_route_segment_version`
     * * `current_trips`
     * * `name`
     * * `waypoints_version`
     * If the `attributes` field is updated, **all** the vehicle's attributes are
     * replaced with the attributes provided in the request. If you want to update
     * only some attributes, see the `UpdateVehicleAttributes` method.
     * Likewise, the `waypoints` field can be updated, but must contain all the
     * waypoints currently on the vehicle, and no other waypoints.
     *
     * Generated from protobuf field <code>.maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $vehicle = null;
    /**
     * Required. A field mask indicating which fields of the `Vehicle` to update.
     * At least one field name must be provided.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $update_mask = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Maps\FleetEngine\V1\RequestHeader $header
     *           The standard Fleet Engine request header.
     *     @type string $name
     *           Required. Must be in the format
     *           `providers/{provider}/vehicles/{vehicle}`.
     *           The {provider} must be the Project ID (for example, `sample-cloud-project`)
     *           of the Google Cloud Project of which the service account making
     *           this call is a member.
     *     @type \Google\Maps\FleetEngine\V1\Vehicle $vehicle
     *           Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
     *           the following fields may not be updated as they are managed by the
     *           server.
     *           * `available_capacity`
     *           * `current_route_segment_version`
     *           * `current_trips`
     *           * `name`
     *           * `waypoints_version`
     *           If the `attributes` field is updated, **all** the vehicle's attributes are
     *           replaced with the attributes provided in the request. If you want to update
     *           only some attributes, see the `UpdateVehicleAttributes` method.
     *           Likewise, the `waypoints` field can be updated, but must contain all the
     *           waypoints currently on the vehicle, and no other waypoints.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Required. A field mask indicating which fields of the `Vehicle` to update.
     *           At least one field name must be provided.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Maps\Fleetengine\V1\VehicleApi::initOnce();
        parent::__construct($data);
    }

    /**
     * The standard Fleet Engine request header.
     *
     * Generated from protobuf field <code>.maps.fleetengine.v1.RequestHeader header = 1;</code>
     * @return \Google\Maps\FleetEngine\V1\RequestHeader|null
     */
    public function getHeader()
    {
        return $this->header;
    }

    public function hasHeader()
    {
        return isset($this->header);
    }

    public function clearHeader()
    {
        unset($this->header);
    }

    /**
     * The standard Fleet Engine request header.
     *
     * Generated from protobuf field <code>.maps.fleetengine.v1.RequestHeader header = 1;</code>
     * @param \Google\Maps\FleetEngine\V1\RequestHeader $var
     * @return $this
     */
    public function setHeader($var)
    {
        GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\V1\RequestHeader::class);
        $this->header = $var;

        return $this;
    }

    /**
     * Required. Must be in the format
     * `providers/{provider}/vehicles/{vehicle}`.
     * The {provider} must be the Project ID (for example, `sample-cloud-project`)
     * of the Google Cloud Project of which the service account making
     * this call is a member.
     *
     * Generated from protobuf field <code>string name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. Must be in the format
     * `providers/{provider}/vehicles/{vehicle}`.
     * The {provider} must be the Project ID (for example, `sample-cloud-project`)
     * of the Google Cloud Project of which the service account making
     * this call is a member.
     *
     * Generated from protobuf field <code>string name = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
     * the following fields may not be updated as they are managed by the
     * server.
     * * `available_capacity`
     * * `current_route_segment_version`
     * * `current_trips`
     * * `name`
     * * `waypoints_version`
     * If the `attributes` field is updated, **all** the vehicle's attributes are
     * replaced with the attributes provided in the request. If you want to update
     * only some attributes, see the `UpdateVehicleAttributes` method.
     * Likewise, the `waypoints` field can be updated, but must contain all the
     * waypoints currently on the vehicle, and no other waypoints.
     *
     * Generated from protobuf field <code>.maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Maps\FleetEngine\V1\Vehicle|null
     */
    public function getVehicle()
    {
        return $this->vehicle;
    }

    public function hasVehicle()
    {
        return isset($this->vehicle);
    }

    public function clearVehicle()
    {
        unset($this->vehicle);
    }

    /**
     * Required. The `Vehicle` entity values to apply.  When updating a `Vehicle`,
     * the following fields may not be updated as they are managed by the
     * server.
     * * `available_capacity`
     * * `current_route_segment_version`
     * * `current_trips`
     * * `name`
     * * `waypoints_version`
     * If the `attributes` field is updated, **all** the vehicle's attributes are
     * replaced with the attributes provided in the request. If you want to update
     * only some attributes, see the `UpdateVehicleAttributes` method.
     * Likewise, the `waypoints` field can be updated, but must contain all the
     * waypoints currently on the vehicle, and no other waypoints.
     *
     * Generated from protobuf field <code>.maps.fleetengine.v1.Vehicle vehicle = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Maps\FleetEngine\V1\Vehicle $var
     * @return $this
     */
    public function setVehicle($var)
    {
        GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\V1\Vehicle::class);
        $this->vehicle = $var;

        return $this;
    }

    /**
     * Required. A field mask indicating which fields of the `Vehicle` to update.
     * At least one field name must be provided.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\FieldMask|null
     */
    public function getUpdateMask()
    {
        return $this->update_mask;
    }

    public function hasUpdateMask()
    {
        return isset($this->update_mask);
    }

    public function clearUpdateMask()
    {
        unset($this->update_mask);
    }

    /**
     * Required. A field mask indicating which fields of the `Vehicle` to update.
     * At least one field name must be provided.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setUpdateMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->update_mask = $var;

        return $this;
    }

}

