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

namespace Google\Maps\FleetEngine\Delivery\V1;

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

/**
 * DeleteDeliveryVehicle request message.
 *
 * Generated from protobuf message <code>maps.fleetengine.delivery.v1.DeleteDeliveryVehicleRequest</code>
 */
class DeleteDeliveryVehicleRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The standard Delivery API request header.
     *
     * Generated from protobuf field <code>.maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $header = null;
    /**
     * Required. Must be in the format
     * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`.
     * The `provider` must be the Google Cloud Project ID. For example,
     * `sample-cloud-project`.
     *
     * Generated from protobuf field <code>string name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $name = '';

    /**
     * @param string $name Required. Must be in the format
     *                     `providers/{provider}/deliveryVehicles/{delivery_vehicle}`.
     *                     The `provider` must be the Google Cloud Project ID. For example,
     *                     `sample-cloud-project`. Please see
     *                     {@see DeliveryServiceClient::deliveryVehicleName()} for help formatting this field.
     *
     * @return \Google\Maps\FleetEngine\Delivery\V1\DeleteDeliveryVehicleRequest
     *
     * @experimental
     */
    public static function build(string $name): self
    {
        return (new self())
            ->setName($name);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header
     *           Optional. The standard Delivery API request header.
     *     @type string $name
     *           Required. Must be in the format
     *           `providers/{provider}/deliveryVehicles/{delivery_vehicle}`.
     *           The `provider` must be the Google Cloud Project ID. For example,
     *           `sample-cloud-project`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The standard Delivery API request header.
     *
     * Generated from protobuf field <code>.maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null
     */
    public function getHeader()
    {
        return $this->header;
    }

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

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

    /**
     * Optional. The standard Delivery API request header.
     *
     * Generated from protobuf field <code>.maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var
     * @return $this
     */
    public function setHeader($var)
    {
        GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class);
        $this->header = $var;

        return $this;
    }

    /**
     * Required. Must be in the format
     * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`.
     * The `provider` must be the Google Cloud Project ID. For example,
     * `sample-cloud-project`.
     *
     * Generated from protobuf field <code>string name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. Must be in the format
     * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`.
     * The `provider` must be the Google Cloud Project ID. For example,
     * `sample-cloud-project`.
     *
     * Generated from protobuf field <code>string name = 2 [(.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;
    }

}

