<?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\UpdateWorkerVersioningRulesRequest;

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

/**
 * This command is intended to be used to complete the rollout of a Build
 * ID and cleanup unnecessary rules possibly created during a gradual
 * rollout. Specifically, this command will make the following changes
 * atomically:
 *  1. Adds an assignment rule (with full ramp) for the target Build ID at
 *     the end of the list.
 *  2. Removes all previously added assignment rules to the given target
 *     Build ID (if any).
 *  3. Removes any fully-ramped assignment rule for other Build IDs.
 *
 * Generated from protobuf message <code>temporal.api.workflowservice.v1.UpdateWorkerVersioningRulesRequest.CommitBuildId</code>
 */
class CommitBuildId extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string target_build_id = 1;</code>
     */
    protected $target_build_id = '';
    /**
     * To prevent committing invalid Build IDs, we reject the request if no
     * pollers has been seen recently for this Build ID. Use the `force`
     * option to disable this validation.
     *
     * Generated from protobuf field <code>bool force = 2;</code>
     */
    protected $force = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $target_build_id
     *     @type bool $force
     *           To prevent committing invalid Build IDs, we reject the request if no
     *           pollers has been seen recently for this Build ID. Use the `force`
     *           option to disable this validation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string target_build_id = 1;</code>
     * @return string
     */
    public function getTargetBuildId()
    {
        return $this->target_build_id;
    }

    /**
     * Generated from protobuf field <code>string target_build_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setTargetBuildId($var)
    {
        GPBUtil::checkString($var, True);
        $this->target_build_id = $var;

        return $this;
    }

    /**
     * To prevent committing invalid Build IDs, we reject the request if no
     * pollers has been seen recently for this Build ID. Use the `force`
     * option to disable this validation.
     *
     * Generated from protobuf field <code>bool force = 2;</code>
     * @return bool
     */
    public function getForce()
    {
        return $this->force;
    }

    /**
     * To prevent committing invalid Build IDs, we reject the request if no
     * pollers has been seen recently for this Build ID. Use the `force`
     * option to disable this validation.
     *
     * Generated from protobuf field <code>bool force = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setForce($var)
    {
        GPBUtil::checkBool($var);
        $this->force = $var;

        return $this;
    }

}

