.gitignore000064400000000232151742741340006541 0ustar00.DS_Store phpunit.xml composer.phar composer.lock composer-test.lock vendor/ build/artifacts/ artifacts/ .idea .metadata coverage.xml src/Jison/Parser.js .travis.yml000064400000000443151742741340006666 0ustar00language: php php: - '5.5.38' - '5.6.25' sudo: required dist: trusty install: - pecl install grpc - composer install script: - vendor/bin/phpunit --coverage-clover=coverage.xml - vendor/bin/phpcs -l --standard=PSR2 src/ after_success: - bash <(curl -s https://codecov.io/bash) CONTRIBUTING.md000064400000002654151742741340007014 0ustar00Want to contribute? Great! First, read this page (including the small print at the end). ### Before you contribute Before we can use your code, you must sign the [Google Individual Contributor License Agreement] (https://cla.developers.google.com/about/google-individual) (CLA), which you can do online. The CLA is necessary mainly because you own the copyright to your changes, even after your contribution becomes part of our codebase, so we need your permission to use and distribute your code. We also need to be sure of various other things—for instance that you'll tell us if you know that your code infringes on other people's patents. You don't have to sign the CLA until after you've submitted your code for review and a member has approved it, but you must do it before we can put your code into our codebase. Before you start working on a larger contribution, you should get in touch with us first through the issue tracker with your idea so that we can help out and possibly guide you. Coordinating up front makes it much easier to avoid frustration later on. ### Code reviews All submissions, including submissions by project members, require review. We use Github pull requests for this purpose. ### The small print Contributions made by corporations are covered by a different agreement than the one above, the [Software Grant and Corporate Contributor License Agreement] (https://cla.developers.google.com/about/google-corporate). LICENSE000064400000002700151742741340005560 0ustar00Copyright 2016, Google Inc. All rights reserved. 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. README.md000064400000003332151742741340006034 0ustar00Google API Extensions for PHP ================================= [![Build Status](https://img.shields.io/travis/googleapis/gax-php.svg)] (https://travis-ci.org/googleapis/gax-php) [![Code Coverage](https://img.shields.io/codecov/c/github/googleapis/gax-php.svg)] (https://codecov.io/github/googleapis/gax-php) - [Documentation] (http://googleapis.github.io/gax-php/phpdoc) Google API Extensions for PHP (gax-php) is a set of modules which aids the development of APIs for clients based on [gRPC][] and Google API conventions. Application code will rarely need to use most of the classes within this library directly, but code generated automatically from the API definition files in [Google APIs][] can use services such as page streaming and retry to provide a more convenient and idiomatic API surface to callers. [gRPC]: http://grpc.io [Google APIs]: https://github.com/googleapis/googleapis/ PHP Versions ---------------- gax-php currently requires PHP 5.5 or higher. Contributing ------------ Contributions to this library are always welcome and highly encouraged. See the [CONTRIBUTING][] documentation for more information on how to get started. [CONTRIBUTING]: https://github.com/googleapis/gax-php/blob/master/CONTRIBUTING.md Versioning ---------- This library follows [Semantic Versioning][]. It is currently in major version zero (``0.y.z``), which means that anything may change at any time and the public API should not be considered stable. [Semantic Versioning]: http://semver.org/ Repository Structure ------- All code lives under src/ and is contained in the `Google\GAX` namespace. License ------- BSD - See [LICENSE][] for more information. [LICENSE]: https://github.com/googleapis/gax-php/blob/master/LICENSE composer.json000064400000001201151742741340007270 0ustar00{ "name": "google/gax", "type": "library", "description": "Google API Extensions for PHP", "keywords": ["google"], "homepage": "https://github.com/googleapis/gax-php", "license": "BSD-3-Clause", "require": { "php": ">=5.5", "google/auth": "v0.11", "grpc/grpc": "v1.0.0" }, "require-dev": { "phpunit/phpunit": "4.8.*", "squizlabs/php_codesniffer": "2.*", "phpdocumentor/phpdocumentor": "*" }, "autoload": { "psr-4": { "Google\\GAX\\":"src/" }, "classmap": ["src/generated", "src/generated/well-known-types"] } } phpunit.xml.dist000064400000000633151742741340007731 0ustar00 tests src src/generated src/AgentHeaderDescriptor.php000064400000007062151742741340012267 0ustar00clientName = $headerInfo['clientName']; $this->clientVersion = $headerInfo['clientVersion']; $this->codeGenName = $headerInfo['codeGenName']; $this->codeGenVersion = $headerInfo['codeGenVersion']; $this->gaxVersion = $headerInfo['gaxVersion']; $this->phpVersion = $headerInfo['phpVersion']; } /** * Returns an associative array that contains GAPIC header metadata. */ public function getHeader() { return [self::AGENT_HEADER_KEY => ["$this->clientName/$this->clientVersion;". "$this->codeGenName/$this->codeGenVersion;gax/$this->gaxVersion;". "php/$this->phpVersion"]]; } private static function validate($descriptor) { $requiredFields = ['clientName', 'clientVersion', 'codeGenName', 'codeGenVersion', 'gaxVersion', 'phpVersion']; foreach ($requiredFields as $field) { if (empty($descriptor[$field])) { throw new InvalidArgumentException( "$field is required for AgentHeaderDescriptor" ); } } } } src/ApiCallable.php000064400000017504151742741340010214 0ustar00getBackoffSettings(); // Initialize retry parameters $delayMult = $backoffSettings->getRetryDelayMultiplier(); $maxDelayMillis = $backoffSettings->getMaxRetryDelayMillis(); $timeoutMult = $backoffSettings->getRpcTimeoutMultiplier(); $maxTimeoutMillis = $backoffSettings->getMaxRpcTimeoutMillis(); $totalTimeoutMillis = $backoffSettings->getTotalTimeoutMillis(); $delayMillis = $backoffSettings->getInitialRetryDelayMillis(); $timeoutMillis = $backoffSettings->getInitialRpcTimeoutMillis(); $currentTimeMillis = $timeFuncMillis(); $deadlineMillis = $currentTimeMillis + $totalTimeoutMillis; while ($currentTimeMillis < $deadlineMillis) { $nextApiCall = self::setTimeout($apiCall, $timeoutMillis); try { return call_user_func_array($nextApiCall, func_get_args()); } catch (ApiException $e) { if (!in_array($e->getCode(), $retrySettings->getRetryableCodes())) { throw $e; } } catch (Exception $e) { throw $e; } // Don't sleep if the failure was a timeout if ($e->getCode() != Grpc\STATUS_DEADLINE_EXCEEDED) { usleep($delayMillis * 1000); } $currentTimeMillis = $timeFuncMillis(); $delayMillis = min($delayMillis * $delayMult, $maxDelayMillis); $timeoutMillis = min( $timeoutMillis * $timeoutMult, $maxTimeoutMillis, $deadlineMillis - $currentTimeMillis ); } throw new ApiException("Retry total timeout exceeded.", Grpc\STATUS_DEADLINE_EXCEEDED); }; return $inner; } private static function setPageStreaming($callable, $pageStreamingDescriptor) { $inner = function () use ($callable, $pageStreamingDescriptor) { return new PagedListResponse(func_get_args(), $callable, $pageStreamingDescriptor); }; return $inner; } private static function setCustomHeader($callable, $headerDescriptor) { $inner = function () use ($callable, $headerDescriptor) { $params = func_get_args(); if (count($params) != self::GRPC_CALLABLE_PARAM_COUNT || !is_array($params[self::GRPC_CALLABLE_METADATA_INDEX])) { throw new InvalidArgumentException('Metadata argument is not found.'); } else { $metadata = $params[self::GRPC_CALLABLE_METADATA_INDEX]; $headers = $headerDescriptor->getHeader(); $params[self::GRPC_CALLABLE_METADATA_INDEX] = array_merge($headers, $metadata); return call_user_func_array($callable, $params); } }; return $inner; } /** * @param Grpc\BaseStub $stub the gRPC stub to make calls through. * @param string $methodName the method name on the stub to call. * @param Google\GAX\CallSettings $settings the call settings to use for this call. * @param array $options { * Optional. * @type Google\GAX\PageStreamingDescriptor $pageStreamingDescriptor * the descriptor used for page-streaming. * @type Google\GAX\AgentHeaderDescriptor $headerDescriptor * the descriptor used for creating GAPIC header. * } */ public static function createApiCall($stub, $methodName, CallSettings $settings, $options = []) { $apiCall = function () use ($stub, $methodName) { list($response, $status) = call_user_func_array(array($stub, $methodName), func_get_args())->wait(); if ($status->code == Grpc\STATUS_OK) { return $response; } else { throw new ApiException($status->details, $status->code); } }; $retrySettings = $settings->getRetrySettings(); if (!is_null($retrySettings) && !is_null($retrySettings->getRetryableCodes())) { $timeFuncMillis = null; if (array_key_exists('timeFuncMillis', $options)) { $timeFuncMillis = $options['timeFuncMillis']; } $apiCall = self::setRetry($apiCall, $settings->getRetrySettings(), $timeFuncMillis); } elseif ($settings->getTimeoutMillis() > 0) { $apiCall = self::setTimeout($apiCall, $settings->getTimeoutMillis()); } if (array_key_exists('pageStreamingDescriptor', $options)) { $apiCall = self::setPageStreaming($apiCall, $options['pageStreamingDescriptor']); } if (array_key_exists('headerDescriptor', $options)) { $apiCall = self::setCustomHeader($apiCall, $options['headerDescriptor']); } return $apiCall; } } src/ApiException.php000064400000003644151742741340010453 0ustar00code}]: {$this->message}\n"; } } src/BackoffSettings.php000064400000015717151742741340011143 0ustar00 $value) { $wordsKey = str_replace('_', ' ', $key); $camelCaseKey = str_replace(' ', '', ucwords($wordsKey)); $camelCaseSettings[lcfirst($camelCaseKey)] = $value; } return new BackoffSettings($camelCaseSettings); } /** * Constructs an instance. * * @param array $settings { * Required. Settings for configuring the backoff settings * * @type integer $initialRetryDelayMillis The initial delay of retry in milliseconds. * @type integer $retryDelayMultiplier The exponential multiplier of retry delay. * @type integer $maxRetryDelayMillis The max delay of retry in milliseconds. * @type integer $initialRpcTimeoutMillis The initial timeout of rpc call in milliseconds. * @type integer $rpcTimeoutMultiplier The exponential multiplier of rpc timeout. * @type integer $maxRpcTimeoutMillis The max timout of rpc call in milliseconds. * @type integer $totalTimeoutMillis The max accumulative timeout in total. * } */ public function __construct($settings) { self::validate($settings); $this->initialRetryDelayMillis = $settings['initialRetryDelayMillis']; $this->retryDelayMultiplier = $settings['retryDelayMultiplier']; $this->maxRetryDelayMillis = $settings['maxRetryDelayMillis']; $this->initialRpcTimeoutMillis = $settings['initialRpcTimeoutMillis']; $this->rpcTimeoutMultiplier = $settings['rpcTimeoutMultiplier']; $this->maxRpcTimeoutMillis = $settings['maxRpcTimeoutMillis']; $this->totalTimeoutMillis = $settings['totalTimeoutMillis']; } public function getInitialRetryDelayMillis() { return $this->initialRetryDelayMillis; } public function getRetryDelayMultiplier() { return $this->retryDelayMultiplier; } public function getMaxRetryDelayMillis() { return $this->maxRetryDelayMillis; } public function getInitialRpcTimeoutMillis() { return $this->initialRpcTimeoutMillis; } public function getRpcTimeoutMultiplier() { return $this->rpcTimeoutMultiplier; } public function getMaxRpcTimeoutMillis() { return $this->maxRpcTimeoutMillis; } public function getTotalTimeoutMillis() { return $this->totalTimeoutMillis; } private static function validate($settings) { $requiredFields = ['initialRetryDelayMillis', 'retryDelayMultiplier', 'maxRetryDelayMillis', 'initialRpcTimeoutMillis', 'rpcTimeoutMultiplier', 'maxRpcTimeoutMillis', 'totalTimeoutMillis']; foreach ($requiredFields as $field) { if (empty($settings[$field])) { throw new InvalidArgumentException("$field is required for BackoffSettings"); } } } } src/CallSettings.php000064400000017277151742741340010466 0ustar00 $methodConfig) { $phpMethodKey = lcfirst($methodName); $retrySettings = null; if (self::inheritRetrySettings($retryingOverrides, $phpMethodKey)) { $retrySettings = self::constructRetry( $methodConfig, $statusCodes, $serviceConfig['retry_codes'], $serviceConfig['retry_params'] ); } else { $retrySettings = $retryingOverrides[$phpMethodKey]; } $callSettings[$phpMethodKey] = new CallSettings( ['timeoutMillis' => $timeoutMillis, 'retrySettings' => $retrySettings] ); } return $callSettings; } private static function inheritRetrySettings($retryingOverrides, $phpMethodKey) { if (empty($retryingOverrides)) { return true; } if (!array_key_exists($phpMethodKey, $retryingOverrides)) { return true; } $retrySettings = $retryingOverrides[$phpMethodKey]; if (is_null($retrySettings)) { // Retry has been turned off explicitly. return false; } return $retrySettings->shouldInherit(); } private static function constructRetry( $methodConfig, $statusCodes, $retryCodes, $retryParams ) { $codes = []; if (!empty($retryCodes)) { foreach ($retryCodes as $retryCodesName => $retryCodeList) { if ($retryCodesName === $methodConfig['retry_codes_name'] && !empty($retryCodeList)) { foreach ($retryCodeList as $retryCodeName) { if (!array_key_exists($retryCodeName, $statusCodes)) { throw new InvalidArgumentException("Invalid status code: $retryCodeName"); } array_push($codes, $statusCodes[$retryCodeName]); } break; } } } $backoffSettings = null; if (!empty($methodConfig['retry_params_name'])) { foreach ($retryParams as $retryParamsName => $retryParamValues) { if ($retryParamsName === $methodConfig['retry_params_name']) { $backoffSettings = BackoffSettings::fromSnakeCase($retryParamValues); } } } if (!empty($codes) && !empty($backoffSettings)) { return new RetrySettings($codes, $backoffSettings); } else { return null; } } /** * Construct an instance. * * @param array $options { * Optional. * @type Google\GAX\RetrySettings $retrySettings * Retry settings to use for this method. If present, then * $timeout is ignored. * @type integer $timeoutMillis * Timeout to use for the call. Only used if $retrySettings * is not set. * } */ public function __construct($settings = []) { $this->timeoutMillis = self::INHERIT_TIMEOUT; $this->retrySettings = RetrySettings::inherit(); if (array_key_exists('timeoutMillis', $settings)) { $this->timeoutMillis = $settings['timeoutMillis']; } if (array_key_exists('retrySettings', $settings)) { $this->retrySettings = $settings['retrySettings']; } } public function getTimeoutMillis() { return $this->timeoutMillis; } public function getRetrySettings() { return $this->retrySettings; } /** * Returns a new CallSettings merged from this and another CallSettings object. * * @param CallSettings $otherSettings * A CallSettings whose values override those in this object. If * null, then a copy of this object is returned. */ public function merge(CallSettings $otherSettings = null) { if (is_null($otherSettings)) { return new CallSettings([ 'timeoutMillis' => $this->timeoutMillis, 'retrySettings' => $this->retrySettings]); } else { $timeoutMillis = $this->timeoutMillis; if ($otherSettings->getTimeoutMillis() != self::INHERIT_TIMEOUT) { $timeoutMillis = $otherSettings->getTimeoutMillis(); } $retrySettings = $this->retrySettings; if (is_null($otherSettings->getRetrySettings()) || !$otherSettings->getRetrySettings()->shouldInherit()) { $retrySettings = $otherSettings->getRetrySettings(); } return new CallSettings([ 'timeoutMillis' => $timeoutMillis, 'retrySettings' => $retrySettings]); } } } src/FixedSizeCollection.php000064400000013345151742741340011770 0ustar00 0. collectionSize: $collectionSize" ); } if ($collectionSize < $initialPage->getPageElementCount()) { $ipc = $initialPage->getPageElementCount(); throw new InvalidArgumentException( "collectionSize must be greater than or equal to the number of " + "elements in initialPage. collectionSize: $collectionSize, " + "initialPage size: $ipc" ); } $this->collectionSize = $collectionSize; $this->pageList = FixedSizeCollection::createPageArray($initialPage, $collectionSize); } /** * Returns the number of elements in the collection. This will be * equal to the collectionSize parameter used at construction * unless there are no elements remaining to be retrieved. */ public function getCollectionSize() { $size = 0; foreach ($this->pageList as $page) { $size += $page->getPageElementCount(); } return $size; } /** * Returns true if there are more elements that can be retrieved * from the API. */ public function hasNextCollection() { return $this->getLastPage()->hasNextPage(); } /** * Returns a page token that can be passed into the API list * method to retrieve additional elements. */ public function getNextPageToken() { return $this->getLastPage()->getNextPageToken(); } /** * Retrieves the next FixedSizeCollection using one or more API calls. */ public function getNextCollection() { $lastPage = $this->getLastPage(); $nextPage = $lastPage->getNextPage($this->collectionSize); return new FixedSizeCollection($nextPage, $this->collectionSize); } /** * Returns an iterator over the elements of the collection. */ public function getIterator() { foreach ($this->pageList as $page) { foreach ($page as $element) { yield $element; } } } /** * Returns an iterator over FixedSizeCollections, starting with this * and making API calls as required until all of the elements have * been retrieved. */ public function iterateCollections() { $currentCollection = $this; yield $this; while ($currentCollection->hasNextCollection()) { $currentCollection = $currentCollection->getNextCollection(); yield $currentCollection; } } private function getLastPage() { $pageList = $this->pageList; // Get last element in array... $lastPage = array_pop((array_slice($pageList, -1))); return $lastPage; } private static function createPageArray($initialPage, $collectionSize) { $pageList = [$initialPage]; $currentPage = $initialPage; $itemCount = $currentPage->getPageElementCount(); while ($itemCount < $collectionSize && $currentPage->hasNextPage()) { $remainingCount = $collectionSize - $itemCount; $currentPage = $currentPage->getNextPage($remainingCount); $rxElementCount = $currentPage->getPageElementCount(); if ($rxElementCount > $remainingCount) { throw new LengthException("API returned a number of elements " . "exceeding the specified page size limit. page size: " . "$remainingCount, elements received: $rxElementCount"); } array_push($pageList, $currentPage); $itemCount += $rxElementCount; } return $pageList; } } src/GrpcConstants.php000064400000006410151742741340010645 0ustar00 Grpc\STATUS_ABORTED, 'ALREADY_EXISTS' => Grpc\STATUS_ALREADY_EXISTS, 'CANCELLED' => Grpc\STATUS_CANCELLED, 'DATA_LOSS' => Grpc\STATUS_DATA_LOSS, 'DEADLINE_EXCEEDED' => Grpc\STATUS_DEADLINE_EXCEEDED, 'FAILED_PRECONDITION' => Grpc\STATUS_FAILED_PRECONDITION, 'INTERNAL' => Grpc\STATUS_INTERNAL, 'INVALID_ARGUMENT' => Grpc\STATUS_INVALID_ARGUMENT, 'NOT_FOUND' => Grpc\STATUS_NOT_FOUND, 'OK' => Grpc\STATUS_OK, 'OUT_OF_RANGE' => Grpc\STATUS_OUT_OF_RANGE, 'PERMISSION_DENIED' => Grpc\STATUS_PERMISSION_DENIED, 'RESOURCE_EXHAUSTED' => Grpc\STATUS_RESOURCE_EXHAUSTED, 'UNAUTHENTICATED' => Grpc\STATUS_UNAUTHENTICATED, 'UNAVAILABLE' => Grpc\STATUS_UNAVAILABLE, 'UNIMPLEMENTED' => Grpc\STATUS_UNIMPLEMENTED, 'UNKNOWN' => Grpc\STATUS_UNKNOWN ]; } /** * Provides an array that maps from status code name to an object * representing that status code. */ public static function getStatusCodeNames() { if (!self::$statusCodeNames) { self::initStatusCodeNames(); } return self::$statusCodeNames; } } src/GrpcCredentialsHelper.php000064400000013542151742741340012272 0ustar00 null, 'enableCaching' => true, ]; $opts = array_merge($defaultOptions, $optionalArgs); $cachingOptions = array_diff_key($opts, $defaultOptions); $this->scopes = $scopes; if (isset($opts['credentialsLoader'])) { $credentialsLoader = $opts['credentialsLoader']; } else { $credentialsLoader = $this->getADCCredentials($scopes); } if ($opts['enableCaching']) { $credentialsLoader = new FetchAuthTokenCache( $credentialsLoader, $cachingOptions, new MemoryCacheItemPool() ); } $this->credentialsLoader = $credentialsLoader; } /** * Creates the callback function to be passed to gRPC for providing the credentials * for a call. */ public function createCallCredentialsCallback() { $credentialsLoader = $this->credentialsLoader; $callback = function () use ($credentialsLoader) { $token = $credentialsLoader->fetchAuthToken(); return ['Authorization' => array('Bearer ' . $token['access_token'])]; }; return $callback; } // TODO(garrettjones): // add: // 1. (when supported in gRPC) channel /** * Creates a gRPC client stub. * * @param function $generatedCreateStub * Function callback which must accept two arguments ($hostname, $opts) * and return an instance of the stub of the specific API to call. * Generally, this should just call the stub's constructor and return * the instance. * @param string $serviceAddress The domain name of the API remote host. * @param mixed $port The port on which to connect to the remote host. * @param array $options { * Optional. Options for configuring the gRPC stub. * * @type Grpc\ChannelCredentials $sslCreds * A `ChannelCredentials` for use with an SSL-enabled channel. * Default: a credentials object returned from * Grpc\ChannelCredentials::createSsl() * } */ public function createStub($generatedCreateStub, $serviceAddress, $port, $options = []) { $stubOpts = []; if (empty($options['sslCreds'])) { $stubOpts['credentials'] = $this->createSslChannelCredentials(); } else { $stubOpts['credentials'] = $options['sslCreds']; } $fullAddress = "$serviceAddress:$port"; $stubOpts['grpc.ssl_target_name_override'] = $fullAddress; return $generatedCreateStub($fullAddress, $stubOpts); } /** * Gets credentials from ADC. This exists to allow overriding in unit tests. */ protected function getADCCredentials($scopes) { return ApplicationDefaultCredentials::getCredentials($scopes); } /** * Construct ssl channel credentials. This exists to allow overriding in unit tests. */ protected function createSslChannelCredentials() { return ChannelCredentials::createSsl(); } } src/Jison/Parser.jison000064400000010662151742741340010732 0ustar00/* * Copyright 2016, Google Inc. * All rights reserved. * * 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. */ /* description: Parses a path template string and returns an array of * Segment objects. */ /* options */ //option namespace:Google\GAX\Jison /* lexical grammar */ %lex %% \s+ /* skip whitespace */ "/" return 'FORWARD_SLASH' "{" return 'LEFT_BRACE' "}" return 'RIGHT_BRACE' "=" return 'EQUALS' "**" return 'PATH_WILDCARD' "*" return 'WILDCARD' [^*=}{}\/]+ return 'LITERAL' <> /* skip EOF */ /lex %token 'FORWARD_SLASH' %token 'LEFT_BRACE' %token 'RIGHT_BRACE' %token 'EQUALS' %token 'LITERAL' %token 'PATH_WILDCARD' %token 'WILDCARD' %% /* language grammar */ /* This file is used by a php port of Jison (https://github.com/zaach/jison). */ template : FORWARD_SLASH bound_segments {//php return $2->text; } | bound_segments {//php return $1->text; } ; bound_segments : bound_segment FORWARD_SLASH bound_segments {/*php $t1 = $1->text; $t3 = $3->text; $$ = array_merge($t1, $t3); */} | bound_segment {//php $$ = $1->text; } ; unbound_segments : unbound_terminal FORWARD_SLASH unbound_segments {/*php $t1 = $1->text; $t3 = $3->text; $$ = array_merge($t1, $t3); */} | unbound_terminal {//php $$ = $1->text; } ; bound_segment : bound_terminal {//php $$ = $1->text; } | variable {//php $$ = $1->text; } ; unbound_terminal : WILDCARD {/*php $t1 = $1->text; Segment::incrementSegmentCount(); $$ = [new Segment(Segment::TERMINAL, $t1)]; */} | PATH_WILDCARD {/*php $t1 = $1->text; Segment::incrementSegmentCount(); $$ = [new Segment(Segment::TERMINAL, $t1)]; */} | LITERAL {/*php $t1 = $1->text; Segment::incrementSegmentCount(); $$ = [new Segment(Segment::TERMINAL, $t1)]; */} ; bound_terminal : unbound_terminal {/*php $t1 = $1->text; if (in_array($t1[0]['literal'], ['*', '**'])) { $$ = [ new Segment(Segment::BINDING, sprintf('$%d', Segment::getBindingCount())), $t1[0], new Segment(Segment::END_BINDING, '') ]; Segment::incrementBindingCount(); } else { $$ = $t1; } */} ; variable : LEFT_BRACE LITERAL EQUALS unbound_segments RIGHT_BRACE {/*php $t2 = $2->text; $t4 = $4->text; $tmp = [new Segment(Segment::BINDING, $t2)]; $tmp = array_merge($tmp, $t4); array_push($tmp, new Segment(Segment::END_BINDING, '')); $$ = $tmp; */} | LEFT_BRACE LITERAL RIGHT_BRACE {/*php $t2 = $2->text; $$ = [ new Segment(Segment::BINDING, $t2), new Segment(Segment::TERMINAL, '*'), new Segment(Segment::END_BINDING, '') ]; Segment::incrementSegmentCount(); */} ; src/Jison/Parser.php000064400000072551151742741340010404 0ustar00symbols[0] = $symbol0; $this->symbols["accept"] = $symbol0; $this->symbols[1] = $symbol1; $this->symbols["end"] = $symbol1; $this->symbols[2] = $symbol2; $this->symbols["error"] = $symbol2; $this->symbols[3] = $symbol3; $this->symbols["template"] = $symbol3; $this->symbols[4] = $symbol4; $this->symbols["FORWARD_SLASH"] = $symbol4; $this->symbols[5] = $symbol5; $this->symbols["bound_segments"] = $symbol5; $this->symbols[6] = $symbol6; $this->symbols["bound_segment"] = $symbol6; $this->symbols[7] = $symbol7; $this->symbols["unbound_segments"] = $symbol7; $this->symbols[8] = $symbol8; $this->symbols["unbound_terminal"] = $symbol8; $this->symbols[9] = $symbol9; $this->symbols["bound_terminal"] = $symbol9; $this->symbols[10] = $symbol10; $this->symbols["variable"] = $symbol10; $this->symbols[11] = $symbol11; $this->symbols["WILDCARD"] = $symbol11; $this->symbols[12] = $symbol12; $this->symbols["PATH_WILDCARD"] = $symbol12; $this->symbols[13] = $symbol13; $this->symbols["LITERAL"] = $symbol13; $this->symbols[14] = $symbol14; $this->symbols["LEFT_BRACE"] = $symbol14; $this->symbols[15] = $symbol15; $this->symbols["EQUALS"] = $symbol15; $this->symbols[16] = $symbol16; $this->symbols["RIGHT_BRACE"] = $symbol16; $this->terminals = array( 2=>&$symbol2, 4=>&$symbol4, 11=>&$symbol11, 12=>&$symbol12, 13=>&$symbol13, 14=>&$symbol14, 15=>&$symbol15, 16=>&$symbol16 ); $table0 = new ParserState(0); $table1 = new ParserState(1); $table2 = new ParserState(2); $table3 = new ParserState(3); $table4 = new ParserState(4); $table5 = new ParserState(5); $table6 = new ParserState(6); $table7 = new ParserState(7); $table8 = new ParserState(8); $table9 = new ParserState(9); $table10 = new ParserState(10); $table11 = new ParserState(11); $table12 = new ParserState(12); $table13 = new ParserState(13); $table14 = new ParserState(14); $table15 = new ParserState(15); $table16 = new ParserState(16); $table17 = new ParserState(17); $table18 = new ParserState(18); $table19 = new ParserState(19); $table20 = new ParserState(20); $table21 = new ParserState(21); $table22 = new ParserState(22); $tableDefinition0 = array( 3=>new ParserAction($this->none, $table1), 4=>new ParserAction($this->shift, $table2), 5=>new ParserAction($this->none, $table3), 6=>new ParserAction($this->none, $table4), 8=>new ParserAction($this->none, $table7), 9=>new ParserAction($this->none, $table5), 10=>new ParserAction($this->none, $table6), 11=>new ParserAction($this->shift, $table9), 12=>new ParserAction($this->shift, $table10), 13=>new ParserAction($this->shift, $table11), 14=>new ParserAction($this->shift, $table8) ); $tableDefinition1 = array( 1=>new ParserAction($this->accept) ); $tableDefinition2 = array( 5=>new ParserAction($this->none, $table12), 6=>new ParserAction($this->none, $table4), 8=>new ParserAction($this->none, $table7), 9=>new ParserAction($this->none, $table5), 10=>new ParserAction($this->none, $table6), 11=>new ParserAction($this->shift, $table9), 12=>new ParserAction($this->shift, $table10), 13=>new ParserAction($this->shift, $table11), 14=>new ParserAction($this->shift, $table8) ); $tableDefinition3 = array( 1=>new ParserAction($this->reduce, $table2) ); $tableDefinition4 = array( 1=>new ParserAction($this->reduce, $table4), 4=>new ParserAction($this->shift, $table13) ); $tableDefinition5 = array( 1=>new ParserAction($this->reduce, $table7), 4=>new ParserAction($this->reduce, $table7) ); $tableDefinition6 = array( 1=>new ParserAction($this->reduce, $table8), 4=>new ParserAction($this->reduce, $table8) ); $tableDefinition7 = array( 1=>new ParserAction($this->reduce, $table12), 4=>new ParserAction($this->reduce, $table12) ); $tableDefinition8 = array( 13=>new ParserAction($this->shift, $table14) ); $tableDefinition9 = array( 1=>new ParserAction($this->reduce, $table9), 4=>new ParserAction($this->reduce, $table9), 16=>new ParserAction($this->reduce, $table9) ); $tableDefinition10 = array( 1=>new ParserAction($this->reduce, $table10), 4=>new ParserAction($this->reduce, $table10), 16=>new ParserAction($this->reduce, $table10) ); $tableDefinition11 = array( 1=>new ParserAction($this->reduce, $table11), 4=>new ParserAction($this->reduce, $table11), 16=>new ParserAction($this->reduce, $table11) ); $tableDefinition12 = array( 1=>new ParserAction($this->reduce, $table1) ); $tableDefinition13 = array( 5=>new ParserAction($this->none, $table15), 6=>new ParserAction($this->none, $table4), 8=>new ParserAction($this->none, $table7), 9=>new ParserAction($this->none, $table5), 10=>new ParserAction($this->none, $table6), 11=>new ParserAction($this->shift, $table9), 12=>new ParserAction($this->shift, $table10), 13=>new ParserAction($this->shift, $table11), 14=>new ParserAction($this->shift, $table8) ); $tableDefinition14 = array( 15=>new ParserAction($this->shift, $table16), 16=>new ParserAction($this->shift, $table17) ); $tableDefinition15 = array( 1=>new ParserAction($this->reduce, $table3) ); $tableDefinition16 = array( 7=>new ParserAction($this->none, $table18), 8=>new ParserAction($this->none, $table19), 11=>new ParserAction($this->shift, $table9), 12=>new ParserAction($this->shift, $table10), 13=>new ParserAction($this->shift, $table11) ); $tableDefinition17 = array( 1=>new ParserAction($this->reduce, $table14), 4=>new ParserAction($this->reduce, $table14) ); $tableDefinition18 = array( 16=>new ParserAction($this->shift, $table20) ); $tableDefinition19 = array( 4=>new ParserAction($this->shift, $table21), 16=>new ParserAction($this->reduce, $table6) ); $tableDefinition20 = array( 1=>new ParserAction($this->reduce, $table13), 4=>new ParserAction($this->reduce, $table13) ); $tableDefinition21 = array( 7=>new ParserAction($this->none, $table22), 8=>new ParserAction($this->none, $table19), 11=>new ParserAction($this->shift, $table9), 12=>new ParserAction($this->shift, $table10), 13=>new ParserAction($this->shift, $table11) ); $tableDefinition22 = array( 16=>new ParserAction($this->reduce, $table5) ); $table0->setActions($tableDefinition0); $table1->setActions($tableDefinition1); $table2->setActions($tableDefinition2); $table3->setActions($tableDefinition3); $table4->setActions($tableDefinition4); $table5->setActions($tableDefinition5); $table6->setActions($tableDefinition6); $table7->setActions($tableDefinition7); $table8->setActions($tableDefinition8); $table9->setActions($tableDefinition9); $table10->setActions($tableDefinition10); $table11->setActions($tableDefinition11); $table12->setActions($tableDefinition12); $table13->setActions($tableDefinition13); $table14->setActions($tableDefinition14); $table15->setActions($tableDefinition15); $table16->setActions($tableDefinition16); $table17->setActions($tableDefinition17); $table18->setActions($tableDefinition18); $table19->setActions($tableDefinition19); $table20->setActions($tableDefinition20); $table21->setActions($tableDefinition21); $table22->setActions($tableDefinition22); $this->table = array( 0=>$table0, 1=>$table1, 2=>$table2, 3=>$table3, 4=>$table4, 5=>$table5, 6=>$table6, 7=>$table7, 8=>$table8, 9=>$table9, 10=>$table10, 11=>$table11, 12=>$table12, 13=>$table13, 14=>$table14, 15=>$table15, 16=>$table16, 17=>$table17, 18=>$table18, 19=>$table19, 20=>$table20, 21=>$table21, 22=>$table22 ); $this->defaultActions = array( 3=>new ParserAction($this->reduce, $table2), 12=>new ParserAction($this->reduce, $table1), 15=>new ParserAction($this->reduce, $table3), 22=>new ParserAction($this->reduce, $table5) ); $this->productions = array( 0=>new ParserProduction($symbol0), 1=>new ParserProduction($symbol3,2), 2=>new ParserProduction($symbol3,1), 3=>new ParserProduction($symbol5,3), 4=>new ParserProduction($symbol5,1), 5=>new ParserProduction($symbol7,3), 6=>new ParserProduction($symbol7,1), 7=>new ParserProduction($symbol6,1), 8=>new ParserProduction($symbol6,1), 9=>new ParserProduction($symbol8,1), 10=>new ParserProduction($symbol8,1), 11=>new ParserProduction($symbol8,1), 12=>new ParserProduction($symbol9,1), 13=>new ParserProduction($symbol10,5), 14=>new ParserProduction($symbol10,3) ); //Setup Lexer $this->rules = array( 0=>"/^(?:\s+)/", 1=>"/^(?:\/)/", 2=>"/^(?:\{)/", 3=>"/^(?:\})/", 4=>"/^(?:=)/", 5=>"/^(?:\*\*)/", 6=>"/^(?:\*)/", 7=>"/^(?:[^*=}{}\/]+)/", 8=>"/^(?:$)/" ); $this->conditions = array( "INITIAL"=>new LexerConditions(array( 0,1,2,3,4,5,6,7,8), true) ); } function parserPerformAction(&$thisS, &$yy, $yystate, &$s, $o) { /* this == yyval */ switch ($yystate) { case 1: case 2: return $s[$o]->text; break; case 3: case 5: $t1 = $s[$o-2]->text; $t3 = $s[$o]->text; $thisS = array_merge($t1, $t3); break; case 4: case 6: case 7: case 8: $thisS = $s[$o]->text; break; case 9: case 10: case 11: $t1 = $s[$o]->text; Segment::incrementSegmentCount(); $thisS = [new Segment(Segment::TERMINAL, $t1)]; break; case 12: $t1 = $s[$o]->text; if (in_array($t1[0]['literal'], ['*', '**'])) { $thisS = [ new Segment(Segment::BINDING, sprintf('$%d', Segment::getBindingCount())), $t1[0], new Segment(Segment::END_BINDING, '') ]; Segment::incrementBindingCount(); } else { $thisS = $t1; } break; case 13: $t2 = $s[$o-3]->text; $t4 = $s[$o-1]->text; $tmp = [new Segment(Segment::BINDING, $t2)]; $tmp = array_merge($tmp, $t4); array_push($tmp, new Segment(Segment::END_BINDING, '')); $thisS = $tmp; break; case 14: $t2 = $s[$o-1]->text; $thisS = [ new Segment(Segment::BINDING, $t2), new Segment(Segment::TERMINAL, '*'), new Segment(Segment::END_BINDING, '') ]; Segment::incrementSegmentCount(); break; } } function parserLex() { $token = $this->lexerLex(); // $end = 1 if (isset($token)) { return $token; } return $this->symbols["end"]; } function parseError($str = "", ParserError $hash = null) { throw new Exception($str); } function lexerError($str = "", LexerError $hash = null) { throw new Exception($str); } function parse($input) { if (empty($this->table)) { throw new Exception("Empty Table"); } $this->eof = new ParserSymbol("Eof", 1); $firstAction = new ParserAction(0, $this->table[0]); $firstCachedAction = new ParserCachedAction($firstAction); $stack = array($firstCachedAction); $stackCount = 1; $vstack = array(null); $vstackCount = 1; $yy = null; $_yy = null; $recovering = 0; $symbol = null; $action = null; $errStr = ""; $preErrorSymbol = null; $state = null; $this->setInput($input); while (true) { // retrieve state number from top of stack $state = $stack[$stackCount - 1]->action->state; // use default actions if available if ($state != null && isset($this->defaultActions[$state->index])) { $action = $this->defaultActions[$state->index]; } else { if (empty($symbol) == true) { $symbol = $this->parserLex(); } // read action for current state and first input if (isset($state) && isset($state->actions[$symbol->index])) { //$action = $this->table[$state][$symbol]; $action = $state->actions[$symbol->index]; } else { $action = null; } } if ($action == null) { if ($recovering == 0) { // Report error $expected = array(); foreach($this->table[$state->index]->actions as $p => $item) { if (!empty($this->terminals[$p]) && $p > 2) { $expected[] = $this->terminals[$p]->name; } } $errStr = "Parse error on line " . ($this->yy->lineNo + 1) . ":\n" . $this->showPosition() . "\nExpecting " . implode(", ", $expected) . ", got '" . (isset($this->terminals[$symbol->index]) ? $this->terminals[$symbol->index]->name : 'NOTHING') . "'"; $this->parseError($errStr, new ParserError($this->match, $state, $symbol, $this->yy->lineNo, $this->yy->loc, $expected)); } } if ($state === null || $action === null) { break; } switch ($action->action) { case 1: // shift //$this->shiftCount++; $stack[] = new ParserCachedAction($action, $symbol); $stackCount++; $vstack[] = clone($this->yy); $vstackCount++; $symbol = ""; if ($preErrorSymbol == null) { // normal execution/no error $yy = clone($this->yy); if ($recovering > 0) $recovering--; } else { // error just occurred, resume old look ahead f/ before error $symbol = $preErrorSymbol; $preErrorSymbol = null; } break; case 2: // reduce $len = $this->productions[$action->state->index]->len; // perform semantic action $_yy = $vstack[$vstackCount - $len];// default to $S = $1 // default location, uses first token for firsts, last for lasts if (isset($this->ranges)) { //TODO: add ranges } $r = $this->parserPerformAction($_yy->text, $yy, $action->state->index, $vstack, $vstackCount - 1); if (isset($r)) { return $r; } // pop off stack while ($len > 0) { $len--; array_pop($stack); $stackCount--; array_pop($vstack); $vstackCount--; } if (is_null($_yy)) { $vstack[] = new ParserValue(); } else { $vstack[] = $_yy; } $vstackCount++; $nextSymbol = $this->productions[$action->state->index]->symbol; // goto new state = table[STATE][NONTERMINAL] $nextState = $stack[$stackCount - 1]->action->state; $nextAction = $nextState->actions[$nextSymbol->index]; $stack[] = new ParserCachedAction($nextAction, $nextSymbol); $stackCount++; break; case 3: // accept return true; } } return true; } /* Jison generated lexer */ public $eof; public $yy = null; public $match = ""; public $matched = ""; public $conditionStack = array(); public $conditionStackCount = 0; public $rules = array(); public $conditions = array(); public $done = false; public $less; public $more; public $input; public $offset; public $ranges; public $flex = false; function setInput($input) { $this->input = $input; $this->more = $this->less = $this->done = false; $this->yy = new ParserValue(); $this->conditionStack = array('INITIAL'); $this->conditionStackCount = 1; if (isset($this->ranges)) { $loc = $this->yy->loc = new ParserLocation(); $loc->Range(new ParserRange(0, 0)); } else { $this->yy->loc = new ParserLocation(); } $this->offset = 0; } function input() { $ch = $this->input[0]; $this->yy->text .= $ch; $this->yy->leng++; $this->offset++; $this->match .= $ch; $this->matched .= $ch; $lines = preg_match("/(?:\r\n?|\n).*/", $ch); if (count($lines) > 0) { $this->yy->lineNo++; $this->yy->lastLine++; } else { $this->yy->loc->lastColumn++; } if (isset($this->ranges)) { $this->yy->loc->range->y++; } $this->input = array_slice($this->input, 1); return $ch; } function unput($ch) { $len = strlen($ch); $lines = explode("/(?:\r\n?|\n)/", $ch); $linesCount = count($lines); $this->input = $ch . $this->input; $this->yy->text = substr($this->yy->text, 0, $len - 1); //$this->yylen -= $len; $this->offset -= $len; $oldLines = explode("/(?:\r\n?|\n)/", $this->match); $oldLinesCount = count($oldLines); $this->match = substr($this->match, 0, strlen($this->match) - 1); $this->matched = substr($this->matched, 0, strlen($this->matched) - 1); if (($linesCount - 1) > 0) $this->yy->lineNo -= $linesCount - 1; $r = $this->yy->loc->range; $oldLinesLength = (isset($oldLines[$oldLinesCount - $linesCount]) ? strlen($oldLines[$oldLinesCount - $linesCount]) : 0); $this->yy->loc = new ParserLocation( $this->yy->loc->firstLine, $this->yy->lineNo, $this->yy->loc->firstColumn, $this->yy->loc->firstLine, (empty($lines) ? ($linesCount == $oldLinesCount ? $this->yy->loc->firstColumn : 0) + $oldLinesLength : $this->yy->loc->firstColumn - $len) ); if (isset($this->ranges)) { $this->yy->loc->range = array($r[0], $r[0] + $this->yy->leng - $len); } } function more() { $this->more = true; } function pastInput() { $past = substr($this->matched, 0, strlen($this->matched) - strlen($this->match)); return (strlen($past) > 20 ? '...' : '') . preg_replace("/\n/", "", substr($past, -20)); } function upcomingInput() { $next = $this->match; if (strlen($next) < 20) { $next .= substr($this->input, 0, 20 - strlen($next)); } return preg_replace("/\n/", "", substr($next, 0, 20) . (strlen($next) > 20 ? '...' : '')); } function showPosition() { $pre = $this->pastInput(); $c = ''; for($i = 0, $preLength = strlen($pre); $i < $preLength; $i++) { $c .= '-'; } return $pre . $this->upcomingInput() . "\n" . $c . "^"; } function next() { if ($this->done == true) { return $this->eof; } if (empty($this->input)) { $this->done = true; } if ($this->more == false) { $this->yy->text = ''; $this->match = ''; } $rules = $this->currentRules(); for ($i = 0, $j = count($rules); $i < $j; $i++) { preg_match($this->rules[$rules[$i]], $this->input, $tempMatch); if ($tempMatch && (empty($match) || count($tempMatch[0]) > count($match[0]))) { $match = $tempMatch; $index = $i; if (isset($this->flex) && $this->flex == false) { break; } } } if ( $match ) { $matchCount = strlen($match[0]); $lineCount = preg_match("/(?:\r\n?|\n).*/", $match[0], $lines); $line = ($lines ? $lines[$lineCount - 1] : false); $this->yy->lineNo += $lineCount; $this->yy->loc = new ParserLocation( $this->yy->loc->lastLine, $this->yy->lineNo + 1, $this->yy->loc->lastColumn, ($line ? count($line) - preg_match("/\r?\n?/", $line, $na) : $this->yy->loc->lastColumn + $matchCount ) ); $this->yy->text .= $match[0]; $this->match .= $match[0]; $this->matches = $match; $this->matched .= $match[0]; $this->yy->leng = strlen($this->yy->text); if (isset($this->ranges)) { $this->yy->loc->range = new ParserRange($this->offset, $this->offset += $this->yy->leng); } $this->more = false; $this->input = substr($this->input, $matchCount, strlen($this->input)); $ruleIndex = $rules[$index]; $nextCondition = $this->conditionStack[$this->conditionStackCount - 1]; $token = $this->lexerPerformAction($ruleIndex, $nextCondition); if ($this->done == true && empty($this->input) == false) { $this->done = false; } if (empty($token) == false) { return $this->symbols[ $token ]; } else { return null; } } if (empty($this->input)) { return $this->eof; } else { $this->lexerError("Lexical error on line " . ($this->yy->lineNo + 1) . ". Unrecognized text.\n" . $this->showPosition(), new LexerError("", -1, $this->yy->lineNo)); return null; } } function lexerLex() { $r = $this->next(); while (is_null($r) && !$this->done) { $r = $this->next(); } return $r; } function begin($condition) { $this->conditionStackCount++; $this->conditionStack[] = $condition; } function popState() { $this->conditionStackCount--; return array_pop($this->conditionStack); } function currentRules() { $peek = $this->conditionStack[$this->conditionStackCount - 1]; return $this->conditions[$peek]->rules; } function LexerPerformAction($avoidingNameCollisions, $YY_START = null) { ; switch($avoidingNameCollisions) { case 0:/* skip whitespace */ break; case 1:return 4; break; case 2:return 14; break; case 3:return 16; break; case 4:return 15; break; case 5:return 12; break; case 6:return 11; break; case 7:return 13; break; case 8:/* skip EOF */ break; } } } class ParserLocation { public $firstLine = 1; public $lastLine = 0; public $firstColumn = 1; public $lastColumn = 0; public $range; public function __construct($firstLine = 1, $lastLine = 0, $firstColumn = 1, $lastColumn = 0) { $this->firstLine = $firstLine; $this->lastLine = $lastLine; $this->firstColumn = $firstColumn; $this->lastColumn = $lastColumn; } public function Range($range) { $this->range = $range; } public function __clone() { return new ParserLocation($this->firstLine, $this->lastLine, $this->firstColumn, $this->lastColumn); } } class ParserValue { public $leng = 0; public $loc; public $lineNo = 0; public $text; function __clone() { $clone = new ParserValue(); $clone->leng = $this->leng; if (isset($this->loc)) { $clone->loc = clone $this->loc; } $clone->lineNo = $this->lineNo; $clone->text = $this->text; return $clone; } } class LexerConditions { public $rules; public $inclusive; function __construct($rules, $inclusive) { $this->rules = $rules; $this->inclusive = $inclusive; } } class ParserProduction { public $len = 0; public $symbol; public function __construct($symbol, $len = 0) { $this->symbol = $symbol; $this->len = $len; } } class ParserCachedAction { public $action; public $symbol; function __construct($action, $symbol = null) { $this->action = $action; $this->symbol = $symbol; } } class ParserAction { public $action; public $state; public $symbol; function __construct($action, &$state = null, &$symbol = null) { $this->action = $action; $this->state = $state; $this->symbol = $symbol; } } class ParserSymbol { public $name; public $index = -1; public $symbols = array(); public $symbolsByName = array(); function __construct($name, $index) { $this->name = $name; $this->index = $index; } public function addAction($a) { $this->symbols[$a->index] = $this->symbolsByName[$a->name] = $a; } } class ParserError { public $text; public $state; public $symbol; public $lineNo; public $loc; public $expected; function __construct($text, $state, $symbol, $lineNo, $loc, $expected) { $this->text = $text; $this->state = $state; $this->symbol = $symbol; $this->lineNo = $lineNo; $this->loc = $loc; $this->expected = $expected; } } class LexerError { public $text; public $token; public $lineNo; public function __construct($text, $token, $lineNo) { $this->text = $text; $this->token = $token; $this->lineNo = $lineNo; } } class ParserState { public $index; public $actions = array(); function __construct($index) { $this->index = $index; } public function setActions(&$actions) { $this->actions = $actions; } } class ParserRange { public $x; public $y; function __construct($x, $y) { $this->x = $x; $this->y = $y; } } src/Jison/Segment.php000064400000005261151742741340010544 0ustar00kind = $kind; $this->literal = $literal; $this['kind'] = $kind; $this['literal'] = $literal; } public static function getBindingCount() { return self::$bindingCount; } public static function incrementBindingCount() { self::$bindingCount++; } public static function resetBindingCount() { self::$bindingCount = 0; } public static function getSegmentCount() { return self::$segmentCount; } public static function incrementSegmentCount() { self::$segmentCount++; } public static function resetSegmentCount() { self::$segmentCount = 0; } } src/Page.php000064400000013176151742741340006740 0ustar00parameters = $params; $this->callable = $callable; $this->pageStreamingDescriptor = $pageStreamingDescriptor; $requestPageTokenField = $this->pageStreamingDescriptor->getRequestPageTokenField(); $this->pageToken = $params[0]->$requestPageTokenField; // Make gRPC call eagerly $this->response = call_user_func_array($this->callable, $this->parameters); } /** * Returns true if there are more pages that can be retrieved from the * API. */ public function hasNextPage() { return strcmp($this->getNextPageToken(), Page::FINAL_PAGE_TOKEN) != 0; } /** * Returns the next page token from the response. */ public function getNextPageToken() { $responsePageTokenField = $this->pageStreamingDescriptor->getResponsePageTokenField(); return $this->getResponseObject()->$responsePageTokenField; } /** * Retrieves the next Page object using the next page token. */ public function getNextPage($pageSize = null) { if (!$this->hasNextPage()) { throw new ValidationException( 'Could not complete getNextPage operation: ' . 'there are no more pages to retrieve.' ); } $newRequest = clone $this->getRequestObject(); $requestPageTokenField = $this->pageStreamingDescriptor->getRequestPageTokenField(); $newRequest->$requestPageTokenField = $this->getNextPageToken(); if (isset($pageSize)) { if (!$this->pageStreamingDescriptor->requestHasPageSizeField()) { throw new ValidationException( 'pageSize argument was defined, but the method does not ' . 'support a page size parameter in the optional array argument' ); } $requestPageSizeField = $this->pageStreamingDescriptor->getRequestPageSizeField(); $newRequest->$requestPageSizeField = $pageSize; } $nextParameters = [$newRequest, $this->parameters[1], $this->parameters[2]]; return new Page($nextParameters, $this->callable, $this->pageStreamingDescriptor); } /** * Return the number of elements in the response. */ public function getPageElementCount() { $resourceField = $this->pageStreamingDescriptor->getResourceField(); return count($this->getResponseObject()->$resourceField); } /** * Return an iterator over the elements in the response. */ public function getIterator() { $resourceField = $this->pageStreamingDescriptor->getResourceField(); foreach ($this->getResponseObject()->$resourceField as $element) { yield $element; } } /** * Return an iterator over Page objects, beginning with this object. * Additional Page objects are retrieved lazily via API calls until * all elements have been retrieved. */ public function iteratePages() { $currentPage = $this; yield $this; while ($currentPage->hasNextPage()) { $currentPage = $currentPage->getNextPage(); yield $currentPage; } } /** * Gets the request object used to generate the Page. */ public function getRequestObject() { return $this->parameters[0]; } /** * Gets the API response object. */ public function getResponseObject() { return $this->response; } } src/PageStreamingDescriptor.php000064400000007125151742741340012646 0ustar00requestPageTokenField = $descriptor['requestPageTokenField']; if (isset($descriptor['requestPageSizeField'])) { $this->requestPageSizeField = $descriptor['requestPageSizeField']; } else { $this->requestPageSizeField = null; } $this->responsePageTokenField = $descriptor['responsePageTokenField']; $this->resourceField = $descriptor['resourceField']; } public function getRequestPageTokenField() { return $this->requestPageTokenField; } public function getRequestPageSizeField() { return $this->requestPageSizeField; } public function requestHasPageSizeField() { return isset($this->requestPageSizeField); } public function getResponsePageTokenField() { return $this->responsePageTokenField; } public function getResourceField() { return $this->resourceField; } private static function validate($descriptor) { $requiredFields = ['requestPageTokenField', 'responsePageTokenField', 'resourceField']; foreach ($requiredFields as $field) { if (empty($descriptor[$field])) { throw new InvalidArgumentException( "$field is required for PageStreamingDescriptor" ); } } } } src/PagedListResponse.php000064400000016344151742741340011457 0ustar00parameters = $params; $this->callable = $callable; $this->pageStreamingDescriptor = $pageStreamingDescriptor; // Eagerly construct the first page $this->getPage(); } /** * Returns an iterator over the full list of elements. Elements * of the list are retrieved lazily using the underlying API. */ public function iterateAllElements() { foreach ($this->iteratePages() as $page) { foreach ($page as $element) { yield $element; } } } /** * Return the current page of results. If the page has not * previously been accessed, it will be retrieved with a call to * the underlying API. */ public function getPage() { if (!isset($this->firstPage)) { $this->firstPage = new Page( $this->parameters, $this->callable, $this->pageStreamingDescriptor ); } return $this->firstPage; } /** * Returns an iterator over pages of results. The pages are * retrieved lazily from the underlying API. */ public function iteratePages() { return $this->getPage()->iteratePages(); } /** * Returns a collection of elements with a fixed size set by * the collectionSize parameter. The collection will only contain * fewer than collectionSize elements if there are no more * pages to be retrieved from the server. * * NOTE: it is an error to call this method if an optional parameter * to set the page size is not supported or has not been set in the * original API call. It is also an error if the collectionSize parameter * is less than the page size that has been set. */ public function expandToFixedSizeCollection($collectionSize) { if (!$this->pageStreamingDescriptor->requestHasPageSizeField()) { throw new ValidationException( "FixedSizeCollection is not supported for this method, because " . "the method does not support an optional argument to set the " . "page size." ); } // The first page has been eagerly constructed, so we do not need to // update the page size parameter before calling getPage $page = $this->getPage(); $request = $page->getRequestObject(); $pageSizeField = $this->pageStreamingDescriptor->getRequestPageSizeField(); if (!isset($request->$pageSizeField)) { throw new ValidationException( "Error while expanding Page to FixedSizeCollection: No page size " . "parameter found. The page size parameter must be set in the API " . "optional arguments array, and must be less than the collectionSize " . "parameter, in order to create a FixedSizeCollection object." ); } $pageSize = $request->$pageSizeField; if ($pageSize > $collectionSize) { throw new ValidationException( "Error while expanding Page to FixedSizeCollection: collectionSize " . "parameter is less than the page size optional argument specified in " . "the API call. collectionSize: $collectionSize, page size: $pageSize" ); } return new FixedSizeCollection($this->getPage(), $collectionSize); } /** * Returns an iterator over fixed size collections of results. * The collections are retrieved lazily from the underlying API. * * Each collection will have collectionSize elements, with the * exception of the final collection which may contain fewer * elements. * * NOTE: it is an error to call this method if an optional parameter * to set the page size is not supported or has not been set in the * original API call. It is also an error if the collectionSize parameter * is less than the page size that has been set. */ public function iterateFixedSizeCollections($collectionSize) { return $this->expandToFixedSizeCollection($collectionSize)->iterateCollections(); } } src/Parser.php000064400000006210151742741340007307 0ustar00parser = new BaseParser(); } /** * Returns an array of path template segments parsed from data. * * @param string $data A path template string * * @throws ValidationException when $data cannot be parsed * * @return array An array of Segment */ public function parse($data) { try { Segment::resetSegmentCount(); Segment::resetBindingCount(); $segments = $this->parser->parse($data); $this->segmentCount = Segment::getSegmentCount(); // Validation step: checks that there are no nested bindings. $pathWildcard = false; foreach ($segments as $segment) { if ($segment->kind == Segment::TERMINAL && $segment->literal == '**') { if ($pathWildcard) { throw new ValidationException( 'validation error: path template cannot contain '. 'more than one path wildcard' ); } $pathWildcard = true; } } return $segments; } catch (Exception $e) { throw new ValidationException('Exception in parser', 0, $e); } } public function getSegmentCount() { return $this->segmentCount; } } src/PathTemplate.php000064400000014630151742741340010450 0ustar00segments = $parser->parse($data); $this->segmentCount = $parser->getSegmentCount(); } public function __toString() { return self::format($this->segments); } public function count() { return $this->segmentCount; } /** * Renders a path template using the provided bindings. * * @param array $bindings An array matching var names to binding strings. * * @throws ValidationException if a key isn't provided or if a sub-template * can't be parsed. * * @return string A rendered representation of this path template. */ public function render($bindings) { $out = []; $binding = false; foreach ($this->segments as $segment) { if ($segment->kind == Segment::BINDING) { if (!array_key_exists($segment->literal, $bindings)) { throw new ValidationException( sprintf( 'render error: value for key "%s" not '. 'provided', $segment->literal ) ); } $out = array_merge( $out, (new self($bindings[$segment->literal]))->segments ); $binding = true; } elseif ($segment->kind == Segment::END_BINDING) { $binding = false; } else { if ($binding) { continue; } array_push($out, $segment); } } $path = self::format($out); $this->match($path); return $path; } /** * Matches a fully qualified path template string. * * @param string $path A fully qualified path template string. * * @throws ValidationException if path can't be matched to the template. * * @return array Array matching var names to binding values. */ public function match($path) { $segments = $this->segments; $pathList = explode('/', $path); $currentVar = null; $bindings = []; $segmentCount = $this->segmentCount; $pathIndex = 0; foreach ($segments as $segment) { if ($pathIndex >= count($pathList)) { break; } if ($segment->kind == Segment::TERMINAL) { $pathItem = $pathList[$pathIndex]; if ($segment->literal == '*') { $bindings[$currentVar] = $pathItem; $pathIndex += 1; } elseif ($segment->literal == '**') { $length = count($pathList) - $segmentCount + 1; $segmentCount += count($pathList) - $segmentCount; $bindings[$currentVar] = implode( '/', array_slice($pathList, $pathIndex, $length) ); $pathIndex += $length; } elseif ($segment->literal != $pathItem) { throw new ValidationException( sprintf( 'mismatched literal: "%s" != "%s"', $segment->literal, $pathItem ) ); } else { $pathIndex += 1; } } elseif ($segment->kind == Segment::BINDING) { $currentVar = $segment->literal; } } if (($pathIndex != count($pathList)) || ($pathIndex != $segmentCount)) { throw new ValidationException( sprintf( 'match error: could not render a path template '. 'from %s', $path ) ); } return $bindings; } private static function format($segments) { $template = ''; $slash = true; foreach ($segments as $segment) { if ($segment->kind == Segment::TERMINAL) { if ($slash) { $template .= '/'; } $template .= $segment->literal; } $slash = true; if ($segment->kind == Segment::BINDING) { $template .= sprintf('/{%s=', $segment->literal); $slash = false; } if ($segment->kind == Segment::END_BINDING) { $template .= sprintf('%s}', $segment->literal); } } // Remove leading '/' return substr($template, 1); } } src/RetrySettings.php000064400000005600151742741340010703 0ustar00inherit = true; return $retrySettings; } /** * Construct an instance. */ public function __construct($retryableCodes, $backoffSettings) { $this->retryableCodes = $retryableCodes; $this->backoffSettings = $backoffSettings; $this->inherit = false; } public function getRetryableCodes() { return $this->retryableCodes; } public function getBackoffSettings() { return $this->backoffSettings; } public function shouldInherit() { return $this->inherit; } } src/ValidationException.php000064400000003170151742741340012026 0ustar00number = 72295728; $f->name = "google\api\http"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\HttpRule'; return $f; }); }src/generated/audit_log.php000064400000053207151742741340011770 0ustar00number = 7; $f->name = "service_name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING method_name = 8 $f = new \DrSlump\Protobuf\Field(); $f->number = 8; $f->name = "method_name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING resource_name = 11 $f = new \DrSlump\Protobuf\Field(); $f->number = 11; $f->name = "resource_name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT64 num_response_items = 12 $f = new \DrSlump\Protobuf\Field(); $f->number = 12; $f->name = "num_response_items"; $f->type = \DrSlump\Protobuf::TYPE_INT64; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE status = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "status"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\rpc\Status'; $descriptor->addField($f); // OPTIONAL MESSAGE authentication_info = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "authentication_info"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\cloud\audit\AuthenticationInfo'; $descriptor->addField($f); // REPEATED MESSAGE authorization_info = 9 $f = new \DrSlump\Protobuf\Field(); $f->number = 9; $f->name = "authorization_info"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\cloud\audit\AuthorizationInfo'; $descriptor->addField($f); // OPTIONAL MESSAGE request_metadata = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "request_metadata"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\cloud\audit\RequestMetadata'; $descriptor->addField($f); // OPTIONAL MESSAGE request = 16 $f = new \DrSlump\Protobuf\Field(); $f->number = 16; $f->name = "request"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Struct'; $descriptor->addField($f); // OPTIONAL MESSAGE response = 17 $f = new \DrSlump\Protobuf\Field(); $f->number = 17; $f->name = "response"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Struct'; $descriptor->addField($f); // OPTIONAL MESSAGE service_data = 15 $f = new \DrSlump\Protobuf\Field(); $f->number = 15; $f->name = "service_data"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Any'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasServiceName(){ return $this->_has(7); } /** * Clear value * * @return \google\cloud\audit\AuditLog */ public function clearServiceName(){ return $this->_clear(7); } /** * Get value * * @return string */ public function getServiceName(){ return $this->_get(7); } /** * Set value * * @param string $value * @return \google\cloud\audit\AuditLog */ public function setServiceName( $value){ return $this->_set(7, $value); } /** * Check if has a value * * @return boolean */ public function hasMethodName(){ return $this->_has(8); } /** * Clear value * * @return \google\cloud\audit\AuditLog */ public function clearMethodName(){ return $this->_clear(8); } /** * Get value * * @return string */ public function getMethodName(){ return $this->_get(8); } /** * Set value * * @param string $value * @return \google\cloud\audit\AuditLog */ public function setMethodName( $value){ return $this->_set(8, $value); } /** * Check if has a value * * @return boolean */ public function hasResourceName(){ return $this->_has(11); } /** * Clear value * * @return \google\cloud\audit\AuditLog */ public function clearResourceName(){ return $this->_clear(11); } /** * Get value * * @return string */ public function getResourceName(){ return $this->_get(11); } /** * Set value * * @param string $value * @return \google\cloud\audit\AuditLog */ public function setResourceName( $value){ return $this->_set(11, $value); } /** * Check if has a value * * @return boolean */ public function hasNumResponseItems(){ return $this->_has(12); } /** * Clear value * * @return \google\cloud\audit\AuditLog */ public function clearNumResponseItems(){ return $this->_clear(12); } /** * Get value * * @return int */ public function getNumResponseItems(){ return $this->_get(12); } /** * Set value * * @param int $value * @return \google\cloud\audit\AuditLog */ public function setNumResponseItems( $value){ return $this->_set(12, $value); } /** * Check if has a value * * @return boolean */ public function hasStatus(){ return $this->_has(2); } /** * Clear value * * @return \google\cloud\audit\AuditLog */ public function clearStatus(){ return $this->_clear(2); } /** * Get value * * @return \google\rpc\Status */ public function getStatus(){ return $this->_get(2); } /** * Set value * * @param \google\rpc\Status $value * @return \google\cloud\audit\AuditLog */ public function setStatus(\google\rpc\Status $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasAuthenticationInfo(){ return $this->_has(3); } /** * Clear value * * @return \google\cloud\audit\AuditLog */ public function clearAuthenticationInfo(){ return $this->_clear(3); } /** * Get value * * @return \google\cloud\audit\AuthenticationInfo */ public function getAuthenticationInfo(){ return $this->_get(3); } /** * Set value * * @param \google\cloud\audit\AuthenticationInfo $value * @return \google\cloud\audit\AuditLog */ public function setAuthenticationInfo(\google\cloud\audit\AuthenticationInfo $value){ return $this->_set(3, $value); } /** * Check if has a value * * @return boolean */ public function hasAuthorizationInfo(){ return $this->_has(9); } /** * Clear value * * @return \google\cloud\audit\AuditLog */ public function clearAuthorizationInfo(){ return $this->_clear(9); } /** * Get value * * @param int $idx * @return \google\cloud\audit\AuthorizationInfo */ public function getAuthorizationInfo($idx = NULL){ return $this->_get(9, $idx); } /** * Set value * * @param \google\cloud\audit\AuthorizationInfo $value * @return \google\cloud\audit\AuditLog */ public function setAuthorizationInfo(\google\cloud\audit\AuthorizationInfo $value, $idx = NULL){ return $this->_set(9, $value, $idx); } /** * Get all elements of * * @return \google\cloud\audit\AuthorizationInfo[] */ public function getAuthorizationInfoList(){ return $this->_get(9); } /** * Add a new element to * * @param \google\cloud\audit\AuthorizationInfo $value * @return \google\cloud\audit\AuditLog */ public function addAuthorizationInfo(\google\cloud\audit\AuthorizationInfo $value){ return $this->_add(9, $value); } /** * Check if has a value * * @return boolean */ public function hasRequestMetadata(){ return $this->_has(4); } /** * Clear value * * @return \google\cloud\audit\AuditLog */ public function clearRequestMetadata(){ return $this->_clear(4); } /** * Get value * * @return \google\cloud\audit\RequestMetadata */ public function getRequestMetadata(){ return $this->_get(4); } /** * Set value * * @param \google\cloud\audit\RequestMetadata $value * @return \google\cloud\audit\AuditLog */ public function setRequestMetadata(\google\cloud\audit\RequestMetadata $value){ return $this->_set(4, $value); } /** * Check if has a value * * @return boolean */ public function hasRequest(){ return $this->_has(16); } /** * Clear value * * @return \google\cloud\audit\AuditLog */ public function clearRequest(){ return $this->_clear(16); } /** * Get value * * @return \google\protobuf\Struct */ public function getRequest(){ return $this->_get(16); } /** * Set value * * @param \google\protobuf\Struct $value * @return \google\cloud\audit\AuditLog */ public function setRequest(\google\protobuf\Struct $value){ return $this->_set(16, $value); } /** * Check if has a value * * @return boolean */ public function hasResponse(){ return $this->_has(17); } /** * Clear value * * @return \google\cloud\audit\AuditLog */ public function clearResponse(){ return $this->_clear(17); } /** * Get value * * @return \google\protobuf\Struct */ public function getResponse(){ return $this->_get(17); } /** * Set value * * @param \google\protobuf\Struct $value * @return \google\cloud\audit\AuditLog */ public function setResponse(\google\protobuf\Struct $value){ return $this->_set(17, $value); } /** * Check if has a value * * @return boolean */ public function hasServiceData(){ return $this->_has(15); } /** * Clear value * * @return \google\cloud\audit\AuditLog */ public function clearServiceData(){ return $this->_clear(15); } /** * Get value * * @return \google\protobuf\Any */ public function getServiceData(){ return $this->_get(15); } /** * Set value * * @param \google\protobuf\Any $value * @return \google\cloud\audit\AuditLog */ public function setServiceData(\google\protobuf\Any $value){ return $this->_set(15, $value); } } } namespace google\cloud\audit { class AuthenticationInfo extends \DrSlump\Protobuf\Message { /** @var string */ public $principal_email = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.cloud.audit.AuthenticationInfo'); // OPTIONAL STRING principal_email = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "principal_email"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasPrincipalEmail(){ return $this->_has(1); } /** * Clear value * * @return \google\cloud\audit\AuthenticationInfo */ public function clearPrincipalEmail(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getPrincipalEmail(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\cloud\audit\AuthenticationInfo */ public function setPrincipalEmail( $value){ return $this->_set(1, $value); } } } namespace google\cloud\audit { class AuthorizationInfo extends \DrSlump\Protobuf\Message { /** @var string */ public $resource = null; /** @var string */ public $permission = null; /** @var boolean */ public $granted = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.cloud.audit.AuthorizationInfo'); // OPTIONAL STRING resource = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "resource"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING permission = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "permission"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL BOOL granted = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "granted"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasResource(){ return $this->_has(1); } /** * Clear value * * @return \google\cloud\audit\AuthorizationInfo */ public function clearResource(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getResource(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\cloud\audit\AuthorizationInfo */ public function setResource( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasPermission(){ return $this->_has(2); } /** * Clear value * * @return \google\cloud\audit\AuthorizationInfo */ public function clearPermission(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getPermission(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\cloud\audit\AuthorizationInfo */ public function setPermission( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasGranted(){ return $this->_has(3); } /** * Clear value * * @return \google\cloud\audit\AuthorizationInfo */ public function clearGranted(){ return $this->_clear(3); } /** * Get value * * @return boolean */ public function getGranted(){ return $this->_get(3); } /** * Set value * * @param boolean $value * @return \google\cloud\audit\AuthorizationInfo */ public function setGranted( $value){ return $this->_set(3, $value); } } } namespace google\cloud\audit { class RequestMetadata extends \DrSlump\Protobuf\Message { /** @var string */ public $caller_ip = null; /** @var string */ public $caller_supplied_user_agent = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.cloud.audit.RequestMetadata'); // OPTIONAL STRING caller_ip = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "caller_ip"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING caller_supplied_user_agent = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "caller_supplied_user_agent"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasCallerIp(){ return $this->_has(1); } /** * Clear value * * @return \google\cloud\audit\RequestMetadata */ public function clearCallerIp(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getCallerIp(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\cloud\audit\RequestMetadata */ public function setCallerIp( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasCallerSuppliedUserAgent(){ return $this->_has(2); } /** * Clear value * * @return \google\cloud\audit\RequestMetadata */ public function clearCallerSuppliedUserAgent(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getCallerSuppliedUserAgent(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\cloud\audit\RequestMetadata */ public function setCallerSuppliedUserAgent( $value){ return $this->_set(2, $value); } } } src/generated/auth.php000064400000041302151742741340010753 0ustar00number = 3; $f->name = "rules"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\AuthenticationRule'; $descriptor->addField($f); // REPEATED MESSAGE providers = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "providers"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\AuthProvider'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasRules(){ return $this->_has(3); } /** * Clear value * * @return \google\api\Authentication */ public function clearRules(){ return $this->_clear(3); } /** * Get value * * @param int $idx * @return \google\api\AuthenticationRule */ public function getRules($idx = NULL){ return $this->_get(3, $idx); } /** * Set value * * @param \google\api\AuthenticationRule $value * @return \google\api\Authentication */ public function setRules(\google\api\AuthenticationRule $value, $idx = NULL){ return $this->_set(3, $value, $idx); } /** * Get all elements of * * @return \google\api\AuthenticationRule[] */ public function getRulesList(){ return $this->_get(3); } /** * Add a new element to * * @param \google\api\AuthenticationRule $value * @return \google\api\Authentication */ public function addRules(\google\api\AuthenticationRule $value){ return $this->_add(3, $value); } /** * Check if has a value * * @return boolean */ public function hasProviders(){ return $this->_has(4); } /** * Clear value * * @return \google\api\Authentication */ public function clearProviders(){ return $this->_clear(4); } /** * Get value * * @param int $idx * @return \google\api\AuthProvider */ public function getProviders($idx = NULL){ return $this->_get(4, $idx); } /** * Set value * * @param \google\api\AuthProvider $value * @return \google\api\Authentication */ public function setProviders(\google\api\AuthProvider $value, $idx = NULL){ return $this->_set(4, $value, $idx); } /** * Get all elements of * * @return \google\api\AuthProvider[] */ public function getProvidersList(){ return $this->_get(4); } /** * Add a new element to * * @param \google\api\AuthProvider $value * @return \google\api\Authentication */ public function addProviders(\google\api\AuthProvider $value){ return $this->_add(4, $value); } } } namespace google\api { class AuthenticationRule extends \DrSlump\Protobuf\Message { /** @var string */ public $selector = null; /** @var \google\api\OAuthRequirements */ public $oauth = null; /** @var boolean */ public $allow_without_credential = null; /** @var \google\api\AuthRequirement[] */ public $requirements = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.AuthenticationRule'); // OPTIONAL STRING selector = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "selector"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE oauth = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "oauth"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\OAuthRequirements'; $descriptor->addField($f); // OPTIONAL BOOL allow_without_credential = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "allow_without_credential"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE requirements = 7 $f = new \DrSlump\Protobuf\Field(); $f->number = 7; $f->name = "requirements"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\AuthRequirement'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasSelector(){ return $this->_has(1); } /** * Clear value * * @return \google\api\AuthenticationRule */ public function clearSelector(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getSelector(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\AuthenticationRule */ public function setSelector( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasOauth(){ return $this->_has(2); } /** * Clear value * * @return \google\api\AuthenticationRule */ public function clearOauth(){ return $this->_clear(2); } /** * Get value * * @return \google\api\OAuthRequirements */ public function getOauth(){ return $this->_get(2); } /** * Set value * * @param \google\api\OAuthRequirements $value * @return \google\api\AuthenticationRule */ public function setOauth(\google\api\OAuthRequirements $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasAllowWithoutCredential(){ return $this->_has(5); } /** * Clear value * * @return \google\api\AuthenticationRule */ public function clearAllowWithoutCredential(){ return $this->_clear(5); } /** * Get value * * @return boolean */ public function getAllowWithoutCredential(){ return $this->_get(5); } /** * Set value * * @param boolean $value * @return \google\api\AuthenticationRule */ public function setAllowWithoutCredential( $value){ return $this->_set(5, $value); } /** * Check if has a value * * @return boolean */ public function hasRequirements(){ return $this->_has(7); } /** * Clear value * * @return \google\api\AuthenticationRule */ public function clearRequirements(){ return $this->_clear(7); } /** * Get value * * @param int $idx * @return \google\api\AuthRequirement */ public function getRequirements($idx = NULL){ return $this->_get(7, $idx); } /** * Set value * * @param \google\api\AuthRequirement $value * @return \google\api\AuthenticationRule */ public function setRequirements(\google\api\AuthRequirement $value, $idx = NULL){ return $this->_set(7, $value, $idx); } /** * Get all elements of * * @return \google\api\AuthRequirement[] */ public function getRequirementsList(){ return $this->_get(7); } /** * Add a new element to * * @param \google\api\AuthRequirement $value * @return \google\api\AuthenticationRule */ public function addRequirements(\google\api\AuthRequirement $value){ return $this->_add(7, $value); } } } namespace google\api { class AuthProvider extends \DrSlump\Protobuf\Message { /** @var string */ public $id = null; /** @var string */ public $issuer = null; /** @var string */ public $jwks_uri = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.AuthProvider'); // OPTIONAL STRING id = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "id"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING issuer = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "issuer"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING jwks_uri = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "jwks_uri"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasId(){ return $this->_has(1); } /** * Clear value * * @return \google\api\AuthProvider */ public function clearId(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getId(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\AuthProvider */ public function setId( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasIssuer(){ return $this->_has(2); } /** * Clear value * * @return \google\api\AuthProvider */ public function clearIssuer(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getIssuer(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\api\AuthProvider */ public function setIssuer( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasJwksUri(){ return $this->_has(3); } /** * Clear value * * @return \google\api\AuthProvider */ public function clearJwksUri(){ return $this->_clear(3); } /** * Get value * * @return string */ public function getJwksUri(){ return $this->_get(3); } /** * Set value * * @param string $value * @return \google\api\AuthProvider */ public function setJwksUri( $value){ return $this->_set(3, $value); } } } namespace google\api { class OAuthRequirements extends \DrSlump\Protobuf\Message { /** @var string */ public $canonical_scopes = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.OAuthRequirements'); // OPTIONAL STRING canonical_scopes = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "canonical_scopes"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasCanonicalScopes(){ return $this->_has(1); } /** * Clear value * * @return \google\api\OAuthRequirements */ public function clearCanonicalScopes(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getCanonicalScopes(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\OAuthRequirements */ public function setCanonicalScopes( $value){ return $this->_set(1, $value); } } } namespace google\api { class AuthRequirement extends \DrSlump\Protobuf\Message { /** @var string */ public $provider_id = null; /** @var string */ public $audiences = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.AuthRequirement'); // OPTIONAL STRING provider_id = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "provider_id"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING audiences = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "audiences"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasProviderId(){ return $this->_has(1); } /** * Clear value * * @return \google\api\AuthRequirement */ public function clearProviderId(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getProviderId(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\AuthRequirement */ public function setProviderId( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasAudiences(){ return $this->_has(2); } /** * Clear value * * @return \google\api\AuthRequirement */ public function clearAudiences(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getAudiences(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\api\AuthRequirement */ public function setAudiences( $value){ return $this->_set(2, $value); } } } src/generated/backend.php000064400000013021151742741340011376 0ustar00number = 1; $f->name = "rules"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\BackendRule'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasRules(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Backend */ public function clearRules(){ return $this->_clear(1); } /** * Get value * * @param int $idx * @return \google\api\BackendRule */ public function getRules($idx = NULL){ return $this->_get(1, $idx); } /** * Set value * * @param \google\api\BackendRule $value * @return \google\api\Backend */ public function setRules(\google\api\BackendRule $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of * * @return \google\api\BackendRule[] */ public function getRulesList(){ return $this->_get(1); } /** * Add a new element to * * @param \google\api\BackendRule $value * @return \google\api\Backend */ public function addRules(\google\api\BackendRule $value){ return $this->_add(1, $value); } } } namespace google\api { class BackendRule extends \DrSlump\Protobuf\Message { /** @var string */ public $selector = null; /** @var string */ public $address = null; /** @var float */ public $deadline = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.BackendRule'); // OPTIONAL STRING selector = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "selector"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING address = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "address"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL DOUBLE deadline = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "deadline"; $f->type = \DrSlump\Protobuf::TYPE_DOUBLE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasSelector(){ return $this->_has(1); } /** * Clear value * * @return \google\api\BackendRule */ public function clearSelector(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getSelector(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\BackendRule */ public function setSelector( $value){ return $this->_set(1, $value); } /** * Check if
has a value * * @return boolean */ public function hasAddress(){ return $this->_has(2); } /** * Clear
value * * @return \google\api\BackendRule */ public function clearAddress(){ return $this->_clear(2); } /** * Get
value * * @return string */ public function getAddress(){ return $this->_get(2); } /** * Set
value * * @param string $value * @return \google\api\BackendRule */ public function setAddress( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasDeadline(){ return $this->_has(3); } /** * Clear value * * @return \google\api\BackendRule */ public function clearDeadline(){ return $this->_clear(3); } /** * Get value * * @return float */ public function getDeadline(){ return $this->_get(3); } /** * Set value * * @param float $value * @return \google\api\BackendRule */ public function setDeadline( $value){ return $this->_set(3, $value); } } } src/generated/billing.php000064400000015114151742741340011434 0ustar00number = 1; $f->name = "metrics"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); // REPEATED MESSAGE rules = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "rules"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\BillingStatusRule'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasMetrics(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Billing */ public function clearMetrics(){ return $this->_clear(1); } /** * Get value * * @param int $idx * @return string */ public function getMetrics($idx = NULL){ return $this->_get(1, $idx); } /** * Set value * * @param string $value * @return \google\api\Billing */ public function setMetrics( $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of * * @return string[] */ public function getMetricsList(){ return $this->_get(1); } /** * Add a new element to * * @param string $value * @return \google\api\Billing */ public function addMetrics( $value){ return $this->_add(1, $value); } /** * Check if has a value * * @return boolean */ public function hasRules(){ return $this->_has(5); } /** * Clear value * * @return \google\api\Billing */ public function clearRules(){ return $this->_clear(5); } /** * Get value * * @param int $idx * @return \google\api\BillingStatusRule */ public function getRules($idx = NULL){ return $this->_get(5, $idx); } /** * Set value * * @param \google\api\BillingStatusRule $value * @return \google\api\Billing */ public function setRules(\google\api\BillingStatusRule $value, $idx = NULL){ return $this->_set(5, $value, $idx); } /** * Get all elements of * * @return \google\api\BillingStatusRule[] */ public function getRulesList(){ return $this->_get(5); } /** * Add a new element to * * @param \google\api\BillingStatusRule $value * @return \google\api\Billing */ public function addRules(\google\api\BillingStatusRule $value){ return $this->_add(5, $value); } } } namespace google\api { class BillingStatusRule extends \DrSlump\Protobuf\Message { /** @var string */ public $selector = null; /** @var string[] */ public $allowed_statuses = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.BillingStatusRule'); // OPTIONAL STRING selector = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "selector"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED STRING allowed_statuses = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "allowed_statuses"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasSelector(){ return $this->_has(1); } /** * Clear value * * @return \google\api\BillingStatusRule */ public function clearSelector(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getSelector(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\BillingStatusRule */ public function setSelector( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasAllowedStatuses(){ return $this->_has(2); } /** * Clear value * * @return \google\api\BillingStatusRule */ public function clearAllowedStatuses(){ return $this->_clear(2); } /** * Get value * * @param int $idx * @return string */ public function getAllowedStatuses($idx = NULL){ return $this->_get(2, $idx); } /** * Set value * * @param string $value * @return \google\api\BillingStatusRule */ public function setAllowedStatuses( $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of * * @return string[] */ public function getAllowedStatusesList(){ return $this->_get(2); } /** * Add a new element to * * @param string $value * @return \google\api\BillingStatusRule */ public function addAllowedStatuses( $value){ return $this->_add(2, $value); } } } src/generated/code.php000064400000001261151742741340010724 0ustar00number = 1; $f->name = "red"; $f->type = \DrSlump\Protobuf::TYPE_FLOAT; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL FLOAT green = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "green"; $f->type = \DrSlump\Protobuf::TYPE_FLOAT; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL FLOAT blue = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "blue"; $f->type = \DrSlump\Protobuf::TYPE_FLOAT; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE alpha = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "alpha"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\FloatValue'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasRed(){ return $this->_has(1); } /** * Clear value * * @return \google\type\Color */ public function clearRed(){ return $this->_clear(1); } /** * Get value * * @return float */ public function getRed(){ return $this->_get(1); } /** * Set value * * @param float $value * @return \google\type\Color */ public function setRed( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasGreen(){ return $this->_has(2); } /** * Clear value * * @return \google\type\Color */ public function clearGreen(){ return $this->_clear(2); } /** * Get value * * @return float */ public function getGreen(){ return $this->_get(2); } /** * Set value * * @param float $value * @return \google\type\Color */ public function setGreen( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasBlue(){ return $this->_has(3); } /** * Clear value * * @return \google\type\Color */ public function clearBlue(){ return $this->_clear(3); } /** * Get value * * @return float */ public function getBlue(){ return $this->_get(3); } /** * Set value * * @param float $value * @return \google\type\Color */ public function setBlue( $value){ return $this->_set(3, $value); } /** * Check if has a value * * @return boolean */ public function hasAlpha(){ return $this->_has(4); } /** * Clear value * * @return \google\type\Color */ public function clearAlpha(){ return $this->_clear(4); } /** * Get value * * @return \google\protobuf\FloatValue */ public function getAlpha(){ return $this->_get(4); } /** * Set value * * @param \google\protobuf\FloatValue $value * @return \google\type\Color */ public function setAlpha(\google\protobuf\FloatValue $value){ return $this->_set(4, $value); } } } src/generated/config_change.php000064400000017634151742741340012577 0ustar00number = 1; $f->name = "element"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING old_value = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "old_value"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING new_value = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "new_value"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL ENUM change_type = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "change_type"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\ChangeType'; $descriptor->addField($f); // REPEATED MESSAGE advices = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "advices"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\Advice'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasElement(){ return $this->_has(1); } /** * Clear value * * @return \google\api\ConfigChange */ public function clearElement(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getElement(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\ConfigChange */ public function setElement( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasOldValue(){ return $this->_has(2); } /** * Clear value * * @return \google\api\ConfigChange */ public function clearOldValue(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getOldValue(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\api\ConfigChange */ public function setOldValue( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasNewValue(){ return $this->_has(3); } /** * Clear value * * @return \google\api\ConfigChange */ public function clearNewValue(){ return $this->_clear(3); } /** * Get value * * @return string */ public function getNewValue(){ return $this->_get(3); } /** * Set value * * @param string $value * @return \google\api\ConfigChange */ public function setNewValue( $value){ return $this->_set(3, $value); } /** * Check if has a value * * @return boolean */ public function hasChangeType(){ return $this->_has(4); } /** * Clear value * * @return \google\api\ConfigChange */ public function clearChangeType(){ return $this->_clear(4); } /** * Get value * * @return int - \google\api\ChangeType */ public function getChangeType(){ return $this->_get(4); } /** * Set value * * @param int - \google\api\ChangeType $value * @return \google\api\ConfigChange */ public function setChangeType( $value){ return $this->_set(4, $value); } /** * Check if has a value * * @return boolean */ public function hasAdvices(){ return $this->_has(5); } /** * Clear value * * @return \google\api\ConfigChange */ public function clearAdvices(){ return $this->_clear(5); } /** * Get value * * @param int $idx * @return \google\api\Advice */ public function getAdvices($idx = NULL){ return $this->_get(5, $idx); } /** * Set value * * @param \google\api\Advice $value * @return \google\api\ConfigChange */ public function setAdvices(\google\api\Advice $value, $idx = NULL){ return $this->_set(5, $value, $idx); } /** * Get all elements of * * @return \google\api\Advice[] */ public function getAdvicesList(){ return $this->_get(5); } /** * Add a new element to * * @param \google\api\Advice $value * @return \google\api\ConfigChange */ public function addAdvices(\google\api\Advice $value){ return $this->_add(5, $value); } } } namespace google\api { class Advice extends \DrSlump\Protobuf\Message { /** @var string */ public $description = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.Advice'); // OPTIONAL STRING description = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "description"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasDescription(){ return $this->_has(2); } /** * Clear value * * @return \google\api\Advice */ public function clearDescription(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getDescription(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\api\Advice */ public function setDescription( $value){ return $this->_set(2, $value); } } } src/generated/consumer.php000064400000013635151742741340011655 0ustar00number = 1; $f->name = "properties"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\Property'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasProperties(){ return $this->_has(1); } /** * Clear value * * @return \google\api\ProjectProperties */ public function clearProperties(){ return $this->_clear(1); } /** * Get value * * @param int $idx * @return \google\api\Property */ public function getProperties($idx = NULL){ return $this->_get(1, $idx); } /** * Set value * * @param \google\api\Property $value * @return \google\api\ProjectProperties */ public function setProperties(\google\api\Property $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of * * @return \google\api\Property[] */ public function getPropertiesList(){ return $this->_get(1); } /** * Add a new element to * * @param \google\api\Property $value * @return \google\api\ProjectProperties */ public function addProperties(\google\api\Property $value){ return $this->_add(1, $value); } } } namespace google\api\Property { class PropertyType extends \DrSlump\Protobuf\Enum { const UNSPECIFIED = 0; const INT64 = 1; const BOOL = 2; const STRING = 3; const DOUBLE = 4; } } namespace google\api { class Property extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var int - \google\api\Property\PropertyType */ public $type = null; /** @var string */ public $description = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.Property'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL ENUM type = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "type"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\Property\PropertyType'; $descriptor->addField($f); // OPTIONAL STRING description = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "description"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Property */ public function clearName(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\Property */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasType(){ return $this->_has(2); } /** * Clear value * * @return \google\api\Property */ public function clearType(){ return $this->_clear(2); } /** * Get value * * @return int - \google\api\Property\PropertyType */ public function getType(){ return $this->_get(2); } /** * Set value * * @param int - \google\api\Property\PropertyType $value * @return \google\api\Property */ public function setType( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasDescription(){ return $this->_has(3); } /** * Clear value * * @return \google\api\Property */ public function clearDescription(){ return $this->_clear(3); } /** * Get value * * @return string */ public function getDescription(){ return $this->_get(3); } /** * Set value * * @param string $value * @return \google\api\Property */ public function setDescription( $value){ return $this->_set(3, $value); } } } src/generated/context.php000064400000014652151742741340011506 0ustar00number = 1; $f->name = "rules"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\ContextRule'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasRules(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Context */ public function clearRules(){ return $this->_clear(1); } /** * Get value * * @param int $idx * @return \google\api\ContextRule */ public function getRules($idx = NULL){ return $this->_get(1, $idx); } /** * Set value * * @param \google\api\ContextRule $value * @return \google\api\Context */ public function setRules(\google\api\ContextRule $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of * * @return \google\api\ContextRule[] */ public function getRulesList(){ return $this->_get(1); } /** * Add a new element to * * @param \google\api\ContextRule $value * @return \google\api\Context */ public function addRules(\google\api\ContextRule $value){ return $this->_add(1, $value); } } } namespace google\api { class ContextRule extends \DrSlump\Protobuf\Message { /** @var string */ public $selector = null; /** @var string[] */ public $requested = array(); /** @var string[] */ public $provided = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.ContextRule'); // OPTIONAL STRING selector = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "selector"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED STRING requested = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "requested"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); // REPEATED STRING provided = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "provided"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasSelector(){ return $this->_has(1); } /** * Clear value * * @return \google\api\ContextRule */ public function clearSelector(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getSelector(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\ContextRule */ public function setSelector( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasRequested(){ return $this->_has(2); } /** * Clear value * * @return \google\api\ContextRule */ public function clearRequested(){ return $this->_clear(2); } /** * Get value * * @param int $idx * @return string */ public function getRequested($idx = NULL){ return $this->_get(2, $idx); } /** * Set value * * @param string $value * @return \google\api\ContextRule */ public function setRequested( $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of * * @return string[] */ public function getRequestedList(){ return $this->_get(2); } /** * Add a new element to * * @param string $value * @return \google\api\ContextRule */ public function addRequested( $value){ return $this->_add(2, $value); } /** * Check if has a value * * @return boolean */ public function hasProvided(){ return $this->_has(3); } /** * Clear value * * @return \google\api\ContextRule */ public function clearProvided(){ return $this->_clear(3); } /** * Get value * * @param int $idx * @return string */ public function getProvided($idx = NULL){ return $this->_get(3, $idx); } /** * Set value * * @param string $value * @return \google\api\ContextRule */ public function setProvided( $value, $idx = NULL){ return $this->_set(3, $value, $idx); } /** * Get all elements of * * @return string[] */ public function getProvidedList(){ return $this->_get(3); } /** * Add a new element to * * @param string $value * @return \google\api\ContextRule */ public function addProvided( $value){ return $this->_add(3, $value); } } } src/generated/control.php000064400000003106151742741340011472 0ustar00number = 1; $f->name = "environment"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasEnvironment(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Control */ public function clearEnvironment(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getEnvironment(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\Control */ public function setEnvironment( $value){ return $this->_set(1, $value); } } } src/generated/date.php000064400000006546151742741340010742 0ustar00number = 1; $f->name = "year"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 month = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "month"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 day = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "day"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasYear(){ return $this->_has(1); } /** * Clear value * * @return \google\type\Date */ public function clearYear(){ return $this->_clear(1); } /** * Get value * * @return int */ public function getYear(){ return $this->_get(1); } /** * Set value * * @param int $value * @return \google\type\Date */ public function setYear( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasMonth(){ return $this->_has(2); } /** * Clear value * * @return \google\type\Date */ public function clearMonth(){ return $this->_clear(2); } /** * Get value * * @return int */ public function getMonth(){ return $this->_get(2); } /** * Set value * * @param int $value * @return \google\type\Date */ public function setMonth( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasDay(){ return $this->_has(3); } /** * Clear value * * @return \google\type\Date */ public function clearDay(){ return $this->_clear(3); } /** * Get value * * @return int */ public function getDay(){ return $this->_get(3); } /** * Set value * * @param int $value * @return \google\type\Date */ public function setDay( $value){ return $this->_set(3, $value); } } } src/generated/dayofweek.php000064400000000644151742741340011774 0ustar00number = 1; $f->name = "min"; $f->type = \DrSlump\Protobuf::TYPE_DOUBLE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL DOUBLE max = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "max"; $f->type = \DrSlump\Protobuf::TYPE_DOUBLE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasMin(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Distribution\Range */ public function clearMin(){ return $this->_clear(1); } /** * Get value * * @return float */ public function getMin(){ return $this->_get(1); } /** * Set value * * @param float $value * @return \google\api\Distribution\Range */ public function setMin( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasMax(){ return $this->_has(2); } /** * Clear value * * @return \google\api\Distribution\Range */ public function clearMax(){ return $this->_clear(2); } /** * Get value * * @return float */ public function getMax(){ return $this->_get(2); } /** * Set value * * @param float $value * @return \google\api\Distribution\Range */ public function setMax( $value){ return $this->_set(2, $value); } } } namespace google\api\Distribution\BucketOptions { class Linear extends \DrSlump\Protobuf\Message { /** @var int */ public $num_finite_buckets = null; /** @var float */ public $width = null; /** @var float */ public $offset = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.Distribution.BucketOptions.Linear'); // OPTIONAL INT32 num_finite_buckets = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "num_finite_buckets"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL DOUBLE width = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "width"; $f->type = \DrSlump\Protobuf::TYPE_DOUBLE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL DOUBLE offset = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "offset"; $f->type = \DrSlump\Protobuf::TYPE_DOUBLE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasNumFiniteBuckets(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Distribution\BucketOptions\Linear */ public function clearNumFiniteBuckets(){ return $this->_clear(1); } /** * Get value * * @return int */ public function getNumFiniteBuckets(){ return $this->_get(1); } /** * Set value * * @param int $value * @return \google\api\Distribution\BucketOptions\Linear */ public function setNumFiniteBuckets( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasWidth(){ return $this->_has(2); } /** * Clear value * * @return \google\api\Distribution\BucketOptions\Linear */ public function clearWidth(){ return $this->_clear(2); } /** * Get value * * @return float */ public function getWidth(){ return $this->_get(2); } /** * Set value * * @param float $value * @return \google\api\Distribution\BucketOptions\Linear */ public function setWidth( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasOffset(){ return $this->_has(3); } /** * Clear value * * @return \google\api\Distribution\BucketOptions\Linear */ public function clearOffset(){ return $this->_clear(3); } /** * Get value * * @return float */ public function getOffset(){ return $this->_get(3); } /** * Set value * * @param float $value * @return \google\api\Distribution\BucketOptions\Linear */ public function setOffset( $value){ return $this->_set(3, $value); } } } namespace google\api\Distribution\BucketOptions { class Exponential extends \DrSlump\Protobuf\Message { /** @var int */ public $num_finite_buckets = null; /** @var float */ public $growth_factor = null; /** @var float */ public $scale = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.Distribution.BucketOptions.Exponential'); // OPTIONAL INT32 num_finite_buckets = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "num_finite_buckets"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL DOUBLE growth_factor = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "growth_factor"; $f->type = \DrSlump\Protobuf::TYPE_DOUBLE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL DOUBLE scale = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "scale"; $f->type = \DrSlump\Protobuf::TYPE_DOUBLE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasNumFiniteBuckets(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Distribution\BucketOptions\Exponential */ public function clearNumFiniteBuckets(){ return $this->_clear(1); } /** * Get value * * @return int */ public function getNumFiniteBuckets(){ return $this->_get(1); } /** * Set value * * @param int $value * @return \google\api\Distribution\BucketOptions\Exponential */ public function setNumFiniteBuckets( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasGrowthFactor(){ return $this->_has(2); } /** * Clear value * * @return \google\api\Distribution\BucketOptions\Exponential */ public function clearGrowthFactor(){ return $this->_clear(2); } /** * Get value * * @return float */ public function getGrowthFactor(){ return $this->_get(2); } /** * Set value * * @param float $value * @return \google\api\Distribution\BucketOptions\Exponential */ public function setGrowthFactor( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasScale(){ return $this->_has(3); } /** * Clear value * * @return \google\api\Distribution\BucketOptions\Exponential */ public function clearScale(){ return $this->_clear(3); } /** * Get value * * @return float */ public function getScale(){ return $this->_get(3); } /** * Set value * * @param float $value * @return \google\api\Distribution\BucketOptions\Exponential */ public function setScale( $value){ return $this->_set(3, $value); } } } namespace google\api\Distribution\BucketOptions { class Explicit extends \DrSlump\Protobuf\Message { /** @var float[] */ public $bounds = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.Distribution.BucketOptions.Explicit'); // REPEATED DOUBLE bounds = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "bounds"; $f->type = \DrSlump\Protobuf::TYPE_DOUBLE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasBounds(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Distribution\BucketOptions\Explicit */ public function clearBounds(){ return $this->_clear(1); } /** * Get value * * @param int $idx * @return float */ public function getBounds($idx = NULL){ return $this->_get(1, $idx); } /** * Set value * * @param float $value * @return \google\api\Distribution\BucketOptions\Explicit */ public function setBounds( $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of * * @return float[] */ public function getBoundsList(){ return $this->_get(1); } /** * Add a new element to * * @param float $value * @return \google\api\Distribution\BucketOptions\Explicit */ public function addBounds( $value){ return $this->_add(1, $value); } } } namespace google\api\Distribution { class BucketOptions extends \DrSlump\Protobuf\Message { /** @var \google\api\Distribution\BucketOptions\Linear */ public $linear_buckets = null; /** @var \google\api\Distribution\BucketOptions\Exponential */ public $exponential_buckets = null; /** @var \google\api\Distribution\BucketOptions\Explicit */ public $explicit_buckets = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.Distribution.BucketOptions'); // OPTIONAL MESSAGE linear_buckets = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "linear_buckets"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\Distribution\BucketOptions\Linear'; $descriptor->addField($f); // OPTIONAL MESSAGE exponential_buckets = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "exponential_buckets"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\Distribution\BucketOptions\Exponential'; $descriptor->addField($f); // OPTIONAL MESSAGE explicit_buckets = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "explicit_buckets"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\Distribution\BucketOptions\Explicit'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasLinearBuckets(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Distribution\BucketOptions */ public function clearLinearBuckets(){ return $this->_clear(1); } /** * Get value * * @return \google\api\Distribution\BucketOptions\Linear */ public function getLinearBuckets(){ return $this->_get(1); } /** * Set value * * @param \google\api\Distribution\BucketOptions\Linear $value * @return \google\api\Distribution\BucketOptions */ public function setLinearBuckets(\google\api\Distribution\BucketOptions\Linear $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasExponentialBuckets(){ return $this->_has(2); } /** * Clear value * * @return \google\api\Distribution\BucketOptions */ public function clearExponentialBuckets(){ return $this->_clear(2); } /** * Get value * * @return \google\api\Distribution\BucketOptions\Exponential */ public function getExponentialBuckets(){ return $this->_get(2); } /** * Set value * * @param \google\api\Distribution\BucketOptions\Exponential $value * @return \google\api\Distribution\BucketOptions */ public function setExponentialBuckets(\google\api\Distribution\BucketOptions\Exponential $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasExplicitBuckets(){ return $this->_has(3); } /** * Clear value * * @return \google\api\Distribution\BucketOptions */ public function clearExplicitBuckets(){ return $this->_clear(3); } /** * Get value * * @return \google\api\Distribution\BucketOptions\Explicit */ public function getExplicitBuckets(){ return $this->_get(3); } /** * Set value * * @param \google\api\Distribution\BucketOptions\Explicit $value * @return \google\api\Distribution\BucketOptions */ public function setExplicitBuckets(\google\api\Distribution\BucketOptions\Explicit $value){ return $this->_set(3, $value); } } } namespace google\api { class Distribution extends \DrSlump\Protobuf\Message { /** @var int */ public $count = null; /** @var float */ public $mean = null; /** @var float */ public $sum_of_squared_deviation = null; /** @var \google\api\Distribution\Range */ public $range = null; /** @var \google\api\Distribution\BucketOptions */ public $bucket_options = null; /** @var int[] */ public $bucket_counts = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.Distribution'); // OPTIONAL INT64 count = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "count"; $f->type = \DrSlump\Protobuf::TYPE_INT64; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL DOUBLE mean = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "mean"; $f->type = \DrSlump\Protobuf::TYPE_DOUBLE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL DOUBLE sum_of_squared_deviation = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "sum_of_squared_deviation"; $f->type = \DrSlump\Protobuf::TYPE_DOUBLE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE range = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "range"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\Distribution\Range'; $descriptor->addField($f); // OPTIONAL MESSAGE bucket_options = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "bucket_options"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\Distribution\BucketOptions'; $descriptor->addField($f); // REPEATED INT64 bucket_counts = 7 $f = new \DrSlump\Protobuf\Field(); $f->number = 7; $f->name = "bucket_counts"; $f->type = \DrSlump\Protobuf::TYPE_INT64; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasCount(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Distribution */ public function clearCount(){ return $this->_clear(1); } /** * Get value * * @return int */ public function getCount(){ return $this->_get(1); } /** * Set value * * @param int $value * @return \google\api\Distribution */ public function setCount( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasMean(){ return $this->_has(2); } /** * Clear value * * @return \google\api\Distribution */ public function clearMean(){ return $this->_clear(2); } /** * Get value * * @return float */ public function getMean(){ return $this->_get(2); } /** * Set value * * @param float $value * @return \google\api\Distribution */ public function setMean( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasSumOfSquaredDeviation(){ return $this->_has(3); } /** * Clear value * * @return \google\api\Distribution */ public function clearSumOfSquaredDeviation(){ return $this->_clear(3); } /** * Get value * * @return float */ public function getSumOfSquaredDeviation(){ return $this->_get(3); } /** * Set value * * @param float $value * @return \google\api\Distribution */ public function setSumOfSquaredDeviation( $value){ return $this->_set(3, $value); } /** * Check if has a value * * @return boolean */ public function hasRange(){ return $this->_has(4); } /** * Clear value * * @return \google\api\Distribution */ public function clearRange(){ return $this->_clear(4); } /** * Get value * * @return \google\api\Distribution\Range */ public function getRange(){ return $this->_get(4); } /** * Set value * * @param \google\api\Distribution\Range $value * @return \google\api\Distribution */ public function setRange(\google\api\Distribution\Range $value){ return $this->_set(4, $value); } /** * Check if has a value * * @return boolean */ public function hasBucketOptions(){ return $this->_has(6); } /** * Clear value * * @return \google\api\Distribution */ public function clearBucketOptions(){ return $this->_clear(6); } /** * Get value * * @return \google\api\Distribution\BucketOptions */ public function getBucketOptions(){ return $this->_get(6); } /** * Set value * * @param \google\api\Distribution\BucketOptions $value * @return \google\api\Distribution */ public function setBucketOptions(\google\api\Distribution\BucketOptions $value){ return $this->_set(6, $value); } /** * Check if has a value * * @return boolean */ public function hasBucketCounts(){ return $this->_has(7); } /** * Clear value * * @return \google\api\Distribution */ public function clearBucketCounts(){ return $this->_clear(7); } /** * Get value * * @param int $idx * @return int */ public function getBucketCounts($idx = NULL){ return $this->_get(7, $idx); } /** * Set value * * @param int $value * @return \google\api\Distribution */ public function setBucketCounts( $value, $idx = NULL){ return $this->_set(7, $value, $idx); } /** * Get all elements of * * @return int[] */ public function getBucketCountsList(){ return $this->_get(7); } /** * Add a new element to * * @param int $value * @return \google\api\Distribution */ public function addBucketCounts( $value){ return $this->_add(7, $value); } } } src/generated/documentation.php000064400000034632151742741340012673 0ustar00number = 1; $f->name = "summary"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE pages = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "pages"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\Page'; $descriptor->addField($f); // REPEATED MESSAGE rules = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "rules"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\DocumentationRule'; $descriptor->addField($f); // OPTIONAL STRING documentation_root_url = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "documentation_root_url"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING overview = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "overview"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasSummary(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Documentation */ public function clearSummary(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getSummary(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\Documentation */ public function setSummary( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasPages(){ return $this->_has(5); } /** * Clear value * * @return \google\api\Documentation */ public function clearPages(){ return $this->_clear(5); } /** * Get value * * @param int $idx * @return \google\api\Page */ public function getPages($idx = NULL){ return $this->_get(5, $idx); } /** * Set value * * @param \google\api\Page $value * @return \google\api\Documentation */ public function setPages(\google\api\Page $value, $idx = NULL){ return $this->_set(5, $value, $idx); } /** * Get all elements of * * @return \google\api\Page[] */ public function getPagesList(){ return $this->_get(5); } /** * Add a new element to * * @param \google\api\Page $value * @return \google\api\Documentation */ public function addPages(\google\api\Page $value){ return $this->_add(5, $value); } /** * Check if has a value * * @return boolean */ public function hasRules(){ return $this->_has(3); } /** * Clear value * * @return \google\api\Documentation */ public function clearRules(){ return $this->_clear(3); } /** * Get value * * @param int $idx * @return \google\api\DocumentationRule */ public function getRules($idx = NULL){ return $this->_get(3, $idx); } /** * Set value * * @param \google\api\DocumentationRule $value * @return \google\api\Documentation */ public function setRules(\google\api\DocumentationRule $value, $idx = NULL){ return $this->_set(3, $value, $idx); } /** * Get all elements of * * @return \google\api\DocumentationRule[] */ public function getRulesList(){ return $this->_get(3); } /** * Add a new element to * * @param \google\api\DocumentationRule $value * @return \google\api\Documentation */ public function addRules(\google\api\DocumentationRule $value){ return $this->_add(3, $value); } /** * Check if has a value * * @return boolean */ public function hasDocumentationRootUrl(){ return $this->_has(4); } /** * Clear value * * @return \google\api\Documentation */ public function clearDocumentationRootUrl(){ return $this->_clear(4); } /** * Get value * * @return string */ public function getDocumentationRootUrl(){ return $this->_get(4); } /** * Set value * * @param string $value * @return \google\api\Documentation */ public function setDocumentationRootUrl( $value){ return $this->_set(4, $value); } /** * Check if has a value * * @return boolean */ public function hasOverview(){ return $this->_has(2); } /** * Clear value * * @return \google\api\Documentation */ public function clearOverview(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getOverview(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\api\Documentation */ public function setOverview( $value){ return $this->_set(2, $value); } } } namespace google\api { class DocumentationRule extends \DrSlump\Protobuf\Message { /** @var string */ public $selector = null; /** @var string */ public $description = null; /** @var string */ public $deprecation_description = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.DocumentationRule'); // OPTIONAL STRING selector = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "selector"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING description = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "description"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING deprecation_description = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "deprecation_description"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasSelector(){ return $this->_has(1); } /** * Clear value * * @return \google\api\DocumentationRule */ public function clearSelector(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getSelector(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\DocumentationRule */ public function setSelector( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasDescription(){ return $this->_has(2); } /** * Clear value * * @return \google\api\DocumentationRule */ public function clearDescription(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getDescription(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\api\DocumentationRule */ public function setDescription( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasDeprecationDescription(){ return $this->_has(3); } /** * Clear value * * @return \google\api\DocumentationRule */ public function clearDeprecationDescription(){ return $this->_clear(3); } /** * Get value * * @return string */ public function getDeprecationDescription(){ return $this->_get(3); } /** * Set value * * @param string $value * @return \google\api\DocumentationRule */ public function setDeprecationDescription( $value){ return $this->_set(3, $value); } } } namespace google\api { class Page extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var string */ public $content = null; /** @var \google\api\Page[] */ public $subpages = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.Page'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING content = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "content"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE subpages = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "subpages"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\Page'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Page */ public function clearName(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\Page */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasContent(){ return $this->_has(2); } /** * Clear value * * @return \google\api\Page */ public function clearContent(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getContent(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\api\Page */ public function setContent( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasSubpages(){ return $this->_has(3); } /** * Clear value * * @return \google\api\Page */ public function clearSubpages(){ return $this->_clear(3); } /** * Get value * * @param int $idx * @return \google\api\Page */ public function getSubpages($idx = NULL){ return $this->_get(3, $idx); } /** * Set value * * @param \google\api\Page $value * @return \google\api\Page */ public function setSubpages(\google\api\Page $value, $idx = NULL){ return $this->_set(3, $value, $idx); } /** * Get all elements of * * @return \google\api\Page[] */ public function getSubpagesList(){ return $this->_get(3); } /** * Add a new element to * * @param \google\api\Page $value * @return \google\api\Page */ public function addSubpages(\google\api\Page $value){ return $this->_add(3, $value); } } } src/generated/endpoint.php000064400000015355151742741340011643 0ustar00number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED STRING aliases = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "aliases"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); // REPEATED STRING apis = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "apis"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); // REPEATED STRING features = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "features"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); // OPTIONAL BOOL allow_cors = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "allow_cors"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Endpoint */ public function clearName(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\Endpoint */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasAliases(){ return $this->_has(2); } /** * Clear value * * @return \google\api\Endpoint */ public function clearAliases(){ return $this->_clear(2); } /** * Get value * * @param int $idx * @return string */ public function getAliases($idx = NULL){ return $this->_get(2, $idx); } /** * Set value * * @param string $value * @return \google\api\Endpoint */ public function setAliases( $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of * * @return string[] */ public function getAliasesList(){ return $this->_get(2); } /** * Add a new element to * * @param string $value * @return \google\api\Endpoint */ public function addAliases( $value){ return $this->_add(2, $value); } /** * Check if has a value * * @return boolean */ public function hasApis(){ return $this->_has(3); } /** * Clear value * * @return \google\api\Endpoint */ public function clearApis(){ return $this->_clear(3); } /** * Get value * * @param int $idx * @return string */ public function getApis($idx = NULL){ return $this->_get(3, $idx); } /** * Set value * * @param string $value * @return \google\api\Endpoint */ public function setApis( $value, $idx = NULL){ return $this->_set(3, $value, $idx); } /** * Get all elements of * * @return string[] */ public function getApisList(){ return $this->_get(3); } /** * Add a new element to * * @param string $value * @return \google\api\Endpoint */ public function addApis( $value){ return $this->_add(3, $value); } /** * Check if has a value * * @return boolean */ public function hasFeatures(){ return $this->_has(4); } /** * Clear value * * @return \google\api\Endpoint */ public function clearFeatures(){ return $this->_clear(4); } /** * Get value * * @param int $idx * @return string */ public function getFeatures($idx = NULL){ return $this->_get(4, $idx); } /** * Set value * * @param string $value * @return \google\api\Endpoint */ public function setFeatures( $value, $idx = NULL){ return $this->_set(4, $value, $idx); } /** * Get all elements of * * @return string[] */ public function getFeaturesList(){ return $this->_get(4); } /** * Add a new element to * * @param string $value * @return \google\api\Endpoint */ public function addFeatures( $value){ return $this->_add(4, $value); } /** * Check if has a value * * @return boolean */ public function hasAllowCors(){ return $this->_has(5); } /** * Clear value * * @return \google\api\Endpoint */ public function clearAllowCors(){ return $this->_clear(5); } /** * Get value * * @return boolean */ public function getAllowCors(){ return $this->_get(5); } /** * Set value * * @param boolean $value * @return \google\api\Endpoint */ public function setAllowCors( $value){ return $this->_set(5, $value); } } } src/generated/error_details.php000064400000067465151742741340012672 0ustar00number = 1; $f->name = "retry_delay"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Duration'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasRetryDelay(){ return $this->_has(1); } /** * Clear value * * @return \google\rpc\RetryInfo */ public function clearRetryDelay(){ return $this->_clear(1); } /** * Get value * * @return \google\protobuf\Duration */ public function getRetryDelay(){ return $this->_get(1); } /** * Set value * * @param \google\protobuf\Duration $value * @return \google\rpc\RetryInfo */ public function setRetryDelay(\google\protobuf\Duration $value){ return $this->_set(1, $value); } } } namespace google\rpc { class DebugInfo extends \DrSlump\Protobuf\Message { /** @var string[] */ public $stack_entries = array(); /** @var string */ public $detail = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.rpc.DebugInfo'); // REPEATED STRING stack_entries = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "stack_entries"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); // OPTIONAL STRING detail = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "detail"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasStackEntries(){ return $this->_has(1); } /** * Clear value * * @return \google\rpc\DebugInfo */ public function clearStackEntries(){ return $this->_clear(1); } /** * Get value * * @param int $idx * @return string */ public function getStackEntries($idx = NULL){ return $this->_get(1, $idx); } /** * Set value * * @param string $value * @return \google\rpc\DebugInfo */ public function setStackEntries( $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of * * @return string[] */ public function getStackEntriesList(){ return $this->_get(1); } /** * Add a new element to * * @param string $value * @return \google\rpc\DebugInfo */ public function addStackEntries( $value){ return $this->_add(1, $value); } /** * Check if has a value * * @return boolean */ public function hasDetail(){ return $this->_has(2); } /** * Clear value * * @return \google\rpc\DebugInfo */ public function clearDetail(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getDetail(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\rpc\DebugInfo */ public function setDetail( $value){ return $this->_set(2, $value); } } } namespace google\rpc\QuotaFailure { class Violation extends \DrSlump\Protobuf\Message { /** @var string */ public $subject = null; /** @var string */ public $description = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.rpc.QuotaFailure.Violation'); // OPTIONAL STRING subject = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "subject"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING description = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "description"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasSubject(){ return $this->_has(1); } /** * Clear value * * @return \google\rpc\QuotaFailure\Violation */ public function clearSubject(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getSubject(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\rpc\QuotaFailure\Violation */ public function setSubject( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasDescription(){ return $this->_has(2); } /** * Clear value * * @return \google\rpc\QuotaFailure\Violation */ public function clearDescription(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getDescription(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\rpc\QuotaFailure\Violation */ public function setDescription( $value){ return $this->_set(2, $value); } } } namespace google\rpc { class QuotaFailure extends \DrSlump\Protobuf\Message { /** @var \google\rpc\QuotaFailure\Violation[] */ public $violations = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.rpc.QuotaFailure'); // REPEATED MESSAGE violations = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "violations"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\rpc\QuotaFailure\Violation'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasViolations(){ return $this->_has(1); } /** * Clear value * * @return \google\rpc\QuotaFailure */ public function clearViolations(){ return $this->_clear(1); } /** * Get value * * @param int $idx * @return \google\rpc\QuotaFailure\Violation */ public function getViolations($idx = NULL){ return $this->_get(1, $idx); } /** * Set value * * @param \google\rpc\QuotaFailure\Violation $value * @return \google\rpc\QuotaFailure */ public function setViolations(\google\rpc\QuotaFailure\Violation $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of * * @return \google\rpc\QuotaFailure\Violation[] */ public function getViolationsList(){ return $this->_get(1); } /** * Add a new element to * * @param \google\rpc\QuotaFailure\Violation $value * @return \google\rpc\QuotaFailure */ public function addViolations(\google\rpc\QuotaFailure\Violation $value){ return $this->_add(1, $value); } } } namespace google\rpc\BadRequest { class FieldViolation extends \DrSlump\Protobuf\Message { /** @var string */ public $field = null; /** @var string */ public $description = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.rpc.BadRequest.FieldViolation'); // OPTIONAL STRING field = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "field"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING description = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "description"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasField(){ return $this->_has(1); } /** * Clear value * * @return \google\rpc\BadRequest\FieldViolation */ public function clearField(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getField(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\rpc\BadRequest\FieldViolation */ public function setField( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasDescription(){ return $this->_has(2); } /** * Clear value * * @return \google\rpc\BadRequest\FieldViolation */ public function clearDescription(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getDescription(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\rpc\BadRequest\FieldViolation */ public function setDescription( $value){ return $this->_set(2, $value); } } } namespace google\rpc { class BadRequest extends \DrSlump\Protobuf\Message { /** @var \google\rpc\BadRequest\FieldViolation[] */ public $field_violations = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.rpc.BadRequest'); // REPEATED MESSAGE field_violations = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "field_violations"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\rpc\BadRequest\FieldViolation'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasFieldViolations(){ return $this->_has(1); } /** * Clear value * * @return \google\rpc\BadRequest */ public function clearFieldViolations(){ return $this->_clear(1); } /** * Get value * * @param int $idx * @return \google\rpc\BadRequest\FieldViolation */ public function getFieldViolations($idx = NULL){ return $this->_get(1, $idx); } /** * Set value * * @param \google\rpc\BadRequest\FieldViolation $value * @return \google\rpc\BadRequest */ public function setFieldViolations(\google\rpc\BadRequest\FieldViolation $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of * * @return \google\rpc\BadRequest\FieldViolation[] */ public function getFieldViolationsList(){ return $this->_get(1); } /** * Add a new element to * * @param \google\rpc\BadRequest\FieldViolation $value * @return \google\rpc\BadRequest */ public function addFieldViolations(\google\rpc\BadRequest\FieldViolation $value){ return $this->_add(1, $value); } } } namespace google\rpc { class RequestInfo extends \DrSlump\Protobuf\Message { /** @var string */ public $request_id = null; /** @var string */ public $serving_data = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.rpc.RequestInfo'); // OPTIONAL STRING request_id = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "request_id"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING serving_data = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "serving_data"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasRequestId(){ return $this->_has(1); } /** * Clear value * * @return \google\rpc\RequestInfo */ public function clearRequestId(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getRequestId(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\rpc\RequestInfo */ public function setRequestId( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasServingData(){ return $this->_has(2); } /** * Clear value * * @return \google\rpc\RequestInfo */ public function clearServingData(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getServingData(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\rpc\RequestInfo */ public function setServingData( $value){ return $this->_set(2, $value); } } } namespace google\rpc { class ResourceInfo extends \DrSlump\Protobuf\Message { /** @var string */ public $resource_type = null; /** @var string */ public $resource_name = null; /** @var string */ public $owner = null; /** @var string */ public $description = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.rpc.ResourceInfo'); // OPTIONAL STRING resource_type = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "resource_type"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING resource_name = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "resource_name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING owner = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "owner"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING description = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "description"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasResourceType(){ return $this->_has(1); } /** * Clear value * * @return \google\rpc\ResourceInfo */ public function clearResourceType(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getResourceType(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\rpc\ResourceInfo */ public function setResourceType( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasResourceName(){ return $this->_has(2); } /** * Clear value * * @return \google\rpc\ResourceInfo */ public function clearResourceName(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getResourceName(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\rpc\ResourceInfo */ public function setResourceName( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasOwner(){ return $this->_has(3); } /** * Clear value * * @return \google\rpc\ResourceInfo */ public function clearOwner(){ return $this->_clear(3); } /** * Get value * * @return string */ public function getOwner(){ return $this->_get(3); } /** * Set value * * @param string $value * @return \google\rpc\ResourceInfo */ public function setOwner( $value){ return $this->_set(3, $value); } /** * Check if has a value * * @return boolean */ public function hasDescription(){ return $this->_has(4); } /** * Clear value * * @return \google\rpc\ResourceInfo */ public function clearDescription(){ return $this->_clear(4); } /** * Get value * * @return string */ public function getDescription(){ return $this->_get(4); } /** * Set value * * @param string $value * @return \google\rpc\ResourceInfo */ public function setDescription( $value){ return $this->_set(4, $value); } } } namespace google\rpc\Help { class Link extends \DrSlump\Protobuf\Message { /** @var string */ public $description = null; /** @var string */ public $url = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.rpc.Help.Link'); // OPTIONAL STRING description = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "description"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING url = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "url"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasDescription(){ return $this->_has(1); } /** * Clear value * * @return \google\rpc\Help\Link */ public function clearDescription(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getDescription(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\rpc\Help\Link */ public function setDescription( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasUrl(){ return $this->_has(2); } /** * Clear value * * @return \google\rpc\Help\Link */ public function clearUrl(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getUrl(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\rpc\Help\Link */ public function setUrl( $value){ return $this->_set(2, $value); } } } namespace google\rpc { class Help extends \DrSlump\Protobuf\Message { /** @var \google\rpc\Help\Link[] */ public $links = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.rpc.Help'); // REPEATED MESSAGE links = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "links"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\rpc\Help\Link'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasLinks(){ return $this->_has(1); } /** * Clear value * * @return \google\rpc\Help */ public function clearLinks(){ return $this->_clear(1); } /** * Get value * * @param int $idx * @return \google\rpc\Help\Link */ public function getLinks($idx = NULL){ return $this->_get(1, $idx); } /** * Set value * * @param \google\rpc\Help\Link $value * @return \google\rpc\Help */ public function setLinks(\google\rpc\Help\Link $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of * * @return \google\rpc\Help\Link[] */ public function getLinksList(){ return $this->_get(1); } /** * Add a new element to * * @param \google\rpc\Help\Link $value * @return \google\rpc\Help */ public function addLinks(\google\rpc\Help\Link $value){ return $this->_add(1, $value); } } } namespace google\rpc { class LocalizedMessage extends \DrSlump\Protobuf\Message { /** @var string */ public $locale = null; /** @var string */ public $message = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.rpc.LocalizedMessage'); // OPTIONAL STRING locale = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "locale"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING message = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "message"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasLocale(){ return $this->_has(1); } /** * Clear value * * @return \google\rpc\LocalizedMessage */ public function clearLocale(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getLocale(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\rpc\LocalizedMessage */ public function setLocale( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasMessage(){ return $this->_has(2); } /** * Clear value * * @return \google\rpc\LocalizedMessage */ public function clearMessage(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getMessage(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\rpc\LocalizedMessage */ public function setMessage( $value){ return $this->_set(2, $value); } } } src/generated/http.php000064400000034730151742741340011000 0ustar00number = 1; $f->name = "rules"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\HttpRule'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasRules(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Http */ public function clearRules(){ return $this->_clear(1); } /** * Get value * * @param int $idx * @return \google\api\HttpRule */ public function getRules($idx = NULL){ return $this->_get(1, $idx); } /** * Set value * * @param \google\api\HttpRule $value * @return \google\api\Http */ public function setRules(\google\api\HttpRule $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of * * @return \google\api\HttpRule[] */ public function getRulesList(){ return $this->_get(1); } /** * Add a new element to * * @param \google\api\HttpRule $value * @return \google\api\Http */ public function addRules(\google\api\HttpRule $value){ return $this->_add(1, $value); } } } namespace google\api { class HttpRule extends \DrSlump\Protobuf\Message { /** @var string */ public $selector = null; /** @var string */ public $get = null; /** @var string */ public $put = null; /** @var string */ public $post = null; /** @var string */ public $delete = null; /** @var string */ public $patch = null; /** @var \google\api\CustomHttpPattern */ public $custom = null; /** @var string */ public $body = null; /** @var \google\api\HttpRule[] */ public $additional_bindings = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.HttpRule'); // OPTIONAL STRING selector = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "selector"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING get = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "get"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING put = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "put"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING post = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "post"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING delete = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "delete"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING patch = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "patch"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE custom = 8 $f = new \DrSlump\Protobuf\Field(); $f->number = 8; $f->name = "custom"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\CustomHttpPattern'; $descriptor->addField($f); // OPTIONAL STRING body = 7 $f = new \DrSlump\Protobuf\Field(); $f->number = 7; $f->name = "body"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE additional_bindings = 11 $f = new \DrSlump\Protobuf\Field(); $f->number = 11; $f->name = "additional_bindings"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\HttpRule'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasSelector(){ return $this->_has(1); } /** * Clear value * * @return \google\api\HttpRule */ public function clearSelector(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getSelector(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\HttpRule */ public function setSelector( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasGet(){ return $this->_has(2); } /** * Clear value * * @return \google\api\HttpRule */ public function clearGet(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getGet(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\api\HttpRule */ public function setGet( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasPut(){ return $this->_has(3); } /** * Clear value * * @return \google\api\HttpRule */ public function clearPut(){ return $this->_clear(3); } /** * Get value * * @return string */ public function getPut(){ return $this->_get(3); } /** * Set value * * @param string $value * @return \google\api\HttpRule */ public function setPut( $value){ return $this->_set(3, $value); } /** * Check if has a value * * @return boolean */ public function hasPost(){ return $this->_has(4); } /** * Clear value * * @return \google\api\HttpRule */ public function clearPost(){ return $this->_clear(4); } /** * Get value * * @return string */ public function getPost(){ return $this->_get(4); } /** * Set value * * @param string $value * @return \google\api\HttpRule */ public function setPost( $value){ return $this->_set(4, $value); } /** * Check if has a value * * @return boolean */ public function hasDelete(){ return $this->_has(5); } /** * Clear value * * @return \google\api\HttpRule */ public function clearDelete(){ return $this->_clear(5); } /** * Get value * * @return string */ public function getDelete(){ return $this->_get(5); } /** * Set value * * @param string $value * @return \google\api\HttpRule */ public function setDelete( $value){ return $this->_set(5, $value); } /** * Check if has a value * * @return boolean */ public function hasPatch(){ return $this->_has(6); } /** * Clear value * * @return \google\api\HttpRule */ public function clearPatch(){ return $this->_clear(6); } /** * Get value * * @return string */ public function getPatch(){ return $this->_get(6); } /** * Set value * * @param string $value * @return \google\api\HttpRule */ public function setPatch( $value){ return $this->_set(6, $value); } /** * Check if has a value * * @return boolean */ public function hasCustom(){ return $this->_has(8); } /** * Clear value * * @return \google\api\HttpRule */ public function clearCustom(){ return $this->_clear(8); } /** * Get value * * @return \google\api\CustomHttpPattern */ public function getCustom(){ return $this->_get(8); } /** * Set value * * @param \google\api\CustomHttpPattern $value * @return \google\api\HttpRule */ public function setCustom(\google\api\CustomHttpPattern $value){ return $this->_set(8, $value); } /** * Check if has a value * * @return boolean */ public function hasBody(){ return $this->_has(7); } /** * Clear value * * @return \google\api\HttpRule */ public function clearBody(){ return $this->_clear(7); } /** * Get value * * @return string */ public function getBody(){ return $this->_get(7); } /** * Set value * * @param string $value * @return \google\api\HttpRule */ public function setBody( $value){ return $this->_set(7, $value); } /** * Check if has a value * * @return boolean */ public function hasAdditionalBindings(){ return $this->_has(11); } /** * Clear value * * @return \google\api\HttpRule */ public function clearAdditionalBindings(){ return $this->_clear(11); } /** * Get value * * @param int $idx * @return \google\api\HttpRule */ public function getAdditionalBindings($idx = NULL){ return $this->_get(11, $idx); } /** * Set value * * @param \google\api\HttpRule $value * @return \google\api\HttpRule */ public function setAdditionalBindings(\google\api\HttpRule $value, $idx = NULL){ return $this->_set(11, $value, $idx); } /** * Get all elements of * * @return \google\api\HttpRule[] */ public function getAdditionalBindingsList(){ return $this->_get(11); } /** * Add a new element to * * @param \google\api\HttpRule $value * @return \google\api\HttpRule */ public function addAdditionalBindings(\google\api\HttpRule $value){ return $this->_add(11, $value); } } } namespace google\api { class CustomHttpPattern extends \DrSlump\Protobuf\Message { /** @var string */ public $kind = null; /** @var string */ public $path = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.CustomHttpPattern'); // OPTIONAL STRING kind = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "kind"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING path = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "path"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasKind(){ return $this->_has(1); } /** * Clear value * * @return \google\api\CustomHttpPattern */ public function clearKind(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getKind(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\CustomHttpPattern */ public function setKind( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasPath(){ return $this->_has(2); } /** * Clear value * * @return \google\api\CustomHttpPattern */ public function clearPath(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getPath(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\api\CustomHttpPattern */ public function setPath( $value){ return $this->_set(2, $value); } } } src/generated/http_request.php000064400000037062151742741340012551 0ustar00number = 1; $f->name = "request_method"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING request_url = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "request_url"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT64 request_size = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "request_size"; $f->type = \DrSlump\Protobuf::TYPE_INT64; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 status = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "status"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT64 response_size = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "response_size"; $f->type = \DrSlump\Protobuf::TYPE_INT64; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING user_agent = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "user_agent"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING remote_ip = 7 $f = new \DrSlump\Protobuf\Field(); $f->number = 7; $f->name = "remote_ip"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING server_ip = 13 $f = new \DrSlump\Protobuf\Field(); $f->number = 13; $f->name = "server_ip"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING referer = 8 $f = new \DrSlump\Protobuf\Field(); $f->number = 8; $f->name = "referer"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE latency = 14 $f = new \DrSlump\Protobuf\Field(); $f->number = 14; $f->name = "latency"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Duration'; $descriptor->addField($f); // OPTIONAL BOOL cache_lookup = 11 $f = new \DrSlump\Protobuf\Field(); $f->number = 11; $f->name = "cache_lookup"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL BOOL cache_hit = 9 $f = new \DrSlump\Protobuf\Field(); $f->number = 9; $f->name = "cache_hit"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL BOOL cache_validated_with_origin_server = 10 $f = new \DrSlump\Protobuf\Field(); $f->number = 10; $f->name = "cache_validated_with_origin_server"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT64 cache_fill_bytes = 12 $f = new \DrSlump\Protobuf\Field(); $f->number = 12; $f->name = "cache_fill_bytes"; $f->type = \DrSlump\Protobuf::TYPE_INT64; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasRequestMethod(){ return $this->_has(1); } /** * Clear value * * @return \google\logging\type\HttpRequest */ public function clearRequestMethod(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getRequestMethod(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\logging\type\HttpRequest */ public function setRequestMethod( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasRequestUrl(){ return $this->_has(2); } /** * Clear value * * @return \google\logging\type\HttpRequest */ public function clearRequestUrl(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getRequestUrl(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\logging\type\HttpRequest */ public function setRequestUrl( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasRequestSize(){ return $this->_has(3); } /** * Clear value * * @return \google\logging\type\HttpRequest */ public function clearRequestSize(){ return $this->_clear(3); } /** * Get value * * @return int */ public function getRequestSize(){ return $this->_get(3); } /** * Set value * * @param int $value * @return \google\logging\type\HttpRequest */ public function setRequestSize( $value){ return $this->_set(3, $value); } /** * Check if has a value * * @return boolean */ public function hasStatus(){ return $this->_has(4); } /** * Clear value * * @return \google\logging\type\HttpRequest */ public function clearStatus(){ return $this->_clear(4); } /** * Get value * * @return int */ public function getStatus(){ return $this->_get(4); } /** * Set value * * @param int $value * @return \google\logging\type\HttpRequest */ public function setStatus( $value){ return $this->_set(4, $value); } /** * Check if has a value * * @return boolean */ public function hasResponseSize(){ return $this->_has(5); } /** * Clear value * * @return \google\logging\type\HttpRequest */ public function clearResponseSize(){ return $this->_clear(5); } /** * Get value * * @return int */ public function getResponseSize(){ return $this->_get(5); } /** * Set value * * @param int $value * @return \google\logging\type\HttpRequest */ public function setResponseSize( $value){ return $this->_set(5, $value); } /** * Check if has a value * * @return boolean */ public function hasUserAgent(){ return $this->_has(6); } /** * Clear value * * @return \google\logging\type\HttpRequest */ public function clearUserAgent(){ return $this->_clear(6); } /** * Get value * * @return string */ public function getUserAgent(){ return $this->_get(6); } /** * Set value * * @param string $value * @return \google\logging\type\HttpRequest */ public function setUserAgent( $value){ return $this->_set(6, $value); } /** * Check if has a value * * @return boolean */ public function hasRemoteIp(){ return $this->_has(7); } /** * Clear value * * @return \google\logging\type\HttpRequest */ public function clearRemoteIp(){ return $this->_clear(7); } /** * Get value * * @return string */ public function getRemoteIp(){ return $this->_get(7); } /** * Set value * * @param string $value * @return \google\logging\type\HttpRequest */ public function setRemoteIp( $value){ return $this->_set(7, $value); } /** * Check if has a value * * @return boolean */ public function hasServerIp(){ return $this->_has(13); } /** * Clear value * * @return \google\logging\type\HttpRequest */ public function clearServerIp(){ return $this->_clear(13); } /** * Get value * * @return string */ public function getServerIp(){ return $this->_get(13); } /** * Set value * * @param string $value * @return \google\logging\type\HttpRequest */ public function setServerIp( $value){ return $this->_set(13, $value); } /** * Check if has a value * * @return boolean */ public function hasReferer(){ return $this->_has(8); } /** * Clear value * * @return \google\logging\type\HttpRequest */ public function clearReferer(){ return $this->_clear(8); } /** * Get value * * @return string */ public function getReferer(){ return $this->_get(8); } /** * Set value * * @param string $value * @return \google\logging\type\HttpRequest */ public function setReferer( $value){ return $this->_set(8, $value); } /** * Check if has a value * * @return boolean */ public function hasLatency(){ return $this->_has(14); } /** * Clear value * * @return \google\logging\type\HttpRequest */ public function clearLatency(){ return $this->_clear(14); } /** * Get value * * @return \google\protobuf\Duration */ public function getLatency(){ return $this->_get(14); } /** * Set value * * @param \google\protobuf\Duration $value * @return \google\logging\type\HttpRequest */ public function setLatency(\google\protobuf\Duration $value){ return $this->_set(14, $value); } /** * Check if has a value * * @return boolean */ public function hasCacheLookup(){ return $this->_has(11); } /** * Clear value * * @return \google\logging\type\HttpRequest */ public function clearCacheLookup(){ return $this->_clear(11); } /** * Get value * * @return boolean */ public function getCacheLookup(){ return $this->_get(11); } /** * Set value * * @param boolean $value * @return \google\logging\type\HttpRequest */ public function setCacheLookup( $value){ return $this->_set(11, $value); } /** * Check if has a value * * @return boolean */ public function hasCacheHit(){ return $this->_has(9); } /** * Clear value * * @return \google\logging\type\HttpRequest */ public function clearCacheHit(){ return $this->_clear(9); } /** * Get value * * @return boolean */ public function getCacheHit(){ return $this->_get(9); } /** * Set value * * @param boolean $value * @return \google\logging\type\HttpRequest */ public function setCacheHit( $value){ return $this->_set(9, $value); } /** * Check if has a value * * @return boolean */ public function hasCacheValidatedWithOriginServer(){ return $this->_has(10); } /** * Clear value * * @return \google\logging\type\HttpRequest */ public function clearCacheValidatedWithOriginServer(){ return $this->_clear(10); } /** * Get value * * @return boolean */ public function getCacheValidatedWithOriginServer(){ return $this->_get(10); } /** * Set value * * @param boolean $value * @return \google\logging\type\HttpRequest */ public function setCacheValidatedWithOriginServer( $value){ return $this->_set(10, $value); } /** * Check if has a value * * @return boolean */ public function hasCacheFillBytes(){ return $this->_has(12); } /** * Clear value * * @return \google\logging\type\HttpRequest */ public function clearCacheFillBytes(){ return $this->_clear(12); } /** * Get value * * @return int */ public function getCacheFillBytes(){ return $this->_get(12); } /** * Set value * * @param int $value * @return \google\logging\type\HttpRequest */ public function setCacheFillBytes( $value){ return $this->_set(12, $value); } } } src/generated/httpbody.php000064400000005042151742741340011650 0ustar00number = 1; $f->name = "content_type"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL BYTES data = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "data"; $f->type = \DrSlump\Protobuf::TYPE_BYTES; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasContentType(){ return $this->_has(1); } /** * Clear value * * @return \google\api\HttpBody */ public function clearContentType(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getContentType(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\HttpBody */ public function setContentType( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasData(){ return $this->_has(2); } /** * Clear value * * @return \google\api\HttpBody */ public function clearData(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getData(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\api\HttpBody */ public function setData( $value){ return $this->_set(2, $value); } } } src/generated/label.php000064400000007641151742741340011101 0ustar00number = 1; $f->name = "key"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL ENUM value_type = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "value_type"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\LabelDescriptor\ValueType'; $descriptor->addField($f); // OPTIONAL STRING description = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "description"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasKey(){ return $this->_has(1); } /** * Clear value * * @return \google\api\LabelDescriptor */ public function clearKey(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getKey(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\LabelDescriptor */ public function setKey( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasValueType(){ return $this->_has(2); } /** * Clear value * * @return \google\api\LabelDescriptor */ public function clearValueType(){ return $this->_clear(2); } /** * Get value * * @return int - \google\api\LabelDescriptor\ValueType */ public function getValueType(){ return $this->_get(2); } /** * Set value * * @param int - \google\api\LabelDescriptor\ValueType $value * @return \google\api\LabelDescriptor */ public function setValueType( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasDescription(){ return $this->_has(3); } /** * Clear value * * @return \google\api\LabelDescriptor */ public function clearDescription(){ return $this->_clear(3); } /** * Get value * * @return string */ public function getDescription(){ return $this->_get(3); } /** * Set value * * @param string $value * @return \google\api\LabelDescriptor */ public function setDescription( $value){ return $this->_set(3, $value); } } } src/generated/latlng.php000064400000005046151742741340011300 0ustar00number = 1; $f->name = "latitude"; $f->type = \DrSlump\Protobuf::TYPE_DOUBLE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL DOUBLE longitude = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "longitude"; $f->type = \DrSlump\Protobuf::TYPE_DOUBLE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasLatitude(){ return $this->_has(1); } /** * Clear value * * @return \google\type\LatLng */ public function clearLatitude(){ return $this->_clear(1); } /** * Get value * * @return float */ public function getLatitude(){ return $this->_get(1); } /** * Set value * * @param float $value * @return \google\type\LatLng */ public function setLatitude( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasLongitude(){ return $this->_has(2); } /** * Clear value * * @return \google\type\LatLng */ public function clearLongitude(){ return $this->_clear(2); } /** * Get value * * @return float */ public function getLongitude(){ return $this->_get(2); } /** * Set value * * @param float $value * @return \google\type\LatLng */ public function setLongitude( $value){ return $this->_set(2, $value); } } } src/generated/log.php000064400000012346151742741340010601 0ustar00number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE labels = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "labels"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\LabelDescriptor'; $descriptor->addField($f); // OPTIONAL STRING description = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "description"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING display_name = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "display_name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear value * * @return \google\api\LogDescriptor */ public function clearName(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\LogDescriptor */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasLabels(){ return $this->_has(2); } /** * Clear value * * @return \google\api\LogDescriptor */ public function clearLabels(){ return $this->_clear(2); } /** * Get value * * @param int $idx * @return \google\api\LabelDescriptor */ public function getLabels($idx = NULL){ return $this->_get(2, $idx); } /** * Set value * * @param \google\api\LabelDescriptor $value * @return \google\api\LogDescriptor */ public function setLabels(\google\api\LabelDescriptor $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of * * @return \google\api\LabelDescriptor[] */ public function getLabelsList(){ return $this->_get(2); } /** * Add a new element to * * @param \google\api\LabelDescriptor $value * @return \google\api\LogDescriptor */ public function addLabels(\google\api\LabelDescriptor $value){ return $this->_add(2, $value); } /** * Check if has a value * * @return boolean */ public function hasDescription(){ return $this->_has(3); } /** * Clear value * * @return \google\api\LogDescriptor */ public function clearDescription(){ return $this->_clear(3); } /** * Get value * * @return string */ public function getDescription(){ return $this->_get(3); } /** * Set value * * @param string $value * @return \google\api\LogDescriptor */ public function setDescription( $value){ return $this->_set(3, $value); } /** * Check if has a value * * @return boolean */ public function hasDisplayName(){ return $this->_has(4); } /** * Clear value * * @return \google\api\LogDescriptor */ public function clearDisplayName(){ return $this->_clear(4); } /** * Get value * * @return string */ public function getDisplayName(){ return $this->_get(4); } /** * Set value * * @param string $value * @return \google\api\LogDescriptor */ public function setDisplayName( $value){ return $this->_set(4, $value); } } } src/generated/log_severity.php000064400000000710151742741340012523 0ustar00number = 3; $f->name = "monitored_resource"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED STRING logs = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "logs"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasMonitoredResource(){ return $this->_has(3); } /** * Clear value * * @return \google\api\Logging\LoggingDestination */ public function clearMonitoredResource(){ return $this->_clear(3); } /** * Get value * * @return string */ public function getMonitoredResource(){ return $this->_get(3); } /** * Set value * * @param string $value * @return \google\api\Logging\LoggingDestination */ public function setMonitoredResource( $value){ return $this->_set(3, $value); } /** * Check if has a value * * @return boolean */ public function hasLogs(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Logging\LoggingDestination */ public function clearLogs(){ return $this->_clear(1); } /** * Get value * * @param int $idx * @return string */ public function getLogs($idx = NULL){ return $this->_get(1, $idx); } /** * Set value * * @param string $value * @return \google\api\Logging\LoggingDestination */ public function setLogs( $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of * * @return string[] */ public function getLogsList(){ return $this->_get(1); } /** * Add a new element to * * @param string $value * @return \google\api\Logging\LoggingDestination */ public function addLogs( $value){ return $this->_add(1, $value); } } } namespace google\api { class Logging extends \DrSlump\Protobuf\Message { /** @var \google\api\Logging\LoggingDestination[] */ public $producer_destinations = array(); /** @var \google\api\Logging\LoggingDestination[] */ public $consumer_destinations = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.Logging'); // REPEATED MESSAGE producer_destinations = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "producer_destinations"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\Logging\LoggingDestination'; $descriptor->addField($f); // REPEATED MESSAGE consumer_destinations = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "consumer_destinations"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\Logging\LoggingDestination'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasProducerDestinations(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Logging */ public function clearProducerDestinations(){ return $this->_clear(1); } /** * Get value * * @param int $idx * @return \google\api\Logging\LoggingDestination */ public function getProducerDestinations($idx = NULL){ return $this->_get(1, $idx); } /** * Set value * * @param \google\api\Logging\LoggingDestination $value * @return \google\api\Logging */ public function setProducerDestinations(\google\api\Logging\LoggingDestination $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of * * @return \google\api\Logging\LoggingDestination[] */ public function getProducerDestinationsList(){ return $this->_get(1); } /** * Add a new element to * * @param \google\api\Logging\LoggingDestination $value * @return \google\api\Logging */ public function addProducerDestinations(\google\api\Logging\LoggingDestination $value){ return $this->_add(1, $value); } /** * Check if has a value * * @return boolean */ public function hasConsumerDestinations(){ return $this->_has(2); } /** * Clear value * * @return \google\api\Logging */ public function clearConsumerDestinations(){ return $this->_clear(2); } /** * Get value * * @param int $idx * @return \google\api\Logging\LoggingDestination */ public function getConsumerDestinations($idx = NULL){ return $this->_get(2, $idx); } /** * Set value * * @param \google\api\Logging\LoggingDestination $value * @return \google\api\Logging */ public function setConsumerDestinations(\google\api\Logging\LoggingDestination $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of * * @return \google\api\Logging\LoggingDestination[] */ public function getConsumerDestinationsList(){ return $this->_get(2); } /** * Add a new element to * * @param \google\api\Logging\LoggingDestination $value * @return \google\api\Logging */ public function addConsumerDestinations(\google\api\Logging\LoggingDestination $value){ return $this->_add(2, $value); } } } src/generated/metric.php000064400000036714151742741340011310 0ustar00number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING type = 8 $f = new \DrSlump\Protobuf\Field(); $f->number = 8; $f->name = "type"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE labels = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "labels"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\LabelDescriptor'; $descriptor->addField($f); // OPTIONAL ENUM metric_kind = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "metric_kind"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\MetricDescriptor\MetricKind'; $descriptor->addField($f); // OPTIONAL ENUM value_type = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "value_type"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\MetricDescriptor\ValueType'; $descriptor->addField($f); // OPTIONAL STRING unit = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "unit"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING description = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "description"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING display_name = 7 $f = new \DrSlump\Protobuf\Field(); $f->number = 7; $f->name = "display_name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear value * * @return \google\api\MetricDescriptor */ public function clearName(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\MetricDescriptor */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasType(){ return $this->_has(8); } /** * Clear value * * @return \google\api\MetricDescriptor */ public function clearType(){ return $this->_clear(8); } /** * Get value * * @return string */ public function getType(){ return $this->_get(8); } /** * Set value * * @param string $value * @return \google\api\MetricDescriptor */ public function setType( $value){ return $this->_set(8, $value); } /** * Check if has a value * * @return boolean */ public function hasLabels(){ return $this->_has(2); } /** * Clear value * * @return \google\api\MetricDescriptor */ public function clearLabels(){ return $this->_clear(2); } /** * Get value * * @param int $idx * @return \google\api\LabelDescriptor */ public function getLabels($idx = NULL){ return $this->_get(2, $idx); } /** * Set value * * @param \google\api\LabelDescriptor $value * @return \google\api\MetricDescriptor */ public function setLabels(\google\api\LabelDescriptor $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of * * @return \google\api\LabelDescriptor[] */ public function getLabelsList(){ return $this->_get(2); } /** * Add a new element to * * @param \google\api\LabelDescriptor $value * @return \google\api\MetricDescriptor */ public function addLabels(\google\api\LabelDescriptor $value){ return $this->_add(2, $value); } /** * Check if has a value * * @return boolean */ public function hasMetricKind(){ return $this->_has(3); } /** * Clear value * * @return \google\api\MetricDescriptor */ public function clearMetricKind(){ return $this->_clear(3); } /** * Get value * * @return int - \google\api\MetricDescriptor\MetricKind */ public function getMetricKind(){ return $this->_get(3); } /** * Set value * * @param int - \google\api\MetricDescriptor\MetricKind $value * @return \google\api\MetricDescriptor */ public function setMetricKind( $value){ return $this->_set(3, $value); } /** * Check if has a value * * @return boolean */ public function hasValueType(){ return $this->_has(4); } /** * Clear value * * @return \google\api\MetricDescriptor */ public function clearValueType(){ return $this->_clear(4); } /** * Get value * * @return int - \google\api\MetricDescriptor\ValueType */ public function getValueType(){ return $this->_get(4); } /** * Set value * * @param int - \google\api\MetricDescriptor\ValueType $value * @return \google\api\MetricDescriptor */ public function setValueType( $value){ return $this->_set(4, $value); } /** * Check if has a value * * @return boolean */ public function hasUnit(){ return $this->_has(5); } /** * Clear value * * @return \google\api\MetricDescriptor */ public function clearUnit(){ return $this->_clear(5); } /** * Get value * * @return string */ public function getUnit(){ return $this->_get(5); } /** * Set value * * @param string $value * @return \google\api\MetricDescriptor */ public function setUnit( $value){ return $this->_set(5, $value); } /** * Check if has a value * * @return boolean */ public function hasDescription(){ return $this->_has(6); } /** * Clear value * * @return \google\api\MetricDescriptor */ public function clearDescription(){ return $this->_clear(6); } /** * Get value * * @return string */ public function getDescription(){ return $this->_get(6); } /** * Set value * * @param string $value * @return \google\api\MetricDescriptor */ public function setDescription( $value){ return $this->_set(6, $value); } /** * Check if has a value * * @return boolean */ public function hasDisplayName(){ return $this->_has(7); } /** * Clear value * * @return \google\api\MetricDescriptor */ public function clearDisplayName(){ return $this->_clear(7); } /** * Get value * * @return string */ public function getDisplayName(){ return $this->_get(7); } /** * Set value * * @param string $value * @return \google\api\MetricDescriptor */ public function setDisplayName( $value){ return $this->_set(7, $value); } } } namespace google\api\Metric { class LabelsEntry extends \DrSlump\Protobuf\Message { /** @var string */ public $key = null; /** @var string */ public $value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.Metric.LabelsEntry'); // OPTIONAL STRING key = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "key"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING value = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "value"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasKey(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Metric\LabelsEntry */ public function clearKey(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getKey(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\Metric\LabelsEntry */ public function setKey( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasValue(){ return $this->_has(2); } /** * Clear value * * @return \google\api\Metric\LabelsEntry */ public function clearValue(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getValue(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\api\Metric\LabelsEntry */ public function setValue( $value){ return $this->_set(2, $value); } } } namespace google\api { class Metric extends \DrSlump\Protobuf\Message { /** @var string */ public $type = null; /** @var \google\api\Metric\LabelsEntry[] */ public $labels = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.Metric'); // OPTIONAL STRING type = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "type"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE labels = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "labels"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\Metric\LabelsEntry'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasType(){ return $this->_has(3); } /** * Clear value * * @return \google\api\Metric */ public function clearType(){ return $this->_clear(3); } /** * Get value * * @return string */ public function getType(){ return $this->_get(3); } /** * Set value * * @param string $value * @return \google\api\Metric */ public function setType( $value){ return $this->_set(3, $value); } /** * Check if has a value * * @return boolean */ public function hasLabels(){ return $this->_has(2); } /** * Clear value * * @return \google\api\Metric */ public function clearLabels(){ return $this->_clear(2); } /** * Get value * * @param int $idx * @return \google\api\Metric\LabelsEntry */ public function getLabels($idx = NULL){ return $this->_get(2, $idx); } /** * Set value * * @param \google\api\Metric\LabelsEntry $value * @return \google\api\Metric */ public function setLabels(\google\api\Metric\LabelsEntry $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of * * @return \google\api\Metric\LabelsEntry[] */ public function getLabelsList(){ return $this->_get(2); } /** * Add a new element to * * @param \google\api\Metric\LabelsEntry $value * @return \google\api\Metric */ public function addLabels(\google\api\Metric\LabelsEntry $value){ return $this->_add(2, $value); } } } src/generated/money.php000064400000006757151742741340011160 0ustar00number = 1; $f->name = "currency_code"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT64 units = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "units"; $f->type = \DrSlump\Protobuf::TYPE_INT64; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 nanos = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "nanos"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasCurrencyCode(){ return $this->_has(1); } /** * Clear value * * @return \google\type\Money */ public function clearCurrencyCode(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getCurrencyCode(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\type\Money */ public function setCurrencyCode( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasUnits(){ return $this->_has(2); } /** * Clear value * * @return \google\type\Money */ public function clearUnits(){ return $this->_clear(2); } /** * Get value * * @return int */ public function getUnits(){ return $this->_get(2); } /** * Set value * * @param int $value * @return \google\type\Money */ public function setUnits( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasNanos(){ return $this->_has(3); } /** * Clear value * * @return \google\type\Money */ public function clearNanos(){ return $this->_clear(3); } /** * Get value * * @return int */ public function getNanos(){ return $this->_get(3); } /** * Set value * * @param int $value * @return \google\type\Money */ public function setNanos( $value){ return $this->_set(3, $value); } } } src/generated/monitored_resource.php000064400000027745151742741340013740 0ustar00number = 5; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING type = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "type"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING display_name = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "display_name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING description = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "description"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE labels = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "labels"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\LabelDescriptor'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasName(){ return $this->_has(5); } /** * Clear value * * @return \google\api\MonitoredResourceDescriptor */ public function clearName(){ return $this->_clear(5); } /** * Get value * * @return string */ public function getName(){ return $this->_get(5); } /** * Set value * * @param string $value * @return \google\api\MonitoredResourceDescriptor */ public function setName( $value){ return $this->_set(5, $value); } /** * Check if has a value * * @return boolean */ public function hasType(){ return $this->_has(1); } /** * Clear value * * @return \google\api\MonitoredResourceDescriptor */ public function clearType(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getType(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\MonitoredResourceDescriptor */ public function setType( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasDisplayName(){ return $this->_has(2); } /** * Clear value * * @return \google\api\MonitoredResourceDescriptor */ public function clearDisplayName(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getDisplayName(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\api\MonitoredResourceDescriptor */ public function setDisplayName( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasDescription(){ return $this->_has(3); } /** * Clear value * * @return \google\api\MonitoredResourceDescriptor */ public function clearDescription(){ return $this->_clear(3); } /** * Get value * * @return string */ public function getDescription(){ return $this->_get(3); } /** * Set value * * @param string $value * @return \google\api\MonitoredResourceDescriptor */ public function setDescription( $value){ return $this->_set(3, $value); } /** * Check if has a value * * @return boolean */ public function hasLabels(){ return $this->_has(4); } /** * Clear value * * @return \google\api\MonitoredResourceDescriptor */ public function clearLabels(){ return $this->_clear(4); } /** * Get value * * @param int $idx * @return \google\api\LabelDescriptor */ public function getLabels($idx = NULL){ return $this->_get(4, $idx); } /** * Set value * * @param \google\api\LabelDescriptor $value * @return \google\api\MonitoredResourceDescriptor */ public function setLabels(\google\api\LabelDescriptor $value, $idx = NULL){ return $this->_set(4, $value, $idx); } /** * Get all elements of * * @return \google\api\LabelDescriptor[] */ public function getLabelsList(){ return $this->_get(4); } /** * Add a new element to * * @param \google\api\LabelDescriptor $value * @return \google\api\MonitoredResourceDescriptor */ public function addLabels(\google\api\LabelDescriptor $value){ return $this->_add(4, $value); } } } namespace google\api\MonitoredResource { class LabelsEntry extends \DrSlump\Protobuf\Message { /** @var string */ public $key = null; /** @var string */ public $value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.MonitoredResource.LabelsEntry'); // OPTIONAL STRING key = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "key"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING value = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "value"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasKey(){ return $this->_has(1); } /** * Clear value * * @return \google\api\MonitoredResource\LabelsEntry */ public function clearKey(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getKey(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\MonitoredResource\LabelsEntry */ public function setKey( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasValue(){ return $this->_has(2); } /** * Clear value * * @return \google\api\MonitoredResource\LabelsEntry */ public function clearValue(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getValue(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\api\MonitoredResource\LabelsEntry */ public function setValue( $value){ return $this->_set(2, $value); } } } namespace google\api { class MonitoredResource extends \DrSlump\Protobuf\Message { /** @var string */ public $type = null; /** @var \google\api\MonitoredResource\LabelsEntry[] */ public $labels = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.MonitoredResource'); // OPTIONAL STRING type = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "type"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE labels = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "labels"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\MonitoredResource\LabelsEntry'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasType(){ return $this->_has(1); } /** * Clear value * * @return \google\api\MonitoredResource */ public function clearType(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getType(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\MonitoredResource */ public function setType( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasLabels(){ return $this->_has(2); } /** * Clear value * * @return \google\api\MonitoredResource */ public function clearLabels(){ return $this->_clear(2); } /** * Get value * * @param int $idx * @return \google\api\MonitoredResource\LabelsEntry */ public function getLabels($idx = NULL){ return $this->_get(2, $idx); } /** * Set value * * @param \google\api\MonitoredResource\LabelsEntry $value * @return \google\api\MonitoredResource */ public function setLabels(\google\api\MonitoredResource\LabelsEntry $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of * * @return \google\api\MonitoredResource\LabelsEntry[] */ public function getLabelsList(){ return $this->_get(2); } /** * Add a new element to * * @param \google\api\MonitoredResource\LabelsEntry $value * @return \google\api\MonitoredResource */ public function addLabels(\google\api\MonitoredResource\LabelsEntry $value){ return $this->_add(2, $value); } } } src/generated/monitoring.php000064400000017105151742741340012203 0ustar00number = 1; $f->name = "monitored_resource"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED STRING metrics = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "metrics"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasMonitoredResource(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Monitoring\MonitoringDestination */ public function clearMonitoredResource(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getMonitoredResource(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\Monitoring\MonitoringDestination */ public function setMonitoredResource( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasMetrics(){ return $this->_has(2); } /** * Clear value * * @return \google\api\Monitoring\MonitoringDestination */ public function clearMetrics(){ return $this->_clear(2); } /** * Get value * * @param int $idx * @return string */ public function getMetrics($idx = NULL){ return $this->_get(2, $idx); } /** * Set value * * @param string $value * @return \google\api\Monitoring\MonitoringDestination */ public function setMetrics( $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of * * @return string[] */ public function getMetricsList(){ return $this->_get(2); } /** * Add a new element to * * @param string $value * @return \google\api\Monitoring\MonitoringDestination */ public function addMetrics( $value){ return $this->_add(2, $value); } } } namespace google\api { class Monitoring extends \DrSlump\Protobuf\Message { /** @var \google\api\Monitoring\MonitoringDestination[] */ public $producer_destinations = array(); /** @var \google\api\Monitoring\MonitoringDestination[] */ public $consumer_destinations = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.Monitoring'); // REPEATED MESSAGE producer_destinations = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "producer_destinations"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\Monitoring\MonitoringDestination'; $descriptor->addField($f); // REPEATED MESSAGE consumer_destinations = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "consumer_destinations"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\Monitoring\MonitoringDestination'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasProducerDestinations(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Monitoring */ public function clearProducerDestinations(){ return $this->_clear(1); } /** * Get value * * @param int $idx * @return \google\api\Monitoring\MonitoringDestination */ public function getProducerDestinations($idx = NULL){ return $this->_get(1, $idx); } /** * Set value * * @param \google\api\Monitoring\MonitoringDestination $value * @return \google\api\Monitoring */ public function setProducerDestinations(\google\api\Monitoring\MonitoringDestination $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of * * @return \google\api\Monitoring\MonitoringDestination[] */ public function getProducerDestinationsList(){ return $this->_get(1); } /** * Add a new element to * * @param \google\api\Monitoring\MonitoringDestination $value * @return \google\api\Monitoring */ public function addProducerDestinations(\google\api\Monitoring\MonitoringDestination $value){ return $this->_add(1, $value); } /** * Check if has a value * * @return boolean */ public function hasConsumerDestinations(){ return $this->_has(2); } /** * Clear value * * @return \google\api\Monitoring */ public function clearConsumerDestinations(){ return $this->_clear(2); } /** * Get value * * @param int $idx * @return \google\api\Monitoring\MonitoringDestination */ public function getConsumerDestinations($idx = NULL){ return $this->_get(2, $idx); } /** * Set value * * @param \google\api\Monitoring\MonitoringDestination $value * @return \google\api\Monitoring */ public function setConsumerDestinations(\google\api\Monitoring\MonitoringDestination $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of * * @return \google\api\Monitoring\MonitoringDestination[] */ public function getConsumerDestinationsList(){ return $this->_get(2); } /** * Add a new element to * * @param \google\api\Monitoring\MonitoringDestination $value * @return \google\api\Monitoring */ public function addConsumerDestinations(\google\api\Monitoring\MonitoringDestination $value){ return $this->_add(2, $value); } } } src/generated/operations.php000064400000047340151742741340012205 0ustar00number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE metadata = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "metadata"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Any'; $descriptor->addField($f); // OPTIONAL BOOL done = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "done"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE error = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "error"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\rpc\Status'; $descriptor->addField($f); // OPTIONAL MESSAGE response = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "response"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Any'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear value * * @return \google\longrunning\Operation */ public function clearName(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\longrunning\Operation */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasMetadata(){ return $this->_has(2); } /** * Clear value * * @return \google\longrunning\Operation */ public function clearMetadata(){ return $this->_clear(2); } /** * Get value * * @return \google\protobuf\Any */ public function getMetadata(){ return $this->_get(2); } /** * Set value * * @param \google\protobuf\Any $value * @return \google\longrunning\Operation */ public function setMetadata(\google\protobuf\Any $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasDone(){ return $this->_has(3); } /** * Clear value * * @return \google\longrunning\Operation */ public function clearDone(){ return $this->_clear(3); } /** * Get value * * @return boolean */ public function getDone(){ return $this->_get(3); } /** * Set value * * @param boolean $value * @return \google\longrunning\Operation */ public function setDone( $value){ return $this->_set(3, $value); } /** * Check if has a value * * @return boolean */ public function hasError(){ return $this->_has(4); } /** * Clear value * * @return \google\longrunning\Operation */ public function clearError(){ return $this->_clear(4); } /** * Get value * * @return \google\rpc\Status */ public function getError(){ return $this->_get(4); } /** * Set value * * @param \google\rpc\Status $value * @return \google\longrunning\Operation */ public function setError(\google\rpc\Status $value){ return $this->_set(4, $value); } /** * Check if has a value * * @return boolean */ public function hasResponse(){ return $this->_has(5); } /** * Clear value * * @return \google\longrunning\Operation */ public function clearResponse(){ return $this->_clear(5); } /** * Get value * * @return \google\protobuf\Any */ public function getResponse(){ return $this->_get(5); } /** * Set value * * @param \google\protobuf\Any $value * @return \google\longrunning\Operation */ public function setResponse(\google\protobuf\Any $value){ return $this->_set(5, $value); } } } namespace google\longrunning { class GetOperationRequest extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.longrunning.GetOperationRequest'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear value * * @return \google\longrunning\GetOperationRequest */ public function clearName(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\longrunning\GetOperationRequest */ public function setName( $value){ return $this->_set(1, $value); } } } namespace google\longrunning { class ListOperationsRequest extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var string */ public $filter = null; /** @var int */ public $page_size = null; /** @var string */ public $page_token = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.longrunning.ListOperationsRequest'); // OPTIONAL STRING name = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING filter = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "filter"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 page_size = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "page_size"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING page_token = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "page_token"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasName(){ return $this->_has(4); } /** * Clear value * * @return \google\longrunning\ListOperationsRequest */ public function clearName(){ return $this->_clear(4); } /** * Get value * * @return string */ public function getName(){ return $this->_get(4); } /** * Set value * * @param string $value * @return \google\longrunning\ListOperationsRequest */ public function setName( $value){ return $this->_set(4, $value); } /** * Check if has a value * * @return boolean */ public function hasFilter(){ return $this->_has(1); } /** * Clear value * * @return \google\longrunning\ListOperationsRequest */ public function clearFilter(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getFilter(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\longrunning\ListOperationsRequest */ public function setFilter( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasPageSize(){ return $this->_has(2); } /** * Clear value * * @return \google\longrunning\ListOperationsRequest */ public function clearPageSize(){ return $this->_clear(2); } /** * Get value * * @return int */ public function getPageSize(){ return $this->_get(2); } /** * Set value * * @param int $value * @return \google\longrunning\ListOperationsRequest */ public function setPageSize( $value){ return $this->_set(2, $value); } /** * Check if has a value * * @return boolean */ public function hasPageToken(){ return $this->_has(3); } /** * Clear value * * @return \google\longrunning\ListOperationsRequest */ public function clearPageToken(){ return $this->_clear(3); } /** * Get value * * @return string */ public function getPageToken(){ return $this->_get(3); } /** * Set value * * @param string $value * @return \google\longrunning\ListOperationsRequest */ public function setPageToken( $value){ return $this->_set(3, $value); } } } namespace google\longrunning { class ListOperationsResponse extends \DrSlump\Protobuf\Message { /** @var \google\longrunning\Operation[] */ public $operations = array(); /** @var string */ public $next_page_token = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.longrunning.ListOperationsResponse'); // REPEATED MESSAGE operations = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "operations"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\longrunning\Operation'; $descriptor->addField($f); // OPTIONAL STRING next_page_token = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "next_page_token"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasOperations(){ return $this->_has(1); } /** * Clear value * * @return \google\longrunning\ListOperationsResponse */ public function clearOperations(){ return $this->_clear(1); } /** * Get value * * @param int $idx * @return \google\longrunning\Operation */ public function getOperations($idx = NULL){ return $this->_get(1, $idx); } /** * Set value * * @param \google\longrunning\Operation $value * @return \google\longrunning\ListOperationsResponse */ public function setOperations(\google\longrunning\Operation $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of * * @return \google\longrunning\Operation[] */ public function getOperationsList(){ return $this->_get(1); } /** * Add a new element to * * @param \google\longrunning\Operation $value * @return \google\longrunning\ListOperationsResponse */ public function addOperations(\google\longrunning\Operation $value){ return $this->_add(1, $value); } /** * Check if has a value * * @return boolean */ public function hasNextPageToken(){ return $this->_has(2); } /** * Clear value * * @return \google\longrunning\ListOperationsResponse */ public function clearNextPageToken(){ return $this->_clear(2); } /** * Get value * * @return string */ public function getNextPageToken(){ return $this->_get(2); } /** * Set value * * @param string $value * @return \google\longrunning\ListOperationsResponse */ public function setNextPageToken( $value){ return $this->_set(2, $value); } } } namespace google\longrunning { class CancelOperationRequest extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.longrunning.CancelOperationRequest'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear value * * @return \google\longrunning\CancelOperationRequest */ public function clearName(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\longrunning\CancelOperationRequest */ public function setName( $value){ return $this->_set(1, $value); } } } namespace google\longrunning { class DeleteOperationRequest extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.longrunning.DeleteOperationRequest'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear value * * @return \google\longrunning\DeleteOperationRequest */ public function clearName(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\longrunning\DeleteOperationRequest */ public function setName( $value){ return $this->_set(1, $value); } } } namespace google\longrunning { class OperationsClient extends \Grpc\BaseStub { public function __construct($hostname, $opts) { parent::__construct($hostname, $opts); } /** * @param google\longrunning\GetOperationRequest $input */ public function GetOperation(\google\longrunning\GetOperationRequest $argument, $metadata = array(), $options = array()) { return $this->_simpleRequest('/google.longrunning.Operations/GetOperation', $argument, '\google\longrunning\Operation::deserialize', $metadata, $options); } /** * @param google\longrunning\ListOperationsRequest $input */ public function ListOperations(\google\longrunning\ListOperationsRequest $argument, $metadata = array(), $options = array()) { return $this->_simpleRequest('/google.longrunning.Operations/ListOperations', $argument, '\google\longrunning\ListOperationsResponse::deserialize', $metadata, $options); } /** * @param google\longrunning\CancelOperationRequest $input */ public function CancelOperation(\google\longrunning\CancelOperationRequest $argument, $metadata = array(), $options = array()) { return $this->_simpleRequest('/google.longrunning.Operations/CancelOperation', $argument, '\google\protobuf\Empty::deserialize', $metadata, $options); } /** * @param google\longrunning\DeleteOperationRequest $input */ public function DeleteOperation(\google\longrunning\DeleteOperationRequest $argument, $metadata = array(), $options = array()) { return $this->_simpleRequest('/google.longrunning.Operations/DeleteOperation', $argument, '\google\protobuf\Empty::deserialize', $metadata, $options); } } } src/generated/service.php000064400000070433151742741340011461 0ustar00number = 20; $f->name = "config_version"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\UInt32Value'; $descriptor->addField($f); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING id = 33 $f = new \DrSlump\Protobuf\Field(); $f->number = 33; $f->name = "id"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING title = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "title"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING producer_project_id = 22 $f = new \DrSlump\Protobuf\Field(); $f->number = 22; $f->name = "producer_project_id"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE apis = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "apis"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\Api'; $descriptor->addField($f); // REPEATED MESSAGE types = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "types"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\Type'; $descriptor->addField($f); // REPEATED MESSAGE enums = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "enums"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\Enum'; $descriptor->addField($f); // OPTIONAL MESSAGE documentation = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "documentation"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\Documentation'; $descriptor->addField($f); // OPTIONAL MESSAGE backend = 8 $f = new \DrSlump\Protobuf\Field(); $f->number = 8; $f->name = "backend"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\Backend'; $descriptor->addField($f); // OPTIONAL MESSAGE http = 9 $f = new \DrSlump\Protobuf\Field(); $f->number = 9; $f->name = "http"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\Http'; $descriptor->addField($f); // OPTIONAL MESSAGE authentication = 11 $f = new \DrSlump\Protobuf\Field(); $f->number = 11; $f->name = "authentication"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\Authentication'; $descriptor->addField($f); // OPTIONAL MESSAGE context = 12 $f = new \DrSlump\Protobuf\Field(); $f->number = 12; $f->name = "context"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\Context'; $descriptor->addField($f); // OPTIONAL MESSAGE usage = 15 $f = new \DrSlump\Protobuf\Field(); $f->number = 15; $f->name = "usage"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\Usage'; $descriptor->addField($f); // REPEATED MESSAGE endpoints = 18 $f = new \DrSlump\Protobuf\Field(); $f->number = 18; $f->name = "endpoints"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\Endpoint'; $descriptor->addField($f); // OPTIONAL MESSAGE control = 21 $f = new \DrSlump\Protobuf\Field(); $f->number = 21; $f->name = "control"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\Control'; $descriptor->addField($f); // REPEATED MESSAGE logs = 23 $f = new \DrSlump\Protobuf\Field(); $f->number = 23; $f->name = "logs"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\LogDescriptor'; $descriptor->addField($f); // REPEATED MESSAGE metrics = 24 $f = new \DrSlump\Protobuf\Field(); $f->number = 24; $f->name = "metrics"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\MetricDescriptor'; $descriptor->addField($f); // REPEATED MESSAGE monitored_resources = 25 $f = new \DrSlump\Protobuf\Field(); $f->number = 25; $f->name = "monitored_resources"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\MonitoredResourceDescriptor'; $descriptor->addField($f); // OPTIONAL MESSAGE logging = 27 $f = new \DrSlump\Protobuf\Field(); $f->number = 27; $f->name = "logging"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\Logging'; $descriptor->addField($f); // OPTIONAL MESSAGE monitoring = 28 $f = new \DrSlump\Protobuf\Field(); $f->number = 28; $f->name = "monitoring"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\Monitoring'; $descriptor->addField($f); // OPTIONAL MESSAGE system_parameters = 29 $f = new \DrSlump\Protobuf\Field(); $f->number = 29; $f->name = "system_parameters"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\api\SystemParameters'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if has a value * * @return boolean */ public function hasConfigVersion(){ return $this->_has(20); } /** * Clear value * * @return \google\api\Service */ public function clearConfigVersion(){ return $this->_clear(20); } /** * Get value * * @return \google\protobuf\UInt32Value */ public function getConfigVersion(){ return $this->_get(20); } /** * Set value * * @param \google\protobuf\UInt32Value $value * @return \google\api\Service */ public function setConfigVersion(\google\protobuf\UInt32Value $value){ return $this->_set(20, $value); } /** * Check if has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear value * * @return \google\api\Service */ public function clearName(){ return $this->_clear(1); } /** * Get value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set value * * @param string $value * @return \google\api\Service */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if has a value * * @return boolean */ public function hasId(){ return $this->_has(33); } /** * Clear value * * @return \google\api\Service */ public function clearId(){ return $this->_clear(33); } /** * Get value * * @return string */ public function getId(){ return $this->_get(33); } /** * Set value * * @param string $value * @return \google\api\Service */ public function setId( $value){ return $this->_set(33, $value); } /** * Check if has a value * * @return boolean */ public function hasTitle(){ return $this->_has(2); } /** * Clear <title> value * * @return \google\api\Service */ public function clearTitle(){ return $this->_clear(2); } /** * Get <title> value * * @return string */ public function getTitle(){ return $this->_get(2); } /** * Set <title> value * * @param string $value * @return \google\api\Service */ public function setTitle( $value){ return $this->_set(2, $value); } /** * Check if <producer_project_id> has a value * * @return boolean */ public function hasProducerProjectId(){ return $this->_has(22); } /** * Clear <producer_project_id> value * * @return \google\api\Service */ public function clearProducerProjectId(){ return $this->_clear(22); } /** * Get <producer_project_id> value * * @return string */ public function getProducerProjectId(){ return $this->_get(22); } /** * Set <producer_project_id> value * * @param string $value * @return \google\api\Service */ public function setProducerProjectId( $value){ return $this->_set(22, $value); } /** * Check if <apis> has a value * * @return boolean */ public function hasApis(){ return $this->_has(3); } /** * Clear <apis> value * * @return \google\api\Service */ public function clearApis(){ return $this->_clear(3); } /** * Get <apis> value * * @param int $idx * @return \google\protobuf\Api */ public function getApis($idx = NULL){ return $this->_get(3, $idx); } /** * Set <apis> value * * @param \google\protobuf\Api $value * @return \google\api\Service */ public function setApis(\google\protobuf\Api $value, $idx = NULL){ return $this->_set(3, $value, $idx); } /** * Get all elements of <apis> * * @return \google\protobuf\Api[] */ public function getApisList(){ return $this->_get(3); } /** * Add a new element to <apis> * * @param \google\protobuf\Api $value * @return \google\api\Service */ public function addApis(\google\protobuf\Api $value){ return $this->_add(3, $value); } /** * Check if <types> has a value * * @return boolean */ public function hasTypes(){ return $this->_has(4); } /** * Clear <types> value * * @return \google\api\Service */ public function clearTypes(){ return $this->_clear(4); } /** * Get <types> value * * @param int $idx * @return \google\protobuf\Type */ public function getTypes($idx = NULL){ return $this->_get(4, $idx); } /** * Set <types> value * * @param \google\protobuf\Type $value * @return \google\api\Service */ public function setTypes(\google\protobuf\Type $value, $idx = NULL){ return $this->_set(4, $value, $idx); } /** * Get all elements of <types> * * @return \google\protobuf\Type[] */ public function getTypesList(){ return $this->_get(4); } /** * Add a new element to <types> * * @param \google\protobuf\Type $value * @return \google\api\Service */ public function addTypes(\google\protobuf\Type $value){ return $this->_add(4, $value); } /** * Check if <enums> has a value * * @return boolean */ public function hasEnums(){ return $this->_has(5); } /** * Clear <enums> value * * @return \google\api\Service */ public function clearEnums(){ return $this->_clear(5); } /** * Get <enums> value * * @param int $idx * @return \google\protobuf\Enum */ public function getEnums($idx = NULL){ return $this->_get(5, $idx); } /** * Set <enums> value * * @param \google\protobuf\Enum $value * @return \google\api\Service */ public function setEnums(\google\protobuf\Enum $value, $idx = NULL){ return $this->_set(5, $value, $idx); } /** * Get all elements of <enums> * * @return \google\protobuf\Enum[] */ public function getEnumsList(){ return $this->_get(5); } /** * Add a new element to <enums> * * @param \google\protobuf\Enum $value * @return \google\api\Service */ public function addEnums(\google\protobuf\Enum $value){ return $this->_add(5, $value); } /** * Check if <documentation> has a value * * @return boolean */ public function hasDocumentation(){ return $this->_has(6); } /** * Clear <documentation> value * * @return \google\api\Service */ public function clearDocumentation(){ return $this->_clear(6); } /** * Get <documentation> value * * @return \google\api\Documentation */ public function getDocumentation(){ return $this->_get(6); } /** * Set <documentation> value * * @param \google\api\Documentation $value * @return \google\api\Service */ public function setDocumentation(\google\api\Documentation $value){ return $this->_set(6, $value); } /** * Check if <backend> has a value * * @return boolean */ public function hasBackend(){ return $this->_has(8); } /** * Clear <backend> value * * @return \google\api\Service */ public function clearBackend(){ return $this->_clear(8); } /** * Get <backend> value * * @return \google\api\Backend */ public function getBackend(){ return $this->_get(8); } /** * Set <backend> value * * @param \google\api\Backend $value * @return \google\api\Service */ public function setBackend(\google\api\Backend $value){ return $this->_set(8, $value); } /** * Check if <http> has a value * * @return boolean */ public function hasHttp(){ return $this->_has(9); } /** * Clear <http> value * * @return \google\api\Service */ public function clearHttp(){ return $this->_clear(9); } /** * Get <http> value * * @return \google\api\Http */ public function getHttp(){ return $this->_get(9); } /** * Set <http> value * * @param \google\api\Http $value * @return \google\api\Service */ public function setHttp(\google\api\Http $value){ return $this->_set(9, $value); } /** * Check if <authentication> has a value * * @return boolean */ public function hasAuthentication(){ return $this->_has(11); } /** * Clear <authentication> value * * @return \google\api\Service */ public function clearAuthentication(){ return $this->_clear(11); } /** * Get <authentication> value * * @return \google\api\Authentication */ public function getAuthentication(){ return $this->_get(11); } /** * Set <authentication> value * * @param \google\api\Authentication $value * @return \google\api\Service */ public function setAuthentication(\google\api\Authentication $value){ return $this->_set(11, $value); } /** * Check if <context> has a value * * @return boolean */ public function hasContext(){ return $this->_has(12); } /** * Clear <context> value * * @return \google\api\Service */ public function clearContext(){ return $this->_clear(12); } /** * Get <context> value * * @return \google\api\Context */ public function getContext(){ return $this->_get(12); } /** * Set <context> value * * @param \google\api\Context $value * @return \google\api\Service */ public function setContext(\google\api\Context $value){ return $this->_set(12, $value); } /** * Check if <usage> has a value * * @return boolean */ public function hasUsage(){ return $this->_has(15); } /** * Clear <usage> value * * @return \google\api\Service */ public function clearUsage(){ return $this->_clear(15); } /** * Get <usage> value * * @return \google\api\Usage */ public function getUsage(){ return $this->_get(15); } /** * Set <usage> value * * @param \google\api\Usage $value * @return \google\api\Service */ public function setUsage(\google\api\Usage $value){ return $this->_set(15, $value); } /** * Check if <endpoints> has a value * * @return boolean */ public function hasEndpoints(){ return $this->_has(18); } /** * Clear <endpoints> value * * @return \google\api\Service */ public function clearEndpoints(){ return $this->_clear(18); } /** * Get <endpoints> value * * @param int $idx * @return \google\api\Endpoint */ public function getEndpoints($idx = NULL){ return $this->_get(18, $idx); } /** * Set <endpoints> value * * @param \google\api\Endpoint $value * @return \google\api\Service */ public function setEndpoints(\google\api\Endpoint $value, $idx = NULL){ return $this->_set(18, $value, $idx); } /** * Get all elements of <endpoints> * * @return \google\api\Endpoint[] */ public function getEndpointsList(){ return $this->_get(18); } /** * Add a new element to <endpoints> * * @param \google\api\Endpoint $value * @return \google\api\Service */ public function addEndpoints(\google\api\Endpoint $value){ return $this->_add(18, $value); } /** * Check if <control> has a value * * @return boolean */ public function hasControl(){ return $this->_has(21); } /** * Clear <control> value * * @return \google\api\Service */ public function clearControl(){ return $this->_clear(21); } /** * Get <control> value * * @return \google\api\Control */ public function getControl(){ return $this->_get(21); } /** * Set <control> value * * @param \google\api\Control $value * @return \google\api\Service */ public function setControl(\google\api\Control $value){ return $this->_set(21, $value); } /** * Check if <logs> has a value * * @return boolean */ public function hasLogs(){ return $this->_has(23); } /** * Clear <logs> value * * @return \google\api\Service */ public function clearLogs(){ return $this->_clear(23); } /** * Get <logs> value * * @param int $idx * @return \google\api\LogDescriptor */ public function getLogs($idx = NULL){ return $this->_get(23, $idx); } /** * Set <logs> value * * @param \google\api\LogDescriptor $value * @return \google\api\Service */ public function setLogs(\google\api\LogDescriptor $value, $idx = NULL){ return $this->_set(23, $value, $idx); } /** * Get all elements of <logs> * * @return \google\api\LogDescriptor[] */ public function getLogsList(){ return $this->_get(23); } /** * Add a new element to <logs> * * @param \google\api\LogDescriptor $value * @return \google\api\Service */ public function addLogs(\google\api\LogDescriptor $value){ return $this->_add(23, $value); } /** * Check if <metrics> has a value * * @return boolean */ public function hasMetrics(){ return $this->_has(24); } /** * Clear <metrics> value * * @return \google\api\Service */ public function clearMetrics(){ return $this->_clear(24); } /** * Get <metrics> value * * @param int $idx * @return \google\api\MetricDescriptor */ public function getMetrics($idx = NULL){ return $this->_get(24, $idx); } /** * Set <metrics> value * * @param \google\api\MetricDescriptor $value * @return \google\api\Service */ public function setMetrics(\google\api\MetricDescriptor $value, $idx = NULL){ return $this->_set(24, $value, $idx); } /** * Get all elements of <metrics> * * @return \google\api\MetricDescriptor[] */ public function getMetricsList(){ return $this->_get(24); } /** * Add a new element to <metrics> * * @param \google\api\MetricDescriptor $value * @return \google\api\Service */ public function addMetrics(\google\api\MetricDescriptor $value){ return $this->_add(24, $value); } /** * Check if <monitored_resources> has a value * * @return boolean */ public function hasMonitoredResources(){ return $this->_has(25); } /** * Clear <monitored_resources> value * * @return \google\api\Service */ public function clearMonitoredResources(){ return $this->_clear(25); } /** * Get <monitored_resources> value * * @param int $idx * @return \google\api\MonitoredResourceDescriptor */ public function getMonitoredResources($idx = NULL){ return $this->_get(25, $idx); } /** * Set <monitored_resources> value * * @param \google\api\MonitoredResourceDescriptor $value * @return \google\api\Service */ public function setMonitoredResources(\google\api\MonitoredResourceDescriptor $value, $idx = NULL){ return $this->_set(25, $value, $idx); } /** * Get all elements of <monitored_resources> * * @return \google\api\MonitoredResourceDescriptor[] */ public function getMonitoredResourcesList(){ return $this->_get(25); } /** * Add a new element to <monitored_resources> * * @param \google\api\MonitoredResourceDescriptor $value * @return \google\api\Service */ public function addMonitoredResources(\google\api\MonitoredResourceDescriptor $value){ return $this->_add(25, $value); } /** * Check if <logging> has a value * * @return boolean */ public function hasLogging(){ return $this->_has(27); } /** * Clear <logging> value * * @return \google\api\Service */ public function clearLogging(){ return $this->_clear(27); } /** * Get <logging> value * * @return \google\api\Logging */ public function getLogging(){ return $this->_get(27); } /** * Set <logging> value * * @param \google\api\Logging $value * @return \google\api\Service */ public function setLogging(\google\api\Logging $value){ return $this->_set(27, $value); } /** * Check if <monitoring> has a value * * @return boolean */ public function hasMonitoring(){ return $this->_has(28); } /** * Clear <monitoring> value * * @return \google\api\Service */ public function clearMonitoring(){ return $this->_clear(28); } /** * Get <monitoring> value * * @return \google\api\Monitoring */ public function getMonitoring(){ return $this->_get(28); } /** * Set <monitoring> value * * @param \google\api\Monitoring $value * @return \google\api\Service */ public function setMonitoring(\google\api\Monitoring $value){ return $this->_set(28, $value); } /** * Check if <system_parameters> has a value * * @return boolean */ public function hasSystemParameters(){ return $this->_has(29); } /** * Clear <system_parameters> value * * @return \google\api\Service */ public function clearSystemParameters(){ return $this->_clear(29); } /** * Get <system_parameters> value * * @return \google\api\SystemParameters */ public function getSystemParameters(){ return $this->_get(29); } /** * Set <system_parameters> value * * @param \google\api\SystemParameters $value * @return \google\api\Service */ public function setSystemParameters(\google\api\SystemParameters $value){ return $this->_set(29, $value); } } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������src/generated/status.php����������������������������������������������������������������������������0000644�����������������00000010032�15174274134�0011331 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php // DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 // Source: google/rpc/status.proto // Date: 2016-11-23 22:55:01 namespace google\rpc { class Status extends \DrSlump\Protobuf\Message { /** @var int */ public $code = null; /** @var string */ public $message = null; /** @var \google\protobuf\Any[] */ public $details = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.rpc.Status'); // OPTIONAL INT32 code = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "code"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING message = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "message"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE details = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "details"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\Any'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <code> has a value * * @return boolean */ public function hasCode(){ return $this->_has(1); } /** * Clear <code> value * * @return \google\rpc\Status */ public function clearCode(){ return $this->_clear(1); } /** * Get <code> value * * @return int */ public function getCode(){ return $this->_get(1); } /** * Set <code> value * * @param int $value * @return \google\rpc\Status */ public function setCode( $value){ return $this->_set(1, $value); } /** * Check if <message> has a value * * @return boolean */ public function hasMessage(){ return $this->_has(2); } /** * Clear <message> value * * @return \google\rpc\Status */ public function clearMessage(){ return $this->_clear(2); } /** * Get <message> value * * @return string */ public function getMessage(){ return $this->_get(2); } /** * Set <message> value * * @param string $value * @return \google\rpc\Status */ public function setMessage( $value){ return $this->_set(2, $value); } /** * Check if <details> has a value * * @return boolean */ public function hasDetails(){ return $this->_has(3); } /** * Clear <details> value * * @return \google\rpc\Status */ public function clearDetails(){ return $this->_clear(3); } /** * Get <details> value * * @param int $idx * @return \google\protobuf\Any */ public function getDetails($idx = NULL){ return $this->_get(3, $idx); } /** * Set <details> value * * @param \google\protobuf\Any $value * @return \google\rpc\Status */ public function setDetails(\google\protobuf\Any $value, $idx = NULL){ return $this->_set(3, $value, $idx); } /** * Get all elements of <details> * * @return \google\protobuf\Any[] */ public function getDetailsList(){ return $this->_get(3); } /** * Add a new element to <details> * * @param \google\protobuf\Any $value * @return \google\rpc\Status */ public function addDetails(\google\protobuf\Any $value){ return $this->_add(3, $value); } } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������src/generated/system_parameter.php������������������������������������������������������������������0000644�����������������00000021664�15174274134�0013407 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php // DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 // Source: google/api/system_parameter.proto // Date: 2016-11-23 22:55:01 namespace google\api { class SystemParameters extends \DrSlump\Protobuf\Message { /** @var \google\api\SystemParameterRule[] */ public $rules = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.SystemParameters'); // REPEATED MESSAGE rules = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "rules"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\SystemParameterRule'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <rules> has a value * * @return boolean */ public function hasRules(){ return $this->_has(1); } /** * Clear <rules> value * * @return \google\api\SystemParameters */ public function clearRules(){ return $this->_clear(1); } /** * Get <rules> value * * @param int $idx * @return \google\api\SystemParameterRule */ public function getRules($idx = NULL){ return $this->_get(1, $idx); } /** * Set <rules> value * * @param \google\api\SystemParameterRule $value * @return \google\api\SystemParameters */ public function setRules(\google\api\SystemParameterRule $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of <rules> * * @return \google\api\SystemParameterRule[] */ public function getRulesList(){ return $this->_get(1); } /** * Add a new element to <rules> * * @param \google\api\SystemParameterRule $value * @return \google\api\SystemParameters */ public function addRules(\google\api\SystemParameterRule $value){ return $this->_add(1, $value); } } } namespace google\api { class SystemParameterRule extends \DrSlump\Protobuf\Message { /** @var string */ public $selector = null; /** @var \google\api\SystemParameter[] */ public $parameters = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.SystemParameterRule'); // OPTIONAL STRING selector = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "selector"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE parameters = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "parameters"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\SystemParameter'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <selector> has a value * * @return boolean */ public function hasSelector(){ return $this->_has(1); } /** * Clear <selector> value * * @return \google\api\SystemParameterRule */ public function clearSelector(){ return $this->_clear(1); } /** * Get <selector> value * * @return string */ public function getSelector(){ return $this->_get(1); } /** * Set <selector> value * * @param string $value * @return \google\api\SystemParameterRule */ public function setSelector( $value){ return $this->_set(1, $value); } /** * Check if <parameters> has a value * * @return boolean */ public function hasParameters(){ return $this->_has(2); } /** * Clear <parameters> value * * @return \google\api\SystemParameterRule */ public function clearParameters(){ return $this->_clear(2); } /** * Get <parameters> value * * @param int $idx * @return \google\api\SystemParameter */ public function getParameters($idx = NULL){ return $this->_get(2, $idx); } /** * Set <parameters> value * * @param \google\api\SystemParameter $value * @return \google\api\SystemParameterRule */ public function setParameters(\google\api\SystemParameter $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of <parameters> * * @return \google\api\SystemParameter[] */ public function getParametersList(){ return $this->_get(2); } /** * Add a new element to <parameters> * * @param \google\api\SystemParameter $value * @return \google\api\SystemParameterRule */ public function addParameters(\google\api\SystemParameter $value){ return $this->_add(2, $value); } } } namespace google\api { class SystemParameter extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var string */ public $http_header = null; /** @var string */ public $url_query_parameter = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.SystemParameter'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING http_header = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "http_header"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING url_query_parameter = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "url_query_parameter"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\api\SystemParameter */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\api\SystemParameter */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <http_header> has a value * * @return boolean */ public function hasHttpHeader(){ return $this->_has(2); } /** * Clear <http_header> value * * @return \google\api\SystemParameter */ public function clearHttpHeader(){ return $this->_clear(2); } /** * Get <http_header> value * * @return string */ public function getHttpHeader(){ return $this->_get(2); } /** * Set <http_header> value * * @param string $value * @return \google\api\SystemParameter */ public function setHttpHeader( $value){ return $this->_set(2, $value); } /** * Check if <url_query_parameter> has a value * * @return boolean */ public function hasUrlQueryParameter(){ return $this->_has(3); } /** * Clear <url_query_parameter> value * * @return \google\api\SystemParameter */ public function clearUrlQueryParameter(){ return $this->_clear(3); } /** * Get <url_query_parameter> value * * @return string */ public function getUrlQueryParameter(){ return $this->_get(3); } /** * Set <url_query_parameter> value * * @param string $value * @return \google\api\SystemParameter */ public function setUrlQueryParameter( $value){ return $this->_set(3, $value); } } } ����������������������������������������������������������������������������src/generated/timeofday.php�������������������������������������������������������������������������0000644�����������������00000010666�15174274134�0012004 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php // DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 // Source: google/type/timeofday.proto // Date: 2016-11-23 22:55:01 namespace google\type { class TimeOfDay extends \DrSlump\Protobuf\Message { /** @var int */ public $hours = null; /** @var int */ public $minutes = null; /** @var int */ public $seconds = null; /** @var int */ public $nanos = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.type.TimeOfDay'); // OPTIONAL INT32 hours = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "hours"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 minutes = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "minutes"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 seconds = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "seconds"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 nanos = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "nanos"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <hours> has a value * * @return boolean */ public function hasHours(){ return $this->_has(1); } /** * Clear <hours> value * * @return \google\type\TimeOfDay */ public function clearHours(){ return $this->_clear(1); } /** * Get <hours> value * * @return int */ public function getHours(){ return $this->_get(1); } /** * Set <hours> value * * @param int $value * @return \google\type\TimeOfDay */ public function setHours( $value){ return $this->_set(1, $value); } /** * Check if <minutes> has a value * * @return boolean */ public function hasMinutes(){ return $this->_has(2); } /** * Clear <minutes> value * * @return \google\type\TimeOfDay */ public function clearMinutes(){ return $this->_clear(2); } /** * Get <minutes> value * * @return int */ public function getMinutes(){ return $this->_get(2); } /** * Set <minutes> value * * @param int $value * @return \google\type\TimeOfDay */ public function setMinutes( $value){ return $this->_set(2, $value); } /** * Check if <seconds> has a value * * @return boolean */ public function hasSeconds(){ return $this->_has(3); } /** * Clear <seconds> value * * @return \google\type\TimeOfDay */ public function clearSeconds(){ return $this->_clear(3); } /** * Get <seconds> value * * @return int */ public function getSeconds(){ return $this->_get(3); } /** * Set <seconds> value * * @param int $value * @return \google\type\TimeOfDay */ public function setSeconds( $value){ return $this->_set(3, $value); } /** * Check if <nanos> has a value * * @return boolean */ public function hasNanos(){ return $this->_has(4); } /** * Clear <nanos> value * * @return \google\type\TimeOfDay */ public function clearNanos(){ return $this->_clear(4); } /** * Get <nanos> value * * @return int */ public function getNanos(){ return $this->_get(4); } /** * Set <nanos> value * * @param int $value * @return \google\type\TimeOfDay */ public function setNanos( $value){ return $this->_set(4, $value); } } } ��������������������������������������������������������������������������src/generated/usage.php�����������������������������������������������������������������������������0000644�����������������00000014206�15174274134�0011121 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php // DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 // Source: google/api/usage.proto // Date: 2016-11-23 22:55:01 namespace google\api { class Usage extends \DrSlump\Protobuf\Message { /** @var string[] */ public $requirements = array(); /** @var \google\api\UsageRule[] */ public $rules = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.Usage'); // REPEATED STRING requirements = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "requirements"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); // REPEATED MESSAGE rules = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "rules"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\api\UsageRule'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <requirements> has a value * * @return boolean */ public function hasRequirements(){ return $this->_has(1); } /** * Clear <requirements> value * * @return \google\api\Usage */ public function clearRequirements(){ return $this->_clear(1); } /** * Get <requirements> value * * @param int $idx * @return string */ public function getRequirements($idx = NULL){ return $this->_get(1, $idx); } /** * Set <requirements> value * * @param string $value * @return \google\api\Usage */ public function setRequirements( $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of <requirements> * * @return string[] */ public function getRequirementsList(){ return $this->_get(1); } /** * Add a new element to <requirements> * * @param string $value * @return \google\api\Usage */ public function addRequirements( $value){ return $this->_add(1, $value); } /** * Check if <rules> has a value * * @return boolean */ public function hasRules(){ return $this->_has(6); } /** * Clear <rules> value * * @return \google\api\Usage */ public function clearRules(){ return $this->_clear(6); } /** * Get <rules> value * * @param int $idx * @return \google\api\UsageRule */ public function getRules($idx = NULL){ return $this->_get(6, $idx); } /** * Set <rules> value * * @param \google\api\UsageRule $value * @return \google\api\Usage */ public function setRules(\google\api\UsageRule $value, $idx = NULL){ return $this->_set(6, $value, $idx); } /** * Get all elements of <rules> * * @return \google\api\UsageRule[] */ public function getRulesList(){ return $this->_get(6); } /** * Add a new element to <rules> * * @param \google\api\UsageRule $value * @return \google\api\Usage */ public function addRules(\google\api\UsageRule $value){ return $this->_add(6, $value); } } } namespace google\api { class UsageRule extends \DrSlump\Protobuf\Message { /** @var string */ public $selector = null; /** @var boolean */ public $allow_unregistered_calls = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.api.UsageRule'); // OPTIONAL STRING selector = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "selector"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL BOOL allow_unregistered_calls = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "allow_unregistered_calls"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <selector> has a value * * @return boolean */ public function hasSelector(){ return $this->_has(1); } /** * Clear <selector> value * * @return \google\api\UsageRule */ public function clearSelector(){ return $this->_clear(1); } /** * Get <selector> value * * @return string */ public function getSelector(){ return $this->_get(1); } /** * Set <selector> value * * @param string $value * @return \google\api\UsageRule */ public function setSelector( $value){ return $this->_set(1, $value); } /** * Check if <allow_unregistered_calls> has a value * * @return boolean */ public function hasAllowUnregisteredCalls(){ return $this->_has(2); } /** * Clear <allow_unregistered_calls> value * * @return \google\api\UsageRule */ public function clearAllowUnregisteredCalls(){ return $this->_clear(2); } /** * Get <allow_unregistered_calls> value * * @return boolean */ public function getAllowUnregisteredCalls(){ return $this->_get(2); } /** * Set <allow_unregistered_calls> value * * @param boolean $value * @return \google\api\UsageRule */ public function setAllowUnregisteredCalls( $value){ return $this->_set(2, $value); } } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������src/generated/well-known-types/any.php��������������������������������������������������������������0000644�����������������00000005001�15174274134�0014034 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php // DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 // Source: google/protobuf/any.proto // Date: 2016-07-18 20:27:54 namespace google\protobuf { class Any extends \DrSlump\Protobuf\Message { /** @var string */ public $type_url = null; /** @var string */ public $value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Any'); // OPTIONAL STRING type_url = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "type_url"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL BYTES value = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "value"; $f->type = \DrSlump\Protobuf::TYPE_BYTES; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <type_url> has a value * * @return boolean */ public function hasTypeUrl(){ return $this->_has(1); } /** * Clear <type_url> value * * @return \google\protobuf\Any */ public function clearTypeUrl(){ return $this->_clear(1); } /** * Get <type_url> value * * @return string */ public function getTypeUrl(){ return $this->_get(1); } /** * Set <type_url> value * * @param string $value * @return \google\protobuf\Any */ public function setTypeUrl( $value){ return $this->_set(1, $value); } /** * Check if <value> has a value * * @return boolean */ public function hasValue(){ return $this->_has(2); } /** * Clear <value> value * * @return \google\protobuf\Any */ public function clearValue(){ return $this->_clear(2); } /** * Get <value> value * * @return string */ public function getValue(){ return $this->_get(2); } /** * Set <value> value * * @param string $value * @return \google\protobuf\Any */ public function setValue( $value){ return $this->_set(2, $value); } } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������src/generated/well-known-types/api.php��������������������������������������������������������������0000644�����������������00000050523�15174274134�0014027 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php // DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 // Source: google/protobuf/api.proto // Date: 2016-07-18 20:27:54 namespace google\protobuf { class Api extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var \google\protobuf\Method[] */ public $methods = array(); /** @var \google\protobuf\Option[] */ public $options = array(); /** @var string */ public $version = null; /** @var \google\protobuf\SourceContext */ public $source_context = null; /** @var \google\protobuf\Mixin[] */ public $mixins = array(); /** @var int - \google\protobuf\Syntax */ public $syntax = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Api'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE methods = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "methods"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\Method'; $descriptor->addField($f); // REPEATED MESSAGE options = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "options"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\Option'; $descriptor->addField($f); // OPTIONAL STRING version = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "version"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE source_context = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "source_context"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\SourceContext'; $descriptor->addField($f); // REPEATED MESSAGE mixins = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "mixins"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\Mixin'; $descriptor->addField($f); // OPTIONAL ENUM syntax = 7 $f = new \DrSlump\Protobuf\Field(); $f->number = 7; $f->name = "syntax"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Syntax'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\protobuf\Api */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\protobuf\Api */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <methods> has a value * * @return boolean */ public function hasMethods(){ return $this->_has(2); } /** * Clear <methods> value * * @return \google\protobuf\Api */ public function clearMethods(){ return $this->_clear(2); } /** * Get <methods> value * * @param int $idx * @return \google\protobuf\Method */ public function getMethods($idx = NULL){ return $this->_get(2, $idx); } /** * Set <methods> value * * @param \google\protobuf\Method $value * @return \google\protobuf\Api */ public function setMethods(\google\protobuf\Method $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of <methods> * * @return \google\protobuf\Method[] */ public function getMethodsList(){ return $this->_get(2); } /** * Add a new element to <methods> * * @param \google\protobuf\Method $value * @return \google\protobuf\Api */ public function addMethods(\google\protobuf\Method $value){ return $this->_add(2, $value); } /** * Check if <options> has a value * * @return boolean */ public function hasOptions(){ return $this->_has(3); } /** * Clear <options> value * * @return \google\protobuf\Api */ public function clearOptions(){ return $this->_clear(3); } /** * Get <options> value * * @param int $idx * @return \google\protobuf\Option */ public function getOptions($idx = NULL){ return $this->_get(3, $idx); } /** * Set <options> value * * @param \google\protobuf\Option $value * @return \google\protobuf\Api */ public function setOptions(\google\protobuf\Option $value, $idx = NULL){ return $this->_set(3, $value, $idx); } /** * Get all elements of <options> * * @return \google\protobuf\Option[] */ public function getOptionsList(){ return $this->_get(3); } /** * Add a new element to <options> * * @param \google\protobuf\Option $value * @return \google\protobuf\Api */ public function addOptions(\google\protobuf\Option $value){ return $this->_add(3, $value); } /** * Check if <version> has a value * * @return boolean */ public function hasVersion(){ return $this->_has(4); } /** * Clear <version> value * * @return \google\protobuf\Api */ public function clearVersion(){ return $this->_clear(4); } /** * Get <version> value * * @return string */ public function getVersion(){ return $this->_get(4); } /** * Set <version> value * * @param string $value * @return \google\protobuf\Api */ public function setVersion( $value){ return $this->_set(4, $value); } /** * Check if <source_context> has a value * * @return boolean */ public function hasSourceContext(){ return $this->_has(5); } /** * Clear <source_context> value * * @return \google\protobuf\Api */ public function clearSourceContext(){ return $this->_clear(5); } /** * Get <source_context> value * * @return \google\protobuf\SourceContext */ public function getSourceContext(){ return $this->_get(5); } /** * Set <source_context> value * * @param \google\protobuf\SourceContext $value * @return \google\protobuf\Api */ public function setSourceContext(\google\protobuf\SourceContext $value){ return $this->_set(5, $value); } /** * Check if <mixins> has a value * * @return boolean */ public function hasMixins(){ return $this->_has(6); } /** * Clear <mixins> value * * @return \google\protobuf\Api */ public function clearMixins(){ return $this->_clear(6); } /** * Get <mixins> value * * @param int $idx * @return \google\protobuf\Mixin */ public function getMixins($idx = NULL){ return $this->_get(6, $idx); } /** * Set <mixins> value * * @param \google\protobuf\Mixin $value * @return \google\protobuf\Api */ public function setMixins(\google\protobuf\Mixin $value, $idx = NULL){ return $this->_set(6, $value, $idx); } /** * Get all elements of <mixins> * * @return \google\protobuf\Mixin[] */ public function getMixinsList(){ return $this->_get(6); } /** * Add a new element to <mixins> * * @param \google\protobuf\Mixin $value * @return \google\protobuf\Api */ public function addMixins(\google\protobuf\Mixin $value){ return $this->_add(6, $value); } /** * Check if <syntax> has a value * * @return boolean */ public function hasSyntax(){ return $this->_has(7); } /** * Clear <syntax> value * * @return \google\protobuf\Api */ public function clearSyntax(){ return $this->_clear(7); } /** * Get <syntax> value * * @return int - \google\protobuf\Syntax */ public function getSyntax(){ return $this->_get(7); } /** * Set <syntax> value * * @param int - \google\protobuf\Syntax $value * @return \google\protobuf\Api */ public function setSyntax( $value){ return $this->_set(7, $value); } } } namespace google\protobuf { class Method extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var string */ public $request_type_url = null; /** @var boolean */ public $request_streaming = null; /** @var string */ public $response_type_url = null; /** @var boolean */ public $response_streaming = null; /** @var \google\protobuf\Option[] */ public $options = array(); /** @var int - \google\protobuf\Syntax */ public $syntax = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Method'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING request_type_url = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "request_type_url"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL BOOL request_streaming = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "request_streaming"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING response_type_url = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "response_type_url"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL BOOL response_streaming = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "response_streaming"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE options = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "options"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\Option'; $descriptor->addField($f); // OPTIONAL ENUM syntax = 7 $f = new \DrSlump\Protobuf\Field(); $f->number = 7; $f->name = "syntax"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Syntax'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\protobuf\Method */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\protobuf\Method */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <request_type_url> has a value * * @return boolean */ public function hasRequestTypeUrl(){ return $this->_has(2); } /** * Clear <request_type_url> value * * @return \google\protobuf\Method */ public function clearRequestTypeUrl(){ return $this->_clear(2); } /** * Get <request_type_url> value * * @return string */ public function getRequestTypeUrl(){ return $this->_get(2); } /** * Set <request_type_url> value * * @param string $value * @return \google\protobuf\Method */ public function setRequestTypeUrl( $value){ return $this->_set(2, $value); } /** * Check if <request_streaming> has a value * * @return boolean */ public function hasRequestStreaming(){ return $this->_has(3); } /** * Clear <request_streaming> value * * @return \google\protobuf\Method */ public function clearRequestStreaming(){ return $this->_clear(3); } /** * Get <request_streaming> value * * @return boolean */ public function getRequestStreaming(){ return $this->_get(3); } /** * Set <request_streaming> value * * @param boolean $value * @return \google\protobuf\Method */ public function setRequestStreaming( $value){ return $this->_set(3, $value); } /** * Check if <response_type_url> has a value * * @return boolean */ public function hasResponseTypeUrl(){ return $this->_has(4); } /** * Clear <response_type_url> value * * @return \google\protobuf\Method */ public function clearResponseTypeUrl(){ return $this->_clear(4); } /** * Get <response_type_url> value * * @return string */ public function getResponseTypeUrl(){ return $this->_get(4); } /** * Set <response_type_url> value * * @param string $value * @return \google\protobuf\Method */ public function setResponseTypeUrl( $value){ return $this->_set(4, $value); } /** * Check if <response_streaming> has a value * * @return boolean */ public function hasResponseStreaming(){ return $this->_has(5); } /** * Clear <response_streaming> value * * @return \google\protobuf\Method */ public function clearResponseStreaming(){ return $this->_clear(5); } /** * Get <response_streaming> value * * @return boolean */ public function getResponseStreaming(){ return $this->_get(5); } /** * Set <response_streaming> value * * @param boolean $value * @return \google\protobuf\Method */ public function setResponseStreaming( $value){ return $this->_set(5, $value); } /** * Check if <options> has a value * * @return boolean */ public function hasOptions(){ return $this->_has(6); } /** * Clear <options> value * * @return \google\protobuf\Method */ public function clearOptions(){ return $this->_clear(6); } /** * Get <options> value * * @param int $idx * @return \google\protobuf\Option */ public function getOptions($idx = NULL){ return $this->_get(6, $idx); } /** * Set <options> value * * @param \google\protobuf\Option $value * @return \google\protobuf\Method */ public function setOptions(\google\protobuf\Option $value, $idx = NULL){ return $this->_set(6, $value, $idx); } /** * Get all elements of <options> * * @return \google\protobuf\Option[] */ public function getOptionsList(){ return $this->_get(6); } /** * Add a new element to <options> * * @param \google\protobuf\Option $value * @return \google\protobuf\Method */ public function addOptions(\google\protobuf\Option $value){ return $this->_add(6, $value); } /** * Check if <syntax> has a value * * @return boolean */ public function hasSyntax(){ return $this->_has(7); } /** * Clear <syntax> value * * @return \google\protobuf\Method */ public function clearSyntax(){ return $this->_clear(7); } /** * Get <syntax> value * * @return int - \google\protobuf\Syntax */ public function getSyntax(){ return $this->_get(7); } /** * Set <syntax> value * * @param int - \google\protobuf\Syntax $value * @return \google\protobuf\Method */ public function setSyntax( $value){ return $this->_set(7, $value); } } } namespace google\protobuf { class Mixin extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var string */ public $root = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Mixin'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING root = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "root"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\protobuf\Mixin */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\protobuf\Mixin */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <root> has a value * * @return boolean */ public function hasRoot(){ return $this->_has(2); } /** * Clear <root> value * * @return \google\protobuf\Mixin */ public function clearRoot(){ return $this->_clear(2); } /** * Get <root> value * * @return string */ public function getRoot(){ return $this->_get(2); } /** * Set <root> value * * @param string $value * @return \google\protobuf\Mixin */ public function setRoot( $value){ return $this->_set(2, $value); } } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������src/generated/well-known-types/descriptor.php�������������������������������������������������������0000644�����������������00000467011�15174274134�0015440 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php // DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 // Source: google/protobuf/descriptor.proto // Date: 2016-07-18 20:27:55 namespace google\protobuf { class FileDescriptorSet extends \DrSlump\Protobuf\Message { /** @var \google\protobuf\FileDescriptorProto[] */ public $file = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.FileDescriptorSet'); // REPEATED MESSAGE file = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "file"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\FileDescriptorProto'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <file> has a value * * @return boolean */ public function hasFile(){ return $this->_has(1); } /** * Clear <file> value * * @return \google\protobuf\FileDescriptorSet */ public function clearFile(){ return $this->_clear(1); } /** * Get <file> value * * @param int $idx * @return \google\protobuf\FileDescriptorProto */ public function getFile($idx = NULL){ return $this->_get(1, $idx); } /** * Set <file> value * * @param \google\protobuf\FileDescriptorProto $value * @return \google\protobuf\FileDescriptorSet */ public function setFile(\google\protobuf\FileDescriptorProto $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of <file> * * @return \google\protobuf\FileDescriptorProto[] */ public function getFileList(){ return $this->_get(1); } /** * Add a new element to <file> * * @param \google\protobuf\FileDescriptorProto $value * @return \google\protobuf\FileDescriptorSet */ public function addFile(\google\protobuf\FileDescriptorProto $value){ return $this->_add(1, $value); } } } namespace google\protobuf { class FileDescriptorProto extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var string */ public $package = null; /** @var string[] */ public $dependency = array(); /** @var int[] */ public $public_dependency = array(); /** @var int[] */ public $weak_dependency = array(); /** @var \google\protobuf\DescriptorProto[] */ public $message_type = array(); /** @var \google\protobuf\EnumDescriptorProto[] */ public $enum_type = array(); /** @var \google\protobuf\ServiceDescriptorProto[] */ public $service = array(); /** @var \google\protobuf\FieldDescriptorProto[] */ public $extension = array(); /** @var \google\protobuf\FileOptions */ public $options = null; /** @var \google\protobuf\SourceCodeInfo */ public $source_code_info = null; /** @var string */ public $syntax = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.FileDescriptorProto'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING package = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "package"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED STRING dependency = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "dependency"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); // REPEATED INT32 public_dependency = 10 $f = new \DrSlump\Protobuf\Field(); $f->number = 10; $f->name = "public_dependency"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); // REPEATED INT32 weak_dependency = 11 $f = new \DrSlump\Protobuf\Field(); $f->number = 11; $f->name = "weak_dependency"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); // REPEATED MESSAGE message_type = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "message_type"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\DescriptorProto'; $descriptor->addField($f); // REPEATED MESSAGE enum_type = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "enum_type"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\EnumDescriptorProto'; $descriptor->addField($f); // REPEATED MESSAGE service = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "service"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\ServiceDescriptorProto'; $descriptor->addField($f); // REPEATED MESSAGE extension = 7 $f = new \DrSlump\Protobuf\Field(); $f->number = 7; $f->name = "extension"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\FieldDescriptorProto'; $descriptor->addField($f); // OPTIONAL MESSAGE options = 8 $f = new \DrSlump\Protobuf\Field(); $f->number = 8; $f->name = "options"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\FileOptions'; $descriptor->addField($f); // OPTIONAL MESSAGE source_code_info = 9 $f = new \DrSlump\Protobuf\Field(); $f->number = 9; $f->name = "source_code_info"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\SourceCodeInfo'; $descriptor->addField($f); // OPTIONAL STRING syntax = 12 $f = new \DrSlump\Protobuf\Field(); $f->number = 12; $f->name = "syntax"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\protobuf\FileDescriptorProto */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\protobuf\FileDescriptorProto */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <package> has a value * * @return boolean */ public function hasPackage(){ return $this->_has(2); } /** * Clear <package> value * * @return \google\protobuf\FileDescriptorProto */ public function clearPackage(){ return $this->_clear(2); } /** * Get <package> value * * @return string */ public function getPackage(){ return $this->_get(2); } /** * Set <package> value * * @param string $value * @return \google\protobuf\FileDescriptorProto */ public function setPackage( $value){ return $this->_set(2, $value); } /** * Check if <dependency> has a value * * @return boolean */ public function hasDependency(){ return $this->_has(3); } /** * Clear <dependency> value * * @return \google\protobuf\FileDescriptorProto */ public function clearDependency(){ return $this->_clear(3); } /** * Get <dependency> value * * @param int $idx * @return string */ public function getDependency($idx = NULL){ return $this->_get(3, $idx); } /** * Set <dependency> value * * @param string $value * @return \google\protobuf\FileDescriptorProto */ public function setDependency( $value, $idx = NULL){ return $this->_set(3, $value, $idx); } /** * Get all elements of <dependency> * * @return string[] */ public function getDependencyList(){ return $this->_get(3); } /** * Add a new element to <dependency> * * @param string $value * @return \google\protobuf\FileDescriptorProto */ public function addDependency( $value){ return $this->_add(3, $value); } /** * Check if <public_dependency> has a value * * @return boolean */ public function hasPublicDependency(){ return $this->_has(10); } /** * Clear <public_dependency> value * * @return \google\protobuf\FileDescriptorProto */ public function clearPublicDependency(){ return $this->_clear(10); } /** * Get <public_dependency> value * * @param int $idx * @return int */ public function getPublicDependency($idx = NULL){ return $this->_get(10, $idx); } /** * Set <public_dependency> value * * @param int $value * @return \google\protobuf\FileDescriptorProto */ public function setPublicDependency( $value, $idx = NULL){ return $this->_set(10, $value, $idx); } /** * Get all elements of <public_dependency> * * @return int[] */ public function getPublicDependencyList(){ return $this->_get(10); } /** * Add a new element to <public_dependency> * * @param int $value * @return \google\protobuf\FileDescriptorProto */ public function addPublicDependency( $value){ return $this->_add(10, $value); } /** * Check if <weak_dependency> has a value * * @return boolean */ public function hasWeakDependency(){ return $this->_has(11); } /** * Clear <weak_dependency> value * * @return \google\protobuf\FileDescriptorProto */ public function clearWeakDependency(){ return $this->_clear(11); } /** * Get <weak_dependency> value * * @param int $idx * @return int */ public function getWeakDependency($idx = NULL){ return $this->_get(11, $idx); } /** * Set <weak_dependency> value * * @param int $value * @return \google\protobuf\FileDescriptorProto */ public function setWeakDependency( $value, $idx = NULL){ return $this->_set(11, $value, $idx); } /** * Get all elements of <weak_dependency> * * @return int[] */ public function getWeakDependencyList(){ return $this->_get(11); } /** * Add a new element to <weak_dependency> * * @param int $value * @return \google\protobuf\FileDescriptorProto */ public function addWeakDependency( $value){ return $this->_add(11, $value); } /** * Check if <message_type> has a value * * @return boolean */ public function hasMessageType(){ return $this->_has(4); } /** * Clear <message_type> value * * @return \google\protobuf\FileDescriptorProto */ public function clearMessageType(){ return $this->_clear(4); } /** * Get <message_type> value * * @param int $idx * @return \google\protobuf\DescriptorProto */ public function getMessageType($idx = NULL){ return $this->_get(4, $idx); } /** * Set <message_type> value * * @param \google\protobuf\DescriptorProto $value * @return \google\protobuf\FileDescriptorProto */ public function setMessageType(\google\protobuf\DescriptorProto $value, $idx = NULL){ return $this->_set(4, $value, $idx); } /** * Get all elements of <message_type> * * @return \google\protobuf\DescriptorProto[] */ public function getMessageTypeList(){ return $this->_get(4); } /** * Add a new element to <message_type> * * @param \google\protobuf\DescriptorProto $value * @return \google\protobuf\FileDescriptorProto */ public function addMessageType(\google\protobuf\DescriptorProto $value){ return $this->_add(4, $value); } /** * Check if <enum_type> has a value * * @return boolean */ public function hasEnumType(){ return $this->_has(5); } /** * Clear <enum_type> value * * @return \google\protobuf\FileDescriptorProto */ public function clearEnumType(){ return $this->_clear(5); } /** * Get <enum_type> value * * @param int $idx * @return \google\protobuf\EnumDescriptorProto */ public function getEnumType($idx = NULL){ return $this->_get(5, $idx); } /** * Set <enum_type> value * * @param \google\protobuf\EnumDescriptorProto $value * @return \google\protobuf\FileDescriptorProto */ public function setEnumType(\google\protobuf\EnumDescriptorProto $value, $idx = NULL){ return $this->_set(5, $value, $idx); } /** * Get all elements of <enum_type> * * @return \google\protobuf\EnumDescriptorProto[] */ public function getEnumTypeList(){ return $this->_get(5); } /** * Add a new element to <enum_type> * * @param \google\protobuf\EnumDescriptorProto $value * @return \google\protobuf\FileDescriptorProto */ public function addEnumType(\google\protobuf\EnumDescriptorProto $value){ return $this->_add(5, $value); } /** * Check if <service> has a value * * @return boolean */ public function hasService(){ return $this->_has(6); } /** * Clear <service> value * * @return \google\protobuf\FileDescriptorProto */ public function clearService(){ return $this->_clear(6); } /** * Get <service> value * * @param int $idx * @return \google\protobuf\ServiceDescriptorProto */ public function getService($idx = NULL){ return $this->_get(6, $idx); } /** * Set <service> value * * @param \google\protobuf\ServiceDescriptorProto $value * @return \google\protobuf\FileDescriptorProto */ public function setService(\google\protobuf\ServiceDescriptorProto $value, $idx = NULL){ return $this->_set(6, $value, $idx); } /** * Get all elements of <service> * * @return \google\protobuf\ServiceDescriptorProto[] */ public function getServiceList(){ return $this->_get(6); } /** * Add a new element to <service> * * @param \google\protobuf\ServiceDescriptorProto $value * @return \google\protobuf\FileDescriptorProto */ public function addService(\google\protobuf\ServiceDescriptorProto $value){ return $this->_add(6, $value); } /** * Check if <extension> has a value * * @return boolean */ public function hasExtension(){ return $this->_has(7); } /** * Clear <extension> value * * @return \google\protobuf\FileDescriptorProto */ public function clearExtension(){ return $this->_clear(7); } /** * Get <extension> value * * @param int $idx * @return \google\protobuf\FieldDescriptorProto */ public function getExtension($idx = NULL){ return $this->_get(7, $idx); } /** * Set <extension> value * * @param \google\protobuf\FieldDescriptorProto $value * @return \google\protobuf\FileDescriptorProto */ public function setExtension(\google\protobuf\FieldDescriptorProto $value, $idx = NULL){ return $this->_set(7, $value, $idx); } /** * Get all elements of <extension> * * @return \google\protobuf\FieldDescriptorProto[] */ public function getExtensionList(){ return $this->_get(7); } /** * Add a new element to <extension> * * @param \google\protobuf\FieldDescriptorProto $value * @return \google\protobuf\FileDescriptorProto */ public function addExtension(\google\protobuf\FieldDescriptorProto $value){ return $this->_add(7, $value); } /** * Check if <options> has a value * * @return boolean */ public function hasOptions(){ return $this->_has(8); } /** * Clear <options> value * * @return \google\protobuf\FileDescriptorProto */ public function clearOptions(){ return $this->_clear(8); } /** * Get <options> value * * @return \google\protobuf\FileOptions */ public function getOptions(){ return $this->_get(8); } /** * Set <options> value * * @param \google\protobuf\FileOptions $value * @return \google\protobuf\FileDescriptorProto */ public function setOptions(\google\protobuf\FileOptions $value){ return $this->_set(8, $value); } /** * Check if <source_code_info> has a value * * @return boolean */ public function hasSourceCodeInfo(){ return $this->_has(9); } /** * Clear <source_code_info> value * * @return \google\protobuf\FileDescriptorProto */ public function clearSourceCodeInfo(){ return $this->_clear(9); } /** * Get <source_code_info> value * * @return \google\protobuf\SourceCodeInfo */ public function getSourceCodeInfo(){ return $this->_get(9); } /** * Set <source_code_info> value * * @param \google\protobuf\SourceCodeInfo $value * @return \google\protobuf\FileDescriptorProto */ public function setSourceCodeInfo(\google\protobuf\SourceCodeInfo $value){ return $this->_set(9, $value); } /** * Check if <syntax> has a value * * @return boolean */ public function hasSyntax(){ return $this->_has(12); } /** * Clear <syntax> value * * @return \google\protobuf\FileDescriptorProto */ public function clearSyntax(){ return $this->_clear(12); } /** * Get <syntax> value * * @return string */ public function getSyntax(){ return $this->_get(12); } /** * Set <syntax> value * * @param string $value * @return \google\protobuf\FileDescriptorProto */ public function setSyntax( $value){ return $this->_set(12, $value); } } } namespace google\protobuf\DescriptorProto { class ExtensionRange extends \DrSlump\Protobuf\Message { /** @var int */ public $start = null; /** @var int */ public $end = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.DescriptorProto.ExtensionRange'); // OPTIONAL INT32 start = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "start"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 end = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "end"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <start> has a value * * @return boolean */ public function hasStart(){ return $this->_has(1); } /** * Clear <start> value * * @return \google\protobuf\DescriptorProto\ExtensionRange */ public function clearStart(){ return $this->_clear(1); } /** * Get <start> value * * @return int */ public function getStart(){ return $this->_get(1); } /** * Set <start> value * * @param int $value * @return \google\protobuf\DescriptorProto\ExtensionRange */ public function setStart( $value){ return $this->_set(1, $value); } /** * Check if <end> has a value * * @return boolean */ public function hasEnd(){ return $this->_has(2); } /** * Clear <end> value * * @return \google\protobuf\DescriptorProto\ExtensionRange */ public function clearEnd(){ return $this->_clear(2); } /** * Get <end> value * * @return int */ public function getEnd(){ return $this->_get(2); } /** * Set <end> value * * @param int $value * @return \google\protobuf\DescriptorProto\ExtensionRange */ public function setEnd( $value){ return $this->_set(2, $value); } } } namespace google\protobuf\DescriptorProto { class ReservedRange extends \DrSlump\Protobuf\Message { /** @var int */ public $start = null; /** @var int */ public $end = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.DescriptorProto.ReservedRange'); // OPTIONAL INT32 start = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "start"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 end = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "end"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <start> has a value * * @return boolean */ public function hasStart(){ return $this->_has(1); } /** * Clear <start> value * * @return \google\protobuf\DescriptorProto\ReservedRange */ public function clearStart(){ return $this->_clear(1); } /** * Get <start> value * * @return int */ public function getStart(){ return $this->_get(1); } /** * Set <start> value * * @param int $value * @return \google\protobuf\DescriptorProto\ReservedRange */ public function setStart( $value){ return $this->_set(1, $value); } /** * Check if <end> has a value * * @return boolean */ public function hasEnd(){ return $this->_has(2); } /** * Clear <end> value * * @return \google\protobuf\DescriptorProto\ReservedRange */ public function clearEnd(){ return $this->_clear(2); } /** * Get <end> value * * @return int */ public function getEnd(){ return $this->_get(2); } /** * Set <end> value * * @param int $value * @return \google\protobuf\DescriptorProto\ReservedRange */ public function setEnd( $value){ return $this->_set(2, $value); } } } namespace google\protobuf { class DescriptorProto extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var \google\protobuf\FieldDescriptorProto[] */ public $field = array(); /** @var \google\protobuf\FieldDescriptorProto[] */ public $extension = array(); /** @var \google\protobuf\DescriptorProto[] */ public $nested_type = array(); /** @var \google\protobuf\EnumDescriptorProto[] */ public $enum_type = array(); /** @var \google\protobuf\DescriptorProto\ExtensionRange[] */ public $extension_range = array(); /** @var \google\protobuf\OneofDescriptorProto[] */ public $oneof_decl = array(); /** @var \google\protobuf\MessageOptions */ public $options = null; /** @var \google\protobuf\DescriptorProto\ReservedRange[] */ public $reserved_range = array(); /** @var string[] */ public $reserved_name = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.DescriptorProto'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE field = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "field"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\FieldDescriptorProto'; $descriptor->addField($f); // REPEATED MESSAGE extension = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "extension"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\FieldDescriptorProto'; $descriptor->addField($f); // REPEATED MESSAGE nested_type = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "nested_type"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\DescriptorProto'; $descriptor->addField($f); // REPEATED MESSAGE enum_type = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "enum_type"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\EnumDescriptorProto'; $descriptor->addField($f); // REPEATED MESSAGE extension_range = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "extension_range"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\DescriptorProto\ExtensionRange'; $descriptor->addField($f); // REPEATED MESSAGE oneof_decl = 8 $f = new \DrSlump\Protobuf\Field(); $f->number = 8; $f->name = "oneof_decl"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\OneofDescriptorProto'; $descriptor->addField($f); // OPTIONAL MESSAGE options = 7 $f = new \DrSlump\Protobuf\Field(); $f->number = 7; $f->name = "options"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\MessageOptions'; $descriptor->addField($f); // REPEATED MESSAGE reserved_range = 9 $f = new \DrSlump\Protobuf\Field(); $f->number = 9; $f->name = "reserved_range"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\DescriptorProto\ReservedRange'; $descriptor->addField($f); // REPEATED STRING reserved_name = 10 $f = new \DrSlump\Protobuf\Field(); $f->number = 10; $f->name = "reserved_name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\protobuf\DescriptorProto */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\protobuf\DescriptorProto */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <field> has a value * * @return boolean */ public function hasField(){ return $this->_has(2); } /** * Clear <field> value * * @return \google\protobuf\DescriptorProto */ public function clearField(){ return $this->_clear(2); } /** * Get <field> value * * @param int $idx * @return \google\protobuf\FieldDescriptorProto */ public function getField($idx = NULL){ return $this->_get(2, $idx); } /** * Set <field> value * * @param \google\protobuf\FieldDescriptorProto $value * @return \google\protobuf\DescriptorProto */ public function setField(\google\protobuf\FieldDescriptorProto $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of <field> * * @return \google\protobuf\FieldDescriptorProto[] */ public function getFieldList(){ return $this->_get(2); } /** * Add a new element to <field> * * @param \google\protobuf\FieldDescriptorProto $value * @return \google\protobuf\DescriptorProto */ public function addField(\google\protobuf\FieldDescriptorProto $value){ return $this->_add(2, $value); } /** * Check if <extension> has a value * * @return boolean */ public function hasExtension(){ return $this->_has(6); } /** * Clear <extension> value * * @return \google\protobuf\DescriptorProto */ public function clearExtension(){ return $this->_clear(6); } /** * Get <extension> value * * @param int $idx * @return \google\protobuf\FieldDescriptorProto */ public function getExtension($idx = NULL){ return $this->_get(6, $idx); } /** * Set <extension> value * * @param \google\protobuf\FieldDescriptorProto $value * @return \google\protobuf\DescriptorProto */ public function setExtension(\google\protobuf\FieldDescriptorProto $value, $idx = NULL){ return $this->_set(6, $value, $idx); } /** * Get all elements of <extension> * * @return \google\protobuf\FieldDescriptorProto[] */ public function getExtensionList(){ return $this->_get(6); } /** * Add a new element to <extension> * * @param \google\protobuf\FieldDescriptorProto $value * @return \google\protobuf\DescriptorProto */ public function addExtension(\google\protobuf\FieldDescriptorProto $value){ return $this->_add(6, $value); } /** * Check if <nested_type> has a value * * @return boolean */ public function hasNestedType(){ return $this->_has(3); } /** * Clear <nested_type> value * * @return \google\protobuf\DescriptorProto */ public function clearNestedType(){ return $this->_clear(3); } /** * Get <nested_type> value * * @param int $idx * @return \google\protobuf\DescriptorProto */ public function getNestedType($idx = NULL){ return $this->_get(3, $idx); } /** * Set <nested_type> value * * @param \google\protobuf\DescriptorProto $value * @return \google\protobuf\DescriptorProto */ public function setNestedType(\google\protobuf\DescriptorProto $value, $idx = NULL){ return $this->_set(3, $value, $idx); } /** * Get all elements of <nested_type> * * @return \google\protobuf\DescriptorProto[] */ public function getNestedTypeList(){ return $this->_get(3); } /** * Add a new element to <nested_type> * * @param \google\protobuf\DescriptorProto $value * @return \google\protobuf\DescriptorProto */ public function addNestedType(\google\protobuf\DescriptorProto $value){ return $this->_add(3, $value); } /** * Check if <enum_type> has a value * * @return boolean */ public function hasEnumType(){ return $this->_has(4); } /** * Clear <enum_type> value * * @return \google\protobuf\DescriptorProto */ public function clearEnumType(){ return $this->_clear(4); } /** * Get <enum_type> value * * @param int $idx * @return \google\protobuf\EnumDescriptorProto */ public function getEnumType($idx = NULL){ return $this->_get(4, $idx); } /** * Set <enum_type> value * * @param \google\protobuf\EnumDescriptorProto $value * @return \google\protobuf\DescriptorProto */ public function setEnumType(\google\protobuf\EnumDescriptorProto $value, $idx = NULL){ return $this->_set(4, $value, $idx); } /** * Get all elements of <enum_type> * * @return \google\protobuf\EnumDescriptorProto[] */ public function getEnumTypeList(){ return $this->_get(4); } /** * Add a new element to <enum_type> * * @param \google\protobuf\EnumDescriptorProto $value * @return \google\protobuf\DescriptorProto */ public function addEnumType(\google\protobuf\EnumDescriptorProto $value){ return $this->_add(4, $value); } /** * Check if <extension_range> has a value * * @return boolean */ public function hasExtensionRange(){ return $this->_has(5); } /** * Clear <extension_range> value * * @return \google\protobuf\DescriptorProto */ public function clearExtensionRange(){ return $this->_clear(5); } /** * Get <extension_range> value * * @param int $idx * @return \google\protobuf\DescriptorProto\ExtensionRange */ public function getExtensionRange($idx = NULL){ return $this->_get(5, $idx); } /** * Set <extension_range> value * * @param \google\protobuf\DescriptorProto\ExtensionRange $value * @return \google\protobuf\DescriptorProto */ public function setExtensionRange(\google\protobuf\DescriptorProto\ExtensionRange $value, $idx = NULL){ return $this->_set(5, $value, $idx); } /** * Get all elements of <extension_range> * * @return \google\protobuf\DescriptorProto\ExtensionRange[] */ public function getExtensionRangeList(){ return $this->_get(5); } /** * Add a new element to <extension_range> * * @param \google\protobuf\DescriptorProto\ExtensionRange $value * @return \google\protobuf\DescriptorProto */ public function addExtensionRange(\google\protobuf\DescriptorProto\ExtensionRange $value){ return $this->_add(5, $value); } /** * Check if <oneof_decl> has a value * * @return boolean */ public function hasOneofDecl(){ return $this->_has(8); } /** * Clear <oneof_decl> value * * @return \google\protobuf\DescriptorProto */ public function clearOneofDecl(){ return $this->_clear(8); } /** * Get <oneof_decl> value * * @param int $idx * @return \google\protobuf\OneofDescriptorProto */ public function getOneofDecl($idx = NULL){ return $this->_get(8, $idx); } /** * Set <oneof_decl> value * * @param \google\protobuf\OneofDescriptorProto $value * @return \google\protobuf\DescriptorProto */ public function setOneofDecl(\google\protobuf\OneofDescriptorProto $value, $idx = NULL){ return $this->_set(8, $value, $idx); } /** * Get all elements of <oneof_decl> * * @return \google\protobuf\OneofDescriptorProto[] */ public function getOneofDeclList(){ return $this->_get(8); } /** * Add a new element to <oneof_decl> * * @param \google\protobuf\OneofDescriptorProto $value * @return \google\protobuf\DescriptorProto */ public function addOneofDecl(\google\protobuf\OneofDescriptorProto $value){ return $this->_add(8, $value); } /** * Check if <options> has a value * * @return boolean */ public function hasOptions(){ return $this->_has(7); } /** * Clear <options> value * * @return \google\protobuf\DescriptorProto */ public function clearOptions(){ return $this->_clear(7); } /** * Get <options> value * * @return \google\protobuf\MessageOptions */ public function getOptions(){ return $this->_get(7); } /** * Set <options> value * * @param \google\protobuf\MessageOptions $value * @return \google\protobuf\DescriptorProto */ public function setOptions(\google\protobuf\MessageOptions $value){ return $this->_set(7, $value); } /** * Check if <reserved_range> has a value * * @return boolean */ public function hasReservedRange(){ return $this->_has(9); } /** * Clear <reserved_range> value * * @return \google\protobuf\DescriptorProto */ public function clearReservedRange(){ return $this->_clear(9); } /** * Get <reserved_range> value * * @param int $idx * @return \google\protobuf\DescriptorProto\ReservedRange */ public function getReservedRange($idx = NULL){ return $this->_get(9, $idx); } /** * Set <reserved_range> value * * @param \google\protobuf\DescriptorProto\ReservedRange $value * @return \google\protobuf\DescriptorProto */ public function setReservedRange(\google\protobuf\DescriptorProto\ReservedRange $value, $idx = NULL){ return $this->_set(9, $value, $idx); } /** * Get all elements of <reserved_range> * * @return \google\protobuf\DescriptorProto\ReservedRange[] */ public function getReservedRangeList(){ return $this->_get(9); } /** * Add a new element to <reserved_range> * * @param \google\protobuf\DescriptorProto\ReservedRange $value * @return \google\protobuf\DescriptorProto */ public function addReservedRange(\google\protobuf\DescriptorProto\ReservedRange $value){ return $this->_add(9, $value); } /** * Check if <reserved_name> has a value * * @return boolean */ public function hasReservedName(){ return $this->_has(10); } /** * Clear <reserved_name> value * * @return \google\protobuf\DescriptorProto */ public function clearReservedName(){ return $this->_clear(10); } /** * Get <reserved_name> value * * @param int $idx * @return string */ public function getReservedName($idx = NULL){ return $this->_get(10, $idx); } /** * Set <reserved_name> value * * @param string $value * @return \google\protobuf\DescriptorProto */ public function setReservedName( $value, $idx = NULL){ return $this->_set(10, $value, $idx); } /** * Get all elements of <reserved_name> * * @return string[] */ public function getReservedNameList(){ return $this->_get(10); } /** * Add a new element to <reserved_name> * * @param string $value * @return \google\protobuf\DescriptorProto */ public function addReservedName( $value){ return $this->_add(10, $value); } } } namespace google\protobuf\FieldDescriptorProto { class Type extends \DrSlump\Protobuf\Enum { const TYPE_DOUBLE = 1; const TYPE_FLOAT = 2; const TYPE_INT64 = 3; const TYPE_UINT64 = 4; const TYPE_INT32 = 5; const TYPE_FIXED64 = 6; const TYPE_FIXED32 = 7; const TYPE_BOOL = 8; const TYPE_STRING = 9; const TYPE_GROUP = 10; const TYPE_MESSAGE = 11; const TYPE_BYTES = 12; const TYPE_UINT32 = 13; const TYPE_ENUM = 14; const TYPE_SFIXED32 = 15; const TYPE_SFIXED64 = 16; const TYPE_SINT32 = 17; const TYPE_SINT64 = 18; } } namespace google\protobuf\FieldDescriptorProto { class Label extends \DrSlump\Protobuf\Enum { const LABEL_OPTIONAL = 1; const LABEL_REQUIRED = 2; const LABEL_REPEATED = 3; } } namespace google\protobuf { class FieldDescriptorProto extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var int */ public $number = null; /** @var int - \google\protobuf\FieldDescriptorProto\Label */ public $label = null; /** @var int - \google\protobuf\FieldDescriptorProto\Type */ public $type = null; /** @var string */ public $type_name = null; /** @var string */ public $extendee = null; /** @var string */ public $default_value = null; /** @var int */ public $oneof_index = null; /** @var string */ public $json_name = null; /** @var \google\protobuf\FieldOptions */ public $options = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.FieldDescriptorProto'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 number = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "number"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL ENUM label = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "label"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\FieldDescriptorProto\Label'; $descriptor->addField($f); // OPTIONAL ENUM type = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "type"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\FieldDescriptorProto\Type'; $descriptor->addField($f); // OPTIONAL STRING type_name = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "type_name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING extendee = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "extendee"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING default_value = 7 $f = new \DrSlump\Protobuf\Field(); $f->number = 7; $f->name = "default_value"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 oneof_index = 9 $f = new \DrSlump\Protobuf\Field(); $f->number = 9; $f->name = "oneof_index"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING json_name = 10 $f = new \DrSlump\Protobuf\Field(); $f->number = 10; $f->name = "json_name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE options = 8 $f = new \DrSlump\Protobuf\Field(); $f->number = 8; $f->name = "options"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\FieldOptions'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\protobuf\FieldDescriptorProto */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\protobuf\FieldDescriptorProto */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <number> has a value * * @return boolean */ public function hasNumber(){ return $this->_has(3); } /** * Clear <number> value * * @return \google\protobuf\FieldDescriptorProto */ public function clearNumber(){ return $this->_clear(3); } /** * Get <number> value * * @return int */ public function getNumber(){ return $this->_get(3); } /** * Set <number> value * * @param int $value * @return \google\protobuf\FieldDescriptorProto */ public function setNumber( $value){ return $this->_set(3, $value); } /** * Check if <label> has a value * * @return boolean */ public function hasLabel(){ return $this->_has(4); } /** * Clear <label> value * * @return \google\protobuf\FieldDescriptorProto */ public function clearLabel(){ return $this->_clear(4); } /** * Get <label> value * * @return int - \google\protobuf\FieldDescriptorProto\Label */ public function getLabel(){ return $this->_get(4); } /** * Set <label> value * * @param int - \google\protobuf\FieldDescriptorProto\Label $value * @return \google\protobuf\FieldDescriptorProto */ public function setLabel( $value){ return $this->_set(4, $value); } /** * Check if <type> has a value * * @return boolean */ public function hasType(){ return $this->_has(5); } /** * Clear <type> value * * @return \google\protobuf\FieldDescriptorProto */ public function clearType(){ return $this->_clear(5); } /** * Get <type> value * * @return int - \google\protobuf\FieldDescriptorProto\Type */ public function getType(){ return $this->_get(5); } /** * Set <type> value * * @param int - \google\protobuf\FieldDescriptorProto\Type $value * @return \google\protobuf\FieldDescriptorProto */ public function setType( $value){ return $this->_set(5, $value); } /** * Check if <type_name> has a value * * @return boolean */ public function hasTypeName(){ return $this->_has(6); } /** * Clear <type_name> value * * @return \google\protobuf\FieldDescriptorProto */ public function clearTypeName(){ return $this->_clear(6); } /** * Get <type_name> value * * @return string */ public function getTypeName(){ return $this->_get(6); } /** * Set <type_name> value * * @param string $value * @return \google\protobuf\FieldDescriptorProto */ public function setTypeName( $value){ return $this->_set(6, $value); } /** * Check if <extendee> has a value * * @return boolean */ public function hasExtendee(){ return $this->_has(2); } /** * Clear <extendee> value * * @return \google\protobuf\FieldDescriptorProto */ public function clearExtendee(){ return $this->_clear(2); } /** * Get <extendee> value * * @return string */ public function getExtendee(){ return $this->_get(2); } /** * Set <extendee> value * * @param string $value * @return \google\protobuf\FieldDescriptorProto */ public function setExtendee( $value){ return $this->_set(2, $value); } /** * Check if <default_value> has a value * * @return boolean */ public function hasDefaultValue(){ return $this->_has(7); } /** * Clear <default_value> value * * @return \google\protobuf\FieldDescriptorProto */ public function clearDefaultValue(){ return $this->_clear(7); } /** * Get <default_value> value * * @return string */ public function getDefaultValue(){ return $this->_get(7); } /** * Set <default_value> value * * @param string $value * @return \google\protobuf\FieldDescriptorProto */ public function setDefaultValue( $value){ return $this->_set(7, $value); } /** * Check if <oneof_index> has a value * * @return boolean */ public function hasOneofIndex(){ return $this->_has(9); } /** * Clear <oneof_index> value * * @return \google\protobuf\FieldDescriptorProto */ public function clearOneofIndex(){ return $this->_clear(9); } /** * Get <oneof_index> value * * @return int */ public function getOneofIndex(){ return $this->_get(9); } /** * Set <oneof_index> value * * @param int $value * @return \google\protobuf\FieldDescriptorProto */ public function setOneofIndex( $value){ return $this->_set(9, $value); } /** * Check if <json_name> has a value * * @return boolean */ public function hasJsonName(){ return $this->_has(10); } /** * Clear <json_name> value * * @return \google\protobuf\FieldDescriptorProto */ public function clearJsonName(){ return $this->_clear(10); } /** * Get <json_name> value * * @return string */ public function getJsonName(){ return $this->_get(10); } /** * Set <json_name> value * * @param string $value * @return \google\protobuf\FieldDescriptorProto */ public function setJsonName( $value){ return $this->_set(10, $value); } /** * Check if <options> has a value * * @return boolean */ public function hasOptions(){ return $this->_has(8); } /** * Clear <options> value * * @return \google\protobuf\FieldDescriptorProto */ public function clearOptions(){ return $this->_clear(8); } /** * Get <options> value * * @return \google\protobuf\FieldOptions */ public function getOptions(){ return $this->_get(8); } /** * Set <options> value * * @param \google\protobuf\FieldOptions $value * @return \google\protobuf\FieldDescriptorProto */ public function setOptions(\google\protobuf\FieldOptions $value){ return $this->_set(8, $value); } } } namespace google\protobuf { class OneofDescriptorProto extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var \google\protobuf\OneofOptions */ public $options = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.OneofDescriptorProto'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE options = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "options"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\OneofOptions'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\protobuf\OneofDescriptorProto */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\protobuf\OneofDescriptorProto */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <options> has a value * * @return boolean */ public function hasOptions(){ return $this->_has(2); } /** * Clear <options> value * * @return \google\protobuf\OneofDescriptorProto */ public function clearOptions(){ return $this->_clear(2); } /** * Get <options> value * * @return \google\protobuf\OneofOptions */ public function getOptions(){ return $this->_get(2); } /** * Set <options> value * * @param \google\protobuf\OneofOptions $value * @return \google\protobuf\OneofDescriptorProto */ public function setOptions(\google\protobuf\OneofOptions $value){ return $this->_set(2, $value); } } } namespace google\protobuf { class EnumDescriptorProto extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var \google\protobuf\EnumValueDescriptorProto[] */ public $value = array(); /** @var \google\protobuf\EnumOptions */ public $options = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.EnumDescriptorProto'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE value = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "value"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\EnumValueDescriptorProto'; $descriptor->addField($f); // OPTIONAL MESSAGE options = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "options"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\EnumOptions'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\protobuf\EnumDescriptorProto */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\protobuf\EnumDescriptorProto */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <value> has a value * * @return boolean */ public function hasValue(){ return $this->_has(2); } /** * Clear <value> value * * @return \google\protobuf\EnumDescriptorProto */ public function clearValue(){ return $this->_clear(2); } /** * Get <value> value * * @param int $idx * @return \google\protobuf\EnumValueDescriptorProto */ public function getValue($idx = NULL){ return $this->_get(2, $idx); } /** * Set <value> value * * @param \google\protobuf\EnumValueDescriptorProto $value * @return \google\protobuf\EnumDescriptorProto */ public function setValue(\google\protobuf\EnumValueDescriptorProto $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of <value> * * @return \google\protobuf\EnumValueDescriptorProto[] */ public function getValueList(){ return $this->_get(2); } /** * Add a new element to <value> * * @param \google\protobuf\EnumValueDescriptorProto $value * @return \google\protobuf\EnumDescriptorProto */ public function addValue(\google\protobuf\EnumValueDescriptorProto $value){ return $this->_add(2, $value); } /** * Check if <options> has a value * * @return boolean */ public function hasOptions(){ return $this->_has(3); } /** * Clear <options> value * * @return \google\protobuf\EnumDescriptorProto */ public function clearOptions(){ return $this->_clear(3); } /** * Get <options> value * * @return \google\protobuf\EnumOptions */ public function getOptions(){ return $this->_get(3); } /** * Set <options> value * * @param \google\protobuf\EnumOptions $value * @return \google\protobuf\EnumDescriptorProto */ public function setOptions(\google\protobuf\EnumOptions $value){ return $this->_set(3, $value); } } } namespace google\protobuf { class EnumValueDescriptorProto extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var int */ public $number = null; /** @var \google\protobuf\EnumValueOptions */ public $options = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.EnumValueDescriptorProto'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 number = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "number"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE options = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "options"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\EnumValueOptions'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\protobuf\EnumValueDescriptorProto */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\protobuf\EnumValueDescriptorProto */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <number> has a value * * @return boolean */ public function hasNumber(){ return $this->_has(2); } /** * Clear <number> value * * @return \google\protobuf\EnumValueDescriptorProto */ public function clearNumber(){ return $this->_clear(2); } /** * Get <number> value * * @return int */ public function getNumber(){ return $this->_get(2); } /** * Set <number> value * * @param int $value * @return \google\protobuf\EnumValueDescriptorProto */ public function setNumber( $value){ return $this->_set(2, $value); } /** * Check if <options> has a value * * @return boolean */ public function hasOptions(){ return $this->_has(3); } /** * Clear <options> value * * @return \google\protobuf\EnumValueDescriptorProto */ public function clearOptions(){ return $this->_clear(3); } /** * Get <options> value * * @return \google\protobuf\EnumValueOptions */ public function getOptions(){ return $this->_get(3); } /** * Set <options> value * * @param \google\protobuf\EnumValueOptions $value * @return \google\protobuf\EnumValueDescriptorProto */ public function setOptions(\google\protobuf\EnumValueOptions $value){ return $this->_set(3, $value); } } } namespace google\protobuf { class ServiceDescriptorProto extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var \google\protobuf\MethodDescriptorProto[] */ public $method = array(); /** @var \google\protobuf\ServiceOptions */ public $options = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.ServiceDescriptorProto'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE method = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "method"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\MethodDescriptorProto'; $descriptor->addField($f); // OPTIONAL MESSAGE options = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "options"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\ServiceOptions'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\protobuf\ServiceDescriptorProto */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\protobuf\ServiceDescriptorProto */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <method> has a value * * @return boolean */ public function hasMethod(){ return $this->_has(2); } /** * Clear <method> value * * @return \google\protobuf\ServiceDescriptorProto */ public function clearMethod(){ return $this->_clear(2); } /** * Get <method> value * * @param int $idx * @return \google\protobuf\MethodDescriptorProto */ public function getMethod($idx = NULL){ return $this->_get(2, $idx); } /** * Set <method> value * * @param \google\protobuf\MethodDescriptorProto $value * @return \google\protobuf\ServiceDescriptorProto */ public function setMethod(\google\protobuf\MethodDescriptorProto $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of <method> * * @return \google\protobuf\MethodDescriptorProto[] */ public function getMethodList(){ return $this->_get(2); } /** * Add a new element to <method> * * @param \google\protobuf\MethodDescriptorProto $value * @return \google\protobuf\ServiceDescriptorProto */ public function addMethod(\google\protobuf\MethodDescriptorProto $value){ return $this->_add(2, $value); } /** * Check if <options> has a value * * @return boolean */ public function hasOptions(){ return $this->_has(3); } /** * Clear <options> value * * @return \google\protobuf\ServiceDescriptorProto */ public function clearOptions(){ return $this->_clear(3); } /** * Get <options> value * * @return \google\protobuf\ServiceOptions */ public function getOptions(){ return $this->_get(3); } /** * Set <options> value * * @param \google\protobuf\ServiceOptions $value * @return \google\protobuf\ServiceDescriptorProto */ public function setOptions(\google\protobuf\ServiceOptions $value){ return $this->_set(3, $value); } } } namespace google\protobuf { class MethodDescriptorProto extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var string */ public $input_type = null; /** @var string */ public $output_type = null; /** @var \google\protobuf\MethodOptions */ public $options = null; /** @var boolean */ public $client_streaming = false; /** @var boolean */ public $server_streaming = false; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.MethodDescriptorProto'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING input_type = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "input_type"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING output_type = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "output_type"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE options = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "options"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\MethodOptions'; $descriptor->addField($f); // OPTIONAL BOOL client_streaming = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "client_streaming"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // OPTIONAL BOOL server_streaming = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "server_streaming"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\protobuf\MethodDescriptorProto */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\protobuf\MethodDescriptorProto */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <input_type> has a value * * @return boolean */ public function hasInputType(){ return $this->_has(2); } /** * Clear <input_type> value * * @return \google\protobuf\MethodDescriptorProto */ public function clearInputType(){ return $this->_clear(2); } /** * Get <input_type> value * * @return string */ public function getInputType(){ return $this->_get(2); } /** * Set <input_type> value * * @param string $value * @return \google\protobuf\MethodDescriptorProto */ public function setInputType( $value){ return $this->_set(2, $value); } /** * Check if <output_type> has a value * * @return boolean */ public function hasOutputType(){ return $this->_has(3); } /** * Clear <output_type> value * * @return \google\protobuf\MethodDescriptorProto */ public function clearOutputType(){ return $this->_clear(3); } /** * Get <output_type> value * * @return string */ public function getOutputType(){ return $this->_get(3); } /** * Set <output_type> value * * @param string $value * @return \google\protobuf\MethodDescriptorProto */ public function setOutputType( $value){ return $this->_set(3, $value); } /** * Check if <options> has a value * * @return boolean */ public function hasOptions(){ return $this->_has(4); } /** * Clear <options> value * * @return \google\protobuf\MethodDescriptorProto */ public function clearOptions(){ return $this->_clear(4); } /** * Get <options> value * * @return \google\protobuf\MethodOptions */ public function getOptions(){ return $this->_get(4); } /** * Set <options> value * * @param \google\protobuf\MethodOptions $value * @return \google\protobuf\MethodDescriptorProto */ public function setOptions(\google\protobuf\MethodOptions $value){ return $this->_set(4, $value); } /** * Check if <client_streaming> has a value * * @return boolean */ public function hasClientStreaming(){ return $this->_has(5); } /** * Clear <client_streaming> value * * @return \google\protobuf\MethodDescriptorProto */ public function clearClientStreaming(){ return $this->_clear(5); } /** * Get <client_streaming> value * * @return boolean */ public function getClientStreaming(){ return $this->_get(5); } /** * Set <client_streaming> value * * @param boolean $value * @return \google\protobuf\MethodDescriptorProto */ public function setClientStreaming( $value){ return $this->_set(5, $value); } /** * Check if <server_streaming> has a value * * @return boolean */ public function hasServerStreaming(){ return $this->_has(6); } /** * Clear <server_streaming> value * * @return \google\protobuf\MethodDescriptorProto */ public function clearServerStreaming(){ return $this->_clear(6); } /** * Get <server_streaming> value * * @return boolean */ public function getServerStreaming(){ return $this->_get(6); } /** * Set <server_streaming> value * * @param boolean $value * @return \google\protobuf\MethodDescriptorProto */ public function setServerStreaming( $value){ return $this->_set(6, $value); } } } namespace google\protobuf\FileOptions { class OptimizeMode extends \DrSlump\Protobuf\Enum { const SPEED = 1; const CODE_SIZE = 2; const LITE_RUNTIME = 3; } } namespace google\protobuf { class FileOptions extends \DrSlump\Protobuf\Message { /** @var string */ public $java_package = null; /** @var string */ public $java_outer_classname = null; /** @var boolean */ public $java_multiple_files = false; /** @var boolean */ public $java_generate_equals_and_hash = false; /** @var boolean */ public $java_string_check_utf8 = false; /** @var int - \google\protobuf\FileOptions\OptimizeMode */ public $optimize_for = \google\protobuf\FileOptions\OptimizeMode::SPEED; /** @var string */ public $go_package = null; /** @var boolean */ public $cc_generic_services = false; /** @var boolean */ public $java_generic_services = false; /** @var boolean */ public $py_generic_services = false; /** @var boolean */ public $deprecated = false; /** @var boolean */ public $cc_enable_arenas = false; /** @var string */ public $objc_class_prefix = null; /** @var string */ public $csharp_namespace = null; /** @var \google\protobuf\UninterpretedOption[] */ public $uninterpreted_option = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.FileOptions'); // OPTIONAL STRING java_package = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "java_package"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING java_outer_classname = 8 $f = new \DrSlump\Protobuf\Field(); $f->number = 8; $f->name = "java_outer_classname"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL BOOL java_multiple_files = 10 $f = new \DrSlump\Protobuf\Field(); $f->number = 10; $f->name = "java_multiple_files"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // OPTIONAL BOOL java_generate_equals_and_hash = 20 $f = new \DrSlump\Protobuf\Field(); $f->number = 20; $f->name = "java_generate_equals_and_hash"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // OPTIONAL BOOL java_string_check_utf8 = 27 $f = new \DrSlump\Protobuf\Field(); $f->number = 27; $f->name = "java_string_check_utf8"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // OPTIONAL ENUM optimize_for = 9 $f = new \DrSlump\Protobuf\Field(); $f->number = 9; $f->name = "optimize_for"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\FileOptions\OptimizeMode'; $f->default = \google\protobuf\FileOptions\OptimizeMode::SPEED; $descriptor->addField($f); // OPTIONAL STRING go_package = 11 $f = new \DrSlump\Protobuf\Field(); $f->number = 11; $f->name = "go_package"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL BOOL cc_generic_services = 16 $f = new \DrSlump\Protobuf\Field(); $f->number = 16; $f->name = "cc_generic_services"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // OPTIONAL BOOL java_generic_services = 17 $f = new \DrSlump\Protobuf\Field(); $f->number = 17; $f->name = "java_generic_services"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // OPTIONAL BOOL py_generic_services = 18 $f = new \DrSlump\Protobuf\Field(); $f->number = 18; $f->name = "py_generic_services"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // OPTIONAL BOOL deprecated = 23 $f = new \DrSlump\Protobuf\Field(); $f->number = 23; $f->name = "deprecated"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // OPTIONAL BOOL cc_enable_arenas = 31 $f = new \DrSlump\Protobuf\Field(); $f->number = 31; $f->name = "cc_enable_arenas"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // OPTIONAL STRING objc_class_prefix = 36 $f = new \DrSlump\Protobuf\Field(); $f->number = 36; $f->name = "objc_class_prefix"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING csharp_namespace = 37 $f = new \DrSlump\Protobuf\Field(); $f->number = 37; $f->name = "csharp_namespace"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE uninterpreted_option = 999 $f = new \DrSlump\Protobuf\Field(); $f->number = 999; $f->name = "uninterpreted_option"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\UninterpretedOption'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <java_package> has a value * * @return boolean */ public function hasJavaPackage(){ return $this->_has(1); } /** * Clear <java_package> value * * @return \google\protobuf\FileOptions */ public function clearJavaPackage(){ return $this->_clear(1); } /** * Get <java_package> value * * @return string */ public function getJavaPackage(){ return $this->_get(1); } /** * Set <java_package> value * * @param string $value * @return \google\protobuf\FileOptions */ public function setJavaPackage( $value){ return $this->_set(1, $value); } /** * Check if <java_outer_classname> has a value * * @return boolean */ public function hasJavaOuterClassname(){ return $this->_has(8); } /** * Clear <java_outer_classname> value * * @return \google\protobuf\FileOptions */ public function clearJavaOuterClassname(){ return $this->_clear(8); } /** * Get <java_outer_classname> value * * @return string */ public function getJavaOuterClassname(){ return $this->_get(8); } /** * Set <java_outer_classname> value * * @param string $value * @return \google\protobuf\FileOptions */ public function setJavaOuterClassname( $value){ return $this->_set(8, $value); } /** * Check if <java_multiple_files> has a value * * @return boolean */ public function hasJavaMultipleFiles(){ return $this->_has(10); } /** * Clear <java_multiple_files> value * * @return \google\protobuf\FileOptions */ public function clearJavaMultipleFiles(){ return $this->_clear(10); } /** * Get <java_multiple_files> value * * @return boolean */ public function getJavaMultipleFiles(){ return $this->_get(10); } /** * Set <java_multiple_files> value * * @param boolean $value * @return \google\protobuf\FileOptions */ public function setJavaMultipleFiles( $value){ return $this->_set(10, $value); } /** * Check if <java_generate_equals_and_hash> has a value * * @return boolean */ public function hasJavaGenerateEqualsAndHash(){ return $this->_has(20); } /** * Clear <java_generate_equals_and_hash> value * * @return \google\protobuf\FileOptions */ public function clearJavaGenerateEqualsAndHash(){ return $this->_clear(20); } /** * Get <java_generate_equals_and_hash> value * * @return boolean */ public function getJavaGenerateEqualsAndHash(){ return $this->_get(20); } /** * Set <java_generate_equals_and_hash> value * * @param boolean $value * @return \google\protobuf\FileOptions */ public function setJavaGenerateEqualsAndHash( $value){ return $this->_set(20, $value); } /** * Check if <java_string_check_utf8> has a value * * @return boolean */ public function hasJavaStringCheckUtf8(){ return $this->_has(27); } /** * Clear <java_string_check_utf8> value * * @return \google\protobuf\FileOptions */ public function clearJavaStringCheckUtf8(){ return $this->_clear(27); } /** * Get <java_string_check_utf8> value * * @return boolean */ public function getJavaStringCheckUtf8(){ return $this->_get(27); } /** * Set <java_string_check_utf8> value * * @param boolean $value * @return \google\protobuf\FileOptions */ public function setJavaStringCheckUtf8( $value){ return $this->_set(27, $value); } /** * Check if <optimize_for> has a value * * @return boolean */ public function hasOptimizeFor(){ return $this->_has(9); } /** * Clear <optimize_for> value * * @return \google\protobuf\FileOptions */ public function clearOptimizeFor(){ return $this->_clear(9); } /** * Get <optimize_for> value * * @return int - \google\protobuf\FileOptions\OptimizeMode */ public function getOptimizeFor(){ return $this->_get(9); } /** * Set <optimize_for> value * * @param int - \google\protobuf\FileOptions\OptimizeMode $value * @return \google\protobuf\FileOptions */ public function setOptimizeFor( $value){ return $this->_set(9, $value); } /** * Check if <go_package> has a value * * @return boolean */ public function hasGoPackage(){ return $this->_has(11); } /** * Clear <go_package> value * * @return \google\protobuf\FileOptions */ public function clearGoPackage(){ return $this->_clear(11); } /** * Get <go_package> value * * @return string */ public function getGoPackage(){ return $this->_get(11); } /** * Set <go_package> value * * @param string $value * @return \google\protobuf\FileOptions */ public function setGoPackage( $value){ return $this->_set(11, $value); } /** * Check if <cc_generic_services> has a value * * @return boolean */ public function hasCcGenericServices(){ return $this->_has(16); } /** * Clear <cc_generic_services> value * * @return \google\protobuf\FileOptions */ public function clearCcGenericServices(){ return $this->_clear(16); } /** * Get <cc_generic_services> value * * @return boolean */ public function getCcGenericServices(){ return $this->_get(16); } /** * Set <cc_generic_services> value * * @param boolean $value * @return \google\protobuf\FileOptions */ public function setCcGenericServices( $value){ return $this->_set(16, $value); } /** * Check if <java_generic_services> has a value * * @return boolean */ public function hasJavaGenericServices(){ return $this->_has(17); } /** * Clear <java_generic_services> value * * @return \google\protobuf\FileOptions */ public function clearJavaGenericServices(){ return $this->_clear(17); } /** * Get <java_generic_services> value * * @return boolean */ public function getJavaGenericServices(){ return $this->_get(17); } /** * Set <java_generic_services> value * * @param boolean $value * @return \google\protobuf\FileOptions */ public function setJavaGenericServices( $value){ return $this->_set(17, $value); } /** * Check if <py_generic_services> has a value * * @return boolean */ public function hasPyGenericServices(){ return $this->_has(18); } /** * Clear <py_generic_services> value * * @return \google\protobuf\FileOptions */ public function clearPyGenericServices(){ return $this->_clear(18); } /** * Get <py_generic_services> value * * @return boolean */ public function getPyGenericServices(){ return $this->_get(18); } /** * Set <py_generic_services> value * * @param boolean $value * @return \google\protobuf\FileOptions */ public function setPyGenericServices( $value){ return $this->_set(18, $value); } /** * Check if <deprecated> has a value * * @return boolean */ public function hasDeprecated(){ return $this->_has(23); } /** * Clear <deprecated> value * * @return \google\protobuf\FileOptions */ public function clearDeprecated(){ return $this->_clear(23); } /** * Get <deprecated> value * * @return boolean */ public function getDeprecated(){ return $this->_get(23); } /** * Set <deprecated> value * * @param boolean $value * @return \google\protobuf\FileOptions */ public function setDeprecated( $value){ return $this->_set(23, $value); } /** * Check if <cc_enable_arenas> has a value * * @return boolean */ public function hasCcEnableArenas(){ return $this->_has(31); } /** * Clear <cc_enable_arenas> value * * @return \google\protobuf\FileOptions */ public function clearCcEnableArenas(){ return $this->_clear(31); } /** * Get <cc_enable_arenas> value * * @return boolean */ public function getCcEnableArenas(){ return $this->_get(31); } /** * Set <cc_enable_arenas> value * * @param boolean $value * @return \google\protobuf\FileOptions */ public function setCcEnableArenas( $value){ return $this->_set(31, $value); } /** * Check if <objc_class_prefix> has a value * * @return boolean */ public function hasObjcClassPrefix(){ return $this->_has(36); } /** * Clear <objc_class_prefix> value * * @return \google\protobuf\FileOptions */ public function clearObjcClassPrefix(){ return $this->_clear(36); } /** * Get <objc_class_prefix> value * * @return string */ public function getObjcClassPrefix(){ return $this->_get(36); } /** * Set <objc_class_prefix> value * * @param string $value * @return \google\protobuf\FileOptions */ public function setObjcClassPrefix( $value){ return $this->_set(36, $value); } /** * Check if <csharp_namespace> has a value * * @return boolean */ public function hasCsharpNamespace(){ return $this->_has(37); } /** * Clear <csharp_namespace> value * * @return \google\protobuf\FileOptions */ public function clearCsharpNamespace(){ return $this->_clear(37); } /** * Get <csharp_namespace> value * * @return string */ public function getCsharpNamespace(){ return $this->_get(37); } /** * Set <csharp_namespace> value * * @param string $value * @return \google\protobuf\FileOptions */ public function setCsharpNamespace( $value){ return $this->_set(37, $value); } /** * Check if <uninterpreted_option> has a value * * @return boolean */ public function hasUninterpretedOption(){ return $this->_has(999); } /** * Clear <uninterpreted_option> value * * @return \google\protobuf\FileOptions */ public function clearUninterpretedOption(){ return $this->_clear(999); } /** * Get <uninterpreted_option> value * * @param int $idx * @return \google\protobuf\UninterpretedOption */ public function getUninterpretedOption($idx = NULL){ return $this->_get(999, $idx); } /** * Set <uninterpreted_option> value * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\FileOptions */ public function setUninterpretedOption(\google\protobuf\UninterpretedOption $value, $idx = NULL){ return $this->_set(999, $value, $idx); } /** * Get all elements of <uninterpreted_option> * * @return \google\protobuf\UninterpretedOption[] */ public function getUninterpretedOptionList(){ return $this->_get(999); } /** * Add a new element to <uninterpreted_option> * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\FileOptions */ public function addUninterpretedOption(\google\protobuf\UninterpretedOption $value){ return $this->_add(999, $value); } } } namespace google\protobuf { class MessageOptions extends \DrSlump\Protobuf\Message { /** @var boolean */ public $message_set_wire_format = false; /** @var boolean */ public $no_standard_descriptor_accessor = false; /** @var boolean */ public $deprecated = false; /** @var boolean */ public $map_entry = null; /** @var \google\protobuf\UninterpretedOption[] */ public $uninterpreted_option = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.MessageOptions'); // OPTIONAL BOOL message_set_wire_format = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "message_set_wire_format"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // OPTIONAL BOOL no_standard_descriptor_accessor = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "no_standard_descriptor_accessor"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // OPTIONAL BOOL deprecated = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "deprecated"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // OPTIONAL BOOL map_entry = 7 $f = new \DrSlump\Protobuf\Field(); $f->number = 7; $f->name = "map_entry"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE uninterpreted_option = 999 $f = new \DrSlump\Protobuf\Field(); $f->number = 999; $f->name = "uninterpreted_option"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\UninterpretedOption'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <message_set_wire_format> has a value * * @return boolean */ public function hasMessageSetWireFormat(){ return $this->_has(1); } /** * Clear <message_set_wire_format> value * * @return \google\protobuf\MessageOptions */ public function clearMessageSetWireFormat(){ return $this->_clear(1); } /** * Get <message_set_wire_format> value * * @return boolean */ public function getMessageSetWireFormat(){ return $this->_get(1); } /** * Set <message_set_wire_format> value * * @param boolean $value * @return \google\protobuf\MessageOptions */ public function setMessageSetWireFormat( $value){ return $this->_set(1, $value); } /** * Check if <no_standard_descriptor_accessor> has a value * * @return boolean */ public function hasNoStandardDescriptorAccessor(){ return $this->_has(2); } /** * Clear <no_standard_descriptor_accessor> value * * @return \google\protobuf\MessageOptions */ public function clearNoStandardDescriptorAccessor(){ return $this->_clear(2); } /** * Get <no_standard_descriptor_accessor> value * * @return boolean */ public function getNoStandardDescriptorAccessor(){ return $this->_get(2); } /** * Set <no_standard_descriptor_accessor> value * * @param boolean $value * @return \google\protobuf\MessageOptions */ public function setNoStandardDescriptorAccessor( $value){ return $this->_set(2, $value); } /** * Check if <deprecated> has a value * * @return boolean */ public function hasDeprecated(){ return $this->_has(3); } /** * Clear <deprecated> value * * @return \google\protobuf\MessageOptions */ public function clearDeprecated(){ return $this->_clear(3); } /** * Get <deprecated> value * * @return boolean */ public function getDeprecated(){ return $this->_get(3); } /** * Set <deprecated> value * * @param boolean $value * @return \google\protobuf\MessageOptions */ public function setDeprecated( $value){ return $this->_set(3, $value); } /** * Check if <map_entry> has a value * * @return boolean */ public function hasMapEntry(){ return $this->_has(7); } /** * Clear <map_entry> value * * @return \google\protobuf\MessageOptions */ public function clearMapEntry(){ return $this->_clear(7); } /** * Get <map_entry> value * * @return boolean */ public function getMapEntry(){ return $this->_get(7); } /** * Set <map_entry> value * * @param boolean $value * @return \google\protobuf\MessageOptions */ public function setMapEntry( $value){ return $this->_set(7, $value); } /** * Check if <uninterpreted_option> has a value * * @return boolean */ public function hasUninterpretedOption(){ return $this->_has(999); } /** * Clear <uninterpreted_option> value * * @return \google\protobuf\MessageOptions */ public function clearUninterpretedOption(){ return $this->_clear(999); } /** * Get <uninterpreted_option> value * * @param int $idx * @return \google\protobuf\UninterpretedOption */ public function getUninterpretedOption($idx = NULL){ return $this->_get(999, $idx); } /** * Set <uninterpreted_option> value * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\MessageOptions */ public function setUninterpretedOption(\google\protobuf\UninterpretedOption $value, $idx = NULL){ return $this->_set(999, $value, $idx); } /** * Get all elements of <uninterpreted_option> * * @return \google\protobuf\UninterpretedOption[] */ public function getUninterpretedOptionList(){ return $this->_get(999); } /** * Add a new element to <uninterpreted_option> * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\MessageOptions */ public function addUninterpretedOption(\google\protobuf\UninterpretedOption $value){ return $this->_add(999, $value); } } } namespace google\protobuf\FieldOptions { class CType extends \DrSlump\Protobuf\Enum { const STRING = 0; const CORD = 1; const STRING_PIECE = 2; } } namespace google\protobuf\FieldOptions { class JSType extends \DrSlump\Protobuf\Enum { const JS_NORMAL = 0; const JS_STRING = 1; const JS_NUMBER = 2; } } namespace google\protobuf { class FieldOptions extends \DrSlump\Protobuf\Message { /** @var int - \google\protobuf\FieldOptions\CType */ public $ctype = \google\protobuf\FieldOptions\CType::STRING; /** @var boolean */ public $packed = null; /** @var int - \google\protobuf\FieldOptions\JSType */ public $jstype = \google\protobuf\FieldOptions\JSType::JS_NORMAL; /** @var boolean */ public $lazy = false; /** @var boolean */ public $deprecated = false; /** @var boolean */ public $weak = false; /** @var \google\protobuf\UninterpretedOption[] */ public $uninterpreted_option = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.FieldOptions'); // OPTIONAL ENUM ctype = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "ctype"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\FieldOptions\CType'; $f->default = \google\protobuf\FieldOptions\CType::STRING; $descriptor->addField($f); // OPTIONAL BOOL packed = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "packed"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL ENUM jstype = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "jstype"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\FieldOptions\JSType'; $f->default = \google\protobuf\FieldOptions\JSType::JS_NORMAL; $descriptor->addField($f); // OPTIONAL BOOL lazy = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "lazy"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // OPTIONAL BOOL deprecated = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "deprecated"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // OPTIONAL BOOL weak = 10 $f = new \DrSlump\Protobuf\Field(); $f->number = 10; $f->name = "weak"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // REPEATED MESSAGE uninterpreted_option = 999 $f = new \DrSlump\Protobuf\Field(); $f->number = 999; $f->name = "uninterpreted_option"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\UninterpretedOption'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <ctype> has a value * * @return boolean */ public function hasCtype(){ return $this->_has(1); } /** * Clear <ctype> value * * @return \google\protobuf\FieldOptions */ public function clearCtype(){ return $this->_clear(1); } /** * Get <ctype> value * * @return int - \google\protobuf\FieldOptions\CType */ public function getCtype(){ return $this->_get(1); } /** * Set <ctype> value * * @param int - \google\protobuf\FieldOptions\CType $value * @return \google\protobuf\FieldOptions */ public function setCtype( $value){ return $this->_set(1, $value); } /** * Check if <packed> has a value * * @return boolean */ public function hasPacked(){ return $this->_has(2); } /** * Clear <packed> value * * @return \google\protobuf\FieldOptions */ public function clearPacked(){ return $this->_clear(2); } /** * Get <packed> value * * @return boolean */ public function getPacked(){ return $this->_get(2); } /** * Set <packed> value * * @param boolean $value * @return \google\protobuf\FieldOptions */ public function setPacked( $value){ return $this->_set(2, $value); } /** * Check if <jstype> has a value * * @return boolean */ public function hasJstype(){ return $this->_has(6); } /** * Clear <jstype> value * * @return \google\protobuf\FieldOptions */ public function clearJstype(){ return $this->_clear(6); } /** * Get <jstype> value * * @return int - \google\protobuf\FieldOptions\JSType */ public function getJstype(){ return $this->_get(6); } /** * Set <jstype> value * * @param int - \google\protobuf\FieldOptions\JSType $value * @return \google\protobuf\FieldOptions */ public function setJstype( $value){ return $this->_set(6, $value); } /** * Check if <lazy> has a value * * @return boolean */ public function hasLazy(){ return $this->_has(5); } /** * Clear <lazy> value * * @return \google\protobuf\FieldOptions */ public function clearLazy(){ return $this->_clear(5); } /** * Get <lazy> value * * @return boolean */ public function getLazy(){ return $this->_get(5); } /** * Set <lazy> value * * @param boolean $value * @return \google\protobuf\FieldOptions */ public function setLazy( $value){ return $this->_set(5, $value); } /** * Check if <deprecated> has a value * * @return boolean */ public function hasDeprecated(){ return $this->_has(3); } /** * Clear <deprecated> value * * @return \google\protobuf\FieldOptions */ public function clearDeprecated(){ return $this->_clear(3); } /** * Get <deprecated> value * * @return boolean */ public function getDeprecated(){ return $this->_get(3); } /** * Set <deprecated> value * * @param boolean $value * @return \google\protobuf\FieldOptions */ public function setDeprecated( $value){ return $this->_set(3, $value); } /** * Check if <weak> has a value * * @return boolean */ public function hasWeak(){ return $this->_has(10); } /** * Clear <weak> value * * @return \google\protobuf\FieldOptions */ public function clearWeak(){ return $this->_clear(10); } /** * Get <weak> value * * @return boolean */ public function getWeak(){ return $this->_get(10); } /** * Set <weak> value * * @param boolean $value * @return \google\protobuf\FieldOptions */ public function setWeak( $value){ return $this->_set(10, $value); } /** * Check if <uninterpreted_option> has a value * * @return boolean */ public function hasUninterpretedOption(){ return $this->_has(999); } /** * Clear <uninterpreted_option> value * * @return \google\protobuf\FieldOptions */ public function clearUninterpretedOption(){ return $this->_clear(999); } /** * Get <uninterpreted_option> value * * @param int $idx * @return \google\protobuf\UninterpretedOption */ public function getUninterpretedOption($idx = NULL){ return $this->_get(999, $idx); } /** * Set <uninterpreted_option> value * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\FieldOptions */ public function setUninterpretedOption(\google\protobuf\UninterpretedOption $value, $idx = NULL){ return $this->_set(999, $value, $idx); } /** * Get all elements of <uninterpreted_option> * * @return \google\protobuf\UninterpretedOption[] */ public function getUninterpretedOptionList(){ return $this->_get(999); } /** * Add a new element to <uninterpreted_option> * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\FieldOptions */ public function addUninterpretedOption(\google\protobuf\UninterpretedOption $value){ return $this->_add(999, $value); } } } namespace google\protobuf { class OneofOptions extends \DrSlump\Protobuf\Message { /** @var \google\protobuf\UninterpretedOption[] */ public $uninterpreted_option = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.OneofOptions'); // REPEATED MESSAGE uninterpreted_option = 999 $f = new \DrSlump\Protobuf\Field(); $f->number = 999; $f->name = "uninterpreted_option"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\UninterpretedOption'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <uninterpreted_option> has a value * * @return boolean */ public function hasUninterpretedOption(){ return $this->_has(999); } /** * Clear <uninterpreted_option> value * * @return \google\protobuf\OneofOptions */ public function clearUninterpretedOption(){ return $this->_clear(999); } /** * Get <uninterpreted_option> value * * @param int $idx * @return \google\protobuf\UninterpretedOption */ public function getUninterpretedOption($idx = NULL){ return $this->_get(999, $idx); } /** * Set <uninterpreted_option> value * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\OneofOptions */ public function setUninterpretedOption(\google\protobuf\UninterpretedOption $value, $idx = NULL){ return $this->_set(999, $value, $idx); } /** * Get all elements of <uninterpreted_option> * * @return \google\protobuf\UninterpretedOption[] */ public function getUninterpretedOptionList(){ return $this->_get(999); } /** * Add a new element to <uninterpreted_option> * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\OneofOptions */ public function addUninterpretedOption(\google\protobuf\UninterpretedOption $value){ return $this->_add(999, $value); } } } namespace google\protobuf { class EnumOptions extends \DrSlump\Protobuf\Message { /** @var boolean */ public $allow_alias = null; /** @var boolean */ public $deprecated = false; /** @var \google\protobuf\UninterpretedOption[] */ public $uninterpreted_option = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.EnumOptions'); // OPTIONAL BOOL allow_alias = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "allow_alias"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL BOOL deprecated = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "deprecated"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // REPEATED MESSAGE uninterpreted_option = 999 $f = new \DrSlump\Protobuf\Field(); $f->number = 999; $f->name = "uninterpreted_option"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\UninterpretedOption'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <allow_alias> has a value * * @return boolean */ public function hasAllowAlias(){ return $this->_has(2); } /** * Clear <allow_alias> value * * @return \google\protobuf\EnumOptions */ public function clearAllowAlias(){ return $this->_clear(2); } /** * Get <allow_alias> value * * @return boolean */ public function getAllowAlias(){ return $this->_get(2); } /** * Set <allow_alias> value * * @param boolean $value * @return \google\protobuf\EnumOptions */ public function setAllowAlias( $value){ return $this->_set(2, $value); } /** * Check if <deprecated> has a value * * @return boolean */ public function hasDeprecated(){ return $this->_has(3); } /** * Clear <deprecated> value * * @return \google\protobuf\EnumOptions */ public function clearDeprecated(){ return $this->_clear(3); } /** * Get <deprecated> value * * @return boolean */ public function getDeprecated(){ return $this->_get(3); } /** * Set <deprecated> value * * @param boolean $value * @return \google\protobuf\EnumOptions */ public function setDeprecated( $value){ return $this->_set(3, $value); } /** * Check if <uninterpreted_option> has a value * * @return boolean */ public function hasUninterpretedOption(){ return $this->_has(999); } /** * Clear <uninterpreted_option> value * * @return \google\protobuf\EnumOptions */ public function clearUninterpretedOption(){ return $this->_clear(999); } /** * Get <uninterpreted_option> value * * @param int $idx * @return \google\protobuf\UninterpretedOption */ public function getUninterpretedOption($idx = NULL){ return $this->_get(999, $idx); } /** * Set <uninterpreted_option> value * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\EnumOptions */ public function setUninterpretedOption(\google\protobuf\UninterpretedOption $value, $idx = NULL){ return $this->_set(999, $value, $idx); } /** * Get all elements of <uninterpreted_option> * * @return \google\protobuf\UninterpretedOption[] */ public function getUninterpretedOptionList(){ return $this->_get(999); } /** * Add a new element to <uninterpreted_option> * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\EnumOptions */ public function addUninterpretedOption(\google\protobuf\UninterpretedOption $value){ return $this->_add(999, $value); } } } namespace google\protobuf { class EnumValueOptions extends \DrSlump\Protobuf\Message { /** @var boolean */ public $deprecated = false; /** @var \google\protobuf\UninterpretedOption[] */ public $uninterpreted_option = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.EnumValueOptions'); // OPTIONAL BOOL deprecated = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "deprecated"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // REPEATED MESSAGE uninterpreted_option = 999 $f = new \DrSlump\Protobuf\Field(); $f->number = 999; $f->name = "uninterpreted_option"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\UninterpretedOption'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <deprecated> has a value * * @return boolean */ public function hasDeprecated(){ return $this->_has(1); } /** * Clear <deprecated> value * * @return \google\protobuf\EnumValueOptions */ public function clearDeprecated(){ return $this->_clear(1); } /** * Get <deprecated> value * * @return boolean */ public function getDeprecated(){ return $this->_get(1); } /** * Set <deprecated> value * * @param boolean $value * @return \google\protobuf\EnumValueOptions */ public function setDeprecated( $value){ return $this->_set(1, $value); } /** * Check if <uninterpreted_option> has a value * * @return boolean */ public function hasUninterpretedOption(){ return $this->_has(999); } /** * Clear <uninterpreted_option> value * * @return \google\protobuf\EnumValueOptions */ public function clearUninterpretedOption(){ return $this->_clear(999); } /** * Get <uninterpreted_option> value * * @param int $idx * @return \google\protobuf\UninterpretedOption */ public function getUninterpretedOption($idx = NULL){ return $this->_get(999, $idx); } /** * Set <uninterpreted_option> value * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\EnumValueOptions */ public function setUninterpretedOption(\google\protobuf\UninterpretedOption $value, $idx = NULL){ return $this->_set(999, $value, $idx); } /** * Get all elements of <uninterpreted_option> * * @return \google\protobuf\UninterpretedOption[] */ public function getUninterpretedOptionList(){ return $this->_get(999); } /** * Add a new element to <uninterpreted_option> * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\EnumValueOptions */ public function addUninterpretedOption(\google\protobuf\UninterpretedOption $value){ return $this->_add(999, $value); } } } namespace google\protobuf { class ServiceOptions extends \DrSlump\Protobuf\Message { /** @var boolean */ public $deprecated = false; /** @var \google\protobuf\UninterpretedOption[] */ public $uninterpreted_option = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.ServiceOptions'); // OPTIONAL BOOL deprecated = 33 $f = new \DrSlump\Protobuf\Field(); $f->number = 33; $f->name = "deprecated"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // REPEATED MESSAGE uninterpreted_option = 999 $f = new \DrSlump\Protobuf\Field(); $f->number = 999; $f->name = "uninterpreted_option"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\UninterpretedOption'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <deprecated> has a value * * @return boolean */ public function hasDeprecated(){ return $this->_has(33); } /** * Clear <deprecated> value * * @return \google\protobuf\ServiceOptions */ public function clearDeprecated(){ return $this->_clear(33); } /** * Get <deprecated> value * * @return boolean */ public function getDeprecated(){ return $this->_get(33); } /** * Set <deprecated> value * * @param boolean $value * @return \google\protobuf\ServiceOptions */ public function setDeprecated( $value){ return $this->_set(33, $value); } /** * Check if <uninterpreted_option> has a value * * @return boolean */ public function hasUninterpretedOption(){ return $this->_has(999); } /** * Clear <uninterpreted_option> value * * @return \google\protobuf\ServiceOptions */ public function clearUninterpretedOption(){ return $this->_clear(999); } /** * Get <uninterpreted_option> value * * @param int $idx * @return \google\protobuf\UninterpretedOption */ public function getUninterpretedOption($idx = NULL){ return $this->_get(999, $idx); } /** * Set <uninterpreted_option> value * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\ServiceOptions */ public function setUninterpretedOption(\google\protobuf\UninterpretedOption $value, $idx = NULL){ return $this->_set(999, $value, $idx); } /** * Get all elements of <uninterpreted_option> * * @return \google\protobuf\UninterpretedOption[] */ public function getUninterpretedOptionList(){ return $this->_get(999); } /** * Add a new element to <uninterpreted_option> * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\ServiceOptions */ public function addUninterpretedOption(\google\protobuf\UninterpretedOption $value){ return $this->_add(999, $value); } } } namespace google\protobuf { class MethodOptions extends \DrSlump\Protobuf\Message { /** @var boolean */ public $deprecated = false; /** @var \google\protobuf\UninterpretedOption[] */ public $uninterpreted_option = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.MethodOptions'); // OPTIONAL BOOL deprecated = 33 $f = new \DrSlump\Protobuf\Field(); $f->number = 33; $f->name = "deprecated"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->default = false; $descriptor->addField($f); // REPEATED MESSAGE uninterpreted_option = 999 $f = new \DrSlump\Protobuf\Field(); $f->number = 999; $f->name = "uninterpreted_option"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\UninterpretedOption'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <deprecated> has a value * * @return boolean */ public function hasDeprecated(){ return $this->_has(33); } /** * Clear <deprecated> value * * @return \google\protobuf\MethodOptions */ public function clearDeprecated(){ return $this->_clear(33); } /** * Get <deprecated> value * * @return boolean */ public function getDeprecated(){ return $this->_get(33); } /** * Set <deprecated> value * * @param boolean $value * @return \google\protobuf\MethodOptions */ public function setDeprecated( $value){ return $this->_set(33, $value); } /** * Check if <uninterpreted_option> has a value * * @return boolean */ public function hasUninterpretedOption(){ return $this->_has(999); } /** * Clear <uninterpreted_option> value * * @return \google\protobuf\MethodOptions */ public function clearUninterpretedOption(){ return $this->_clear(999); } /** * Get <uninterpreted_option> value * * @param int $idx * @return \google\protobuf\UninterpretedOption */ public function getUninterpretedOption($idx = NULL){ return $this->_get(999, $idx); } /** * Set <uninterpreted_option> value * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\MethodOptions */ public function setUninterpretedOption(\google\protobuf\UninterpretedOption $value, $idx = NULL){ return $this->_set(999, $value, $idx); } /** * Get all elements of <uninterpreted_option> * * @return \google\protobuf\UninterpretedOption[] */ public function getUninterpretedOptionList(){ return $this->_get(999); } /** * Add a new element to <uninterpreted_option> * * @param \google\protobuf\UninterpretedOption $value * @return \google\protobuf\MethodOptions */ public function addUninterpretedOption(\google\protobuf\UninterpretedOption $value){ return $this->_add(999, $value); } } } namespace google\protobuf\UninterpretedOption { class NamePart extends \DrSlump\Protobuf\Message { /** @var string */ public $name_part = null; /** @var boolean */ public $is_extension = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.UninterpretedOption.NamePart'); // REQUIRED STRING name_part = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name_part"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REQUIRED; $descriptor->addField($f); // REQUIRED BOOL is_extension = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "is_extension"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_REQUIRED; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name_part> has a value * * @return boolean */ public function hasNamePart(){ return $this->_has(1); } /** * Clear <name_part> value * * @return \google\protobuf\UninterpretedOption\NamePart */ public function clearNamePart(){ return $this->_clear(1); } /** * Get <name_part> value * * @return string */ public function getNamePart(){ return $this->_get(1); } /** * Set <name_part> value * * @param string $value * @return \google\protobuf\UninterpretedOption\NamePart */ public function setNamePart( $value){ return $this->_set(1, $value); } /** * Check if <is_extension> has a value * * @return boolean */ public function hasIsExtension(){ return $this->_has(2); } /** * Clear <is_extension> value * * @return \google\protobuf\UninterpretedOption\NamePart */ public function clearIsExtension(){ return $this->_clear(2); } /** * Get <is_extension> value * * @return boolean */ public function getIsExtension(){ return $this->_get(2); } /** * Set <is_extension> value * * @param boolean $value * @return \google\protobuf\UninterpretedOption\NamePart */ public function setIsExtension( $value){ return $this->_set(2, $value); } } } namespace google\protobuf { class UninterpretedOption extends \DrSlump\Protobuf\Message { /** @var \google\protobuf\UninterpretedOption\NamePart[] */ public $name = array(); /** @var string */ public $identifier_value = null; /** @var int */ public $positive_int_value = null; /** @var int */ public $negative_int_value = null; /** @var float */ public $double_value = null; /** @var string */ public $string_value = null; /** @var string */ public $aggregate_value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.UninterpretedOption'); // REPEATED MESSAGE name = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\UninterpretedOption\NamePart'; $descriptor->addField($f); // OPTIONAL STRING identifier_value = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "identifier_value"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL UINT64 positive_int_value = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "positive_int_value"; $f->type = \DrSlump\Protobuf::TYPE_UINT64; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT64 negative_int_value = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "negative_int_value"; $f->type = \DrSlump\Protobuf::TYPE_INT64; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL DOUBLE double_value = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "double_value"; $f->type = \DrSlump\Protobuf::TYPE_DOUBLE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL BYTES string_value = 7 $f = new \DrSlump\Protobuf\Field(); $f->number = 7; $f->name = "string_value"; $f->type = \DrSlump\Protobuf::TYPE_BYTES; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING aggregate_value = 8 $f = new \DrSlump\Protobuf\Field(); $f->number = 8; $f->name = "aggregate_value"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(2); } /** * Clear <name> value * * @return \google\protobuf\UninterpretedOption */ public function clearName(){ return $this->_clear(2); } /** * Get <name> value * * @param int $idx * @return \google\protobuf\UninterpretedOption\NamePart */ public function getName($idx = NULL){ return $this->_get(2, $idx); } /** * Set <name> value * * @param \google\protobuf\UninterpretedOption\NamePart $value * @return \google\protobuf\UninterpretedOption */ public function setName(\google\protobuf\UninterpretedOption\NamePart $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of <name> * * @return \google\protobuf\UninterpretedOption\NamePart[] */ public function getNameList(){ return $this->_get(2); } /** * Add a new element to <name> * * @param \google\protobuf\UninterpretedOption\NamePart $value * @return \google\protobuf\UninterpretedOption */ public function addName(\google\protobuf\UninterpretedOption\NamePart $value){ return $this->_add(2, $value); } /** * Check if <identifier_value> has a value * * @return boolean */ public function hasIdentifierValue(){ return $this->_has(3); } /** * Clear <identifier_value> value * * @return \google\protobuf\UninterpretedOption */ public function clearIdentifierValue(){ return $this->_clear(3); } /** * Get <identifier_value> value * * @return string */ public function getIdentifierValue(){ return $this->_get(3); } /** * Set <identifier_value> value * * @param string $value * @return \google\protobuf\UninterpretedOption */ public function setIdentifierValue( $value){ return $this->_set(3, $value); } /** * Check if <positive_int_value> has a value * * @return boolean */ public function hasPositiveIntValue(){ return $this->_has(4); } /** * Clear <positive_int_value> value * * @return \google\protobuf\UninterpretedOption */ public function clearPositiveIntValue(){ return $this->_clear(4); } /** * Get <positive_int_value> value * * @return int */ public function getPositiveIntValue(){ return $this->_get(4); } /** * Set <positive_int_value> value * * @param int $value * @return \google\protobuf\UninterpretedOption */ public function setPositiveIntValue( $value){ return $this->_set(4, $value); } /** * Check if <negative_int_value> has a value * * @return boolean */ public function hasNegativeIntValue(){ return $this->_has(5); } /** * Clear <negative_int_value> value * * @return \google\protobuf\UninterpretedOption */ public function clearNegativeIntValue(){ return $this->_clear(5); } /** * Get <negative_int_value> value * * @return int */ public function getNegativeIntValue(){ return $this->_get(5); } /** * Set <negative_int_value> value * * @param int $value * @return \google\protobuf\UninterpretedOption */ public function setNegativeIntValue( $value){ return $this->_set(5, $value); } /** * Check if <double_value> has a value * * @return boolean */ public function hasDoubleValue(){ return $this->_has(6); } /** * Clear <double_value> value * * @return \google\protobuf\UninterpretedOption */ public function clearDoubleValue(){ return $this->_clear(6); } /** * Get <double_value> value * * @return float */ public function getDoubleValue(){ return $this->_get(6); } /** * Set <double_value> value * * @param float $value * @return \google\protobuf\UninterpretedOption */ public function setDoubleValue( $value){ return $this->_set(6, $value); } /** * Check if <string_value> has a value * * @return boolean */ public function hasStringValue(){ return $this->_has(7); } /** * Clear <string_value> value * * @return \google\protobuf\UninterpretedOption */ public function clearStringValue(){ return $this->_clear(7); } /** * Get <string_value> value * * @return string */ public function getStringValue(){ return $this->_get(7); } /** * Set <string_value> value * * @param string $value * @return \google\protobuf\UninterpretedOption */ public function setStringValue( $value){ return $this->_set(7, $value); } /** * Check if <aggregate_value> has a value * * @return boolean */ public function hasAggregateValue(){ return $this->_has(8); } /** * Clear <aggregate_value> value * * @return \google\protobuf\UninterpretedOption */ public function clearAggregateValue(){ return $this->_clear(8); } /** * Get <aggregate_value> value * * @return string */ public function getAggregateValue(){ return $this->_get(8); } /** * Set <aggregate_value> value * * @param string $value * @return \google\protobuf\UninterpretedOption */ public function setAggregateValue( $value){ return $this->_set(8, $value); } } } namespace google\protobuf\SourceCodeInfo { class Location extends \DrSlump\Protobuf\Message { /** @var int[] */ public $path = array(); /** @var int[] */ public $span = array(); /** @var string */ public $leading_comments = null; /** @var string */ public $trailing_comments = null; /** @var string[] */ public $leading_detached_comments = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.SourceCodeInfo.Location'); // REPEATED INT32 path = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "path"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); // REPEATED INT32 span = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "span"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); // OPTIONAL STRING leading_comments = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "leading_comments"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING trailing_comments = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "trailing_comments"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED STRING leading_detached_comments = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "leading_detached_comments"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <path> has a value * * @return boolean */ public function hasPath(){ return $this->_has(1); } /** * Clear <path> value * * @return \google\protobuf\SourceCodeInfo\Location */ public function clearPath(){ return $this->_clear(1); } /** * Get <path> value * * @param int $idx * @return int */ public function getPath($idx = NULL){ return $this->_get(1, $idx); } /** * Set <path> value * * @param int $value * @return \google\protobuf\SourceCodeInfo\Location */ public function setPath( $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of <path> * * @return int[] */ public function getPathList(){ return $this->_get(1); } /** * Add a new element to <path> * * @param int $value * @return \google\protobuf\SourceCodeInfo\Location */ public function addPath( $value){ return $this->_add(1, $value); } /** * Check if <span> has a value * * @return boolean */ public function hasSpan(){ return $this->_has(2); } /** * Clear <span> value * * @return \google\protobuf\SourceCodeInfo\Location */ public function clearSpan(){ return $this->_clear(2); } /** * Get <span> value * * @param int $idx * @return int */ public function getSpan($idx = NULL){ return $this->_get(2, $idx); } /** * Set <span> value * * @param int $value * @return \google\protobuf\SourceCodeInfo\Location */ public function setSpan( $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of <span> * * @return int[] */ public function getSpanList(){ return $this->_get(2); } /** * Add a new element to <span> * * @param int $value * @return \google\protobuf\SourceCodeInfo\Location */ public function addSpan( $value){ return $this->_add(2, $value); } /** * Check if <leading_comments> has a value * * @return boolean */ public function hasLeadingComments(){ return $this->_has(3); } /** * Clear <leading_comments> value * * @return \google\protobuf\SourceCodeInfo\Location */ public function clearLeadingComments(){ return $this->_clear(3); } /** * Get <leading_comments> value * * @return string */ public function getLeadingComments(){ return $this->_get(3); } /** * Set <leading_comments> value * * @param string $value * @return \google\protobuf\SourceCodeInfo\Location */ public function setLeadingComments( $value){ return $this->_set(3, $value); } /** * Check if <trailing_comments> has a value * * @return boolean */ public function hasTrailingComments(){ return $this->_has(4); } /** * Clear <trailing_comments> value * * @return \google\protobuf\SourceCodeInfo\Location */ public function clearTrailingComments(){ return $this->_clear(4); } /** * Get <trailing_comments> value * * @return string */ public function getTrailingComments(){ return $this->_get(4); } /** * Set <trailing_comments> value * * @param string $value * @return \google\protobuf\SourceCodeInfo\Location */ public function setTrailingComments( $value){ return $this->_set(4, $value); } /** * Check if <leading_detached_comments> has a value * * @return boolean */ public function hasLeadingDetachedComments(){ return $this->_has(6); } /** * Clear <leading_detached_comments> value * * @return \google\protobuf\SourceCodeInfo\Location */ public function clearLeadingDetachedComments(){ return $this->_clear(6); } /** * Get <leading_detached_comments> value * * @param int $idx * @return string */ public function getLeadingDetachedComments($idx = NULL){ return $this->_get(6, $idx); } /** * Set <leading_detached_comments> value * * @param string $value * @return \google\protobuf\SourceCodeInfo\Location */ public function setLeadingDetachedComments( $value, $idx = NULL){ return $this->_set(6, $value, $idx); } /** * Get all elements of <leading_detached_comments> * * @return string[] */ public function getLeadingDetachedCommentsList(){ return $this->_get(6); } /** * Add a new element to <leading_detached_comments> * * @param string $value * @return \google\protobuf\SourceCodeInfo\Location */ public function addLeadingDetachedComments( $value){ return $this->_add(6, $value); } } } namespace google\protobuf { class SourceCodeInfo extends \DrSlump\Protobuf\Message { /** @var \google\protobuf\SourceCodeInfo\Location[] */ public $location = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.SourceCodeInfo'); // REPEATED MESSAGE location = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "location"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\SourceCodeInfo\Location'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <location> has a value * * @return boolean */ public function hasLocation(){ return $this->_has(1); } /** * Clear <location> value * * @return \google\protobuf\SourceCodeInfo */ public function clearLocation(){ return $this->_clear(1); } /** * Get <location> value * * @param int $idx * @return \google\protobuf\SourceCodeInfo\Location */ public function getLocation($idx = NULL){ return $this->_get(1, $idx); } /** * Set <location> value * * @param \google\protobuf\SourceCodeInfo\Location $value * @return \google\protobuf\SourceCodeInfo */ public function setLocation(\google\protobuf\SourceCodeInfo\Location $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of <location> * * @return \google\protobuf\SourceCodeInfo\Location[] */ public function getLocationList(){ return $this->_get(1); } /** * Add a new element to <location> * * @param \google\protobuf\SourceCodeInfo\Location $value * @return \google\protobuf\SourceCodeInfo */ public function addLocation(\google\protobuf\SourceCodeInfo\Location $value){ return $this->_add(1, $value); } } } namespace google\protobuf\GeneratedCodeInfo { class Annotation extends \DrSlump\Protobuf\Message { /** @var int[] */ public $path = array(); /** @var string */ public $source_file = null; /** @var int */ public $begin = null; /** @var int */ public $end = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.GeneratedCodeInfo.Annotation'); // REPEATED INT32 path = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "path"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); // OPTIONAL STRING source_file = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "source_file"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 begin = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "begin"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 end = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "end"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <path> has a value * * @return boolean */ public function hasPath(){ return $this->_has(1); } /** * Clear <path> value * * @return \google\protobuf\GeneratedCodeInfo\Annotation */ public function clearPath(){ return $this->_clear(1); } /** * Get <path> value * * @param int $idx * @return int */ public function getPath($idx = NULL){ return $this->_get(1, $idx); } /** * Set <path> value * * @param int $value * @return \google\protobuf\GeneratedCodeInfo\Annotation */ public function setPath( $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of <path> * * @return int[] */ public function getPathList(){ return $this->_get(1); } /** * Add a new element to <path> * * @param int $value * @return \google\protobuf\GeneratedCodeInfo\Annotation */ public function addPath( $value){ return $this->_add(1, $value); } /** * Check if <source_file> has a value * * @return boolean */ public function hasSourceFile(){ return $this->_has(2); } /** * Clear <source_file> value * * @return \google\protobuf\GeneratedCodeInfo\Annotation */ public function clearSourceFile(){ return $this->_clear(2); } /** * Get <source_file> value * * @return string */ public function getSourceFile(){ return $this->_get(2); } /** * Set <source_file> value * * @param string $value * @return \google\protobuf\GeneratedCodeInfo\Annotation */ public function setSourceFile( $value){ return $this->_set(2, $value); } /** * Check if <begin> has a value * * @return boolean */ public function hasBegin(){ return $this->_has(3); } /** * Clear <begin> value * * @return \google\protobuf\GeneratedCodeInfo\Annotation */ public function clearBegin(){ return $this->_clear(3); } /** * Get <begin> value * * @return int */ public function getBegin(){ return $this->_get(3); } /** * Set <begin> value * * @param int $value * @return \google\protobuf\GeneratedCodeInfo\Annotation */ public function setBegin( $value){ return $this->_set(3, $value); } /** * Check if <end> has a value * * @return boolean */ public function hasEnd(){ return $this->_has(4); } /** * Clear <end> value * * @return \google\protobuf\GeneratedCodeInfo\Annotation */ public function clearEnd(){ return $this->_clear(4); } /** * Get <end> value * * @return int */ public function getEnd(){ return $this->_get(4); } /** * Set <end> value * * @param int $value * @return \google\protobuf\GeneratedCodeInfo\Annotation */ public function setEnd( $value){ return $this->_set(4, $value); } } } namespace google\protobuf { class GeneratedCodeInfo extends \DrSlump\Protobuf\Message { /** @var \google\protobuf\GeneratedCodeInfo\Annotation[] */ public $annotation = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.GeneratedCodeInfo'); // REPEATED MESSAGE annotation = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "annotation"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\GeneratedCodeInfo\Annotation'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <annotation> has a value * * @return boolean */ public function hasAnnotation(){ return $this->_has(1); } /** * Clear <annotation> value * * @return \google\protobuf\GeneratedCodeInfo */ public function clearAnnotation(){ return $this->_clear(1); } /** * Get <annotation> value * * @param int $idx * @return \google\protobuf\GeneratedCodeInfo\Annotation */ public function getAnnotation($idx = NULL){ return $this->_get(1, $idx); } /** * Set <annotation> value * * @param \google\protobuf\GeneratedCodeInfo\Annotation $value * @return \google\protobuf\GeneratedCodeInfo */ public function setAnnotation(\google\protobuf\GeneratedCodeInfo\Annotation $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of <annotation> * * @return \google\protobuf\GeneratedCodeInfo\Annotation[] */ public function getAnnotationList(){ return $this->_get(1); } /** * Add a new element to <annotation> * * @param \google\protobuf\GeneratedCodeInfo\Annotation $value * @return \google\protobuf\GeneratedCodeInfo */ public function addAnnotation(\google\protobuf\GeneratedCodeInfo\Annotation $value){ return $this->_add(1, $value); } } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������src/generated/well-known-types/duration.php���������������������������������������������������������0000644�����������������00000005011�15174274134�0015073 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php // DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 // Source: google/protobuf/duration.proto // Date: 2016-07-18 20:27:54 namespace google\protobuf { class Duration extends \DrSlump\Protobuf\Message { /** @var int */ public $seconds = null; /** @var int */ public $nanos = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Duration'); // OPTIONAL INT64 seconds = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "seconds"; $f->type = \DrSlump\Protobuf::TYPE_INT64; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 nanos = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "nanos"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <seconds> has a value * * @return boolean */ public function hasSeconds(){ return $this->_has(1); } /** * Clear <seconds> value * * @return \google\protobuf\Duration */ public function clearSeconds(){ return $this->_clear(1); } /** * Get <seconds> value * * @return int */ public function getSeconds(){ return $this->_get(1); } /** * Set <seconds> value * * @param int $value * @return \google\protobuf\Duration */ public function setSeconds( $value){ return $this->_set(1, $value); } /** * Check if <nanos> has a value * * @return boolean */ public function hasNanos(){ return $this->_has(2); } /** * Clear <nanos> value * * @return \google\protobuf\Duration */ public function clearNanos(){ return $this->_clear(2); } /** * Get <nanos> value * * @return int */ public function getNanos(){ return $this->_get(2); } /** * Set <nanos> value * * @param int $value * @return \google\protobuf\Duration */ public function setNanos( $value){ return $this->_set(2, $value); } } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������src/generated/well-known-types/empty.php������������������������������������������������������������0000644�����������������00000001067�15174274134�0014413 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php // DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 // Source: google/protobuf/empty.proto // Date: 2016-07-18 20:27:54 namespace google\protobuf { class EmptyC extends \DrSlump\Protobuf\Message { /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Empty'); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������src/generated/well-known-types/field_mask.php�������������������������������������������������������0000644�����������������00000003735�15174274134�0015357 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php // DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 // Source: google/protobuf/field_mask.proto // Date: 2016-07-18 20:27:54 namespace google\protobuf { class FieldMask extends \DrSlump\Protobuf\Message { /** @var string[] */ public $paths = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.FieldMask'); // REPEATED STRING paths = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "paths"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <paths> has a value * * @return boolean */ public function hasPaths(){ return $this->_has(1); } /** * Clear <paths> value * * @return \google\protobuf\FieldMask */ public function clearPaths(){ return $this->_clear(1); } /** * Get <paths> value * * @param int $idx * @return string */ public function getPaths($idx = NULL){ return $this->_get(1, $idx); } /** * Set <paths> value * * @param string $value * @return \google\protobuf\FieldMask */ public function setPaths( $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of <paths> * * @return string[] */ public function getPathsList(){ return $this->_get(1); } /** * Add a new element to <paths> * * @param string $value * @return \google\protobuf\FieldMask */ public function addPaths( $value){ return $this->_add(1, $value); } } } �����������������������������������src/generated/well-known-types/source_context.php���������������������������������������������������0000644�����������������00000003144�15174274134�0016317 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php // DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 // Source: google/protobuf/source_context.proto // Date: 2016-07-18 20:27:54 namespace google\protobuf { class SourceContext extends \DrSlump\Protobuf\Message { /** @var string */ public $file_name = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.SourceContext'); // OPTIONAL STRING file_name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "file_name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <file_name> has a value * * @return boolean */ public function hasFileName(){ return $this->_has(1); } /** * Clear <file_name> value * * @return \google\protobuf\SourceContext */ public function clearFileName(){ return $this->_clear(1); } /** * Get <file_name> value * * @return string */ public function getFileName(){ return $this->_get(1); } /** * Set <file_name> value * * @param string $value * @return \google\protobuf\SourceContext */ public function setFileName( $value){ return $this->_set(1, $value); } } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������src/generated/well-known-types/struct.php�����������������������������������������������������������0000644�����������������00000033554�15174274134�0014607 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php // DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 // Source: google/protobuf/struct.proto // Date: 2016-07-18 20:27:54 namespace google\protobuf { class NullValue extends \DrSlump\Protobuf\Enum { const NULL_VALUE = 0; } } namespace google\protobuf\Struct { class FieldsEntry extends \DrSlump\Protobuf\Message { /** @var string */ public $key = null; /** @var \google\protobuf\Value */ public $value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Struct.FieldsEntry'); // OPTIONAL STRING key = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "key"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE value = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "value"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Value'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <key> has a value * * @return boolean */ public function hasKey(){ return $this->_has(1); } /** * Clear <key> value * * @return \google\protobuf\Struct\FieldsEntry */ public function clearKey(){ return $this->_clear(1); } /** * Get <key> value * * @return string */ public function getKey(){ return $this->_get(1); } /** * Set <key> value * * @param string $value * @return \google\protobuf\Struct\FieldsEntry */ public function setKey( $value){ return $this->_set(1, $value); } /** * Check if <value> has a value * * @return boolean */ public function hasValue(){ return $this->_has(2); } /** * Clear <value> value * * @return \google\protobuf\Struct\FieldsEntry */ public function clearValue(){ return $this->_clear(2); } /** * Get <value> value * * @return \google\protobuf\Value */ public function getValue(){ return $this->_get(2); } /** * Set <value> value * * @param \google\protobuf\Value $value * @return \google\protobuf\Struct\FieldsEntry */ public function setValue(\google\protobuf\Value $value){ return $this->_set(2, $value); } } } namespace google\protobuf { class Struct extends \DrSlump\Protobuf\Message { /** @var \google\protobuf\Struct\FieldsEntry[] */ public $fields = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Struct'); // REPEATED MESSAGE fields = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "fields"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\Struct\FieldsEntry'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <fields> has a value * * @return boolean */ public function hasFields(){ return $this->_has(1); } /** * Clear <fields> value * * @return \google\protobuf\Struct */ public function clearFields(){ return $this->_clear(1); } /** * Get <fields> value * * @param int $idx * @return \google\protobuf\Struct\FieldsEntry */ public function getFields($idx = NULL){ return $this->_get(1, $idx); } /** * Set <fields> value * * @param \google\protobuf\Struct\FieldsEntry $value * @return \google\protobuf\Struct */ public function setFields(\google\protobuf\Struct\FieldsEntry $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of <fields> * * @return \google\protobuf\Struct\FieldsEntry[] */ public function getFieldsList(){ return $this->_get(1); } /** * Add a new element to <fields> * * @param \google\protobuf\Struct\FieldsEntry $value * @return \google\protobuf\Struct */ public function addFields(\google\protobuf\Struct\FieldsEntry $value){ return $this->_add(1, $value); } } } namespace google\protobuf { class Value extends \DrSlump\Protobuf\Message { /** @var int - \google\protobuf\NullValue */ public $null_value = null; /** @var float */ public $number_value = null; /** @var string */ public $string_value = null; /** @var boolean */ public $bool_value = null; /** @var \google\protobuf\Struct */ public $struct_value = null; /** @var \google\protobuf\ListValue */ public $list_value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Value'); // OPTIONAL ENUM null_value = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "null_value"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\NullValue'; $descriptor->addField($f); // OPTIONAL DOUBLE number_value = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "number_value"; $f->type = \DrSlump\Protobuf::TYPE_DOUBLE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING string_value = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "string_value"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL BOOL bool_value = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "bool_value"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE struct_value = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "struct_value"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Struct'; $descriptor->addField($f); // OPTIONAL MESSAGE list_value = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "list_value"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\ListValue'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <null_value> has a value * * @return boolean */ public function hasNullValue(){ return $this->_has(1); } /** * Clear <null_value> value * * @return \google\protobuf\Value */ public function clearNullValue(){ return $this->_clear(1); } /** * Get <null_value> value * * @return int - \google\protobuf\NullValue */ public function getNullValue(){ return $this->_get(1); } /** * Set <null_value> value * * @param int - \google\protobuf\NullValue $value * @return \google\protobuf\Value */ public function setNullValue( $value){ return $this->_set(1, $value); } /** * Check if <number_value> has a value * * @return boolean */ public function hasNumberValue(){ return $this->_has(2); } /** * Clear <number_value> value * * @return \google\protobuf\Value */ public function clearNumberValue(){ return $this->_clear(2); } /** * Get <number_value> value * * @return float */ public function getNumberValue(){ return $this->_get(2); } /** * Set <number_value> value * * @param float $value * @return \google\protobuf\Value */ public function setNumberValue( $value){ return $this->_set(2, $value); } /** * Check if <string_value> has a value * * @return boolean */ public function hasStringValue(){ return $this->_has(3); } /** * Clear <string_value> value * * @return \google\protobuf\Value */ public function clearStringValue(){ return $this->_clear(3); } /** * Get <string_value> value * * @return string */ public function getStringValue(){ return $this->_get(3); } /** * Set <string_value> value * * @param string $value * @return \google\protobuf\Value */ public function setStringValue( $value){ return $this->_set(3, $value); } /** * Check if <bool_value> has a value * * @return boolean */ public function hasBoolValue(){ return $this->_has(4); } /** * Clear <bool_value> value * * @return \google\protobuf\Value */ public function clearBoolValue(){ return $this->_clear(4); } /** * Get <bool_value> value * * @return boolean */ public function getBoolValue(){ return $this->_get(4); } /** * Set <bool_value> value * * @param boolean $value * @return \google\protobuf\Value */ public function setBoolValue( $value){ return $this->_set(4, $value); } /** * Check if <struct_value> has a value * * @return boolean */ public function hasStructValue(){ return $this->_has(5); } /** * Clear <struct_value> value * * @return \google\protobuf\Value */ public function clearStructValue(){ return $this->_clear(5); } /** * Get <struct_value> value * * @return \google\protobuf\Struct */ public function getStructValue(){ return $this->_get(5); } /** * Set <struct_value> value * * @param \google\protobuf\Struct $value * @return \google\protobuf\Value */ public function setStructValue(\google\protobuf\Struct $value){ return $this->_set(5, $value); } /** * Check if <list_value> has a value * * @return boolean */ public function hasListValue(){ return $this->_has(6); } /** * Clear <list_value> value * * @return \google\protobuf\Value */ public function clearListValue(){ return $this->_clear(6); } /** * Get <list_value> value * * @return \google\protobuf\ListValue */ public function getListValue(){ return $this->_get(6); } /** * Set <list_value> value * * @param \google\protobuf\ListValue $value * @return \google\protobuf\Value */ public function setListValue(\google\protobuf\ListValue $value){ return $this->_set(6, $value); } } } namespace google\protobuf { class ListValue extends \DrSlump\Protobuf\Message { /** @var \google\protobuf\Value[] */ public $values = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.ListValue'); // REPEATED MESSAGE values = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "values"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\Value'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <values> has a value * * @return boolean */ public function hasValues(){ return $this->_has(1); } /** * Clear <values> value * * @return \google\protobuf\ListValue */ public function clearValues(){ return $this->_clear(1); } /** * Get <values> value * * @param int $idx * @return \google\protobuf\Value */ public function getValues($idx = NULL){ return $this->_get(1, $idx); } /** * Set <values> value * * @param \google\protobuf\Value $value * @return \google\protobuf\ListValue */ public function setValues(\google\protobuf\Value $value, $idx = NULL){ return $this->_set(1, $value, $idx); } /** * Get all elements of <values> * * @return \google\protobuf\Value[] */ public function getValuesList(){ return $this->_get(1); } /** * Add a new element to <values> * * @param \google\protobuf\Value $value * @return \google\protobuf\ListValue */ public function addValues(\google\protobuf\Value $value){ return $this->_add(1, $value); } } } ����������������������������������������������������������������������������������������������������������������������������������������������������src/generated/well-known-types/timestamp.php��������������������������������������������������������0000644�����������������00000005020�15174274134�0015251 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php // DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 // Source: google/protobuf/timestamp.proto // Date: 2016-07-18 20:27:54 namespace google\protobuf { class Timestamp extends \DrSlump\Protobuf\Message { /** @var int */ public $seconds = null; /** @var int */ public $nanos = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Timestamp'); // OPTIONAL INT64 seconds = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "seconds"; $f->type = \DrSlump\Protobuf::TYPE_INT64; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 nanos = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "nanos"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <seconds> has a value * * @return boolean */ public function hasSeconds(){ return $this->_has(1); } /** * Clear <seconds> value * * @return \google\protobuf\Timestamp */ public function clearSeconds(){ return $this->_clear(1); } /** * Get <seconds> value * * @return int */ public function getSeconds(){ return $this->_get(1); } /** * Set <seconds> value * * @param int $value * @return \google\protobuf\Timestamp */ public function setSeconds( $value){ return $this->_set(1, $value); } /** * Check if <nanos> has a value * * @return boolean */ public function hasNanos(){ return $this->_has(2); } /** * Clear <nanos> value * * @return \google\protobuf\Timestamp */ public function clearNanos(){ return $this->_clear(2); } /** * Get <nanos> value * * @return int */ public function getNanos(){ return $this->_get(2); } /** * Set <nanos> value * * @param int $value * @return \google\protobuf\Timestamp */ public function setNanos( $value){ return $this->_set(2, $value); } } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������src/generated/well-known-types/type.php�������������������������������������������������������������0000644�����������������00000103771�15174274134�0014243 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php // DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 // Source: google/protobuf/type.proto // Date: 2016-07-18 20:27:54 namespace google\protobuf { class Syntax extends \DrSlump\Protobuf\Enum { const SYNTAX_PROTO2 = 0; const SYNTAX_PROTO3 = 1; } } namespace google\protobuf { class Type extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var \google\protobuf\Field[] */ public $fields = array(); /** @var string[] */ public $oneofs = array(); /** @var \google\protobuf\Option[] */ public $options = array(); /** @var \google\protobuf\SourceContext */ public $source_context = null; /** @var int - \google\protobuf\Syntax */ public $syntax = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Type'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE fields = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "fields"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\Field'; $descriptor->addField($f); // REPEATED STRING oneofs = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "oneofs"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $descriptor->addField($f); // REPEATED MESSAGE options = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "options"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\Option'; $descriptor->addField($f); // OPTIONAL MESSAGE source_context = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "source_context"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\SourceContext'; $descriptor->addField($f); // OPTIONAL ENUM syntax = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "syntax"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Syntax'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\protobuf\Type */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\protobuf\Type */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <fields> has a value * * @return boolean */ public function hasFields(){ return $this->_has(2); } /** * Clear <fields> value * * @return \google\protobuf\Type */ public function clearFields(){ return $this->_clear(2); } /** * Get <fields> value * * @param int $idx * @return \google\protobuf\Field */ public function getFields($idx = NULL){ return $this->_get(2, $idx); } /** * Set <fields> value * * @param \google\protobuf\Field $value * @return \google\protobuf\Type */ public function setFields(\google\protobuf\Field $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of <fields> * * @return \google\protobuf\Field[] */ public function getFieldsList(){ return $this->_get(2); } /** * Add a new element to <fields> * * @param \google\protobuf\Field $value * @return \google\protobuf\Type */ public function addFields(\google\protobuf\Field $value){ return $this->_add(2, $value); } /** * Check if <oneofs> has a value * * @return boolean */ public function hasOneofs(){ return $this->_has(3); } /** * Clear <oneofs> value * * @return \google\protobuf\Type */ public function clearOneofs(){ return $this->_clear(3); } /** * Get <oneofs> value * * @param int $idx * @return string */ public function getOneofs($idx = NULL){ return $this->_get(3, $idx); } /** * Set <oneofs> value * * @param string $value * @return \google\protobuf\Type */ public function setOneofs( $value, $idx = NULL){ return $this->_set(3, $value, $idx); } /** * Get all elements of <oneofs> * * @return string[] */ public function getOneofsList(){ return $this->_get(3); } /** * Add a new element to <oneofs> * * @param string $value * @return \google\protobuf\Type */ public function addOneofs( $value){ return $this->_add(3, $value); } /** * Check if <options> has a value * * @return boolean */ public function hasOptions(){ return $this->_has(4); } /** * Clear <options> value * * @return \google\protobuf\Type */ public function clearOptions(){ return $this->_clear(4); } /** * Get <options> value * * @param int $idx * @return \google\protobuf\Option */ public function getOptions($idx = NULL){ return $this->_get(4, $idx); } /** * Set <options> value * * @param \google\protobuf\Option $value * @return \google\protobuf\Type */ public function setOptions(\google\protobuf\Option $value, $idx = NULL){ return $this->_set(4, $value, $idx); } /** * Get all elements of <options> * * @return \google\protobuf\Option[] */ public function getOptionsList(){ return $this->_get(4); } /** * Add a new element to <options> * * @param \google\protobuf\Option $value * @return \google\protobuf\Type */ public function addOptions(\google\protobuf\Option $value){ return $this->_add(4, $value); } /** * Check if <source_context> has a value * * @return boolean */ public function hasSourceContext(){ return $this->_has(5); } /** * Clear <source_context> value * * @return \google\protobuf\Type */ public function clearSourceContext(){ return $this->_clear(5); } /** * Get <source_context> value * * @return \google\protobuf\SourceContext */ public function getSourceContext(){ return $this->_get(5); } /** * Set <source_context> value * * @param \google\protobuf\SourceContext $value * @return \google\protobuf\Type */ public function setSourceContext(\google\protobuf\SourceContext $value){ return $this->_set(5, $value); } /** * Check if <syntax> has a value * * @return boolean */ public function hasSyntax(){ return $this->_has(6); } /** * Clear <syntax> value * * @return \google\protobuf\Type */ public function clearSyntax(){ return $this->_clear(6); } /** * Get <syntax> value * * @return int - \google\protobuf\Syntax */ public function getSyntax(){ return $this->_get(6); } /** * Set <syntax> value * * @param int - \google\protobuf\Syntax $value * @return \google\protobuf\Type */ public function setSyntax( $value){ return $this->_set(6, $value); } } } namespace google\protobuf\Field { class Kind extends \DrSlump\Protobuf\Enum { const TYPE_UNKNOWN = 0; const TYPE_DOUBLE = 1; const TYPE_FLOAT = 2; const TYPE_INT64 = 3; const TYPE_UINT64 = 4; const TYPE_INT32 = 5; const TYPE_FIXED64 = 6; const TYPE_FIXED32 = 7; const TYPE_BOOL = 8; const TYPE_STRING = 9; const TYPE_GROUP = 10; const TYPE_MESSAGE = 11; const TYPE_BYTES = 12; const TYPE_UINT32 = 13; const TYPE_ENUM = 14; const TYPE_SFIXED32 = 15; const TYPE_SFIXED64 = 16; const TYPE_SINT32 = 17; const TYPE_SINT64 = 18; } } namespace google\protobuf\Field { class Cardinality extends \DrSlump\Protobuf\Enum { const CARDINALITY_UNKNOWN = 0; const CARDINALITY_OPTIONAL = 1; const CARDINALITY_REQUIRED = 2; const CARDINALITY_REPEATED = 3; } } namespace google\protobuf { class Field extends \DrSlump\Protobuf\Message { /** @var int - \google\protobuf\Field\Kind */ public $kind = null; /** @var int - \google\protobuf\Field\Cardinality */ public $cardinality = null; /** @var int */ public $number = null; /** @var string */ public $name = null; /** @var string */ public $type_url = null; /** @var int */ public $oneof_index = null; /** @var boolean */ public $packed = null; /** @var \google\protobuf\Option[] */ public $options = array(); /** @var string */ public $json_name = null; /** @var string */ public $default_value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Field'); // OPTIONAL ENUM kind = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "kind"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Field\Kind'; $descriptor->addField($f); // OPTIONAL ENUM cardinality = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "cardinality"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Field\Cardinality'; $descriptor->addField($f); // OPTIONAL INT32 number = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "number"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING name = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING type_url = 6 $f = new \DrSlump\Protobuf\Field(); $f->number = 6; $f->name = "type_url"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 oneof_index = 7 $f = new \DrSlump\Protobuf\Field(); $f->number = 7; $f->name = "oneof_index"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL BOOL packed = 8 $f = new \DrSlump\Protobuf\Field(); $f->number = 8; $f->name = "packed"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE options = 9 $f = new \DrSlump\Protobuf\Field(); $f->number = 9; $f->name = "options"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\Option'; $descriptor->addField($f); // OPTIONAL STRING json_name = 10 $f = new \DrSlump\Protobuf\Field(); $f->number = 10; $f->name = "json_name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL STRING default_value = 11 $f = new \DrSlump\Protobuf\Field(); $f->number = 11; $f->name = "default_value"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <kind> has a value * * @return boolean */ public function hasKind(){ return $this->_has(1); } /** * Clear <kind> value * * @return \google\protobuf\Field */ public function clearKind(){ return $this->_clear(1); } /** * Get <kind> value * * @return int - \google\protobuf\Field\Kind */ public function getKind(){ return $this->_get(1); } /** * Set <kind> value * * @param int - \google\protobuf\Field\Kind $value * @return \google\protobuf\Field */ public function setKind( $value){ return $this->_set(1, $value); } /** * Check if <cardinality> has a value * * @return boolean */ public function hasCardinality(){ return $this->_has(2); } /** * Clear <cardinality> value * * @return \google\protobuf\Field */ public function clearCardinality(){ return $this->_clear(2); } /** * Get <cardinality> value * * @return int - \google\protobuf\Field\Cardinality */ public function getCardinality(){ return $this->_get(2); } /** * Set <cardinality> value * * @param int - \google\protobuf\Field\Cardinality $value * @return \google\protobuf\Field */ public function setCardinality( $value){ return $this->_set(2, $value); } /** * Check if <number> has a value * * @return boolean */ public function hasNumber(){ return $this->_has(3); } /** * Clear <number> value * * @return \google\protobuf\Field */ public function clearNumber(){ return $this->_clear(3); } /** * Get <number> value * * @return int */ public function getNumber(){ return $this->_get(3); } /** * Set <number> value * * @param int $value * @return \google\protobuf\Field */ public function setNumber( $value){ return $this->_set(3, $value); } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(4); } /** * Clear <name> value * * @return \google\protobuf\Field */ public function clearName(){ return $this->_clear(4); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(4); } /** * Set <name> value * * @param string $value * @return \google\protobuf\Field */ public function setName( $value){ return $this->_set(4, $value); } /** * Check if <type_url> has a value * * @return boolean */ public function hasTypeUrl(){ return $this->_has(6); } /** * Clear <type_url> value * * @return \google\protobuf\Field */ public function clearTypeUrl(){ return $this->_clear(6); } /** * Get <type_url> value * * @return string */ public function getTypeUrl(){ return $this->_get(6); } /** * Set <type_url> value * * @param string $value * @return \google\protobuf\Field */ public function setTypeUrl( $value){ return $this->_set(6, $value); } /** * Check if <oneof_index> has a value * * @return boolean */ public function hasOneofIndex(){ return $this->_has(7); } /** * Clear <oneof_index> value * * @return \google\protobuf\Field */ public function clearOneofIndex(){ return $this->_clear(7); } /** * Get <oneof_index> value * * @return int */ public function getOneofIndex(){ return $this->_get(7); } /** * Set <oneof_index> value * * @param int $value * @return \google\protobuf\Field */ public function setOneofIndex( $value){ return $this->_set(7, $value); } /** * Check if <packed> has a value * * @return boolean */ public function hasPacked(){ return $this->_has(8); } /** * Clear <packed> value * * @return \google\protobuf\Field */ public function clearPacked(){ return $this->_clear(8); } /** * Get <packed> value * * @return boolean */ public function getPacked(){ return $this->_get(8); } /** * Set <packed> value * * @param boolean $value * @return \google\protobuf\Field */ public function setPacked( $value){ return $this->_set(8, $value); } /** * Check if <options> has a value * * @return boolean */ public function hasOptions(){ return $this->_has(9); } /** * Clear <options> value * * @return \google\protobuf\Field */ public function clearOptions(){ return $this->_clear(9); } /** * Get <options> value * * @param int $idx * @return \google\protobuf\Option */ public function getOptions($idx = NULL){ return $this->_get(9, $idx); } /** * Set <options> value * * @param \google\protobuf\Option $value * @return \google\protobuf\Field */ public function setOptions(\google\protobuf\Option $value, $idx = NULL){ return $this->_set(9, $value, $idx); } /** * Get all elements of <options> * * @return \google\protobuf\Option[] */ public function getOptionsList(){ return $this->_get(9); } /** * Add a new element to <options> * * @param \google\protobuf\Option $value * @return \google\protobuf\Field */ public function addOptions(\google\protobuf\Option $value){ return $this->_add(9, $value); } /** * Check if <json_name> has a value * * @return boolean */ public function hasJsonName(){ return $this->_has(10); } /** * Clear <json_name> value * * @return \google\protobuf\Field */ public function clearJsonName(){ return $this->_clear(10); } /** * Get <json_name> value * * @return string */ public function getJsonName(){ return $this->_get(10); } /** * Set <json_name> value * * @param string $value * @return \google\protobuf\Field */ public function setJsonName( $value){ return $this->_set(10, $value); } /** * Check if <default_value> has a value * * @return boolean */ public function hasDefaultValue(){ return $this->_has(11); } /** * Clear <default_value> value * * @return \google\protobuf\Field */ public function clearDefaultValue(){ return $this->_clear(11); } /** * Get <default_value> value * * @return string */ public function getDefaultValue(){ return $this->_get(11); } /** * Set <default_value> value * * @param string $value * @return \google\protobuf\Field */ public function setDefaultValue( $value){ return $this->_set(11, $value); } } } namespace google\protobuf { class Enum extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var \google\protobuf\EnumValue[] */ public $enumvalue = array(); /** @var \google\protobuf\Option[] */ public $options = array(); /** @var \google\protobuf\SourceContext */ public $source_context = null; /** @var int - \google\protobuf\Syntax */ public $syntax = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Enum'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE enumvalue = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "enumvalue"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\EnumValue'; $descriptor->addField($f); // REPEATED MESSAGE options = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "options"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\Option'; $descriptor->addField($f); // OPTIONAL MESSAGE source_context = 4 $f = new \DrSlump\Protobuf\Field(); $f->number = 4; $f->name = "source_context"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\SourceContext'; $descriptor->addField($f); // OPTIONAL ENUM syntax = 5 $f = new \DrSlump\Protobuf\Field(); $f->number = 5; $f->name = "syntax"; $f->type = \DrSlump\Protobuf::TYPE_ENUM; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Syntax'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\protobuf\Enum */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\protobuf\Enum */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <enumvalue> has a value * * @return boolean */ public function hasEnumvalue(){ return $this->_has(2); } /** * Clear <enumvalue> value * * @return \google\protobuf\Enum */ public function clearEnumvalue(){ return $this->_clear(2); } /** * Get <enumvalue> value * * @param int $idx * @return \google\protobuf\EnumValue */ public function getEnumvalue($idx = NULL){ return $this->_get(2, $idx); } /** * Set <enumvalue> value * * @param \google\protobuf\EnumValue $value * @return \google\protobuf\Enum */ public function setEnumvalue(\google\protobuf\EnumValue $value, $idx = NULL){ return $this->_set(2, $value, $idx); } /** * Get all elements of <enumvalue> * * @return \google\protobuf\EnumValue[] */ public function getEnumvalueList(){ return $this->_get(2); } /** * Add a new element to <enumvalue> * * @param \google\protobuf\EnumValue $value * @return \google\protobuf\Enum */ public function addEnumvalue(\google\protobuf\EnumValue $value){ return $this->_add(2, $value); } /** * Check if <options> has a value * * @return boolean */ public function hasOptions(){ return $this->_has(3); } /** * Clear <options> value * * @return \google\protobuf\Enum */ public function clearOptions(){ return $this->_clear(3); } /** * Get <options> value * * @param int $idx * @return \google\protobuf\Option */ public function getOptions($idx = NULL){ return $this->_get(3, $idx); } /** * Set <options> value * * @param \google\protobuf\Option $value * @return \google\protobuf\Enum */ public function setOptions(\google\protobuf\Option $value, $idx = NULL){ return $this->_set(3, $value, $idx); } /** * Get all elements of <options> * * @return \google\protobuf\Option[] */ public function getOptionsList(){ return $this->_get(3); } /** * Add a new element to <options> * * @param \google\protobuf\Option $value * @return \google\protobuf\Enum */ public function addOptions(\google\protobuf\Option $value){ return $this->_add(3, $value); } /** * Check if <source_context> has a value * * @return boolean */ public function hasSourceContext(){ return $this->_has(4); } /** * Clear <source_context> value * * @return \google\protobuf\Enum */ public function clearSourceContext(){ return $this->_clear(4); } /** * Get <source_context> value * * @return \google\protobuf\SourceContext */ public function getSourceContext(){ return $this->_get(4); } /** * Set <source_context> value * * @param \google\protobuf\SourceContext $value * @return \google\protobuf\Enum */ public function setSourceContext(\google\protobuf\SourceContext $value){ return $this->_set(4, $value); } /** * Check if <syntax> has a value * * @return boolean */ public function hasSyntax(){ return $this->_has(5); } /** * Clear <syntax> value * * @return \google\protobuf\Enum */ public function clearSyntax(){ return $this->_clear(5); } /** * Get <syntax> value * * @return int - \google\protobuf\Syntax */ public function getSyntax(){ return $this->_get(5); } /** * Set <syntax> value * * @param int - \google\protobuf\Syntax $value * @return \google\protobuf\Enum */ public function setSyntax( $value){ return $this->_set(5, $value); } } } namespace google\protobuf { class EnumValue extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var int */ public $number = null; /** @var \google\protobuf\Option[] */ public $options = array(); /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.EnumValue'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL INT32 number = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "number"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // REPEATED MESSAGE options = 3 $f = new \DrSlump\Protobuf\Field(); $f->number = 3; $f->name = "options"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_REPEATED; $f->reference = '\google\protobuf\Option'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\protobuf\EnumValue */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\protobuf\EnumValue */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <number> has a value * * @return boolean */ public function hasNumber(){ return $this->_has(2); } /** * Clear <number> value * * @return \google\protobuf\EnumValue */ public function clearNumber(){ return $this->_clear(2); } /** * Get <number> value * * @return int */ public function getNumber(){ return $this->_get(2); } /** * Set <number> value * * @param int $value * @return \google\protobuf\EnumValue */ public function setNumber( $value){ return $this->_set(2, $value); } /** * Check if <options> has a value * * @return boolean */ public function hasOptions(){ return $this->_has(3); } /** * Clear <options> value * * @return \google\protobuf\EnumValue */ public function clearOptions(){ return $this->_clear(3); } /** * Get <options> value * * @param int $idx * @return \google\protobuf\Option */ public function getOptions($idx = NULL){ return $this->_get(3, $idx); } /** * Set <options> value * * @param \google\protobuf\Option $value * @return \google\protobuf\EnumValue */ public function setOptions(\google\protobuf\Option $value, $idx = NULL){ return $this->_set(3, $value, $idx); } /** * Get all elements of <options> * * @return \google\protobuf\Option[] */ public function getOptionsList(){ return $this->_get(3); } /** * Add a new element to <options> * * @param \google\protobuf\Option $value * @return \google\protobuf\EnumValue */ public function addOptions(\google\protobuf\Option $value){ return $this->_add(3, $value); } } } namespace google\protobuf { class Option extends \DrSlump\Protobuf\Message { /** @var string */ public $name = null; /** @var \google\protobuf\Any */ public $value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Option'); // OPTIONAL STRING name = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "name"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); // OPTIONAL MESSAGE value = 2 $f = new \DrSlump\Protobuf\Field(); $f->number = 2; $f->name = "value"; $f->type = \DrSlump\Protobuf::TYPE_MESSAGE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $f->reference = '\google\protobuf\Any'; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <name> has a value * * @return boolean */ public function hasName(){ return $this->_has(1); } /** * Clear <name> value * * @return \google\protobuf\Option */ public function clearName(){ return $this->_clear(1); } /** * Get <name> value * * @return string */ public function getName(){ return $this->_get(1); } /** * Set <name> value * * @param string $value * @return \google\protobuf\Option */ public function setName( $value){ return $this->_set(1, $value); } /** * Check if <value> has a value * * @return boolean */ public function hasValue(){ return $this->_has(2); } /** * Clear <value> value * * @return \google\protobuf\Option */ public function clearValue(){ return $this->_clear(2); } /** * Get <value> value * * @return \google\protobuf\Any */ public function getValue(){ return $this->_get(2); } /** * Set <value> value * * @param \google\protobuf\Any $value * @return \google\protobuf\Option */ public function setValue(\google\protobuf\Any $value){ return $this->_set(2, $value); } } } �������src/generated/well-known-types/wrappers.php���������������������������������������������������������0000644�����������������00000031363�15174274134�0015122 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php // DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0 // Source: google/protobuf/wrappers.proto // Date: 2016-07-18 20:27:54 namespace google\protobuf { class DoubleValue extends \DrSlump\Protobuf\Message { /** @var float */ public $value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.DoubleValue'); // OPTIONAL DOUBLE value = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "value"; $f->type = \DrSlump\Protobuf::TYPE_DOUBLE; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <value> has a value * * @return boolean */ public function hasValue(){ return $this->_has(1); } /** * Clear <value> value * * @return \google\protobuf\DoubleValue */ public function clearValue(){ return $this->_clear(1); } /** * Get <value> value * * @return float */ public function getValue(){ return $this->_get(1); } /** * Set <value> value * * @param float $value * @return \google\protobuf\DoubleValue */ public function setValue( $value){ return $this->_set(1, $value); } } } namespace google\protobuf { class FloatValue extends \DrSlump\Protobuf\Message { /** @var float */ public $value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.FloatValue'); // OPTIONAL FLOAT value = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "value"; $f->type = \DrSlump\Protobuf::TYPE_FLOAT; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <value> has a value * * @return boolean */ public function hasValue(){ return $this->_has(1); } /** * Clear <value> value * * @return \google\protobuf\FloatValue */ public function clearValue(){ return $this->_clear(1); } /** * Get <value> value * * @return float */ public function getValue(){ return $this->_get(1); } /** * Set <value> value * * @param float $value * @return \google\protobuf\FloatValue */ public function setValue( $value){ return $this->_set(1, $value); } } } namespace google\protobuf { class Int64Value extends \DrSlump\Protobuf\Message { /** @var int */ public $value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Int64Value'); // OPTIONAL INT64 value = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "value"; $f->type = \DrSlump\Protobuf::TYPE_INT64; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <value> has a value * * @return boolean */ public function hasValue(){ return $this->_has(1); } /** * Clear <value> value * * @return \google\protobuf\Int64Value */ public function clearValue(){ return $this->_clear(1); } /** * Get <value> value * * @return int */ public function getValue(){ return $this->_get(1); } /** * Set <value> value * * @param int $value * @return \google\protobuf\Int64Value */ public function setValue( $value){ return $this->_set(1, $value); } } } namespace google\protobuf { class UInt64Value extends \DrSlump\Protobuf\Message { /** @var int */ public $value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.UInt64Value'); // OPTIONAL UINT64 value = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "value"; $f->type = \DrSlump\Protobuf::TYPE_UINT64; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <value> has a value * * @return boolean */ public function hasValue(){ return $this->_has(1); } /** * Clear <value> value * * @return \google\protobuf\UInt64Value */ public function clearValue(){ return $this->_clear(1); } /** * Get <value> value * * @return int */ public function getValue(){ return $this->_get(1); } /** * Set <value> value * * @param int $value * @return \google\protobuf\UInt64Value */ public function setValue( $value){ return $this->_set(1, $value); } } } namespace google\protobuf { class Int32Value extends \DrSlump\Protobuf\Message { /** @var int */ public $value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.Int32Value'); // OPTIONAL INT32 value = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "value"; $f->type = \DrSlump\Protobuf::TYPE_INT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <value> has a value * * @return boolean */ public function hasValue(){ return $this->_has(1); } /** * Clear <value> value * * @return \google\protobuf\Int32Value */ public function clearValue(){ return $this->_clear(1); } /** * Get <value> value * * @return int */ public function getValue(){ return $this->_get(1); } /** * Set <value> value * * @param int $value * @return \google\protobuf\Int32Value */ public function setValue( $value){ return $this->_set(1, $value); } } } namespace google\protobuf { class UInt32Value extends \DrSlump\Protobuf\Message { /** @var int */ public $value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.UInt32Value'); // OPTIONAL UINT32 value = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "value"; $f->type = \DrSlump\Protobuf::TYPE_UINT32; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <value> has a value * * @return boolean */ public function hasValue(){ return $this->_has(1); } /** * Clear <value> value * * @return \google\protobuf\UInt32Value */ public function clearValue(){ return $this->_clear(1); } /** * Get <value> value * * @return int */ public function getValue(){ return $this->_get(1); } /** * Set <value> value * * @param int $value * @return \google\protobuf\UInt32Value */ public function setValue( $value){ return $this->_set(1, $value); } } } namespace google\protobuf { class BoolValue extends \DrSlump\Protobuf\Message { /** @var boolean */ public $value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.BoolValue'); // OPTIONAL BOOL value = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "value"; $f->type = \DrSlump\Protobuf::TYPE_BOOL; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <value> has a value * * @return boolean */ public function hasValue(){ return $this->_has(1); } /** * Clear <value> value * * @return \google\protobuf\BoolValue */ public function clearValue(){ return $this->_clear(1); } /** * Get <value> value * * @return boolean */ public function getValue(){ return $this->_get(1); } /** * Set <value> value * * @param boolean $value * @return \google\protobuf\BoolValue */ public function setValue( $value){ return $this->_set(1, $value); } } } namespace google\protobuf { class StringValue extends \DrSlump\Protobuf\Message { /** @var string */ public $value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.StringValue'); // OPTIONAL STRING value = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "value"; $f->type = \DrSlump\Protobuf::TYPE_STRING; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <value> has a value * * @return boolean */ public function hasValue(){ return $this->_has(1); } /** * Clear <value> value * * @return \google\protobuf\StringValue */ public function clearValue(){ return $this->_clear(1); } /** * Get <value> value * * @return string */ public function getValue(){ return $this->_get(1); } /** * Set <value> value * * @param string $value * @return \google\protobuf\StringValue */ public function setValue( $value){ return $this->_set(1, $value); } } } namespace google\protobuf { class BytesValue extends \DrSlump\Protobuf\Message { /** @var string */ public $value = null; /** @var \Closure[] */ protected static $__extensions = array(); public static function descriptor() { $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'google.protobuf.BytesValue'); // OPTIONAL BYTES value = 1 $f = new \DrSlump\Protobuf\Field(); $f->number = 1; $f->name = "value"; $f->type = \DrSlump\Protobuf::TYPE_BYTES; $f->rule = \DrSlump\Protobuf::RULE_OPTIONAL; $descriptor->addField($f); foreach (self::$__extensions as $cb) { $descriptor->addField($cb(), true); } return $descriptor; } /** * Check if <value> has a value * * @return boolean */ public function hasValue(){ return $this->_has(1); } /** * Clear <value> value * * @return \google\protobuf\BytesValue */ public function clearValue(){ return $this->_clear(1); } /** * Get <value> value * * @return string */ public function getValue(){ return $this->_get(1); } /** * Set <value> value * * @param string $value * @return \google\protobuf\BytesValue */ public function setValue( $value){ return $this->_set(1, $value); } } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������tests/ApiCallableTest.php���������������������������������������������������������������������������0000644�����������������00000046375�15174274134�0011437 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /* * Copyright 2016, Google Inc. * All rights reserved. * * 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. */ use Google\GAX\ApiCallable; use Google\GAX\AgentHeaderDescriptor; use Google\GAX\BackoffSettings; use Google\GAX\CallSettings; use Google\GAX\PageStreamingDescriptor; use Google\GAX\RetrySettings; use Google\GAX\Testing\MockStub; use Google\GAX\Testing\MockStatus; use Google\GAX\Testing\MockRequest; use Google\GAX\Testing\MockResponse; class ApiCallableTest extends PHPUnit_Framework_TestCase { public function testBaseCall() { $request = "request"; $metadata = []; $options = ['call_credentials_callback' => 'fake_callback']; $response = "response"; $stub = MockStub::create($response); $callSettings = new CallSettings([]); $apiCall = ApiCallable::createApiCall($stub, 'takeAction', $callSettings); $actualResponse = $apiCall($request, $metadata, $options); $this->assertEquals($response, $actualResponse); $actualCalls = $stub->actualCalls; $this->assertEquals(1, count($actualCalls)); $this->assertEquals($request, $actualCalls[0]['request']); $this->assertEquals($metadata, $actualCalls[0]['metadata']); $this->assertEquals($options, $actualCalls[0]['options']); } public function testTimeout() { $request = "request"; $response = "response"; $stub = MockStub::create($response); $callSettings = new CallSettings(['timeoutMillis' => 1500]); $apiCall = ApiCallable::createApiCall($stub, 'takeAction', $callSettings); $actualResponse = $apiCall($request, [], []); $this->assertEquals($response, $actualResponse); $actualCalls = $stub->actualCalls; $this->assertEquals(1, count($actualCalls)); $this->assertEquals($request, $actualCalls[0]['request']); $this->assertEquals([], $actualCalls[0]['metadata']); $this->assertEquals(['timeout' => 1500000], $actualCalls[0]['options']); } public function testRetryNoRetryableCode() { $request = "request"; $response = "response"; $status = new MockStatus(Grpc\STATUS_DEADLINE_EXCEEDED, 'Deadline Exceeded'); $stub = MockStub::createWithResponseSequence([[$response, $status]]); $backoffSettings = new BackoffSettings([ 'initialRetryDelayMillis' => 100, 'retryDelayMultiplier' => 1.3, 'maxRetryDelayMillis' => 400, 'initialRpcTimeoutMillis' => 150, 'rpcTimeoutMultiplier' => 2, 'maxRpcTimeoutMillis' => 600, 'totalTimeoutMillis' => 2000]); $retrySettings = new RetrySettings([], $backoffSettings); $callSettings = new CallSettings(['retrySettings' => $retrySettings]); $isExceptionRaised = false; try { $apiCall = ApiCallable::createApiCall($stub, 'takeAction', $callSettings); $response = $apiCall($request, [], []); } catch (\Exception $e) { $isExceptionRaised = true; } $actualCalls = $stub->actualCalls; $this->assertEquals(1, count($actualCalls)); $this->assertEquals($request, $actualCalls[0]['request']); $this->assertTrue($isExceptionRaised); } public function testRetryBackoff() { $request = "request"; $responseA = "requestA"; $responseB = "requestB"; $responseC = "requestC"; $responseSequence = [ [$responseA, new MockStatus(Grpc\STATUS_DEADLINE_EXCEEDED, 'Deadline Exceeded')], [$responseB, new MockStatus(Grpc\STATUS_DEADLINE_EXCEEDED, 'Deadline Exceeded')], [$responseC, new MockStatus(Grpc\STATUS_OK, '')] ]; $stub = MockStub::createWithResponseSequence($responseSequence); $backoffSettings = new BackoffSettings([ 'initialRetryDelayMillis' => 100, 'retryDelayMultiplier' => 1.3, 'maxRetryDelayMillis' => 400, 'initialRpcTimeoutMillis' => 150, 'rpcTimeoutMultiplier' => 2, 'maxRpcTimeoutMillis' => 500, 'totalTimeoutMillis' => 2000]); $retrySettings = new RetrySettings( [Grpc\STATUS_DEADLINE_EXCEEDED], $backoffSettings); $callSettings = new CallSettings(['retrySettings' => $retrySettings]); $apiCall = ApiCallable::createApiCall($stub, 'takeAction', $callSettings); $actualResponse = $apiCall($request, [], []); $this->assertEquals($responseC, $actualResponse); $actualCalls = $stub->actualCalls; $this->assertEquals(3, count($actualCalls)); $this->assertEquals($request, $actualCalls[0]['request']); $this->assertEquals(['timeout' => 150000], $actualCalls[0]['options']); $this->assertEquals($request, $actualCalls[1]['request']); $this->assertEquals(['timeout' => 300000], $actualCalls[1]['options']); $this->assertEquals($request, $actualCalls[2]['request']); $this->assertEquals(['timeout' => 500000], $actualCalls[2]['options']); } public function testRetryTimeoutExceeds() { $request = "request"; $response = "response"; $status = new MockStatus(Grpc\STATUS_DEADLINE_EXCEEDED, 'Deadline Exceeded'); $stub = MockStub::createWithResponseSequence([[$response, $status]]); $backoffSettings = new BackoffSettings([ 'initialRetryDelayMillis' => 1000, 'retryDelayMultiplier' => 1.3, 'maxRetryDelayMillis' => 4000, 'initialRpcTimeoutMillis' => 150, 'rpcTimeoutMultiplier' => 2, 'maxRpcTimeoutMillis' => 600, 'totalTimeoutMillis' => 3000]); $retrySettings = new RetrySettings( [Grpc\STATUS_DEADLINE_EXCEEDED], $backoffSettings); $callSettings = new CallSettings(['retrySettings' => $retrySettings]); // Use time function that simulates 1100ms elapsing with each call to the stub $incrementMillis = 1100; $timeFuncMillis = function() use ($stub, $incrementMillis) { $actualCalls = count($stub->actualCalls); return $actualCalls * $incrementMillis; }; $raisedException = null; try { $apiCall = ApiCallable::createApiCall( $stub, 'takeAction', $callSettings, ['timeFuncMillis' => $timeFuncMillis]); $response = $apiCall($request, [], []); } catch (Google\GAX\ApiException $e) { $raisedException = $e; } $actualCalls = $stub->actualCalls; $this->assertEquals(3, count($actualCalls)); $this->assertEquals($request, $actualCalls[0]['request']); $this->assertTrue(!empty($raisedException)); $this->assertEquals(Grpc\STATUS_DEADLINE_EXCEEDED, $raisedException->getCode()); } public function testPageStreamingDirectIterationNoTimeout() { $request = MockRequest::createPageStreamingRequest('token'); $responseA = MockResponse::createPageStreamingResponse('nextPageToken1', ['resource1']); $responseB = MockResponse::createPageStreamingResponse('nextPageToken2', ['resource2']); $responseC = MockResponse::createPageStreamingResponse(null, ['resource3', 'resource4']); $responseSequence = [ [$responseA, new MockStatus(Grpc\STATUS_OK, '')], [$responseB, new MockStatus(Grpc\STATUS_OK, '')], [$responseC, new MockStatus(Grpc\STATUS_OK, '')] ]; $stub = MockStub::createWithResponseSequence($responseSequence); $descriptor = new PageStreamingDescriptor([ 'requestPageTokenField' => 'pageToken', 'responsePageTokenField' => 'nextPageToken', 'resourceField' => 'resource' ]); $callSettings = new CallSettings(); $apiCall = ApiCallable::createApiCall( $stub, 'takeAction', $callSettings, ['pageStreamingDescriptor' => $descriptor]); $response = $apiCall($request, [], []); $this->assertEquals(1, count($stub->actualCalls)); $actualResources = []; foreach ($response->iterateAllElements() as $element) { array_push($actualResources, $element); } $this->assertEquals(3, count($stub->actualCalls)); $this->assertEquals(['resource1', 'resource2', 'resource3', 'resource4'], $actualResources); } public function testPageStreamingPageIterationNoTimeout() { $request = MockRequest::createPageStreamingRequest('token'); $responseA = MockResponse::createPageStreamingResponse('nextPageToken1', ['resource1']); $responseB = MockResponse::createPageStreamingResponse('nextPageToken2', ['resource2']); $responseC = MockResponse::createPageStreamingResponse(null, ['resource3', 'resource4']); $responseSequence = [ [$responseA, new MockStatus(Grpc\STATUS_OK, '')], [$responseB, new MockStatus(Grpc\STATUS_OK, '')], [$responseC, new MockStatus(Grpc\STATUS_OK, '')] ]; $stub = MockStub::createWithResponseSequence($responseSequence); $descriptor = new PageStreamingDescriptor([ 'requestPageTokenField' => 'pageToken', 'responsePageTokenField' => 'nextPageToken', 'resourceField' => 'resource' ]); $callSettings = new CallSettings(); $apiCall = ApiCallable::createApiCall( $stub, 'takeAction', $callSettings, ['pageStreamingDescriptor' => $descriptor]); $response = $apiCall($request, [], []); $this->assertEquals(1, count($stub->actualCalls)); $actualResources = []; $actualTokens = []; foreach ($response->iteratePages() as $page) { array_push($actualTokens, $page->getRequestObject()->pageToken); foreach ($page as $element) { array_push($actualResources, $element); } } $this->assertEquals(3, count($stub->actualCalls)); $this->assertEquals(['resource1', 'resource2', 'resource3', 'resource4'], $actualResources); $this->assertEquals(['token', 'nextPageToken1', 'nextPageToken2'], $actualTokens); } public function testPageStreamingFixedSizeIterationNoTimeout() { $request = MockRequest::createPageStreamingRequest('token', 2); $responseA = MockResponse::createPageStreamingResponse('nextPageToken1', ['resource1']); $responseB = MockResponse::createPageStreamingResponse('nextPageToken2', ['resource2']); $responseC = MockResponse::createPageStreamingResponse(null, ['resource3', 'resource4']); $responseSequence = [ [$responseA, new MockStatus(Grpc\STATUS_OK, '')], [$responseB, new MockStatus(Grpc\STATUS_OK, '')], [$responseC, new MockStatus(Grpc\STATUS_OK, '')] ]; $stub = MockStub::createWithResponseSequence($responseSequence); $descriptor = new PageStreamingDescriptor([ 'requestPageTokenField' => 'pageToken', 'requestPageSizeField' => 'pageSize', 'responsePageTokenField' => 'nextPageToken', 'resourceField' => 'resource' ]); $collectionSize = 2; $callSettings = new CallSettings(); $apiCall = ApiCallable::createApiCall( $stub, 'takeAction', $callSettings, ['pageStreamingDescriptor' => $descriptor]); $response = $apiCall($request, [], []); $this->assertEquals(1, count($stub->actualCalls)); $actualResources = []; $collectionCount = 0; foreach ($response->iterateFixedSizeCollections($collectionSize) as $collection) { $collectionCount += 1; foreach ($collection as $element) { array_push($actualResources, $element); } } $this->assertEquals(3, count($stub->actualCalls)); $this->assertEquals(2, $collectionCount); $this->assertEquals(['resource1', 'resource2', 'resource3', 'resource4'], $actualResources); } /** * @expectedException Google\GAX\ValidationException * @expectedExceptionMessage FixedSizeCollection is not supported */ public function testPageStreamingFixedSizeFailPageSizeNotSupported() { $request = MockRequest::createPageStreamingRequest('token'); $responseA = MockResponse::createPageStreamingResponse('nextPageToken1', ['resource1']); $responseSequence = [ [$responseA, new MockStatus(Grpc\STATUS_OK, '')], ]; $stub = MockStub::createWithResponseSequence($responseSequence); $descriptor = new PageStreamingDescriptor([ 'requestPageTokenField' => 'pageToken', 'responsePageTokenField' => 'nextPageToken', 'resourceField' => 'resource' ]); $collectionSize = 2; $callSettings = new CallSettings(); $apiCall = ApiCallable::createApiCall( $stub, 'takeAction', $callSettings, ['pageStreamingDescriptor' => $descriptor]); $response = $apiCall($request, [], []); $response->expandToFixedSizeCollection($collectionSize); } /** * @expectedException Google\GAX\ValidationException * @expectedExceptionMessage No page size parameter found */ public function testPageStreamingFixedSizeFailPageSizeNotSet() { $request = MockRequest::createPageStreamingRequest('token'); $responseA = MockResponse::createPageStreamingResponse('nextPageToken1', ['resource1']); $responseSequence = [ [$responseA, new MockStatus(Grpc\STATUS_OK, '')], ]; $stub = MockStub::createWithResponseSequence($responseSequence); $descriptor = new PageStreamingDescriptor([ 'requestPageTokenField' => 'pageToken', 'requestPageSizeField' => 'pageSize', 'responsePageTokenField' => 'nextPageToken', 'resourceField' => 'resource', ]); $collectionSize = 2; $callSettings = new CallSettings(); $apiCall = ApiCallable::createApiCall( $stub, 'takeAction', $callSettings, ['pageStreamingDescriptor' => $descriptor]); $response = $apiCall($request, [], []); $response->expandToFixedSizeCollection($collectionSize); } /** * @expectedException Google\GAX\ValidationException * @expectedExceptionMessage collectionSize parameter is less than the page size */ public function testPageStreamingFixedSizeFailPageSizeTooLarge() { $collectionSize = 2; $request = MockRequest::createPageStreamingRequest('token', $collectionSize + 1); $responseA = MockResponse::createPageStreamingResponse('nextPageToken1', ['resource1']); $responseSequence = [ [$responseA, new MockStatus(Grpc\STATUS_OK, '')] ]; $stub = MockStub::createWithResponseSequence($responseSequence); $descriptor = new PageStreamingDescriptor([ 'requestPageTokenField' => 'pageToken', 'requestPageSizeField' => 'pageSize', 'responsePageTokenField' => 'nextPageToken', 'resourceField' => 'resource' ]); $callSettings = new CallSettings(); $apiCall = ApiCallable::createApiCall( $stub, 'takeAction', $callSettings, ['pageStreamingDescriptor' => $descriptor]); $response = $apiCall($request, [], []); $response->expandToFixedSizeCollection($collectionSize); } public function testPageStreamingWithTimeout() { $request = MockRequest::createPageStreamingRequest('token'); $responseA = MockResponse::createPageStreamingResponse('nextPageToken1', ['resource1']); $responseB = MockResponse::createPageStreamingResponse('nextPageToken2', ['resource2']); $responseC = MockResponse::createPageStreamingResponse(null, ['resource3', 'resource4']); $responseSequence = [ [$responseA, new MockStatus(Grpc\STATUS_OK, '')], [$responseB, new MockStatus(Grpc\STATUS_OK, '')], [$responseC, new MockStatus(Grpc\STATUS_OK, '')] ]; $stub = MockStub::createWithResponseSequence($responseSequence); $descriptor = new PageStreamingDescriptor([ 'requestPageTokenField' => 'pageToken', 'responsePageTokenField' => 'nextPageToken', 'resourceField' => 'resource' ]); $callSettings = new CallSettings(['timeout' => 1000]); $apiCall = ApiCallable::createApiCall( $stub, 'takeAction', $callSettings, ['pageStreamingDescriptor' => $descriptor]); $response = $apiCall($request, [], []); $this->assertEquals(1, count($stub->actualCalls)); $actualResources = []; foreach ($response->iterateAllElements() as $element) { array_push($actualResources, $element); } $this->assertEquals(3, count($stub->actualCalls)); $this->assertEquals(['resource1', 'resource2', 'resource3', 'resource4'], $actualResources); } public function testCustomHeader() { $stub = MockStub::create(new MockResponse()); $headerDescriptor = new AgentHeaderDescriptor([ 'clientName' => 'testClient', 'clientVersion' => '0.0.0', 'codeGenName' => 'testCodeGen', 'codeGenVersion' => '0.9.0', 'gaxVersion' => '1.0.0', 'phpVersion' => '5.5.0', ]); $apiCall = ApiCallable::createApiCall( $stub, 'takeAction', new CallSettings(), ['headerDescriptor' => $headerDescriptor]); $resources = $apiCall(new MockRequest(), [], []); $actualCalls = $stub->actualCalls; $this->assertEquals(1, count($actualCalls)); $expectedMetadata = [ 'x-goog-api-client' => ['testClient/0.0.0;testCodeGen/0.9.0;gax/1.0.0;php/5.5.0'] ]; $this->assertEquals($expectedMetadata, $actualCalls[0]['metadata']); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������tests/BackoffSettingsTest.php�����������������������������������������������������������������������0000644�����������������00000004306�15174274134�0012346 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /* * Copyright 2016, Google Inc. * All rights reserved. * * 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. */ use Google\GAX\ApiCallable; use Google\GAX\RetrySettings; use Google\GAX\BackoffSettings; class BackoffSettingsTest extends PHPUnit_Framework_TestCase { /** * @expectedException \InvalidArgumentException */ public function testBackoffSettingsMissingFields() { $backoffSettings = new BackoffSettings([ 'initialRetryDelayMillis' => 100, 'retryDelayMultiplier' => 1.3, // Missing field: //'maxRetryDelayMillis' => 400, 'initialRpcTimeoutMillis' => 150, 'rpcTimeoutMultiplier' => 2, 'maxRpcTimeoutMillis' => 600, 'totalTimeoutMillis' => 2000]); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������tests/CallSettingsTest.php��������������������������������������������������������������������������0000644�����������������00000014203�15174274134�0011663 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /* * Copyright 2016, Google Inc. * All rights reserved. * * 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. */ use Google\GAX\BackoffSettings; use Google\GAX\CallSettings; use Google\GAX\PageStreamingDescriptor; use Google\GAX\RetrySettings; $serviceName = 'test.interface.v1.api'; $inputConfig = [ 'interfaces' => [ $serviceName => [ 'retry_codes' => [ 'foo_retry' => ['code_a', 'code_b'], 'bar_retry' => ['code_c'] ], 'retry_params' => [ 'default' => [ 'initial_retry_delay_millis' => 100, 'retry_delay_multiplier' => 1.2, 'max_retry_delay_millis' => 1000, 'initial_rpc_timeout_millis' => 300, 'rpc_timeout_multiplier' => 1.3, 'max_rpc_timeout_millis' => 3000, 'total_timeout_millis' => 30000 ] ], 'methods' => [ 'SimpleMethod' => [ 'retry_codes_name' => 'foo_retry', 'retry_params_name' => 'default' ], 'PageStreamingMethod' => [ 'retry_codes_name' => 'bar_retry', 'retry_params_name' => 'default' ] ] ] ] ]; $statusCodes = ['code_a' => 'code_val_a', 'code_b' => 'code_val_b', 'code_c' => 'code_val_c']; $backoffSettings = new BackoffSettings([ 'initialRetryDelayMillis' => 100, 'retryDelayMultiplier' => 1.3, 'maxRetryDelayMillis' => 400, 'initialRpcTimeoutMillis' => 150, 'rpcTimeoutMultiplier' => 2, 'maxRpcTimeoutMillis' => 500, 'totalTimeoutMillis' => 2000]); class CallSettingsTest extends PHPUnit_Framework_TestCase { public function testConstructSettings() { global $serviceName, $inputConfig, $statusCodes; $defaultCallSettings = CallSettings::load( $serviceName, $inputConfig, [], $statusCodes, 30); $simpleMethod = $defaultCallSettings['simpleMethod']; $this->assertEquals(30, $simpleMethod->getTimeoutMillis()); $simpleMethodRetry = $simpleMethod->getRetrySettings(); $this->assertEquals(['code_val_a', 'code_val_b'], $simpleMethodRetry->getRetryableCodes()); $this->assertEquals(100, $simpleMethodRetry->getBackoffSettings()->getInitialRetryDelayMillis()); $pageStreamingMethod = $defaultCallSettings['pageStreamingMethod']; $pageStreamingMethodRetry = $pageStreamingMethod->getRetrySettings(); $this->assertEquals(['code_val_c'], $pageStreamingMethodRetry->getRetryableCodes()); } public function testConstructSettingsOverride() { global $serviceName, $inputConfig, $statusCodes, $pageStreamingDescriptors; // Turn off retries for simpleMethod $retryingOverride = ['simpleMethod' => null]; $defaultCallSettings = CallSettings::load( $serviceName, $inputConfig, $retryingOverride, $statusCodes, 30); $simpleMethod = $defaultCallSettings['simpleMethod']; $this->assertEquals(30, $simpleMethod->getTimeoutMillis()); $simpleMethodRetry = $simpleMethod->getRetrySettings(); $this->assertNull($simpleMethodRetry); $pageStreamingMethod = $defaultCallSettings['pageStreamingMethod']; $pageStreamingMethodRetry = $pageStreamingMethod->getRetrySettings(); $this->assertEquals(['code_val_c'], $pageStreamingMethodRetry->getRetryableCodes()); } public function testMergeEmpty() { global $backoffSettings; $retrySettings = new RetrySettings(['a', 'b'], $backoffSettings); $settings = new CallSettings(['timeoutMillis' => 10, 'retrySettings' => $retrySettings]); $emptySettings = new CallSettings([]); $mergedSettings = $settings->merge($emptySettings); $this->assertEquals(10, $mergedSettings->getTimeoutMillis()); $this->assertEquals(['a', 'b'], $mergedSettings->getRetrySettings()->getRetryableCodes()); } public function testMerge() { global $backoffSettings; $retrySettings = new RetrySettings(['a', 'b'], $backoffSettings); $settings = new CallSettings(['timeoutMillis' => 10, 'retrySettings' => $retrySettings]); $otherRetrySettings = new RetrySettings(['c'], $backoffSettings); $otherSettings = new CallSettings(['timeoutMillis' => 20, 'retrySettings' => $otherRetrySettings]); $mergedSettings = $settings->merge($otherSettings); $this->assertEquals(20, $mergedSettings->getTimeoutMillis()); $this->assertEquals(['c'], $mergedSettings->getRetrySettings()->getRetryableCodes()); } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������tests/FixedSizeCollectionTest.php�������������������������������������������������������������������0000644�����������������00000010535�15174274134�0013201 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /* * Copyright 2016, Google Inc. * All rights reserved. * * 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. */ use Google\GAX\Page; use Google\GAX\FixedSizeCollection; use Google\GAX\PageStreamingDescriptor; use Google\GAX\Testing\MockStub; use Google\GAX\Testing\MockStatus; use Google\GAX\Testing\MockRequest; use Google\GAX\Testing\MockResponse; class FixedSizeCollectionTest extends PHPUnit_Framework_TestCase { private static function createPage($responseSequence) { $mockRequest = MockRequest::createPageStreamingRequest('token', 3); $stub = MockStub::createWithResponseSequence($responseSequence); $descriptor = new PageStreamingDescriptor([ 'requestPageTokenField' => 'pageToken', 'requestPageSizeField' => 'pageSize', 'responsePageTokenField' => 'nextPageToken', 'resourceField' => 'resource' ]); $mockApiCall = function() use ($stub) { list($response, $status) = call_user_func_array(array($stub, 'takeAction'), func_get_args())->wait(); return $response; }; return new Page([$mockRequest, [], []], $mockApiCall, $descriptor); } public function testFixedCollectionMethods() { $responseA = MockResponse::createPageStreamingResponse('nextPageToken1', ['resource1', 'resource2']); $responseB = MockResponse::createPageStreamingResponse('nextPageToken2', ['resource3', 'resource4', 'resource5']); $responseC = MockResponse::createPageStreamingResponse('nextPageToken3', ['resource6', 'resource7']); $responseD = MockResponse::createPageStreamingResponse('', ['resource8', 'resource9']); $page = FixedSizeCollectionTest::createPage([ [$responseA, new MockStatus(Grpc\STATUS_OK, '')], [$responseB, new MockStatus(Grpc\STATUS_OK, '')], [$responseC, new MockStatus(Grpc\STATUS_OK, '')], [$responseD, new MockStatus(Grpc\STATUS_OK, '')], ]); $fixedSizeCollection = new FixedSizeCollection($page, 5); $this->assertEquals($fixedSizeCollection->getCollectionSize(), 5); $this->assertEquals($fixedSizeCollection->hasNextCollection(), true); $this->assertEquals($fixedSizeCollection->getNextPageToken(), 'nextPageToken2'); $results = iterator_to_array($fixedSizeCollection); $this->assertEquals($results, ['resource1', 'resource2', 'resource3', 'resource4', 'resource5']); $nextCollection = $fixedSizeCollection->getNextCollection(); $this->assertEquals($nextCollection->getCollectionSize(), 4); $this->assertEquals($nextCollection->hasNextCollection(), false); $this->assertEquals($nextCollection->getNextPageToken(), ''); $results = iterator_to_array($nextCollection); $this->assertEquals($results, ['resource6', 'resource7', 'resource8', 'resource9']); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������tests/GrpcConstantsTest.php�������������������������������������������������������������������������0000644�����������������00000004724�15174274134�0012066 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /* * Copyright 2016, Google Inc. * All rights reserved. * * 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. */ use Google\GAX\GrpcConstants; class GrpcConstantsTest extends PHPUnit_Framework_TestCase { public function testGetStatusCodeNames() { $statusCodeNames = GrpcConstants::getStatusCodeNames(); $this->assertTrue(is_array($statusCodeNames)); $this->assertFalse(empty($statusCodeNames)); // test getting the status code names again does not throw exception GrpcConstants::getStatusCodeNames(); } /** * @expectedException Exception * @expectedExceptionMessage GrpcConstants::initStatusCodeNames called more than once */ public function testInitStatusCodeNamesThrowsException() { $statusCodeNames = GrpcConstants::getStatusCodeNames(); $reflection = new ReflectionClass('Google\GAX\GrpcConstants'); $method = $reflection->getMethod('initStatusCodeNames'); $method->setAccessible(true); $method->invoke(new GrpcConstants); } } ��������������������������������������������tests/GrpcCredentialsHelperTest.php�����������������������������������������������������������������0000644�����������������00000015735�15174274134�0013513 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /* * Copyright 2016, Google Inc. * All rights reserved. * * 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. */ use Google\Auth\FetchAuthTokenInterface; use Google\GAX\GrpcCredentialsHelper; class GrpcCredentialsHelperTest extends PHPUnit_Framework_TestCase { private $defaultScope = ['my-scope']; private $defaultTokens = [ [ 'access_token' => 'accessToken', 'expires_in' => '100', ], [ 'access_token' => 'accessToken2', 'expires_in' => '100' ], ]; public function testCreateCallCredentialsCallbackDefault() { $grpcCredentialsHelper = new GrpcCredentialsHelperForTesting($this->defaultScope); $callback = $grpcCredentialsHelper->createCallCredentialsCallback(); $callbackResult = $callback(); $this->assertEquals(['Bearer adcAccessToken'], $callbackResult['Authorization']); } public function testCreateCallCredentialsCallbackCustomCredsLoader() { $grpcCredentialsHelper = new GrpcCredentialsHelperForTesting($this->defaultScope, ['credentialsLoader' => new MockCredentialsLoader( $this->defaultScope, $this->defaultTokens)]); $callback = $grpcCredentialsHelper->createCallCredentialsCallback(); $callbackResult = $callback(); $this->assertEquals(['Bearer accessToken'], $callbackResult['Authorization']); } public function testCreateCallCredentialsCallbackDisableCaching() { $grpcCredentialsHelper = new GrpcCredentialsHelperForTesting($this->defaultScope, ['credentialsLoader' => new MockCredentialsLoader( $this->defaultScope, $this->defaultTokens), 'enableCaching' => false]); $callback = $grpcCredentialsHelper->createCallCredentialsCallback(); $callbackResult = $callback(); $this->assertEquals(['Bearer accessToken'], $callbackResult['Authorization']); $callback = $grpcCredentialsHelper->createCallCredentialsCallback(); $callbackResult = $callback(); $this->assertEquals(['Bearer accessToken2'], $callbackResult['Authorization']); } public function testCreateCallCredentialsCallbackCaching() { $grpcCredentialsHelper = new GrpcCredentialsHelperForTesting($this->defaultScope, ['credentialsLoader' => new MockCredentialsLoader( $this->defaultScope, $this->defaultTokens)]); $callback = $grpcCredentialsHelper->createCallCredentialsCallback(); $callbackResult = $callback(); $this->assertEquals(['Bearer accessToken'], $callbackResult['Authorization']); $callback = $grpcCredentialsHelper->createCallCredentialsCallback(); $callbackResult = $callback(); $this->assertEquals(['Bearer accessToken'], $callbackResult['Authorization']); } public function testCreateStubWithDefaultSslCreds() { $grpcCredentialsHelper = new GrpcCredentialsHelperForTesting($this->defaultScope); $createStubCallback = function($hostname, $stubOpts) { return ['hostname' => $hostname, 'stubOpts' => $stubOpts]; }; $createStubResult = $grpcCredentialsHelper->createStub( $createStubCallback, 'my-service-address', 8443); $this->assertEquals('my-service-address:8443', $createStubResult['hostname']); $this->assertEquals('DummySslCreds', $createStubResult['stubOpts']['credentials']); $this->assertEquals('my-service-address:8443', $createStubResult['stubOpts']['grpc.ssl_target_name_override']); } public function testCreateStubWithExplicitSslCreds() { $grpcCredentialsHelper = new GrpcCredentialsHelperForTesting($this->defaultScope); $createStubCallback = function($hostname, $stubOpts) { return ['hostname' => $hostname, 'stubOpts' => $stubOpts]; }; $createStubResult = $grpcCredentialsHelper->createStub( $createStubCallback, 'my-service-address', 8443, ['sslCreds' => 'provided-creds']); $this->assertEquals('my-service-address:8443', $createStubResult['hostname']); $this->assertEquals('provided-creds', $createStubResult['stubOpts']['credentials']); $this->assertEquals('my-service-address:8443', $createStubResult['stubOpts']['grpc.ssl_target_name_override']); } } class MockContext { public $service_url; public function __construct($service_url) { $this->service_url = $service_url; } } class MockCredentialsLoader implements FetchAuthTokenInterface { private $tokens; private $index = -1; public function __construct($scopes, $tokens) { $this->scopes = $scopes; $this->tokens = $tokens; } public function fetchAuthToken(callable $httpHandler = null) { $this->index = ($this->index + 1) % count($this->tokens); return $this->tokens[$this->index]; } public function getCacheKey() { return 'accessTokenCacheKey'; } public function getLastReceivedToken() { if ($this->index == -1) { return null; } else { return $this->tokens[$this->index]; } } } class GrpcCredentialsHelperForTesting extends GrpcCredentialsHelper { protected function getADCCredentials($scopes) { return new MockCredentialsLoader($scopes, [ [ 'access_token' => 'adcAccessToken', 'expires_in' => '100', ], ]); } protected function createSslChannelCredentials() { return "DummySslCreds"; } } �����������������������������������tests/PageStreamingDescriptorTest.php���������������������������������������������������������������0000644�����������������00000004007�15174274134�0014055 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /* * Copyright 2016, Google Inc. * All rights reserved. * * 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. */ use Google\GAX\PageStreamingDescriptor; class PageStreamingDescriptorTest extends PHPUnit_Framework_TestCase { /** * @expectedException \InvalidArgumentException */ public function testMissingFields() { $descriptor = new PageStreamingDescriptor([ 'requestPageTokenField' => 'nextPageToken', // Missing field // 'responsePageTokenField' => 'nextPageToken', 'resourceField' => 'resource' ]); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������tests/PageTest.php����������������������������������������������������������������������������������0000644�����������������00000011434�15174274134�0010146 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /* * Copyright 2016, Google Inc. * All rights reserved. * * 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. */ use Google\GAX\Page; use Google\GAX\PageStreamingDescriptor; use Google\GAX\Testing\MockStub; use Google\GAX\Testing\MockStatus; use Google\GAX\Testing\MockRequest; use Google\GAX\Testing\MockResponse; class PageTest extends PHPUnit_Framework_TestCase { private static function createPage($responseSequence) { $mockRequest = MockRequest::createPageStreamingRequest('token'); $stub = MockStub::createWithResponseSequence($responseSequence); $descriptor = new PageStreamingDescriptor([ 'requestPageTokenField' => 'pageToken', 'responsePageTokenField' => 'nextPageToken', 'resourceField' => 'resource' ]); $mockApiCall = function() use ($stub) { list($response, $status) = call_user_func_array(array($stub, 'takeAction'), func_get_args())->wait(); return $response; }; return new Page([$mockRequest, [], []], $mockApiCall, $descriptor); } public function testNextPageMethods() { $responseA = MockResponse::createPageStreamingResponse('nextPageToken1', ['resource1']); $responseB = MockResponse::createPageStreamingResponse('', ['resource2']); $page = PageTest::createPage([ [$responseA, new MockStatus(Grpc\STATUS_OK, '')], [$responseB, new MockStatus(Grpc\STATUS_OK, '')], ]); $this->assertEquals($page->hasNextPage(), true); $this->assertEquals($page->getNextPageToken(), 'nextPageToken1'); $nextPage = $page->getNextPage(); $this->assertEquals($nextPage->hasNextPage(), false); $this->assertEquals($nextPage->getNextPageToken(), ''); } /** * @expectedException Google\GAX\ValidationException * @expectedExceptionMessage Could not complete getNextPage operation */ public function testNextPageMethodsFailWithNoNextPage() { $responseA = MockResponse::createPageStreamingResponse('', ['resource1']); $page = PageTest::createPage([ [$responseA, new MockStatus(Grpc\STATUS_OK, '')], ]); $this->assertEquals($page->hasNextPage(), false); $page->getNextPage(); } /** * @expectedException Google\GAX\ValidationException * @expectedExceptionMessage pageSize argument was defined, but the method does not */ public function testNextPageMethodsFailWithPageSizeUnsupported() { $responseA = MockResponse::createPageStreamingResponse('nextPageToken1', ['resource1']); $responseB = MockResponse::createPageStreamingResponse('', ['resource2']); $page = PageTest::createPage([ [$responseA, new MockStatus(Grpc\STATUS_OK, '')], [$responseB, new MockStatus(Grpc\STATUS_OK, '')], ]); $page->getNextPage(3); } public function testPageElementMethods() { $response = MockResponse::createPageStreamingResponse('nextPageToken1', ['resource1', 'resource2', 'resource3']); $page = PageTest::createPage([ [$response, new MockStatus(Grpc\STATUS_OK, '')], ]); $this->assertEquals($page->getPageElementCount(), 3); $results = iterator_to_array($page); $this->assertEquals($results, ['resource1', 'resource2', 'resource3']); } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������tests/PagedListResponseTest.php���������������������������������������������������������������������0000644�����������������00000005444�15174274134�0012671 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /* * Copyright 2016, Google Inc. * All rights reserved. * * 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. */ use Google\GAX\PagedListResponse; use Google\GAX\PageStreamingDescriptor; use Google\GAX\Testing\MockStub; use Google\GAX\Testing\MockStatus; use Google\GAX\Testing\MockRequest; use Google\GAX\Testing\MockResponse; class PagedListResponseTest extends PHPUnit_Framework_TestCase { public function testNextPageToken() { $mockRequest = MockRequest::createPageStreamingRequest('mockToken'); $descriptor = new PageStreamingDescriptor([ 'requestPageTokenField' => 'pageToken', 'responsePageTokenField' => 'nextPageToken', 'resourceField' => 'resource' ]); $response = MockResponse::createPageStreamingResponse('nextPageToken1', ['resource1']); $stub = MockStub::create($response); $mockApiCall = function() use ($stub) { list($response, $status) = call_user_func_array(array($stub, 'takeAction'), func_get_args())->wait(); return $response; }; $pageAccessor = new PagedListResponse([$mockRequest, [], []], $mockApiCall, $descriptor); $page = $pageAccessor->getPage(); $this->assertEquals($page->getNextPageToken(), 'nextPageToken1'); $this->assertEquals(iterator_to_array($page->getIterator()), ['resource1']); } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������tests/PathTemplateTest.php��������������������������������������������������������������������������0000644�����������������00000015504�15174274134�0011664 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /* * Copyright 2016, Google Inc. * All rights reserved. * * 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. */ use Google\GAX\PathTemplate; class PathTemplateTest extends PHPUnit_Framework_TestCase { public function testCount() { $this->assertEquals( count(new PathTemplate('a/b/**/*/{a=hello/world}')), 6); } /** * @expectedException Google\GAX\ValidationException */ public function testFailInvalidToken() { new PathTemplate('hello/wor*ld'); } /** * @expectedException Google\GAX\ValidationException */ public function testFailWhenImpossibleMatch01() { $template = new PathTemplate('hello/world'); $template->match('hello'); } /** * @expectedException Google\GAX\ValidationException */ public function testFailWhenImpossibleMatch02() { $template = new PathTemplate('hello/world'); $template->match('hello/world/fail'); } /** * @expectedException Google\GAX\ValidationException */ public function testFailMismatchedLiteral() { $template = new PathTemplate('hello/world'); $template->match('hello/world2'); } /** * @expectedException Google\GAX\ValidationException */ public function testFailWhenMultiplePathWildcards() { new PathTemplate('buckets/*/**/**/objects/*'); } /** * @expectedException Google\GAX\ValidationException */ public function testFailIfInnerBinding() { new PathTemplate('buckets/{hello={world}}'); } /** * @expectedException Google\GAX\ValidationException */ public function testFailUnexpectedEof() { new PathTemplate('a/{hello=world'); } public function testMatchAtomicResourceName() { $template = new PathTemplate('buckets/*/*/objects/*'); $this->assertEquals( ['$0' => 'f', '$1' => 'o', '$2' => 'bar'], $template->match('buckets/f/o/objects/bar')); $template = new PathTemplate('/buckets/{hello}'); $this->assertEquals(['hello' => 'world'], $template->match('buckets/world')); $template = new PathTemplate('/buckets/{hello=*}'); $this->assertEquals(['hello' => 'world'], $template->match('buckets/world')); } public function testMatchEscapedChars() { $template = new PathTemplate('buckets/*/objects'); $this->assertEquals( ['$0' => 'hello%2F%2Bworld'], $template->match('buckets/hello%2F%2Bworld/objects')); } public function testMatchTemplateWithUnboundedWildcard() { $template = new PathTemplate('buckets/*/objects/**'); $this->assertEquals( ['$0' => 'foo', '$1' => 'bar/baz'], $template->match('buckets/foo/objects/bar/baz')); } public function testMatchWithUnboundInMiddle() { $template = new PathTemplate('bar/**/foo/*'); $this->assertEquals( ['$0' => 'foo/foo', '$1' => 'bar'], $template->match('bar/foo/foo/foo/bar')); } public function testRenderAtomicResource() { $template = new PathTemplate('buckets/*/*/*/objects/*'); $url = $template->render( ['$0' => 'f', '$1' => 'o', '$2' => 'o', '$3' => 'google.com:a-b']); $this->assertEquals($url, 'buckets/f/o/o/objects/google.com:a-b'); } /** * @expectedException Google\GAX\ValidationException */ public function testRenderFailWhenTooFewVariables() { $template = new PathTemplate('buckets/*/*/*/objects/*'); $template->render(['$0' => 'f', '$1' => 'l', '$2' => 'o']); } public function testRenderWithUnboundInMiddle() { $template = new PathTemplate('bar/**/foo/*'); $url = $template->render(['$0' => '1/2', '$1' => '3']); $this->assertEquals($url, 'bar/1/2/foo/3'); } public function testToString() { $template = new PathTemplate('bar/**/foo/*'); $this->assertEquals((string) $template, 'bar/{$0=**}/foo/{$1=*}'); $template = new PathTemplate('buckets/*/objects/*'); $this->assertEquals( (string) ($template), 'buckets/{$0=*}/objects/{$1=*}'); $template = new PathTemplate('/buckets/{hello}'); $this->assertEquals((string) ($template), 'buckets/{hello=*}'); $template = new PathTemplate('/buckets/{hello=what}/{world}'); $this->assertEquals( (string) ($template), 'buckets/{hello=what}/{world=*}'); $template = new PathTemplate('/buckets/helloazAZ09-.~_what'); $this->assertEquals( (string) ($template), 'buckets/helloazAZ09-.~_what'); } public function testSubstitutionOddChars() { $template = new PathTemplate('projects/{project}/topics/{topic}'); $url = $template->render( ['project' => 'google.com:proj-test', 'topic' => 'some-topic']); $this->assertEquals($url, 'projects/google.com:proj-test/topics/some-topic'); $template = new PathTemplate('projects/{project}/topics/{topic}'); $url = $template->render( ['project' => 'g.,;:~`!@#$%^&()+-', 'topic' => 'sdf<>,.?[]']); $this->assertEquals($url, 'projects/g.,;:~`!@#$%^&()+-/topics/sdf<>,.?[]'); } public function testLeadingSlash() { $this->assertEquals( count(new PathTemplate('/a/b/**/*/{a=hello/world}')), 6); } } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������tests/bootstrap.php���������������������������������������������������������������������������������0000644�����������������00000003642�15174274134�0010451 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /* * Copyright 2016, Google Inc. * All rights reserved. * * 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. */ require_once __DIR__ . '/../vendor/autoload.php'; require_once __DIR__ . '/mocks/MockRequest.php'; require_once __DIR__ . '/mocks/MockResponse.php'; require_once __DIR__ . '/mocks/MockStatus.php'; require_once __DIR__ . '/mocks/MockStub.php'; date_default_timezone_set('UTC'); ini_set('error_reporting', E_ALL); ini_set('display_errors', '1'); ini_set('display_startup_errors', '1'); ����������������������������������������������������������������������������������������������tests/mocks/MockRequest.php�������������������������������������������������������������������������0000644�����������������00000003566�15174274134�0012017 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /* * Copyright 2016, Google Inc. * All rights reserved. * * 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\GAX\Testing; class MockRequest { public $pageToken; public $pageSize; public static function createPageStreamingRequest($pageToken, $pageSize = null) { $request = new MockRequest(); $request->pageToken = $pageToken; $request->pageSize = $pageSize; return $request; } } ������������������������������������������������������������������������������������������������������������������������������������������tests/mocks/MockResponse.php������������������������������������������������������������������������0000644�����������������00000003605�15174274134�0012157 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /* * Copyright 2016, Google Inc. * All rights reserved. * * 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\GAX\Testing; class MockResponse { public $nextPageToken; public $resource; public static function createPageStreamingResponse($nextPageToken, $resource) { $response = new MockResponse(); $response->nextPageToken = $nextPageToken; $response->resource = $resource; return $response; } }���������������������������������������������������������������������������������������������������������������������������tests/mocks/MockStatus.php��������������������������������������������������������������������������0000644�����������������00000003372�15174274134�0011645 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /* * Copyright 2016, Google Inc. * All rights reserved. * * 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\GAX\Testing; class MockStatus { public $code; public $details; public function __construct($code, $details) { $this->code = $code; $this->details = $details; } } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������tests/mocks/MockStub.php����������������������������������������������������������������������������0000644�����������������00000006377�15174274134�0011307 0����������������������������������������������������������������������������������������������������ustar�00�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?php /* * Copyright 2016, Google Inc. * All rights reserved. * * 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\GAX\Testing; class MockStub { // invariant: count($responseSequence) >= 1 private $responseSequence; public $actualCalls; private function __construct() { $this->actualCalls = []; } public static function create($responseObject) { $stub = new MockStub(); $status = new MockStatus(\Grpc\STATUS_OK, ''); $stub->responseSequence = [[$responseObject, $status]]; return $stub; } /** * Creates a sequence such that the responses are returned in order, * and once there is only one left, it is repeated indefinitely. */ public static function createWithResponseSequence($sequence) { if (count($sequence) == 0) { throw new \InvalidArgumentException("createResponseSequence: need at least 1 response"); } $stub = new MockStub(); $stub->responseSequence = $sequence; return $stub; } public function takeAction($request, $metadata = array(), $options = array()) { $actualCall = [ 'request' => $request, 'metadata' => $metadata, 'options' => $options]; array_push($this->actualCalls, $actualCall); if (count($this->responseSequence) == 1) { return new MockGrpcCall($this->responseSequence[0]); } else { $response = array_shift($this->responseSequence); return new MockGrpcCall($response); } } } class MockGrpcCall { // this will be an array of [responseObject, status] private $response; public function __construct($response) { $this->response = $response; } public function wait() { return $this->response; } } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������