google.devtools.cloudbuild.v2.GitLabConfig
*/
class GitLabConfig extends \Google\Protobuf\Internal\Message
{
/**
* The URI of the GitLab Enterprise host this connection is for.
* If not specified, the default value is https://gitlab.com.
*
* Generated from protobuf field string host_uri = 1;
*/
protected $host_uri = '';
/**
* Required. Immutable. SecretManager resource containing the webhook secret
* of a GitLab Enterprise project, formatted as
* `projects/{@*}secrets/{@*}versions/*`.
*
* Generated from protobuf field string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
*/
protected $webhook_secret_secret_version = '';
/**
* Required. A GitLab personal access token with the minimum `read_api` scope
* access.
*
* Generated from protobuf field .google.devtools.cloudbuild.v2.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED];
*/
protected $read_authorizer_credential = null;
/**
* Required. A GitLab personal access token with the `api` scope access.
*
* Generated from protobuf field .google.devtools.cloudbuild.v2.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED];
*/
protected $authorizer_credential = null;
/**
* Configuration for using Service Directory to privately connect to a GitLab
* Enterprise server. This should only be set if the GitLab Enterprise server
* is hosted on-premises and not reachable by public internet. If this field
* is left empty, calls to the GitLab Enterprise server will be made over the
* public internet.
*
* Generated from protobuf field .google.devtools.cloudbuild.v2.ServiceDirectoryConfig service_directory_config = 5;
*/
protected $service_directory_config = null;
/**
* SSL certificate to use for requests to GitLab Enterprise.
*
* Generated from protobuf field string ssl_ca = 6;
*/
protected $ssl_ca = '';
/**
* Output only. Version of the GitLab Enterprise server running on the
* `host_uri`.
*
* Generated from protobuf field string server_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
protected $server_version = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $host_uri
* The URI of the GitLab Enterprise host this connection is for.
* If not specified, the default value is https://gitlab.com.
* @type string $webhook_secret_secret_version
* Required. Immutable. SecretManager resource containing the webhook secret
* of a GitLab Enterprise project, formatted as
* `projects/{@*}secrets/{@*}versions/*`.
* @type \Google\Cloud\Build\V2\UserCredential $read_authorizer_credential
* Required. A GitLab personal access token with the minimum `read_api` scope
* access.
* @type \Google\Cloud\Build\V2\UserCredential $authorizer_credential
* Required. A GitLab personal access token with the `api` scope access.
* @type \Google\Cloud\Build\V2\ServiceDirectoryConfig $service_directory_config
* Configuration for using Service Directory to privately connect to a GitLab
* Enterprise server. This should only be set if the GitLab Enterprise server
* is hosted on-premises and not reachable by public internet. If this field
* is left empty, calls to the GitLab Enterprise server will be made over the
* public internet.
* @type string $ssl_ca
* SSL certificate to use for requests to GitLab Enterprise.
* @type string $server_version
* Output only. Version of the GitLab Enterprise server running on the
* `host_uri`.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Devtools\Cloudbuild\V2\Repositories::initOnce();
parent::__construct($data);
}
/**
* The URI of the GitLab Enterprise host this connection is for.
* If not specified, the default value is https://gitlab.com.
*
* Generated from protobuf field string host_uri = 1;
* @return string
*/
public function getHostUri()
{
return $this->host_uri;
}
/**
* The URI of the GitLab Enterprise host this connection is for.
* If not specified, the default value is https://gitlab.com.
*
* 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;
}
/**
* Required. Immutable. SecretManager resource containing the webhook secret
* of a GitLab Enterprise project, formatted as
* `projects/{@*}secrets/{@*}versions/*`.
*
* Generated from protobuf field string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
* @return string
*/
public function getWebhookSecretSecretVersion()
{
return $this->webhook_secret_secret_version;
}
/**
* Required. Immutable. SecretManager resource containing the webhook secret
* of a GitLab Enterprise project, formatted as
* `projects/{@*}secrets/{@*}versions/*`.
*
* Generated from protobuf field string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
* @param string $var
* @return $this
*/
public function setWebhookSecretSecretVersion($var)
{
GPBUtil::checkString($var, True);
$this->webhook_secret_secret_version = $var;
return $this;
}
/**
* Required. A GitLab personal access token with the minimum `read_api` scope
* access.
*
* Generated from protobuf field .google.devtools.cloudbuild.v2.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED];
* @return \Google\Cloud\Build\V2\UserCredential|null
*/
public function getReadAuthorizerCredential()
{
return $this->read_authorizer_credential;
}
public function hasReadAuthorizerCredential()
{
return isset($this->read_authorizer_credential);
}
public function clearReadAuthorizerCredential()
{
unset($this->read_authorizer_credential);
}
/**
* Required. A GitLab personal access token with the minimum `read_api` scope
* access.
*
* Generated from protobuf field .google.devtools.cloudbuild.v2.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED];
* @param \Google\Cloud\Build\V2\UserCredential $var
* @return $this
*/
public function setReadAuthorizerCredential($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Build\V2\UserCredential::class);
$this->read_authorizer_credential = $var;
return $this;
}
/**
* Required. A GitLab personal access token with the `api` scope access.
*
* Generated from protobuf field .google.devtools.cloudbuild.v2.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED];
* @return \Google\Cloud\Build\V2\UserCredential|null
*/
public function getAuthorizerCredential()
{
return $this->authorizer_credential;
}
public function hasAuthorizerCredential()
{
return isset($this->authorizer_credential);
}
public function clearAuthorizerCredential()
{
unset($this->authorizer_credential);
}
/**
* Required. A GitLab personal access token with the `api` scope access.
*
* Generated from protobuf field .google.devtools.cloudbuild.v2.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED];
* @param \Google\Cloud\Build\V2\UserCredential $var
* @return $this
*/
public function setAuthorizerCredential($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Build\V2\UserCredential::class);
$this->authorizer_credential = $var;
return $this;
}
/**
* Configuration for using Service Directory to privately connect to a GitLab
* Enterprise server. This should only be set if the GitLab Enterprise server
* is hosted on-premises and not reachable by public internet. If this field
* is left empty, calls to the GitLab Enterprise server will be made over the
* public internet.
*
* Generated from protobuf field .google.devtools.cloudbuild.v2.ServiceDirectoryConfig service_directory_config = 5;
* @return \Google\Cloud\Build\V2\ServiceDirectoryConfig|null
*/
public function getServiceDirectoryConfig()
{
return $this->service_directory_config;
}
public function hasServiceDirectoryConfig()
{
return isset($this->service_directory_config);
}
public function clearServiceDirectoryConfig()
{
unset($this->service_directory_config);
}
/**
* Configuration for using Service Directory to privately connect to a GitLab
* Enterprise server. This should only be set if the GitLab Enterprise server
* is hosted on-premises and not reachable by public internet. If this field
* is left empty, calls to the GitLab Enterprise server will be made over the
* public internet.
*
* Generated from protobuf field .google.devtools.cloudbuild.v2.ServiceDirectoryConfig service_directory_config = 5;
* @param \Google\Cloud\Build\V2\ServiceDirectoryConfig $var
* @return $this
*/
public function setServiceDirectoryConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Build\V2\ServiceDirectoryConfig::class);
$this->service_directory_config = $var;
return $this;
}
/**
* SSL certificate to use for requests to GitLab Enterprise.
*
* Generated from protobuf field string ssl_ca = 6;
* @return string
*/
public function getSslCa()
{
return $this->ssl_ca;
}
/**
* SSL certificate to use for requests to GitLab Enterprise.
*
* Generated from protobuf field string ssl_ca = 6;
* @param string $var
* @return $this
*/
public function setSslCa($var)
{
GPBUtil::checkString($var, True);
$this->ssl_ca = $var;
return $this;
}
/**
* Output only. Version of the GitLab Enterprise server running on the
* `host_uri`.
*
* Generated from protobuf field string server_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @return string
*/
public function getServerVersion()
{
return $this->server_version;
}
/**
* Output only. Version of the GitLab Enterprise server running on the
* `host_uri`.
*
* Generated from protobuf field string server_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
* @param string $var
* @return $this
*/
public function setServerVersion($var)
{
GPBUtil::checkString($var, True);
$this->server_version = $var;
return $this;
}
}