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

namespace Google\Cloud\Channel\V1;

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

/**
 * Request message for [CloudChannelService.CancelEntitlement][google.cloud.channel.v1.CloudChannelService.CancelEntitlement].
 *
 * Generated from protobuf message <code>google.cloud.channel.v1.CancelEntitlementRequest</code>
 */
class CancelEntitlementRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the entitlement to cancel.
     * The name takes the format:
     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $name = '';
    /**
     * Optional. An optional request ID to identify requests. Specify a unique request ID so
     * that if you must retry your request, the server will know to ignore the
     * request if it has already been completed.
     * For example, consider a situation where you make an initial request and
     * the request times out. If you make the request again with the same
     * request ID, the server can check if the original operation with the same
     * request ID was received, and if so, will ignore the second request.
     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
     * with the exception that zero UUID is not supported
     * (`00000000-0000-0000-0000-000000000000`).
     *
     * Generated from protobuf field <code>string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $request_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The resource name of the entitlement to cancel.
     *           The name takes the format:
     *           accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
     *     @type string $request_id
     *           Optional. An optional request ID to identify requests. Specify a unique request ID so
     *           that if you must retry your request, the server will know to ignore the
     *           request if it has already been completed.
     *           For example, consider a situation where you make an initial request and
     *           the request times out. If you make the request again with the same
     *           request ID, the server can check if the original operation with the same
     *           request ID was received, and if so, will ignore the second request.
     *           The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
     *           with the exception that zero UUID is not supported
     *           (`00000000-0000-0000-0000-000000000000`).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Channel\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the entitlement to cancel.
     * The name takes the format:
     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The resource name of the entitlement to cancel.
     * The name takes the format:
     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
     *
     * 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. An optional request ID to identify requests. Specify a unique request ID so
     * that if you must retry your request, the server will know to ignore the
     * request if it has already been completed.
     * For example, consider a situation where you make an initial request and
     * the request times out. If you make the request again with the same
     * request ID, the server can check if the original operation with the same
     * request ID was received, and if so, will ignore the second request.
     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
     * with the exception that zero UUID is not supported
     * (`00000000-0000-0000-0000-000000000000`).
     *
     * Generated from protobuf field <code>string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * Optional. An optional request ID to identify requests. Specify a unique request ID so
     * that if you must retry your request, the server will know to ignore the
     * request if it has already been completed.
     * For example, consider a situation where you make an initial request and
     * the request times out. If you make the request again with the same
     * request ID, the server can check if the original operation with the same
     * request ID was received, and if so, will ignore the second request.
     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
     * with the exception that zero UUID is not supported
     * (`00000000-0000-0000-0000-000000000000`).
     *
     * Generated from protobuf field <code>string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setRequestId($var)
    {
        GPBUtil::checkString($var, True);
        $this->request_id = $var;

        return $this;
    }

}

