google.devtools.source.v1.CloudRepoSourceContext
*/
class CloudRepoSourceContext extends \Google\Protobuf\Internal\Message
{
/**
* The ID of the repo.
*
* Generated from protobuf field .google.devtools.source.v1.RepoId repo_id = 1;
*/
private $repo_id = null;
protected $revision;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Google\Cloud\DevTools\Source\V1\RepoId $repo_id
* The ID of the repo.
* @type string $revision_id
* A revision ID.
* @type string $alias_name
* The name of an alias (branch, tag, etc.).
* @type \Google\Cloud\DevTools\Source\V1\AliasContext $alias_context
* An alias, which may be a branch or tag.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Devtools\Source\V1\SourceContext::initOnce();
parent::__construct($data);
}
/**
* The ID of the repo.
*
* Generated from protobuf field .google.devtools.source.v1.RepoId repo_id = 1;
* @return \Google\Cloud\DevTools\Source\V1\RepoId
*/
public function getRepoId()
{
return $this->repo_id;
}
/**
* The ID of the repo.
*
* Generated from protobuf field .google.devtools.source.v1.RepoId repo_id = 1;
* @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;
}
/**
* A revision ID.
*
* Generated from protobuf field string revision_id = 2;
* @return string
*/
public function getRevisionId()
{
return $this->readOneof(2);
}
/**
* A revision ID.
*
* Generated from protobuf field string revision_id = 2;
* @param string $var
* @return $this
*/
public function setRevisionId($var)
{
GPBUtil::checkString($var, True);
$this->writeOneof(2, $var);
return $this;
}
/**
* The name of an alias (branch, tag, etc.).
*
* Generated from protobuf field string alias_name = 3;
* @return string
*/
public function getAliasName()
{
return $this->readOneof(3);
}
/**
* The name of an alias (branch, tag, etc.).
*
* Generated from protobuf field string alias_name = 3;
* @param string $var
* @return $this
*/
public function setAliasName($var)
{
GPBUtil::checkString($var, True);
$this->writeOneof(3, $var);
return $this;
}
/**
* An alias, which may be a branch or tag.
*
* Generated from protobuf field .google.devtools.source.v1.AliasContext alias_context = 4;
* @return \Google\Cloud\DevTools\Source\V1\AliasContext
*/
public function getAliasContext()
{
return $this->readOneof(4);
}
/**
* An alias, which may be a branch or tag.
*
* Generated from protobuf field .google.devtools.source.v1.AliasContext alias_context = 4;
* @param \Google\Cloud\DevTools\Source\V1\AliasContext $var
* @return $this
*/
public function setAliasContext($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\AliasContext::class);
$this->writeOneof(4, $var);
return $this;
}
/**
* @return string
*/
public function getRevision()
{
return $this->whichOneof("revision");
}
}