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

namespace Google\Cloud\Batch\V1\Runnable;

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

/**
 * A barrier runnable automatically blocks the execution of subsequent
 * runnables until all the tasks in the task group reach the barrier.
 *
 * Generated from protobuf message <code>google.cloud.batch.v1.Runnable.Barrier</code>
 */
class Barrier extends \Google\Protobuf\Internal\Message
{
    /**
     * Barriers are identified by their index in runnable list.
     * Names are not required, but if present should be an identifier.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Barriers are identified by their index in runnable list.
     *           Names are not required, but if present should be an identifier.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce();
        parent::__construct($data);
    }

    /**
     * Barriers are identified by their index in runnable list.
     * Names are not required, but if present should be an identifier.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Barriers are identified by their index in runnable list.
     * Names are not required, but if present should be an identifier.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

}


