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

namespace Google\Cloud\DevTools\Source\V1;

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

/**
 * A CloudWorkspaceId is a unique identifier for a cloud workspace.
 * A cloud workspace is a place associated with a repo where modified files
 * can be stored before they are committed.
 *
 * Generated from protobuf message <code>google.devtools.source.v1.CloudWorkspaceId</code>
 */
class CloudWorkspaceId extends \Google\Protobuf\Internal\Message
{
    /**
     * The ID of the repo containing the workspace.
     *
     * Generated from protobuf field <code>.google.devtools.source.v1.RepoId repo_id = 1;</code>
     */
    private $repo_id = null;
    /**
     * The unique name of the workspace within the repo.  This is the name
     * chosen by the client in the Source API's CreateWorkspace method.
     *
     * Generated from protobuf field <code>string name = 2;</code>
     */
    private $name = '';

    public function __construct() {
        \GPBMetadata\Google\Devtools\Source\V1\SourceContext::initOnce();
        parent::__construct();
    }

    /**
     * The ID of the repo containing the workspace.
     *
     * Generated from protobuf field <code>.google.devtools.source.v1.RepoId repo_id = 1;</code>
     * @return \Google\Cloud\DevTools\Source\V1\RepoId
     */
    public function getRepoId()
    {
        return $this->repo_id;
    }

    /**
     * The ID of the repo containing the workspace.
     *
     * Generated from protobuf field <code>.google.devtools.source.v1.RepoId repo_id = 1;</code>
     * @param \Google\Cloud\DevTools\Source\V1\RepoId $var
     * @return $this
     */
    public function setRepoId($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\RepoId::class);
        $this->repo_id = $var;

        return $this;
    }

    /**
     * The unique name of the workspace within the repo.  This is the name
     * chosen by the client in the Source API's CreateWorkspace method.
     *
     * Generated from protobuf field <code>string name = 2;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The unique name of the workspace within the repo.  This is the name
     * chosen by the client in the Source API's CreateWorkspace method.
     *
     * Generated from protobuf field <code>string name = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

}

