<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: temporal/api/workflowservice/v1/request_response.proto

namespace Temporal\Api\Workflowservice\V1;

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

/**
 * [cleanup-wv-pre-release]
 *
 * Generated from protobuf message <code>temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesResponse</code>
 */
class UpdateWorkerVersioningRulesResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>repeated .temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule assignment_rules = 1;</code>
     */
    private $assignment_rules;
    /**
     * Generated from protobuf field <code>repeated .temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule compatible_redirect_rules = 2;</code>
     */
    private $compatible_redirect_rules;
    /**
     * This value can be passed back to UpdateWorkerVersioningRulesRequest to
     * ensure that the rules were not modified between the two updates, which
     * could lead to lost updates and other confusion.
     *
     * Generated from protobuf field <code>bytes conflict_token = 3;</code>
     */
    protected $conflict_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Taskqueue\V1\TimestampedBuildIdAssignmentRule[] $assignment_rules
     *     @type \Temporal\Api\Taskqueue\V1\TimestampedCompatibleBuildIdRedirectRule[] $compatible_redirect_rules
     *     @type string $conflict_token
     *           This value can be passed back to UpdateWorkerVersioningRulesRequest to
     *           ensure that the rules were not modified between the two updates, which
     *           could lead to lost updates and other confusion.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>repeated .temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule assignment_rules = 1;</code>
     * @return RepeatedField<\Temporal\Api\Taskqueue\V1\TimestampedBuildIdAssignmentRule>
     */
    public function getAssignmentRules()
    {
        return $this->assignment_rules;
    }

    /**
     * Generated from protobuf field <code>repeated .temporal.api.taskqueue.v1.TimestampedBuildIdAssignmentRule assignment_rules = 1;</code>
     * @param \Temporal\Api\Taskqueue\V1\TimestampedBuildIdAssignmentRule[] $var
     * @return $this
     */
    public function setAssignmentRules($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\TimestampedBuildIdAssignmentRule::class);
        $this->assignment_rules = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule compatible_redirect_rules = 2;</code>
     * @return RepeatedField<\Temporal\Api\Taskqueue\V1\TimestampedCompatibleBuildIdRedirectRule>
     */
    public function getCompatibleRedirectRules()
    {
        return $this->compatible_redirect_rules;
    }

    /**
     * Generated from protobuf field <code>repeated .temporal.api.taskqueue.v1.TimestampedCompatibleBuildIdRedirectRule compatible_redirect_rules = 2;</code>
     * @param \Temporal\Api\Taskqueue\V1\TimestampedCompatibleBuildIdRedirectRule[] $var
     * @return $this
     */
    public function setCompatibleRedirectRules($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\TimestampedCompatibleBuildIdRedirectRule::class);
        $this->compatible_redirect_rules = $arr;

        return $this;
    }

    /**
     * This value can be passed back to UpdateWorkerVersioningRulesRequest to
     * ensure that the rules were not modified between the two updates, which
     * could lead to lost updates and other confusion.
     *
     * Generated from protobuf field <code>bytes conflict_token = 3;</code>
     * @return string
     */
    public function getConflictToken()
    {
        return $this->conflict_token;
    }

    /**
     * This value can be passed back to UpdateWorkerVersioningRulesRequest to
     * ensure that the rules were not modified between the two updates, which
     * could lead to lost updates and other confusion.
     *
     * Generated from protobuf field <code>bytes conflict_token = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setConflictToken($var)
    {
        GPBUtil::checkString($var, False);
        $this->conflict_token = $var;

        return $this;
    }

}

