<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/commerce/consumer/procurement/v1/procurement_service.proto

namespace Google\Cloud\Commerce\Consumer\Procurement\V1;

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

/**
 * Request message for
 * [ConsumerProcurementService.ModifyOrder][google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.ModifyOrder].
 *
 * Generated from protobuf message <code>google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest</code>
 */
class ModifyOrderRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Name of the order to update.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $name = '';
    /**
     * Optional. Modifications for an existing Order created by an Offer.
     * Required when Offer based Order is being modified, except for when going
     * from an offer to a public plan.
     *
     * Generated from protobuf field <code>repeated .google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification modifications = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $modifications;
    /**
     * Optional. Updated display name of the order, leave as empty if you do not
     * want to update current display name.
     *
     * Generated from protobuf field <code>string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $display_name = '';
    /**
     * Optional. The weak etag, which can be optionally populated, of the order
     * that this modify request is based on. Validation checking will only happen
     * if the invoker supplies this field.
     *
     * Generated from protobuf field <code>string etag = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $etag = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. Name of the order to update.
     *     @type array<\Google\Cloud\Commerce\Consumer\Procurement\V1\ModifyOrderRequest\Modification>|\Google\Protobuf\Internal\RepeatedField $modifications
     *           Optional. Modifications for an existing Order created by an Offer.
     *           Required when Offer based Order is being modified, except for when going
     *           from an offer to a public plan.
     *     @type string $display_name
     *           Optional. Updated display name of the order, leave as empty if you do not
     *           want to update current display name.
     *     @type string $etag
     *           Optional. The weak etag, which can be optionally populated, of the order
     *           that this modify request is based on. Validation checking will only happen
     *           if the invoker supplies this field.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Commerce\Consumer\Procurement\V1\ProcurementService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Name of the order to update.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. Name of the order to update.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. Modifications for an existing Order created by an Offer.
     * Required when Offer based Order is being modified, except for when going
     * from an offer to a public plan.
     *
     * Generated from protobuf field <code>repeated .google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification modifications = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getModifications()
    {
        return $this->modifications;
    }

    /**
     * Optional. Modifications for an existing Order created by an Offer.
     * Required when Offer based Order is being modified, except for when going
     * from an offer to a public plan.
     *
     * Generated from protobuf field <code>repeated .google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification modifications = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<\Google\Cloud\Commerce\Consumer\Procurement\V1\ModifyOrderRequest\Modification>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setModifications($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Commerce\Consumer\Procurement\V1\ModifyOrderRequest\Modification::class);
        $this->modifications = $arr;

        return $this;
    }

    /**
     * Optional. Updated display name of the order, leave as empty if you do not
     * want to update current display name.
     *
     * Generated from protobuf field <code>string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Optional. Updated display name of the order, leave as empty if you do not
     * want to update current display name.
     *
     * Generated from protobuf field <code>string display_name = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Optional. The weak etag, which can be optionally populated, of the order
     * that this modify request is based on. Validation checking will only happen
     * if the invoker supplies this field.
     *
     * Generated from protobuf field <code>string etag = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getEtag()
    {
        return $this->etag;
    }

    /**
     * Optional. The weak etag, which can be optionally populated, of the order
     * that this modify request is based on. Validation checking will only happen
     * if the invoker supplies this field.
     *
     * Generated from protobuf field <code>string etag = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setEtag($var)
    {
        GPBUtil::checkString($var, True);
        $this->etag = $var;

        return $this;
    }

}

