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

namespace Google\Cloud\Recommender\V1;

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

/**
 * Request for the `MarkRecommendationSucceeded` Method.
 *
 * Generated from protobuf message <code>google.cloud.recommender.v1.MarkRecommendationSucceededRequest</code>
 */
class MarkRecommendationSucceededRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Name of the recommendation.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $name = '';
    /**
     * State properties to include with this state. Overwrites any existing
     * `state_metadata`.
     * Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/.
     * Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.
     *
     * Generated from protobuf field <code>map<string, string> state_metadata = 2;</code>
     */
    private $state_metadata;
    /**
     * Required. Fingerprint of the Recommendation. Provides optimistic locking.
     *
     * Generated from protobuf field <code>string etag = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $etag = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. Name of the recommendation.
     *     @type array|\Google\Protobuf\Internal\MapField $state_metadata
     *           State properties to include with this state. Overwrites any existing
     *           `state_metadata`.
     *           Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/.
     *           Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.
     *     @type string $etag
     *           Required. Fingerprint of the Recommendation. Provides optimistic locking.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Recommender\V1\RecommenderService::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Required. Name of the recommendation.
     *
     * Generated from protobuf field <code>string name = 1 [(.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;
    }

    /**
     * State properties to include with this state. Overwrites any existing
     * `state_metadata`.
     * Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/.
     * Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.
     *
     * Generated from protobuf field <code>map<string, string> state_metadata = 2;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getStateMetadata()
    {
        return $this->state_metadata;
    }

    /**
     * State properties to include with this state. Overwrites any existing
     * `state_metadata`.
     * Keys must match the regex /^[a-z0-9][a-z0-9_.-]{0,62}$/.
     * Values must match the regex /^[a-zA-Z0-9_./-]{0,255}$/.
     *
     * Generated from protobuf field <code>map<string, string> state_metadata = 2;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setStateMetadata($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->state_metadata = $arr;

        return $this;
    }

    /**
     * Required. Fingerprint of the Recommendation. Provides optimistic locking.
     *
     * Generated from protobuf field <code>string etag = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getEtag()
    {
        return $this->etag;
    }

    /**
     * Required. Fingerprint of the Recommendation. Provides optimistic locking.
     *
     * Generated from protobuf field <code>string etag = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setEtag($var)
    {
        GPBUtil::checkString($var, True);
        $this->etag = $var;

        return $this;
    }

}

