text
stringlengths 2
104M
| meta
dict |
---|---|
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/navigation/navigation_endpoints.proto
namespace Com\Youtube\Innertube\Navigation\NavigationEndpoint;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>com.youtube.innertube.navigation.NavigationEndpoint.SearchEndpoint</code>
*/
class SearchEndpoint extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string query = 1;</code>
*/
protected $query = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $query
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Innertube\Navigation\NavigationEndpoints::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string query = 1;</code>
* @return string
*/
public function getQuery()
{
return $this->query;
}
/**
* Generated from protobuf field <code>string query = 1;</code>
* @param string $var
* @return $this
*/
public function setQuery($var)
{
GPBUtil::checkString($var, True);
$this->query = $var;
return $this;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SearchEndpoint::class, \Com\Youtube\Innertube\Navigation\NavigationEndpoint_SearchEndpoint::class);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/navigation/navigation_endpoints.proto
namespace Com\Youtube\Innertube\Navigation\NavigationEndpoint;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Define submessages
* I have no idea about the accuracy of these in reality.
* The most immediately useful definitions are the browse and
* URL endpoints.
*
* Generated from protobuf message <code>com.youtube.innertube.navigation.NavigationEndpoint.BrowseEndpoint</code>
*/
class BrowseEndpoint extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string browse_id = 2;</code>
*/
protected $browse_id = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $browse_id
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Innertube\Navigation\NavigationEndpoints::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string browse_id = 2;</code>
* @return string
*/
public function getBrowseId()
{
return $this->browse_id;
}
/**
* Generated from protobuf field <code>string browse_id = 2;</code>
* @param string $var
* @return $this
*/
public function setBrowseId($var)
{
GPBUtil::checkString($var, True);
$this->browse_id = $var;
return $this;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(BrowseEndpoint::class, \Com\Youtube\Innertube\Navigation\NavigationEndpoint_BrowseEndpoint::class);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/navigation/navigation_endpoints.proto
namespace Com\Youtube\Innertube\Navigation\NavigationEndpoint;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>com.youtube.innertube.navigation.NavigationEndpoint.UrlEndpoint</code>
*/
class UrlEndpoint extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string url = 1;</code>
*/
protected $url = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $url
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Innertube\Navigation\NavigationEndpoints::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string url = 1;</code>
* @return string
*/
public function getUrl()
{
return $this->url;
}
/**
* Generated from protobuf field <code>string url = 1;</code>
* @param string $var
* @return $this
*/
public function setUrl($var)
{
GPBUtil::checkString($var, True);
$this->url = $var;
return $this;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UrlEndpoint::class, \Com\Youtube\Innertube\Navigation\NavigationEndpoint_UrlEndpoint::class);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/request/search_request_params.proto
namespace Com\Youtube\Innertube\Request;
if (false) {
/**
* This class is deprecated. Use Com\Youtube\Innertube\Request\SearchRequestParams\Filter\UploadDate instead.
* @deprecated
*/
class SearchRequestParams_Filter_UploadDate {}
}
class_exists(SearchRequestParams\Filter\UploadDate::class);
@trigger_error('Com\Youtube\Innertube\Request\SearchRequestParams_Filter_UploadDate is deprecated and will be removed in the next major release. Use Com\Youtube\Innertube\Request\SearchRequestParams\Filter\UploadDate instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/request/search_request_params.proto
namespace Com\Youtube\Innertube\Request;
if (false) {
/**
* This class is deprecated. Use Com\Youtube\Innertube\Request\SearchRequestParams\Filter\Type instead.
* @deprecated
*/
class SearchRequestParams_Filter_Type {}
}
class_exists(SearchRequestParams\Filter\Type::class);
@trigger_error('Com\Youtube\Innertube\Request\SearchRequestParams_Filter_Type is deprecated and will be removed in the next major release. Use Com\Youtube\Innertube\Request\SearchRequestParams\Filter\Type instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: upcoming_event_reminder_request.proto
namespace Com\Youtube\Innertube\Request;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>com.youtube.innertube.request.EventReminderRequestParams</code>
*/
class EventReminderRequestParams extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string video_id = 1;</code>
*/
protected $video_id = '';
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.EventReminderRequestParams.UnknownThing unknown_thing = 6;</code>
*/
protected $unknown_thing = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $video_id
* @type \Com\Youtube\Innertube\Request\EventReminderRequestParams\UnknownThing $unknown_thing
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\UpcomingEventReminderRequest::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string video_id = 1;</code>
* @return string
*/
public function getVideoId()
{
return $this->video_id;
}
/**
* Generated from protobuf field <code>string video_id = 1;</code>
* @param string $var
* @return $this
*/
public function setVideoId($var)
{
GPBUtil::checkString($var, True);
$this->video_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.EventReminderRequestParams.UnknownThing unknown_thing = 6;</code>
* @return \Com\Youtube\Innertube\Request\EventReminderRequestParams\UnknownThing|null
*/
public function getUnknownThing()
{
return $this->unknown_thing;
}
public function hasUnknownThing()
{
return isset($this->unknown_thing);
}
public function clearUnknownThing()
{
unset($this->unknown_thing);
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.EventReminderRequestParams.UnknownThing unknown_thing = 6;</code>
* @param \Com\Youtube\Innertube\Request\EventReminderRequestParams\UnknownThing $var
* @return $this
*/
public function setUnknownThing($var)
{
GPBUtil::checkMessage($var, \Com\Youtube\Innertube\Request\EventReminderRequestParams\UnknownThing::class);
$this->unknown_thing = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/request/next_request_params.proto
namespace Com\Youtube\Innertube\Request;
if (false) {
/**
* This class is deprecated. Use Com\Youtube\Innertube\Request\NextRequestParams\UnknownThing instead.
* @deprecated
*/
class NextRequestParams_UnknownThing {}
}
class_exists(NextRequestParams\UnknownThing::class);
@trigger_error('Com\Youtube\Innertube\Request\NextRequestParams_UnknownThing is deprecated and will be removed in the next major release. Use Com\Youtube\Innertube\Request\NextRequestParams\UnknownThing instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: browse_request_params.proto
namespace Com\Youtube\Innertube\Request;
if (false) {
/**
* This class is deprecated. Use Com\Youtube\Innertube\Request\BrowseRequestParams\LiveView instead.
* @deprecated
*/
class BrowseRequestParams_LiveView {}
}
class_exists(BrowseRequestParams\LiveView::class);
@trigger_error('Com\Youtube\Innertube\Request\BrowseRequestParams_LiveView is deprecated and will be removed in the next major release. Use Com\Youtube\Innertube\Request\BrowseRequestParams\LiveView instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/request/next_request_params.proto
namespace Com\Youtube\Innertube\Request;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>com.youtube.innertube.request.NextRequestParams</code>
*/
class NextRequestParams extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional string linked_comment_id = 15;</code>
*/
protected $linked_comment_id = null;
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.NextRequestParams.UnknownThing unknown_thing = 36;</code>
*/
protected $unknown_thing = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $linked_comment_id
* @type \Com\Youtube\Innertube\Request\NextRequestParams\UnknownThing $unknown_thing
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Innertube\Request\NextRequestParams::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>optional string linked_comment_id = 15;</code>
* @return string
*/
public function getLinkedCommentId()
{
return isset($this->linked_comment_id) ? $this->linked_comment_id : '';
}
public function hasLinkedCommentId()
{
return isset($this->linked_comment_id);
}
public function clearLinkedCommentId()
{
unset($this->linked_comment_id);
}
/**
* Generated from protobuf field <code>optional string linked_comment_id = 15;</code>
* @param string $var
* @return $this
*/
public function setLinkedCommentId($var)
{
GPBUtil::checkString($var, True);
$this->linked_comment_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.NextRequestParams.UnknownThing unknown_thing = 36;</code>
* @return \Com\Youtube\Innertube\Request\NextRequestParams\UnknownThing|null
*/
public function getUnknownThing()
{
return $this->unknown_thing;
}
public function hasUnknownThing()
{
return isset($this->unknown_thing);
}
public function clearUnknownThing()
{
unset($this->unknown_thing);
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.NextRequestParams.UnknownThing unknown_thing = 36;</code>
* @param \Com\Youtube\Innertube\Request\NextRequestParams\UnknownThing $var
* @return $this
*/
public function setUnknownThing($var)
{
GPBUtil::checkMessage($var, \Com\Youtube\Innertube\Request\NextRequestParams\UnknownThing::class);
$this->unknown_thing = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/request/search_request_params.proto
namespace Com\Youtube\Innertube\Request;
if (false) {
/**
* This class is deprecated. Use Com\Youtube\Innertube\Request\SearchRequestParams\Filter\Duration instead.
* @deprecated
*/
class SearchRequestParams_Filter_Duration {}
}
class_exists(SearchRequestParams\Filter\Duration::class);
@trigger_error('Com\Youtube\Innertube\Request\SearchRequestParams_Filter_Duration is deprecated and will be removed in the next major release. Use Com\Youtube\Innertube\Request\SearchRequestParams\Filter\Duration instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/request/search_request_params.proto
namespace Com\Youtube\Innertube\Request;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>com.youtube.innertube.request.SearchRequestParams</code>
*/
class SearchRequestParams extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.SearchRequestParams.Sort sort = 1;</code>
*/
protected $sort = null;
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.SearchRequestParams.Filter filter = 2;</code>
*/
protected $filter = null;
/**
* Search index (offset)
* Typically, this should be equal to
* page number * 20
* for paged results
*
* Generated from protobuf field <code>optional int32 index = 9;</code>
*/
protected $index = null;
/**
* Unknown variable. This is set to an empty string (or a 00 byte)
* in the case of paginated navigation (without filters?)
*
* Generated from protobuf field <code>optional string something = 61;</code>
*/
protected $something = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $sort
* @type \Com\Youtube\Innertube\Request\SearchRequestParams\Filter $filter
* @type int $index
* Search index (offset)
* Typically, this should be equal to
* page number * 20
* for paged results
* @type string $something
* Unknown variable. This is set to an empty string (or a 00 byte)
* in the case of paginated navigation (without filters?)
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Innertube\Request\SearchRequestParams::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.SearchRequestParams.Sort sort = 1;</code>
* @return int
*/
public function getSort()
{
return isset($this->sort) ? $this->sort : 0;
}
public function hasSort()
{
return isset($this->sort);
}
public function clearSort()
{
unset($this->sort);
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.SearchRequestParams.Sort sort = 1;</code>
* @param int $var
* @return $this
*/
public function setSort($var)
{
GPBUtil::checkEnum($var, \Com\Youtube\Innertube\Request\SearchRequestParams\Sort::class);
$this->sort = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.SearchRequestParams.Filter filter = 2;</code>
* @return \Com\Youtube\Innertube\Request\SearchRequestParams\Filter|null
*/
public function getFilter()
{
return $this->filter;
}
public function hasFilter()
{
return isset($this->filter);
}
public function clearFilter()
{
unset($this->filter);
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.SearchRequestParams.Filter filter = 2;</code>
* @param \Com\Youtube\Innertube\Request\SearchRequestParams\Filter $var
* @return $this
*/
public function setFilter($var)
{
GPBUtil::checkMessage($var, \Com\Youtube\Innertube\Request\SearchRequestParams\Filter::class);
$this->filter = $var;
return $this;
}
/**
* Search index (offset)
* Typically, this should be equal to
* page number * 20
* for paged results
*
* Generated from protobuf field <code>optional int32 index = 9;</code>
* @return int
*/
public function getIndex()
{
return isset($this->index) ? $this->index : 0;
}
public function hasIndex()
{
return isset($this->index);
}
public function clearIndex()
{
unset($this->index);
}
/**
* Search index (offset)
* Typically, this should be equal to
* page number * 20
* for paged results
*
* Generated from protobuf field <code>optional int32 index = 9;</code>
* @param int $var
* @return $this
*/
public function setIndex($var)
{
GPBUtil::checkInt32($var);
$this->index = $var;
return $this;
}
/**
* Unknown variable. This is set to an empty string (or a 00 byte)
* in the case of paginated navigation (without filters?)
*
* Generated from protobuf field <code>optional string something = 61;</code>
* @return string
*/
public function getSomething()
{
return isset($this->something) ? $this->something : '';
}
public function hasSomething()
{
return isset($this->something);
}
public function clearSomething()
{
unset($this->something);
}
/**
* Unknown variable. This is set to an empty string (or a 00 byte)
* in the case of paginated navigation (without filters?)
*
* Generated from protobuf field <code>optional string something = 61;</code>
* @param string $var
* @return $this
*/
public function setSomething($var)
{
GPBUtil::checkString($var, True);
$this->something = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: upcoming_event_reminder_request.proto
namespace Com\Youtube\Innertube\Request;
if (false) {
/**
* This class is deprecated. Use Com\Youtube\Innertube\Request\EventReminderRequestParams\UnknownThing instead.
* @deprecated
*/
class EventReminderRequestParams_UnknownThing {}
}
class_exists(EventReminderRequestParams\UnknownThing::class);
@trigger_error('Com\Youtube\Innertube\Request\EventReminderRequestParams_UnknownThing is deprecated and will be removed in the next major release. Use Com\Youtube\Innertube\Request\EventReminderRequestParams\UnknownThing instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/request/search_request_params.proto
namespace Com\Youtube\Innertube\Request;
if (false) {
/**
* This class is deprecated. Use Com\Youtube\Innertube\Request\SearchRequestParams\Filter instead.
* @deprecated
*/
class SearchRequestParams_Filter {}
}
class_exists(SearchRequestParams\Filter::class);
@trigger_error('Com\Youtube\Innertube\Request\SearchRequestParams_Filter is deprecated and will be removed in the next major release. Use Com\Youtube\Innertube\Request\SearchRequestParams\Filter instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: browse_request_params.proto
namespace Com\Youtube\Innertube\Request;
if (false) {
/**
* This class is deprecated. Use Com\Youtube\Innertube\Request\BrowseRequestParams\Flow instead.
* @deprecated
*/
class BrowseRequestParams_Flow {}
}
class_exists(BrowseRequestParams\Flow::class);
@trigger_error('Com\Youtube\Innertube\Request\BrowseRequestParams_Flow is deprecated and will be removed in the next major release. Use Com\Youtube\Innertube\Request\BrowseRequestParams\Flow instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: browse_request_params.proto
namespace Com\Youtube\Innertube\Request;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>com.youtube.innertube.request.BrowseRequestParams</code>
*/
class BrowseRequestParams extends \Google\Protobuf\Internal\Message
{
/**
* ? unknown field used for channel
* search requests. Presumedly an unused
* page parameter.
*
* Generated from protobuf field <code>optional int32 page = 1;</code>
*/
protected $page = null;
/**
* Generated from protobuf field <code>optional string tab = 2;</code>
*/
protected $tab = null;
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.BrowseRequestParams.Sort sort = 3;</code>
*/
protected $sort = null;
/**
* Generated from protobuf field <code>optional int32 view = 4;</code>
*/
protected $view = null;
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.BrowseRequestParams.Flow flow = 6;</code>
*/
protected $flow = null;
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.BrowseRequestParams.LiveView live_view = 7;</code>
*/
protected $live_view = null;
/**
* Generated from protobuf field <code>optional int32 shelf_id = 14;</code>
*/
protected $shelf_id = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $page
* ? unknown field used for channel
* search requests. Presumedly an unused
* page parameter.
* @type string $tab
* @type int $sort
* @type int $view
* @type int $flow
* @type int $live_view
* @type int $shelf_id
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\BrowseRequestParams::initOnce();
parent::__construct($data);
}
/**
* ? unknown field used for channel
* search requests. Presumedly an unused
* page parameter.
*
* Generated from protobuf field <code>optional int32 page = 1;</code>
* @return int
*/
public function getPage()
{
return isset($this->page) ? $this->page : 0;
}
public function hasPage()
{
return isset($this->page);
}
public function clearPage()
{
unset($this->page);
}
/**
* ? unknown field used for channel
* search requests. Presumedly an unused
* page parameter.
*
* Generated from protobuf field <code>optional int32 page = 1;</code>
* @param int $var
* @return $this
*/
public function setPage($var)
{
GPBUtil::checkInt32($var);
$this->page = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional string tab = 2;</code>
* @return string
*/
public function getTab()
{
return isset($this->tab) ? $this->tab : '';
}
public function hasTab()
{
return isset($this->tab);
}
public function clearTab()
{
unset($this->tab);
}
/**
* Generated from protobuf field <code>optional string tab = 2;</code>
* @param string $var
* @return $this
*/
public function setTab($var)
{
GPBUtil::checkString($var, True);
$this->tab = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.BrowseRequestParams.Sort sort = 3;</code>
* @return int
*/
public function getSort()
{
return isset($this->sort) ? $this->sort : 0;
}
public function hasSort()
{
return isset($this->sort);
}
public function clearSort()
{
unset($this->sort);
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.BrowseRequestParams.Sort sort = 3;</code>
* @param int $var
* @return $this
*/
public function setSort($var)
{
GPBUtil::checkEnum($var, \Com\Youtube\Innertube\Request\BrowseRequestParams\Sort::class);
$this->sort = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional int32 view = 4;</code>
* @return int
*/
public function getView()
{
return isset($this->view) ? $this->view : 0;
}
public function hasView()
{
return isset($this->view);
}
public function clearView()
{
unset($this->view);
}
/**
* Generated from protobuf field <code>optional int32 view = 4;</code>
* @param int $var
* @return $this
*/
public function setView($var)
{
GPBUtil::checkInt32($var);
$this->view = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.BrowseRequestParams.Flow flow = 6;</code>
* @return int
*/
public function getFlow()
{
return isset($this->flow) ? $this->flow : 0;
}
public function hasFlow()
{
return isset($this->flow);
}
public function clearFlow()
{
unset($this->flow);
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.BrowseRequestParams.Flow flow = 6;</code>
* @param int $var
* @return $this
*/
public function setFlow($var)
{
GPBUtil::checkEnum($var, \Com\Youtube\Innertube\Request\BrowseRequestParams\Flow::class);
$this->flow = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.BrowseRequestParams.LiveView live_view = 7;</code>
* @return int
*/
public function getLiveView()
{
return isset($this->live_view) ? $this->live_view : 0;
}
public function hasLiveView()
{
return isset($this->live_view);
}
public function clearLiveView()
{
unset($this->live_view);
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.BrowseRequestParams.LiveView live_view = 7;</code>
* @param int $var
* @return $this
*/
public function setLiveView($var)
{
GPBUtil::checkEnum($var, \Com\Youtube\Innertube\Request\BrowseRequestParams\LiveView::class);
$this->live_view = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional int32 shelf_id = 14;</code>
* @return int
*/
public function getShelfId()
{
return isset($this->shelf_id) ? $this->shelf_id : 0;
}
public function hasShelfId()
{
return isset($this->shelf_id);
}
public function clearShelfId()
{
unset($this->shelf_id);
}
/**
* Generated from protobuf field <code>optional int32 shelf_id = 14;</code>
* @param int $var
* @return $this
*/
public function setShelfId($var)
{
GPBUtil::checkInt32($var);
$this->shelf_id = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: browse_request_params.proto
namespace Com\Youtube\Innertube\Request;
if (false) {
/**
* This class is deprecated. Use Com\Youtube\Innertube\Request\BrowseRequestParams\Sort instead.
* @deprecated
*/
class BrowseRequestParams_Sort {}
}
class_exists(BrowseRequestParams\Sort::class);
@trigger_error('Com\Youtube\Innertube\Request\BrowseRequestParams_Sort is deprecated and will be removed in the next major release. Use Com\Youtube\Innertube\Request\BrowseRequestParams\Sort instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/request/search_request_params.proto
namespace Com\Youtube\Innertube\Request;
if (false) {
/**
* This class is deprecated. Use Com\Youtube\Innertube\Request\SearchRequestParams\Sort instead.
* @deprecated
*/
class SearchRequestParams_Sort {}
}
class_exists(SearchRequestParams\Sort::class);
@trigger_error('Com\Youtube\Innertube\Request\SearchRequestParams_Sort is deprecated and will be removed in the next major release. Use Com\Youtube\Innertube\Request\SearchRequestParams\Sort instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: upcoming_event_reminder_request.proto
namespace Com\Youtube\Innertube\Request\EventReminderRequestParams;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Literally have no idea what this does lmao
*
* Generated from protobuf message <code>com.youtube.innertube.request.EventReminderRequestParams.UnknownThing</code>
*/
class UnknownThing extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>int32 unknown_value = 1;</code>
*/
protected $unknown_value = 0;
/**
* Generated from protobuf field <code>int32 unknown_value_2 = 2;</code>
*/
protected $unknown_value_2 = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $unknown_value
* @type int $unknown_value_2
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\UpcomingEventReminderRequest::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>int32 unknown_value = 1;</code>
* @return int
*/
public function getUnknownValue()
{
return $this->unknown_value;
}
/**
* Generated from protobuf field <code>int32 unknown_value = 1;</code>
* @param int $var
* @return $this
*/
public function setUnknownValue($var)
{
GPBUtil::checkInt32($var);
$this->unknown_value = $var;
return $this;
}
/**
* Generated from protobuf field <code>int32 unknown_value_2 = 2;</code>
* @return int
*/
public function getUnknownValue2()
{
return $this->unknown_value_2;
}
/**
* Generated from protobuf field <code>int32 unknown_value_2 = 2;</code>
* @param int $var
* @return $this
*/
public function setUnknownValue2($var)
{
GPBUtil::checkInt32($var);
$this->unknown_value_2 = $var;
return $this;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UnknownThing::class, \Com\Youtube\Innertube\Request\EventReminderRequestParams_UnknownThing::class);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/request/search_request_params.proto
namespace Com\Youtube\Innertube\Request\SearchRequestParams;
use UnexpectedValueException;
/**
* Protobuf type <code>com.youtube.innertube.request.SearchRequestParams.Sort</code>
*/
class Sort
{
/**
* Generated from protobuf enum <code>RELEVANCE = 0;</code>
*/
const RELEVANCE = 0;
/**
* Generated from protobuf enum <code>RATING = 1;</code>
*/
const RATING = 1;
/**
* Generated from protobuf enum <code>UPLOAD_DATE = 2;</code>
*/
const UPLOAD_DATE = 2;
/**
* Generated from protobuf enum <code>VIEW_COUNT = 3;</code>
*/
const VIEW_COUNT = 3;
private static $valueToName = [
self::RELEVANCE => 'RELEVANCE',
self::RATING => 'RATING',
self::UPLOAD_DATE => 'UPLOAD_DATE',
self::VIEW_COUNT => 'VIEW_COUNT',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Sort::class, \Com\Youtube\Innertube\Request\SearchRequestParams_Sort::class);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/request/search_request_params.proto
namespace Com\Youtube\Innertube\Request\SearchRequestParams;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>com.youtube.innertube.request.SearchRequestParams.Filter</code>
*/
class Filter extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.SearchRequestParams.Filter.UploadDate upload_date = 1;</code>
*/
protected $upload_date = null;
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.SearchRequestParams.Filter.Type type = 2;</code>
*/
protected $type = null;
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.SearchRequestParams.Filter.Duration duration = 3;</code>
*/
protected $duration = null;
/**
* Generated from protobuf field <code>optional bool hd = 4;</code>
*/
protected $hd = null;
/**
* Generated from protobuf field <code>optional bool subtitles = 5;</code>
*/
protected $subtitles = null;
/**
* Generated from protobuf field <code>optional bool creative_commons = 6;</code>
*/
protected $creative_commons = null;
/**
* Generated from protobuf field <code>optional bool three_d = 7;</code>
*/
protected $three_d = null;
/**
* Generated from protobuf field <code>optional bool live = 8;</code>
*/
protected $live = null;
/**
* Generated from protobuf field <code>optional bool purchased = 9;</code>
*/
protected $purchased = null;
/**
* Generated from protobuf field <code>optional bool four_k = 14;</code>
*/
protected $four_k = null;
/**
* Generated from protobuf field <code>optional bool three_sixty_degrees = 15;</code>
*/
protected $three_sixty_degrees = null;
/**
* Generated from protobuf field <code>optional bool location = 23;</code>
*/
protected $location = null;
/**
* Generated from protobuf field <code>optional bool hdr = 25;</code>
*/
protected $hdr = null;
/**
* Generated from protobuf field <code>optional bool vr180 = 26;</code>
*/
protected $vr180 = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $upload_date
* @type int $type
* @type int $duration
* @type bool $hd
* @type bool $subtitles
* @type bool $creative_commons
* @type bool $three_d
* @type bool $live
* @type bool $purchased
* @type bool $four_k
* @type bool $three_sixty_degrees
* @type bool $location
* @type bool $hdr
* @type bool $vr180
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Innertube\Request\SearchRequestParams::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.SearchRequestParams.Filter.UploadDate upload_date = 1;</code>
* @return int
*/
public function getUploadDate()
{
return isset($this->upload_date) ? $this->upload_date : 0;
}
public function hasUploadDate()
{
return isset($this->upload_date);
}
public function clearUploadDate()
{
unset($this->upload_date);
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.SearchRequestParams.Filter.UploadDate upload_date = 1;</code>
* @param int $var
* @return $this
*/
public function setUploadDate($var)
{
GPBUtil::checkEnum($var, \Com\Youtube\Innertube\Request\SearchRequestParams\Filter\UploadDate::class);
$this->upload_date = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.SearchRequestParams.Filter.Type type = 2;</code>
* @return int
*/
public function getType()
{
return isset($this->type) ? $this->type : 0;
}
public function hasType()
{
return isset($this->type);
}
public function clearType()
{
unset($this->type);
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.SearchRequestParams.Filter.Type type = 2;</code>
* @param int $var
* @return $this
*/
public function setType($var)
{
GPBUtil::checkEnum($var, \Com\Youtube\Innertube\Request\SearchRequestParams\Filter\Type::class);
$this->type = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.SearchRequestParams.Filter.Duration duration = 3;</code>
* @return int
*/
public function getDuration()
{
return isset($this->duration) ? $this->duration : 0;
}
public function hasDuration()
{
return isset($this->duration);
}
public function clearDuration()
{
unset($this->duration);
}
/**
* Generated from protobuf field <code>optional .com.youtube.innertube.request.SearchRequestParams.Filter.Duration duration = 3;</code>
* @param int $var
* @return $this
*/
public function setDuration($var)
{
GPBUtil::checkEnum($var, \Com\Youtube\Innertube\Request\SearchRequestParams\Filter\Duration::class);
$this->duration = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional bool hd = 4;</code>
* @return bool
*/
public function getHd()
{
return isset($this->hd) ? $this->hd : false;
}
public function hasHd()
{
return isset($this->hd);
}
public function clearHd()
{
unset($this->hd);
}
/**
* Generated from protobuf field <code>optional bool hd = 4;</code>
* @param bool $var
* @return $this
*/
public function setHd($var)
{
GPBUtil::checkBool($var);
$this->hd = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional bool subtitles = 5;</code>
* @return bool
*/
public function getSubtitles()
{
return isset($this->subtitles) ? $this->subtitles : false;
}
public function hasSubtitles()
{
return isset($this->subtitles);
}
public function clearSubtitles()
{
unset($this->subtitles);
}
/**
* Generated from protobuf field <code>optional bool subtitles = 5;</code>
* @param bool $var
* @return $this
*/
public function setSubtitles($var)
{
GPBUtil::checkBool($var);
$this->subtitles = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional bool creative_commons = 6;</code>
* @return bool
*/
public function getCreativeCommons()
{
return isset($this->creative_commons) ? $this->creative_commons : false;
}
public function hasCreativeCommons()
{
return isset($this->creative_commons);
}
public function clearCreativeCommons()
{
unset($this->creative_commons);
}
/**
* Generated from protobuf field <code>optional bool creative_commons = 6;</code>
* @param bool $var
* @return $this
*/
public function setCreativeCommons($var)
{
GPBUtil::checkBool($var);
$this->creative_commons = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional bool three_d = 7;</code>
* @return bool
*/
public function getThreeD()
{
return isset($this->three_d) ? $this->three_d : false;
}
public function hasThreeD()
{
return isset($this->three_d);
}
public function clearThreeD()
{
unset($this->three_d);
}
/**
* Generated from protobuf field <code>optional bool three_d = 7;</code>
* @param bool $var
* @return $this
*/
public function setThreeD($var)
{
GPBUtil::checkBool($var);
$this->three_d = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional bool live = 8;</code>
* @return bool
*/
public function getLive()
{
return isset($this->live) ? $this->live : false;
}
public function hasLive()
{
return isset($this->live);
}
public function clearLive()
{
unset($this->live);
}
/**
* Generated from protobuf field <code>optional bool live = 8;</code>
* @param bool $var
* @return $this
*/
public function setLive($var)
{
GPBUtil::checkBool($var);
$this->live = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional bool purchased = 9;</code>
* @return bool
*/
public function getPurchased()
{
return isset($this->purchased) ? $this->purchased : false;
}
public function hasPurchased()
{
return isset($this->purchased);
}
public function clearPurchased()
{
unset($this->purchased);
}
/**
* Generated from protobuf field <code>optional bool purchased = 9;</code>
* @param bool $var
* @return $this
*/
public function setPurchased($var)
{
GPBUtil::checkBool($var);
$this->purchased = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional bool four_k = 14;</code>
* @return bool
*/
public function getFourK()
{
return isset($this->four_k) ? $this->four_k : false;
}
public function hasFourK()
{
return isset($this->four_k);
}
public function clearFourK()
{
unset($this->four_k);
}
/**
* Generated from protobuf field <code>optional bool four_k = 14;</code>
* @param bool $var
* @return $this
*/
public function setFourK($var)
{
GPBUtil::checkBool($var);
$this->four_k = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional bool three_sixty_degrees = 15;</code>
* @return bool
*/
public function getThreeSixtyDegrees()
{
return isset($this->three_sixty_degrees) ? $this->three_sixty_degrees : false;
}
public function hasThreeSixtyDegrees()
{
return isset($this->three_sixty_degrees);
}
public function clearThreeSixtyDegrees()
{
unset($this->three_sixty_degrees);
}
/**
* Generated from protobuf field <code>optional bool three_sixty_degrees = 15;</code>
* @param bool $var
* @return $this
*/
public function setThreeSixtyDegrees($var)
{
GPBUtil::checkBool($var);
$this->three_sixty_degrees = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional bool location = 23;</code>
* @return bool
*/
public function getLocation()
{
return isset($this->location) ? $this->location : false;
}
public function hasLocation()
{
return isset($this->location);
}
public function clearLocation()
{
unset($this->location);
}
/**
* Generated from protobuf field <code>optional bool location = 23;</code>
* @param bool $var
* @return $this
*/
public function setLocation($var)
{
GPBUtil::checkBool($var);
$this->location = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional bool hdr = 25;</code>
* @return bool
*/
public function getHdr()
{
return isset($this->hdr) ? $this->hdr : false;
}
public function hasHdr()
{
return isset($this->hdr);
}
public function clearHdr()
{
unset($this->hdr);
}
/**
* Generated from protobuf field <code>optional bool hdr = 25;</code>
* @param bool $var
* @return $this
*/
public function setHdr($var)
{
GPBUtil::checkBool($var);
$this->hdr = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional bool vr180 = 26;</code>
* @return bool
*/
public function getVr180()
{
return isset($this->vr180) ? $this->vr180 : false;
}
public function hasVr180()
{
return isset($this->vr180);
}
public function clearVr180()
{
unset($this->vr180);
}
/**
* Generated from protobuf field <code>optional bool vr180 = 26;</code>
* @param bool $var
* @return $this
*/
public function setVr180($var)
{
GPBUtil::checkBool($var);
$this->vr180 = $var;
return $this;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Filter::class, \Com\Youtube\Innertube\Request\SearchRequestParams_Filter::class);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/request/search_request_params.proto
namespace Com\Youtube\Innertube\Request\SearchRequestParams\Filter;
use UnexpectedValueException;
/**
* Protobuf type <code>com.youtube.innertube.request.SearchRequestParams.Filter.UploadDate</code>
*/
class UploadDate
{
/**
* Generated from protobuf enum <code>HOUR = 0;</code>
*/
const HOUR = 0;
/**
* Generated from protobuf enum <code>DAY = 1;</code>
*/
const DAY = 1;
/**
* Generated from protobuf enum <code>WEEK = 2;</code>
*/
const WEEK = 2;
/**
* Generated from protobuf enum <code>MONTH = 3;</code>
*/
const MONTH = 3;
/**
* Generated from protobuf enum <code>YEAR = 4;</code>
*/
const YEAR = 4;
private static $valueToName = [
self::HOUR => 'HOUR',
self::DAY => 'DAY',
self::WEEK => 'WEEK',
self::MONTH => 'MONTH',
self::YEAR => 'YEAR',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UploadDate::class, \Com\Youtube\Innertube\Request\SearchRequestParams_Filter_UploadDate::class);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/request/search_request_params.proto
namespace Com\Youtube\Innertube\Request\SearchRequestParams\Filter;
use UnexpectedValueException;
/**
* Protobuf type <code>com.youtube.innertube.request.SearchRequestParams.Filter.Type</code>
*/
class Type
{
/**
* Should not be used in place of video (1)
*
* Generated from protobuf enum <code>DEFAULT_TYPE = 0;</code>
*/
const DEFAULT_TYPE = 0;
/**
* Generated from protobuf enum <code>VIDEO = 1;</code>
*/
const VIDEO = 1;
/**
* Generated from protobuf enum <code>CHANNEL = 2;</code>
*/
const CHANNEL = 2;
/**
* Generated from protobuf enum <code>PLAYLIST = 3;</code>
*/
const PLAYLIST = 3;
/**
* Generated from protobuf enum <code>MOVIE = 4;</code>
*/
const MOVIE = 4;
private static $valueToName = [
self::DEFAULT_TYPE => 'DEFAULT_TYPE',
self::VIDEO => 'VIDEO',
self::CHANNEL => 'CHANNEL',
self::PLAYLIST => 'PLAYLIST',
self::MOVIE => 'MOVIE',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Type::class, \Com\Youtube\Innertube\Request\SearchRequestParams_Filter_Type::class);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/request/search_request_params.proto
namespace Com\Youtube\Innertube\Request\SearchRequestParams\Filter;
use UnexpectedValueException;
/**
* Protobuf type <code>com.youtube.innertube.request.SearchRequestParams.Filter.Duration</code>
*/
class Duration
{
/**
* Generated from protobuf enum <code>SHORT = 0;</code>
*/
const SHORT = 0;
/**
* Generated from protobuf enum <code>MEDIUM = 2;</code>
*/
const MEDIUM = 2;
/**
* Generated from protobuf enum <code>LONG = 1;</code>
*/
const LONG = 1;
private static $valueToName = [
self::SHORT => 'SHORT',
self::MEDIUM => 'MEDIUM',
self::LONG => 'LONG',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Duration::class, \Com\Youtube\Innertube\Request\SearchRequestParams_Filter_Duration::class);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: innertube/request/next_request_params.proto
namespace Com\Youtube\Innertube\Request\NextRequestParams;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>com.youtube.innertube.request.NextRequestParams.UnknownThing</code>
*/
class UnknownThing extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional int32 a = 24;</code>
*/
protected $a = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $a
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Innertube\Request\NextRequestParams::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>optional int32 a = 24;</code>
* @return int
*/
public function getA()
{
return isset($this->a) ? $this->a : 0;
}
public function hasA()
{
return isset($this->a);
}
public function clearA()
{
unset($this->a);
}
/**
* Generated from protobuf field <code>optional int32 a = 24;</code>
* @param int $var
* @return $this
*/
public function setA($var)
{
GPBUtil::checkInt32($var);
$this->a = $var;
return $this;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UnknownThing::class, \Com\Youtube\Innertube\Request\NextRequestParams_UnknownThing::class);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: browse_request_params.proto
namespace Com\Youtube\Innertube\Request\BrowseRequestParams;
use UnexpectedValueException;
/**
* Protobuf type <code>com.youtube.innertube.request.BrowseRequestParams.LiveView</code>
*/
class LiveView
{
/**
* Generated from protobuf enum <code>DEFAULT_LIVEVIEW = 0;</code>
*/
const DEFAULT_LIVEVIEW = 0;
/**
* Generated from protobuf enum <code>ALL = 1;</code>
*/
const ALL = 1;
/**
* Generated from protobuf enum <code>LIVE = 2;</code>
*/
const LIVE = 2;
/**
* Generated from protobuf enum <code>UPCOMING = 3;</code>
*/
const UPCOMING = 3;
/**
* Generated from protobuf enum <code>PAST = 4;</code>
*/
const PAST = 4;
private static $valueToName = [
self::DEFAULT_LIVEVIEW => 'DEFAULT_LIVEVIEW',
self::ALL => 'ALL',
self::LIVE => 'LIVE',
self::UPCOMING => 'UPCOMING',
self::PAST => 'PAST',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(LiveView::class, \Com\Youtube\Innertube\Request\BrowseRequestParams_LiveView::class);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: browse_request_params.proto
namespace Com\Youtube\Innertube\Request\BrowseRequestParams;
use UnexpectedValueException;
/**
* Protobuf type <code>com.youtube.innertube.request.BrowseRequestParams.Sort</code>
*/
class Sort
{
/**
* Generated from protobuf enum <code>DEFAULT_SORT = 0;</code>
*/
const DEFAULT_SORT = 0;
/**
* Generated from protobuf enum <code>MOST_POPULAR = 1;</code>
*/
const MOST_POPULAR = 1;
/**
* Generated from protobuf enum <code>OLDEST = 2;</code>
*/
const OLDEST = 2;
/**
* Generated from protobuf enum <code>NEWEST = 3;</code>
*/
const NEWEST = 3;
/**
* Generated from protobuf enum <code>LATEST = 4;</code>
*/
const LATEST = 4;
private static $valueToName = [
self::DEFAULT_SORT => 'DEFAULT_SORT',
self::MOST_POPULAR => 'MOST_POPULAR',
self::OLDEST => 'OLDEST',
self::NEWEST => 'NEWEST',
self::LATEST => 'LATEST',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Sort::class, \Com\Youtube\Innertube\Request\BrowseRequestParams_Sort::class);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: browse_request_params.proto
namespace Com\Youtube\Innertube\Request\BrowseRequestParams;
use UnexpectedValueException;
/**
* Protobuf type <code>com.youtube.innertube.request.BrowseRequestParams.Flow</code>
*/
class Flow
{
/**
* Generated from protobuf enum <code>DEFAULT_FLOW = 0;</code>
*/
const DEFAULT_FLOW = 0;
/**
* Generated from protobuf enum <code>GRID = 1;</code>
*/
const GRID = 1;
/**
* Generated from protobuf enum <code>LIST = 2;</code>
*/
const PBLIST = 2;
private static $valueToName = [
self::DEFAULT_FLOW => 'DEFAULT_FLOW',
self::GRID => 'GRID',
self::PBLIST => 'PBLIST',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Flow::class, \Com\Youtube\Innertube\Request\BrowseRequestParams_Flow::class);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: videos_continuation_wrapper.proto
namespace Com\Youtube\Innertube\Helpers;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>com.youtube.innertube.helpers.VideosContinuationWrapper</code>
*/
class VideosContinuationWrapper extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string continuation = 1;</code>
*/
protected $continuation = '';
/**
* Generated from protobuf field <code>bool list = 2;</code>
*/
protected $list = false;
/**
* Generated from protobuf field <code>bool wrap_in_grid = 3;</code>
*/
protected $wrap_in_grid = false;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $continuation
* @type bool $list
* @type bool $wrap_in_grid
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\VideosContinuationWrapper::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string continuation = 1;</code>
* @return string
*/
public function getContinuation()
{
return $this->continuation;
}
/**
* Generated from protobuf field <code>string continuation = 1;</code>
* @param string $var
* @return $this
*/
public function setContinuation($var)
{
GPBUtil::checkString($var, True);
$this->continuation = $var;
return $this;
}
/**
* Generated from protobuf field <code>bool list = 2;</code>
* @return bool
*/
public function getList()
{
return $this->list;
}
/**
* Generated from protobuf field <code>bool list = 2;</code>
* @param bool $var
* @return $this
*/
public function setList($var)
{
GPBUtil::checkBool($var);
$this->list = $var;
return $this;
}
/**
* Generated from protobuf field <code>bool wrap_in_grid = 3;</code>
* @return bool
*/
public function getWrapInGrid()
{
return $this->wrap_in_grid;
}
/**
* Generated from protobuf field <code>bool wrap_in_grid = 3;</code>
* @param bool $var
* @return $this
*/
public function setWrapInGrid($var)
{
GPBUtil::checkBool($var);
$this->wrap_in_grid = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: browse_continuation.proto
namespace Com\Google\Protos\Youtube\Api\Innertube;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Stores information about the action timing.
*
* Generated from protobuf message <code>com.google.protos.youtube.api.innertube.BrowseContinuationActionTiming</code>
*/
class BrowseContinuationActionTiming extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>int64 timestamp = 1;</code>
*/
protected $timestamp = 0;
/**
* Generated from protobuf field <code>optional fixed64 a = 2;</code>
*/
protected $a = null;
/**
* Generated from protobuf field <code>optional fixed64 b = 3;</code>
*/
protected $b = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int|string $timestamp
* @type int|string $a
* @type int|string $b
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\BrowseContinuation::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>int64 timestamp = 1;</code>
* @return int|string
*/
public function getTimestamp()
{
return $this->timestamp;
}
/**
* Generated from protobuf field <code>int64 timestamp = 1;</code>
* @param int|string $var
* @return $this
*/
public function setTimestamp($var)
{
GPBUtil::checkInt64($var);
$this->timestamp = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional fixed64 a = 2;</code>
* @return int|string
*/
public function getA()
{
return isset($this->a) ? $this->a : 0;
}
public function hasA()
{
return isset($this->a);
}
public function clearA()
{
unset($this->a);
}
/**
* Generated from protobuf field <code>optional fixed64 a = 2;</code>
* @param int|string $var
* @return $this
*/
public function setA($var)
{
GPBUtil::checkUint64($var);
$this->a = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional fixed64 b = 3;</code>
* @return int|string
*/
public function getB()
{
return isset($this->b) ? $this->b : 0;
}
public function hasB()
{
return isset($this->b);
}
public function clearB()
{
unset($this->b);
}
/**
* Generated from protobuf field <code>optional fixed64 b = 3;</code>
* @param int|string $var
* @return $this
*/
public function setB($var)
{
GPBUtil::checkUint64($var);
$this->b = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: browse_continuation.proto
namespace Com\Google\Protos\Youtube\Api\Innertube;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* undocumented
*
* Generated from protobuf message <code>com.google.protos.youtube.api.innertube.BrowseContinuationReloadAction</code>
*/
class BrowseContinuationReloadAction extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional int32 a = 1;</code>
*/
protected $a = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $a
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\BrowseContinuation::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>optional int32 a = 1;</code>
* @return int
*/
public function getA()
{
return isset($this->a) ? $this->a : 0;
}
public function hasA()
{
return isset($this->a);
}
public function clearA()
{
unset($this->a);
}
/**
* Generated from protobuf field <code>optional int32 a = 1;</code>
* @param int $var
* @return $this
*/
public function setA($var)
{
GPBUtil::checkInt32($var);
$this->a = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: browse_continuation.proto
namespace Com\Google\Protos\Youtube\Api\Innertube;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* undocumented
*
* Generated from protobuf message <code>com.google.protos.youtube.api.innertube.BrowseContinuationAppendAction</code>
*/
class BrowseContinuationAppendAction extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional int32 a = 1;</code>
*/
protected $a = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $a
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\BrowseContinuation::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>optional int32 a = 1;</code>
* @return int
*/
public function getA()
{
return isset($this->a) ? $this->a : 0;
}
public function hasA()
{
return isset($this->a);
}
public function clearA()
{
unset($this->a);
}
/**
* Generated from protobuf field <code>optional int32 a = 1;</code>
* @param int $var
* @return $this
*/
public function setA($var)
{
GPBUtil::checkInt32($var);
$this->a = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: browse_continuation.proto
namespace Com\Google\Protos\Youtube\Api\Innertube;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Stores information about the continuation action, such as
*its type and timing info.
*
* Generated from protobuf message <code>com.google.protos.youtube.api.innertube.BrowseContinuationAction</code>
*/
class BrowseContinuationAction extends \Google\Protobuf\Internal\Message
{
/**
* possibly bool
*
* Generated from protobuf field <code>int32 idk = 1;</code>
*/
protected $idk = 0;
/**
* Generated from protobuf field <code>string type = 2;</code>
*/
protected $type = '';
/**
* Generated from protobuf field <code>.com.google.protos.youtube.api.innertube.BrowseContinuationActionTiming timing = 3;</code>
*/
protected $timing = null;
/**
* Generated from protobuf field <code>optional .com.google.protos.youtube.api.innertube.BrowseContinuationActionTiming timing_alt = 4;</code>
*/
protected $timing_alt = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $idk
* possibly bool
* @type string $type
* @type \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationActionTiming $timing
* @type \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationActionTiming $timing_alt
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\BrowseContinuation::initOnce();
parent::__construct($data);
}
/**
* possibly bool
*
* Generated from protobuf field <code>int32 idk = 1;</code>
* @return int
*/
public function getIdk()
{
return $this->idk;
}
/**
* possibly bool
*
* Generated from protobuf field <code>int32 idk = 1;</code>
* @param int $var
* @return $this
*/
public function setIdk($var)
{
GPBUtil::checkInt32($var);
$this->idk = $var;
return $this;
}
/**
* Generated from protobuf field <code>string type = 2;</code>
* @return string
*/
public function getType()
{
return $this->type;
}
/**
* Generated from protobuf field <code>string type = 2;</code>
* @param string $var
* @return $this
*/
public function setType($var)
{
GPBUtil::checkString($var, True);
$this->type = $var;
return $this;
}
/**
* Generated from protobuf field <code>.com.google.protos.youtube.api.innertube.BrowseContinuationActionTiming timing = 3;</code>
* @return \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationActionTiming|null
*/
public function getTiming()
{
return $this->timing;
}
public function hasTiming()
{
return isset($this->timing);
}
public function clearTiming()
{
unset($this->timing);
}
/**
* Generated from protobuf field <code>.com.google.protos.youtube.api.innertube.BrowseContinuationActionTiming timing = 3;</code>
* @param \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationActionTiming $var
* @return $this
*/
public function setTiming($var)
{
GPBUtil::checkMessage($var, \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationActionTiming::class);
$this->timing = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional .com.google.protos.youtube.api.innertube.BrowseContinuationActionTiming timing_alt = 4;</code>
* @return \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationActionTiming|null
*/
public function getTimingAlt()
{
return $this->timing_alt;
}
public function hasTimingAlt()
{
return isset($this->timing_alt);
}
public function clearTimingAlt()
{
unset($this->timing_alt);
}
/**
* Generated from protobuf field <code>optional .com.google.protos.youtube.api.innertube.BrowseContinuationActionTiming timing_alt = 4;</code>
* @param \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationActionTiming $var
* @return $this
*/
public function setTimingAlt($var)
{
GPBUtil::checkMessage($var, \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationActionTiming::class);
$this->timing_alt = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: browse_continuation.proto
namespace Com\Google\Protos\Youtube\Api\Innertube;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Stores the actual specific information about a browse continuation.
*
* Generated from protobuf message <code>com.google.protos.youtube.api.innertube.BrowseContinuation</code>
*/
class BrowseContinuation extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>int64 timestamp = 3;</code>
*/
protected $timestamp = 0;
/**
* Generated from protobuf field <code>.com.google.protos.youtube.api.innertube.BrowseContinuationContextWrapper context = 11;</code>
*/
protected $context = null;
/**
* Generated from protobuf field <code>.com.google.protos.youtube.api.innertube.BrowseContinuationAction action = 12;</code>
*/
protected $action = null;
/**
* Generated from protobuf field <code>optional .com.google.protos.youtube.api.innertube.BrowseContinuationReloadAction reload_action = 325832737;</code>
*/
protected $reload_action = null;
/**
* Generated from protobuf field <code>optional .com.google.protos.youtube.api.innertube.BrowseContinuationAppendAction append_action = 318126543;</code>
*/
protected $append_action = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int|string $timestamp
* @type \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationContextWrapper $context
* @type \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationAction $action
* @type \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationReloadAction $reload_action
* @type \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationAppendAction $append_action
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\BrowseContinuation::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>int64 timestamp = 3;</code>
* @return int|string
*/
public function getTimestamp()
{
return $this->timestamp;
}
/**
* Generated from protobuf field <code>int64 timestamp = 3;</code>
* @param int|string $var
* @return $this
*/
public function setTimestamp($var)
{
GPBUtil::checkInt64($var);
$this->timestamp = $var;
return $this;
}
/**
* Generated from protobuf field <code>.com.google.protos.youtube.api.innertube.BrowseContinuationContextWrapper context = 11;</code>
* @return \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationContextWrapper|null
*/
public function getContext()
{
return $this->context;
}
public function hasContext()
{
return isset($this->context);
}
public function clearContext()
{
unset($this->context);
}
/**
* Generated from protobuf field <code>.com.google.protos.youtube.api.innertube.BrowseContinuationContextWrapper context = 11;</code>
* @param \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationContextWrapper $var
* @return $this
*/
public function setContext($var)
{
GPBUtil::checkMessage($var, \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationContextWrapper::class);
$this->context = $var;
return $this;
}
/**
* Generated from protobuf field <code>.com.google.protos.youtube.api.innertube.BrowseContinuationAction action = 12;</code>
* @return \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationAction|null
*/
public function getAction()
{
return $this->action;
}
public function hasAction()
{
return isset($this->action);
}
public function clearAction()
{
unset($this->action);
}
/**
* Generated from protobuf field <code>.com.google.protos.youtube.api.innertube.BrowseContinuationAction action = 12;</code>
* @param \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationAction $var
* @return $this
*/
public function setAction($var)
{
GPBUtil::checkMessage($var, \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationAction::class);
$this->action = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional .com.google.protos.youtube.api.innertube.BrowseContinuationReloadAction reload_action = 325832737;</code>
* @return \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationReloadAction|null
*/
public function getReloadAction()
{
return $this->reload_action;
}
public function hasReloadAction()
{
return isset($this->reload_action);
}
public function clearReloadAction()
{
unset($this->reload_action);
}
/**
* Generated from protobuf field <code>optional .com.google.protos.youtube.api.innertube.BrowseContinuationReloadAction reload_action = 325832737;</code>
* @param \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationReloadAction $var
* @return $this
*/
public function setReloadAction($var)
{
GPBUtil::checkMessage($var, \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationReloadAction::class);
$this->reload_action = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional .com.google.protos.youtube.api.innertube.BrowseContinuationAppendAction append_action = 318126543;</code>
* @return \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationAppendAction|null
*/
public function getAppendAction()
{
return $this->append_action;
}
public function hasAppendAction()
{
return isset($this->append_action);
}
public function clearAppendAction()
{
unset($this->append_action);
}
/**
* Generated from protobuf field <code>optional .com.google.protos.youtube.api.innertube.BrowseContinuationAppendAction append_action = 318126543;</code>
* @param \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationAppendAction $var
* @return $this
*/
public function setAppendAction($var)
{
GPBUtil::checkMessage($var, \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationAppendAction::class);
$this->append_action = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: browse_continuation.proto
namespace Com\Google\Protos\Youtube\Api\Innertube;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Used as the outermost wrapper of a browse continuation,
*provides certain client-specific information.
*
* Generated from protobuf message <code>com.google.protos.youtube.api.innertube.BrowseContinuationWrapper</code>
*/
class BrowseContinuationWrapper extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string browse_id = 2;</code>
*/
protected $browse_id = '';
/**
* An embedded message (encoded in base64) that includes specific information
*for the particular browse page. This stores a ContinuationTypeWrapper.
*
* Generated from protobuf field <code>string encoded_action = 3;</code>
*/
protected $encoded_action = '';
/**
* Generated from protobuf field <code>optional string target_id = 35;</code>
*/
protected $target_id = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $browse_id
* @type string $encoded_action
* An embedded message (encoded in base64) that includes specific information
* for the particular browse page. This stores a ContinuationTypeWrapper.
* @type string $target_id
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\BrowseContinuation::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string browse_id = 2;</code>
* @return string
*/
public function getBrowseId()
{
return $this->browse_id;
}
/**
* Generated from protobuf field <code>string browse_id = 2;</code>
* @param string $var
* @return $this
*/
public function setBrowseId($var)
{
GPBUtil::checkString($var, True);
$this->browse_id = $var;
return $this;
}
/**
* An embedded message (encoded in base64) that includes specific information
*for the particular browse page. This stores a ContinuationTypeWrapper.
*
* Generated from protobuf field <code>string encoded_action = 3;</code>
* @return string
*/
public function getEncodedAction()
{
return $this->encoded_action;
}
/**
* An embedded message (encoded in base64) that includes specific information
*for the particular browse page. This stores a ContinuationTypeWrapper.
*
* Generated from protobuf field <code>string encoded_action = 3;</code>
* @param string $var
* @return $this
*/
public function setEncodedAction($var)
{
GPBUtil::checkString($var, True);
$this->encoded_action = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional string target_id = 35;</code>
* @return string
*/
public function getTargetId()
{
return isset($this->target_id) ? $this->target_id : '';
}
public function hasTargetId()
{
return isset($this->target_id);
}
public function clearTargetId()
{
unset($this->target_id);
}
/**
* Generated from protobuf field <code>optional string target_id = 35;</code>
* @param string $var
* @return $this
*/
public function setTargetId($var)
{
GPBUtil::checkString($var, True);
$this->target_id = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: continuation_wrapper.proto
namespace Com\Google\Protos\Youtube\Api\Innertube;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>com.google.protos.youtube.api.innertube.ContinuationWrapper</code>
*/
class ContinuationWrapper extends \Google\Protobuf\Internal\Message
{
/**
* internal id for browse continuation wrapper
*
* Generated from protobuf field <code>optional .com.google.protos.youtube.api.innertube.BrowseContinuationWrapper browse_continuation = 80226972;</code>
*/
protected $browse_continuation = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationWrapper $browse_continuation
* internal id for browse continuation wrapper
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\ContinuationWrapper::initOnce();
parent::__construct($data);
}
/**
* internal id for browse continuation wrapper
*
* Generated from protobuf field <code>optional .com.google.protos.youtube.api.innertube.BrowseContinuationWrapper browse_continuation = 80226972;</code>
* @return \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationWrapper|null
*/
public function getBrowseContinuation()
{
return $this->browse_continuation;
}
public function hasBrowseContinuation()
{
return isset($this->browse_continuation);
}
public function clearBrowseContinuation()
{
unset($this->browse_continuation);
}
/**
* internal id for browse continuation wrapper
*
* Generated from protobuf field <code>optional .com.google.protos.youtube.api.innertube.BrowseContinuationWrapper browse_continuation = 80226972;</code>
* @param \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationWrapper $var
* @return $this
*/
public function setBrowseContinuation($var)
{
GPBUtil::checkMessage($var, \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationWrapper::class);
$this->browse_continuation = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: continuation_type_wrapper.proto
namespace Com\Google\Protos\Youtube\Api\Innertube;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>com.google.protos.youtube.api.innertube.ContinuationTypeWrapper</code>
*/
class ContinuationTypeWrapper extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional string append_continuation = 15;</code>
*/
protected $append_continuation = null;
/**
* Generated from protobuf field <code>optional string reload_continuation = 72;</code>
*/
protected $reload_continuation = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $append_continuation
* @type string $reload_continuation
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\ContinuationTypeWrapper::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>optional string append_continuation = 15;</code>
* @return string
*/
public function getAppendContinuation()
{
return isset($this->append_continuation) ? $this->append_continuation : '';
}
public function hasAppendContinuation()
{
return isset($this->append_continuation);
}
public function clearAppendContinuation()
{
unset($this->append_continuation);
}
/**
* Generated from protobuf field <code>optional string append_continuation = 15;</code>
* @param string $var
* @return $this
*/
public function setAppendContinuation($var)
{
GPBUtil::checkString($var, True);
$this->append_continuation = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional string reload_continuation = 72;</code>
* @return string
*/
public function getReloadContinuation()
{
return isset($this->reload_continuation) ? $this->reload_continuation : '';
}
public function hasReloadContinuation()
{
return isset($this->reload_continuation);
}
public function clearReloadContinuation()
{
unset($this->reload_continuation);
}
/**
* Generated from protobuf field <code>optional string reload_continuation = 72;</code>
* @param string $var
* @return $this
*/
public function setReloadContinuation($var)
{
GPBUtil::checkString($var, True);
$this->reload_continuation = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: browse_continuation.proto
namespace Com\Google\Protos\Youtube\Api\Innertube;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Wraps the context information of a browse continuation wrapper.
*
* Generated from protobuf message <code>com.google.protos.youtube.api.innertube.BrowseContinuationContextWrapper</code>
*/
class BrowseContinuationContextWrapper extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>.com.google.protos.youtube.api.innertube.BrowseContinuationContext content = 1;</code>
*/
protected $content = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationContext $content
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\BrowseContinuation::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>.com.google.protos.youtube.api.innertube.BrowseContinuationContext content = 1;</code>
* @return \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationContext|null
*/
public function getContent()
{
return $this->content;
}
public function hasContent()
{
return isset($this->content);
}
public function clearContent()
{
unset($this->content);
}
/**
* Generated from protobuf field <code>.com.google.protos.youtube.api.innertube.BrowseContinuationContext content = 1;</code>
* @param \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationContext $var
* @return $this
*/
public function setContent($var)
{
GPBUtil::checkMessage($var, \Com\Google\Protos\Youtube\Api\Innertube\BrowseContinuationContext::class);
$this->content = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: browse_continuation.proto
namespace Com\Google\Protos\Youtube\Api\Innertube;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Stores context information about a browse continuation, such as the
*snapshot and requested client configuration.
*This is possibly only applicable to the homepage API.
*
* Generated from protobuf message <code>com.google.protos.youtube.api.innertube.BrowseContinuationContext</code>
*/
class BrowseContinuationContext extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>string snapshot_type = 1;</code>
*/
protected $snapshot_type = '';
/**
* Generated from protobuf field <code>string internal_id = 2;</code>
*/
protected $internal_id = '';
/**
* Generated from protobuf field <code>bytes context = 3;</code>
*/
protected $context = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $snapshot_type
* @type string $internal_id
* @type string $context
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\BrowseContinuation::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>string snapshot_type = 1;</code>
* @return string
*/
public function getSnapshotType()
{
return $this->snapshot_type;
}
/**
* Generated from protobuf field <code>string snapshot_type = 1;</code>
* @param string $var
* @return $this
*/
public function setSnapshotType($var)
{
GPBUtil::checkString($var, True);
$this->snapshot_type = $var;
return $this;
}
/**
* Generated from protobuf field <code>string internal_id = 2;</code>
* @return string
*/
public function getInternalId()
{
return $this->internal_id;
}
/**
* Generated from protobuf field <code>string internal_id = 2;</code>
* @param string $var
* @return $this
*/
public function setInternalId($var)
{
GPBUtil::checkString($var, True);
$this->internal_id = $var;
return $this;
}
/**
* Generated from protobuf field <code>bytes context = 3;</code>
* @return string
*/
public function getContext()
{
return $this->context;
}
/**
* Generated from protobuf field <code>bytes context = 3;</code>
* @param string $var
* @return $this
*/
public function setContext($var)
{
GPBUtil::checkString($var, False);
$this->context = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/api.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Api is a light-weight descriptor for an API Interface.
* Interfaces are also described as "protocol buffer services" in some contexts,
* such as by the "service" keyword in a .proto file, but they are different
* from API Services, which represent a concrete implementation of an interface
* as opposed to simply a description of methods and bindings. They are also
* sometimes simply referred to as "APIs" in other contexts, such as the name of
* this message itself. See https://cloud.google.com/apis/design/glossary for
* detailed terminology.
*
* Generated from protobuf message <code>google.protobuf.Api</code>
*/
class Api extends \Google\Protobuf\Internal\Message
{
/**
* The fully qualified name of this interface, including package name
* followed by the interface's simple name.
*
* Generated from protobuf field <code>string name = 1;</code>
*/
protected $name = '';
/**
* The methods of this interface, in unspecified order.
*
* Generated from protobuf field <code>repeated .google.protobuf.Method methods = 2;</code>
*/
private $methods;
/**
* Any metadata attached to the interface.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
*/
private $options;
/**
* A version string for this interface. If specified, must have the form
* `major-version.minor-version`, as in `1.10`. If the minor version is
* omitted, it defaults to zero. If the entire version field is empty, the
* major version is derived from the package name, as outlined below. If the
* field is not empty, the version in the package name will be verified to be
* consistent with what is provided here.
* The versioning schema uses [semantic
* versioning](http://semver.org) where the major version number
* indicates a breaking change and the minor version an additive,
* non-breaking change. Both version numbers are signals to users
* what to expect from different versions, and should be carefully
* chosen based on the product plan.
* The major version is also reflected in the package name of the
* interface, which must end in `v<major-version>`, as in
* `google.feature.v1`. For major versions 0 and 1, the suffix can
* be omitted. Zero major versions must only be used for
* experimental, non-GA interfaces.
*
* Generated from protobuf field <code>string version = 4;</code>
*/
protected $version = '';
/**
* Source context for the protocol buffer service represented by this
* message.
*
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
*/
protected $source_context = null;
/**
* Included interfaces. See [Mixin][].
*
* Generated from protobuf field <code>repeated .google.protobuf.Mixin mixins = 6;</code>
*/
private $mixins;
/**
* The source syntax of the service.
*
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
*/
protected $syntax = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* The fully qualified name of this interface, including package name
* followed by the interface's simple name.
* @type array<\Google\Protobuf\Method>|\Google\Protobuf\Internal\RepeatedField $methods
* The methods of this interface, in unspecified order.
* @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
* Any metadata attached to the interface.
* @type string $version
* A version string for this interface. If specified, must have the form
* `major-version.minor-version`, as in `1.10`. If the minor version is
* omitted, it defaults to zero. If the entire version field is empty, the
* major version is derived from the package name, as outlined below. If the
* field is not empty, the version in the package name will be verified to be
* consistent with what is provided here.
* The versioning schema uses [semantic
* versioning](http://semver.org) where the major version number
* indicates a breaking change and the minor version an additive,
* non-breaking change. Both version numbers are signals to users
* what to expect from different versions, and should be carefully
* chosen based on the product plan.
* The major version is also reflected in the package name of the
* interface, which must end in `v<major-version>`, as in
* `google.feature.v1`. For major versions 0 and 1, the suffix can
* be omitted. Zero major versions must only be used for
* experimental, non-GA interfaces.
* @type \Google\Protobuf\SourceContext $source_context
* Source context for the protocol buffer service represented by this
* message.
* @type array<\Google\Protobuf\Mixin>|\Google\Protobuf\Internal\RepeatedField $mixins
* Included interfaces. See [Mixin][].
* @type int $syntax
* The source syntax of the service.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Api::initOnce();
parent::__construct($data);
}
/**
* The fully qualified name of this interface, including package name
* followed by the interface's simple name.
*
* Generated from protobuf field <code>string name = 1;</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The fully qualified name of this interface, including package name
* followed by the interface's simple name.
*
* Generated from protobuf field <code>string name = 1;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* The methods of this interface, in unspecified order.
*
* Generated from protobuf field <code>repeated .google.protobuf.Method methods = 2;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getMethods()
{
return $this->methods;
}
/**
* The methods of this interface, in unspecified order.
*
* Generated from protobuf field <code>repeated .google.protobuf.Method methods = 2;</code>
* @param array<\Google\Protobuf\Method>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setMethods($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Method::class);
$this->methods = $arr;
return $this;
}
/**
* Any metadata attached to the interface.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getOptions()
{
return $this->options;
}
/**
* Any metadata attached to the interface.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
* @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOptions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
$this->options = $arr;
return $this;
}
/**
* A version string for this interface. If specified, must have the form
* `major-version.minor-version`, as in `1.10`. If the minor version is
* omitted, it defaults to zero. If the entire version field is empty, the
* major version is derived from the package name, as outlined below. If the
* field is not empty, the version in the package name will be verified to be
* consistent with what is provided here.
* The versioning schema uses [semantic
* versioning](http://semver.org) where the major version number
* indicates a breaking change and the minor version an additive,
* non-breaking change. Both version numbers are signals to users
* what to expect from different versions, and should be carefully
* chosen based on the product plan.
* The major version is also reflected in the package name of the
* interface, which must end in `v<major-version>`, as in
* `google.feature.v1`. For major versions 0 and 1, the suffix can
* be omitted. Zero major versions must only be used for
* experimental, non-GA interfaces.
*
* Generated from protobuf field <code>string version = 4;</code>
* @return string
*/
public function getVersion()
{
return $this->version;
}
/**
* A version string for this interface. If specified, must have the form
* `major-version.minor-version`, as in `1.10`. If the minor version is
* omitted, it defaults to zero. If the entire version field is empty, the
* major version is derived from the package name, as outlined below. If the
* field is not empty, the version in the package name will be verified to be
* consistent with what is provided here.
* The versioning schema uses [semantic
* versioning](http://semver.org) where the major version number
* indicates a breaking change and the minor version an additive,
* non-breaking change. Both version numbers are signals to users
* what to expect from different versions, and should be carefully
* chosen based on the product plan.
* The major version is also reflected in the package name of the
* interface, which must end in `v<major-version>`, as in
* `google.feature.v1`. For major versions 0 and 1, the suffix can
* be omitted. Zero major versions must only be used for
* experimental, non-GA interfaces.
*
* Generated from protobuf field <code>string version = 4;</code>
* @param string $var
* @return $this
*/
public function setVersion($var)
{
GPBUtil::checkString($var, True);
$this->version = $var;
return $this;
}
/**
* Source context for the protocol buffer service represented by this
* message.
*
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
* @return \Google\Protobuf\SourceContext|null
*/
public function getSourceContext()
{
return $this->source_context;
}
public function hasSourceContext()
{
return isset($this->source_context);
}
public function clearSourceContext()
{
unset($this->source_context);
}
/**
* Source context for the protocol buffer service represented by this
* message.
*
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
* @param \Google\Protobuf\SourceContext $var
* @return $this
*/
public function setSourceContext($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\SourceContext::class);
$this->source_context = $var;
return $this;
}
/**
* Included interfaces. See [Mixin][].
*
* Generated from protobuf field <code>repeated .google.protobuf.Mixin mixins = 6;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getMixins()
{
return $this->mixins;
}
/**
* Included interfaces. See [Mixin][].
*
* Generated from protobuf field <code>repeated .google.protobuf.Mixin mixins = 6;</code>
* @param array<\Google\Protobuf\Mixin>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setMixins($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Mixin::class);
$this->mixins = $arr;
return $this;
}
/**
* The source syntax of the service.
*
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
* @return int
*/
public function getSyntax()
{
return $this->syntax;
}
/**
* The source syntax of the service.
*
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
* @param int $var
* @return $this
*/
public function setSyntax($var)
{
GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
$this->syntax = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/wrappers.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Wrapper message for `uint64`.
* The JSON representation for `UInt64Value` is JSON string.
*
* Generated from protobuf message <code>google.protobuf.UInt64Value</code>
*/
class UInt64Value extends \Google\Protobuf\Internal\Message
{
/**
* The uint64 value.
*
* Generated from protobuf field <code>uint64 value = 1;</code>
*/
protected $value = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int|string $value
* The uint64 value.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Wrappers::initOnce();
parent::__construct($data);
}
/**
* The uint64 value.
*
* Generated from protobuf field <code>uint64 value = 1;</code>
* @return int|string
*/
public function getValue()
{
return $this->value;
}
/**
* The uint64 value.
*
* Generated from protobuf field <code>uint64 value = 1;</code>
* @param int|string $var
* @return $this
*/
public function setValue($var)
{
GPBUtil::checkUint64($var);
$this->value = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/wrappers.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Wrapper message for `int64`.
* The JSON representation for `Int64Value` is JSON string.
*
* Generated from protobuf message <code>google.protobuf.Int64Value</code>
*/
class Int64Value extends \Google\Protobuf\Internal\Message
{
/**
* The int64 value.
*
* Generated from protobuf field <code>int64 value = 1;</code>
*/
protected $value = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int|string $value
* The int64 value.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Wrappers::initOnce();
parent::__construct($data);
}
/**
* The int64 value.
*
* Generated from protobuf field <code>int64 value = 1;</code>
* @return int|string
*/
public function getValue()
{
return $this->value;
}
/**
* The int64 value.
*
* Generated from protobuf field <code>int64 value = 1;</code>
* @param int|string $var
* @return $this
*/
public function setValue($var)
{
GPBUtil::checkInt64($var);
$this->value = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/wrappers.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Wrapper message for `bytes`.
* The JSON representation for `BytesValue` is JSON string.
*
* Generated from protobuf message <code>google.protobuf.BytesValue</code>
*/
class BytesValue extends \Google\Protobuf\Internal\Message
{
/**
* The bytes value.
*
* Generated from protobuf field <code>bytes value = 1;</code>
*/
protected $value = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $value
* The bytes value.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Wrappers::initOnce();
parent::__construct($data);
}
/**
* The bytes value.
*
* Generated from protobuf field <code>bytes value = 1;</code>
* @return string
*/
public function getValue()
{
return $this->value;
}
/**
* The bytes value.
*
* Generated from protobuf field <code>bytes value = 1;</code>
* @param string $var
* @return $this
*/
public function setValue($var)
{
GPBUtil::checkString($var, False);
$this->value = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/empty.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* A generic empty message that you can re-use to avoid defining duplicated
* empty messages in your APIs. A typical example is to use it as the request
* or the response type of an API method. For instance:
* service Foo {
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
* }
*
* Generated from protobuf message <code>google.protobuf.Empty</code>
*/
class GPBEmpty extends \Google\Protobuf\Internal\Message
{
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\GPBEmpty::initOnce();
parent::__construct($data);
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2017 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Google\Protobuf;
use Google\Protobuf\Internal\GetPublicDescriptorTrait;
class OneofDescriptor
{
use GetPublicDescriptorTrait;
/** @var \Google\Protobuf\Internal\OneofDescriptor $internal_desc */
private $internal_desc;
/**
* @internal
*/
public function __construct($internal_desc)
{
$this->internal_desc = $internal_desc;
}
/**
* @return string The name of the oneof
*/
public function getName()
{
return $this->internal_desc->getName();
}
/**
* @param int $index Must be >= 0 and < getFieldCount()
* @return FieldDescriptor
*/
public function getField($index)
{
if (
is_null($this->internal_desc->getFields())
|| !isset($this->internal_desc->getFields()[$index])
) {
return null;
}
return $this->getPublicDescriptor($this->internal_desc->getFields()[$index]);
}
/**
* @return int Number of fields in the oneof
*/
public function getFieldCount()
{
return count($this->internal_desc->getFields());
}
public function isSynthetic()
{
return $this->internal_desc->isSynthetic();
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2017 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Google\Protobuf;
class DescriptorPool
{
private static $pool;
private $internal_pool;
/**
* @return DescriptorPool
*/
public static function getGeneratedPool()
{
if (!isset(self::$pool)) {
self::$pool = new DescriptorPool(\Google\Protobuf\Internal\DescriptorPool::getGeneratedPool());
}
return self::$pool;
}
private function __construct($internal_pool)
{
$this->internal_pool = $internal_pool;
}
/**
* @param string $className A fully qualified protobuf class name
* @return Descriptor
*/
public function getDescriptorByClassName($className)
{
$desc = $this->internal_pool->getDescriptorByClassName($className);
return is_null($desc) ? null : $desc->getPublicDescriptor();
}
/**
* @param string $className A fully qualified protobuf class name
* @return EnumDescriptor
*/
public function getEnumDescriptorByClassName($className)
{
$desc = $this->internal_pool->getEnumDescriptorByClassName($className);
return is_null($desc) ? null : $desc->getPublicDescriptor();
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/api.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Declares an API Interface to be included in this interface. The including
* interface must redeclare all the methods from the included interface, but
* documentation and options are inherited as follows:
* - If after comment and whitespace stripping, the documentation
* string of the redeclared method is empty, it will be inherited
* from the original method.
* - Each annotation belonging to the service config (http,
* visibility) which is not set in the redeclared method will be
* inherited.
* - If an http annotation is inherited, the path pattern will be
* modified as follows. Any version prefix will be replaced by the
* version of the including interface plus the [root][] path if
* specified.
* Example of a simple mixin:
* package google.acl.v1;
* service AccessControl {
* // Get the underlying ACL object.
* rpc GetAcl(GetAclRequest) returns (Acl) {
* option (google.api.http).get = "/v1/{resource=**}:getAcl";
* }
* }
* package google.storage.v2;
* service Storage {
* rpc GetAcl(GetAclRequest) returns (Acl);
* // Get a data record.
* rpc GetData(GetDataRequest) returns (Data) {
* option (google.api.http).get = "/v2/{resource=**}";
* }
* }
* Example of a mixin configuration:
* apis:
* - name: google.storage.v2.Storage
* mixins:
* - name: google.acl.v1.AccessControl
* The mixin construct implies that all methods in `AccessControl` are
* also declared with same name and request/response types in
* `Storage`. A documentation generator or annotation processor will
* see the effective `Storage.GetAcl` method after inheriting
* documentation and annotations as follows:
* service Storage {
* // Get the underlying ACL object.
* rpc GetAcl(GetAclRequest) returns (Acl) {
* option (google.api.http).get = "/v2/{resource=**}:getAcl";
* }
* ...
* }
* Note how the version in the path pattern changed from `v1` to `v2`.
* If the `root` field in the mixin is specified, it should be a
* relative path under which inherited HTTP paths are placed. Example:
* apis:
* - name: google.storage.v2.Storage
* mixins:
* - name: google.acl.v1.AccessControl
* root: acls
* This implies the following inherited HTTP annotation:
* service Storage {
* // Get the underlying ACL object.
* rpc GetAcl(GetAclRequest) returns (Acl) {
* option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
* }
* ...
* }
*
* Generated from protobuf message <code>google.protobuf.Mixin</code>
*/
class Mixin extends \Google\Protobuf\Internal\Message
{
/**
* The fully qualified name of the interface which is included.
*
* Generated from protobuf field <code>string name = 1;</code>
*/
protected $name = '';
/**
* If non-empty specifies a path under which inherited HTTP paths
* are rooted.
*
* Generated from protobuf field <code>string root = 2;</code>
*/
protected $root = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* The fully qualified name of the interface which is included.
* @type string $root
* If non-empty specifies a path under which inherited HTTP paths
* are rooted.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Api::initOnce();
parent::__construct($data);
}
/**
* The fully qualified name of the interface which is included.
*
* Generated from protobuf field <code>string name = 1;</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The fully qualified name of the interface which is included.
*
* Generated from protobuf field <code>string name = 1;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* If non-empty specifies a path under which inherited HTTP paths
* are rooted.
*
* Generated from protobuf field <code>string root = 2;</code>
* @return string
*/
public function getRoot()
{
return $this->root;
}
/**
* If non-empty specifies a path under which inherited HTTP paths
* are rooted.
*
* Generated from protobuf field <code>string root = 2;</code>
* @param string $var
* @return $this
*/
public function setRoot($var)
{
GPBUtil::checkString($var, True);
$this->root = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/struct.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* `ListValue` is a wrapper around a repeated field of values.
* The JSON representation for `ListValue` is JSON array.
*
* Generated from protobuf message <code>google.protobuf.ListValue</code>
*/
class ListValue extends \Google\Protobuf\Internal\Message
{
/**
* Repeated field of dynamically typed values.
*
* Generated from protobuf field <code>repeated .google.protobuf.Value values = 1;</code>
*/
private $values;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type array<\Google\Protobuf\Value>|\Google\Protobuf\Internal\RepeatedField $values
* Repeated field of dynamically typed values.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Struct::initOnce();
parent::__construct($data);
}
/**
* Repeated field of dynamically typed values.
*
* Generated from protobuf field <code>repeated .google.protobuf.Value values = 1;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getValues()
{
return $this->values;
}
/**
* Repeated field of dynamically typed values.
*
* Generated from protobuf field <code>repeated .google.protobuf.Value values = 1;</code>
* @param array<\Google\Protobuf\Value>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setValues($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class);
$this->values = $arr;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/struct.proto
namespace Google\Protobuf;
use UnexpectedValueException;
/**
* `NullValue` is a singleton enumeration to represent the null value for the
* `Value` type union.
* The JSON representation for `NullValue` is JSON `null`.
*
* Protobuf type <code>google.protobuf.NullValue</code>
*/
class NullValue
{
/**
* Null value.
*
* Generated from protobuf enum <code>NULL_VALUE = 0;</code>
*/
const NULL_VALUE = 0;
private static $valueToName = [
self::NULL_VALUE => 'NULL_VALUE',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/source_context.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* `SourceContext` represents information about the source of a
* protobuf element, like the file in which it is defined.
*
* Generated from protobuf message <code>google.protobuf.SourceContext</code>
*/
class SourceContext extends \Google\Protobuf\Internal\Message
{
/**
* The path-qualified name of the .proto file that contained the associated
* protobuf element. For example: `"google/protobuf/source_context.proto"`.
*
* Generated from protobuf field <code>string file_name = 1;</code>
*/
protected $file_name = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $file_name
* The path-qualified name of the .proto file that contained the associated
* protobuf element. For example: `"google/protobuf/source_context.proto"`.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\SourceContext::initOnce();
parent::__construct($data);
}
/**
* The path-qualified name of the .proto file that contained the associated
* protobuf element. For example: `"google/protobuf/source_context.proto"`.
*
* Generated from protobuf field <code>string file_name = 1;</code>
* @return string
*/
public function getFileName()
{
return $this->file_name;
}
/**
* The path-qualified name of the .proto file that contained the associated
* protobuf element. For example: `"google/protobuf/source_context.proto"`.
*
* Generated from protobuf field <code>string file_name = 1;</code>
* @param string $var
* @return $this
*/
public function setFileName($var)
{
GPBUtil::checkString($var, True);
$this->file_name = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/type.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* A protocol buffer message type.
*
* Generated from protobuf message <code>google.protobuf.Type</code>
*/
class Type extends \Google\Protobuf\Internal\Message
{
/**
* The fully qualified message name.
*
* Generated from protobuf field <code>string name = 1;</code>
*/
protected $name = '';
/**
* The list of fields.
*
* Generated from protobuf field <code>repeated .google.protobuf.Field fields = 2;</code>
*/
private $fields;
/**
* The list of types appearing in `oneof` definitions in this type.
*
* Generated from protobuf field <code>repeated string oneofs = 3;</code>
*/
private $oneofs;
/**
* The protocol buffer options.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 4;</code>
*/
private $options;
/**
* The source context.
*
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
*/
protected $source_context = null;
/**
* The source syntax.
*
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 6;</code>
*/
protected $syntax = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* The fully qualified message name.
* @type array<\Google\Protobuf\Field>|\Google\Protobuf\Internal\RepeatedField $fields
* The list of fields.
* @type array<string>|\Google\Protobuf\Internal\RepeatedField $oneofs
* The list of types appearing in `oneof` definitions in this type.
* @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
* The protocol buffer options.
* @type \Google\Protobuf\SourceContext $source_context
* The source context.
* @type int $syntax
* The source syntax.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Type::initOnce();
parent::__construct($data);
}
/**
* The fully qualified message name.
*
* Generated from protobuf field <code>string name = 1;</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The fully qualified message name.
*
* Generated from protobuf field <code>string name = 1;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* The list of fields.
*
* Generated from protobuf field <code>repeated .google.protobuf.Field fields = 2;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getFields()
{
return $this->fields;
}
/**
* The list of fields.
*
* Generated from protobuf field <code>repeated .google.protobuf.Field fields = 2;</code>
* @param array<\Google\Protobuf\Field>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setFields($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Field::class);
$this->fields = $arr;
return $this;
}
/**
* The list of types appearing in `oneof` definitions in this type.
*
* Generated from protobuf field <code>repeated string oneofs = 3;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getOneofs()
{
return $this->oneofs;
}
/**
* The list of types appearing in `oneof` definitions in this type.
*
* Generated from protobuf field <code>repeated string oneofs = 3;</code>
* @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOneofs($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->oneofs = $arr;
return $this;
}
/**
* The protocol buffer options.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 4;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getOptions()
{
return $this->options;
}
/**
* The protocol buffer options.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 4;</code>
* @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOptions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
$this->options = $arr;
return $this;
}
/**
* The source context.
*
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
* @return \Google\Protobuf\SourceContext|null
*/
public function getSourceContext()
{
return $this->source_context;
}
public function hasSourceContext()
{
return isset($this->source_context);
}
public function clearSourceContext()
{
unset($this->source_context);
}
/**
* The source context.
*
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 5;</code>
* @param \Google\Protobuf\SourceContext $var
* @return $this
*/
public function setSourceContext($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\SourceContext::class);
$this->source_context = $var;
return $this;
}
/**
* The source syntax.
*
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 6;</code>
* @return int
*/
public function getSyntax()
{
return $this->syntax;
}
/**
* The source syntax.
*
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 6;</code>
* @param int $var
* @return $this
*/
public function setSyntax($var)
{
GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
$this->syntax = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Google\Protobuf;
class EnumValueDescriptor
{
private $name;
private $number;
/**
* @internal
*/
public function __construct($name, $number)
{
$this->name = $name;
$this->number = $number;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @return int
*/
public function getNumber()
{
return $this->number;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/type.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* A protocol buffer option, which can be attached to a message, field,
* enumeration, etc.
*
* Generated from protobuf message <code>google.protobuf.Option</code>
*/
class Option extends \Google\Protobuf\Internal\Message
{
/**
* The option's name. For protobuf built-in options (options defined in
* descriptor.proto), this is the short name. For example, `"map_entry"`.
* For custom options, it should be the fully-qualified name. For example,
* `"google.api.http"`.
*
* Generated from protobuf field <code>string name = 1;</code>
*/
protected $name = '';
/**
* The option's value packed in an Any message. If the value is a primitive,
* the corresponding wrapper type defined in google/protobuf/wrappers.proto
* should be used. If the value is an enum, it should be stored as an int32
* value using the google.protobuf.Int32Value type.
*
* Generated from protobuf field <code>.google.protobuf.Any value = 2;</code>
*/
protected $value = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* The option's name. For protobuf built-in options (options defined in
* descriptor.proto), this is the short name. For example, `"map_entry"`.
* For custom options, it should be the fully-qualified name. For example,
* `"google.api.http"`.
* @type \Google\Protobuf\Any $value
* The option's value packed in an Any message. If the value is a primitive,
* the corresponding wrapper type defined in google/protobuf/wrappers.proto
* should be used. If the value is an enum, it should be stored as an int32
* value using the google.protobuf.Int32Value type.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Type::initOnce();
parent::__construct($data);
}
/**
* The option's name. For protobuf built-in options (options defined in
* descriptor.proto), this is the short name. For example, `"map_entry"`.
* For custom options, it should be the fully-qualified name. For example,
* `"google.api.http"`.
*
* Generated from protobuf field <code>string name = 1;</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The option's name. For protobuf built-in options (options defined in
* descriptor.proto), this is the short name. For example, `"map_entry"`.
* For custom options, it should be the fully-qualified name. For example,
* `"google.api.http"`.
*
* Generated from protobuf field <code>string name = 1;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* The option's value packed in an Any message. If the value is a primitive,
* the corresponding wrapper type defined in google/protobuf/wrappers.proto
* should be used. If the value is an enum, it should be stored as an int32
* value using the google.protobuf.Int32Value type.
*
* Generated from protobuf field <code>.google.protobuf.Any value = 2;</code>
* @return \Google\Protobuf\Any|null
*/
public function getValue()
{
return $this->value;
}
public function hasValue()
{
return isset($this->value);
}
public function clearValue()
{
unset($this->value);
}
/**
* The option's value packed in an Any message. If the value is a primitive,
* the corresponding wrapper type defined in google/protobuf/wrappers.proto
* should be used. If the value is an enum, it should be stored as an int32
* value using the google.protobuf.Int32Value type.
*
* Generated from protobuf field <code>.google.protobuf.Any value = 2;</code>
* @param \Google\Protobuf\Any $var
* @return $this
*/
public function setValue($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Any::class);
$this->value = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/struct.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* `Struct` represents a structured data value, consisting of fields
* which map to dynamically typed values. In some languages, `Struct`
* might be supported by a native representation. For example, in
* scripting languages like JS a struct is represented as an
* object. The details of that representation are described together
* with the proto support for the language.
* The JSON representation for `Struct` is JSON object.
*
* Generated from protobuf message <code>google.protobuf.Struct</code>
*/
class Struct extends \Google\Protobuf\Internal\Message
{
/**
* Unordered map of dynamically typed values.
*
* Generated from protobuf field <code>map<string, .google.protobuf.Value> fields = 1;</code>
*/
private $fields;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type array|\Google\Protobuf\Internal\MapField $fields
* Unordered map of dynamically typed values.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Struct::initOnce();
parent::__construct($data);
}
/**
* Unordered map of dynamically typed values.
*
* Generated from protobuf field <code>map<string, .google.protobuf.Value> fields = 1;</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getFields()
{
return $this->fields;
}
/**
* Unordered map of dynamically typed values.
*
* Generated from protobuf field <code>map<string, .google.protobuf.Value> fields = 1;</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setFields($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class);
$this->fields = $arr;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/type.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* A single field of a message type.
*
* Generated from protobuf message <code>google.protobuf.Field</code>
*/
class Field extends \Google\Protobuf\Internal\Message
{
/**
* The field type.
*
* Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code>
*/
protected $kind = 0;
/**
* The field cardinality.
*
* Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code>
*/
protected $cardinality = 0;
/**
* The field number.
*
* Generated from protobuf field <code>int32 number = 3;</code>
*/
protected $number = 0;
/**
* The field name.
*
* Generated from protobuf field <code>string name = 4;</code>
*/
protected $name = '';
/**
* The field type URL, without the scheme, for message or enumeration
* types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
*
* Generated from protobuf field <code>string type_url = 6;</code>
*/
protected $type_url = '';
/**
* The index of the field type in `Type.oneofs`, for message or enumeration
* types. The first type has index 1; zero means the type is not in the list.
*
* Generated from protobuf field <code>int32 oneof_index = 7;</code>
*/
protected $oneof_index = 0;
/**
* Whether to use alternative packed wire representation.
*
* Generated from protobuf field <code>bool packed = 8;</code>
*/
protected $packed = false;
/**
* The protocol buffer options.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code>
*/
private $options;
/**
* The field JSON name.
*
* Generated from protobuf field <code>string json_name = 10;</code>
*/
protected $json_name = '';
/**
* The string value of the default value of this field. Proto2 syntax only.
*
* Generated from protobuf field <code>string default_value = 11;</code>
*/
protected $default_value = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $kind
* The field type.
* @type int $cardinality
* The field cardinality.
* @type int $number
* The field number.
* @type string $name
* The field name.
* @type string $type_url
* The field type URL, without the scheme, for message or enumeration
* types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
* @type int $oneof_index
* The index of the field type in `Type.oneofs`, for message or enumeration
* types. The first type has index 1; zero means the type is not in the list.
* @type bool $packed
* Whether to use alternative packed wire representation.
* @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
* The protocol buffer options.
* @type string $json_name
* The field JSON name.
* @type string $default_value
* The string value of the default value of this field. Proto2 syntax only.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Type::initOnce();
parent::__construct($data);
}
/**
* The field type.
*
* Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code>
* @return int
*/
public function getKind()
{
return $this->kind;
}
/**
* The field type.
*
* Generated from protobuf field <code>.google.protobuf.Field.Kind kind = 1;</code>
* @param int $var
* @return $this
*/
public function setKind($var)
{
GPBUtil::checkEnum($var, \Google\Protobuf\Field\Kind::class);
$this->kind = $var;
return $this;
}
/**
* The field cardinality.
*
* Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code>
* @return int
*/
public function getCardinality()
{
return $this->cardinality;
}
/**
* The field cardinality.
*
* Generated from protobuf field <code>.google.protobuf.Field.Cardinality cardinality = 2;</code>
* @param int $var
* @return $this
*/
public function setCardinality($var)
{
GPBUtil::checkEnum($var, \Google\Protobuf\Field\Cardinality::class);
$this->cardinality = $var;
return $this;
}
/**
* The field number.
*
* Generated from protobuf field <code>int32 number = 3;</code>
* @return int
*/
public function getNumber()
{
return $this->number;
}
/**
* The field number.
*
* Generated from protobuf field <code>int32 number = 3;</code>
* @param int $var
* @return $this
*/
public function setNumber($var)
{
GPBUtil::checkInt32($var);
$this->number = $var;
return $this;
}
/**
* The field name.
*
* Generated from protobuf field <code>string name = 4;</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The field name.
*
* Generated from protobuf field <code>string name = 4;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* The field type URL, without the scheme, for message or enumeration
* types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
*
* Generated from protobuf field <code>string type_url = 6;</code>
* @return string
*/
public function getTypeUrl()
{
return $this->type_url;
}
/**
* The field type URL, without the scheme, for message or enumeration
* types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
*
* Generated from protobuf field <code>string type_url = 6;</code>
* @param string $var
* @return $this
*/
public function setTypeUrl($var)
{
GPBUtil::checkString($var, True);
$this->type_url = $var;
return $this;
}
/**
* The index of the field type in `Type.oneofs`, for message or enumeration
* types. The first type has index 1; zero means the type is not in the list.
*
* Generated from protobuf field <code>int32 oneof_index = 7;</code>
* @return int
*/
public function getOneofIndex()
{
return $this->oneof_index;
}
/**
* The index of the field type in `Type.oneofs`, for message or enumeration
* types. The first type has index 1; zero means the type is not in the list.
*
* Generated from protobuf field <code>int32 oneof_index = 7;</code>
* @param int $var
* @return $this
*/
public function setOneofIndex($var)
{
GPBUtil::checkInt32($var);
$this->oneof_index = $var;
return $this;
}
/**
* Whether to use alternative packed wire representation.
*
* Generated from protobuf field <code>bool packed = 8;</code>
* @return bool
*/
public function getPacked()
{
return $this->packed;
}
/**
* Whether to use alternative packed wire representation.
*
* Generated from protobuf field <code>bool packed = 8;</code>
* @param bool $var
* @return $this
*/
public function setPacked($var)
{
GPBUtil::checkBool($var);
$this->packed = $var;
return $this;
}
/**
* The protocol buffer options.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getOptions()
{
return $this->options;
}
/**
* The protocol buffer options.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 9;</code>
* @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOptions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
$this->options = $arr;
return $this;
}
/**
* The field JSON name.
*
* Generated from protobuf field <code>string json_name = 10;</code>
* @return string
*/
public function getJsonName()
{
return $this->json_name;
}
/**
* The field JSON name.
*
* Generated from protobuf field <code>string json_name = 10;</code>
* @param string $var
* @return $this
*/
public function setJsonName($var)
{
GPBUtil::checkString($var, True);
$this->json_name = $var;
return $this;
}
/**
* The string value of the default value of this field. Proto2 syntax only.
*
* Generated from protobuf field <code>string default_value = 11;</code>
* @return string
*/
public function getDefaultValue()
{
return $this->default_value;
}
/**
* The string value of the default value of this field. Proto2 syntax only.
*
* Generated from protobuf field <code>string default_value = 11;</code>
* @param string $var
* @return $this
*/
public function setDefaultValue($var)
{
GPBUtil::checkString($var, True);
$this->default_value = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/wrappers.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Wrapper message for `bool`.
* The JSON representation for `BoolValue` is JSON `true` and `false`.
*
* Generated from protobuf message <code>google.protobuf.BoolValue</code>
*/
class BoolValue extends \Google\Protobuf\Internal\Message
{
/**
* The bool value.
*
* Generated from protobuf field <code>bool value = 1;</code>
*/
protected $value = false;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type bool $value
* The bool value.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Wrappers::initOnce();
parent::__construct($data);
}
/**
* The bool value.
*
* Generated from protobuf field <code>bool value = 1;</code>
* @return bool
*/
public function getValue()
{
return $this->value;
}
/**
* The bool value.
*
* Generated from protobuf field <code>bool value = 1;</code>
* @param bool $var
* @return $this
*/
public function setValue($var)
{
GPBUtil::checkBool($var);
$this->value = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/type.proto
namespace Google\Protobuf;
if (false) {
/**
* This class is deprecated. Use Google\Protobuf\Field\Cardinality instead.
* @deprecated
*/
class Field_Cardinality {}
}
class_exists(Field\Cardinality::class);
@trigger_error('Google\Protobuf\Field_Cardinality is deprecated and will be removed in the next major release. Use Google\Protobuf\Field\Cardinality instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/wrappers.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Wrapper message for `int32`.
* The JSON representation for `Int32Value` is JSON number.
*
* Generated from protobuf message <code>google.protobuf.Int32Value</code>
*/
class Int32Value extends \Google\Protobuf\Internal\Message
{
/**
* The int32 value.
*
* Generated from protobuf field <code>int32 value = 1;</code>
*/
protected $value = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $value
* The int32 value.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Wrappers::initOnce();
parent::__construct($data);
}
/**
* The int32 value.
*
* Generated from protobuf field <code>int32 value = 1;</code>
* @return int
*/
public function getValue()
{
return $this->value;
}
/**
* The int32 value.
*
* Generated from protobuf field <code>int32 value = 1;</code>
* @param int $var
* @return $this
*/
public function setValue($var)
{
GPBUtil::checkInt32($var);
$this->value = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2017 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Google\Protobuf;
use Google\Protobuf\Internal\GetPublicDescriptorTrait;
use Google\Protobuf\Internal\GPBType;
class FieldDescriptor
{
use GetPublicDescriptorTrait;
/** @var \Google\Protobuf\Internal\FieldDescriptor $internal_desc */
private $internal_desc;
/**
* @internal
*/
public function __construct($internal_desc)
{
$this->internal_desc = $internal_desc;
}
/**
* @return string Field name
*/
public function getName()
{
return $this->internal_desc->getName();
}
/**
* @return int Protobuf field number
*/
public function getNumber()
{
return $this->internal_desc->getNumber();
}
/**
* @return int
*/
public function getLabel()
{
return $this->internal_desc->getLabel();
}
/**
* @return int
*/
public function getType()
{
return $this->internal_desc->getType();
}
/**
* @return OneofDescriptor
*/
public function getContainingOneof()
{
return $this->getPublicDescriptor($this->internal_desc->getContainingOneof());
}
/**
* Gets the field's containing oneof, only if non-synthetic.
*
* @return null|OneofDescriptor
*/
public function getRealContainingOneof()
{
return $this->getPublicDescriptor($this->internal_desc->getRealContainingOneof());
}
/**
* @return boolean
*/
public function hasOptionalKeyword()
{
return $this->internal_desc->hasOptionalKeyword();
}
/**
* @return Descriptor Returns a descriptor for the field type if the field type is a message, otherwise throws \Exception
* @throws \Exception
*/
public function getMessageType()
{
if ($this->getType() == GPBType::MESSAGE) {
return $this->getPublicDescriptor($this->internal_desc->getMessageType());
} else {
throw new \Exception("Cannot get message type for non-message field '" . $this->getName() . "'");
}
}
/**
* @return EnumDescriptor Returns an enum descriptor if the field type is an enum, otherwise throws \Exception
* @throws \Exception
*/
public function getEnumType()
{
if ($this->getType() == GPBType::ENUM) {
return $this->getPublicDescriptor($this->internal_desc->getEnumType());
} else {
throw new \Exception("Cannot get enum type for non-enum field '" . $this->getName() . "'");
}
}
/**
* @return boolean
*/
public function isMap()
{
return $this->internal_desc->isMap();
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/type.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Enum value definition.
*
* Generated from protobuf message <code>google.protobuf.EnumValue</code>
*/
class EnumValue extends \Google\Protobuf\Internal\Message
{
/**
* Enum value name.
*
* Generated from protobuf field <code>string name = 1;</code>
*/
protected $name = '';
/**
* Enum value number.
*
* Generated from protobuf field <code>int32 number = 2;</code>
*/
protected $number = 0;
/**
* Protocol buffer options.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
*/
private $options;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* Enum value name.
* @type int $number
* Enum value number.
* @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
* Protocol buffer options.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Type::initOnce();
parent::__construct($data);
}
/**
* Enum value name.
*
* Generated from protobuf field <code>string name = 1;</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Enum value name.
*
* Generated from protobuf field <code>string name = 1;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Enum value number.
*
* Generated from protobuf field <code>int32 number = 2;</code>
* @return int
*/
public function getNumber()
{
return $this->number;
}
/**
* Enum value number.
*
* Generated from protobuf field <code>int32 number = 2;</code>
* @param int $var
* @return $this
*/
public function setNumber($var)
{
GPBUtil::checkInt32($var);
$this->number = $var;
return $this;
}
/**
* Protocol buffer options.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getOptions()
{
return $this->options;
}
/**
* Protocol buffer options.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
* @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOptions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
$this->options = $arr;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/api.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Method represents a method of an API interface.
*
* Generated from protobuf message <code>google.protobuf.Method</code>
*/
class Method extends \Google\Protobuf\Internal\Message
{
/**
* The simple name of this method.
*
* Generated from protobuf field <code>string name = 1;</code>
*/
protected $name = '';
/**
* A URL of the input message type.
*
* Generated from protobuf field <code>string request_type_url = 2;</code>
*/
protected $request_type_url = '';
/**
* If true, the request is streamed.
*
* Generated from protobuf field <code>bool request_streaming = 3;</code>
*/
protected $request_streaming = false;
/**
* The URL of the output message type.
*
* Generated from protobuf field <code>string response_type_url = 4;</code>
*/
protected $response_type_url = '';
/**
* If true, the response is streamed.
*
* Generated from protobuf field <code>bool response_streaming = 5;</code>
*/
protected $response_streaming = false;
/**
* Any metadata attached to the method.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 6;</code>
*/
private $options;
/**
* The source syntax of this method.
*
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
*/
protected $syntax = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* The simple name of this method.
* @type string $request_type_url
* A URL of the input message type.
* @type bool $request_streaming
* If true, the request is streamed.
* @type string $response_type_url
* The URL of the output message type.
* @type bool $response_streaming
* If true, the response is streamed.
* @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
* Any metadata attached to the method.
* @type int $syntax
* The source syntax of this method.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Api::initOnce();
parent::__construct($data);
}
/**
* The simple name of this method.
*
* Generated from protobuf field <code>string name = 1;</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* The simple name of this method.
*
* Generated from protobuf field <code>string name = 1;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* A URL of the input message type.
*
* Generated from protobuf field <code>string request_type_url = 2;</code>
* @return string
*/
public function getRequestTypeUrl()
{
return $this->request_type_url;
}
/**
* A URL of the input message type.
*
* Generated from protobuf field <code>string request_type_url = 2;</code>
* @param string $var
* @return $this
*/
public function setRequestTypeUrl($var)
{
GPBUtil::checkString($var, True);
$this->request_type_url = $var;
return $this;
}
/**
* If true, the request is streamed.
*
* Generated from protobuf field <code>bool request_streaming = 3;</code>
* @return bool
*/
public function getRequestStreaming()
{
return $this->request_streaming;
}
/**
* If true, the request is streamed.
*
* Generated from protobuf field <code>bool request_streaming = 3;</code>
* @param bool $var
* @return $this
*/
public function setRequestStreaming($var)
{
GPBUtil::checkBool($var);
$this->request_streaming = $var;
return $this;
}
/**
* The URL of the output message type.
*
* Generated from protobuf field <code>string response_type_url = 4;</code>
* @return string
*/
public function getResponseTypeUrl()
{
return $this->response_type_url;
}
/**
* The URL of the output message type.
*
* Generated from protobuf field <code>string response_type_url = 4;</code>
* @param string $var
* @return $this
*/
public function setResponseTypeUrl($var)
{
GPBUtil::checkString($var, True);
$this->response_type_url = $var;
return $this;
}
/**
* If true, the response is streamed.
*
* Generated from protobuf field <code>bool response_streaming = 5;</code>
* @return bool
*/
public function getResponseStreaming()
{
return $this->response_streaming;
}
/**
* If true, the response is streamed.
*
* Generated from protobuf field <code>bool response_streaming = 5;</code>
* @param bool $var
* @return $this
*/
public function setResponseStreaming($var)
{
GPBUtil::checkBool($var);
$this->response_streaming = $var;
return $this;
}
/**
* Any metadata attached to the method.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 6;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getOptions()
{
return $this->options;
}
/**
* Any metadata attached to the method.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 6;</code>
* @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOptions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
$this->options = $arr;
return $this;
}
/**
* The source syntax of this method.
*
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
* @return int
*/
public function getSyntax()
{
return $this->syntax;
}
/**
* The source syntax of this method.
*
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 7;</code>
* @param int $var
* @return $this
*/
public function setSyntax($var)
{
GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
$this->syntax = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/any.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* `Any` contains an arbitrary serialized protocol buffer message along with a
* URL that describes the type of the serialized message.
* Protobuf library provides support to pack/unpack Any values in the form
* of utility functions or additional generated methods of the Any type.
* Example 1: Pack and unpack a message in C++.
* Foo foo = ...;
* Any any;
* any.PackFrom(foo);
* ...
* if (any.UnpackTo(&foo)) {
* ...
* }
* Example 2: Pack and unpack a message in Java.
* Foo foo = ...;
* Any any = Any.pack(foo);
* ...
* if (any.is(Foo.class)) {
* foo = any.unpack(Foo.class);
* }
* Example 3: Pack and unpack a message in Python.
* foo = Foo(...)
* any = Any()
* any.Pack(foo)
* ...
* if any.Is(Foo.DESCRIPTOR):
* any.Unpack(foo)
* ...
* Example 4: Pack and unpack a message in Go
* foo := &pb.Foo{...}
* any, err := anypb.New(foo)
* if err != nil {
* ...
* }
* ...
* foo := &pb.Foo{}
* if err := any.UnmarshalTo(foo); err != nil {
* ...
* }
* The pack methods provided by protobuf library will by default use
* 'type.googleapis.com/full.type.name' as the type URL and the unpack
* methods only use the fully qualified type name after the last '/'
* in the type URL, for example "foo.bar.com/x/y.z" will yield type
* name "y.z".
* JSON
* The JSON representation of an `Any` value uses the regular
* representation of the deserialized, embedded message, with an
* additional field `@type` which contains the type URL. Example:
* package google.profile;
* message Person {
* string first_name = 1;
* string last_name = 2;
* }
* {
* "@type": "type.googleapis.com/google.profile.Person",
* "firstName": <string>,
* "lastName": <string>
* }
* If the embedded message type is well-known and has a custom JSON
* representation, that representation will be embedded adding a field
* `value` which holds the custom JSON in addition to the `@type`
* field. Example (for message [google.protobuf.Duration][]):
* {
* "@type": "type.googleapis.com/google.protobuf.Duration",
* "value": "1.212s"
* }
*
* Generated from protobuf message <code>google.protobuf.Any</code>
*/
class Any extends \Google\Protobuf\Internal\AnyBase
{
/**
* A URL/resource name that uniquely identifies the type of the serialized
* protocol buffer message. This string must contain at least
* one "/" character. The last segment of the URL's path must represent
* the fully qualified name of the type (as in
* `path/google.protobuf.Duration`). The name should be in a canonical form
* (e.g., leading "." is not accepted).
* In practice, teams usually precompile into the binary all types that they
* expect it to use in the context of Any. However, for URLs which use the
* scheme `http`, `https`, or no scheme, one can optionally set up a type
* server that maps type URLs to message definitions as follows:
* * If no scheme is provided, `https` is assumed.
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
* value in binary format, or produce an error.
* * Applications are allowed to cache lookup results based on the
* URL, or have them precompiled into a binary to avoid any
* lookup. Therefore, binary compatibility needs to be preserved
* on changes to types. (Use versioned type names to manage
* breaking changes.)
* Note: this functionality is not currently available in the official
* protobuf release, and it is not used for type URLs beginning with
* type.googleapis.com.
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.
*
* Generated from protobuf field <code>string type_url = 1;</code>
*/
protected $type_url = '';
/**
* Must be a valid serialized protocol buffer of the above specified type.
*
* Generated from protobuf field <code>bytes value = 2;</code>
*/
protected $value = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $type_url
* A URL/resource name that uniquely identifies the type of the serialized
* protocol buffer message. This string must contain at least
* one "/" character. The last segment of the URL's path must represent
* the fully qualified name of the type (as in
* `path/google.protobuf.Duration`). The name should be in a canonical form
* (e.g., leading "." is not accepted).
* In practice, teams usually precompile into the binary all types that they
* expect it to use in the context of Any. However, for URLs which use the
* scheme `http`, `https`, or no scheme, one can optionally set up a type
* server that maps type URLs to message definitions as follows:
* * If no scheme is provided, `https` is assumed.
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
* value in binary format, or produce an error.
* * Applications are allowed to cache lookup results based on the
* URL, or have them precompiled into a binary to avoid any
* lookup. Therefore, binary compatibility needs to be preserved
* on changes to types. (Use versioned type names to manage
* breaking changes.)
* Note: this functionality is not currently available in the official
* protobuf release, and it is not used for type URLs beginning with
* type.googleapis.com.
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.
* @type string $value
* Must be a valid serialized protocol buffer of the above specified type.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Any::initOnce();
parent::__construct($data);
}
/**
* A URL/resource name that uniquely identifies the type of the serialized
* protocol buffer message. This string must contain at least
* one "/" character. The last segment of the URL's path must represent
* the fully qualified name of the type (as in
* `path/google.protobuf.Duration`). The name should be in a canonical form
* (e.g., leading "." is not accepted).
* In practice, teams usually precompile into the binary all types that they
* expect it to use in the context of Any. However, for URLs which use the
* scheme `http`, `https`, or no scheme, one can optionally set up a type
* server that maps type URLs to message definitions as follows:
* * If no scheme is provided, `https` is assumed.
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
* value in binary format, or produce an error.
* * Applications are allowed to cache lookup results based on the
* URL, or have them precompiled into a binary to avoid any
* lookup. Therefore, binary compatibility needs to be preserved
* on changes to types. (Use versioned type names to manage
* breaking changes.)
* Note: this functionality is not currently available in the official
* protobuf release, and it is not used for type URLs beginning with
* type.googleapis.com.
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.
*
* Generated from protobuf field <code>string type_url = 1;</code>
* @return string
*/
public function getTypeUrl()
{
return $this->type_url;
}
/**
* A URL/resource name that uniquely identifies the type of the serialized
* protocol buffer message. This string must contain at least
* one "/" character. The last segment of the URL's path must represent
* the fully qualified name of the type (as in
* `path/google.protobuf.Duration`). The name should be in a canonical form
* (e.g., leading "." is not accepted).
* In practice, teams usually precompile into the binary all types that they
* expect it to use in the context of Any. However, for URLs which use the
* scheme `http`, `https`, or no scheme, one can optionally set up a type
* server that maps type URLs to message definitions as follows:
* * If no scheme is provided, `https` is assumed.
* * An HTTP GET on the URL must yield a [google.protobuf.Type][]
* value in binary format, or produce an error.
* * Applications are allowed to cache lookup results based on the
* URL, or have them precompiled into a binary to avoid any
* lookup. Therefore, binary compatibility needs to be preserved
* on changes to types. (Use versioned type names to manage
* breaking changes.)
* Note: this functionality is not currently available in the official
* protobuf release, and it is not used for type URLs beginning with
* type.googleapis.com.
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.
*
* Generated from protobuf field <code>string type_url = 1;</code>
* @param string $var
* @return $this
*/
public function setTypeUrl($var)
{
GPBUtil::checkString($var, True);
$this->type_url = $var;
return $this;
}
/**
* Must be a valid serialized protocol buffer of the above specified type.
*
* Generated from protobuf field <code>bytes value = 2;</code>
* @return string
*/
public function getValue()
{
return $this->value;
}
/**
* Must be a valid serialized protocol buffer of the above specified type.
*
* Generated from protobuf field <code>bytes value = 2;</code>
* @param string $var
* @return $this
*/
public function setValue($var)
{
GPBUtil::checkString($var, False);
$this->value = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2017 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Google\Protobuf;
use Google\Protobuf\Internal\GetPublicDescriptorTrait;
class Descriptor
{
use GetPublicDescriptorTrait;
private $internal_desc;
/**
* @internal
*/
public function __construct($internal_desc)
{
$this->internal_desc = $internal_desc;
}
/**
* @return string Full protobuf message name
*/
public function getFullName()
{
return trim($this->internal_desc->getFullName(), ".");
}
/**
* @return string PHP class name
*/
public function getClass()
{
return $this->internal_desc->getClass();
}
/**
* @param int $index Must be >= 0 and < getFieldCount()
* @return FieldDescriptor
*/
public function getField($index)
{
return $this->getPublicDescriptor($this->internal_desc->getFieldByIndex($index));
}
/**
* @return int Number of fields in message
*/
public function getFieldCount()
{
return count($this->internal_desc->getField());
}
/**
* @param int $index Must be >= 0 and < getOneofDeclCount()
* @return OneofDescriptor
*/
public function getOneofDecl($index)
{
return $this->getPublicDescriptor($this->internal_desc->getOneofDecl()[$index]);
}
/**
* @return int Number of oneofs in message
*/
public function getOneofDeclCount()
{
return count($this->internal_desc->getOneofDecl());
}
/**
* @return int Number of real oneofs in message
*/
public function getRealOneofDeclCount()
{
return $this->internal_desc->getRealOneofDeclCount();
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/type.proto
namespace Google\Protobuf;
use UnexpectedValueException;
/**
* The syntax in which a protocol buffer element is defined.
*
* Protobuf type <code>google.protobuf.Syntax</code>
*/
class Syntax
{
/**
* Syntax `proto2`.
*
* Generated from protobuf enum <code>SYNTAX_PROTO2 = 0;</code>
*/
const SYNTAX_PROTO2 = 0;
/**
* Syntax `proto3`.
*
* Generated from protobuf enum <code>SYNTAX_PROTO3 = 1;</code>
*/
const SYNTAX_PROTO3 = 1;
private static $valueToName = [
self::SYNTAX_PROTO2 => 'SYNTAX_PROTO2',
self::SYNTAX_PROTO3 => 'SYNTAX_PROTO3',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/wrappers.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Wrapper message for `string`.
* The JSON representation for `StringValue` is JSON string.
*
* Generated from protobuf message <code>google.protobuf.StringValue</code>
*/
class StringValue extends \Google\Protobuf\Internal\Message
{
/**
* The string value.
*
* Generated from protobuf field <code>string value = 1;</code>
*/
protected $value = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $value
* The string value.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Wrappers::initOnce();
parent::__construct($data);
}
/**
* The string value.
*
* Generated from protobuf field <code>string value = 1;</code>
* @return string
*/
public function getValue()
{
return $this->value;
}
/**
* The string value.
*
* Generated from protobuf field <code>string value = 1;</code>
* @param string $var
* @return $this
*/
public function setValue($var)
{
GPBUtil::checkString($var, True);
$this->value = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/type.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Enum type definition.
*
* Generated from protobuf message <code>google.protobuf.Enum</code>
*/
class Enum extends \Google\Protobuf\Internal\Message
{
/**
* Enum type name.
*
* Generated from protobuf field <code>string name = 1;</code>
*/
protected $name = '';
/**
* Enum value definitions.
*
* Generated from protobuf field <code>repeated .google.protobuf.EnumValue enumvalue = 2;</code>
*/
private $enumvalue;
/**
* Protocol buffer options.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
*/
private $options;
/**
* The source context.
*
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 4;</code>
*/
protected $source_context = null;
/**
* The source syntax.
*
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 5;</code>
*/
protected $syntax = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* Enum type name.
* @type array<\Google\Protobuf\EnumValue>|\Google\Protobuf\Internal\RepeatedField $enumvalue
* Enum value definitions.
* @type array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $options
* Protocol buffer options.
* @type \Google\Protobuf\SourceContext $source_context
* The source context.
* @type int $syntax
* The source syntax.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Type::initOnce();
parent::__construct($data);
}
/**
* Enum type name.
*
* Generated from protobuf field <code>string name = 1;</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Enum type name.
*
* Generated from protobuf field <code>string name = 1;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Enum value definitions.
*
* Generated from protobuf field <code>repeated .google.protobuf.EnumValue enumvalue = 2;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getEnumvalue()
{
return $this->enumvalue;
}
/**
* Enum value definitions.
*
* Generated from protobuf field <code>repeated .google.protobuf.EnumValue enumvalue = 2;</code>
* @param array<\Google\Protobuf\EnumValue>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setEnumvalue($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\EnumValue::class);
$this->enumvalue = $arr;
return $this;
}
/**
* Protocol buffer options.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getOptions()
{
return $this->options;
}
/**
* Protocol buffer options.
*
* Generated from protobuf field <code>repeated .google.protobuf.Option options = 3;</code>
* @param array<\Google\Protobuf\Option>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOptions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
$this->options = $arr;
return $this;
}
/**
* The source context.
*
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 4;</code>
* @return \Google\Protobuf\SourceContext|null
*/
public function getSourceContext()
{
return $this->source_context;
}
public function hasSourceContext()
{
return isset($this->source_context);
}
public function clearSourceContext()
{
unset($this->source_context);
}
/**
* The source context.
*
* Generated from protobuf field <code>.google.protobuf.SourceContext source_context = 4;</code>
* @param \Google\Protobuf\SourceContext $var
* @return $this
*/
public function setSourceContext($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\SourceContext::class);
$this->source_context = $var;
return $this;
}
/**
* The source syntax.
*
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 5;</code>
* @return int
*/
public function getSyntax()
{
return $this->syntax;
}
/**
* The source syntax.
*
* Generated from protobuf field <code>.google.protobuf.Syntax syntax = 5;</code>
* @param int $var
* @return $this
*/
public function setSyntax($var)
{
GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
$this->syntax = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/timestamp.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* A Timestamp represents a point in time independent of any time zone or local
* calendar, encoded as a count of seconds and fractions of seconds at
* nanosecond resolution. The count is relative to an epoch at UTC midnight on
* January 1, 1970, in the proleptic Gregorian calendar which extends the
* Gregorian calendar backwards to year one.
* All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
* second table is needed for interpretation, using a [24-hour linear
* smear](https://developers.google.com/time/smear).
* The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
* restricting to that range, we ensure that we can convert to and from [RFC
* 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
* # Examples
* Example 1: Compute Timestamp from POSIX `time()`.
* Timestamp timestamp;
* timestamp.set_seconds(time(NULL));
* timestamp.set_nanos(0);
* Example 2: Compute Timestamp from POSIX `gettimeofday()`.
* struct timeval tv;
* gettimeofday(&tv, NULL);
* Timestamp timestamp;
* timestamp.set_seconds(tv.tv_sec);
* timestamp.set_nanos(tv.tv_usec * 1000);
* Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
* FILETIME ft;
* GetSystemTimeAsFileTime(&ft);
* UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
* // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
* // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
* Timestamp timestamp;
* timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
* timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
* Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
* long millis = System.currentTimeMillis();
* Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
* .setNanos((int) ((millis % 1000) * 1000000)).build();
* Example 5: Compute Timestamp from Java `Instant.now()`.
* Instant now = Instant.now();
* Timestamp timestamp =
* Timestamp.newBuilder().setSeconds(now.getEpochSecond())
* .setNanos(now.getNano()).build();
* Example 6: Compute Timestamp from current time in Python.
* timestamp = Timestamp()
* timestamp.GetCurrentTime()
* # JSON Mapping
* In JSON format, the Timestamp type is encoded as a string in the
* [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
* format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
* where {year} is always expressed using four digits while {month}, {day},
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
* is required. A proto3 JSON serializer should always use UTC (as indicated by
* "Z") when printing the Timestamp type and a proto3 JSON parser should be
* able to accept both UTC and other timezones (as indicated by an offset).
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
* 01:30 UTC on January 15, 2017.
* In JavaScript, one can convert a Date object to this format using the
* standard
* [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
* method. In Python, a standard `datetime.datetime` object can be converted
* to this format using
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
* http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
* ) to obtain a formatter capable of generating timestamps in this format.
*
* Generated from protobuf message <code>google.protobuf.Timestamp</code>
*/
class Timestamp extends \Google\Protobuf\Internal\TimestampBase
{
/**
* Represents seconds of UTC time since Unix epoch
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59Z inclusive.
*
* Generated from protobuf field <code>int64 seconds = 1;</code>
*/
protected $seconds = 0;
/**
* Non-negative fractions of a second at nanosecond resolution. Negative
* second values with fractions must still have non-negative nanos values
* that count forward in time. Must be from 0 to 999,999,999
* inclusive.
*
* Generated from protobuf field <code>int32 nanos = 2;</code>
*/
protected $nanos = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int|string $seconds
* Represents seconds of UTC time since Unix epoch
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59Z inclusive.
* @type int $nanos
* Non-negative fractions of a second at nanosecond resolution. Negative
* second values with fractions must still have non-negative nanos values
* that count forward in time. Must be from 0 to 999,999,999
* inclusive.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Timestamp::initOnce();
parent::__construct($data);
}
/**
* Represents seconds of UTC time since Unix epoch
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59Z inclusive.
*
* Generated from protobuf field <code>int64 seconds = 1;</code>
* @return int|string
*/
public function getSeconds()
{
return $this->seconds;
}
/**
* Represents seconds of UTC time since Unix epoch
* 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
* 9999-12-31T23:59:59Z inclusive.
*
* Generated from protobuf field <code>int64 seconds = 1;</code>
* @param int|string $var
* @return $this
*/
public function setSeconds($var)
{
GPBUtil::checkInt64($var);
$this->seconds = $var;
return $this;
}
/**
* Non-negative fractions of a second at nanosecond resolution. Negative
* second values with fractions must still have non-negative nanos values
* that count forward in time. Must be from 0 to 999,999,999
* inclusive.
*
* Generated from protobuf field <code>int32 nanos = 2;</code>
* @return int
*/
public function getNanos()
{
return $this->nanos;
}
/**
* Non-negative fractions of a second at nanosecond resolution. Negative
* second values with fractions must still have non-negative nanos values
* that count forward in time. Must be from 0 to 999,999,999
* inclusive.
*
* Generated from protobuf field <code>int32 nanos = 2;</code>
* @param int $var
* @return $this
*/
public function setNanos($var)
{
GPBUtil::checkInt32($var);
$this->nanos = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/wrappers.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Wrapper message for `uint32`.
* The JSON representation for `UInt32Value` is JSON number.
*
* Generated from protobuf message <code>google.protobuf.UInt32Value</code>
*/
class UInt32Value extends \Google\Protobuf\Internal\Message
{
/**
* The uint32 value.
*
* Generated from protobuf field <code>uint32 value = 1;</code>
*/
protected $value = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $value
* The uint32 value.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Wrappers::initOnce();
parent::__construct($data);
}
/**
* The uint32 value.
*
* Generated from protobuf field <code>uint32 value = 1;</code>
* @return int
*/
public function getValue()
{
return $this->value;
}
/**
* The uint32 value.
*
* Generated from protobuf field <code>uint32 value = 1;</code>
* @param int $var
* @return $this
*/
public function setValue($var)
{
GPBUtil::checkUint32($var);
$this->value = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/struct.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* `Value` represents a dynamically typed value which can be either
* null, a number, a string, a boolean, a recursive struct value, or a
* list of values. A producer of value is expected to set one of these
* variants. Absence of any variant indicates an error.
* The JSON representation for `Value` is JSON value.
*
* Generated from protobuf message <code>google.protobuf.Value</code>
*/
class Value extends \Google\Protobuf\Internal\Message
{
protected $kind;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $null_value
* Represents a null value.
* @type float $number_value
* Represents a double value.
* @type string $string_value
* Represents a string value.
* @type bool $bool_value
* Represents a boolean value.
* @type \Google\Protobuf\Struct $struct_value
* Represents a structured value.
* @type \Google\Protobuf\ListValue $list_value
* Represents a repeated `Value`.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Struct::initOnce();
parent::__construct($data);
}
/**
* Represents a null value.
*
* Generated from protobuf field <code>.google.protobuf.NullValue null_value = 1;</code>
* @return int
*/
public function getNullValue()
{
return $this->readOneof(1);
}
public function hasNullValue()
{
return $this->hasOneof(1);
}
/**
* Represents a null value.
*
* Generated from protobuf field <code>.google.protobuf.NullValue null_value = 1;</code>
* @param int $var
* @return $this
*/
public function setNullValue($var)
{
GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class);
$this->writeOneof(1, $var);
return $this;
}
/**
* Represents a double value.
*
* Generated from protobuf field <code>double number_value = 2;</code>
* @return float
*/
public function getNumberValue()
{
return $this->readOneof(2);
}
public function hasNumberValue()
{
return $this->hasOneof(2);
}
/**
* Represents a double value.
*
* Generated from protobuf field <code>double number_value = 2;</code>
* @param float $var
* @return $this
*/
public function setNumberValue($var)
{
GPBUtil::checkDouble($var);
$this->writeOneof(2, $var);
return $this;
}
/**
* Represents a string value.
*
* Generated from protobuf field <code>string string_value = 3;</code>
* @return string
*/
public function getStringValue()
{
return $this->readOneof(3);
}
public function hasStringValue()
{
return $this->hasOneof(3);
}
/**
* Represents a string value.
*
* Generated from protobuf field <code>string string_value = 3;</code>
* @param string $var
* @return $this
*/
public function setStringValue($var)
{
GPBUtil::checkString($var, True);
$this->writeOneof(3, $var);
return $this;
}
/**
* Represents a boolean value.
*
* Generated from protobuf field <code>bool bool_value = 4;</code>
* @return bool
*/
public function getBoolValue()
{
return $this->readOneof(4);
}
public function hasBoolValue()
{
return $this->hasOneof(4);
}
/**
* Represents a boolean value.
*
* Generated from protobuf field <code>bool bool_value = 4;</code>
* @param bool $var
* @return $this
*/
public function setBoolValue($var)
{
GPBUtil::checkBool($var);
$this->writeOneof(4, $var);
return $this;
}
/**
* Represents a structured value.
*
* Generated from protobuf field <code>.google.protobuf.Struct struct_value = 5;</code>
* @return \Google\Protobuf\Struct|null
*/
public function getStructValue()
{
return $this->readOneof(5);
}
public function hasStructValue()
{
return $this->hasOneof(5);
}
/**
* Represents a structured value.
*
* Generated from protobuf field <code>.google.protobuf.Struct struct_value = 5;</code>
* @param \Google\Protobuf\Struct $var
* @return $this
*/
public function setStructValue($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class);
$this->writeOneof(5, $var);
return $this;
}
/**
* Represents a repeated `Value`.
*
* Generated from protobuf field <code>.google.protobuf.ListValue list_value = 6;</code>
* @return \Google\Protobuf\ListValue|null
*/
public function getListValue()
{
return $this->readOneof(6);
}
public function hasListValue()
{
return $this->hasOneof(6);
}
/**
* Represents a repeated `Value`.
*
* Generated from protobuf field <code>.google.protobuf.ListValue list_value = 6;</code>
* @param \Google\Protobuf\ListValue $var
* @return $this
*/
public function setListValue($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\ListValue::class);
$this->writeOneof(6, $var);
return $this;
}
/**
* @return string
*/
public function getKind()
{
return $this->whichOneof("kind");
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/type.proto
namespace Google\Protobuf;
if (false) {
/**
* This class is deprecated. Use Google\Protobuf\Field\Kind instead.
* @deprecated
*/
class Field_Kind {}
}
class_exists(Field\Kind::class);
@trigger_error('Google\Protobuf\Field_Kind is deprecated and will be removed in the next major release. Use Google\Protobuf\Field\Kind instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2017 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Google\Protobuf;
class EnumDescriptor
{
private $internal_desc;
/**
* @internal
*/
public function __construct($internal_desc)
{
$this->internal_desc = $internal_desc;
}
/**
* @return string Full protobuf message name
*/
public function getFullName()
{
return $this->internal_desc->getFullName();
}
/**
* @return string PHP class name
*/
public function getClass()
{
return $this->internal_desc->getClass();
}
/**
* @param int $index Must be >= 0 and < getValueCount()
* @return EnumValueDescriptor
*/
public function getValue($index)
{
return $this->internal_desc->getValueDescriptorByIndex($index);
}
/**
* @return int Number of values in enum
*/
public function getValueCount()
{
return $this->internal_desc->getValueCount();
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/field_mask.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* `FieldMask` represents a set of symbolic field paths, for example:
* paths: "f.a"
* paths: "f.b.d"
* Here `f` represents a field in some root message, `a` and `b`
* fields in the message found in `f`, and `d` a field found in the
* message in `f.b`.
* Field masks are used to specify a subset of fields that should be
* returned by a get operation or modified by an update operation.
* Field masks also have a custom JSON encoding (see below).
* # Field Masks in Projections
* When used in the context of a projection, a response message or
* sub-message is filtered by the API to only contain those fields as
* specified in the mask. For example, if the mask in the previous
* example is applied to a response message as follows:
* f {
* a : 22
* b {
* d : 1
* x : 2
* }
* y : 13
* }
* z: 8
* The result will not contain specific values for fields x,y and z
* (their value will be set to the default, and omitted in proto text
* output):
* f {
* a : 22
* b {
* d : 1
* }
* }
* A repeated field is not allowed except at the last position of a
* paths string.
* If a FieldMask object is not present in a get operation, the
* operation applies to all fields (as if a FieldMask of all fields
* had been specified).
* Note that a field mask does not necessarily apply to the
* top-level response message. In case of a REST get operation, the
* field mask applies directly to the response, but in case of a REST
* list operation, the mask instead applies to each individual message
* in the returned resource list. In case of a REST custom method,
* other definitions may be used. Where the mask applies will be
* clearly documented together with its declaration in the API. In
* any case, the effect on the returned resource/resources is required
* behavior for APIs.
* # Field Masks in Update Operations
* A field mask in update operations specifies which fields of the
* targeted resource are going to be updated. The API is required
* to only change the values of the fields as specified in the mask
* and leave the others untouched. If a resource is passed in to
* describe the updated values, the API ignores the values of all
* fields not covered by the mask.
* If a repeated field is specified for an update operation, new values will
* be appended to the existing repeated field in the target resource. Note that
* a repeated field is only allowed in the last position of a `paths` string.
* If a sub-message is specified in the last position of the field mask for an
* update operation, then new value will be merged into the existing sub-message
* in the target resource.
* For example, given the target message:
* f {
* b {
* d: 1
* x: 2
* }
* c: [1]
* }
* And an update message:
* f {
* b {
* d: 10
* }
* c: [2]
* }
* then if the field mask is:
* paths: ["f.b", "f.c"]
* then the result will be:
* f {
* b {
* d: 10
* x: 2
* }
* c: [1, 2]
* }
* An implementation may provide options to override this default behavior for
* repeated and message fields.
* In order to reset a field's value to the default, the field must
* be in the mask and set to the default value in the provided resource.
* Hence, in order to reset all fields of a resource, provide a default
* instance of the resource and set all fields in the mask, or do
* not provide a mask as described below.
* If a field mask is not present on update, the operation applies to
* all fields (as if a field mask of all fields has been specified).
* Note that in the presence of schema evolution, this may mean that
* fields the client does not know and has therefore not filled into
* the request will be reset to their default. If this is unwanted
* behavior, a specific service may require a client to always specify
* a field mask, producing an error if not.
* As with get operations, the location of the resource which
* describes the updated values in the request message depends on the
* operation kind. In any case, the effect of the field mask is
* required to be honored by the API.
* ## Considerations for HTTP REST
* The HTTP kind of an update operation which uses a field mask must
* be set to PATCH instead of PUT in order to satisfy HTTP semantics
* (PUT must only be used for full updates).
* # JSON Encoding of Field Masks
* In JSON, a field mask is encoded as a single string where paths are
* separated by a comma. Fields name in each path are converted
* to/from lower-camel naming conventions.
* As an example, consider the following message declarations:
* message Profile {
* User user = 1;
* Photo photo = 2;
* }
* message User {
* string display_name = 1;
* string address = 2;
* }
* In proto a field mask for `Profile` may look as such:
* mask {
* paths: "user.display_name"
* paths: "photo"
* }
* In JSON, the same mask is represented as below:
* {
* mask: "user.displayName,photo"
* }
* # Field Masks and Oneof Fields
* Field masks treat fields in oneofs just as regular fields. Consider the
* following message:
* message SampleMessage {
* oneof test_oneof {
* string name = 4;
* SubMessage sub_message = 9;
* }
* }
* The field mask can be:
* mask {
* paths: "name"
* }
* Or:
* mask {
* paths: "sub_message"
* }
* Note that oneof type names ("test_oneof" in this case) cannot be used in
* paths.
* ## Field Mask Verification
* The implementation of any API method which has a FieldMask type field in the
* request should verify the included field paths, and return an
* `INVALID_ARGUMENT` error if any path is unmappable.
*
* Generated from protobuf message <code>google.protobuf.FieldMask</code>
*/
class FieldMask extends \Google\Protobuf\Internal\Message
{
/**
* The set of field mask paths.
*
* Generated from protobuf field <code>repeated string paths = 1;</code>
*/
private $paths;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type array<string>|\Google\Protobuf\Internal\RepeatedField $paths
* The set of field mask paths.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\FieldMask::initOnce();
parent::__construct($data);
}
/**
* The set of field mask paths.
*
* Generated from protobuf field <code>repeated string paths = 1;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getPaths()
{
return $this->paths;
}
/**
* The set of field mask paths.
*
* Generated from protobuf field <code>repeated string paths = 1;</code>
* @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setPaths($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->paths = $arr;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/wrappers.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Wrapper message for `double`.
* The JSON representation for `DoubleValue` is JSON number.
*
* Generated from protobuf message <code>google.protobuf.DoubleValue</code>
*/
class DoubleValue extends \Google\Protobuf\Internal\Message
{
/**
* The double value.
*
* Generated from protobuf field <code>double value = 1;</code>
*/
protected $value = 0.0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type float $value
* The double value.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Wrappers::initOnce();
parent::__construct($data);
}
/**
* The double value.
*
* Generated from protobuf field <code>double value = 1;</code>
* @return float
*/
public function getValue()
{
return $this->value;
}
/**
* The double value.
*
* Generated from protobuf field <code>double value = 1;</code>
* @param float $var
* @return $this
*/
public function setValue($var)
{
GPBUtil::checkDouble($var);
$this->value = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/wrappers.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Wrapper message for `float`.
* The JSON representation for `FloatValue` is JSON number.
*
* Generated from protobuf message <code>google.protobuf.FloatValue</code>
*/
class FloatValue extends \Google\Protobuf\Internal\Message
{
/**
* The float value.
*
* Generated from protobuf field <code>float value = 1;</code>
*/
protected $value = 0.0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type float $value
* The float value.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Wrappers::initOnce();
parent::__construct($data);
}
/**
* The float value.
*
* Generated from protobuf field <code>float value = 1;</code>
* @return float
*/
public function getValue()
{
return $this->value;
}
/**
* The float value.
*
* Generated from protobuf field <code>float value = 1;</code>
* @param float $var
* @return $this
*/
public function setValue($var)
{
GPBUtil::checkFloat($var);
$this->value = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/duration.proto
namespace Google\Protobuf;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* A Duration represents a signed, fixed-length span of time represented
* as a count of seconds and fractions of seconds at nanosecond
* resolution. It is independent of any calendar and concepts like "day"
* or "month". It is related to Timestamp in that the difference between
* two Timestamp values is a Duration and it can be added or subtracted
* from a Timestamp. Range is approximately +-10,000 years.
* # Examples
* Example 1: Compute Duration from two Timestamps in pseudo code.
* Timestamp start = ...;
* Timestamp end = ...;
* Duration duration = ...;
* duration.seconds = end.seconds - start.seconds;
* duration.nanos = end.nanos - start.nanos;
* if (duration.seconds < 0 && duration.nanos > 0) {
* duration.seconds += 1;
* duration.nanos -= 1000000000;
* } else if (duration.seconds > 0 && duration.nanos < 0) {
* duration.seconds -= 1;
* duration.nanos += 1000000000;
* }
* Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
* Timestamp start = ...;
* Duration duration = ...;
* Timestamp end = ...;
* end.seconds = start.seconds + duration.seconds;
* end.nanos = start.nanos + duration.nanos;
* if (end.nanos < 0) {
* end.seconds -= 1;
* end.nanos += 1000000000;
* } else if (end.nanos >= 1000000000) {
* end.seconds += 1;
* end.nanos -= 1000000000;
* }
* Example 3: Compute Duration from datetime.timedelta in Python.
* td = datetime.timedelta(days=3, minutes=10)
* duration = Duration()
* duration.FromTimedelta(td)
* # JSON Mapping
* In JSON format, the Duration type is encoded as a string rather than an
* object, where the string ends in the suffix "s" (indicating seconds) and
* is preceded by the number of seconds, with nanoseconds expressed as
* fractional seconds. For example, 3 seconds with 0 nanoseconds should be
* encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
* be expressed in JSON format as "3.000000001s", and 3 seconds and 1
* microsecond should be expressed in JSON format as "3.000001s".
*
* Generated from protobuf message <code>google.protobuf.Duration</code>
*/
class Duration extends \Google\Protobuf\Internal\Message
{
/**
* Signed seconds of the span of time. Must be from -315,576,000,000
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
*
* Generated from protobuf field <code>int64 seconds = 1;</code>
*/
protected $seconds = 0;
/**
* Signed fractions of a second at nanosecond resolution of the span
* of time. Durations less than one second are represented with a 0
* `seconds` field and a positive or negative `nanos` field. For durations
* of one second or more, a non-zero value for the `nanos` field must be
* of the same sign as the `seconds` field. Must be from -999,999,999
* to +999,999,999 inclusive.
*
* Generated from protobuf field <code>int32 nanos = 2;</code>
*/
protected $nanos = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int|string $seconds
* Signed seconds of the span of time. Must be from -315,576,000,000
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
* @type int $nanos
* Signed fractions of a second at nanosecond resolution of the span
* of time. Durations less than one second are represented with a 0
* `seconds` field and a positive or negative `nanos` field. For durations
* of one second or more, a non-zero value for the `nanos` field must be
* of the same sign as the `seconds` field. Must be from -999,999,999
* to +999,999,999 inclusive.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Duration::initOnce();
parent::__construct($data);
}
/**
* Signed seconds of the span of time. Must be from -315,576,000,000
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
*
* Generated from protobuf field <code>int64 seconds = 1;</code>
* @return int|string
*/
public function getSeconds()
{
return $this->seconds;
}
/**
* Signed seconds of the span of time. Must be from -315,576,000,000
* to +315,576,000,000 inclusive. Note: these bounds are computed from:
* 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
*
* Generated from protobuf field <code>int64 seconds = 1;</code>
* @param int|string $var
* @return $this
*/
public function setSeconds($var)
{
GPBUtil::checkInt64($var);
$this->seconds = $var;
return $this;
}
/**
* Signed fractions of a second at nanosecond resolution of the span
* of time. Durations less than one second are represented with a 0
* `seconds` field and a positive or negative `nanos` field. For durations
* of one second or more, a non-zero value for the `nanos` field must be
* of the same sign as the `seconds` field. Must be from -999,999,999
* to +999,999,999 inclusive.
*
* Generated from protobuf field <code>int32 nanos = 2;</code>
* @return int
*/
public function getNanos()
{
return $this->nanos;
}
/**
* Signed fractions of a second at nanosecond resolution of the span
* of time. Durations less than one second are represented with a 0
* `seconds` field and a positive or negative `nanos` field. For durations
* of one second or more, a non-zero value for the `nanos` field must be
* of the same sign as the `seconds` field. Must be from -999,999,999
* to +999,999,999 inclusive.
*
* Generated from protobuf field <code>int32 nanos = 2;</code>
* @param int $var
* @return $this
*/
public function setNanos($var)
{
GPBUtil::checkInt32($var);
$this->nanos = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
namespace Google\Protobuf\Internal;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* A message representing a option the parser does not recognize. This only
* appears in options protos created by the compiler::Parser class.
* DescriptorPool resolves these when building Descriptor objects. Therefore,
* options protos in descriptor objects (e.g. returned by Descriptor::options(),
* or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
* in them.
*
* Generated from protobuf message <code>google.protobuf.UninterpretedOption</code>
*/
class UninterpretedOption extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
*/
private $name;
/**
* The value of the uninterpreted option, in whatever type the tokenizer
* identified it as during parsing. Exactly one of these should be set.
*
* Generated from protobuf field <code>optional string identifier_value = 3;</code>
*/
protected $identifier_value = null;
/**
* Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
*/
protected $positive_int_value = null;
/**
* Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
*/
protected $negative_int_value = null;
/**
* Generated from protobuf field <code>optional double double_value = 6;</code>
*/
protected $double_value = null;
/**
* Generated from protobuf field <code>optional bytes string_value = 7;</code>
*/
protected $string_value = null;
/**
* Generated from protobuf field <code>optional string aggregate_value = 8;</code>
*/
protected $aggregate_value = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type array<\Google\Protobuf\Internal\UninterpretedOption\NamePart>|\Google\Protobuf\Internal\RepeatedField $name
* @type string $identifier_value
* The value of the uninterpreted option, in whatever type the tokenizer
* identified it as during parsing. Exactly one of these should be set.
* @type int|string $positive_int_value
* @type int|string $negative_int_value
* @type float $double_value
* @type string $string_value
* @type string $aggregate_value
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getName()
{
return $this->name;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption.NamePart name = 2;</code>
* @param array<\Google\Protobuf\Internal\UninterpretedOption\NamePart>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setName($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption\NamePart::class);
$this->name = $arr;
return $this;
}
/**
* The value of the uninterpreted option, in whatever type the tokenizer
* identified it as during parsing. Exactly one of these should be set.
*
* Generated from protobuf field <code>optional string identifier_value = 3;</code>
* @return string
*/
public function getIdentifierValue()
{
return isset($this->identifier_value) ? $this->identifier_value : '';
}
public function hasIdentifierValue()
{
return isset($this->identifier_value);
}
public function clearIdentifierValue()
{
unset($this->identifier_value);
}
/**
* The value of the uninterpreted option, in whatever type the tokenizer
* identified it as during parsing. Exactly one of these should be set.
*
* Generated from protobuf field <code>optional string identifier_value = 3;</code>
* @param string $var
* @return $this
*/
public function setIdentifierValue($var)
{
GPBUtil::checkString($var, True);
$this->identifier_value = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
* @return int|string
*/
public function getPositiveIntValue()
{
return isset($this->positive_int_value) ? $this->positive_int_value : 0;
}
public function hasPositiveIntValue()
{
return isset($this->positive_int_value);
}
public function clearPositiveIntValue()
{
unset($this->positive_int_value);
}
/**
* Generated from protobuf field <code>optional uint64 positive_int_value = 4;</code>
* @param int|string $var
* @return $this
*/
public function setPositiveIntValue($var)
{
GPBUtil::checkUint64($var);
$this->positive_int_value = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
* @return int|string
*/
public function getNegativeIntValue()
{
return isset($this->negative_int_value) ? $this->negative_int_value : 0;
}
public function hasNegativeIntValue()
{
return isset($this->negative_int_value);
}
public function clearNegativeIntValue()
{
unset($this->negative_int_value);
}
/**
* Generated from protobuf field <code>optional int64 negative_int_value = 5;</code>
* @param int|string $var
* @return $this
*/
public function setNegativeIntValue($var)
{
GPBUtil::checkInt64($var);
$this->negative_int_value = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional double double_value = 6;</code>
* @return float
*/
public function getDoubleValue()
{
return isset($this->double_value) ? $this->double_value : 0.0;
}
public function hasDoubleValue()
{
return isset($this->double_value);
}
public function clearDoubleValue()
{
unset($this->double_value);
}
/**
* Generated from protobuf field <code>optional double double_value = 6;</code>
* @param float $var
* @return $this
*/
public function setDoubleValue($var)
{
GPBUtil::checkDouble($var);
$this->double_value = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional bytes string_value = 7;</code>
* @return string
*/
public function getStringValue()
{
return isset($this->string_value) ? $this->string_value : '';
}
public function hasStringValue()
{
return isset($this->string_value);
}
public function clearStringValue()
{
unset($this->string_value);
}
/**
* Generated from protobuf field <code>optional bytes string_value = 7;</code>
* @param string $var
* @return $this
*/
public function setStringValue($var)
{
GPBUtil::checkString($var, False);
$this->string_value = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional string aggregate_value = 8;</code>
* @return string
*/
public function getAggregateValue()
{
return isset($this->aggregate_value) ? $this->aggregate_value : '';
}
public function hasAggregateValue()
{
return isset($this->aggregate_value);
}
public function clearAggregateValue()
{
unset($this->aggregate_value);
}
/**
* Generated from protobuf field <code>optional string aggregate_value = 8;</code>
* @param string $var
* @return $this
*/
public function setAggregateValue($var)
{
GPBUtil::checkString($var, True);
$this->aggregate_value = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
namespace Google\Protobuf\Internal;
if (false) {
/**
* This class is deprecated. Use Google\Protobuf\Internal\FieldOptions\CType instead.
* @deprecated
*/
class FieldOptions_CType {}
}
class_exists(FieldOptions\CType::class);
@trigger_error('Google\Protobuf\Internal\FieldOptions_CType is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\FieldOptions\CType instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Google\Protobuf\Internal;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\Message;
class MapEntry extends Message
{
public $key;
public $value;
public function __construct($desc) {
parent::__construct($desc);
// For MapEntry, getValue should always return a valid value. Thus, we
// need to create a default instance value if the value type is
// message, in case no value is provided in data.
$value_field = $desc->getFieldByNumber(2);
if ($value_field->getType() == GPBType::MESSAGE) {
$klass = $value_field->getMessageType()->getClass();
$value = new $klass;
$this->setValue($value);
}
}
public function setKey($key) {
$this->key = $key;
}
public function getKey() {
return $this->key;
}
public function setValue($value) {
$this->value = $value;
}
public function getValue() {
return $this->value;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Google\Protobuf\Internal;
use Google\Protobuf\Duration;
use Google\Protobuf\FieldMask;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\MapField;
use function bccomp;
function camel2underscore($input) {
preg_match_all(
'!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!',
$input,
$matches);
$ret = $matches[0];
foreach ($ret as &$match) {
$match = $match == strtoupper($match) ? strtolower($match) : lcfirst($match);
}
return implode('_', $ret);
}
class GPBUtil
{
const NANOS_PER_MILLISECOND = 1000000;
const NANOS_PER_MICROSECOND = 1000;
const TYPE_URL_PREFIX = 'type.googleapis.com/';
public static function divideInt64ToInt32($value, &$high, &$low, $trim = false)
{
$isNeg = (bccomp($value, 0) < 0);
if ($isNeg) {
$value = bcsub(0, $value);
}
$high = bcdiv($value, 4294967296);
$low = bcmod($value, 4294967296);
if (bccomp($high, 2147483647) > 0) {
$high = (int) bcsub($high, 4294967296);
} else {
$high = (int) $high;
}
if (bccomp($low, 2147483647) > 0) {
$low = (int) bcsub($low, 4294967296);
} else {
$low = (int) $low;
}
if ($isNeg) {
$high = ~$high;
$low = ~$low;
$low++;
if (!$low) {
$high = (int)($high + 1);
}
}
if ($trim) {
$high = 0;
}
}
public static function checkString(&$var, $check_utf8)
{
if (is_array($var) || is_object($var)) {
throw new \InvalidArgumentException("Expect string.");
}
if (!is_string($var)) {
$var = strval($var);
}
if ($check_utf8 && !preg_match('//u', $var)) {
throw new \Exception("Expect utf-8 encoding.");
}
}
public static function checkEnum(&$var)
{
static::checkInt32($var);
}
public static function checkInt32(&$var)
{
if (is_numeric($var)) {
$var = intval($var);
} else {
throw new \Exception("Expect integer.");
}
}
public static function checkUint32(&$var)
{
if (is_numeric($var)) {
if (PHP_INT_SIZE === 8) {
$var = intval($var);
$var |= ((-(($var >> 31) & 0x1)) & ~0xFFFFFFFF);
} else {
if (bccomp($var, 0x7FFFFFFF) > 0) {
$var = bcsub($var, "4294967296");
}
$var = (int) $var;
}
} else {
throw new \Exception("Expect integer.");
}
}
public static function checkInt64(&$var)
{
if (is_numeric($var)) {
if (PHP_INT_SIZE == 8) {
$var = intval($var);
} else {
if (is_float($var) ||
is_integer($var) ||
(is_string($var) &&
bccomp($var, "9223372036854774784") < 0)) {
$var = number_format($var, 0, ".", "");
}
}
} else {
throw new \Exception("Expect integer.");
}
}
public static function checkUint64(&$var)
{
if (is_numeric($var)) {
if (PHP_INT_SIZE == 8) {
$var = intval($var);
} else {
$var = number_format($var, 0, ".", "");
}
} else {
throw new \Exception("Expect integer.");
}
}
public static function checkFloat(&$var)
{
if (is_float($var) || is_numeric($var)) {
$var = unpack("f", pack("f", $var))[1];
} else {
throw new \Exception("Expect float.");
}
}
public static function checkDouble(&$var)
{
if (is_float($var) || is_numeric($var)) {
$var = floatval($var);
} else {
throw new \Exception("Expect float.");
}
}
public static function checkBool(&$var)
{
if (is_array($var) || is_object($var)) {
throw new \Exception("Expect boolean.");
}
$var = boolval($var);
}
public static function checkMessage(&$var, $klass, $newClass = null)
{
if (!$var instanceof $klass && !is_null($var)) {
throw new \Exception("Expect $klass.");
}
}
public static function checkRepeatedField(&$var, $type, $klass = null)
{
if (!$var instanceof RepeatedField && !is_array($var)) {
throw new \Exception("Expect array.");
}
if (is_array($var)) {
$tmp = new RepeatedField($type, $klass);
foreach ($var as $value) {
$tmp[] = $value;
}
return $tmp;
} else {
if ($var->getType() != $type) {
throw new \Exception(
"Expect repeated field of different type.");
}
if ($var->getType() === GPBType::MESSAGE &&
$var->getClass() !== $klass &&
$var->getLegacyClass() !== $klass) {
throw new \Exception(
"Expect repeated field of " . $klass . ".");
}
return $var;
}
}
public static function checkMapField(&$var, $key_type, $value_type, $klass = null)
{
if (!$var instanceof MapField && !is_array($var)) {
throw new \Exception("Expect dict.");
}
if (is_array($var)) {
$tmp = new MapField($key_type, $value_type, $klass);
foreach ($var as $key => $value) {
$tmp[$key] = $value;
}
return $tmp;
} else {
if ($var->getKeyType() != $key_type) {
throw new \Exception("Expect map field of key type.");
}
if ($var->getValueType() != $value_type) {
throw new \Exception("Expect map field of value type.");
}
if ($var->getValueType() === GPBType::MESSAGE &&
$var->getValueClass() !== $klass &&
$var->getLegacyValueClass() !== $klass) {
throw new \Exception(
"Expect map field of " . $klass . ".");
}
return $var;
}
}
public static function Int64($value)
{
return new Int64($value);
}
public static function Uint64($value)
{
return new Uint64($value);
}
public static function getClassNamePrefix(
$classname,
$file_proto)
{
$option = $file_proto->getOptions();
$prefix = is_null($option) ? "" : $option->getPhpClassPrefix();
if ($prefix !== "") {
return $prefix;
}
$reserved_words = array(
"abstract"=>0, "and"=>0, "array"=>0, "as"=>0, "break"=>0,
"callable"=>0, "case"=>0, "catch"=>0, "class"=>0, "clone"=>0,
"const"=>0, "continue"=>0, "declare"=>0, "default"=>0, "die"=>0,
"do"=>0, "echo"=>0, "else"=>0, "elseif"=>0, "empty"=>0,
"enddeclare"=>0, "endfor"=>0, "endforeach"=>0, "endif"=>0,
"endswitch"=>0, "endwhile"=>0, "eval"=>0, "exit"=>0, "extends"=>0,
"final"=>0, "finally"=>0, "fn"=>0, "for"=>0, "foreach"=>0,
"function"=>0, "global"=>0, "goto"=>0, "if"=>0, "implements"=>0,
"include"=>0, "include_once"=>0, "instanceof"=>0, "insteadof"=>0,
"interface"=>0, "isset"=>0, "list"=>0, "match"=>0, "namespace"=>0,
"new"=>0, "or"=>0, "parent"=>0, "print"=>0, "private"=>0,
"protected"=>0,"public"=>0, "readonly" => 0,"require"=>0,
"require_once"=>0,"return"=>0, "self"=>0, "static"=>0, "switch"=>0,
"throw"=>0,"trait"=>0, "try"=>0,"unset"=>0, "use"=>0, "var"=>0,
"while"=>0,"xor"=>0, "yield"=>0, "int"=>0, "float"=>0, "bool"=>0,
"string"=>0,"true"=>0, "false"=>0, "null"=>0, "void"=>0,
"iterable"=>0
);
if (array_key_exists(strtolower($classname), $reserved_words)) {
if ($file_proto->getPackage() === "google.protobuf") {
return "GPB";
} else {
return "PB";
}
}
return "";
}
private static function getPreviouslyUnreservedClassNamePrefix(
$classname,
$file_proto)
{
$previously_unreserved_words = array(
"readonly"=>0
);
if (array_key_exists(strtolower($classname), $previously_unreserved_words)) {
$option = $file_proto->getOptions();
$prefix = is_null($option) ? "" : $option->getPhpClassPrefix();
if ($prefix !== "") {
return $prefix;
}
return "";
}
return self::getClassNamePrefix($classname, $file_proto);
}
public static function getLegacyClassNameWithoutPackage(
$name,
$file_proto)
{
$classname = implode('_', explode('.', $name));
return static::getClassNamePrefix($classname, $file_proto) . $classname;
}
public static function getClassNameWithoutPackage(
$name,
$file_proto)
{
$parts = explode('.', $name);
foreach ($parts as $i => $part) {
$parts[$i] = static::getClassNamePrefix($parts[$i], $file_proto) . $parts[$i];
}
return implode('\\', $parts);
}
private static function getPreviouslyUnreservedClassNameWithoutPackage(
$name,
$file_proto)
{
$parts = explode('.', $name);
foreach ($parts as $i => $part) {
$parts[$i] = static::getPreviouslyUnreservedClassNamePrefix($parts[$i], $file_proto) . $parts[$i];
}
return implode('\\', $parts);
}
public static function getFullClassName(
$proto,
$containing,
$file_proto,
&$message_name_without_package,
&$classname,
&$legacy_classname,
&$fullname,
&$previous_classname)
{
// Full name needs to start with '.'.
$message_name_without_package = $proto->getName();
if ($containing !== "") {
$message_name_without_package =
$containing . "." . $message_name_without_package;
}
$package = $file_proto->getPackage();
if ($package === "") {
$fullname = $message_name_without_package;
} else {
$fullname = $package . "." . $message_name_without_package;
}
$class_name_without_package =
static::getClassNameWithoutPackage($message_name_without_package, $file_proto);
$legacy_class_name_without_package =
static::getLegacyClassNameWithoutPackage(
$message_name_without_package, $file_proto);
$previous_class_name_without_package =
static::getPreviouslyUnreservedClassNameWithoutPackage(
$message_name_without_package, $file_proto);
$option = $file_proto->getOptions();
if (!is_null($option) && $option->hasPhpNamespace()) {
$namespace = $option->getPhpNamespace();
if ($namespace !== "") {
$classname = $namespace . "\\" . $class_name_without_package;
$legacy_classname =
$namespace . "\\" . $legacy_class_name_without_package;
$previous_classname =
$namespace . "\\" . $previous_class_name_without_package;
return;
} else {
$classname = $class_name_without_package;
$legacy_classname = $legacy_class_name_without_package;
$previous_classname = $previous_class_name_without_package;
return;
}
}
if ($package === "") {
$classname = $class_name_without_package;
$legacy_classname = $legacy_class_name_without_package;
$previous_classname = $previous_class_name_without_package;
} else {
$parts = array_map('ucwords', explode('.', $package));
foreach ($parts as $i => $part) {
$parts[$i] = self::getClassNamePrefix($part, $file_proto).$part;
}
$classname =
implode('\\', $parts) .
"\\".self::getClassNamePrefix($class_name_without_package,$file_proto).
$class_name_without_package;
$legacy_classname =
implode('\\', array_map('ucwords', explode('.', $package))).
"\\".$legacy_class_name_without_package;
$previous_classname =
implode('\\', array_map('ucwords', explode('.', $package))).
"\\".self::getPreviouslyUnreservedClassNamePrefix(
$previous_class_name_without_package, $file_proto).
$previous_class_name_without_package;
}
}
public static function combineInt32ToInt64($high, $low)
{
$isNeg = $high < 0;
if ($isNeg) {
$high = ~$high;
$low = ~$low;
$low++;
if (!$low) {
$high = (int) ($high + 1);
}
}
$result = bcadd(bcmul($high, 4294967296), $low);
if ($low < 0) {
$result = bcadd($result, 4294967296);
}
if ($isNeg) {
$result = bcsub(0, $result);
}
return $result;
}
public static function parseTimestamp($timestamp)
{
// prevent parsing timestamps containing with the non-existent year "0000"
// DateTime::createFromFormat parses without failing but as a nonsensical date
if (substr($timestamp, 0, 4) === "0000") {
throw new \Exception("Year cannot be zero.");
}
// prevent parsing timestamps ending with a lowercase z
if (substr($timestamp, -1, 1) === "z") {
throw new \Exception("Timezone cannot be a lowercase z.");
}
$nanoseconds = 0;
$periodIndex = strpos($timestamp, ".");
if ($periodIndex !== false) {
$nanosecondsLength = 0;
// find the next non-numeric character in the timestamp to calculate
// the length of the nanoseconds text
for ($i = $periodIndex + 1, $length = strlen($timestamp); $i < $length; $i++) {
if (!is_numeric($timestamp[$i])) {
$nanosecondsLength = $i - ($periodIndex + 1);
break;
}
}
if ($nanosecondsLength % 3 !== 0) {
throw new \Exception("Nanoseconds must be disible by 3.");
}
if ($nanosecondsLength > 9) {
throw new \Exception("Nanoseconds must be in the range of 0 to 999,999,999 nanoseconds.");
}
if ($nanosecondsLength > 0) {
$nanoseconds = substr($timestamp, $periodIndex + 1, $nanosecondsLength);
$nanoseconds = intval($nanoseconds);
// remove the nanoseconds and preceding period from the timestamp
$date = substr($timestamp, 0, $periodIndex);
$timezone = substr($timestamp, $periodIndex + $nanosecondsLength + 1);
$timestamp = $date.$timezone;
}
}
$date = \DateTime::createFromFormat(\DateTime::RFC3339, $timestamp, new \DateTimeZone("UTC"));
if ($date === false) {
throw new \Exception("Invalid RFC 3339 timestamp.");
}
$value = new \Google\Protobuf\Timestamp();
$seconds = $date->format("U");
$value->setSeconds($seconds);
$value->setNanos($nanoseconds);
return $value;
}
public static function formatTimestamp($value)
{
if (bccomp($value->getSeconds(), "253402300800") != -1) {
throw new GPBDecodeException("Duration number too large.");
}
if (bccomp($value->getSeconds(), "-62135596801") != 1) {
throw new GPBDecodeException("Duration number too small.");
}
$nanoseconds = static::getNanosecondsForTimestamp($value->getNanos());
if (!empty($nanoseconds)) {
$nanoseconds = ".".$nanoseconds;
}
$date = new \DateTime('@'.$value->getSeconds(), new \DateTimeZone("UTC"));
return $date->format("Y-m-d\TH:i:s".$nanoseconds."\Z");
}
public static function parseDuration($value)
{
if (strlen($value) < 2 || substr($value, -1) !== "s") {
throw new GPBDecodeException("Missing s after duration string");
}
$number = substr($value, 0, -1);
if (bccomp($number, "315576000001") != -1) {
throw new GPBDecodeException("Duration number too large.");
}
if (bccomp($number, "-315576000001") != 1) {
throw new GPBDecodeException("Duration number too small.");
}
$pos = strrpos($number, ".");
if ($pos !== false) {
$seconds = substr($number, 0, $pos);
if (bccomp($seconds, 0) < 0) {
$nanos = bcmul("0" . substr($number, $pos), -1000000000);
} else {
$nanos = bcmul("0" . substr($number, $pos), 1000000000);
}
} else {
$seconds = $number;
$nanos = 0;
}
$duration = new Duration();
$duration->setSeconds($seconds);
$duration->setNanos($nanos);
return $duration;
}
public static function formatDuration($value)
{
if (bccomp($value->getSeconds(), '315576000001') != -1) {
throw new GPBDecodeException('Duration number too large.');
}
if (bccomp($value->getSeconds(), '-315576000001') != 1) {
throw new GPBDecodeException('Duration number too small.');
}
$nanos = $value->getNanos();
if ($nanos === 0) {
return (string) $value->getSeconds();
}
if ($nanos % 1000000 === 0) {
$digits = 3;
} elseif ($nanos % 1000 === 0) {
$digits = 6;
} else {
$digits = 9;
}
$nanos = bcdiv($nanos, '1000000000', $digits);
return bcadd($value->getSeconds(), $nanos, $digits);
}
public static function parseFieldMask($paths_string)
{
$field_mask = new FieldMask();
if (strlen($paths_string) === 0) {
return $field_mask;
}
$path_strings = explode(",", $paths_string);
$paths = $field_mask->getPaths();
foreach($path_strings as &$path_string) {
$field_strings = explode(".", $path_string);
foreach($field_strings as &$field_string) {
$field_string = camel2underscore($field_string);
}
$path_string = implode(".", $field_strings);
$paths[] = $path_string;
}
return $field_mask;
}
public static function formatFieldMask($field_mask)
{
$converted_paths = [];
foreach($field_mask->getPaths() as $path) {
$fields = explode('.', $path);
$converted_path = [];
foreach ($fields as $field) {
$segments = explode('_', $field);
$start = true;
$converted_segments = "";
foreach($segments as $segment) {
if (!$start) {
$converted = ucfirst($segment);
} else {
$converted = $segment;
$start = false;
}
$converted_segments .= $converted;
}
$converted_path []= $converted_segments;
}
$converted_path = implode(".", $converted_path);
$converted_paths []= $converted_path;
}
return implode(",", $converted_paths);
}
public static function getNanosecondsForTimestamp($nanoseconds)
{
if ($nanoseconds == 0) {
return '';
}
if ($nanoseconds % static::NANOS_PER_MILLISECOND == 0) {
return sprintf('%03d', $nanoseconds / static::NANOS_PER_MILLISECOND);
}
if ($nanoseconds % static::NANOS_PER_MICROSECOND == 0) {
return sprintf('%06d', $nanoseconds / static::NANOS_PER_MICROSECOND);
}
return sprintf('%09d', $nanoseconds);
}
public static function hasSpecialJsonMapping($msg)
{
return is_a($msg, 'Google\Protobuf\Any') ||
is_a($msg, "Google\Protobuf\ListValue") ||
is_a($msg, "Google\Protobuf\Struct") ||
is_a($msg, "Google\Protobuf\Value") ||
is_a($msg, "Google\Protobuf\Duration") ||
is_a($msg, "Google\Protobuf\Timestamp") ||
is_a($msg, "Google\Protobuf\FieldMask") ||
static::hasJsonValue($msg);
}
public static function hasJsonValue($msg)
{
return is_a($msg, "Google\Protobuf\DoubleValue") ||
is_a($msg, "Google\Protobuf\FloatValue") ||
is_a($msg, "Google\Protobuf\Int64Value") ||
is_a($msg, "Google\Protobuf\UInt64Value") ||
is_a($msg, "Google\Protobuf\Int32Value") ||
is_a($msg, "Google\Protobuf\UInt32Value") ||
is_a($msg, "Google\Protobuf\BoolValue") ||
is_a($msg, "Google\Protobuf\StringValue") ||
is_a($msg, "Google\Protobuf\BytesValue");
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
namespace Google\Protobuf\Internal;
if (false) {
/**
* This class is deprecated. Use Google\Protobuf\Internal\DescriptorProto\ExtensionRange instead.
* @deprecated
*/
class DescriptorProto_ExtensionRange {}
}
class_exists(DescriptorProto\ExtensionRange::class);
@trigger_error('Google\Protobuf\Internal\DescriptorProto_ExtensionRange is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\DescriptorProto\ExtensionRange instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
namespace Google\Protobuf\Internal;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Describes a oneof.
*
* Generated from protobuf message <code>google.protobuf.OneofDescriptorProto</code>
*/
class OneofDescriptorProto extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional string name = 1;</code>
*/
protected $name = null;
/**
* Generated from protobuf field <code>optional .google.protobuf.OneofOptions options = 2;</code>
*/
protected $options = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* @type \Google\Protobuf\Internal\OneofOptions $options
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>optional string name = 1;</code>
* @return string
*/
public function getName()
{
return isset($this->name) ? $this->name : '';
}
public function hasName()
{
return isset($this->name);
}
public function clearName()
{
unset($this->name);
}
/**
* Generated from protobuf field <code>optional string name = 1;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional .google.protobuf.OneofOptions options = 2;</code>
* @return \Google\Protobuf\Internal\OneofOptions|null
*/
public function getOptions()
{
return $this->options;
}
public function hasOptions()
{
return isset($this->options);
}
public function clearOptions()
{
unset($this->options);
}
/**
* Generated from protobuf field <code>optional .google.protobuf.OneofOptions options = 2;</code>
* @param \Google\Protobuf\Internal\OneofOptions $var
* @return $this
*/
public function setOptions($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\OneofOptions::class);
$this->options = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
namespace Google\Protobuf\Internal;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Describes a message type.
*
* Generated from protobuf message <code>google.protobuf.DescriptorProto</code>
*/
class DescriptorProto extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional string name = 1;</code>
*/
protected $name = null;
/**
* Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
*/
private $field;
/**
* Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
*/
private $extension;
/**
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
*/
private $nested_type;
/**
* Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
*/
private $enum_type;
/**
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
*/
private $extension_range;
/**
* Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
*/
private $oneof_decl;
/**
* Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code>
*/
protected $options = null;
/**
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
*/
private $reserved_range;
/**
* Reserved field names, which may not be used by fields in the same message.
* A given name may only be reserved once.
*
* Generated from protobuf field <code>repeated string reserved_name = 10;</code>
*/
private $reserved_name;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* @type array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $field
* @type array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $extension
* @type array<\Google\Protobuf\Internal\DescriptorProto>|\Google\Protobuf\Internal\RepeatedField $nested_type
* @type array<\Google\Protobuf\Internal\EnumDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $enum_type
* @type array<\Google\Protobuf\Internal\DescriptorProto\ExtensionRange>|\Google\Protobuf\Internal\RepeatedField $extension_range
* @type array<\Google\Protobuf\Internal\OneofDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $oneof_decl
* @type \Google\Protobuf\Internal\MessageOptions $options
* @type array<\Google\Protobuf\Internal\DescriptorProto\ReservedRange>|\Google\Protobuf\Internal\RepeatedField $reserved_range
* @type array<string>|\Google\Protobuf\Internal\RepeatedField $reserved_name
* Reserved field names, which may not be used by fields in the same message.
* A given name may only be reserved once.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>optional string name = 1;</code>
* @return string
*/
public function getName()
{
return isset($this->name) ? $this->name : '';
}
public function hasName()
{
return isset($this->name);
}
public function clearName()
{
unset($this->name);
}
/**
* Generated from protobuf field <code>optional string name = 1;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getField()
{
return $this->field;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto field = 2;</code>
* @param array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setField($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
$this->field = $arr;
return $this;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getExtension()
{
return $this->extension;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.FieldDescriptorProto extension = 6;</code>
* @param array<\Google\Protobuf\Internal\FieldDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setExtension($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\FieldDescriptorProto::class);
$this->extension = $arr;
return $this;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getNestedType()
{
return $this->nested_type;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto nested_type = 3;</code>
* @param array<\Google\Protobuf\Internal\DescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setNestedType($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto::class);
$this->nested_type = $arr;
return $this;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getEnumType()
{
return $this->enum_type;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto enum_type = 4;</code>
* @param array<\Google\Protobuf\Internal\EnumDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setEnumType($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto::class);
$this->enum_type = $arr;
return $this;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getExtensionRange()
{
return $this->extension_range;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;</code>
* @param array<\Google\Protobuf\Internal\DescriptorProto\ExtensionRange>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setExtensionRange($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto\ExtensionRange::class);
$this->extension_range = $arr;
return $this;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getOneofDecl()
{
return $this->oneof_decl;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.OneofDescriptorProto oneof_decl = 8;</code>
* @param array<\Google\Protobuf\Internal\OneofDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setOneofDecl($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\OneofDescriptorProto::class);
$this->oneof_decl = $arr;
return $this;
}
/**
* Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code>
* @return \Google\Protobuf\Internal\MessageOptions|null
*/
public function getOptions()
{
return $this->options;
}
public function hasOptions()
{
return isset($this->options);
}
public function clearOptions()
{
unset($this->options);
}
/**
* Generated from protobuf field <code>optional .google.protobuf.MessageOptions options = 7;</code>
* @param \Google\Protobuf\Internal\MessageOptions $var
* @return $this
*/
public function setOptions($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MessageOptions::class);
$this->options = $var;
return $this;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getReservedRange()
{
return $this->reserved_range;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;</code>
* @param array<\Google\Protobuf\Internal\DescriptorProto\ReservedRange>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setReservedRange($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto\ReservedRange::class);
$this->reserved_range = $arr;
return $this;
}
/**
* Reserved field names, which may not be used by fields in the same message.
* A given name may only be reserved once.
*
* Generated from protobuf field <code>repeated string reserved_name = 10;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getReservedName()
{
return $this->reserved_name;
}
/**
* Reserved field names, which may not be used by fields in the same message.
* A given name may only be reserved once.
*
* Generated from protobuf field <code>repeated string reserved_name = 10;</code>
* @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setReservedName($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->reserved_name = $arr;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Google\Protobuf\Internal;
use Google\Protobuf\Internal\Uint64;
class CodedInputStream
{
private $buffer;
private $buffer_size_after_limit;
private $buffer_end;
private $current;
private $current_limit;
private $legitimate_message_end;
private $recursion_budget;
private $recursion_limit;
private $total_bytes_limit;
private $total_bytes_read;
const MAX_VARINT_BYTES = 10;
const DEFAULT_RECURSION_LIMIT = 100;
const DEFAULT_TOTAL_BYTES_LIMIT = 33554432; // 32 << 20, 32MB
public function __construct($buffer)
{
$start = 0;
$end = strlen($buffer);
$this->buffer = $buffer;
$this->buffer_size_after_limit = 0;
$this->buffer_end = $end;
$this->current = $start;
$this->current_limit = $end;
$this->legitimate_message_end = false;
$this->recursion_budget = self::DEFAULT_RECURSION_LIMIT;
$this->recursion_limit = self::DEFAULT_RECURSION_LIMIT;
$this->total_bytes_limit = self::DEFAULT_TOTAL_BYTES_LIMIT;
$this->total_bytes_read = $end - $start;
}
private function advance($amount)
{
$this->current += $amount;
}
public function bufferSize()
{
return $this->buffer_end - $this->current;
}
public function current()
{
return $this->total_bytes_read -
($this->buffer_end - $this->current +
$this->buffer_size_after_limit);
}
public function substr($start, $end)
{
return substr($this->buffer, $start, $end - $start);
}
private function recomputeBufferLimits()
{
$this->buffer_end += $this->buffer_size_after_limit;
$closest_limit = min($this->current_limit, $this->total_bytes_limit);
if ($closest_limit < $this->total_bytes_read) {
// The limit position is in the current buffer. We must adjust the
// buffer size accordingly.
$this->buffer_size_after_limit = $this->total_bytes_read -
$closest_limit;
$this->buffer_end -= $this->buffer_size_after_limit;
} else {
$this->buffer_size_after_limit = 0;
}
}
private function consumedEntireMessage()
{
return $this->legitimate_message_end;
}
/**
* Read uint32 into $var. Advance buffer with consumed bytes. If the
* contained varint is larger than 32 bits, discard the high order bits.
* @param $var.
*/
public function readVarint32(&$var)
{
if (!$this->readVarint64($var)) {
return false;
}
if (PHP_INT_SIZE == 4) {
$var = bcmod($var, 4294967296);
} else {
$var &= 0xFFFFFFFF;
}
// Convert large uint32 to int32.
if ($var > 0x7FFFFFFF) {
if (PHP_INT_SIZE === 8) {
$var = $var | (0xFFFFFFFF << 32);
} else {
$var = bcsub($var, 4294967296);
}
}
$var = intval($var);
return true;
}
/**
* Read Uint64 into $var. Advance buffer with consumed bytes.
* @param $var.
*/
public function readVarint64(&$var)
{
$count = 0;
if (PHP_INT_SIZE == 4) {
$high = 0;
$low = 0;
$b = 0;
do {
if ($this->current === $this->buffer_end) {
return false;
}
if ($count === self::MAX_VARINT_BYTES) {
return false;
}
$b = ord($this->buffer[$this->current]);
$bits = 7 * $count;
if ($bits >= 32) {
$high |= (($b & 0x7F) << ($bits - 32));
} else if ($bits > 25){
// $bits is 28 in this case.
$low |= (($b & 0x7F) << 28);
$high = ($b & 0x7F) >> 4;
} else {
$low |= (($b & 0x7F) << $bits);
}
$this->advance(1);
$count += 1;
} while ($b & 0x80);
$var = GPBUtil::combineInt32ToInt64($high, $low);
if (bccomp($var, 0) < 0) {
$var = bcadd($var, "18446744073709551616");
}
} else {
$result = 0;
$shift = 0;
do {
if ($this->current === $this->buffer_end) {
return false;
}
if ($count === self::MAX_VARINT_BYTES) {
return false;
}
$byte = ord($this->buffer[$this->current]);
$result |= ($byte & 0x7f) << $shift;
$shift += 7;
$this->advance(1);
$count += 1;
} while ($byte > 0x7f);
$var = $result;
}
return true;
}
/**
* Read int into $var. If the result is larger than the largest integer, $var
* will be -1. Advance buffer with consumed bytes.
* @param $var.
*/
public function readVarintSizeAsInt(&$var)
{
if (!$this->readVarint64($var)) {
return false;
}
$var = (int)$var;
return true;
}
/**
* Read 32-bit unsigned integer to $var. If the buffer has less than 4 bytes,
* return false. Advance buffer with consumed bytes.
* @param $var.
*/
public function readLittleEndian32(&$var)
{
$data = null;
if (!$this->readRaw(4, $data)) {
return false;
}
$var = unpack('V', $data);
$var = $var[1];
return true;
}
/**
* Read 64-bit unsigned integer to $var. If the buffer has less than 8 bytes,
* return false. Advance buffer with consumed bytes.
* @param $var.
*/
public function readLittleEndian64(&$var)
{
$data = null;
if (!$this->readRaw(4, $data)) {
return false;
}
$low = unpack('V', $data)[1];
if (!$this->readRaw(4, $data)) {
return false;
}
$high = unpack('V', $data)[1];
if (PHP_INT_SIZE == 4) {
$var = GPBUtil::combineInt32ToInt64($high, $low);
} else {
$var = ($high << 32) | $low;
}
return true;
}
/**
* Read tag into $var. Advance buffer with consumed bytes.
* @param $var.
*/
public function readTag()
{
if ($this->current === $this->buffer_end) {
// Make sure that it failed due to EOF, not because we hit
// total_bytes_limit, which, unlike normal limits, is not a valid
// place to end a message.
$current_position = $this->total_bytes_read -
$this->buffer_size_after_limit;
if ($current_position >= $this->total_bytes_limit) {
// Hit total_bytes_limit_. But if we also hit the normal limit,
// we're still OK.
$this->legitimate_message_end =
($this->current_limit === $this->total_bytes_limit);
} else {
$this->legitimate_message_end = true;
}
return 0;
}
$result = 0;
// The largest tag is 2^29 - 1, which can be represented by int32.
$success = $this->readVarint32($result);
if ($success) {
return $result;
} else {
return 0;
}
}
public function readRaw($size, &$buffer)
{
$current_buffer_size = 0;
if ($this->bufferSize() < $size) {
return false;
}
if ($size === 0) {
$buffer = "";
} else {
$buffer = substr($this->buffer, $this->current, $size);
$this->advance($size);
}
return true;
}
/* Places a limit on the number of bytes that the stream may read, starting
* from the current position. Once the stream hits this limit, it will act
* like the end of the input has been reached until popLimit() is called.
*
* As the names imply, the stream conceptually has a stack of limits. The
* shortest limit on the stack is always enforced, even if it is not the top
* limit.
*
* The value returned by pushLimit() is opaque to the caller, and must be
* passed unchanged to the corresponding call to popLimit().
*
* @param integer $byte_limit
* @throws \Exception Fail to push limit.
*/
public function pushLimit($byte_limit)
{
// Current position relative to the beginning of the stream.
$current_position = $this->current();
$old_limit = $this->current_limit;
// security: byte_limit is possibly evil, so check for negative values
// and overflow.
if ($byte_limit >= 0 &&
$byte_limit <= PHP_INT_MAX - $current_position &&
$byte_limit <= $this->current_limit - $current_position) {
$this->current_limit = $current_position + $byte_limit;
$this->recomputeBufferLimits();
} else {
throw new GPBDecodeException("Fail to push limit.");
}
return $old_limit;
}
/* The limit passed in is actually the *old* limit, which we returned from
* PushLimit().
*
* @param integer $byte_limit
*/
public function popLimit($byte_limit)
{
$this->current_limit = $byte_limit;
$this->recomputeBufferLimits();
// We may no longer be at a legitimate message end. ReadTag() needs to
// be called again to find out.
$this->legitimate_message_end = false;
}
public function incrementRecursionDepthAndPushLimit(
$byte_limit, &$old_limit, &$recursion_budget)
{
$old_limit = $this->pushLimit($byte_limit);
$recursion_limit = --$this->recursion_limit;
}
public function decrementRecursionDepthAndPopLimit($byte_limit)
{
$result = $this->consumedEntireMessage();
$this->popLimit($byte_limit);
++$this->recursion_budget;
return $result;
}
public function bytesUntilLimit()
{
if ($this->current_limit === PHP_INT_MAX) {
return -1;
}
return $this->current_limit - $this->current;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
namespace Google\Protobuf\Internal;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Describes the relationship between generated code and its original source
* file. A GeneratedCodeInfo message is associated with only one generated
* source file, but may contain references to different source .proto files.
*
* Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo</code>
*/
class GeneratedCodeInfo extends \Google\Protobuf\Internal\Message
{
/**
* An Annotation connects some span of text in generated code to an element
* of its generating .proto file.
*
* Generated from protobuf field <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
*/
private $annotation;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type array<\Google\Protobuf\Internal\GeneratedCodeInfo\Annotation>|\Google\Protobuf\Internal\RepeatedField $annotation
* An Annotation connects some span of text in generated code to an element
* of its generating .proto file.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
parent::__construct($data);
}
/**
* An Annotation connects some span of text in generated code to an element
* of its generating .proto file.
*
* Generated from protobuf field <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getAnnotation()
{
return $this->annotation;
}
/**
* An Annotation connects some span of text in generated code to an element
* of its generating .proto file.
*
* Generated from protobuf field <code>repeated .google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;</code>
* @param array<\Google\Protobuf\Internal\GeneratedCodeInfo\Annotation>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setAnnotation($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation::class);
$this->annotation = $arr;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Google\Protobuf\Internal;
class CodedOutputStream
{
private $buffer;
private $buffer_size;
private $current;
const MAX_VARINT64_BYTES = 10;
public function __construct($size)
{
$this->current = 0;
$this->buffer_size = $size;
$this->buffer = str_repeat(chr(0), $this->buffer_size);
}
public function getData()
{
return $this->buffer;
}
public function writeVarint32($value, $trim)
{
$bytes = str_repeat(chr(0), self::MAX_VARINT64_BYTES);
$size = self::writeVarintToArray($value, $bytes, $trim);
return $this->writeRaw($bytes, $size);
}
public function writeVarint64($value)
{
$bytes = str_repeat(chr(0), self::MAX_VARINT64_BYTES);
$size = self::writeVarintToArray($value, $bytes);
return $this->writeRaw($bytes, $size);
}
public function writeLittleEndian32($value)
{
$bytes = str_repeat(chr(0), 4);
$size = self::writeLittleEndian32ToArray($value, $bytes);
return $this->writeRaw($bytes, $size);
}
public function writeLittleEndian64($value)
{
$bytes = str_repeat(chr(0), 8);
$size = self::writeLittleEndian64ToArray($value, $bytes);
return $this->writeRaw($bytes, $size);
}
public function writeTag($tag)
{
return $this->writeVarint32($tag, true);
}
public function writeRaw($data, $size)
{
if ($this->buffer_size < $size) {
trigger_error("Output stream doesn't have enough buffer.");
return false;
}
for ($i = 0; $i < $size; $i++) {
$this->buffer[$this->current] = $data[$i];
$this->current++;
$this->buffer_size--;
}
return true;
}
public static function writeVarintToArray($value, &$buffer, $trim = false)
{
$current = 0;
$high = 0;
$low = 0;
if (PHP_INT_SIZE == 4) {
GPBUtil::divideInt64ToInt32($value, $high, $low, $trim);
} else {
$low = $value;
}
while (($low >= 0x80 || $low < 0) || $high != 0) {
$buffer[$current] = chr($low | 0x80);
$value = ($value >> 7) & ~(0x7F << ((PHP_INT_SIZE << 3) - 7));
$carry = ($high & 0x7F) << ((PHP_INT_SIZE << 3) - 7);
$high = ($high >> 7) & ~(0x7F << ((PHP_INT_SIZE << 3) - 7));
$low = (($low >> 7) & ~(0x7F << ((PHP_INT_SIZE << 3) - 7)) | $carry);
$current++;
}
$buffer[$current] = chr($low);
return $current + 1;
}
private static function writeLittleEndian32ToArray($value, &$buffer)
{
$buffer[0] = chr($value & 0x000000FF);
$buffer[1] = chr(($value >> 8) & 0x000000FF);
$buffer[2] = chr(($value >> 16) & 0x000000FF);
$buffer[3] = chr(($value >> 24) & 0x000000FF);
return 4;
}
private static function writeLittleEndian64ToArray($value, &$buffer)
{
$high = 0;
$low = 0;
if (PHP_INT_SIZE == 4) {
GPBUtil::divideInt64ToInt32($value, $high, $low);
} else {
$low = $value & 0xFFFFFFFF;
$high = ($value >> 32) & 0xFFFFFFFF;
}
$buffer[0] = chr($low & 0x000000FF);
$buffer[1] = chr(($low >> 8) & 0x000000FF);
$buffer[2] = chr(($low >> 16) & 0x000000FF);
$buffer[3] = chr(($low >> 24) & 0x000000FF);
$buffer[4] = chr($high & 0x000000FF);
$buffer[5] = chr(($high >> 8) & 0x000000FF);
$buffer[6] = chr(($high >> 16) & 0x000000FF);
$buffer[7] = chr(($high >> 24) & 0x000000FF);
return 8;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
namespace Google\Protobuf\Internal;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.MethodOptions</code>
*/
class MethodOptions extends \Google\Protobuf\Internal\Message
{
/**
* Is this method deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the method, or it will be completely ignored; in the very least,
* this is a formalization for deprecating methods.
*
* Generated from protobuf field <code>optional bool deprecated = 33 [default = false];</code>
*/
protected $deprecated = null;
/**
* Generated from protobuf field <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
*/
protected $idempotency_level = null;
/**
* The parser stores options it doesn't recognize here. See above.
*
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
*/
private $uninterpreted_option;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type bool $deprecated
* Is this method deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the method, or it will be completely ignored; in the very least,
* this is a formalization for deprecating methods.
* @type int $idempotency_level
* @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
* The parser stores options it doesn't recognize here. See above.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
parent::__construct($data);
}
/**
* Is this method deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the method, or it will be completely ignored; in the very least,
* this is a formalization for deprecating methods.
*
* Generated from protobuf field <code>optional bool deprecated = 33 [default = false];</code>
* @return bool
*/
public function getDeprecated()
{
return isset($this->deprecated) ? $this->deprecated : false;
}
public function hasDeprecated()
{
return isset($this->deprecated);
}
public function clearDeprecated()
{
unset($this->deprecated);
}
/**
* Is this method deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for the method, or it will be completely ignored; in the very least,
* this is a formalization for deprecating methods.
*
* Generated from protobuf field <code>optional bool deprecated = 33 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setDeprecated($var)
{
GPBUtil::checkBool($var);
$this->deprecated = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
* @return int
*/
public function getIdempotencyLevel()
{
return isset($this->idempotency_level) ? $this->idempotency_level : 0;
}
public function hasIdempotencyLevel()
{
return isset($this->idempotency_level);
}
public function clearIdempotencyLevel()
{
unset($this->idempotency_level);
}
/**
* Generated from protobuf field <code>optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];</code>
* @param int $var
* @return $this
*/
public function setIdempotencyLevel($var)
{
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\MethodOptions\IdempotencyLevel::class);
$this->idempotency_level = $var;
return $this;
}
/**
* The parser stores options it doesn't recognize here. See above.
*
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getUninterpretedOption()
{
return $this->uninterpreted_option;
}
/**
* The parser stores options it doesn't recognize here. See above.
*
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
$this->uninterpreted_option = $arr;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Google\Protobuf\Internal;
use Google\Protobuf\Internal\EnumDescriptor;
use Google\Protobuf\EnumValueDescriptor;
class EnumBuilderContext
{
private $descriptor;
private $pool;
public function __construct($full_name, $klass, $pool)
{
$this->descriptor = new EnumDescriptor();
$this->descriptor->setFullName($full_name);
$this->descriptor->setClass($klass);
$this->pool = $pool;
}
public function value($name, $number)
{
$value = new EnumValueDescriptor($name, $number);
$this->descriptor->addValue($number, $value);
return $this;
}
public function finalizeToPool()
{
$this->pool->addEnumDescriptor($this->descriptor);
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
namespace Google\Protobuf\Internal;
if (false) {
/**
* This class is deprecated. Use Google\Protobuf\Internal\FileOptions\OptimizeMode instead.
* @deprecated
*/
class FileOptions_OptimizeMode {}
}
class_exists(FileOptions\OptimizeMode::class);
@trigger_error('Google\Protobuf\Internal\FileOptions_OptimizeMode is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\FileOptions\OptimizeMode instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
namespace Google\Protobuf\Internal;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.OneofOptions</code>
*/
class OneofOptions extends \Google\Protobuf\Internal\Message
{
/**
* The parser stores options it doesn't recognize here. See above.
*
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
*/
private $uninterpreted_option;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
* The parser stores options it doesn't recognize here. See above.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
parent::__construct($data);
}
/**
* The parser stores options it doesn't recognize here. See above.
*
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getUninterpretedOption()
{
return $this->uninterpreted_option;
}
/**
* The parser stores options it doesn't recognize here. See above.
*
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
$this->uninterpreted_option = $arr;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Google\Protobuf\Internal;
class OneofDescriptor
{
use HasPublicDescriptorTrait;
private $name;
/** @var \Google\Protobuf\FieldDescriptor[] $fields */
private $fields;
public function __construct()
{
$this->public_desc = new \Google\Protobuf\OneofDescriptor($this);
}
public function setName($name)
{
$this->name = $name;
}
public function getName()
{
return $this->name;
}
public function addField(FieldDescriptor $field)
{
$this->fields[] = $field;
}
public function getFields()
{
return $this->fields;
}
public function isSynthetic()
{
return !is_null($this->fields) && count($this->fields) === 1
&& $this->fields[0]->getProto3Optional();
}
public static function buildFromProto($oneof_proto, $desc, $index)
{
$oneof = new OneofDescriptor();
$oneof->setName($oneof_proto->getName());
foreach ($desc->getField() as $field) {
/** @var FieldDescriptor $field */
if ($field->getOneofIndex() == $index) {
$oneof->addField($field);
$field->setContainingOneof($oneof);
}
}
return $oneof;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Google\Protobuf\Internal;
use Google\Protobuf\Internal\Descriptor;
use Google\Protobuf\Internal\FileDescriptor;
use Google\Protobuf\Internal\FileDescriptorSet;
use Google\Protobuf\Internal\MessageBuilderContext;
use Google\Protobuf\Internal\EnumBuilderContext;
class DescriptorPool
{
private static $pool;
// Map from message names to sub-maps, which are maps from field numbers to
// field descriptors.
private $class_to_desc = [];
private $class_to_enum_desc = [];
private $proto_to_class = [];
public static function getGeneratedPool()
{
if (!isset(self::$pool)) {
self::$pool = new DescriptorPool();
}
return self::$pool;
}
public function internalAddGeneratedFile($data, $use_nested = false)
{
$files = new FileDescriptorSet();
$files->mergeFromString($data);
foreach($files->getFile() as $file_proto) {
$file = FileDescriptor::buildFromProto($file_proto);
foreach ($file->getMessageType() as $desc) {
$this->addDescriptor($desc);
}
unset($desc);
foreach ($file->getEnumType() as $desc) {
$this->addEnumDescriptor($desc);
}
unset($desc);
foreach ($file->getMessageType() as $desc) {
$this->crossLink($desc);
}
unset($desc);
}
}
public function addMessage($name, $klass)
{
return new MessageBuilderContext($name, $klass, $this);
}
public function addEnum($name, $klass)
{
return new EnumBuilderContext($name, $klass, $this);
}
public function addDescriptor($descriptor)
{
$this->proto_to_class[$descriptor->getFullName()] =
$descriptor->getClass();
$this->class_to_desc[$descriptor->getClass()] = $descriptor;
$this->class_to_desc[$descriptor->getLegacyClass()] = $descriptor;
$this->class_to_desc[$descriptor->getPreviouslyUnreservedClass()] = $descriptor;
foreach ($descriptor->getNestedType() as $nested_type) {
$this->addDescriptor($nested_type);
}
foreach ($descriptor->getEnumType() as $enum_type) {
$this->addEnumDescriptor($enum_type);
}
}
public function addEnumDescriptor($descriptor)
{
$this->proto_to_class[$descriptor->getFullName()] =
$descriptor->getClass();
$this->class_to_enum_desc[$descriptor->getClass()] = $descriptor;
$this->class_to_enum_desc[$descriptor->getLegacyClass()] = $descriptor;
}
public function getDescriptorByClassName($klass)
{
if (isset($this->class_to_desc[$klass])) {
return $this->class_to_desc[$klass];
} else {
return null;
}
}
public function getEnumDescriptorByClassName($klass)
{
if (isset($this->class_to_enum_desc[$klass])) {
return $this->class_to_enum_desc[$klass];
} else {
return null;
}
}
public function getDescriptorByProtoName($proto)
{
if (isset($this->proto_to_class[$proto])) {
$klass = $this->proto_to_class[$proto];
return $this->class_to_desc[$klass];
} else {
return null;
}
}
public function getEnumDescriptorByProtoName($proto)
{
$klass = $this->proto_to_class[$proto];
return $this->class_to_enum_desc[$klass];
}
private function crossLink(Descriptor $desc)
{
foreach ($desc->getField() as $field) {
switch ($field->getType()) {
case GPBType::MESSAGE:
$proto = $field->getMessageType();
if ($proto[0] == '.') {
$proto = substr($proto, 1);
}
$subdesc = $this->getDescriptorByProtoName($proto);
if (is_null($subdesc)) {
trigger_error(
'proto not added: ' . $proto
. " for " . $desc->getFullName(), E_USER_ERROR);
}
$field->setMessageType($subdesc);
break;
case GPBType::ENUM:
$proto = $field->getEnumType();
if ($proto[0] == '.') {
$proto = substr($proto, 1);
}
$field->setEnumType(
$this->getEnumDescriptorByProtoName($proto));
break;
default:
break;
}
}
unset($field);
foreach ($desc->getNestedType() as $nested_type) {
$this->crossLink($nested_type);
}
unset($nested_type);
}
public function finish()
{
foreach ($this->class_to_desc as $klass => $desc) {
$this->crossLink($desc);
}
unset($desc);
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Google\Protobuf\Internal;
class GPBLabel
{
const OPTIONAL = 1;
const REQUIRED = 2;
const REPEATED = 3;
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
namespace Google\Protobuf\Internal;
if (false) {
/**
* This class is deprecated. Use Google\Protobuf\Internal\FieldDescriptorProto\Label instead.
* @deprecated
*/
class FieldDescriptorProto_Label {}
}
class_exists(FieldDescriptorProto\Label::class);
@trigger_error('Google\Protobuf\Internal\FieldDescriptorProto_Label is deprecated and will be removed in the next major release. Use Google\Protobuf\Internal\FieldDescriptorProto\Label instead', E_USER_DEPRECATED);
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
namespace Google\Protobuf\Internal;
/**
* Base class for Google\Protobuf\Timestamp, this contains hand-written
* convenience methods.
*/
class TimestampBase extends \Google\Protobuf\Internal\Message
{
/*
* Converts PHP DateTime to Timestamp.
*
* @param \DateTime $datetime
*/
public function fromDateTime(\DateTime $datetime)
{
$this->seconds = $datetime->getTimestamp();
$this->nanos = 1000 * $datetime->format('u');
}
/**
* Converts Timestamp to PHP DateTime.
*
* @return \DateTime $datetime
*/
public function toDateTime()
{
$time = sprintf('%s.%06d', $this->seconds, $this->nanos / 1000);
return \DateTime::createFromFormat('U.u', $time);
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
namespace Google\Protobuf\Internal;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Describes an enum type.
*
* Generated from protobuf message <code>google.protobuf.EnumDescriptorProto</code>
*/
class EnumDescriptorProto extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional string name = 1;</code>
*/
protected $name = null;
/**
* Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
*/
private $value;
/**
* Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code>
*/
protected $options = null;
/**
* Range of reserved numeric values. Reserved numeric values may not be used
* by enum values in the same enum declaration. Reserved ranges may not
* overlap.
*
* Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code>
*/
private $reserved_range;
/**
* Reserved enum value names, which may not be reused. A given name may only
* be reserved once.
*
* Generated from protobuf field <code>repeated string reserved_name = 5;</code>
*/
private $reserved_name;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* @type array<\Google\Protobuf\Internal\EnumValueDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $value
* @type \Google\Protobuf\Internal\EnumOptions $options
* @type array<\Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange>|\Google\Protobuf\Internal\RepeatedField $reserved_range
* Range of reserved numeric values. Reserved numeric values may not be used
* by enum values in the same enum declaration. Reserved ranges may not
* overlap.
* @type array<string>|\Google\Protobuf\Internal\RepeatedField $reserved_name
* Reserved enum value names, which may not be reused. A given name may only
* be reserved once.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>optional string name = 1;</code>
* @return string
*/
public function getName()
{
return isset($this->name) ? $this->name : '';
}
public function hasName()
{
return isset($this->name);
}
public function clearName()
{
unset($this->name);
}
/**
* Generated from protobuf field <code>optional string name = 1;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getValue()
{
return $this->value;
}
/**
* Generated from protobuf field <code>repeated .google.protobuf.EnumValueDescriptorProto value = 2;</code>
* @param array<\Google\Protobuf\Internal\EnumValueDescriptorProto>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setValue($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumValueDescriptorProto::class);
$this->value = $arr;
return $this;
}
/**
* Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code>
* @return \Google\Protobuf\Internal\EnumOptions|null
*/
public function getOptions()
{
return $this->options;
}
public function hasOptions()
{
return isset($this->options);
}
public function clearOptions()
{
unset($this->options);
}
/**
* Generated from protobuf field <code>optional .google.protobuf.EnumOptions options = 3;</code>
* @param \Google\Protobuf\Internal\EnumOptions $var
* @return $this
*/
public function setOptions($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\EnumOptions::class);
$this->options = $var;
return $this;
}
/**
* Range of reserved numeric values. Reserved numeric values may not be used
* by enum values in the same enum declaration. Reserved ranges may not
* overlap.
*
* Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getReservedRange()
{
return $this->reserved_range;
}
/**
* Range of reserved numeric values. Reserved numeric values may not be used
* by enum values in the same enum declaration. Reserved ranges may not
* overlap.
*
* Generated from protobuf field <code>repeated .google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;</code>
* @param array<\Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setReservedRange($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\EnumDescriptorProto\EnumReservedRange::class);
$this->reserved_range = $arr;
return $this;
}
/**
* Reserved enum value names, which may not be reused. A given name may only
* be reserved once.
*
* Generated from protobuf field <code>repeated string reserved_name = 5;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getReservedName()
{
return $this->reserved_name;
}
/**
* Reserved enum value names, which may not be reused. A given name may only
* be reserved once.
*
* Generated from protobuf field <code>repeated string reserved_name = 5;</code>
* @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setReservedName($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->reserved_name = $arr;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
namespace Google\Protobuf\Internal;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.FileOptions</code>
*/
class FileOptions extends \Google\Protobuf\Internal\Message
{
/**
* Sets the Java package where classes generated from this .proto will be
* placed. By default, the proto package is used, but this is often
* inappropriate because proto packages do not normally start with backwards
* domain names.
*
* Generated from protobuf field <code>optional string java_package = 1;</code>
*/
protected $java_package = null;
/**
* Controls the name of the wrapper Java class generated for the .proto file.
* That class will always contain the .proto file's getDescriptor() method as
* well as any top-level extensions defined in the .proto file.
* If java_multiple_files is disabled, then all the other classes from the
* .proto file will be nested inside the single wrapper outer class.
*
* Generated from protobuf field <code>optional string java_outer_classname = 8;</code>
*/
protected $java_outer_classname = null;
/**
* If enabled, then the Java code generator will generate a separate .java
* file for each top-level message, enum, and service defined in the .proto
* file. Thus, these types will *not* be nested inside the wrapper class
* named by java_outer_classname. However, the wrapper class will still be
* generated to contain the file's getDescriptor() method as well as any
* top-level extensions defined in the file.
*
* Generated from protobuf field <code>optional bool java_multiple_files = 10 [default = false];</code>
*/
protected $java_multiple_files = null;
/**
* This option does nothing.
*
* Generated from protobuf field <code>optional bool java_generate_equals_and_hash = 20 [deprecated = true];</code>
* @deprecated
*/
protected $java_generate_equals_and_hash = null;
/**
* If set true, then the Java2 code generator will generate code that
* throws an exception whenever an attempt is made to assign a non-UTF-8
* byte sequence to a string field.
* Message reflection will do the same.
* However, an extension field still accepts non-UTF-8 byte sequences.
* This option has no effect on when used with the lite runtime.
*
* Generated from protobuf field <code>optional bool java_string_check_utf8 = 27 [default = false];</code>
*/
protected $java_string_check_utf8 = null;
/**
* Generated from protobuf field <code>optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];</code>
*/
protected $optimize_for = null;
/**
* Sets the Go package where structs generated from this .proto will be
* placed. If omitted, the Go package will be derived from the following:
* - The basename of the package import path, if provided.
* - Otherwise, the package statement in the .proto file, if present.
* - Otherwise, the basename of the .proto file, without extension.
*
* Generated from protobuf field <code>optional string go_package = 11;</code>
*/
protected $go_package = null;
/**
* Should generic services be generated in each language? "Generic" services
* are not specific to any particular RPC system. They are generated by the
* main code generators in each language (without additional plugins).
* Generic services were the only kind of service generation supported by
* early versions of google.protobuf.
* Generic services are now considered deprecated in favor of using plugins
* that generate code specific to your particular RPC system. Therefore,
* these default to false. Old code which depends on generic services should
* explicitly set them to true.
*
* Generated from protobuf field <code>optional bool cc_generic_services = 16 [default = false];</code>
*/
protected $cc_generic_services = null;
/**
* Generated from protobuf field <code>optional bool java_generic_services = 17 [default = false];</code>
*/
protected $java_generic_services = null;
/**
* Generated from protobuf field <code>optional bool py_generic_services = 18 [default = false];</code>
*/
protected $py_generic_services = null;
/**
* Generated from protobuf field <code>optional bool php_generic_services = 42 [default = false];</code>
*/
protected $php_generic_services = null;
/**
* Is this file deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for everything in the file, or it will be completely ignored; in the very
* least, this is a formalization for deprecating files.
*
* Generated from protobuf field <code>optional bool deprecated = 23 [default = false];</code>
*/
protected $deprecated = null;
/**
* Enables the use of arenas for the proto messages in this file. This applies
* only to generated classes for C++.
*
* Generated from protobuf field <code>optional bool cc_enable_arenas = 31 [default = true];</code>
*/
protected $cc_enable_arenas = null;
/**
* Sets the objective c class prefix which is prepended to all objective c
* generated classes from this .proto. There is no default.
*
* Generated from protobuf field <code>optional string objc_class_prefix = 36;</code>
*/
protected $objc_class_prefix = null;
/**
* Namespace for generated classes; defaults to the package.
*
* Generated from protobuf field <code>optional string csharp_namespace = 37;</code>
*/
protected $csharp_namespace = null;
/**
* By default Swift generators will take the proto package and CamelCase it
* replacing '.' with underscore and use that to prefix the types/symbols
* defined. When this options is provided, they will use this value instead
* to prefix the types/symbols defined.
*
* Generated from protobuf field <code>optional string swift_prefix = 39;</code>
*/
protected $swift_prefix = null;
/**
* Sets the php class prefix which is prepended to all php generated classes
* from this .proto. Default is empty.
*
* Generated from protobuf field <code>optional string php_class_prefix = 40;</code>
*/
protected $php_class_prefix = null;
/**
* Use this option to change the namespace of php generated classes. Default
* is empty. When this option is empty, the package name will be used for
* determining the namespace.
*
* Generated from protobuf field <code>optional string php_namespace = 41;</code>
*/
protected $php_namespace = null;
/**
* Use this option to change the namespace of php generated metadata classes.
* Default is empty. When this option is empty, the proto file name will be
* used for determining the namespace.
*
* Generated from protobuf field <code>optional string php_metadata_namespace = 44;</code>
*/
protected $php_metadata_namespace = null;
/**
* Use this option to change the package of ruby generated classes. Default
* is empty. When this option is not set, the package name will be used for
* determining the ruby package.
*
* Generated from protobuf field <code>optional string ruby_package = 45;</code>
*/
protected $ruby_package = null;
/**
* The parser stores options it doesn't recognize here.
* See the documentation for the "Options" section above.
*
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
*/
private $uninterpreted_option;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $java_package
* Sets the Java package where classes generated from this .proto will be
* placed. By default, the proto package is used, but this is often
* inappropriate because proto packages do not normally start with backwards
* domain names.
* @type string $java_outer_classname
* Controls the name of the wrapper Java class generated for the .proto file.
* That class will always contain the .proto file's getDescriptor() method as
* well as any top-level extensions defined in the .proto file.
* If java_multiple_files is disabled, then all the other classes from the
* .proto file will be nested inside the single wrapper outer class.
* @type bool $java_multiple_files
* If enabled, then the Java code generator will generate a separate .java
* file for each top-level message, enum, and service defined in the .proto
* file. Thus, these types will *not* be nested inside the wrapper class
* named by java_outer_classname. However, the wrapper class will still be
* generated to contain the file's getDescriptor() method as well as any
* top-level extensions defined in the file.
* @type bool $java_generate_equals_and_hash
* This option does nothing.
* @type bool $java_string_check_utf8
* If set true, then the Java2 code generator will generate code that
* throws an exception whenever an attempt is made to assign a non-UTF-8
* byte sequence to a string field.
* Message reflection will do the same.
* However, an extension field still accepts non-UTF-8 byte sequences.
* This option has no effect on when used with the lite runtime.
* @type int $optimize_for
* @type string $go_package
* Sets the Go package where structs generated from this .proto will be
* placed. If omitted, the Go package will be derived from the following:
* - The basename of the package import path, if provided.
* - Otherwise, the package statement in the .proto file, if present.
* - Otherwise, the basename of the .proto file, without extension.
* @type bool $cc_generic_services
* Should generic services be generated in each language? "Generic" services
* are not specific to any particular RPC system. They are generated by the
* main code generators in each language (without additional plugins).
* Generic services were the only kind of service generation supported by
* early versions of google.protobuf.
* Generic services are now considered deprecated in favor of using plugins
* that generate code specific to your particular RPC system. Therefore,
* these default to false. Old code which depends on generic services should
* explicitly set them to true.
* @type bool $java_generic_services
* @type bool $py_generic_services
* @type bool $php_generic_services
* @type bool $deprecated
* Is this file deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for everything in the file, or it will be completely ignored; in the very
* least, this is a formalization for deprecating files.
* @type bool $cc_enable_arenas
* Enables the use of arenas for the proto messages in this file. This applies
* only to generated classes for C++.
* @type string $objc_class_prefix
* Sets the objective c class prefix which is prepended to all objective c
* generated classes from this .proto. There is no default.
* @type string $csharp_namespace
* Namespace for generated classes; defaults to the package.
* @type string $swift_prefix
* By default Swift generators will take the proto package and CamelCase it
* replacing '.' with underscore and use that to prefix the types/symbols
* defined. When this options is provided, they will use this value instead
* to prefix the types/symbols defined.
* @type string $php_class_prefix
* Sets the php class prefix which is prepended to all php generated classes
* from this .proto. Default is empty.
* @type string $php_namespace
* Use this option to change the namespace of php generated classes. Default
* is empty. When this option is empty, the package name will be used for
* determining the namespace.
* @type string $php_metadata_namespace
* Use this option to change the namespace of php generated metadata classes.
* Default is empty. When this option is empty, the proto file name will be
* used for determining the namespace.
* @type string $ruby_package
* Use this option to change the package of ruby generated classes. Default
* is empty. When this option is not set, the package name will be used for
* determining the ruby package.
* @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
* The parser stores options it doesn't recognize here.
* See the documentation for the "Options" section above.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
parent::__construct($data);
}
/**
* Sets the Java package where classes generated from this .proto will be
* placed. By default, the proto package is used, but this is often
* inappropriate because proto packages do not normally start with backwards
* domain names.
*
* Generated from protobuf field <code>optional string java_package = 1;</code>
* @return string
*/
public function getJavaPackage()
{
return isset($this->java_package) ? $this->java_package : '';
}
public function hasJavaPackage()
{
return isset($this->java_package);
}
public function clearJavaPackage()
{
unset($this->java_package);
}
/**
* Sets the Java package where classes generated from this .proto will be
* placed. By default, the proto package is used, but this is often
* inappropriate because proto packages do not normally start with backwards
* domain names.
*
* Generated from protobuf field <code>optional string java_package = 1;</code>
* @param string $var
* @return $this
*/
public function setJavaPackage($var)
{
GPBUtil::checkString($var, True);
$this->java_package = $var;
return $this;
}
/**
* Controls the name of the wrapper Java class generated for the .proto file.
* That class will always contain the .proto file's getDescriptor() method as
* well as any top-level extensions defined in the .proto file.
* If java_multiple_files is disabled, then all the other classes from the
* .proto file will be nested inside the single wrapper outer class.
*
* Generated from protobuf field <code>optional string java_outer_classname = 8;</code>
* @return string
*/
public function getJavaOuterClassname()
{
return isset($this->java_outer_classname) ? $this->java_outer_classname : '';
}
public function hasJavaOuterClassname()
{
return isset($this->java_outer_classname);
}
public function clearJavaOuterClassname()
{
unset($this->java_outer_classname);
}
/**
* Controls the name of the wrapper Java class generated for the .proto file.
* That class will always contain the .proto file's getDescriptor() method as
* well as any top-level extensions defined in the .proto file.
* If java_multiple_files is disabled, then all the other classes from the
* .proto file will be nested inside the single wrapper outer class.
*
* Generated from protobuf field <code>optional string java_outer_classname = 8;</code>
* @param string $var
* @return $this
*/
public function setJavaOuterClassname($var)
{
GPBUtil::checkString($var, True);
$this->java_outer_classname = $var;
return $this;
}
/**
* If enabled, then the Java code generator will generate a separate .java
* file for each top-level message, enum, and service defined in the .proto
* file. Thus, these types will *not* be nested inside the wrapper class
* named by java_outer_classname. However, the wrapper class will still be
* generated to contain the file's getDescriptor() method as well as any
* top-level extensions defined in the file.
*
* Generated from protobuf field <code>optional bool java_multiple_files = 10 [default = false];</code>
* @return bool
*/
public function getJavaMultipleFiles()
{
return isset($this->java_multiple_files) ? $this->java_multiple_files : false;
}
public function hasJavaMultipleFiles()
{
return isset($this->java_multiple_files);
}
public function clearJavaMultipleFiles()
{
unset($this->java_multiple_files);
}
/**
* If enabled, then the Java code generator will generate a separate .java
* file for each top-level message, enum, and service defined in the .proto
* file. Thus, these types will *not* be nested inside the wrapper class
* named by java_outer_classname. However, the wrapper class will still be
* generated to contain the file's getDescriptor() method as well as any
* top-level extensions defined in the file.
*
* Generated from protobuf field <code>optional bool java_multiple_files = 10 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setJavaMultipleFiles($var)
{
GPBUtil::checkBool($var);
$this->java_multiple_files = $var;
return $this;
}
/**
* This option does nothing.
*
* Generated from protobuf field <code>optional bool java_generate_equals_and_hash = 20 [deprecated = true];</code>
* @return bool
* @deprecated
*/
public function getJavaGenerateEqualsAndHash()
{
@trigger_error('java_generate_equals_and_hash is deprecated.', E_USER_DEPRECATED);
return isset($this->java_generate_equals_and_hash) ? $this->java_generate_equals_and_hash : false;
}
public function hasJavaGenerateEqualsAndHash()
{
@trigger_error('java_generate_equals_and_hash is deprecated.', E_USER_DEPRECATED);
return isset($this->java_generate_equals_and_hash);
}
public function clearJavaGenerateEqualsAndHash()
{
@trigger_error('java_generate_equals_and_hash is deprecated.', E_USER_DEPRECATED);
unset($this->java_generate_equals_and_hash);
}
/**
* This option does nothing.
*
* Generated from protobuf field <code>optional bool java_generate_equals_and_hash = 20 [deprecated = true];</code>
* @param bool $var
* @return $this
* @deprecated
*/
public function setJavaGenerateEqualsAndHash($var)
{
@trigger_error('java_generate_equals_and_hash is deprecated.', E_USER_DEPRECATED);
GPBUtil::checkBool($var);
$this->java_generate_equals_and_hash = $var;
return $this;
}
/**
* If set true, then the Java2 code generator will generate code that
* throws an exception whenever an attempt is made to assign a non-UTF-8
* byte sequence to a string field.
* Message reflection will do the same.
* However, an extension field still accepts non-UTF-8 byte sequences.
* This option has no effect on when used with the lite runtime.
*
* Generated from protobuf field <code>optional bool java_string_check_utf8 = 27 [default = false];</code>
* @return bool
*/
public function getJavaStringCheckUtf8()
{
return isset($this->java_string_check_utf8) ? $this->java_string_check_utf8 : false;
}
public function hasJavaStringCheckUtf8()
{
return isset($this->java_string_check_utf8);
}
public function clearJavaStringCheckUtf8()
{
unset($this->java_string_check_utf8);
}
/**
* If set true, then the Java2 code generator will generate code that
* throws an exception whenever an attempt is made to assign a non-UTF-8
* byte sequence to a string field.
* Message reflection will do the same.
* However, an extension field still accepts non-UTF-8 byte sequences.
* This option has no effect on when used with the lite runtime.
*
* Generated from protobuf field <code>optional bool java_string_check_utf8 = 27 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setJavaStringCheckUtf8($var)
{
GPBUtil::checkBool($var);
$this->java_string_check_utf8 = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];</code>
* @return int
*/
public function getOptimizeFor()
{
return isset($this->optimize_for) ? $this->optimize_for : 0;
}
public function hasOptimizeFor()
{
return isset($this->optimize_for);
}
public function clearOptimizeFor()
{
unset($this->optimize_for);
}
/**
* Generated from protobuf field <code>optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];</code>
* @param int $var
* @return $this
*/
public function setOptimizeFor($var)
{
GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FileOptions\OptimizeMode::class);
$this->optimize_for = $var;
return $this;
}
/**
* Sets the Go package where structs generated from this .proto will be
* placed. If omitted, the Go package will be derived from the following:
* - The basename of the package import path, if provided.
* - Otherwise, the package statement in the .proto file, if present.
* - Otherwise, the basename of the .proto file, without extension.
*
* Generated from protobuf field <code>optional string go_package = 11;</code>
* @return string
*/
public function getGoPackage()
{
return isset($this->go_package) ? $this->go_package : '';
}
public function hasGoPackage()
{
return isset($this->go_package);
}
public function clearGoPackage()
{
unset($this->go_package);
}
/**
* Sets the Go package where structs generated from this .proto will be
* placed. If omitted, the Go package will be derived from the following:
* - The basename of the package import path, if provided.
* - Otherwise, the package statement in the .proto file, if present.
* - Otherwise, the basename of the .proto file, without extension.
*
* Generated from protobuf field <code>optional string go_package = 11;</code>
* @param string $var
* @return $this
*/
public function setGoPackage($var)
{
GPBUtil::checkString($var, True);
$this->go_package = $var;
return $this;
}
/**
* Should generic services be generated in each language? "Generic" services
* are not specific to any particular RPC system. They are generated by the
* main code generators in each language (without additional plugins).
* Generic services were the only kind of service generation supported by
* early versions of google.protobuf.
* Generic services are now considered deprecated in favor of using plugins
* that generate code specific to your particular RPC system. Therefore,
* these default to false. Old code which depends on generic services should
* explicitly set them to true.
*
* Generated from protobuf field <code>optional bool cc_generic_services = 16 [default = false];</code>
* @return bool
*/
public function getCcGenericServices()
{
return isset($this->cc_generic_services) ? $this->cc_generic_services : false;
}
public function hasCcGenericServices()
{
return isset($this->cc_generic_services);
}
public function clearCcGenericServices()
{
unset($this->cc_generic_services);
}
/**
* Should generic services be generated in each language? "Generic" services
* are not specific to any particular RPC system. They are generated by the
* main code generators in each language (without additional plugins).
* Generic services were the only kind of service generation supported by
* early versions of google.protobuf.
* Generic services are now considered deprecated in favor of using plugins
* that generate code specific to your particular RPC system. Therefore,
* these default to false. Old code which depends on generic services should
* explicitly set them to true.
*
* Generated from protobuf field <code>optional bool cc_generic_services = 16 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setCcGenericServices($var)
{
GPBUtil::checkBool($var);
$this->cc_generic_services = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional bool java_generic_services = 17 [default = false];</code>
* @return bool
*/
public function getJavaGenericServices()
{
return isset($this->java_generic_services) ? $this->java_generic_services : false;
}
public function hasJavaGenericServices()
{
return isset($this->java_generic_services);
}
public function clearJavaGenericServices()
{
unset($this->java_generic_services);
}
/**
* Generated from protobuf field <code>optional bool java_generic_services = 17 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setJavaGenericServices($var)
{
GPBUtil::checkBool($var);
$this->java_generic_services = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional bool py_generic_services = 18 [default = false];</code>
* @return bool
*/
public function getPyGenericServices()
{
return isset($this->py_generic_services) ? $this->py_generic_services : false;
}
public function hasPyGenericServices()
{
return isset($this->py_generic_services);
}
public function clearPyGenericServices()
{
unset($this->py_generic_services);
}
/**
* Generated from protobuf field <code>optional bool py_generic_services = 18 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setPyGenericServices($var)
{
GPBUtil::checkBool($var);
$this->py_generic_services = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional bool php_generic_services = 42 [default = false];</code>
* @return bool
*/
public function getPhpGenericServices()
{
return isset($this->php_generic_services) ? $this->php_generic_services : false;
}
public function hasPhpGenericServices()
{
return isset($this->php_generic_services);
}
public function clearPhpGenericServices()
{
unset($this->php_generic_services);
}
/**
* Generated from protobuf field <code>optional bool php_generic_services = 42 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setPhpGenericServices($var)
{
GPBUtil::checkBool($var);
$this->php_generic_services = $var;
return $this;
}
/**
* Is this file deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for everything in the file, or it will be completely ignored; in the very
* least, this is a formalization for deprecating files.
*
* Generated from protobuf field <code>optional bool deprecated = 23 [default = false];</code>
* @return bool
*/
public function getDeprecated()
{
return isset($this->deprecated) ? $this->deprecated : false;
}
public function hasDeprecated()
{
return isset($this->deprecated);
}
public function clearDeprecated()
{
unset($this->deprecated);
}
/**
* Is this file deprecated?
* Depending on the target platform, this can emit Deprecated annotations
* for everything in the file, or it will be completely ignored; in the very
* least, this is a formalization for deprecating files.
*
* Generated from protobuf field <code>optional bool deprecated = 23 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setDeprecated($var)
{
GPBUtil::checkBool($var);
$this->deprecated = $var;
return $this;
}
/**
* Enables the use of arenas for the proto messages in this file. This applies
* only to generated classes for C++.
*
* Generated from protobuf field <code>optional bool cc_enable_arenas = 31 [default = true];</code>
* @return bool
*/
public function getCcEnableArenas()
{
return isset($this->cc_enable_arenas) ? $this->cc_enable_arenas : false;
}
public function hasCcEnableArenas()
{
return isset($this->cc_enable_arenas);
}
public function clearCcEnableArenas()
{
unset($this->cc_enable_arenas);
}
/**
* Enables the use of arenas for the proto messages in this file. This applies
* only to generated classes for C++.
*
* Generated from protobuf field <code>optional bool cc_enable_arenas = 31 [default = true];</code>
* @param bool $var
* @return $this
*/
public function setCcEnableArenas($var)
{
GPBUtil::checkBool($var);
$this->cc_enable_arenas = $var;
return $this;
}
/**
* Sets the objective c class prefix which is prepended to all objective c
* generated classes from this .proto. There is no default.
*
* Generated from protobuf field <code>optional string objc_class_prefix = 36;</code>
* @return string
*/
public function getObjcClassPrefix()
{
return isset($this->objc_class_prefix) ? $this->objc_class_prefix : '';
}
public function hasObjcClassPrefix()
{
return isset($this->objc_class_prefix);
}
public function clearObjcClassPrefix()
{
unset($this->objc_class_prefix);
}
/**
* Sets the objective c class prefix which is prepended to all objective c
* generated classes from this .proto. There is no default.
*
* Generated from protobuf field <code>optional string objc_class_prefix = 36;</code>
* @param string $var
* @return $this
*/
public function setObjcClassPrefix($var)
{
GPBUtil::checkString($var, True);
$this->objc_class_prefix = $var;
return $this;
}
/**
* Namespace for generated classes; defaults to the package.
*
* Generated from protobuf field <code>optional string csharp_namespace = 37;</code>
* @return string
*/
public function getCsharpNamespace()
{
return isset($this->csharp_namespace) ? $this->csharp_namespace : '';
}
public function hasCsharpNamespace()
{
return isset($this->csharp_namespace);
}
public function clearCsharpNamespace()
{
unset($this->csharp_namespace);
}
/**
* Namespace for generated classes; defaults to the package.
*
* Generated from protobuf field <code>optional string csharp_namespace = 37;</code>
* @param string $var
* @return $this
*/
public function setCsharpNamespace($var)
{
GPBUtil::checkString($var, True);
$this->csharp_namespace = $var;
return $this;
}
/**
* By default Swift generators will take the proto package and CamelCase it
* replacing '.' with underscore and use that to prefix the types/symbols
* defined. When this options is provided, they will use this value instead
* to prefix the types/symbols defined.
*
* Generated from protobuf field <code>optional string swift_prefix = 39;</code>
* @return string
*/
public function getSwiftPrefix()
{
return isset($this->swift_prefix) ? $this->swift_prefix : '';
}
public function hasSwiftPrefix()
{
return isset($this->swift_prefix);
}
public function clearSwiftPrefix()
{
unset($this->swift_prefix);
}
/**
* By default Swift generators will take the proto package and CamelCase it
* replacing '.' with underscore and use that to prefix the types/symbols
* defined. When this options is provided, they will use this value instead
* to prefix the types/symbols defined.
*
* Generated from protobuf field <code>optional string swift_prefix = 39;</code>
* @param string $var
* @return $this
*/
public function setSwiftPrefix($var)
{
GPBUtil::checkString($var, True);
$this->swift_prefix = $var;
return $this;
}
/**
* Sets the php class prefix which is prepended to all php generated classes
* from this .proto. Default is empty.
*
* Generated from protobuf field <code>optional string php_class_prefix = 40;</code>
* @return string
*/
public function getPhpClassPrefix()
{
return isset($this->php_class_prefix) ? $this->php_class_prefix : '';
}
public function hasPhpClassPrefix()
{
return isset($this->php_class_prefix);
}
public function clearPhpClassPrefix()
{
unset($this->php_class_prefix);
}
/**
* Sets the php class prefix which is prepended to all php generated classes
* from this .proto. Default is empty.
*
* Generated from protobuf field <code>optional string php_class_prefix = 40;</code>
* @param string $var
* @return $this
*/
public function setPhpClassPrefix($var)
{
GPBUtil::checkString($var, True);
$this->php_class_prefix = $var;
return $this;
}
/**
* Use this option to change the namespace of php generated classes. Default
* is empty. When this option is empty, the package name will be used for
* determining the namespace.
*
* Generated from protobuf field <code>optional string php_namespace = 41;</code>
* @return string
*/
public function getPhpNamespace()
{
return isset($this->php_namespace) ? $this->php_namespace : '';
}
public function hasPhpNamespace()
{
return isset($this->php_namespace);
}
public function clearPhpNamespace()
{
unset($this->php_namespace);
}
/**
* Use this option to change the namespace of php generated classes. Default
* is empty. When this option is empty, the package name will be used for
* determining the namespace.
*
* Generated from protobuf field <code>optional string php_namespace = 41;</code>
* @param string $var
* @return $this
*/
public function setPhpNamespace($var)
{
GPBUtil::checkString($var, True);
$this->php_namespace = $var;
return $this;
}
/**
* Use this option to change the namespace of php generated metadata classes.
* Default is empty. When this option is empty, the proto file name will be
* used for determining the namespace.
*
* Generated from protobuf field <code>optional string php_metadata_namespace = 44;</code>
* @return string
*/
public function getPhpMetadataNamespace()
{
return isset($this->php_metadata_namespace) ? $this->php_metadata_namespace : '';
}
public function hasPhpMetadataNamespace()
{
return isset($this->php_metadata_namespace);
}
public function clearPhpMetadataNamespace()
{
unset($this->php_metadata_namespace);
}
/**
* Use this option to change the namespace of php generated metadata classes.
* Default is empty. When this option is empty, the proto file name will be
* used for determining the namespace.
*
* Generated from protobuf field <code>optional string php_metadata_namespace = 44;</code>
* @param string $var
* @return $this
*/
public function setPhpMetadataNamespace($var)
{
GPBUtil::checkString($var, True);
$this->php_metadata_namespace = $var;
return $this;
}
/**
* Use this option to change the package of ruby generated classes. Default
* is empty. When this option is not set, the package name will be used for
* determining the ruby package.
*
* Generated from protobuf field <code>optional string ruby_package = 45;</code>
* @return string
*/
public function getRubyPackage()
{
return isset($this->ruby_package) ? $this->ruby_package : '';
}
public function hasRubyPackage()
{
return isset($this->ruby_package);
}
public function clearRubyPackage()
{
unset($this->ruby_package);
}
/**
* Use this option to change the package of ruby generated classes. Default
* is empty. When this option is not set, the package name will be used for
* determining the ruby package.
*
* Generated from protobuf field <code>optional string ruby_package = 45;</code>
* @param string $var
* @return $this
*/
public function setRubyPackage($var)
{
GPBUtil::checkString($var, True);
$this->ruby_package = $var;
return $this;
}
/**
* The parser stores options it doesn't recognize here.
* See the documentation for the "Options" section above.
*
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getUninterpretedOption()
{
return $this->uninterpreted_option;
}
/**
* The parser stores options it doesn't recognize here.
* See the documentation for the "Options" section above.
*
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
$this->uninterpreted_option = $arr;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
namespace Google\Protobuf\Internal;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>google.protobuf.ExtensionRangeOptions</code>
*/
class ExtensionRangeOptions extends \Google\Protobuf\Internal\Message
{
/**
* The parser stores options it doesn't recognize here. See above.
*
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
*/
private $uninterpreted_option;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $uninterpreted_option
* The parser stores options it doesn't recognize here. See above.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
parent::__construct($data);
}
/**
* The parser stores options it doesn't recognize here. See above.
*
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getUninterpretedOption()
{
return $this->uninterpreted_option;
}
/**
* The parser stores options it doesn't recognize here. See above.
*
* Generated from protobuf field <code>repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;</code>
* @param array<\Google\Protobuf\Internal\UninterpretedOption>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUninterpretedOption($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\UninterpretedOption::class);
$this->uninterpreted_option = $arr;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
namespace Google\Protobuf\Internal;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Describes a method of a service.
*
* Generated from protobuf message <code>google.protobuf.MethodDescriptorProto</code>
*/
class MethodDescriptorProto extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field <code>optional string name = 1;</code>
*/
protected $name = null;
/**
* Input and output type names. These are resolved in the same way as
* FieldDescriptorProto.type_name, but must refer to a message type.
*
* Generated from protobuf field <code>optional string input_type = 2;</code>
*/
protected $input_type = null;
/**
* Generated from protobuf field <code>optional string output_type = 3;</code>
*/
protected $output_type = null;
/**
* Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
*/
protected $options = null;
/**
* Identifies if client streams multiple client messages
*
* Generated from protobuf field <code>optional bool client_streaming = 5 [default = false];</code>
*/
protected $client_streaming = null;
/**
* Identifies if server streams multiple server messages
*
* Generated from protobuf field <code>optional bool server_streaming = 6 [default = false];</code>
*/
protected $server_streaming = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* @type string $input_type
* Input and output type names. These are resolved in the same way as
* FieldDescriptorProto.type_name, but must refer to a message type.
* @type string $output_type
* @type \Google\Protobuf\Internal\MethodOptions $options
* @type bool $client_streaming
* Identifies if client streams multiple client messages
* @type bool $server_streaming
* Identifies if server streams multiple server messages
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field <code>optional string name = 1;</code>
* @return string
*/
public function getName()
{
return isset($this->name) ? $this->name : '';
}
public function hasName()
{
return isset($this->name);
}
public function clearName()
{
unset($this->name);
}
/**
* Generated from protobuf field <code>optional string name = 1;</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Input and output type names. These are resolved in the same way as
* FieldDescriptorProto.type_name, but must refer to a message type.
*
* Generated from protobuf field <code>optional string input_type = 2;</code>
* @return string
*/
public function getInputType()
{
return isset($this->input_type) ? $this->input_type : '';
}
public function hasInputType()
{
return isset($this->input_type);
}
public function clearInputType()
{
unset($this->input_type);
}
/**
* Input and output type names. These are resolved in the same way as
* FieldDescriptorProto.type_name, but must refer to a message type.
*
* Generated from protobuf field <code>optional string input_type = 2;</code>
* @param string $var
* @return $this
*/
public function setInputType($var)
{
GPBUtil::checkString($var, True);
$this->input_type = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional string output_type = 3;</code>
* @return string
*/
public function getOutputType()
{
return isset($this->output_type) ? $this->output_type : '';
}
public function hasOutputType()
{
return isset($this->output_type);
}
public function clearOutputType()
{
unset($this->output_type);
}
/**
* Generated from protobuf field <code>optional string output_type = 3;</code>
* @param string $var
* @return $this
*/
public function setOutputType($var)
{
GPBUtil::checkString($var, True);
$this->output_type = $var;
return $this;
}
/**
* Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
* @return \Google\Protobuf\Internal\MethodOptions|null
*/
public function getOptions()
{
return $this->options;
}
public function hasOptions()
{
return isset($this->options);
}
public function clearOptions()
{
unset($this->options);
}
/**
* Generated from protobuf field <code>optional .google.protobuf.MethodOptions options = 4;</code>
* @param \Google\Protobuf\Internal\MethodOptions $var
* @return $this
*/
public function setOptions($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MethodOptions::class);
$this->options = $var;
return $this;
}
/**
* Identifies if client streams multiple client messages
*
* Generated from protobuf field <code>optional bool client_streaming = 5 [default = false];</code>
* @return bool
*/
public function getClientStreaming()
{
return isset($this->client_streaming) ? $this->client_streaming : false;
}
public function hasClientStreaming()
{
return isset($this->client_streaming);
}
public function clearClientStreaming()
{
unset($this->client_streaming);
}
/**
* Identifies if client streams multiple client messages
*
* Generated from protobuf field <code>optional bool client_streaming = 5 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setClientStreaming($var)
{
GPBUtil::checkBool($var);
$this->client_streaming = $var;
return $this;
}
/**
* Identifies if server streams multiple server messages
*
* Generated from protobuf field <code>optional bool server_streaming = 6 [default = false];</code>
* @return bool
*/
public function getServerStreaming()
{
return isset($this->server_streaming) ? $this->server_streaming : false;
}
public function hasServerStreaming()
{
return isset($this->server_streaming);
}
public function clearServerStreaming()
{
unset($this->server_streaming);
}
/**
* Identifies if server streams multiple server messages
*
* Generated from protobuf field <code>optional bool server_streaming = 6 [default = false];</code>
* @param bool $var
* @return $this
*/
public function setServerStreaming($var)
{
GPBUtil::checkBool($var);
$this->server_streaming = $var;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Google\Protobuf\Internal;
class RawInputStream
{
private $buffer;
public function __construct($buffer)
{
$this->buffer = $buffer;
}
public function getData()
{
return $this->buffer;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/descriptor.proto
namespace Google\Protobuf\Internal;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBWire;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\InputStream;
use Google\Protobuf\Internal\GPBUtil;
/**
* Encapsulates information about the original source file from which a
* FileDescriptorProto was generated.
*
* Generated from protobuf message <code>google.protobuf.SourceCodeInfo</code>
*/
class SourceCodeInfo extends \Google\Protobuf\Internal\Message
{
/**
* A Location identifies a piece of source code in a .proto file which
* corresponds to a particular definition. This information is intended
* to be useful to IDEs, code indexers, documentation generators, and similar
* tools.
* For example, say we have a file like:
* message Foo {
* optional string foo = 1;
* }
* Let's look at just the field definition:
* optional string foo = 1;
* ^ ^^ ^^ ^ ^^^
* a bc de f ghi
* We have the following locations:
* span path represents
* [a,i) [ 4, 0, 2, 0 ] The whole field definition.
* [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
* [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
* [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
* [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
* Notes:
* - A location may refer to a repeated field itself (i.e. not to any
* particular index within it). This is used whenever a set of elements are
* logically enclosed in a single code segment. For example, an entire
* extend block (possibly containing multiple extension definitions) will
* have an outer location whose path refers to the "extensions" repeated
* field without an index.
* - Multiple locations may have the same path. This happens when a single
* logical declaration is spread out across multiple places. The most
* obvious example is the "extend" block again -- there may be multiple
* extend blocks in the same scope, each of which will have the same path.
* - A location's span is not always a subset of its parent's span. For
* example, the "extendee" of an extension declaration appears at the
* beginning of the "extend" block and is shared by all extensions within
* the block.
* - Just because a location's span is a subset of some other location's span
* does not mean that it is a descendant. For example, a "group" defines
* both a type and a field in a single declaration. Thus, the locations
* corresponding to the type and field and their components will overlap.
* - Code which tries to interpret locations should probably be designed to
* ignore those that it doesn't understand, as more types of locations could
* be recorded in the future.
*
* Generated from protobuf field <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
*/
private $location;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type array<\Google\Protobuf\Internal\SourceCodeInfo\Location>|\Google\Protobuf\Internal\RepeatedField $location
* A Location identifies a piece of source code in a .proto file which
* corresponds to a particular definition. This information is intended
* to be useful to IDEs, code indexers, documentation generators, and similar
* tools.
* For example, say we have a file like:
* message Foo {
* optional string foo = 1;
* }
* Let's look at just the field definition:
* optional string foo = 1;
* ^ ^^ ^^ ^ ^^^
* a bc de f ghi
* We have the following locations:
* span path represents
* [a,i) [ 4, 0, 2, 0 ] The whole field definition.
* [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
* [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
* [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
* [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
* Notes:
* - A location may refer to a repeated field itself (i.e. not to any
* particular index within it). This is used whenever a set of elements are
* logically enclosed in a single code segment. For example, an entire
* extend block (possibly containing multiple extension definitions) will
* have an outer location whose path refers to the "extensions" repeated
* field without an index.
* - Multiple locations may have the same path. This happens when a single
* logical declaration is spread out across multiple places. The most
* obvious example is the "extend" block again -- there may be multiple
* extend blocks in the same scope, each of which will have the same path.
* - A location's span is not always a subset of its parent's span. For
* example, the "extendee" of an extension declaration appears at the
* beginning of the "extend" block and is shared by all extensions within
* the block.
* - Just because a location's span is a subset of some other location's span
* does not mean that it is a descendant. For example, a "group" defines
* both a type and a field in a single declaration. Thus, the locations
* corresponding to the type and field and their components will overlap.
* - Code which tries to interpret locations should probably be designed to
* ignore those that it doesn't understand, as more types of locations could
* be recorded in the future.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Protobuf\Internal\Descriptor::initOnce();
parent::__construct($data);
}
/**
* A Location identifies a piece of source code in a .proto file which
* corresponds to a particular definition. This information is intended
* to be useful to IDEs, code indexers, documentation generators, and similar
* tools.
* For example, say we have a file like:
* message Foo {
* optional string foo = 1;
* }
* Let's look at just the field definition:
* optional string foo = 1;
* ^ ^^ ^^ ^ ^^^
* a bc de f ghi
* We have the following locations:
* span path represents
* [a,i) [ 4, 0, 2, 0 ] The whole field definition.
* [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
* [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
* [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
* [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
* Notes:
* - A location may refer to a repeated field itself (i.e. not to any
* particular index within it). This is used whenever a set of elements are
* logically enclosed in a single code segment. For example, an entire
* extend block (possibly containing multiple extension definitions) will
* have an outer location whose path refers to the "extensions" repeated
* field without an index.
* - Multiple locations may have the same path. This happens when a single
* logical declaration is spread out across multiple places. The most
* obvious example is the "extend" block again -- there may be multiple
* extend blocks in the same scope, each of which will have the same path.
* - A location's span is not always a subset of its parent's span. For
* example, the "extendee" of an extension declaration appears at the
* beginning of the "extend" block and is shared by all extensions within
* the block.
* - Just because a location's span is a subset of some other location's span
* does not mean that it is a descendant. For example, a "group" defines
* both a type and a field in a single declaration. Thus, the locations
* corresponding to the type and field and their components will overlap.
* - Code which tries to interpret locations should probably be designed to
* ignore those that it doesn't understand, as more types of locations could
* be recorded in the future.
*
* Generated from protobuf field <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getLocation()
{
return $this->location;
}
/**
* A Location identifies a piece of source code in a .proto file which
* corresponds to a particular definition. This information is intended
* to be useful to IDEs, code indexers, documentation generators, and similar
* tools.
* For example, say we have a file like:
* message Foo {
* optional string foo = 1;
* }
* Let's look at just the field definition:
* optional string foo = 1;
* ^ ^^ ^^ ^ ^^^
* a bc de f ghi
* We have the following locations:
* span path represents
* [a,i) [ 4, 0, 2, 0 ] The whole field definition.
* [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
* [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
* [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
* [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
* Notes:
* - A location may refer to a repeated field itself (i.e. not to any
* particular index within it). This is used whenever a set of elements are
* logically enclosed in a single code segment. For example, an entire
* extend block (possibly containing multiple extension definitions) will
* have an outer location whose path refers to the "extensions" repeated
* field without an index.
* - Multiple locations may have the same path. This happens when a single
* logical declaration is spread out across multiple places. The most
* obvious example is the "extend" block again -- there may be multiple
* extend blocks in the same scope, each of which will have the same path.
* - A location's span is not always a subset of its parent's span. For
* example, the "extendee" of an extension declaration appears at the
* beginning of the "extend" block and is shared by all extensions within
* the block.
* - Just because a location's span is a subset of some other location's span
* does not mean that it is a descendant. For example, a "group" defines
* both a type and a field in a single declaration. Thus, the locations
* corresponding to the type and field and their components will overlap.
* - Code which tries to interpret locations should probably be designed to
* ignore those that it doesn't understand, as more types of locations could
* be recorded in the future.
*
* Generated from protobuf field <code>repeated .google.protobuf.SourceCodeInfo.Location location = 1;</code>
* @param array<\Google\Protobuf\Internal\SourceCodeInfo\Location>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setLocation($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\SourceCodeInfo\Location::class);
$this->location = $arr;
return $this;
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
<?php
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/**
* RepeatedField and RepeatedFieldIter are used by generated protocol message
* classes to manipulate repeated fields.
*/
namespace Google\Protobuf\Internal;
/**
* RepeatedFieldIter is used to iterate RepeatedField. It is also need for the
* foreach syntax.
*/
class RepeatedFieldIter implements \Iterator
{
/**
* @ignore
*/
private $position;
/**
* @ignore
*/
private $container;
/**
* Create iterator instance for RepeatedField.
*
* @param RepeatedField The RepeatedField instance for which this iterator
* is created.
* @ignore
*/
public function __construct($container)
{
$this->position = 0;
$this->container = $container;
}
/**
* Reset the status of the iterator
*
* @return void
* @todo need to add return type void (require update php version to 7.1)
*/
#[\ReturnTypeWillChange]
public function rewind()
{
$this->position = 0;
}
/**
* Return the element at the current position.
*
* @return object The element at the current position.
* @todo need to add return type mixed (require update php version to 8.0)
*/
#[\ReturnTypeWillChange]
public function current()
{
return $this->container[$this->position];
}
/**
* Return the current position.
*
* @return integer The current position.
* @todo need to add return type mixed (require update php version to 8.0)
*/
#[\ReturnTypeWillChange]
public function key()
{
return $this->position;
}
/**
* Move to the next position.
*
* @return void
* @todo need to add return type void (require update php version to 7.1)
*/
#[\ReturnTypeWillChange]
public function next()
{
++$this->position;
}
/**
* Check whether there are more elements to iterate.
*
* @return bool True if there are more elements to iterate.
*/
public function valid(): bool
{
return isset($this->container[$this->position]);
}
}
| {
"repo_name": "Rehike/Rehike",
"stars": "81",
"repo_language": "PHP",
"file_name": "config.php",
"mime_type": "text/x-php"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.