openstatus.status_page.v1.CreateStatusPageRequest
*/
class CreateStatusPageRequest extends \Google\Protobuf\Internal\Message
{
/**
* Title of the status page (required).
*
* Generated from protobuf field string title = 1 [json_name = "title", (.gnostic.openapi.v3.property) = {
*/
protected $title = '';
/**
* Description of the status page (optional).
*
* Generated from protobuf field optional string description = 2 [json_name = "description", (.buf.validate.field) = {
*/
protected $description = null;
/**
* URL-friendly slug for the status page (required). Must be lowercase alphanumeric with hyphens.
*
* Generated from protobuf field string slug = 3 [json_name = "slug", (.gnostic.openapi.v3.property) = {
*/
protected $slug = '';
/**
* URL to the homepage (optional).
*
* Generated from protobuf field optional string homepage_url = 4 [json_name = "homepageUrl", (.gnostic.openapi.v3.property) = {
*/
protected $homepage_url = null;
/**
* URL to the contact page (optional).
*
* Generated from protobuf field optional string contact_url = 5 [json_name = "contactUrl"];
*/
protected $contact_url = null;
/**
* Default locale for the status page (optional, defaults to EN).
*
* Generated from protobuf field optional .openstatus.status_page.v1.Locale default_locale = 6 [json_name = "defaultLocale"];
*/
protected $default_locale = null;
/**
* Enabled locales for the status page (optional).
*
* Generated from protobuf field repeated .openstatus.status_page.v1.Locale locales = 7 [json_name = "locales"];
*/
private $locales;
/**
* Icon URL for the status page (optional).
*
* Generated from protobuf field optional string icon = 8 [json_name = "icon", (.buf.validate.field) = {
*/
protected $icon = null;
/**
* Custom domain for the status page (optional).
*
* Generated from protobuf field optional string custom_domain = 9 [json_name = "customDomain", (.buf.validate.field) = {
*/
protected $custom_domain = null;
/**
* Visual theme for the status page (optional, defaults to SYSTEM).
*
* Generated from protobuf field optional .openstatus.status_page.v1.PageTheme theme = 10 [json_name = "theme"];
*/
protected $theme = null;
/**
* Access type for the status page (optional, defaults to PUBLIC).
*
* Generated from protobuf field optional .openstatus.status_page.v1.PageAccessType access_type = 11 [json_name = "accessType"];
*/
protected $access_type = null;
/**
* Password for the status page (required when access_type is PASSWORD_PROTECTED).
*
* Generated from protobuf field optional string password = 12 [json_name = "password", (.buf.validate.field) = {
*/
protected $password = null;
/**
* Email domains allowed to access the page (used when access_type is AUTHENTICATED).
*
* Generated from protobuf field repeated string auth_email_domains = 13 [json_name = "authEmailDomains"];
*/
private $auth_email_domains;
/**
* Whether search engines are allowed to index this status page (optional, defaults to true).
*
* Generated from protobuf field optional bool allow_index = 14 [json_name = "allowIndex"];
*/
protected $allow_index = null;
/**
* Comma-separated IPv4 CIDR ranges (required when access_type is IP_RESTRICTED).
*
* Generated from protobuf field optional string allowed_ip_ranges = 15 [json_name = "allowedIpRanges"];
*/
protected $allowed_ip_ranges = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $title
* Title of the status page (required).
* @type string $description
* Description of the status page (optional).
* @type string $slug
* URL-friendly slug for the status page (required). Must be lowercase alphanumeric with hyphens.
* @type string $homepage_url
* URL to the homepage (optional).
* @type string $contact_url
* URL to the contact page (optional).
* @type int $default_locale
* Default locale for the status page (optional, defaults to EN).
* @type int[] $locales
* Enabled locales for the status page (optional).
* @type string $icon
* Icon URL for the status page (optional).
* @type string $custom_domain
* Custom domain for the status page (optional).
* @type int $theme
* Visual theme for the status page (optional, defaults to SYSTEM).
* @type int $access_type
* Access type for the status page (optional, defaults to PUBLIC).
* @type string $password
* Password for the status page (required when access_type is PASSWORD_PROTECTED).
* @type string[] $auth_email_domains
* Email domains allowed to access the page (used when access_type is AUTHENTICATED).
* @type bool $allow_index
* Whether search engines are allowed to index this status page (optional, defaults to true).
* @type string $allowed_ip_ranges
* Comma-separated IPv4 CIDR ranges (required when access_type is IP_RESTRICTED).
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Openstatus\StatusPage\V1\Service::initOnce();
parent::__construct($data);
}
/**
* Title of the status page (required).
*
* Generated from protobuf field string title = 1 [json_name = "title", (.gnostic.openapi.v3.property) = {
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Title of the status page (required).
*
* Generated from protobuf field string title = 1 [json_name = "title", (.gnostic.openapi.v3.property) = {
* @param string $var
* @return $this
*/
public function setTitle(string $var)
{
GPBUtil::checkString($var, true);
$this->title = $var;
return $this;
}
/**
* Description of the status page (optional).
*
* Generated from protobuf field optional string description = 2 [json_name = "description", (.buf.validate.field) = {
* @return string
*/
public function getDescription()
{
return isset($this->description) ? $this->description : '';
}
public function hasDescription()
{
return isset($this->description);
}
public function clearDescription()
{
unset($this->description);
}
/**
* Description of the status page (optional).
*
* Generated from protobuf field optional string description = 2 [json_name = "description", (.buf.validate.field) = {
* @param string $var
* @return $this
*/
public function setDescription(string $var)
{
GPBUtil::checkString($var, true);
$this->description = $var;
return $this;
}
/**
* URL-friendly slug for the status page (required). Must be lowercase alphanumeric with hyphens.
*
* Generated from protobuf field string slug = 3 [json_name = "slug", (.gnostic.openapi.v3.property) = {
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* URL-friendly slug for the status page (required). Must be lowercase alphanumeric with hyphens.
*
* Generated from protobuf field string slug = 3 [json_name = "slug", (.gnostic.openapi.v3.property) = {
* @param string $var
* @return $this
*/
public function setSlug(string $var)
{
GPBUtil::checkString($var, true);
$this->slug = $var;
return $this;
}
/**
* URL to the homepage (optional).
*
* Generated from protobuf field optional string homepage_url = 4 [json_name = "homepageUrl", (.gnostic.openapi.v3.property) = {
* @return string
*/
public function getHomepageUrl()
{
return isset($this->homepage_url) ? $this->homepage_url : '';
}
public function hasHomepageUrl()
{
return isset($this->homepage_url);
}
public function clearHomepageUrl()
{
unset($this->homepage_url);
}
/**
* URL to the homepage (optional).
*
* Generated from protobuf field optional string homepage_url = 4 [json_name = "homepageUrl", (.gnostic.openapi.v3.property) = {
* @param string $var
* @return $this
*/
public function setHomepageUrl(string $var)
{
GPBUtil::checkString($var, true);
$this->homepage_url = $var;
return $this;
}
/**
* URL to the contact page (optional).
*
* Generated from protobuf field optional string contact_url = 5 [json_name = "contactUrl"];
* @return string
*/
public function getContactUrl()
{
return isset($this->contact_url) ? $this->contact_url : '';
}
public function hasContactUrl()
{
return isset($this->contact_url);
}
public function clearContactUrl()
{
unset($this->contact_url);
}
/**
* URL to the contact page (optional).
*
* Generated from protobuf field optional string contact_url = 5 [json_name = "contactUrl"];
* @param string $var
* @return $this
*/
public function setContactUrl(string $var)
{
GPBUtil::checkString($var, true);
$this->contact_url = $var;
return $this;
}
/**
* Default locale for the status page (optional, defaults to EN).
*
* Generated from protobuf field optional .openstatus.status_page.v1.Locale default_locale = 6 [json_name = "defaultLocale"];
* @return int one of the values in {@see \Openstatus\Status_page\V1\Locale}
*/
public function getDefaultLocale()
{
return isset($this->default_locale) ? $this->default_locale : 0;
}
public function hasDefaultLocale()
{
return isset($this->default_locale);
}
public function clearDefaultLocale()
{
unset($this->default_locale);
}
/**
* Default locale for the status page (optional, defaults to EN).
*
* Generated from protobuf field optional .openstatus.status_page.v1.Locale default_locale = 6 [json_name = "defaultLocale"];
* @param int $var one of the values in {@see \Openstatus\Status_page\V1\Locale}
* @return $this
*/
public function setDefaultLocale(int $var)
{
GPBUtil::checkEnum($var, \Openstatus\Status_page\V1\Locale::class);
$this->default_locale = $var;
return $this;
}
/**
* Enabled locales for the status page (optional).
*
* Generated from protobuf field repeated .openstatus.status_page.v1.Locale locales = 7 [json_name = "locales"];
* @return RepeatedField one of the values in {@see \Openstatus\Status_page\V1\Locale}
*/
public function getLocales()
{
return $this->locales;
}
/**
* Enabled locales for the status page (optional).
*
* Generated from protobuf field repeated .openstatus.status_page.v1.Locale locales = 7 [json_name = "locales"];
* @param int[] $var one of the values in {@see \Openstatus\Status_page\V1\Locale}
* @return $this
*/
public function setLocales(array|RepeatedField $var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Openstatus\Status_page\V1\Locale::class);
$this->locales = $arr;
return $this;
}
/**
* Icon URL for the status page (optional).
*
* Generated from protobuf field optional string icon = 8 [json_name = "icon", (.buf.validate.field) = {
* @return string
*/
public function getIcon()
{
return isset($this->icon) ? $this->icon : '';
}
public function hasIcon()
{
return isset($this->icon);
}
public function clearIcon()
{
unset($this->icon);
}
/**
* Icon URL for the status page (optional).
*
* Generated from protobuf field optional string icon = 8 [json_name = "icon", (.buf.validate.field) = {
* @param string $var
* @return $this
*/
public function setIcon(string $var)
{
GPBUtil::checkString($var, true);
$this->icon = $var;
return $this;
}
/**
* Custom domain for the status page (optional).
*
* Generated from protobuf field optional string custom_domain = 9 [json_name = "customDomain", (.buf.validate.field) = {
* @return string
*/
public function getCustomDomain()
{
return isset($this->custom_domain) ? $this->custom_domain : '';
}
public function hasCustomDomain()
{
return isset($this->custom_domain);
}
public function clearCustomDomain()
{
unset($this->custom_domain);
}
/**
* Custom domain for the status page (optional).
*
* Generated from protobuf field optional string custom_domain = 9 [json_name = "customDomain", (.buf.validate.field) = {
* @param string $var
* @return $this
*/
public function setCustomDomain(string $var)
{
GPBUtil::checkString($var, true);
$this->custom_domain = $var;
return $this;
}
/**
* Visual theme for the status page (optional, defaults to SYSTEM).
*
* Generated from protobuf field optional .openstatus.status_page.v1.PageTheme theme = 10 [json_name = "theme"];
* @return int one of the values in {@see \Openstatus\Status_page\V1\PageTheme}
*/
public function getTheme()
{
return isset($this->theme) ? $this->theme : 0;
}
public function hasTheme()
{
return isset($this->theme);
}
public function clearTheme()
{
unset($this->theme);
}
/**
* Visual theme for the status page (optional, defaults to SYSTEM).
*
* Generated from protobuf field optional .openstatus.status_page.v1.PageTheme theme = 10 [json_name = "theme"];
* @param int $var one of the values in {@see \Openstatus\Status_page\V1\PageTheme}
* @return $this
*/
public function setTheme(int $var)
{
GPBUtil::checkEnum($var, \Openstatus\Status_page\V1\PageTheme::class);
$this->theme = $var;
return $this;
}
/**
* Access type for the status page (optional, defaults to PUBLIC).
*
* Generated from protobuf field optional .openstatus.status_page.v1.PageAccessType access_type = 11 [json_name = "accessType"];
* @return int one of the values in {@see \Openstatus\Status_page\V1\PageAccessType}
*/
public function getAccessType()
{
return isset($this->access_type) ? $this->access_type : 0;
}
public function hasAccessType()
{
return isset($this->access_type);
}
public function clearAccessType()
{
unset($this->access_type);
}
/**
* Access type for the status page (optional, defaults to PUBLIC).
*
* Generated from protobuf field optional .openstatus.status_page.v1.PageAccessType access_type = 11 [json_name = "accessType"];
* @param int $var one of the values in {@see \Openstatus\Status_page\V1\PageAccessType}
* @return $this
*/
public function setAccessType(int $var)
{
GPBUtil::checkEnum($var, \Openstatus\Status_page\V1\PageAccessType::class);
$this->access_type = $var;
return $this;
}
/**
* Password for the status page (required when access_type is PASSWORD_PROTECTED).
*
* Generated from protobuf field optional string password = 12 [json_name = "password", (.buf.validate.field) = {
* @return string
*/
public function getPassword()
{
return isset($this->password) ? $this->password : '';
}
public function hasPassword()
{
return isset($this->password);
}
public function clearPassword()
{
unset($this->password);
}
/**
* Password for the status page (required when access_type is PASSWORD_PROTECTED).
*
* Generated from protobuf field optional string password = 12 [json_name = "password", (.buf.validate.field) = {
* @param string $var
* @return $this
*/
public function setPassword(string $var)
{
GPBUtil::checkString($var, true);
$this->password = $var;
return $this;
}
/**
* Email domains allowed to access the page (used when access_type is AUTHENTICATED).
*
* Generated from protobuf field repeated string auth_email_domains = 13 [json_name = "authEmailDomains"];
* @return RepeatedField
*/
public function getAuthEmailDomains()
{
return $this->auth_email_domains;
}
/**
* Email domains allowed to access the page (used when access_type is AUTHENTICATED).
*
* Generated from protobuf field repeated string auth_email_domains = 13 [json_name = "authEmailDomains"];
* @param string[] $var
* @return $this
*/
public function setAuthEmailDomains(array|RepeatedField $var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->auth_email_domains = $arr;
return $this;
}
/**
* Whether search engines are allowed to index this status page (optional, defaults to true).
*
* Generated from protobuf field optional bool allow_index = 14 [json_name = "allowIndex"];
* @return bool
*/
public function getAllowIndex()
{
return isset($this->allow_index) ? $this->allow_index : false;
}
public function hasAllowIndex()
{
return isset($this->allow_index);
}
public function clearAllowIndex()
{
unset($this->allow_index);
}
/**
* Whether search engines are allowed to index this status page (optional, defaults to true).
*
* Generated from protobuf field optional bool allow_index = 14 [json_name = "allowIndex"];
* @param bool $var
* @return $this
*/
public function setAllowIndex(bool $var)
{
$this->allow_index = $var;
return $this;
}
/**
* Comma-separated IPv4 CIDR ranges (required when access_type is IP_RESTRICTED).
*
* Generated from protobuf field optional string allowed_ip_ranges = 15 [json_name = "allowedIpRanges"];
* @return string
*/
public function getAllowedIpRanges()
{
return isset($this->allowed_ip_ranges) ? $this->allowed_ip_ranges : '';
}
public function hasAllowedIpRanges()
{
return isset($this->allowed_ip_ranges);
}
public function clearAllowedIpRanges()
{
unset($this->allowed_ip_ranges);
}
/**
* Comma-separated IPv4 CIDR ranges (required when access_type is IP_RESTRICTED).
*
* Generated from protobuf field optional string allowed_ip_ranges = 15 [json_name = "allowedIpRanges"];
* @param string $var
* @return $this
*/
public function setAllowedIpRanges(string $var)
{
GPBUtil::checkString($var, true);
$this->allowed_ip_ranges = $var;
return $this;
}
}