google.devtools.source.v1.GerritSourceContext
*/
class GerritSourceContext extends \Google\Protobuf\Internal\Message
{
/**
* The URI of a running Gerrit instance.
*
* Generated from protobuf field string host_uri = 1;
*/
private $host_uri = '';
/**
* The full project name within the host. Projects may be nested, so
* "project/subproject" is a valid project name.
* The "repo name" is hostURI/project.
*
* Generated from protobuf field string gerrit_project = 2;
*/
private $gerrit_project = '';
protected $revision;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $host_uri
* The URI of a running Gerrit instance.
* @type string $gerrit_project
* The full project name within the host. Projects may be nested, so
* "project/subproject" is a valid project name.
* The "repo name" is hostURI/project.
* @type string $revision_id
* A revision (commit) 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 URI of a running Gerrit instance.
*
* Generated from protobuf field string host_uri = 1;
* @return string
*/
public function getHostUri()
{
return $this->host_uri;
}
/**
* The URI of a running Gerrit instance.
*
* Generated from protobuf field string host_uri = 1;
* @param string $var
* @return $this
*/
public function setHostUri($var)
{
GPBUtil::checkString($var, True);
$this->host_uri = $var;
return $this;
}
/**
* The full project name within the host. Projects may be nested, so
* "project/subproject" is a valid project name.
* The "repo name" is hostURI/project.
*
* Generated from protobuf field string gerrit_project = 2;
* @return string
*/
public function getGerritProject()
{
return $this->gerrit_project;
}
/**
* The full project name within the host. Projects may be nested, so
* "project/subproject" is a valid project name.
* The "repo name" is hostURI/project.
*
* Generated from protobuf field string gerrit_project = 2;
* @param string $var
* @return $this
*/
public function setGerritProject($var)
{
GPBUtil::checkString($var, True);
$this->gerrit_project = $var;
return $this;
}
/**
* A revision (commit) ID.
*
* Generated from protobuf field string revision_id = 3;
* @return string
*/
public function getRevisionId()
{
return $this->readOneof(3);
}
/**
* A revision (commit) ID.
*
* Generated from protobuf field string revision_id = 3;
* @param string $var
* @return $this
*/
public function setRevisionId($var)
{
GPBUtil::checkString($var, True);
$this->writeOneof(3, $var);
return $this;
}
/**
* The name of an alias (branch, tag, etc.).
*
* Generated from protobuf field string alias_name = 4;
* @return string
*/
public function getAliasName()
{
return $this->readOneof(4);
}
/**
* The name of an alias (branch, tag, etc.).
*
* Generated from protobuf field string alias_name = 4;
* @param string $var
* @return $this
*/
public function setAliasName($var)
{
GPBUtil::checkString($var, True);
$this->writeOneof(4, $var);
return $this;
}
/**
* An alias, which may be a branch or tag.
*
* Generated from protobuf field .google.devtools.source.v1.AliasContext alias_context = 5;
* @return \Google\Cloud\DevTools\Source\V1\AliasContext
*/
public function getAliasContext()
{
return $this->readOneof(5);
}
/**
* An alias, which may be a branch or tag.
*
* Generated from protobuf field .google.devtools.source.v1.AliasContext alias_context = 5;
* @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(5, $var);
return $this;
}
/**
* @return string
*/
public function getRevision()
{
return $this->whichOneof("revision");
}
}